Browse Source

feat(资源审核): 重构资源审核功能,使用Pinia管理状态

- 新增resourceAudit store管理审核参数
- 重构资源详情页和审核页,使用store替代路由传参
- 优化资源详情页布局和样式
- 移除不再使用的resourceManagement路由
- 新增semesterDownList和majordownList API接口
- 修复控制台错误日志输出
tanshanming 7 tháng trước cách đây
mục cha
commit
3c95f845b0

+ 8 - 0
src/api/resourceAudit.js

@@ -47,6 +47,14 @@ export default {
 	courseAllList(data = {}) {
 		return request('disk/courseinfo/allList', data, 'get')
 	},
+	//获取学期列表
+	semesterDownList(data = {}) {
+		return request('disk/semester/downList', data, 'get')
+	},
+	//获取专业列表
+	majordownList(data = {}) {
+		return request('disk/major/downList', data, 'get')
+	},
 	//查询资源表单最后一次提交信息
 	recentlyRecord(data = {}) {
 		return request('disk/courseauditrecord/recentlyRecord', data, 'get')

+ 5 - 5
src/router/portal.js

@@ -39,11 +39,11 @@ const portal = [
 				path: '/portal/personalResources',
 				component: () => import('@/views/myResources/personalResources/index.vue')
 			},
-			{
-				name: 'portal.resourceManagement',
-				path: '/portal/resourceManagement',
-				component: () => import('@/views/myResources/resourceManagement/index.vue')
-			},
+			// {
+			// 	name: 'portal.resourceManagement',
+			// 	path: '/portal/resourceManagement',
+			// 	component: () => import('@/views/myResources/resourceManagement/index.vue')
+			// },
 			{
 				name: 'portal.courseCenter',
 				path: '/portal/courseCenter',

+ 4 - 4
src/router/whiteList.js

@@ -21,10 +21,10 @@ const constRouters = [
 		path: '/portal/personalResources',
 		component: () => import('@/views/myResources/personalResources/index.vue')
 	},
-	{
-		path: '/portal/resourceManagement',
-		component: () => import('@/views/myResources/resourceManagement/index.vue')
-	},
+	// {
+	// 	path: '/portal/resourceManagement',
+	// 	component: () => import('@/views/myResources/resourceManagement/index.vue')
+	// },
 	{
 		path: '/portal/courseCenter',
 		component: () => import('@/views/courseCenter/index.vue')

+ 31 - 0
src/store/resourceAudit.js

@@ -0,0 +1,31 @@
+import { defineStore } from 'pinia'
+
+export const resourceAuditStore = defineStore({
+	id: 'resourceAudit',
+	state: () => ({
+		// 资源审核相关参数
+		auditParams: {
+			id: null, // 资源ID
+			state: null, // 状态
+			audit: null // 是否审核
+		}
+	}),
+	getters: {
+		// 获取审核参数
+		getAuditParams: (state) => state.auditParams
+	},
+	actions: {
+		// 设置审核参数
+		setAuditParams(params) {
+			this.auditParams = { ...params }
+		},
+		// 清空审核参数
+		clearAuditParams() {
+			this.auditParams = {
+				id: null,
+				state: null,
+				audit: null
+			}
+		}
+	}
+})

+ 22 - 44
src/views/myResources/myResources.vue

@@ -92,7 +92,7 @@
 			bordered
 			:row-key="(record) => record.id"
 			:row-selection="rowSelection"
-			:scroll="{ x: 1500, y: 300 }"
+			:scroll="{ x: 1500, y: 700 }"
 		>
 			<template #bodyCell="{ column, text, record }">
 				<template
@@ -178,9 +178,9 @@
 				<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 === '2'" @click="handlePermission(record)">权限</a> -->
 						<a v-if="formState.verifyStatus === '4'" @click="handleRestore(record)">恢复</a>
-						<a-divider type="vertical" />
+						<!-- <a-divider type="vertical" /> -->
 						<a-dropdown>
 							<a class="ant-dropdown-link">
 								更多
@@ -266,7 +266,9 @@
 	import CustomPagination from '@/components/customPagination.vue'
 	import tool from '@/utils/tool'
 	import { useRoute, useRouter } from 'vue-router'
+	import { resourceAuditStore } from '@/store/resourceAudit'
 	const router = useRouter()
+	const auditStore = resourceAuditStore()
 	import {
 		FileOutlined,
 		FileImageOutlined,
@@ -334,6 +336,7 @@
 		pageNum: 1,
 		total: 0
 	})
+	const emit = defineEmits(['handlerAudit'])
 	const formState = reactive({
 		fileName: null,
 		verifyStatus: '0,3',
@@ -544,20 +547,18 @@
 		resourceAuditApi
 			.page(params)
 			.then((res) => {
-				console.log(res, '资源审核列表')
 				dataSource.value = res.data.records
 				pagination.total = res.data.total
 				loading.value = false
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 				dataSource.value = []
 				pagination.total = 0
 				loading.value = false
 			})
 	}
 	const changeCollegeMajor = (value, selectedOptions) => {
-		console.log('Selected:', value, selectedOptions)
 		if (!value) {
 			majorIdName.value = ''
 			return false
@@ -569,12 +570,10 @@
 		if (selectedOptions.length) {
 			// 获取选中的最后一级
 			const lastSelected = selectedOptions[selectedOptions.length - 1]
-			console.log(lastSelected, '最后一级id')
 			getCollegeMajor(lastSelected.id)
 		}
 	}
 	const changeCollegeResource = (value, selectedOptions) => {
-		console.log('Selected:', value, selectedOptions)
 		if (!value) {
 			resourceName.value = ''
 			formState.resourceType = undefined
@@ -584,8 +583,6 @@
 		resourceName.value = selectedOptions.map((it) => it.name).join('/')
 		formState.resourceType = value[0] || undefined
 		formState.resourceTwoType = value[1] || undefined
-
-		console.log('已经修改:', formState)
 	}
 	const getList = () => {
 		getListData()
@@ -596,11 +593,10 @@
 		resourceAuditApi
 			.orgTreeSelector()
 			.then((res) => {
-				console.log(res.data, '获取组织树选择器')
 				collegeMajorOptions.value = res.data
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 	//资源类型下拉查询
@@ -608,11 +604,10 @@
 		resourceAuditApi
 			.resourceTypeTree()
 			.then((res) => {
-				console.log(res.data, '资源类型下拉')
 				resourceTypeOptions.value = res.data
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 	//资源格式下拉查询
@@ -620,27 +615,24 @@
 		resourceAuditApi
 			.fileformat()
 			.then((res) => {
-				console.log(res.data, '资源类型下拉')
 				fileformatOptions.value = res.data.records
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 	const getCollegeMajor = (id) => {
 		resourceAuditApi
 			.zyselect({ collegeId: id })
 			.then((res) => {
-				console.log(res.data, '专业下拉数据')
 				majorOptions.value = res.data
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 	// 方法
 	const handleSearch = () => {
-		console.log('Search:', searchValue.value)
 		getListData()
 	}
 
@@ -697,7 +689,6 @@
 	}
 	//发布确定
 	const releaseConfirm = (obj) => {
-		console.log(obj, selectedRows.value, '传回来的数据')
 		releaseVisible.value = false
 		if (isPublishBulk.value) {
 			// const batchParams = selectedRows.value.map((item) => ({
@@ -712,7 +703,6 @@
 				resourceDesc: obj.resourceDesc,
 				verifyStatus: 1
 			}
-			console.log(params, '批量发布参数')
 			// handleRelease(params)
 		} else {
 			const params = {
@@ -721,7 +711,6 @@
 				resourceDesc: obj.resourceDesc,
 				verifyStatus: 1
 			}
-			console.log(params, '发布参数')
 			handleRelease(params)
 		}
 	}
@@ -739,26 +728,20 @@
 	}
 	const auditState = ref(null)
 	const handleAudit = (record) => {
-		// console.log('Audit:', record)
-		// publishedData.value = record
-		// auditState.value = true
-		// auditModalVisible.value = true
-		router.push({
-			path: '/portal/resourceDetails',
-			query: {
-				id: record.id,
-				state: 1,
-				audit: 1
-			}
-		})
+		// 使用store存储审核参数
+		const auditParams = { id: record.id, state: 1, audit: 1 }
+		auditStore.setAuditParams(auditParams)
+		emit('handlerAudit', auditParams)
 	}
 	const handleView = (record) => {
+		// 使用store存储预览参数
+		auditStore.setAuditParams({
+			id: record.id,
+			state: 1,
+			audit: null
+		})
 		router.push({
-			path: '/portal/resourceDetails',
-			query: {
-				id: record.id,
-				state: 1
-			}
+			path: '/portal/resourceDetails'
 		})
 		// publishedData.value = record
 		// auditState.value = false
@@ -773,7 +756,6 @@
 				admin: true
 			})
 			.then((res) => {
-				console.log('下载成功:', res)
 				// 创建Blob对象
 				const url = window.URL.createObjectURL(new Blob([res]))
 				const link = document.createElement('a')
@@ -790,11 +772,9 @@
 	}
 
 	const handlePermission = (record) => {
-		console.log('Permission:', record)
 		permissionTreeVisible.value = true
 	}
 	const auditConfirm = (obj) => {
-		console.log('auditConfirm:', obj)
 		const params = {
 			ids: obj.id,
 			verifyStatus: obj.auditResult
@@ -813,7 +793,6 @@
 	}
 
 	const handleDelete = (record) => {
-		console.log('Delete:', record)
 	}
 	const handleRestore = (record) => {
 		const params = {
@@ -831,7 +810,6 @@
 	}
 	//资源编辑
 	const edit = (record) => {
-		console.log('Restore:', record)
 		uploadModalVisible.value = true
 		isState.value = 1
 		editResourcesId.value = record.id

+ 0 - 0
src/views/myResources/resourceManagement/资源管理


+ 12 - 14
src/views/resourceDetails/components/TallList.vue

@@ -99,7 +99,7 @@
 </template>
 
 <script setup>
-	import { ref } from 'vue'
+	import { ref, toRefs } from 'vue'
 	import TabSwitcher from './TabSwitcher.vue'
 	import TallItem from './TallItem.vue'
 	import EqualItem from './EqualItem.vue'
@@ -145,11 +145,13 @@
 	// 				follw: 0
 	// 			}
 	// 		]
-
+	const setId = (_id) => {
+		// id = _id
+		// getPageComment()
+	}
 	const getList = () => {
 		list(currentPage)
 			.then((res) => {
-				console.log('下面列表获取', res)
 				if (res.code == 200) {
 					equalList.value = res.data.records
 					currentPage.current = res.data.current
@@ -159,7 +161,7 @@
 				}
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 	const publish = (data) => {
@@ -170,7 +172,7 @@
 				talk.value = ''
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 		// list.value[0].callBackTalk.push({
 		// 	id: 1,
@@ -179,7 +181,6 @@
 		// 	follw: 0
 		// })
 		// list.value = [...list.value]
-		// console.log('最后的', list.value)
 	}
 	const handelrSelectTab = (data) => {
 		if (data == 'latest') {
@@ -204,15 +205,13 @@
 				EventBus.emit('upDataDetailsNum')
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 		//....
 		// listUnpublishedView.value.setData(tableData.value)
 	}
 	const onQuery = (form) => {
-		console.log('查询内容', form)
 		//....
-
 		// listUnpublishedView.value.setData(tableData.value)
 	}
 
@@ -229,14 +228,13 @@
 				}
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 
 	const getPageCommentNew = (data) => {
 		list({ ...currentPage, ...data })
 			.then((res) => {
-				console.log('下面列表获取getPageCommentNew', res)
 				if (res.code == 200) {
 					equalList.value = res.data.records
 					currentPage.current = res.data.current
@@ -246,7 +244,7 @@
 				}
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 	const onGetPageCommentNew = (data) => {
@@ -263,7 +261,7 @@
 				}
 			})
 			.catch((err) => {
-				console.log(err)
+				console.error(err)
 			})
 	}
 
@@ -275,7 +273,7 @@
 	EventBus.off('onGetPageComment', getPageComment)
 	EventBus.on('onGetPageComment', getPageComment)
 
-	defineExpose({ onGetPageCommentNew })
+	defineExpose({ onGetPageCommentNew, setId })
 	// EventBus.off('onGetPageCommentNew', getPageCommentNew)
 	// EventBus.on('onGetPageCommentNew', getPageCommentNew)
 </script>

+ 25 - 22
src/views/resourceDetails/components/VideoDetails.vue

@@ -1,5 +1,5 @@
 <template>
-	<div>
+	<div class="resource-view">
 		<h1>{{ resName }}</h1>
 		<div style="height: 25px"></div>
 		<div class="user-info-container">
@@ -117,7 +117,7 @@
 					<span style="display: block">{{ teacherName }}</span>
 				</div> -->
 				<div style="display: flex">
-					<span style="font-weight: bold; margin-right: 10px">所属院系: </span>
+					<span class="resInfoLabel" style="font-weight: bold; margin-right: 10px">所属院系: </span>
 					<span style="display: block; width: 200px">{{ department }}</span>
 				</div>
 				<!-- <div style="display: flex; align-items: center">
@@ -125,11 +125,11 @@
 					<span style="display: block">{{ major }}</span>
 				</div> -->
 				<div style="display: flex; align-items: center">
-					<span style="font-weight: bold; margin-right: 10px">资源类型: </span>
+					<span class="resInfoLabel" style="font-weight: bold; margin-right: 10px">资源类型: </span>
 					<span style="display: block; width: 200px">{{ courseType }}</span>
 				</div>
 				<div style="display: flex; align-items: center">
-					<span style="font-weight: bold; margin-right: 10px">资源格式: </span>
+					<span class="resInfoLabel" style="font-weight: bold; margin-right: 10px">资源格式: </span>
 					<span style="display: block; width: 200px">{{ videoFormat }}</span>
 				</div>
 				<!-- <div style="display: flex; align-items: center" v-if="videoFormat != 'jpg'">
@@ -137,11 +137,11 @@
 					<span style="display: block">{{ videoDuration }}</span>
 				</div> -->
 				<div style="display: flex; align-items: center">
-					<span style="font-weight: bold; margin-right: 10px">容量大小: </span>
+					<span class="resInfoLabel" style="font-weight: bold; margin-right: 10px">容量大小: </span>
 					<span style="display: block; width: 200px">{{ videoSize }}</span>
 				</div>
 				<div style="display: flex; align-items: center">
-					<span style="font-weight: bold; margin-right: 10px">发布时间: </span>
+					<span class="resInfoLabel" style="font-weight: bold; margin-right: 10px">发布时间: </span>
 					<span style="display: block; width: 200px">{{ releaseTime }}</span>
 				</div>
 				<!-- <div style="display: flex; flex-direction: column">
@@ -162,6 +162,8 @@
 
 <script setup>
 	import { ref } from 'vue'
+	import { resourceAuditStore } from '@/store/resourceAudit'
+
 	// import PDF from 'vue-pdf'
 	import { Tag, Typography, Space, message } from 'ant-design-vue'
 	import ShareDialog from './ShareDialog.vue'
@@ -188,6 +190,8 @@
 			default: () => null
 		}
 	})
+	const auditStore = resourceAuditStore()
+	const state = ref('')
 	const itemData = ref({})
 	const starTag = ref(false)
 	const ShareDialogRef = ref(null)
@@ -216,8 +220,8 @@
 		window.open(src)
 	}
 	const handlerShareDialog = () => {
-		console.log('打开分享弹窗')
-		getShareLink({ id: route.query.id })
+		const id = auditStore.auditParams.id
+		getShareLink({ id: id })
 			.then((res) => {
 				if (res.code == 200) {
 					ShareDialogRef.value.open(res.data.shareLink)
@@ -226,8 +230,7 @@
 			.catch((err) => {})
 	}
 	const handlerCollection = async () => {
-		console.log('打开收藏', itemData.value)
-		const id = route.query.id
+		const id = auditStore.auditParams.id
 		if (id != undefined && id != '') {
 			if (starTag.value == true) {
 				await cancel({ resourceId: id })
@@ -247,7 +250,7 @@
 					}
 				})
 				.catch((err) => {
-					console.log(err)
+					console.error(err)
 				})
 		}
 	}
@@ -280,7 +283,6 @@
 					itemData.value.keywordList.forEach((item) => {
 						tags.value.push(item.wordName)
 					})
-					console.log('应该施舍你们', tags.value)
 					//关键的资源在线地址
 					// resSrc.value = sysConfig.FILE_URL + itemData.value.fileUrl
 					resSrc.value = sysConfig.FILE_URL + itemData.value.priviewFileUrl
@@ -289,7 +291,6 @@
 					// imagess.value = 'http://192.168.1.245:10005/education/' + itemData.value.priviewFileUrl
 
 					// VideoDetailsRef.value.setData(res.sdata)
-					console.log('发消息去请求网卡罗')
 					emit('onGetPageCommentNew', {
 						resourceType: itemData.value.resourceType,
 						resourceTwoType: itemData.value.resourceTwoType
@@ -300,7 +301,6 @@
 	}
 
 	const upDataList = (item) => {
-		console.log('upDataList', item)
 		resourcecentreDetail({ id: item.id })
 			.then((res) => {
 				if (res.code == 200) {
@@ -313,7 +313,7 @@
 
 	const fetchData = () => {
 		getList()
-		const id = route.query.id
+		const id = auditStore.auditParams.id
 		if (id != undefined && id != '') {
 			// isHaveAuth : 0 1
 			// checkAuth
@@ -327,16 +327,15 @@
 					}
 				})
 				.catch((err) => {
-					console.log(err)
+					console.error(err)
 				})
 			getData({ id: id })
 			upDataList({ id: id })
 		}
 	}
 	watch(
-		() => route,
+		() => auditStore.auditParams.id,
 		(newRoute) => {
-			console.log('路由发生变化', newRoute)
 			fetchData() // 手动刷新数据的方法
 		},
 		{ deep: true, immediate: true }
@@ -346,14 +345,12 @@
 	})
 
 	const upDataDetailsNum = () => {
-		const id = route.query.id
+		const id = auditStore.auditParams.id
 		if (id != undefined && id != '') {
 			upDataList({ id: id })
 		}
 	}
 	const openResourceDetailsInner = (data) => {
-		console.log('收到消息了吗', data)
-
 		router.push({
 			path: '/portal/resourceDetails',
 			query: {
@@ -372,7 +369,10 @@
 	EventBus.on('openResourceDetailsInner', openResourceDetailsInner)
 </script>
 
-<style scoped>
+<style lang="less" scoped>
+	.resource-view {
+		width: 100%;
+	}
 	.tab-switcher {
 		display: flex;
 		border-radius: 20px;
@@ -518,6 +518,9 @@
 		height: 570px;
 		border: 1px solid #dfe2e5;
 		padding: 10px;
+		.resInfoLabel {
+			width: 61px;
+		}
 	}
 
 	.user-info-container {

+ 41 - 30
src/views/resourceDetails/index.vue

@@ -1,20 +1,19 @@
 <template>
-	<div style="overflow-y: auto">
-		<a-layout>
-			<Header @onChangeCurrent="onChangeCurrent" />
-			<div style="width: 71%; margin-left: 10%">
-				<!-- <BreadCrumb /> -->
-				<VideoDetails :isState="isState" ref="VideoDetailsRef" @onGetPageCommentNew="onGetPageCommentNew" />
-				<TallList ref="tallList" v-show="!isState" />
-				<div style="display: flex; justify-content: flex-end; margin-top: 10px" v-if="isAudit && isState">
-					<a-button @click="handleAuditResult(3)" style="margin-right: 10px">不同意</a-button>
-					<a-button type="primary" @click="handleAuditResult(2)">同意</a-button>
-				</div>
-				<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
-			</div>
-		</a-layout>
-		<Footer />
+	<!-- <a-layout> -->
+	<!-- <Header @onChangeCurrent="onChangeCurrent" /> -->
+	<div class="resource-container">
+		<!-- <BreadCrumb /> -->
+		<div class="resource">
+			<VideoDetails :isState="isState" ref="VideoDetailsRef" @onGetPageCommentNew="onGetPageCommentNew" />
+			<TallList ref="tallList" v-show="!isState" />
+		</div>
+		<div class="btn-group" v-if="isAudit && isState">
+			<a-button @click="handleAuditResult(3)" style="margin-right: 10px">不同意</a-button>
+			<a-button type="primary" @click="handleAuditResult(2)">同意</a-button>
+		</div>
+		<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
 	</div>
+	<!-- </a-layout> -->
 </template>
 
 <script setup>
@@ -27,16 +26,20 @@
 	import { addViewCount, detail, add, queryList } from '@/api/portal'
 	import resourceAuditApi from '@/api/resourceAudit.js'
 	import EventBus from '@/utils/EventBus'
+	import { resourceAuditStore } from '@/store/resourceAudit'
 
 	const router = useRouter()
+	const route = useRoute()
+	const auditStore = resourceAuditStore()
 
 	const indexType = ref('resourceCenter')
 	const itemData = ref({})
 	const tallList = ref(null)
 	const VideoDetailsRef = ref(null)
-	const route = useRoute()
-	const isState = ref(route.query.state || null)
-	const isAudit = ref(route.query.audit || null)
+
+	// 从store中获取参数,如果store中没有则从路由中获取
+	const isState = ref(auditStore.auditParams.state || route.query.state || null)
+	const isAudit = ref(auditStore.auditParams.audit || route.query.audit || null)
 	//     {
 	//     "fileName": "Kettle文档",
 	//     "courseType": "0",
@@ -69,22 +72,23 @@
 	// }
 	const onGetPageCommentNew = (item) => {
 		// emit('handlerItemSidebar', item)
-		console.log('发消息去请求网卡罗2', item)
 		tallList.value.onGetPageCommentNew(item)
 	}
 	const handleAuditResult = (val) => {
+		// 优先从store中获取ID,如果没有则从路由中获取
+		const id = auditStore.auditParams.id || route.query.id
 		const params = {
-			ids: route.query.id,
+			ids: id,
 			verifyStatus: val
 		}
 		resourceAuditApi
 			.updateStatus(params)
 			.then((res) => {
 				if (res.code == 200) {
-					// auditModalVisible.value = false
+					// 清空store中的审核参数
+					auditStore.clearAuditParams()
 					router.go(-1)
 				}
-				// getListData()
 			})
 			.catch((err) => {
 				console.error(err)
@@ -116,7 +120,8 @@
 	}
 
 	onMounted(() => {
-		const id = route.query.id
+		// 优先从store中获取ID,如果没有则从路由中获取
+		const id = auditStore.auditParams.id || route.query.id
 		if (id != undefined && id != '') {
 			addViewCount({ id: id })
 			getData({ id: id })
@@ -127,12 +132,18 @@
 	})
 </script>
 
-<style scoped>
-	.content {
-		border: 1px solid #00000011; /* 灰色细边框 */
-	}
-	.scroll-container {
-		height: 100vh;
-		overflow-y: auto;
+<style lang="less" scoped>
+	.resource-container {
+		width: 100%;
+		.resource {
+			display: flex;
+			justify-content: center;
+			overflow: auto;
+			width: 100%;
+		}
+		.btn-group {
+			text-align: center;
+			padding: 10px;
+		}
 	}
 </style>

+ 45 - 0
src/views/resourceManagements/index.vue

@@ -0,0 +1,45 @@
+<template>
+	<div style="overflow-y: auto">
+		<a-layout>
+			<myResources pageType="economize" @handlerAudit="handlerAudit" />
+		</a-layout>
+		<a-modal v-model:visible="modalVisible" :title="'资源审核'" width="1210px" :footer="null" :destroyOnClose="true">
+			<resourceDetails ref="resourceDetailsRef" :isState="1" :isAudit="1" @auditComplete="closeModal" />
+		</a-modal>
+	</div>
+</template>
+
+<script setup>
+	import myResources from '../myResources/myResources.vue'
+	import resourceDetails from '@/views/resourceDetails/index.vue'
+	import { ref } from 'vue'
+	import { useRoute, useRouter } from 'vue-router'
+	import { resourceAuditStore } from '@/store/resourceAudit'
+
+	const router = useRouter()
+	const modalVisible = ref(false)
+	const resourceDetailsRef = ref(null)
+	const currentAuditData = ref(null)
+	const auditStore = resourceAuditStore()
+
+	const handlerAudit = (data) => {
+		currentAuditData.value = data
+		modalVisible.value = true
+		// 使用store存储审核参数,而不是路由传参
+		auditStore.setAuditParams(data)
+	}
+
+	const closeModal = () => {
+		modalVisible.value = false
+	}
+</script>
+
+<style scoped>
+	.content {
+		border: 1px solid #00000011; /* 灰色细边框 */
+	}
+	.scroll-container {
+		height: 100vh;
+		overflow-y: auto;
+	}
+</style>