diff --git a/src/api/model/early.js b/src/api/model/early.js index 3424dcb..2064272 100644 --- a/src/api/model/early.js +++ b/src/api/model/early.js @@ -51,7 +51,21 @@ export default { post: async function (params) { return await http.post(this.url, params); }, - } + }, + template:{ + url: `${config.API_URL}/warning.management.import.template`, + name: "预计六个月用量导入模版", + post: async function (params) { + return await http.get(this.url,params,{responseType: 'arraybuffer'}); + } + }, + import:{ + url: `${config.API_URL}/spare.parts.water.level.warning.batch.import`, + name: "预计六个月用量导入", + post: async function (params) { + return await http.post(this.url,params,{'Content-Type': 'multipart/form-data'}); + } + }, } diff --git a/src/components/scImport/index.vue b/src/components/scImport/index.vue index 93885bd..1623206 100644 --- a/src/components/scImport/index.vue +++ b/src/components/scImport/index.vue @@ -113,7 +113,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 || res.data.type == 48 || res.data.type == 49)){ + 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 || res.data.type == 49 || res.data.type == 50)){ if(this.type == res.data.type){ this.importInfo = res.data; this.progressShow = true; diff --git a/src/views/earlyManager/index.vue b/src/views/earlyManager/index.vue index 857379a..ca39b5c 100644 --- a/src/views/earlyManager/index.vue +++ b/src/views/earlyManager/index.vue @@ -4,6 +4,14 @@
新增预警 批量修改预计用量 + + + +
@@ -13,7 +21,14 @@
-
+
+
+
+ + 切换查询方式 +
+
+
@@ -22,6 +37,9 @@ 重置
+
+ +