|
@@ -4,32 +4,34 @@
|
|
|
<template #header>
|
|
|
<HcTooltip keys="image-data-sort">
|
|
|
<el-button hc-btn type="primary" @click="showSortModalClick">
|
|
|
- <HcIcon name="grid_view"/>
|
|
|
+ <HcIcon name="list-settings"/>
|
|
|
<span>分类管理</span>
|
|
|
</el-button>
|
|
|
</HcTooltip>
|
|
|
</template>
|
|
|
<el-scrollbar>
|
|
|
<div class="hc-table-ref-box">
|
|
|
- <el-table hc :data="tableListData" :loading="tableLoading" row-key="id" stripe>
|
|
|
- <el-table-column prop="index" label="序号" width="80">
|
|
|
+ <el-table :data="tableListData" :loading="tableLoading" hc row-key="id" stripe>
|
|
|
+ <el-table-column label="序号" prop="index" width="80">
|
|
|
<template #default="scope">
|
|
|
- {{scope.$index + 1}}
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="classfName" label="分类名称"/>
|
|
|
- <el-table-column prop="count" label="数量"/>
|
|
|
- <el-table-column prop="projectStage" label="所属阶段"/>
|
|
|
- <el-table-column prop="fileType" label="文件类型">
|
|
|
+ <el-table-column label="分类名称" prop="classfName"/>
|
|
|
+ <el-table-column label="数量" prop="count"/>
|
|
|
+ <el-table-column label="所属阶段" prop="projectStage"/>
|
|
|
+ <el-table-column label="文件类型" prop="fileType">
|
|
|
<template #default="scope">
|
|
|
- {{scope.row.fileType == 1 ? '视频文件' : '图片文件'}}
|
|
|
+ {{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="130">
|
|
|
+ <el-table-column align="center" label="操作" width="130">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="primary" size="small" text @click="viewClick(scope.row)">查看</el-button>
|
|
|
+ <el-button size="small" text type="primary" @click="viewClick(scope.row)">查看
|
|
|
+ </el-button>
|
|
|
<HcTooltip keys="image-data-upload">
|
|
|
- <el-button type="primary" size="small" text @click="uploadClick(scope.row)">上传</el-button>
|
|
|
+ <el-button size="small" text type="primary" @click="uploadClick(scope.row)">上传
|
|
|
+ </el-button>
|
|
|
</HcTooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -38,28 +40,32 @@
|
|
|
</el-scrollbar>
|
|
|
</HcCard>
|
|
|
<!--分类管理 弹框-->
|
|
|
- <el-dialog v-model="showSortModal" title="分类管理" width="62rem" class="hc-modal-border">
|
|
|
- <el-alert title="隐藏分类之后,在主页面不会显示该分类入口" type="warning" :closable="false"/>
|
|
|
+ <el-dialog v-model="showSortModal" class="hc-modal-border" title="分类管理" width="62rem">
|
|
|
+ <el-alert :closable="false" title="隐藏分类之后,在主页面不会显示该分类入口" type="warning"/>
|
|
|
<div class="modal-dialog">
|
|
|
<el-scrollbar>
|
|
|
<div class="hc-table-ref-box">
|
|
|
- <el-table hc :data="classTableData" :loading="classTableLoading" row-key="id" stripe>
|
|
|
- <el-table-column prop="index" label="序号" width="80">
|
|
|
+ <el-table :data="classTableData" :loading="classTableLoading" hc row-key="id" stripe>
|
|
|
+ <el-table-column label="序号" prop="index" width="80">
|
|
|
<template #default="scope">
|
|
|
- {{scope.$index + 1}}
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="classfName" label="分类名称"/>
|
|
|
- <el-table-column prop="projectStage" label="所属阶段"/>
|
|
|
- <el-table-column prop="fileType" label="资料类型">
|
|
|
+ <el-table-column label="分类名称" prop="classfName"/>
|
|
|
+ <el-table-column label="所属阶段" prop="projectStage"/>
|
|
|
+ <el-table-column label="资料类型" prop="fileType">
|
|
|
<template #default="scope">
|
|
|
- {{scope.row.fileType == 1 ? '视频文件' : '图片文件'}}
|
|
|
+ {{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="130">
|
|
|
+ <el-table-column align="center" label="操作" width="130">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="info" size="small" @click="saveConfig(scope.row)" v-if="scope.row.isShow">隐藏分类</el-button>
|
|
|
- <el-button type="primary" size="small" @click="saveConfig(scope.row)" v-else>显示分类</el-button>
|
|
|
+ <el-button v-if="scope.row.isShow" size="small" type="info"
|
|
|
+ @click="saveConfig(scope.row)">隐藏分类
|
|
|
+ </el-button>
|
|
|
+ <el-button v-else size="small" type="primary" @click="saveConfig(scope.row)">
|
|
|
+ 显示分类
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -71,7 +77,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {onMounted,ref} from 'vue'
|
|
|
+import {onMounted, ref} from 'vue'
|
|
|
import {useAppStore} from "~src/store";
|
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
|
import imageApi from '~api/other-file/imageData';
|
|
@@ -98,7 +104,7 @@ const tableLoading = ref(false)
|
|
|
const tableListData = ref([])
|
|
|
const getClassIfyList = async () => {
|
|
|
tableLoading.value = true
|
|
|
- const { error, code, data } = await imageApi.getClassIfyList({
|
|
|
+ const {error, code, data} = await imageApi.getClassIfyList({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value
|
|
|
})
|
|
@@ -146,7 +152,7 @@ const classTableLoading = ref(false)
|
|
|
const classTableData = ref([])
|
|
|
const getClassifyShowConfigList = async () => {
|
|
|
classTableLoading.value = true
|
|
|
- const { error, code, data } = await imageApi.getClassifyShowConfigList({
|
|
|
+ const {error, code, data} = await imageApi.getClassifyShowConfigList({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value
|
|
|
})
|
|
@@ -161,12 +167,12 @@ const getClassifyShowConfigList = async () => {
|
|
|
|
|
|
//保存客户端分类显隐记录
|
|
|
const saveConfig = async (row) => {
|
|
|
- const { error, code } = await imageApi.saveClassifyShowConfig({
|
|
|
+ const {error, code} = await imageApi.saveClassifyShowConfig({
|
|
|
showList: [{
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
|
classifyId: row.id,
|
|
|
- isShow: row.isShow?0:1,
|
|
|
+ isShow: row.isShow ? 0 : 1,
|
|
|
id: row['showId']
|
|
|
}]
|
|
|
})
|