Browse Source

批量设置根据需求修改

gangyj 2 năm trước cách đây
mục cha
commit
a00e87ff91
1 tập tin đã thay đổi với 26 bổ sung1 xóa
  1. 26 1
      src/views/file/records.vue

+ 26 - 1
src/views/file/records.vue

@@ -186,6 +186,8 @@
                         <el-option v-for="item in storagePeriod" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
                     </el-select>
                 </span>
+                <span class="ml-5">立卷单位:</span>
+                <span><el-input v-model="batchSet.filingUnit" placeholder="输入立卷单位"/></span>
                 <span class="ml-5">
                     <el-button type="primary" @click="batchSetHandle">设置</el-button>
                 </span>
@@ -237,6 +239,8 @@
                                 <span>新增上传</span>
                             </el-button>
                         </HcFileUpload>
+
+                        <el-alert title="提示:每次不超过10份,文件量越多,响应容易超时" type="error" :closable="false"/>
                     </div>
                     <div class="right">
                         <el-button size="large" @click="batchUploadCancel">
@@ -1124,7 +1128,8 @@ const batchSet = ref({
     numberStart:'',
     numberEnd:'',
     securityLevel:'',
-    storagePeriod:''
+    storagePeriod:'',
+    filingUnit:'',
 })
 
 //批量设置
@@ -1132,6 +1137,7 @@ const batchSetHandle = () => {
     setSecurityLevel()
     setStoragePeriod()
     setFileNumber()
+    setFilingUnit()
 }
 
 //批量设置密级
@@ -1235,6 +1241,25 @@ const setFileNumber = () => {
     }
 }
 
+//立卷单位
+const setFilingUnit = ()=>{
+    if(batchSet.value.filingUnit){
+        let isSet = true;
+        for (let i = 0; i < tableUploadData.value.length; i++) {
+            if(tableUploadData.value[i].filingUnit){
+                isSet = false;
+                return;
+            }
+        }
+        //如果有一条数据选了,其他的都不进行设置
+        if(isSet){
+            tableUploadData.value.forEach((element)=>{
+                element.filingUnit = batchSet.value.filingUnit
+            })
+        }
+    }
+}
+
 //批量下载
 const downloadLoading = ref(false)
 const batchDownload = async () => {