|
@@ -1,287 +1,331 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <a-card v-if="visible">
|
|
|
|
|
- <a-button type="primary" style="margin-left: 0px" @click="handleBack">返回</a-button>
|
|
|
|
|
- <!-- 标签页 -->
|
|
|
|
|
- <a-tabs v-model:activeKey="formState.verifyStatus" @change="tabChange">
|
|
|
|
|
- <a-tab-pane key="0,3" tab="未发布" v-if="!pageType"></a-tab-pane>
|
|
|
|
|
- <a-tab-pane key="1" tab="待审核"></a-tab-pane>
|
|
|
|
|
- <a-tab-pane key="2" tab="已发布"></a-tab-pane>
|
|
|
|
|
- <!-- <a-tab-pane key="3" tab="已审核" v-if="pageType == 'economize'"></a-tab-pane> -->
|
|
|
|
|
- <a-tab-pane key="4" tab="回收站"></a-tab-pane>
|
|
|
|
|
- </a-tabs>
|
|
|
|
|
- <!-- 搜索和操作区域 -->
|
|
|
|
|
- <a-row :gutter="16" style="margin-bottom: 16px">
|
|
|
|
|
- <a-col :span="18">
|
|
|
|
|
- <a-input v-model:value="formState.fileName" placeholder="请输入资源名称" style="width: 150px" />
|
|
|
|
|
- <a-cascader
|
|
|
|
|
- style="width: 200px; margin-left: 8px"
|
|
|
|
|
- v-model:value="majorIdName"
|
|
|
|
|
- :options="collegeMajorOptions"
|
|
|
|
|
- :fieldNames="{ label: 'name', value: 'id', children: 'children' }"
|
|
|
|
|
- placeholder="请选择院系"
|
|
|
|
|
- changeOnSelect
|
|
|
|
|
- @change="changeCollegeMajor"
|
|
|
|
|
- />
|
|
|
|
|
- <!-- <a-select
|
|
|
|
|
- v-model:value="formState.majorId"
|
|
|
|
|
- style="width: 150px; margin-left: 8px"
|
|
|
|
|
- :fieldNames="{ label: 'majorName', value: 'majorCode' }"
|
|
|
|
|
- :options="majorOptions"
|
|
|
|
|
- placeholder="请选择专业"
|
|
|
|
|
- /> -->
|
|
|
|
|
- <a-cascader
|
|
|
|
|
- style="width: 200px; 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"
|
|
|
|
|
- :options="fileformatOptions"
|
|
|
|
|
- :fieldNames="{ label: 'fileExtendName', value: 'fileExtendName', children: 'children' }"
|
|
|
|
|
- placeholder="请选择资源格式"
|
|
|
|
|
- />
|
|
|
|
|
- <a-select
|
|
|
|
|
- v-if="['0,3', '0', '3'].includes(formState.verifyStatus)"
|
|
|
|
|
- v-model:value="isVerifyStatus"
|
|
|
|
|
- placeholder="请选择资源状态"
|
|
|
|
|
- style="width: 150px; margin-left: 8px"
|
|
|
|
|
- >
|
|
|
|
|
- <a-select-option value="0">未发布</a-select-option>
|
|
|
|
|
- <a-select-option value="3">未通过</a-select-option>
|
|
|
|
|
- </a-select>
|
|
|
|
|
- <!-- <a-select
|
|
|
|
|
- v-model:value="formState.suffix"
|
|
|
|
|
- style="width: 200px; margin-left: 8px"
|
|
|
|
|
- :options="suffixTypeOptions"
|
|
|
|
|
- placeholder="请选择课件格式"
|
|
|
|
|
- /> -->
|
|
|
|
|
- <a-button type="primary" style="margin-left: 8px" @click="handleSearch">查询</a-button>
|
|
|
|
|
- <a-button style="margin-left: 8px" @click="handleReset">重置</a-button>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="6" style="text-align: right">
|
|
|
|
|
- <a-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- style="margin-right: 8px"
|
|
|
|
|
- v-if="formState.verifyStatus === '0,3' && !pageType"
|
|
|
|
|
- @click="batchPublish"
|
|
|
|
|
- :disabled="selectedRowKeys.length === 0"
|
|
|
|
|
- >
|
|
|
|
|
- + 批量发布
|
|
|
|
|
- </a-button>
|
|
|
|
|
- <a-button type="primary" v-if="!pageType" @click="showUploadModal">+ 上传资源</a-button>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 表格 -->
|
|
|
|
|
- <a-table
|
|
|
|
|
- :columns="columnsPending"
|
|
|
|
|
- :data-source="dataSource"
|
|
|
|
|
- :pagination="false"
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- bordered
|
|
|
|
|
- :row-key="(record) => record.id"
|
|
|
|
|
- :row-selection="rowSelection"
|
|
|
|
|
- :scroll="{ x: 1500, y: 600 }"
|
|
|
|
|
- >
|
|
|
|
|
- <template #bodyCell="{ column, text, record }">
|
|
|
|
|
- <template
|
|
|
|
|
- v-if="
|
|
|
|
|
|
|
+ <a-card v-if="visible">
|
|
|
|
|
+ <a-button type="primary" @click="handleBack">返回</a-button>
|
|
|
|
|
+ <!-- 标签页 -->
|
|
|
|
|
+ <a-tabs v-model:activeKey="formState.verifyStatus" @change="tabChange">
|
|
|
|
|
+ <a-tab-pane key="0,3" tab="未发布" v-if="!pageType"></a-tab-pane>
|
|
|
|
|
+ <a-tab-pane key="1" tab="待审核"></a-tab-pane>
|
|
|
|
|
+ <a-tab-pane key="2" tab="已发布"></a-tab-pane>
|
|
|
|
|
+ <!-- <a-tab-pane key="3" tab="已审核" v-if="pageType == 'economize'"></a-tab-pane> -->
|
|
|
|
|
+ <a-tab-pane key="4" tab="回收站"></a-tab-pane>
|
|
|
|
|
+ </a-tabs>
|
|
|
|
|
+ <!-- 搜索和操作区域 -->
|
|
|
|
|
+ <a-card style="margin-bottom: 16px">
|
|
|
|
|
+ <div style="display: flex; justify-content: space-between ;">
|
|
|
|
|
+ <div style="display: flex; flex-direction: column; width: 200%;">
|
|
|
|
|
+ <!-- 第一行:名称、院系、类型 -->
|
|
|
|
|
+ <a-row :gutter="16" style="margin-bottom: 16px">
|
|
|
|
|
+ <a-col :span="6">
|
|
|
|
|
+ <span>名称:</span>
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-model:value="formState.fileName"
|
|
|
|
|
+ placeholder="请输入名字"
|
|
|
|
|
+ style="width: calc(100% - 50px); margin-left: 8px"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="6">
|
|
|
|
|
+ <span>层级:</span>
|
|
|
|
|
+ <a-cascader
|
|
|
|
|
+ style="width: calc(100% - 50px); margin-left: 8px"
|
|
|
|
|
+ v-model:value="majorIdName"
|
|
|
|
|
+ :options="collegeMajorOptions"
|
|
|
|
|
+ :fieldNames="{ label: 'name', value: 'id', children: 'children' }"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ changeOnSelect
|
|
|
|
|
+ @change="changeCollegeMajor"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="6">
|
|
|
|
|
+ <span>类型:</span>
|
|
|
|
|
+ <a-cascader
|
|
|
|
|
+ style="width: calc(100% - 50px); margin-left: 8px"
|
|
|
|
|
+ v-model:value="resourceName"
|
|
|
|
|
+ :options="resourceTypeOptions"
|
|
|
|
|
+ :fieldNames="{ label: 'name', value: 'id', children: 'children' }"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ changeOnSelect
|
|
|
|
|
+ @change="changeCollegeResource"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 第二行:状态、租户、创建人 -->
|
|
|
|
|
+ <a-row :gutter="16">
|
|
|
|
|
+ <a-col :span="6">
|
|
|
|
|
+ <span>状态:</span>
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-if="['0,3', '0', '3'].includes(formState.verifyStatus)"
|
|
|
|
|
+ v-model:value="isVerifyStatus"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ style="width: calc(100% - 50px); margin-left: 8px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option value="0">未发布</a-select-option>
|
|
|
|
|
+ <a-select-option value="3">未通过</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-else
|
|
|
|
|
+ v-model:value="formState.suffix"
|
|
|
|
|
+ style="width: calc(100% - 50px); margin-left: 8px"
|
|
|
|
|
+ :options="fileformatOptions"
|
|
|
|
|
+ :fieldNames="{ label: 'fileExtendName', value: 'fileExtendName', children: 'children' }"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <!-- <a-col :span="6">-->
|
|
|
|
|
+ <!-- <span>租户:</span>-->
|
|
|
|
|
+ <!-- <a-input placeholder="请选择" style="width: calc(100% - 50px); margin-left: 8px" disabled />-->
|
|
|
|
|
+ <!-- </a-col>-->
|
|
|
|
|
+<!-- <a-col :span="6">-->
|
|
|
|
|
+<!-- <span>创建人:</span>-->
|
|
|
|
|
+<!-- <a-input placeholder="请输入名字" style="width: calc(100% - 64px); margin-left: 8px" />-->
|
|
|
|
|
+<!-- </a-col>-->
|
|
|
|
|
+
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row style="margin-top: 16px">
|
|
|
|
|
+ <a-col :span="24" style="text-align: left">
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ style="margin-right: 8px"
|
|
|
|
|
+ v-if="formState.verifyStatus === '0,3' && !pageType"
|
|
|
|
|
+ @click="batchPublish"
|
|
|
|
|
+ :disabled="selectedRowKeys.length === 0"
|
|
|
|
|
+ >
|
|
|
|
|
+ + 批量发布
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button type="primary" v-if="!pageType && formState.verifyStatus === '0,3'" @click="showUploadModal">+ 新增</a-button>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <a-button type="primary" @click="handleSearch">查询</a-button>
|
|
|
|
|
+ <a-button @click="handleReset" style="margin-top: 20px">重置</a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+ <!-- 表格 -->
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ :columns="columnsPending"
|
|
|
|
|
+ :data-source="dataSource"
|
|
|
|
|
+ :pagination="false"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ bordered
|
|
|
|
|
+ :row-key="(record) => record.id"
|
|
|
|
|
+ :row-selection="rowSelection"
|
|
|
|
|
+ :scroll="{ x: 1300 }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #bodyCell="{ column, text, record }">
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-if="
|
|
|
['fileName', 'collegeAllIdName', 'majorIdName', 'resourceALLTypeName', 'suffix', 'uploadTime'].includes(
|
|
['fileName', 'collegeAllIdName', 'majorIdName', 'resourceALLTypeName', 'suffix', 'uploadTime'].includes(
|
|
|
column.dataIndex
|
|
column.dataIndex
|
|
|
)
|
|
)
|
|
|
"
|
|
"
|
|
|
- >
|
|
|
|
|
- <div class="multiLine-ellipsis" :title="text">{{ text || '-' }}</div>
|
|
|
|
|
- </template>
|
|
|
|
|
- <!-- 状态列 -->
|
|
|
|
|
- <template v-if="column.key === 'verifyStatus'">
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="multiLine-ellipsis" :title="text">{{ text || '-' }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 状态列 -->
|
|
|
|
|
+ <template v-if="column.key === 'verifyStatus'">
|
|
|
<span v-if="record.verifyStatus === '0'">
|
|
<span v-if="record.verifyStatus === '0'">
|
|
|
<a-badge status="processing" text="未发布" />
|
|
<a-badge status="processing" text="未发布" />
|
|
|
</span>
|
|
</span>
|
|
|
|
|
|
|
|
- <span v-else-if="record.verifyStatus === 'uploaded'">
|
|
|
|
|
|
|
+ <span v-else-if="record.verifyStatus === 'uploaded'">
|
|
|
<a-badge status="success" text="已上传" />
|
|
<a-badge status="success" text="已上传" />
|
|
|
</span>
|
|
</span>
|
|
|
- <span v-else-if="record.verifyStatus === '1'">
|
|
|
|
|
|
|
+ <span v-else-if="record.verifyStatus === '1'">
|
|
|
<a-badge status="default" text="待审核" />
|
|
<a-badge status="default" text="待审核" />
|
|
|
</span>
|
|
</span>
|
|
|
- <span v-else-if="record.verifyStatus === '2'">
|
|
|
|
|
|
|
+ <span v-else-if="record.verifyStatus === '2'">
|
|
|
<a-badge status="success" text="已发布" />
|
|
<a-badge status="success" text="已发布" />
|
|
|
</span>
|
|
</span>
|
|
|
- <span v-if="record.verifyStatus === '3'">
|
|
|
|
|
|
|
+ <span v-if="record.verifyStatus === '3'">
|
|
|
<a-badge status="error" text="未通过" />
|
|
<a-badge status="error" text="未通过" />
|
|
|
</span>
|
|
</span>
|
|
|
- <span v-else-if="record.verifyStatus === '4'">
|
|
|
|
|
|
|
+ <span v-else-if="record.verifyStatus === '4'">
|
|
|
<a-badge status="error" text="已删除" />
|
|
<a-badge status="error" text="已删除" />
|
|
|
</span>
|
|
</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.key === 'isConvert'">
|
|
|
|
|
+ <span v-if="record.isConvert === '0'">转换中</span>
|
|
|
|
|
+ <span v-if="record.isConvert === '1'">转换完成</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.dataIndex === 'fileUrl'">
|
|
|
|
|
+ <!-- 动态图标 + 格式提示 -->
|
|
|
|
|
+ <a-tooltip :title="`${record.suffix || '未知'}`">
|
|
|
|
|
+ <component
|
|
|
|
|
+ :is="fileTypeIcons[record.suffix?.toLowerCase()] || fileTypeIcons['*']"
|
|
|
|
|
+ :style="{ fontSize: '24px', color: getIconColor(record.suffix) }"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-tooltip>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 个人资源操作列 -->
|
|
|
|
|
+ <template v-if="column.key === 'action' && !pageType">
|
|
|
|
|
+ <div class="editable-cell">
|
|
|
|
|
+ <span v-if="formState.verifyStatus === '0,3' && record.isConvert == 1" style="cursor: pointer" @click="handlePublish(record)">发布</span>
|
|
|
|
|
+ <span v-if="formState.verifyStatus === '4'" style="cursor: pointer" @click="handleRestore(record)">恢复</span>
|
|
|
|
|
+ <span style="cursor: pointer; margin-left: 10px; margin-right: 10px" @click="handleRestName(record)">修改资源名称</span>
|
|
|
|
|
+ <a-dropdown>
|
|
|
|
|
+ <span class="ant-dropdown-link" style="cursor: pointer">
|
|
|
|
|
+ 更多
|
|
|
|
|
+ <DownOutlined />
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <template #overlay>
|
|
|
|
|
+ <a-menu>
|
|
|
|
|
+ <a-menu-item v-if="record.isConvert == 1">
|
|
|
|
|
+ <a href="javascript:;" @click="handleView(record)">预览</a>
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ <a-menu-item v-if="record.isConvert == 1">
|
|
|
|
|
+ <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 == '2'">
|
|
|
|
|
+ <a-popconfirm title="确认下架吗?" @confirm="resourcesDown(record)">
|
|
|
|
|
+ <a href="javascript:;">下架</a>
|
|
|
|
|
+ </a-popconfirm>
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ <a-menu-item >
|
|
|
|
|
+ <a href="javascript:;" @click="edit(record)">编辑</a>
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ <a-menu-item v-if="formState.verifyStatus !== '2' && record.isConvert == 1">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <span style="cursor: pointer; margin-left: 10px; margin-right: 10px" @click="handleRestName(record)">修改资源名称</span>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ </a-menu>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-dropdown>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-if="column.dataIndex === 'fileUrl'">
|
|
|
|
|
- <!-- 动态图标 + 格式提示 -->
|
|
|
|
|
- <a-tooltip :title="`${record.suffix || '未知'}`">
|
|
|
|
|
- <component
|
|
|
|
|
- :is="fileTypeIcons[record.suffix?.toLowerCase()] || fileTypeIcons['*']"
|
|
|
|
|
- :style="{ fontSize: '24px', color: getIconColor(record.suffix) }"
|
|
|
|
|
- />
|
|
|
|
|
- </a-tooltip>
|
|
|
|
|
- </template>
|
|
|
|
|
- <!-- 个人资源操作列 -->
|
|
|
|
|
- <template v-if="column.key === 'action' && !pageType">
|
|
|
|
|
- <div class="editable-cell">
|
|
|
|
|
- <a v-if="formState.verifyStatus === '0,3'" @click="handlePublish(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 !== '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>
|
|
|
|
|
- </a-menu-item>
|
|
|
|
|
- </a-menu>
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-dropdown>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-table>
|
|
|
|
|
- <div class="dis-flex-sb margin-top">
|
|
|
|
|
- <div>
|
|
|
|
|
- <a-button @click="selectAll">选择全部</a-button>
|
|
|
|
|
- <a-button @click="invertSelection" style="margin-left: 8px">反选选择</a-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <CustomPagination
|
|
|
|
|
- :total="pagination.total"
|
|
|
|
|
- :current="pagination.pageNum"
|
|
|
|
|
- :pageSize="pagination.pageSize"
|
|
|
|
|
- :showQuickJumper="true"
|
|
|
|
|
- :showSizeChanger="true"
|
|
|
|
|
- :showTotal="(total) => `共 ${total} 条数据`"
|
|
|
|
|
- @change="handlePageChange"
|
|
|
|
|
- @showSizeChange="handlePageSizeChange"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ <div class="dis-flex-sb margin-top">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <a-button @click="selectAll">选择全部</a-button>
|
|
|
|
|
+ <a-button @click="invertSelection" style="margin-left: 8px">反选选择</a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <CustomPagination
|
|
|
|
|
+ :total="pagination.total"
|
|
|
|
|
+ :current="pagination.pageNum"
|
|
|
|
|
+ :pageSize="pagination.pageSize"
|
|
|
|
|
+ :showQuickJumper="true"
|
|
|
|
|
+ :showSizeChanger="true"
|
|
|
|
|
+ :showTotal="(total) => `共 ${total} 条数据`"
|
|
|
|
|
+ @change="handlePageChange"
|
|
|
|
|
+ @showSizeChange="handlePageSizeChange"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- <!-- 权限树模态框 -->
|
|
|
|
|
- <permissionTree v-if="permissionTreeVisible" @close="permissionTreeVisible = false"></permissionTree>
|
|
|
|
|
- <!-- 审核播放模态框 -->
|
|
|
|
|
- <auditModal
|
|
|
|
|
- v-if="auditModalVisible"
|
|
|
|
|
- :recordData="publishedData"
|
|
|
|
|
- :isAudit="auditState"
|
|
|
|
|
- @confirm="auditConfirm"
|
|
|
|
|
- @close="auditModalVisible = false"
|
|
|
|
|
- ></auditModal>
|
|
|
|
|
- <!-- 资源上传模态框 -->
|
|
|
|
|
- <resourceUpload
|
|
|
|
|
- v-if="uploadModalVisible"
|
|
|
|
|
- :isState="isState"
|
|
|
|
|
- :isVerifyStatus="formState.verifyStatus"
|
|
|
|
|
- :resourcesId="editResourcesId"
|
|
|
|
|
- @close="uploadModalVisible = false"
|
|
|
|
|
- @getList="getList"
|
|
|
|
|
- ></resourceUpload>
|
|
|
|
|
- <!-- 发布模态框 -->
|
|
|
|
|
- <releaseModal v-if="releaseVisible" @close="releaseVisible = false" @confirm="releaseConfirm"></releaseModal>
|
|
|
|
|
- </a-card>
|
|
|
|
|
|
|
+ <!-- 权限树模态框 -->
|
|
|
|
|
+ <permissionTree v-if="permissionTreeVisible" @close="permissionTreeVisible = false"></permissionTree>
|
|
|
|
|
+ <!-- 审核播放模态框 -->
|
|
|
|
|
+ <auditModal
|
|
|
|
|
+ v-if="auditModalVisible"
|
|
|
|
|
+ :recordData="publishedData"
|
|
|
|
|
+ :isAudit="auditState"
|
|
|
|
|
+ @confirm="auditConfirm"
|
|
|
|
|
+ @close="auditModalVisible = false"
|
|
|
|
|
+ ></auditModal>
|
|
|
|
|
+ <!-- 资源上传模态框 -->
|
|
|
|
|
+ <resourceUpload
|
|
|
|
|
+ ref="resourceUploadRef"
|
|
|
|
|
+ :isState="isState"
|
|
|
|
|
+ :isVerifyStatus="formState.verifyStatus"
|
|
|
|
|
+ :resourcesId="editResourcesId"
|
|
|
|
|
+ @close="uploadModalVisible = false"
|
|
|
|
|
+ @getList="getList"
|
|
|
|
|
+ ></resourceUpload>
|
|
|
|
|
+ <!-- 发布模态框 -->
|
|
|
|
|
+ <releaseModal v-if="releaseVisible" @close="releaseVisible = false" @confirm="releaseConfirm"></releaseModal>
|
|
|
|
|
+ <div style="height: 20px"></div>
|
|
|
|
|
+ <span>容量</span><span style="color: #6abe39"> {{ bToGb(storageMin) }} GB</span><span> / </span
|
|
|
|
|
+ ><span style="color: red">{{ bToGb(storageMax) }} GB</span>
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+
|
|
|
|
|
+ <NameModal ref="nameModalRef" @confirm="confirm"></NameModal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, onMounted } from 'vue'
|
|
import { ref, onMounted } from 'vue'
|
|
|
import { DownOutlined } from '@ant-design/icons-vue'
|
|
import { DownOutlined } from '@ant-design/icons-vue'
|
|
|
import releaseModal from './releaseModal.vue'
|
|
import releaseModal from './releaseModal.vue'
|
|
|
|
|
+ import NameModal from './nameModal.vue'
|
|
|
import resourceUpload from './resourceUpload.vue'
|
|
import resourceUpload from './resourceUpload.vue'
|
|
|
import resourceAuditApi from '@/api/resourceAudit.js'
|
|
import resourceAuditApi from '@/api/resourceAudit.js'
|
|
|
import permissionTree from './permissionTree.vue'
|
|
import permissionTree from './permissionTree.vue'
|
|
|
import auditModal from './auditModal.vue'
|
|
import auditModal from './auditModal.vue'
|
|
|
|
|
+ import { getstorage } from '@/api/myResource/user'
|
|
|
import CustomPagination from '@/components/customPagination.vue'
|
|
import CustomPagination from '@/components/customPagination.vue'
|
|
|
import tool from '@/utils/tool'
|
|
import tool from '@/utils/tool'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
- const router = useRouter()
|
|
|
|
|
- import {
|
|
|
|
|
- FileOutlined,
|
|
|
|
|
- FileImageOutlined,
|
|
|
|
|
- FilePdfOutlined,
|
|
|
|
|
- FileWordOutlined,
|
|
|
|
|
- FileExcelOutlined,
|
|
|
|
|
- FilePptOutlined,
|
|
|
|
|
- FileTextOutlined,
|
|
|
|
|
- FileZipOutlined,
|
|
|
|
|
- PlaySquareOutlined
|
|
|
|
|
- } from '@ant-design/icons-vue'
|
|
|
|
|
- const emit = defineEmits(['handleBack'])
|
|
|
|
|
- const visible = ref(false)
|
|
|
|
|
|
|
+ import EventBus from "@/utils/EventBus";
|
|
|
|
|
+
|
|
|
|
|
+ import { globalStore } from '@/store/global'
|
|
|
|
|
+ import {storeToRefs} from "pinia";
|
|
|
|
|
+ const myglobalStore = globalStore()
|
|
|
|
|
+ // 使用 storeToRefs 保持响应性
|
|
|
|
|
+ const { getUserInfo} = storeToRefs(myglobalStore)
|
|
|
|
|
|
|
|
|
|
+ // getFileModel 保持了与 store 的响应式连接
|
|
|
|
|
+ const userInfo = computed({
|
|
|
|
|
+ get: () => getUserInfo.value
|
|
|
|
|
+ })
|
|
|
|
|
+ const resourceUploadRef = ref(null)
|
|
|
|
|
+
|
|
|
|
|
+ const router = useRouter()
|
|
|
|
|
+ const emit = defineEmits('handleBack')
|
|
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
|
const { pageType } = defineProps({
|
|
const { pageType } = defineProps({
|
|
|
pageType: {
|
|
pageType: {
|
|
@@ -321,13 +365,19 @@
|
|
|
const dataSource = ref([])
|
|
const dataSource = ref([])
|
|
|
//发布按钮状态
|
|
//发布按钮状态
|
|
|
const releaseVisible = ref(false)
|
|
const releaseVisible = ref(false)
|
|
|
|
|
+ const nameModalRef = ref(null)
|
|
|
const permissionTreeVisible = ref(false) //权限树
|
|
const permissionTreeVisible = ref(false) //权限树
|
|
|
const auditModalVisible = ref(false) //播放审核
|
|
const auditModalVisible = ref(false) //播放审核
|
|
|
const isPublishBulk = ref(false) //是否批量发布
|
|
const isPublishBulk = ref(false) //是否批量发布
|
|
|
const loading = ref(false) // 列表loading
|
|
const loading = ref(false) // 列表loading
|
|
|
|
|
+ const visible = ref(false) // 列表loading
|
|
|
const isState = ref(0) //是否是编辑 0:新增 1:编辑
|
|
const isState = ref(0) //是否是编辑 0:新增 1:编辑
|
|
|
const isVerifyStatus = ref(null) //未发布状态 0未发布 3已驳回
|
|
const isVerifyStatus = ref(null) //未发布状态 0未发布 3已驳回
|
|
|
const editResourcesId = ref(null) //资源id
|
|
const editResourcesId = ref(null) //资源id
|
|
|
|
|
+
|
|
|
|
|
+ const storageMin = ref(0) //资源id
|
|
|
|
|
+ const storageMax = ref(0) //资源id
|
|
|
|
|
+
|
|
|
// 搜索值
|
|
// 搜索值
|
|
|
const searchValue = ref('')
|
|
const searchValue = ref('')
|
|
|
//课程类型
|
|
//课程类型
|
|
@@ -350,6 +400,7 @@
|
|
|
resourceTwoType: null, //资源类型二级
|
|
resourceTwoType: null, //资源类型二级
|
|
|
suffix: null
|
|
suffix: null
|
|
|
})
|
|
})
|
|
|
|
|
+ const teacherData = ref(null)
|
|
|
// 添加选择状态
|
|
// 添加选择状态
|
|
|
const majorIdName = ref([])
|
|
const majorIdName = ref([])
|
|
|
const resourceName = ref([])
|
|
const resourceName = ref([])
|
|
@@ -387,17 +438,18 @@
|
|
|
})
|
|
})
|
|
|
// 列定义
|
|
// 列定义
|
|
|
const columnsUnpublished = [
|
|
const columnsUnpublished = [
|
|
|
- {
|
|
|
|
|
- title: '编号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- dataIndex: 'fileId',
|
|
|
|
|
- key: 'fileId'
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // title: '编号',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // dataIndex: 'fileId',
|
|
|
|
|
+ // key: 'fileId'
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
title: '资源名称',
|
|
title: '资源名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'fileName',
|
|
dataIndex: 'fileName',
|
|
|
- key: 'fileName'
|
|
|
|
|
|
|
+ key: 'fileName',
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '课件格式',
|
|
title: '课件格式',
|
|
@@ -425,26 +477,27 @@
|
|
|
{
|
|
{
|
|
|
title: '操作',
|
|
title: '操作',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 150,
|
|
|
|
|
|
|
+ width: 200,
|
|
|
key: 'action'
|
|
key: 'action'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
const columnsPending = [
|
|
const columnsPending = [
|
|
|
- {
|
|
|
|
|
- title: '编号',
|
|
|
|
|
- dataIndex: 'id',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- key: 'id'
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // title: '编号',
|
|
|
|
|
+ // dataIndex: 'id',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // key: 'id'
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
title: '资源名称',
|
|
title: '资源名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'fileName',
|
|
dataIndex: 'fileName',
|
|
|
- key: 'fileName'
|
|
|
|
|
|
|
+ key: 'fileName',
|
|
|
|
|
+ width: 150
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '所属院系',
|
|
|
|
|
|
|
+ title: '所属单位',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'collegeAllIdName',
|
|
dataIndex: 'collegeAllIdName',
|
|
|
key: 'collegeAllIdName'
|
|
key: 'collegeAllIdName'
|
|
@@ -465,40 +518,59 @@
|
|
|
title: '资源类型',
|
|
title: '资源类型',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'resourceALLTypeName',
|
|
dataIndex: 'resourceALLTypeName',
|
|
|
- key: 'resourceALLTypeName'
|
|
|
|
|
|
|
+ key: 'resourceALLTypeName',
|
|
|
|
|
+ width: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '资源格式',
|
|
title: '资源格式',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'suffix',
|
|
dataIndex: 'suffix',
|
|
|
- key: 'suffix'
|
|
|
|
|
|
|
+ key: 'suffix',
|
|
|
|
|
+ width: 90
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '上传时间',
|
|
title: '上传时间',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'uploadTime',
|
|
dataIndex: 'uploadTime',
|
|
|
- key: 'uploadTime'
|
|
|
|
|
|
|
+ key: 'uploadTime',
|
|
|
|
|
+ width: 180
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '状态',
|
|
title: '状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- key: 'verifyStatus'
|
|
|
|
|
|
|
+ key: 'verifyStatus',
|
|
|
|
|
+ width: 100
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '转换状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ key: 'isConvert',
|
|
|
|
|
+ width: 100
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '资源缩略图',
|
|
title: '资源缩略图',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
dataIndex: 'fileUrl',
|
|
dataIndex: 'fileUrl',
|
|
|
- key: 'fileUrl'
|
|
|
|
|
|
|
+ key: 'fileUrl',
|
|
|
|
|
+ width: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '操作',
|
|
title: '操作',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 150,
|
|
|
|
|
|
|
+ width: 250,
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
key: 'action'
|
|
key: 'action'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const handleBack= () =>{
|
|
|
|
|
+ emit('handleBack')
|
|
|
|
|
+ }
|
|
|
|
|
+ const close= () =>{
|
|
|
|
|
+ visible.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const columnsPublished = [...columnsPending]
|
|
const columnsPublished = [...columnsPending]
|
|
|
const columnsRecycle = [...columnsPending]
|
|
const columnsRecycle = [...columnsPending]
|
|
|
const collegeMajorOptions = ref([]) //院校下拉数据
|
|
const collegeMajorOptions = ref([]) //院校下拉数据
|
|
@@ -532,6 +604,8 @@
|
|
|
const getListData = () => {
|
|
const getListData = () => {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
let params = {
|
|
let params = {
|
|
|
|
|
+ stulinkType : 1,
|
|
|
|
|
+ teacherId : teacherData.value.teacherId,
|
|
|
current: pagination.pageNum,
|
|
current: pagination.pageNum,
|
|
|
size: pagination.pageSize,
|
|
size: pagination.pageSize,
|
|
|
verifyStatus: isVerifyStatus.value ? isVerifyStatus.value : formState.verifyStatus,
|
|
verifyStatus: isVerifyStatus.value ? isVerifyStatus.value : formState.verifyStatus,
|
|
@@ -543,10 +617,10 @@
|
|
|
collegeTwoId: formState.collegeTwoId,
|
|
collegeTwoId: formState.collegeTwoId,
|
|
|
collegeId: formState.collegeId,
|
|
collegeId: formState.collegeId,
|
|
|
collegeThreeId: formState.collegeThreeId,
|
|
collegeThreeId: formState.collegeThreeId,
|
|
|
- isSelf: 0
|
|
|
|
|
|
|
+ isSelf: !pageType ? 1 : 0
|
|
|
}
|
|
}
|
|
|
resourceAuditApi
|
|
resourceAuditApi
|
|
|
- .page(params)
|
|
|
|
|
|
|
+ .stuLinkResourceRecordPage(params)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
console.log(res, '资源审核列表')
|
|
console.log(res, '资源审核列表')
|
|
|
dataSource.value = res.data.records
|
|
dataSource.value = res.data.records
|
|
@@ -560,6 +634,40 @@
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const open = (data) => {
|
|
|
|
|
+ teacherData.value = data
|
|
|
|
|
+ console.log('什么呢任务信息',data)
|
|
|
|
|
+ visible.value = true
|
|
|
|
|
+ if (pageType == 'economize') {
|
|
|
|
|
+ formState.verifyStatus = '1'
|
|
|
|
|
+ }
|
|
|
|
|
+ getOrgTreeSelector()
|
|
|
|
|
+ getFileformat()
|
|
|
|
|
+ getResourceTypeTree()
|
|
|
|
|
+ getListData()
|
|
|
|
|
+ getstorage().then((res) => {
|
|
|
|
|
+ console.log('容量', res)
|
|
|
|
|
+
|
|
|
|
|
+ storageMin.value = res.data.storageSize
|
|
|
|
|
+ storageMax.value = res.data.totalStorageSize
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const bToMb = (b) => {
|
|
|
|
|
+ if (typeof b !== 'number' || b < 0) {
|
|
|
|
|
+ throw new Error('请输入有效的非负数字')
|
|
|
|
|
+ }
|
|
|
|
|
+ return (b / (1024 * 1024)).toFixed(2) // 保留两位小数
|
|
|
|
|
+ }
|
|
|
|
|
+ const bToGb = (b) => {
|
|
|
|
|
+ if (typeof b !== 'number' || b < 0) {
|
|
|
|
|
+ throw new Error('请输入有效的非负数字')
|
|
|
|
|
+ }
|
|
|
|
|
+ return (b / (1024 * 1024 * 1024)).toFixed(2) // 保留两位小数
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const changeCollegeMajor = (value, selectedOptions) => {
|
|
const changeCollegeMajor = (value, selectedOptions) => {
|
|
|
console.log('Selected:', value, selectedOptions)
|
|
console.log('Selected:', value, selectedOptions)
|
|
|
if (!value) {
|
|
if (!value) {
|
|
@@ -591,6 +699,18 @@
|
|
|
|
|
|
|
|
console.log('已经修改:', formState)
|
|
console.log('已经修改:', formState)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const confirm = (data) =>{
|
|
|
|
|
+ resourceAuditApi.editUserFileName(data).then((res)=>{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ getOrgTreeSelector()
|
|
|
|
|
+ getFileformat()
|
|
|
|
|
+ getResourceTypeTree()
|
|
|
|
|
+ getListData()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const getList = () => {
|
|
const getList = () => {
|
|
|
getListData()
|
|
getListData()
|
|
|
uploadModalVisible.value = false
|
|
uploadModalVisible.value = false
|
|
@@ -670,10 +790,6 @@
|
|
|
dataSource.value = []
|
|
dataSource.value = []
|
|
|
getListData()
|
|
getListData()
|
|
|
}
|
|
}
|
|
|
- const handleBack = () => {
|
|
|
|
|
- emit('handleBack')
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
//发布
|
|
//发布
|
|
|
const handlePublish = (record) => {
|
|
const handlePublish = (record) => {
|
|
|
publishedData.value = record
|
|
publishedData.value = record
|
|
@@ -717,16 +833,16 @@
|
|
|
const params = {
|
|
const params = {
|
|
|
ids: selectedRows.value.map((item) => item.id).join(','),
|
|
ids: selectedRows.value.map((item) => item.id).join(','),
|
|
|
coverImage: obj.coverImageId,
|
|
coverImage: obj.coverImageId,
|
|
|
- resourceDesc: obj.resourceDesc,
|
|
|
|
|
|
|
+ resourceDesc: obj.courseDesc,
|
|
|
verifyStatus: 1
|
|
verifyStatus: 1
|
|
|
}
|
|
}
|
|
|
console.log(params, '批量发布参数')
|
|
console.log(params, '批量发布参数')
|
|
|
- // handleRelease(params)
|
|
|
|
|
|
|
+ handleRelease(params)
|
|
|
} else {
|
|
} else {
|
|
|
const params = {
|
|
const params = {
|
|
|
ids: publishedData.value.id,
|
|
ids: publishedData.value.id,
|
|
|
coverImage: obj.coverImageId,
|
|
coverImage: obj.coverImageId,
|
|
|
- resourceDesc: obj.resourceDesc,
|
|
|
|
|
|
|
+ resourceDesc: obj.courseDesc,
|
|
|
verifyStatus: 1
|
|
verifyStatus: 1
|
|
|
}
|
|
}
|
|
|
console.log(params, '发布参数')
|
|
console.log(params, '发布参数')
|
|
@@ -762,7 +878,7 @@
|
|
|
}
|
|
}
|
|
|
const handleView = (record) => {
|
|
const handleView = (record) => {
|
|
|
router.push({
|
|
router.push({
|
|
|
- path: '/portal/resourceDetails',
|
|
|
|
|
|
|
+ path: '/student/resourceDetails',
|
|
|
query: {
|
|
query: {
|
|
|
id: record.id,
|
|
id: record.id,
|
|
|
state: 1
|
|
state: 1
|
|
@@ -823,6 +939,24 @@
|
|
|
const handleDelete = (record) => {
|
|
const handleDelete = (record) => {
|
|
|
console.log('Delete:', record)
|
|
console.log('Delete:', record)
|
|
|
}
|
|
}
|
|
|
|
|
+ const handleRestName = (record)=>{
|
|
|
|
|
+ console.log('修改资源名称:', record)
|
|
|
|
|
+ // fileId
|
|
|
|
|
+ // :
|
|
|
|
|
+ // "1981553204412776448"
|
|
|
|
|
+ // fileName
|
|
|
|
|
+ // :
|
|
|
|
|
+ // "p一百"
|
|
|
|
|
+ resourceAuditApi.detail({id : record.id}).then((res)=>{
|
|
|
|
|
+ console.log('修改资源名称: 单条', res)
|
|
|
|
|
+ console.log('修改资源名称: ', nameModalRef.value)
|
|
|
|
|
+ nameModalRef.value.open({
|
|
|
|
|
+ fileId : res.data.fileId,
|
|
|
|
|
+ fileName : res.data.fileName
|
|
|
|
|
+ })
|
|
|
|
|
+ // fileName
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
const handleRestore = (record) => {
|
|
const handleRestore = (record) => {
|
|
|
const params = {
|
|
const params = {
|
|
|
ids: record.id,
|
|
ids: record.id,
|
|
@@ -840,9 +974,14 @@
|
|
|
//资源编辑
|
|
//资源编辑
|
|
|
const edit = (record) => {
|
|
const edit = (record) => {
|
|
|
console.log('Restore:', record)
|
|
console.log('Restore:', record)
|
|
|
- uploadModalVisible.value = true
|
|
|
|
|
|
|
+
|
|
|
|
|
+ console.log('打开什么呢:', formState.verifyStatus)
|
|
|
isState.value = 1
|
|
isState.value = 1
|
|
|
- editResourcesId.value = record.id
|
|
|
|
|
|
|
+ formState.verifyStatus = '0,3'
|
|
|
|
|
+ editResourcesId.value = record
|
|
|
|
|
+
|
|
|
|
|
+ resourceUploadRef.value.open(teacherData.value,record)
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
//资源删除
|
|
//资源删除
|
|
|
const resourcesDelete = (record) => {
|
|
const resourcesDelete = (record) => {
|
|
@@ -875,14 +1014,31 @@
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ const resourcesDown = (record) => {
|
|
|
|
|
+ const params =
|
|
|
|
|
+ {
|
|
|
|
|
+ ids: record.id,
|
|
|
|
|
+ verifyStatus : 0
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ resourceAuditApi
|
|
|
|
|
+ .updateStatus(params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ getListData()
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 上传资源模态框
|
|
// 上传资源模态框
|
|
|
const uploadModalVisible = ref(false)
|
|
const uploadModalVisible = ref(false)
|
|
|
|
|
|
|
|
// 显示上传模态框
|
|
// 显示上传模态框
|
|
|
const showUploadModal = () => {
|
|
const showUploadModal = () => {
|
|
|
- isState.value = 0
|
|
|
|
|
- uploadModalVisible.value = true
|
|
|
|
|
|
|
+ // isState.value = 0
|
|
|
|
|
+ // uploadModalVisible.value = true
|
|
|
|
|
+ EventBus.emit('openMiniYun',teacherData.value)
|
|
|
}
|
|
}
|
|
|
// 翻页
|
|
// 翻页
|
|
|
const handlePageChange = (page) => {
|
|
const handlePageChange = (page) => {
|
|
@@ -895,31 +1051,17 @@
|
|
|
pagination.pageSize = size
|
|
pagination.pageSize = size
|
|
|
getListData()
|
|
getListData()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- onMounted(() => {
|
|
|
|
|
- // if (pageType == 'economize') {
|
|
|
|
|
- // formState.verifyStatus = '1'
|
|
|
|
|
- // }
|
|
|
|
|
- // getOrgTreeSelector()
|
|
|
|
|
- // getFileformat()
|
|
|
|
|
- // getResourceTypeTree()
|
|
|
|
|
- // getListData()
|
|
|
|
|
- })
|
|
|
|
|
- const open = () => {
|
|
|
|
|
- visible.value = true
|
|
|
|
|
- if (pageType == 'economize') {
|
|
|
|
|
- formState.verifyStatus = '1'
|
|
|
|
|
- }
|
|
|
|
|
- getOrgTreeSelector()
|
|
|
|
|
- getFileformat()
|
|
|
|
|
- getResourceTypeTree()
|
|
|
|
|
|
|
+ const onUpTag = () => {
|
|
|
|
|
+ pagination.pageNum = 1
|
|
|
getListData()
|
|
getListData()
|
|
|
}
|
|
}
|
|
|
- const close = () => {
|
|
|
|
|
- visible.value = false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ onMounted(() => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- defineExpose( {open,close})
|
|
|
|
|
|
|
+ EventBus.on('onUpTag',onUpTag)
|
|
|
|
|
+defineExpose( {open,close})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|