|
|
@@ -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
|