From 2d8e2c3c2b15e1425ab2b5e5816ff37c7096fdcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Wed, 9 Apr 2025 20:08:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=85=8D=E4=BB=B6=E6=95=85?= =?UTF-8?q?=E9=9A=9C=E7=8E=87=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/setup.js | 14 +++++++ src/components/scImport/index.vue | 2 +- .../setting/advanced/setup/spareParts.vue | 39 +++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/api/model/setup.js b/src/api/model/setup.js index 3498a39..3f24bd7 100644 --- a/src/api/model/setup.js +++ b/src/api/model/setup.js @@ -285,6 +285,20 @@ export default { return await http.post(this.url, data); }, }, + import:{ + url: `${config.API_URL}/spare.parts.failure.rate.batch.import`, + name: "备件故障导入", + post: async function (params) { + return await http.post(this.url,params,{'Content-Type': 'multipart/form-data'}); + } + }, + template:{ + url: `${config.API_URL}/spare.parts.failure.rate.import.template`, + name: "备件故障率导入模版", + post: async function (params) { + return await http.get(this.url,params,{responseType: 'arraybuffer'}); + } + }, }, bom:{ list:{ diff --git a/src/components/scImport/index.vue b/src/components/scImport/index.vue index e03ca72..793fe4d 100644 --- a/src/components/scImport/index.vue +++ b/src/components/scImport/index.vue @@ -112,7 +112,7 @@ export default { }, methods:{ getWsResult(res){ - if(res.data && (res.data.type == 4 || res.data.type == 5 || res.data.type == 10 || res.data.type == 17 || res.data.type == 18 || res.data.type == 27 || res.data.type == 28 || res.data.type == 31 || res.data.type == 42 || res.data.type == 44 || res.data.type == 45)){ + if(res.data && (res.data.type == 4 || res.data.type == 5 || res.data.type == 10 || res.data.type == 17 || res.data.type == 18 || res.data.type == 27 || res.data.type == 28 || res.data.type == 31 || res.data.type == 42 || res.data.type == 44 || res.data.type == 45 || res.data.type == 48)){ if(this.type == res.data.type){ this.importInfo = res.data; this.progressShow = true; diff --git a/src/views/setting/advanced/setup/spareParts.vue b/src/views/setting/advanced/setup/spareParts.vue index e678663..3bd47d3 100644 --- a/src/views/setting/advanced/setup/spareParts.vue +++ b/src/views/setting/advanced/setup/spareParts.vue @@ -5,6 +5,14 @@