From 5a30d9ca4c0f5919479dfcbf4b306b9e0db75b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=9E=97?= Date: Tue, 14 Dec 2021 20:25:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=BC=E5=87=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8=E7=AD=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lake/statistic/inner/component/average.vue | 3 +-- .../statistic/inner/component/avg-nutritional.vue | 10 ++++++++-- .../statistic/inner/component/com-nutritional.vue | 10 ++++++++-- .../lake/statistic/inner/component/comparison.vue | 10 ++++++++-- .../lake/statistic/inner/component/raw-colums.js | 14 ++++++++++++++ .../water/lake/statistic/inner/component/raw.vue | 4 ++-- .../lake/statistic/special/component/average.vue | 3 +-- .../special/component/avg-nutritional.vue | 10 ++++++++-- .../special/component/com-nutritional.vue | 10 ++++++++-- .../statistic/special/component/comparison.vue | 10 ++++++++-- .../lake/statistic/special/component/raw-colums.js | 14 ++++++++++++++ .../water/lake/statistic/special/component/raw.vue | 3 +-- 12 files changed, 81 insertions(+), 20 deletions(-) diff --git a/src/views/water/lake/statistic/inner/component/average.vue b/src/views/water/lake/statistic/inner/component/average.vue index c8c5e81..4cd9ff1 100644 --- a/src/views/water/lake/statistic/inner/component/average.vue +++ b/src/views/water/lake/statistic/inner/component/average.vue @@ -6,7 +6,6 @@ item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/inner/component/avg-nutritional.vue b/src/views/water/lake/statistic/inner/component/avg-nutritional.vue index b6f12a3..e822539 100644 --- a/src/views/water/lake/statistic/inner/component/avg-nutritional.vue +++ b/src/views/water/lake/statistic/inner/component/avg-nutritional.vue @@ -6,7 +6,6 @@ index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "类别", dataIndex: "type", sorter: true,}, {title: "点位名称", dataIndex: "pointName", sorter: true,}, @@ -125,7 +131,7 @@ export default { const arr = []; const th = columns.map((item) => item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/inner/component/com-nutritional.vue b/src/views/water/lake/statistic/inner/component/com-nutritional.vue index cd35ed4..45575d7 100644 --- a/src/views/water/lake/statistic/inner/component/com-nutritional.vue +++ b/src/views/water/lake/statistic/inner/component/com-nutritional.vue @@ -6,7 +6,6 @@ index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "类别", dataIndex: "type", sorter: true,}, {title: "点位名称", dataIndex: "pointName", sorter: true,}, @@ -129,7 +135,7 @@ export default { const arr = []; const th = columns.map((item) => item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/inner/component/comparison.vue b/src/views/water/lake/statistic/inner/component/comparison.vue index b328004..8202442 100644 --- a/src/views/water/lake/statistic/inner/component/comparison.vue +++ b/src/views/water/lake/statistic/inner/component/comparison.vue @@ -6,7 +6,6 @@ index + 1 + }, { title: "类别", dataIndex: "type", sorter: true }, { title: "点位名称", dataIndex: "pointName", sorter: true}, ...addCloumns @@ -237,7 +243,7 @@ export default { arr.push(th1) arr.push(th2) - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = this.sColumns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/inner/component/raw-colums.js b/src/views/water/lake/statistic/inner/component/raw-colums.js index c02d599..c48d9fe 100644 --- a/src/views/water/lake/statistic/inner/component/raw-colums.js +++ b/src/views/water/lake/statistic/inner/component/raw-colums.js @@ -24,6 +24,13 @@ const innerFilterColumns = [ ] const innerTableColumns = [ + { + key: 'index', + dataIndex: 'index', + width: 48, + align: 'center', + customRender: ({index}) => index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "断面名称", dataIndex: "pointName", sorter: true,}, {title: "水温(℃)", dataIndex: "waterTemperature", sorter: true,}, @@ -53,6 +60,13 @@ const innerTableColumns = [ ]; const averageTableColumns = [ + { + key: 'index', + dataIndex: 'index', + width: 48, + align: 'center', + customRender: ({index}) => index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "断面名称", dataIndex: "pointName", sorter: true,}, {title: "水温(℃)", dataIndex: "waterTemperature", sorter: true,}, diff --git a/src/views/water/lake/statistic/inner/component/raw.vue b/src/views/water/lake/statistic/inner/component/raw.vue index 4becfd6..42730ba 100644 --- a/src/views/water/lake/statistic/inner/component/raw.vue +++ b/src/views/water/lake/statistic/inner/component/raw.vue @@ -6,12 +6,12 @@ @@ -156,7 +156,7 @@ export default { const arr = []; const th = columns.map((item) => item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/special/component/average.vue b/src/views/water/lake/statistic/special/component/average.vue index 8d2a594..317c88e 100644 --- a/src/views/water/lake/statistic/special/component/average.vue +++ b/src/views/water/lake/statistic/special/component/average.vue @@ -6,7 +6,6 @@ item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/special/component/avg-nutritional.vue b/src/views/water/lake/statistic/special/component/avg-nutritional.vue index 39a4ca7..50b67bc 100644 --- a/src/views/water/lake/statistic/special/component/avg-nutritional.vue +++ b/src/views/water/lake/statistic/special/component/avg-nutritional.vue @@ -6,7 +6,6 @@ index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "类别", dataIndex: "type", sorter: true,}, {title: "点位名称", dataIndex: "pointName", sorter: true,}, @@ -126,7 +132,7 @@ export default { const arr = []; const th = columns.map((item) => item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/special/component/com-nutritional.vue b/src/views/water/lake/statistic/special/component/com-nutritional.vue index 03552de..4264e5e 100644 --- a/src/views/water/lake/statistic/special/component/com-nutritional.vue +++ b/src/views/water/lake/statistic/special/component/com-nutritional.vue @@ -6,7 +6,6 @@ index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "类别", dataIndex: "type", sorter: true,}, {title: "点位名称", dataIndex: "pointName", sorter: true,}, @@ -129,7 +135,7 @@ export default { const arr = []; const th = columns.map((item) => item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/special/component/comparison.vue b/src/views/water/lake/statistic/special/component/comparison.vue index b336b93..292e943 100644 --- a/src/views/water/lake/statistic/special/component/comparison.vue +++ b/src/views/water/lake/statistic/special/component/comparison.vue @@ -6,7 +6,6 @@ index + 1 + }, { title: "类别", dataIndex: "type", sorter: true }, { title: "点位名称", dataIndex: "pointName", sorter: true}, ...addCloumns @@ -237,7 +243,7 @@ export default { arr.push(th1) arr.push(th2) - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = this.sColumns.map((item) => d[item.dataIndex]); arr.push(td); }); diff --git a/src/views/water/lake/statistic/special/component/raw-colums.js b/src/views/water/lake/statistic/special/component/raw-colums.js index c02d599..c48d9fe 100644 --- a/src/views/water/lake/statistic/special/component/raw-colums.js +++ b/src/views/water/lake/statistic/special/component/raw-colums.js @@ -24,6 +24,13 @@ const innerFilterColumns = [ ] const innerTableColumns = [ + { + key: 'index', + dataIndex: 'index', + width: 48, + align: 'center', + customRender: ({index}) => index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "断面名称", dataIndex: "pointName", sorter: true,}, {title: "水温(℃)", dataIndex: "waterTemperature", sorter: true,}, @@ -53,6 +60,13 @@ const innerTableColumns = [ ]; const averageTableColumns = [ + { + key: 'index', + dataIndex: 'index', + width: 48, + align: 'center', + customRender: ({index}) => index + 1 + }, {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, {title: "断面名称", dataIndex: "pointName", sorter: true,}, {title: "水温(℃)", dataIndex: "waterTemperature", sorter: true,}, diff --git a/src/views/water/lake/statistic/special/component/raw.vue b/src/views/water/lake/statistic/special/component/raw.vue index 9f8b5ef..50586a5 100644 --- a/src/views/water/lake/statistic/special/component/raw.vue +++ b/src/views/water/lake/statistic/special/component/raw.vue @@ -6,7 +6,6 @@ item.title); arr.push(th); - this.data.forEach((d) => { + this.datasource.forEach((d) => { const td = columns.map((item) => d[item.dataIndex]); arr.push(td); });