Просмотр исходного кода

fix: 修复发文流程重载后文件更新逻辑

yusheng 2 месяцев назад
Родитель
Сommit
4009755fae
2 измененных файлов с 21 добавлено и 4 удалено
  1. 20 2
      src/views/doc/sendReceive/send/send.vue
  2. 1 2
      src/views/doc/util.js

+ 20 - 2
src/views/doc/sendReceive/send/send.vue

@@ -81,7 +81,7 @@
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
       v-if="processSubmitDialogFlag"
       ref="processSubmitDialogRef"
-      @reload="search"
+      @reload="sendReload"
     ></process-submit-dialog>
   </div>
 </template>
@@ -91,7 +91,12 @@
   import receiveEdit from '@/views/doc/sendReceive/receive/components/edit.vue';
   import { mapGetters } from 'vuex';
   import dictMixins from '@/mixins/dictMixins';
-  import { sendPage, sendDeleteAPI } from '@/api/doc-manage';
+  import {
+    sendPage,
+    sendDeleteAPI,
+    sendGetById,
+    fileUpdateAPI
+  } from '@/api/doc-manage';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
 
   export default {
@@ -113,6 +118,7 @@
     },
     data() {
       return {
+        currnetId: '',
         selection: [],
         processSubmitDialogFlag: false,
         columns: [
@@ -239,7 +245,19 @@
           page: 1
         });
       },
+      sendReload() {
+        this.search();
+        sendGetById(this.currnetId).then((res) => {
+          res.fileList.forEach((item) => {
+            fileUpdateAPI({
+              stampStoragePath: [],
+              id: item.id
+            });
+          });
+        });
+      },
       processSubmit(row) {
+        this.currnetId = row.id;
         this.processSubmitDialogFlag = true;
         this.$nextTick(() => {
           row['businessKey'] = 'fm_file_release_approve';

+ 1 - 2
src/views/doc/util.js

@@ -90,8 +90,7 @@ export function setFileUrl(row) {
   if ((row.status == 2 || row.status == 4) && row.stampStoragePath[0]) {
     file = row.stampStoragePath[0];
   }
-  console.log(file)
-  console.log(row)
+
   let fileNames = file.storePath.split('/');
   let url =
     window.location.origin +