Bläddra i källkod

修改文件收集

ZaiZai 1 år sedan
förälder
incheckning
f287ba8373
1 ändrade filer med 27 tillägg och 11 borttagningar
  1. 27 11
      src/views/file/collection.vue

+ 27 - 11
src/views/file/collection.vue

@@ -46,12 +46,12 @@
                         <el-option v-for="item in approvalStatus" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                 </div>
-                <div class="w-40 ml-2">
+                <div class="ml-2 w-40">
                     <el-select v-model="searchForm.isCertificationValue" clearable placeholder="认证状态">
                         <el-option v-for="item in certifiedStatus" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                 </div>
-                <div class="w-64 ml-2">
+                <div class="ml-2 w-64">
                     <el-input v-model="searchForm.queryValue" clearable placeholder="请输入名称关键词检索" @keyup="keyUpEvent" />
                 </div>
                 <div class="ml-2">
@@ -162,7 +162,7 @@
                 <div class="hc-moves-transfer-panel">
                     <div class="panel-header">
                         <div class="panel-header-label">
-                            <el-checkbox v-model="movesCheckAll" :indeterminate="isIndeterminate" class="size-xl space" @change="handleCheckAllChange">
+                            <el-checkbox v-model="movesCheckAll" :indeterminate="isIndeterminate" class="space size-xl" @change="handleCheckAllChange">
                                 选择需要迁移的文件
                             </el-checkbox>
                         </div>
@@ -183,7 +183,7 @@
                                 >
                                     <template #default="{ item, index }">
                                         <div :key="index">
-                                            <el-checkbox :value="item" class="size-xl space mt-5 ">{{ item.fileName }}</el-checkbox>
+                                            <el-checkbox :value="item" class="space mt-5 size-xl">{{ item.fileName }}</el-checkbox>
                                         </div>
                                     </template>
                                 </recycle-scroller>
@@ -226,7 +226,7 @@
                         <span class="text-link text-xl" @click="upSortClick(index)">
                             <HcIcon fill name="arrow-up" />
                         </span>
-                        <span class="text-link text-xl ml-2" @click="downSortClick(index)">
+                        <span class="text-link ml-2 text-xl" @click="downSortClick(index)">
                             <HcIcon fill name="arrow-down" />
                         </span>
                     </template>
@@ -996,8 +996,8 @@ const sortingModalClose = () => {
 //删除
 const delModalClick = () => {
     const rows = tableCheckedKeys.value
-    //待审批,已审批都不能删除
-    const result = rows.some(({ isApprovalValue }) => {
+    //待审批,已审批都不能删除  豆海涛说,先取消限制
+    /*const result = rows.some(({ isApprovalValue }) => {
         return isApprovalValue === '待审批' || isApprovalValue === '已审批'
     })
     if (result) {
@@ -1018,7 +1018,18 @@ const delModalClick = () => {
             }
             resolve() //关闭弹窗的回调
         })
-    }
+    }*/
+    HcDelMsg(async (resolve) => {
+        const keys = arrToId(rows)
+        const { error, code } = await archiveFileApi.removeFile({
+            ids: keys,
+        })
+        if (!error && code === 200) {
+            window.$message?.success('删除成功!')
+            searchClick()
+        }
+        resolve() //关闭弹窗的回调
+    })
 }
 //废除
 const repealModalClick = async () => {
@@ -1501,8 +1512,8 @@ const batchUploadCancel = () => {
 //批量编辑
 const batchEditClick = () => {
     const rows = deepClone(tableCheckedKeys.value)
-    //判断是否满足条件
-    const result = rows.every(({ status }) => {
+    //判断是否满足条件 豆海涛说,先取消限制
+    /*const result = rows.every(({ status }) => {
         return status !== 1 && status !== 2
     })
     //判断状态
@@ -1514,7 +1525,12 @@ const batchEditClick = () => {
         showUploadModal.value = true
     } else {
         window.$message?.warning('已上报或已审批的文件不能编辑')
-    }
+    }*/
+    tableUploadType.value = 'edit'
+    setTableUploadColumn()
+    uploadSaveLoading.value = false
+    tableUploadData.value = rows
+    showUploadModal.value = true
 }
 
 //确认编辑上传保存