From 3a8223b71d18205d40b894fd0b4c0fa1ca773e86 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期一, 13 十一月 2023 10:44:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/mdc-test' into mdc-test

---
 src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue
index f5c23aa..30e763b 100644
--- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue
+++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue
@@ -1,5 +1,5 @@
 <template>
-  <a-card :bordered="false" class="device_list">
+  <div :bordered="false" class="device_list">
     <!-- 鏌ヨ鍖哄煙 -->
     <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -35,6 +35,7 @@
     <div class="table-operator" style="display: inline;">
       <a-button @click="handleAdd" type="primary" icon="plus">鏂板
       </a-button>
+      <a-button type="primary" icon="download" @click="importTemplate('鍚堟牸鐜囨ā鏉�')">瀵煎叆妯℃澘</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('鍚堟牸鐜囩鐞�')">瀵煎嚭</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
       <a-button type="primary" icon="import">瀵煎叆</a-button>
@@ -84,7 +85,7 @@
     <!--<device-repair-model></device-repair-model>-->
     <mdc-pass-rate-modal  ref="modalForm" @ok="modalFormOk"></mdc-pass-rate-modal>
     <mdc-pass-rate-edit  ref="modalFormedit" @ok="modalFormOk"></mdc-pass-rate-edit>
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -239,6 +240,15 @@
       },
     },
     methods: {
+      importTemplate(fileName){
+        var a = document.createElement("a");
+        a.href = "/static/鍚堟牸鐜囩鐞�.xls";
+        a.download = "鍚堟牸鐜囩鐞�.xls";
+        a.style.display = "none";
+        document.body.appendChild(a);
+        a.click();
+        a.remove();
+      },
       dateParamChange(v1, v2) {
         // console.log(v1,v2)
         this.queryParam.startTime = v2[0]
@@ -520,7 +530,7 @@
             //閲嶆柊璁$畻鍒嗛〉闂
             that.reCalculatePage(1)
             // that.$message.success(res.message);
-            that.$notification.warning({
+            that.$notification.success({
               message:'娑堟伅',
               description:res.message
             });
@@ -562,7 +572,7 @@
                   //閲嶆柊璁$畻鍒嗛〉闂
                   that.reCalculatePage(that.selectedRowKeys.length)
                   // that.$message.success(res.message);
-                  that.$notification.warning({
+                  that.$notification.success({
                     message:'娑堟伅',
                     description:res.message
                   });

--
Gitblit v1.9.3