From 573265f7d79341298ba4287be38f00ddbc66e7ec Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 三月 2025 12:00:51 +0800
Subject: [PATCH] 标准查新bug

---
 src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
index 81b5f6a..d6cc6d9 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
@@ -433,6 +433,7 @@
     handleUpdate(row) {
       this.title = '鏂囦欢鍙樻洿鐢宠'
       this.addInfo = this.HaveJson(row)
+      this.file = null
       this.addDialogVisible = true
     },
     // 鏌ョ湅闄勪欢
@@ -460,8 +461,7 @@
     },
     handleDown(row) {
       if (!row.url) return this.$message.warning('鏂囦欢鏈笂浼�')
-      let url = this.javaApi + '/word/' + row.url
-      this.$download.saveAs(url, row.url);
+      this.$download.downloadFileFromUrl(row.url, row.url);
     },
     async uploadPDF(pdfBlob) {
       const formData = new FormData();
@@ -470,18 +470,25 @@
       formData.append('state', this.type); // 鏂囦欢鍚嶅瓧娈�
       formData.append('writer', this.currentInfo.writer); // 鏂囦欢鍚嶅瓧娈�
 
-      let res = await checkManageDocumentControlled(formData)
-      this.checkLoading = false
-      this.noCheckLoading = false
-      if (res.code == 200) {
-        this.$message({ message: '鎿嶄綔鎴愬姛', type: 'success' });
-        this.checkDialogVisible = false;
-        this.refreshTable()
-        return true
-      } else {
-        this.$message({ message: '鎿嶄綔澶辫触', type: 'error' });
-        return false
+      try {
+        let res = await checkManageDocumentControlled(formData)
+        this.checkLoading = false
+        this.noCheckLoading = false
+        if (res.code == 200) {
+          this.$message({ message: '鎿嶄綔鎴愬姛', type: 'success' });
+          this.checkDialogVisible = false;
+          this.refreshTable()
+          return true
+        } else {
+          this.$message({ message: '鎿嶄綔澶辫触', type: 'error' });
+          return false
+        }
+      } catch (e) {
+        this.checkLoading = false
+        this.noCheckLoading = false
       }
+
+
     },
     handleCheckSub(type) {
       this.type = type
@@ -501,7 +508,6 @@
       })
         .then(() => {
           delManageDocumentControlled({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refresh();
           });

--
Gitblit v1.9.3