From 8c9268c9c158783faddabca63dd6401da7977a1b Mon Sep 17 00:00:00 2001 From: "lily.zhang" Date: Thu, 28 Oct 2021 10:37:52 +0800 Subject: [PATCH] cxw-010203 --- src/views/IndustryDataExport/getApiData.js | 32 ++++++---- src/views/IndustryDataExport/index.vue | 67 +++++++++++--------- src/views/IndustryDataExport/tableEvent.js | 71 +++++++++++++++++----- 3 files changed, 116 insertions(+), 54 deletions(-) diff --git a/src/views/IndustryDataExport/getApiData.js b/src/views/IndustryDataExport/getApiData.js index b0d19ec..022cbf6 100644 --- a/src/views/IndustryDataExport/getApiData.js +++ b/src/views/IndustryDataExport/getApiData.js @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-10-27 15:26:21 - * @LastEditTime: 2021-10-27 15:53:06 + * @LastEditTime: 2021-10-28 10:28:34 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /data-show/src/views/IndustryDataExport/getApiData.js @@ -39,13 +39,16 @@ export default { this.getData(1) .then((res) => { let data = res.data1; + let x = this.quDaoAll.replace(/\(.*?\)/g, ""); + this.quDaoAll = x + "(" + data[0] + ")"; let arr = [...this.plainOptions]; + data.splice(0,1); for (let i = 0; i < data.length; i++) { let label = arr[i].label || ""; let str = label.replace(/\(.*?\)/g, ""); arr[i].label = str + "(" + data[i] + ")"; } - this.plainOptions = arr; + this.plainOptions = arr; resolve(res); }) .catch(() => { @@ -96,11 +99,14 @@ export default { let data = res.data; let arr = []; data.forEach((ele) => { - let obj = { - label: ele.value, - value: ele.key, - }; - arr.push(obj); + let obj = null; + if(ele.key != -1) { + obj = { + label: ele.value, + value: ele.key, + }; + arr.push(obj); + } }); this.plainOptions = arr; resolve(arr); @@ -118,11 +124,13 @@ export default { let data = res.data; let arr = []; data.forEach((ele) => { - let obj = { - label: ele.value, - value: ele.key, - }; - arr.push(obj); + if(ele.key != -1) { + let obj = { + label: ele.value, + value: ele.key, + }; + arr.push(obj); + } }); this.plainOptions1 = arr; resolve(arr); diff --git a/src/views/IndustryDataExport/index.vue b/src/views/IndustryDataExport/index.vue index aed46eb..e927745 100644 --- a/src/views/IndustryDataExport/index.vue +++ b/src/views/IndustryDataExport/index.vue @@ -1,7 +1,7 @@