|
|
@@ -28,13 +28,22 @@
|
|
|
:options="majorOptions"
|
|
|
placeholder="请选择专业"
|
|
|
/> -->
|
|
|
- <a-select
|
|
|
+ <a-cascader
|
|
|
+ style="width: 240px; margin-left: 8px"
|
|
|
+ v-model:value="resourceName"
|
|
|
+ :options="resourceTypeOptions"
|
|
|
+ :fieldNames="{ label: 'name', value: 'id', children: 'children' }"
|
|
|
+ placeholder="请选择资源类型"
|
|
|
+ changeOnSelect
|
|
|
+ @change="changeCollegeResource"
|
|
|
+ />
|
|
|
+ <!-- <a-select
|
|
|
v-model:value="formState.resourceType"
|
|
|
style="width: 150px; margin-left: 8px"
|
|
|
:options="resourceTypeOptions"
|
|
|
:fieldNames="{ label: 'name', value: 'id', children: 'children' }"
|
|
|
placeholder="请选择资源类型"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
<a-select
|
|
|
v-model:value="formState.suffix"
|
|
|
style="width: 150px; margin-left: 8px"
|
|
|
@@ -73,7 +82,7 @@
|
|
|
|
|
|
<!-- 表格 -->
|
|
|
<a-table
|
|
|
- :columns="currentColumns"
|
|
|
+ :columns="columnsPending"
|
|
|
:data-source="dataSource"
|
|
|
:pagination="false"
|
|
|
:loading="loading"
|
|
|
@@ -84,7 +93,7 @@
|
|
|
<template #bodyCell="{ column, text, record }">
|
|
|
<template
|
|
|
v-if="
|
|
|
- ['fileName', 'collegeIdName', 'majorIdName', 'resourceTypeName', 'suffix', 'uploadTime'].includes(
|
|
|
+ ['fileName', 'collegeAllIdName', 'majorIdName', 'resourceALLTypeName', 'suffix', 'uploadTime'].includes(
|
|
|
column.dataIndex
|
|
|
)
|
|
|
"
|
|
|
@@ -289,11 +298,13 @@
|
|
|
collegeId: null, //院校一级id
|
|
|
collegeTwoId: null, //院校二级id
|
|
|
collegeThreeId: null, //院校三级id
|
|
|
- resourceType: null,
|
|
|
+ resourceType: null, //资源类型一级
|
|
|
+ resourceTwoType: null, //资源类型二级
|
|
|
suffix: null
|
|
|
})
|
|
|
// 添加选择状态
|
|
|
const majorIdName = ref([])
|
|
|
+ const resourceName = ref([])
|
|
|
const majorOptions = ref([]) //专业
|
|
|
const selectedRowKeys = ref([])
|
|
|
const selectedRows = ref([])
|
|
|
@@ -404,8 +415,8 @@
|
|
|
{
|
|
|
title: '资源类型',
|
|
|
align: 'center',
|
|
|
- dataIndex: 'resourceTypeName',
|
|
|
- key: 'resourceTypeName'
|
|
|
+ dataIndex: 'resourceALLTypeName',
|
|
|
+ key: 'resourceALLTypeName'
|
|
|
},
|
|
|
{
|
|
|
title: '资源格式',
|
|
|
@@ -475,6 +486,7 @@
|
|
|
verifyStatus: formState.verifyStatus,
|
|
|
fileName: formState.fileName,
|
|
|
resourceType: formState.resourceType,
|
|
|
+ resourceTwoType: formState.resourceTwoType,
|
|
|
suffix: formState.suffix,
|
|
|
// majorId: formState.majorId,
|
|
|
collegeTwoId: formState.collegeTwoId,
|
|
|
@@ -510,6 +522,12 @@
|
|
|
getCollegeMajor(lastSelected.id)
|
|
|
}
|
|
|
}
|
|
|
+ const changeCollegeResource = (value, selectedOptions) => {
|
|
|
+ console.log('Selected:', value, selectedOptions)
|
|
|
+ resourceName.value = selectedOptions.map((it) => it.name).join('/')
|
|
|
+ formState.resourceType = value[0] || null
|
|
|
+ formState.resourceTwoType = value[1] || null
|
|
|
+ }
|
|
|
const getList = () => {
|
|
|
getListData()
|
|
|
uploadModalVisible.value = false
|
|
|
@@ -532,7 +550,7 @@
|
|
|
.resourceTypeTree()
|
|
|
.then((res) => {
|
|
|
console.log(res.data, '资源类型下拉')
|
|
|
- // resourceTypeOptions.value = res.data
|
|
|
+ resourceTypeOptions.value = res.data
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err)
|
|
|
@@ -572,6 +590,7 @@
|
|
|
majorIdName.value = null
|
|
|
formState.fileName = null
|
|
|
formState.resourceType = null
|
|
|
+ formState.resourceTwoType = null
|
|
|
formState.suffix = null
|
|
|
formState.collegeTwoId = null
|
|
|
// formState.majorId = null
|
|
|
@@ -662,9 +681,16 @@
|
|
|
auditModalVisible.value = true
|
|
|
}
|
|
|
const handleView = (record) => {
|
|
|
- publishedData.value = record
|
|
|
- auditState.value = false
|
|
|
- auditModalVisible.value = true
|
|
|
+ router.push({
|
|
|
+ path: '/portal/resourceDetails',
|
|
|
+ query: {
|
|
|
+ id: record.id,
|
|
|
+ state: 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // publishedData.value = record
|
|
|
+ // auditState.value = false
|
|
|
+ // auditModalVisible.value = true
|
|
|
}
|
|
|
const handleDownload = (record) => {
|
|
|
resourceAuditApi
|