zhangsq 8 місяців тому
батько
коміт
1637b6a96c

+ 1 - 1
.env.development

@@ -6,7 +6,7 @@ VITE_TITLE = Snowy
 
 # 接口地址
 # VITE_API_BASEURL = http://192.168.31.14:9003
-VITE_API_BASEURL = http://192.168.31.81:9003
+VITE_API_BASEURL = http://192.168.31.81:19003
 VITE_FILEURL = http://192.168.1.245:10005/education/
 # VITE_API_BASEURL = http://192.168.31.14:9003
 # VITE_API_BASEURL = http://192.168.31.6:9003

+ 45 - 11
src/views/myResources/myResources.vue

@@ -70,13 +70,13 @@
 				<a-button
 					type="primary"
 					style="margin-right: 8px"
-					v-if="formState.verifyStatus === '0'"
+					v-if="formState.verifyStatus === '0' && !pageType"
 					@click="batchPublish"
 					:disabled="selectedRowKeys.length === 0"
 				>
 					+ 批量发布
 				</a-button>
-				<a-button type="primary" @click="showUploadModal">+ 上传资源</a-button>
+				<a-button type="primary" v-if="!pageType" @click="showUploadModal">+ 上传资源</a-button>
 			</a-col>
 		</a-row>
 
@@ -127,14 +127,10 @@
 						/>
 					</a-tooltip>
 				</template>
-				<!-- 操作列 -->
-				<template v-else-if="column.key === 'action'">
+				<!-- 个人资源操作列 -->
+				<template v-if="column.key === 'action' && !pageType">
 					<div class="editable-cell">
-						<a v-if="formState.verifyStatus === '0' && !pageType" @click="handlePublish(record)">发布</a>
-						<a v-if="formState.verifyStatus === '1' && pageType == 'economize'" @click="handleAudit(record)">审核</a>
-						<a v-if="formState.verifyStatus === '2' && pageType == 'economize'" @click="handlePermission(record)"
-							>权限</a
-						>
+						<a v-if="formState.verifyStatus === '0'" @click="handlePublish(record)">发布</a>
 						<a v-if="formState.verifyStatus === '4'" @click="handleRestore(record)">恢复</a>
 						<a-divider type="vertical" />
 						<a-dropdown>
@@ -148,7 +144,6 @@
 										<a href="javascript:;" @click="handleView(record)">播放</a>
 									</a-menu-item>
 									<a-menu-item>
-										<!-- <a href="javascript:;" @click="handleDownload(record)">下载</a> -->
 										<a
 											target="_blank"
 											style="display: block; color: inherit"
@@ -158,10 +153,47 @@
 											下载
 										</a>
 									</a-menu-item>
-									<a-menu-item v-if="formState.verifyStatus === '2'">
+									<a-menu-item v-if="formState.verifyStatus !== '2'">
 										<a href="javascript:;" @click="edit(record)">编辑</a>
 									</a-menu-item>
+									<a-menu-item v-if="formState.verifyStatus !== '2'">
+										<a-popconfirm title="确认删除吗?" @confirm="resourcesDelete(record)">
+											<a href="javascript:;">删除</a>
+										</a-popconfirm>
+									</a-menu-item>
+								</a-menu>
+							</template>
+						</a-dropdown>
+					</div>
+				</template>
+				<!-- 资源管理操作列 -->
+				<template v-if="column.key === 'action' && pageType == 'economize'">
+					<div class="editable-cell">
+						<a v-if="formState.verifyStatus === '1'" @click="handleAudit(record)">审核</a>
+						<a v-if="formState.verifyStatus === '2'" @click="handlePermission(record)">权限</a>
+						<a v-if="formState.verifyStatus === '4'" @click="handleRestore(record)">恢复</a>
+						<a-divider type="vertical" />
+						<a-dropdown>
+							<a class="ant-dropdown-link">
+								更多
+								<DownOutlined />
+							</a>
+							<template #overlay>
+								<a-menu>
+									<a-menu-item>
+										<a href="javascript:;" @click="handleView(record)">播放</a>
+									</a-menu-item>
 									<a-menu-item>
+										<a
+											target="_blank"
+											style="display: block; color: inherit"
+											:href="$file.getDownloadFilePath3(record)"
+											:download="record.fileName"
+										>
+											下载
+										</a>
+									</a-menu-item>
+									<a-menu-item v-if="formState.verifyStatus !== '1'">
 										<a-popconfirm title="确认删除吗?" @confirm="resourcesDelete(record)">
 											<a href="javascript:;">删除</a>
 										</a-popconfirm>
@@ -224,6 +256,8 @@
 	import auditModal from './auditModal.vue'
 	import CustomPagination from '@/components/customPagination.vue'
 	import tool from '@/utils/tool'
+	import { useRoute, useRouter } from 'vue-router'
+	const router = useRouter()
 	import {
 		FileOutlined,
 		FileImageOutlined,

+ 11 - 7
src/views/resourceDetails/components/VideoDetails.vue

@@ -61,7 +61,7 @@
 							</div>
 						</div>
 
-						<div style="display: flex; align-items: center">
+						<div style="display: flex; align-items: center" v-if="!isState">
 							<div class="metrics">
 								<div class="metric-item">
 									<span>{{ itemData.viewCount }}</span>
@@ -172,12 +172,16 @@
 	// import pdfView from 'pdfvuer'
 	// import 'pdfvuer/dist/pdfvuer.css'
 
-	// const props = defineProps({
-	// 	itemData: {
-	// 		type: Object,
-	// 		default: () => {}
-	// 	}
-	// })
+	const props = defineProps({
+		// itemData: {
+		// 	type: Object,
+		// 	default: () => {}
+		// }
+		isState: {
+			type: Number,
+			default: () => null
+		}
+	})
 	const itemData = ref({})
 	const starTag = ref(false)
 	const ShareDialogRef = ref(null)

+ 2 - 2
src/views/resourceDetails/index.vue

@@ -4,7 +4,7 @@
 			<Header @onChangeCurrent="onChangeCurrent" />
 			<div style="width: 71%; margin-left: 10%">
 				<BreadCrumb />
-				<VideoDetails ref="VideoDetailsRef" />
+				<VideoDetails :isState="isState" ref="VideoDetailsRef" />
 				<TallList v-if="!isState" />
 				<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
 			</div>
@@ -30,7 +30,7 @@
 	const itemData = ref({})
 	const VideoDetailsRef = ref(null)
 	const route = useRoute()
-	const isState = ref(route.query.state)
+	const isState = ref(route.query.state || null)
 	//     {
 	//     "fileName": "Kettle文档",
 	//     "courseType": "0",

+ 1 - 1
vite.config.js

@@ -52,7 +52,7 @@ export default defineConfig(({ command, mode }) => {
 			port: envConfig.VITE_PORT,
 			proxy: {
 				'/api': {
-					target: 'http://192.168.31.81:9003',
+					target: 'http://192.168.31.81:19003',
 					ws: false,
 					changeOrigin: true
 					// rewrite: (path) => path.replace(/^\/api/, '')