Quellcode durchsuchen

影响资料更改

duy vor 1 Jahr
Ursprung
Commit
c8bb6044b0
1 geänderte Dateien mit 38 neuen und 31 gelöschten Zeilen
  1. 38 31
      src/views/other-file/image-data.vue

+ 38 - 31
src/views/other-file/image-data.vue

@@ -1,10 +1,10 @@
 <template>
     <div class="hc-layout-box">
-        <HcCard :scrollbar="false" actionSize="lg">
+        <HcCard :scrollbar="false" action-size="lg">
             <template #header>
                 <HcTooltip keys="image-data-sort">
                     <el-button hc-btn type="primary" @click="showSortModalClick">
-                        <HcIcon name="list-settings"/>
+                        <HcIcon name="list-settings" />
                         <span>分类管理</span>
                     </el-button>
                 </HcTooltip>
@@ -17,9 +17,9 @@
                                 {{ scope.$index + 1 }}
                             </template>
                         </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">
                             <template #default="scope">
                                 {{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
@@ -27,10 +27,12 @@
                         </el-table-column>
                         <el-table-column align="center" label="操作" width="130">
                             <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>
                                 <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>
                                 </HcTooltip>
                             </template>
@@ -39,9 +41,9 @@
                 </div>
             </el-scrollbar>
         </HcCard>
-        <!--分类管理 弹框-->
+        <!-- 分类管理 弹框 -->
         <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">
                 <el-scrollbar>
                     <div class="hc-table-ref-box">
@@ -51,8 +53,8 @@
                                     {{ scope.$index + 1 }}
                                 </template>
                             </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">
                                 <template #default="scope">
                                     {{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
@@ -60,8 +62,11 @@
                             </el-table-column>
                             <el-table-column align="center" label="操作" width="130">
                                 <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 v-else size="small" type="primary" @click="saveConfig(scope.row)">
                                         显示分类
@@ -77,18 +82,18 @@
 </template>
 
 <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 useRoutes = useRoute()
 const useAppState = useAppStore()
-const projectId = ref(useAppState.getProjectId);
-const contractId = ref(useAppState.getContractId);
+const projectId = ref(useAppState.getProjectId)
+const contractId = ref(useAppState.getContractId)
 
 //渲染完成
 onMounted(() => {
@@ -103,9 +108,9 @@ 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
+        contractId: contractId.value,
     })
     //处理数据
     tableLoading.value = false
@@ -124,7 +129,8 @@ const viewClick = (item) => {
             type: item['storageDirectoryFormat'],
             fileType: item['fileType'],
             id: item.id,
-        }
+           
+        },
     })
 }
 
@@ -135,8 +141,9 @@ const uploadClick = (item) => {
         query: {
             dataType: item['storageDirectoryFormat'], //存储目录格式 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 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
+        contractId: contractId.value,
     })
     //处理数据
     classTableLoading.value = false
@@ -166,14 +173,14 @@ 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,
-            id: row['showId']
-        }]
+            id: row['showId'],
+        }],
     })
     //处理数据
     if (!error && code === 200) {