From 6ef9e5189ac1888b8c4c504d5c5d3f431807ff56 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 15 三月 2025 11:57:40 +0800
Subject: [PATCH] 修改电路试验单位
---
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