|
@@ -1,10 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div class="hc-layout-box">
|
|
<div class="hc-layout-box">
|
|
- <HcCard :scrollbar="false" actionSize="lg">
|
|
|
|
|
|
+ <HcCard :scrollbar="false" action-size="lg">
|
|
<template #header>
|
|
<template #header>
|
|
<HcTooltip keys="image-data-sort">
|
|
<HcTooltip keys="image-data-sort">
|
|
<el-button hc-btn type="primary" @click="showSortModalClick">
|
|
<el-button hc-btn type="primary" @click="showSortModalClick">
|
|
- <HcIcon name="list-settings"/>
|
|
|
|
|
|
+ <HcIcon name="list-settings" />
|
|
<span>分类管理</span>
|
|
<span>分类管理</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
@@ -17,9 +17,9 @@
|
|
{{ scope.$index + 1 }}
|
|
{{ scope.$index + 1 }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="分类名称" prop="classfName"/>
|
|
|
|
- <el-table-column label="数量" prop="count"/>
|
|
|
|
- <el-table-column label="所属阶段" prop="projectStage"/>
|
|
|
|
|
|
+ <el-table-column label="分类名称" prop="classfName" />
|
|
|
|
+ <el-table-column label="数量" prop="count" />
|
|
|
|
+ <el-table-column label="所属阶段" prop="projectStage" />
|
|
<el-table-column label="文件类型" prop="fileType">
|
|
<el-table-column label="文件类型" prop="fileType">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
{{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
@@ -27,10 +27,12 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="操作" width="130">
|
|
<el-table-column align="center" label="操作" width="130">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button size="small" text type="primary" @click="viewClick(scope.row)">查看
|
|
|
|
|
|
+ <el-button size="small" text type="primary" @click="viewClick(scope.row)">
|
|
|
|
+ 查看
|
|
</el-button>
|
|
</el-button>
|
|
<HcTooltip keys="image-data-upload">
|
|
<HcTooltip keys="image-data-upload">
|
|
- <el-button size="small" text type="primary" @click="uploadClick(scope.row)">上传
|
|
|
|
|
|
+ <el-button size="small" text type="primary" @click="uploadClick(scope.row)">
|
|
|
|
+ 上传
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
</template>
|
|
</template>
|
|
@@ -39,9 +41,9 @@
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</HcCard>
|
|
</HcCard>
|
|
- <!--分类管理 弹框-->
|
|
|
|
|
|
+ <!-- 分类管理 弹框 -->
|
|
<el-dialog v-model="showSortModal" class="hc-modal-border" title="分类管理" width="62rem">
|
|
<el-dialog v-model="showSortModal" class="hc-modal-border" title="分类管理" width="62rem">
|
|
- <el-alert :closable="false" title="隐藏分类之后,在主页面不会显示该分类入口" type="warning"/>
|
|
|
|
|
|
+ <el-alert :closable="false" title="隐藏分类之后,在主页面不会显示该分类入口" type="warning" />
|
|
<div class="modal-dialog">
|
|
<div class="modal-dialog">
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
<div class="hc-table-ref-box">
|
|
<div class="hc-table-ref-box">
|
|
@@ -51,8 +53,8 @@
|
|
{{ scope.$index + 1 }}
|
|
{{ scope.$index + 1 }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="分类名称" prop="classfName"/>
|
|
|
|
- <el-table-column label="所属阶段" prop="projectStage"/>
|
|
|
|
|
|
+ <el-table-column label="分类名称" prop="classfName" />
|
|
|
|
+ <el-table-column label="所属阶段" prop="projectStage" />
|
|
<el-table-column label="资料类型" prop="fileType">
|
|
<el-table-column label="资料类型" prop="fileType">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
{{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
@@ -60,8 +62,11 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="操作" width="130">
|
|
<el-table-column align="center" label="操作" width="130">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button v-if="scope.row.isShow" size="small" type="info"
|
|
|
|
- @click="saveConfig(scope.row)">隐藏分类
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.isShow" size="small" type="info"
|
|
|
|
+ @click="saveConfig(scope.row)"
|
|
|
|
+ >
|
|
|
|
+ 隐藏分类
|
|
</el-button>
|
|
</el-button>
|
|
<el-button v-else size="small" type="primary" @click="saveConfig(scope.row)">
|
|
<el-button v-else size="small" type="primary" @click="saveConfig(scope.row)">
|
|
显示分类
|
|
显示分类
|
|
@@ -77,18 +82,18 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import {onMounted, ref} from 'vue'
|
|
|
|
-import {useAppStore} from "~src/store";
|
|
|
|
-import {useRouter, useRoute} from 'vue-router'
|
|
|
|
-import imageApi from '~api/other-file/imageData';
|
|
|
|
-import {delStoreValue} from '~src/utils/storage'
|
|
|
|
-import {getArrValue} from "js-fast-way"
|
|
|
|
|
|
+import { onMounted, ref } from 'vue'
|
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
|
+import imageApi from '~api/other-file/imageData'
|
|
|
|
+import { delStoreValue } from '~src/utils/storage'
|
|
|
|
+import { getArrValue } from 'js-fast-way'
|
|
//变量
|
|
//变量
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const useRoutes = useRoute()
|
|
const useRoutes = useRoute()
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
-const projectId = ref(useAppState.getProjectId);
|
|
|
|
-const contractId = ref(useAppState.getContractId);
|
|
|
|
|
|
+const projectId = ref(useAppState.getProjectId)
|
|
|
|
+const contractId = ref(useAppState.getContractId)
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -103,9 +108,9 @@ const tableLoading = ref(false)
|
|
const tableListData = ref([])
|
|
const tableListData = ref([])
|
|
const getClassIfyList = async () => {
|
|
const getClassIfyList = async () => {
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
- const {error, code, data} = await imageApi.getClassIfyList({
|
|
|
|
|
|
+ const { error, code, data } = await imageApi.getClassIfyList({
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
- contractId: contractId.value
|
|
|
|
|
|
+ contractId: contractId.value,
|
|
})
|
|
})
|
|
//处理数据
|
|
//处理数据
|
|
tableLoading.value = false
|
|
tableLoading.value = false
|
|
@@ -124,7 +129,8 @@ const viewClick = (item) => {
|
|
type: item['storageDirectoryFormat'],
|
|
type: item['storageDirectoryFormat'],
|
|
fileType: item['fileType'],
|
|
fileType: item['fileType'],
|
|
id: item.id,
|
|
id: item.id,
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ },
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -135,8 +141,9 @@ const uploadClick = (item) => {
|
|
query: {
|
|
query: {
|
|
dataType: item['storageDirectoryFormat'], //存储目录格式 1按部位存储,2按日期存储
|
|
dataType: item['storageDirectoryFormat'], //存储目录格式 1按部位存储,2按日期存储
|
|
fileType: item['fileType'], //文件类型,1视频文件,2图片文件
|
|
fileType: item['fileType'], //文件类型,1视频文件,2图片文件
|
|
- classifyId: item.id, //classifyId, 分类ID,
|
|
|
|
- }
|
|
|
|
|
|
+ classifyId: item.id, //classifyId, 分类ID,
|
|
|
|
+ id: item.id,
|
|
|
|
+ },
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -151,9 +158,9 @@ const classTableLoading = ref(false)
|
|
const classTableData = ref([])
|
|
const classTableData = ref([])
|
|
const getClassifyShowConfigList = async () => {
|
|
const getClassifyShowConfigList = async () => {
|
|
classTableLoading.value = true
|
|
classTableLoading.value = true
|
|
- const {error, code, data} = await imageApi.getClassifyShowConfigList({
|
|
|
|
|
|
+ const { error, code, data } = await imageApi.getClassifyShowConfigList({
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
- contractId: contractId.value
|
|
|
|
|
|
+ contractId: contractId.value,
|
|
})
|
|
})
|
|
//处理数据
|
|
//处理数据
|
|
classTableLoading.value = false
|
|
classTableLoading.value = false
|
|
@@ -166,14 +173,14 @@ const getClassifyShowConfigList = async () => {
|
|
|
|
|
|
//保存客户端分类显隐记录
|
|
//保存客户端分类显隐记录
|
|
const saveConfig = async (row) => {
|
|
const saveConfig = async (row) => {
|
|
- const {error, code} = await imageApi.saveClassifyShowConfig({
|
|
|
|
|
|
+ const { error, code } = await imageApi.saveClassifyShowConfig({
|
|
showList: [{
|
|
showList: [{
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
contractId: contractId.value,
|
|
contractId: contractId.value,
|
|
classifyId: row.id,
|
|
classifyId: row.id,
|
|
isShow: row.isShow ? 0 : 1,
|
|
isShow: row.isShow ? 0 : 1,
|
|
- id: row['showId']
|
|
|
|
- }]
|
|
|
|
|
|
+ id: row['showId'],
|
|
|
|
+ }],
|
|
})
|
|
})
|
|
//处理数据
|
|
//处理数据
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|