From f0a1d1428a7a258a5493ad5f6c36161ce377c7b0 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:11 +0800
Subject: [PATCH] 修改cnas

---
 src/components/view/a7-standard-novelty-retrieval.vue |   48 ++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/src/components/view/a7-standard-novelty-retrieval.vue b/src/components/view/a7-standard-novelty-retrieval.vue
index 09667a1..9032b0b 100644
--- a/src/components/view/a7-standard-novelty-retrieval.vue
+++ b/src/components/view/a7-standard-novelty-retrieval.vue
@@ -91,10 +91,22 @@
             <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
           </el-select>
         </span>
+        <span>缂栧埗鏃ユ湡锛�
+            <el-date-picker v-model="ratifyInfo.writeDate" style="width:100%"
+              type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small"
+              placeholder="閫夋嫨鏃ユ湡">
+            </el-date-picker>
+        </span>
         <span>鎵瑰噯浜猴細
           <el-select v-model="ratifyInfo.ratifyUserId" placeholder="璇烽�夋嫨" size="small" style="width: 100%">
             <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
           </el-select>
+        </span>
+        <span>鎵瑰噯鏃ユ湡锛�
+          <el-date-picker v-model="ratifyInfo.ratifyDate" style="width:100%"
+            type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small"
+            placeholder="閫夋嫨鏃ユ湡">
+          </el-date-picker>
         </span>
         <span slot="footer" class="dialog-footer">
         <el-button @click="ratifyDialog = false">鍙� 娑�</el-button>
@@ -384,6 +396,8 @@
       ratifyInfo: {
         writeUserId: '',
         ratifyUserId: '',
+        writeDate: '',
+        ratifyDate: '',
       },
       userList: []
     };
@@ -512,6 +526,8 @@
         endDate: endDate,
         writeUserId: this.ratifyInfo.writeUserId,
         ratifyUserId: this.ratifyInfo.ratifyUserId,
+        writeDate: this.ratifyInfo.writeDate,
+        ratifyDate: this.ratifyInfo.ratifyDate,
       }
       this.outLoading = true
       this.$axios.post(this.$api.processMethodSearchNew.exportMethodSearchNew,{
@@ -522,13 +538,33 @@
         },
         noQs: true,responseType: "blob"}).then(res => {
         this.outLoading = false
-        this.$message.success('瀵煎嚭鎴愬姛')
         const blob = new Blob([res],{ type: 'application/octet-stream' });
-        const url = URL.createObjectURL(blob);
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = '鏍囧噯鏌ユ柊瀵煎嚭.xlsx';
-        link.click();
+        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
+        let reader = new FileReader();
+        reader.readAsText(blob, 'utf-8');
+        reader.onload = () => {
+          try {
+            let result = JSON.parse(reader.result);
+            if (result.message) {
+              this.$message.error(result.message);
+            } else {
+              const url = URL.createObjectURL(blob);
+              const link = document.createElement('a');
+              link.href = url;
+              link.download = '鏍囧噯鏌ユ柊瀵煎嚭.xlsx';
+              link.click();
+              this.$message.success('瀵煎嚭鎴愬姛')
+            }
+          } catch (err) {
+            console.log(err);
+            const url = URL.createObjectURL(blob);
+            const link = document.createElement('a');
+            link.href = url;
+            link.download = '鏍囧噯鏌ユ柊瀵煎嚭.xlsx';
+            link.click();
+            this.$message.success('瀵煎嚭鎴愬姛')
+          }
+        }
       })
     },
     // 瀵煎叆

--
Gitblit v1.9.3