Sfoglia il codice sorgente

调试我的分享

tanshanming 8 mesi fa
parent
commit
aab3821e95

+ 1 - 0
src/layout/components/userbar.vue

@@ -127,6 +127,7 @@
 							tool.data.remove('USER_INFO')
 							tool.data.remove('MENU')
 							tool.data.remove('PERMISSIONS')
+							tool.cookie.remove('Token')
 							router.replace({ path: '/login' })
 						})
 						.catch(() => {

+ 25 - 5
src/libs/globalFunction/file.js

@@ -73,6 +73,12 @@ const fileFunction = {
 	 * @returns {string}  文件下载路径
 	 */
 	getDownloadFilePath(row) {
+		console.log(
+			'获取下载地址',
+			`${config.baseContext}/filetransfer/downloadfile?userFileId=${row.userFileId}&shareBatchNum=${
+				row.shareBatchNum == null ? '' : row.shareBatchNum
+			}&extractionCode=${row.extractionCode == null ? '' : row.extractionCode}`
+		)
 		return `${config.baseContext}/filetransfer/downloadfile?userFileId=${row.userFileId}&shareBatchNum=${
 			row.shareBatchNum == null ? '' : row.shareBatchNum
 		}&extractionCode=${row.extractionCode == null ? '' : row.extractionCode}`
@@ -202,9 +208,11 @@ const fileFunction = {
 	 * @param {*} imgInfoList 多个图片列表
 	 */
 	handleImgPreview(currentIndex, imgInfo = {}, imgInfoList = []) {
+		console.log('handleImgPreview', currentIndex, imgInfo, imgInfoList)
+		console.log('handleImgPreview--', router.currentRoute.value.query.fileType)
 		// 图片分类下 - 传递整个页面的图片列表;非图片分类下 - 由单个图片构建图片列表
 		const imgList =
-			Number(router.currentRoute.value.query.fileType.fileType) === 1
+			router.currentRoute.value.query.fileType && Number(router.currentRoute.value.query.fileType.fileType) === 1
 				? imgInfoList.map((item) => {
 						return {
 							...item,
@@ -219,7 +227,11 @@ const fileFunction = {
 							downloadLink: this.getDownloadFilePath(imgInfo)
 						}
 				  ]
-		const defaultIndex = Number(router.currentRoute.value.query.fileType.fileType) === 1 ? currentIndex : 0
+		const defaultIndex =
+			router.currentRoute.value.query.fileType && Number(router.currentRoute.value.query.fileType.fileType) === 1
+				? currentIndex
+				: 0
+
 		fileOperationPlugins.openBox.imgPreview({ imgList, defaultIndex })
 	},
 	/**
@@ -231,6 +243,7 @@ const fileFunction = {
 	handleVideoPreview(currentIndex, videoInfo = {}, videoInfoList = []) {
 		// 视频分类下 - 传递整个页面的视频列表;非视频分类下 - 由单个视频构建视频列表
 		const videoList =
+			router.currentRoute.value.query.fileType.fileType &&
 			Number(router.currentRoute.value.query.fileType.fileType) === 3
 				? videoInfoList.map((item) => {
 						return {
@@ -246,7 +259,11 @@ const fileFunction = {
 							downloadLink: this.getDownloadFilePath(videoInfo)
 						}
 				  ]
-		const defaultIndex = Number(router.currentRoute.value.query.fileType.fileType) === 3 ? currentIndex : 0
+		const defaultIndex =
+			router.currentRoute.value.query.fileType.fileType &&
+			Number(router.currentRoute.value.query.fileType.fileType) === 3
+				? currentIndex
+				: 0
 		fileOperationPlugins.openBox.videoPreview({ videoList, defaultIndex })
 	},
 	/**
@@ -258,7 +275,7 @@ const fileFunction = {
 	handleAudioPreview(currentIndex, audioInfo = {}, audioInfoList = []) {
 		// 音频分类下 - 传递整个页面的音频列表;非音频分类下 - 由单个音频构建音频列表
 		const audioList =
-			Number(router.currentRoute.value.query.fileType.fileType) === 4
+			router.currentRoute.value.query.fileType && Number(router.currentRoute.value.query.fileType.fileType) === 4
 				? audioInfoList.map((item) => {
 						return {
 							...item,
@@ -273,7 +290,10 @@ const fileFunction = {
 							downloadLink: this.getDownloadFilePath(audioInfo)
 						}
 				  ]
-		const defaultIndex = Number(router.currentRoute.value.query.fileType.fileType) === 4 ? currentIndex : 0
+		const defaultIndex =
+			router.currentRoute.value.query.fileType && Number(router.currentRoute.value.query.fileType.fileType) === 4
+				? currentIndex
+				: 0
 		fileOperationPlugins.openBox.audioPreview({ audioList, defaultIndex })
 	},
 	/**

+ 12 - 0
src/router/whiteList.js

@@ -30,6 +30,18 @@ const constRouters = [
 		meta: {
 			title: '微信JSAPI支付'
 		}
+	},
+	{
+		path: '/share/:shareBatchNum',
+		name: 'Share',
+		component: () => import('@/views/myResource/Share.vue'),
+		meta: {
+			title: '分享',
+			content: {
+				description: '查看他人分享'
+			}
+		},
+		props: true
 	}
 ]
 /**

+ 1 - 1
src/views/auth/login/util.js

@@ -10,7 +10,7 @@ import routerUtil from '@/utils/routerUtil'
 export const afterLogin = async (loginToken) => {
 	tool.data.set('TOKEN', loginToken)
 	//cookie里添加 token
-	tool.cookie.set('token', loginToken)
+	tool.cookie.set('Token', loginToken)
 	// 获取登录的用户信息
 	const loginUser = await loginApi.getLoginUser()
 	const globalStore = useGlobalStore()

+ 261 - 0
src/views/myResource/Share.vue

@@ -0,0 +1,261 @@
+<template>
+	<div class="share-wrapper">
+		<div class="share-file-wrapper" v-if="shareStep === 3">
+			<div class="operation-wrapper">
+				<!-- 面包屑导航栏 -->
+				<BreadCrumb class="breadcrumb" :fileType="7"></BreadCrumb>
+				<a-button type="primary" size="small" v-show="isLogin" @click="handleSaveBtnClick">
+					<template #icon><inbox-outlined /></template>
+					保存到网盘
+				</a-button>
+			</div>
+			<!-- 文件列表-表格模式 -->
+			<FileTable
+				ref="fileTableInstance"
+				:fileType="7"
+				:filePath="filePath"
+				:fileList="fileList"
+				:loading="loading"
+			></FileTable>
+		</div>
+		<!-- 校验文件分享链接状态和是否需要提取码对话框 -->
+		<a-modal
+			title="文件分享"
+			v-model:visible="dialogShareFile.visible"
+			:maskClosable="false"
+			:keyboard="false"
+			width="500px"
+		>
+			<div class="end-time" v-if="shareStep === 1">此分享链接已过期</div>
+			<a-form
+				class="extraction-code-form"
+				v-if="shareStep === 2"
+				ref="codeFormRef"
+				:model="dialogShareFile.codeForm"
+				:rules="dialogShareFile.codeFormRules"
+			>
+				<a-form-item label="提取码" name="extractionCode">
+					<a-input v-model:value="dialogShareFile.codeForm.extractionCode"></a-input>
+				</a-form-item>
+			</a-form>
+			<template #footer>
+				<a-button v-if="shareStep === 1" @click="handleCloseBtnClick()">关 闭</a-button>
+				<a-button v-else type="primary" @click="handleSubmitBtnClick">提 交</a-button>
+			</template>
+		</a-modal>
+	</div>
+</template>
+
+<script setup>
+	import { ref, computed, onMounted, getCurrentInstance } from 'vue'
+	import { useRoute, useRouter } from 'vue-router'
+	import { storeToRefs } from 'pinia'
+	import { useMyResourceStore } from '@/store/myResource'
+	import BreadCrumb from '@/views/myResource/common/BreadCrumb.vue'
+	import FileTable from '@/views/myResource/common/FileTable.vue'
+	import { InboxOutlined } from '@ant-design/icons-vue'
+	import { message } from 'ant-design-vue'
+	import {
+		checkShareLinkEndtime,
+		checkShareLinkType,
+		checkShareLinkCode,
+		getShareFileList
+	} from '@/api/myResource/file.js'
+
+	const { proxy } = getCurrentInstance()
+	const route = useRoute()
+	const router = useRouter()
+	const myResourceStore = useMyResourceStore()
+	const { getIsLogin } = storeToRefs(myResourceStore)
+
+	// 文件分享对话框数据
+	const dialogShareFile = ref({
+		visible: false,
+		codeForm: {
+			extractionCode: ''
+		},
+		codeFormRules: {
+			extractionCode: [
+				{
+					required: true,
+					message: '请输入提取码',
+					trigger: 'blur'
+				}
+			]
+		}
+	})
+
+	const shareStep = ref(0)
+	const fileList = ref([])
+	const loading = ref(false)
+	const fileTableInstance = ref(null)
+	const codeFormRef = ref(null)
+
+	// 计算属性
+	const isLogin = computed(() => getIsLogin.value)
+	const shareBatchNum = computed(() => route.params.shareBatchNum)
+	const filePath = computed(() => route.query.filePath)
+	const shareFilePath = computed(() => route.query.filePath)
+	// 被选中的文件列表
+	const selectedFiles = computed(() => myResourceStore.selectedFiles)
+
+	// 监听路径变化
+	watch(
+		() => filePath.value,
+		() => {
+			getShareList()
+		}
+	)
+
+	// 生命周期钩子
+	onMounted(() => {
+		if (!filePath.value) {
+			router.replace({
+				query: {
+					filePath: '/'
+				}
+			})
+		}
+		checkEndTime()
+	})
+
+	/**
+	 * 校验分享链接过期时间
+	 */
+	const checkEndTime = () => {
+		checkShareLinkEndtime({
+			shareBatchNum: shareBatchNum.value
+		}).then((res) => {
+			if (res.success) {
+				if (localStorage.getItem(`qiwen_share_${shareBatchNum.value}`) === 'true') {
+					checkShareComplete()
+				} else {
+					dialogShareFile.value.visible = true
+					checkShareType()
+				}
+			} else {
+				dialogShareFile.value.visible = true
+				shareStep.value = 1 //  链接已过期
+			}
+		})
+	}
+
+	/**
+	 * 校验分享类型
+	 * @description 校验分享链接是公共还是私密
+	 */
+	const checkShareType = () => {
+		checkShareLinkType({
+			shareBatchNum: shareBatchNum.value
+		}).then((res) => {
+			if (res.success) {
+				// 0 公共 1 私密
+				if (res.data.shareType === 0) {
+					shareStep.value = 3 //  不是私密链接,直接展示文件列表
+					getShareList()
+					dialogShareFile.value.visible = false
+				}
+				if (res.data.shareType === 1) {
+					shareStep.value = 2 //  是私密链接时,让用户输入提取码
+				}
+			} else {
+				message.error(res.message)
+			}
+		})
+	}
+
+	/**
+	 * 分享文件验证对话框 取消按钮
+	 */
+	const handleCloseBtnClick = () => {
+		dialogShareFile.value.visible = false
+		router.push({ name: 'File', query: { fileType: 0, filePath: '/' } })
+	}
+
+	/**
+	 * 提交按钮点击事件
+	 */
+	const handleSubmitBtnClick = () => {
+		codeFormRef.value
+			.validate()
+			.then(() => {
+				checkShareLinkCode({
+					extractionCode: dialogShareFile.value.codeForm.extractionCode,
+					shareBatchNum: shareBatchNum.value
+				}).then((res) => {
+					if (res.success) {
+						localStorage.setItem(`qiwen_share_${shareBatchNum.value}`, true)
+						codeFormRef.value.resetFields() //  清空表单
+						checkShareComplete()
+					} else {
+						message.error(res.message)
+					}
+				})
+			})
+			.catch(() => {
+				// 表单验证失败
+			})
+	}
+
+	/**
+	 * 校验全部通过
+	 */
+	const checkShareComplete = () => {
+		shareStep.value = 3 //  展示文件列表
+		dialogShareFile.value.visible = false
+		getShareList()
+	}
+
+	/**
+	 * 获取分享文件列表
+	 */
+	const getShareList = () => {
+		loading.value = true
+		getShareFileList({
+			shareFilePath: shareFilePath.value,
+			shareBatchNum: shareBatchNum.value
+		}).then((res) => {
+			if (res.success) {
+				fileList.value = res.dataList
+				loading.value = false
+			} else {
+				message.error(res.message)
+			}
+		})
+	}
+
+	/**
+	 * 保存到网盘按钮点击事件
+	 */
+	const handleSaveBtnClick = () => {
+		if (selectedFiles.value.length) {
+			proxy.$openDialog
+				.saveShareFile({
+					filePath: '',
+					shareBatchNum: shareBatchNum.value,
+					userFileIds: selectedFiles.value.map((item) => item.userFileId).join(',')
+				})
+				.then(() => {
+					fileTableInstance.value.clearSelectedTable() //  清空表格已选项
+				})
+		} else {
+			message.warning('请先勾选要保存的文件')
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	@import '@/style/myResource/varibles.less';
+
+	.share-wrapper {
+		.share-file-wrapper {
+			width: 100%;
+
+			.operation-wrapper {
+				display: flex;
+				justify-content: space-between;
+				padding: 8px 0;
+			}
+		}
+	}
+</style>

+ 4 - 4
src/views/myResource/file/box/contextMenu/Box.vue

@@ -70,9 +70,9 @@
 			>
 				<edit-outlined /> 编辑文件夹
 			</li> -->
-			<li class="right-menu-item" @click="handleClickFileEdit(selectedFile)" v-if="onlineEditBtnShow">
+			<!-- <li class="right-menu-item" @click="handleClickFileEdit(selectedFile)" v-if="onlineEditBtnShow">
 				<edit-outlined /> 在线编辑
-			</li>
+			</li> -->
 			<li
 				class="right-menu-item"
 				@click="$file.copyShareLink(selectedFile.shareBatchNum, selectedFile.extractionCode)"
@@ -96,9 +96,9 @@
 			<template v-if="fileType === 0">
 				<a-divider />
 				<li class="right-menu-item" @click="handleClickAddFolderBtn"><folder-add-outlined /> 新建文件夹</li>
-				<li class="right-menu-item" @click="handleCreateFile('docx')"><img :src="wordImg" />新建 Word 文档</li>
+				<!-- <li class="right-menu-item" @click="handleCreateFile('docx')"><img :src="wordImg" />新建 Word 文档</li>
 				<li class="right-menu-item" @click="handleCreateFile('xlsx')"><img :src="excelImg" />新建 Excel 工作表</li>
-				<li class="right-menu-item" @click="handleCreateFile('pptx')"><img :src="pptImg" />新建 PPT 演示文稿</li>
+				<li class="right-menu-item" @click="handleCreateFile('pptx')"><img :src="pptImg" />新建 PPT 演示文稿</li> -->
 				<a-divider />
 				<li class="right-menu-item" @click="handleUploadFileBtnClick(1)"><upload-outlined /> 上传文件</li>
 				<li class="right-menu-item" @click="handleUploadFileBtnClick(2)"><folder-open-outlined /> 上传文件夹</li>

+ 26 - 6
src/views/myResource/file/dialog/shareFile/Dialog.vue

@@ -15,9 +15,11 @@
 					v-model:value="form.endTime"
 					show-time
 					format="YYYY-MM-DD HH:mm:ss"
+					value-format="YYYY-MM-DD HH:mm:ss"
 					placeholder="选择日期时间"
 					:inputReadOnly="true"
 					:allowClear="false"
+					:locale="locale"
 				>
 					<template #renderExtraFooter>
 						<div>
@@ -80,7 +82,11 @@
 	import { useMyResourceStore } from '@/store/myResource.js'
 	import { message } from 'ant-design-vue'
 	import { CheckCircleOutlined } from '@ant-design/icons-vue'
+	import zhCN from 'ant-design-vue/es/date-picker/locale/zh_CN'
+
 	const myResourceStore = useMyResourceStore()
+	// 设置日期选择器的中文locale
+	const locale = zhCN
 
 	// 定义props
 	const props = defineProps({
@@ -124,24 +130,38 @@
 	const setEndTime = (type) => {
 		const nowDate = new Date()
 		let oneDay, sevenDays, thirtyDays
+		let dateStr = ''
+
+		const formatDate = (date) => {
+			const year = date.getFullYear()
+			const month = String(date.getMonth() + 1).padStart(2, '0')
+			const day = String(date.getDate()).padStart(2, '0')
+			const hours = String(date.getHours()).padStart(2, '0')
+			const minutes = String(date.getMinutes()).padStart(2, '0')
+			const seconds = String(date.getSeconds()).padStart(2, '0')
+			return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+		}
+
 		switch (type) {
-			case 'today':
-				form.endTime = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate(), 23, 59, 59)
+			case 'today': {
+				const todayEnd = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate(), 23, 59, 59)
+				form.endTime = formatDate(todayEnd)
 				break
+			}
 			case '1day':
 				oneDay = new Date()
 				oneDay.setTime(oneDay.getTime() + 3600 * 1000 * 24)
-				form.endTime = oneDay
+				form.endTime = formatDate(oneDay)
 				break
 			case '7days':
 				sevenDays = new Date()
 				sevenDays.setTime(sevenDays.getTime() + 3600 * 1000 * 24 * 7)
-				form.endTime = sevenDays
+				form.endTime = formatDate(sevenDays)
 				break
 			case '30days':
 				thirtyDays = new Date()
 				thirtyDays.setTime(thirtyDays.getTime() + 3600 * 1000 * 24 * 30)
-				form.endTime = thirtyDays
+				form.endTime = formatDate(thirtyDays)
 				break
 		}
 	}
@@ -170,7 +190,7 @@
 				remarks: '',
 				userFileIds: props.fileInfo.map((res) => res.userFileId).join(',')
 			}
-
+			console.log('params', params)
 			try {
 				const res = await shareFile(params)
 				sureBtnLoading.value = false

+ 72 - 66
src/views/myResource/file/dialog/showFileDetail/Dialog.vue

@@ -1,4 +1,5 @@
 <template>
+	<!-- 查看文件详情对话框 -->
 	<a-modal
 		class="file-info-dialog"
 		title="文件详情"
@@ -11,54 +12,49 @@
 		<a-form
 			class="file-info-form"
 			:model="fileInfo"
-			ref="fileInfoFormRef"
-			layout="horizontal"
-			:label-col="{ span: 6 }"
-			:wrapper-col="{ span: 18 }"
+			ref="fileInfoForm"
+			label-align="right"
+			:label-col="{ style: { width: '82px' } }"
+			size="small"
 		>
-			<a-form-item label="文件名" name="fileName">
-				<a-input :value="$file.getFileNameComplete(fileInfo)" readonly />
+			<a-form-item label="文件名" name="fileName">
+				<a-input :value="$file.getFileNameComplete(fileInfo)" readonly :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item :label="fileType === 6 ? '原路径' : '路径'" name="filePath" v-if="![0, 8].includes(fileType)">
-				<a-input :value="fileInfo.filePath" readonly @click="handleClickFilePath(fileInfo)" />
+			<a-form-item :label="fileType === 6 ? '原路径:' : '路径:'" name="filePath" v-if="![0, 8].includes(fileType)">
+				<a-input :value="fileInfo.filePath" readonly @click="handleClickFilePath(fileInfo)" :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item label="类型" name="fileName">
-				<a-input :value="$file.getFileType(fileInfo)" readonly />
+			<a-form-item label="类型:" name="fileName">
+				<a-input :value="$file.getFileType(fileInfo)" readonly :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item label="大小" name="fileSize">
-				<a-input :value="fileInfo.isDir === 0 ? $file.calculateFileSize(fileInfo.fileSize) : ''" readonly />
+			<a-form-item label="大小:" name="fileSize">
+				<a-input
+					:value="fileInfo.isDir === 0 ? $file.calculateFileSize(fileInfo.fileSize) : ''"
+					readonly
+					:bordered="false"
+				></a-input>
 			</a-form-item>
-
 			<a-form-item
-				label="修改日期"
+				label="修改日期"
 				name="uploadTime"
 				v-if="![7, 8].includes(fileType) && !['Share'].includes(routeName)"
 			>
-				<a-input :value="fileInfo.uploadTime" readonly />
+				<a-input :value="fileInfo.uploadTime" readonly :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item label="删除日期" name="deleteTime" v-if="fileType === 6">
-				<a-input :value="fileInfo.deleteTime" readonly />
+			<a-form-item label="删除日期:" name="deleteTime" v-if="fileType === 6">
+				<a-input :value="fileInfo.deleteTime" readonly :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item label="分享类型" name="shareType" v-if="fileType === 8">
-				<a-input :value="fileInfo.shareType === 1 ? '私密' : '公共'" readonly />
+			<a-form-item label="分享类型:" name="shareType" v-if="fileType === 8">
+				<a-input :value="fileInfo.shareType === 1 ? '私密' : '公共'" readonly :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item label="分享时间" name="shareTime" v-if="fileType === 8">
-				<a-input :value="fileInfo.shareTime" readonly />
+			<a-form-item label="分享时间:" name="shareTime" v-if="fileType === 8">
+				<a-input :value="fileInfo.shareTime" readonly :bordered="false"></a-input>
 			</a-form-item>
-
-			<a-form-item label="过期时间" name="endTime" v-if="fileType === 8" class="form-item-end-time">
-				<a-input :value="fileInfo.endTime" readonly />
-				<WarningOutlined class="status-icon warning" v-if="$file.getFileShareStatus(fileInfo.endTime)" />
-				<ClockCircleOutlined class="status-icon success" v-else />
+			<a-form-item label="过期时间:" name="endTime" v-if="fileType === 8" class="form-item-end-time">
+				<a-input :value="fileInfo.endTime" readonly :bordered="false"></a-input>
+				<warning-outlined class="status-icon warning-icon" v-if="$file.getFileShareStatus(fileInfo.endTime)" />
+				<clock-circle-outlined class="status-icon time-icon" v-else />
 			</a-form-item>
 		</a-form>
-
 		<template #footer>
 			<a-button @click="handleDialogClose">关 闭</a-button>
 		</template>
@@ -67,30 +63,54 @@
 
 <script setup>
 	import { ref, computed } from 'vue'
-	import { useRouter } from 'vue-router'
+	import { useRouter, useRoute } from 'vue-router'
 	import { WarningOutlined, ClockCircleOutlined } from '@ant-design/icons-vue'
 
+	const router = useRouter()
+	const route = useRoute()
+	// 定义组件属性
 	const props = defineProps({
-		fileInfo: Object,
-		callback: Function
+		fileInfo: {
+			type: Object,
+			default: () => ({})
+		},
+		callback: {
+			type: Function,
+			default: () => {}
+		}
 	})
 
-	const router = useRouter()
-	const fileInfoFormRef = ref(null)
+	// 响应式状态
 	const visible = ref(false)
+	const fileInfoForm = ref(null)
 
+	// 计算属性
+	// 左侧菜单选中的文件类型
 	const fileType = computed(() => {
-		return router.currentRoute.value.query.fileType ? Number(router.currentRoute.value.query.fileType) : 0
+		console.log('route', route.query)
+		return route.query.fileType ? Number(route.query.fileType) : 0
 	})
 
-	const routeName = computed(() => router.currentRoute.value.name)
+	// 路由名称
+	const routeName = computed(() => {
+		return route.name
+	})
 
+	// 方法
+	/**
+	 * 查看文件详情对话框 | 对话框关闭的回调
+	 * @description 关闭对话框
+	 */
 	const handleDialogClose = () => {
 		visible.value = false
-		fileInfoFormRef.value?.resetFields()
+		fileInfoForm.value.resetFields()
 		props.callback('cancel')
 	}
 
+	/**
+	 * 路径点击事件
+	 * @param {object} fileInfo 文件信息
+	 */
 	const handleClickFilePath = (fileInfo) => {
 		router.push({
 			query: { filePath: fileInfo.filePath, fileType: 0 }
@@ -98,6 +118,7 @@
 		handleDialogClose()
 	}
 
+	// 暴露方法给父组件
 	defineExpose({
 		visible
 	})
@@ -114,48 +135,33 @@
 		height: auto;
 	}
 
-	.file-info-form {
-		:deep(.ant-form-item) {
+	:deep(.file-info-form) {
+		.ant-form-item {
 			margin-bottom: 16px;
-
 			.ant-input {
-				border: none;
+				border: none !important;
+				box-shadow: none !important;
 				font-size: 14px;
 			}
-
 			&.form-item-end-time {
 				.ant-form-item-control-input-content {
 					display: flex;
 					align-items: center;
-
 					.ant-input {
 						width: 141px;
 						padding-right: 0;
 					}
-
 					.status-icon {
 						font-size: 14px;
-						margin-left: 8px;
-
-						&.warning {
-							color: @warning-color;
-						}
-
-						&.success {
-							color: @success-color;
-						}
+					}
+					.warning-icon {
+						color: @warning-color;
+					}
+					.time-icon {
+						color: @success-color;
 					}
 				}
 			}
 		}
 	}
-
-	.ant-btn {
-		&:hover,
-		&:focus {
-			color: white;
-			border-color: @hover-color;
-			background-color: @hover-color;
-		}
-	}
 </style>

+ 4 - 1
src/views/myResource/file/dialog/showFileDetail/index.js

@@ -1,8 +1,9 @@
 import { createApp } from 'vue'
 import Antd from 'ant-design-vue'
+import router from '@/router'
 // 导入组件
 import FileDetailDialog from './Dialog.vue'
-
+import snowy from '@/snowy'
 let fileDetailInstance = null
 let fileDetailApp = null
 
@@ -19,6 +20,8 @@ const initInstanceFileDetail = (fileInfo, callback) => {
 	})
 	// 注册 Ant Design Vue 组件
 	fileDetailApp.use(Antd)
+	fileDetailApp.use(router)
+	fileDetailApp.use(snowy)
 	fileDetailInstance = fileDetailApp.mount(mountNode)
 	return mountNode
 }

+ 0 - 1
src/views/myResource/resourceLibrary/file/FileList.vue

@@ -252,7 +252,6 @@
 		}
 		getFileListByPath(data).then((res) => {
 			if (res.success) {
-				console.log('获取到的数据呢', res.dataList)
 				for (let i = 0; i < res.dataList.length; i++) {
 					res.dataList[i].key = i
 				}