From 102c7d7dc9f5af873f19c86a0d17d5d6addcbc32 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期二, 19 九月 2023 17:39:28 +0800
Subject: [PATCH] 项目优化

---
 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 6c32263..3b6c3a4 100644
--- a/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue
+++ b/src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue
@@ -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>
@@ -195,8 +196,8 @@
           delete: '/mdc/mdcPassRate/delete',
           deleteBatch: '/mdc/mdcPassRate/deleteBatch',
           getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
-          exportXlsUrl: "/mdc/mdcStandardProcessDuration/exportXls",
-          importExcelUrl: "/mdc/mdcStandardProcessDuration/importExcel",
+          exportXlsUrl: "/mdc/mdcPassRate/exportXls",
+          importExcelUrl: "/mdc/mdcPassRate/importExcel",
         }
       }
     },
@@ -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