From 3670be157546ea9e8c55ff2def77a36953242048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=9E=97?= Date: Tue, 7 Dec 2021 11:42:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9F=8E=E5=B8=82=E5=86=85=E6=B9=96?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/water/lake/statistic/index.vue | 2 +- .../statistic/inner/component/average.vue | 166 +++++++++++ .../inner/component/avg-nutritional.vue | 148 ++++++++++ .../inner/component/com-nutritional.vue | 148 ++++++++++ .../statistic/inner/component/comparison.vue | 169 +++++++++++ .../statistic/inner/component/raw-colums.js | 138 +++++++++ .../lake/statistic/inner/component/raw.vue | 167 +++++++++++ .../lake/statistic/inner/component/search.vue | 277 ++++++++++++++++++ .../water/lake/statistic/inner/index.vue | 65 ++++ 9 files changed, 1279 insertions(+), 1 deletion(-) create mode 100644 src/views/water/lake/statistic/inner/component/average.vue create mode 100644 src/views/water/lake/statistic/inner/component/avg-nutritional.vue create mode 100644 src/views/water/lake/statistic/inner/component/com-nutritional.vue create mode 100644 src/views/water/lake/statistic/inner/component/comparison.vue create mode 100644 src/views/water/lake/statistic/inner/component/raw-colums.js create mode 100644 src/views/water/lake/statistic/inner/component/raw.vue create mode 100644 src/views/water/lake/statistic/inner/component/search.vue create mode 100644 src/views/water/lake/statistic/inner/index.vue diff --git a/src/views/water/lake/statistic/index.vue b/src/views/water/lake/statistic/index.vue index ccf33c2..3ef37cd 100644 --- a/src/views/water/lake/statistic/index.vue +++ b/src/views/water/lake/statistic/index.vue @@ -18,7 +18,7 @@ + + \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/component/avg-nutritional.vue b/src/views/water/lake/statistic/inner/component/avg-nutritional.vue new file mode 100644 index 0000000..2af7158 --- /dev/null +++ b/src/views/water/lake/statistic/inner/component/avg-nutritional.vue @@ -0,0 +1,148 @@ + + + + + + \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/component/com-nutritional.vue b/src/views/water/lake/statistic/inner/component/com-nutritional.vue new file mode 100644 index 0000000..3c0611e --- /dev/null +++ b/src/views/water/lake/statistic/inner/component/com-nutritional.vue @@ -0,0 +1,148 @@ + + + + + + \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/component/comparison.vue b/src/views/water/lake/statistic/inner/component/comparison.vue new file mode 100644 index 0000000..cd1c844 --- /dev/null +++ b/src/views/water/lake/statistic/inner/component/comparison.vue @@ -0,0 +1,169 @@ + + + + + + \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/component/raw-colums.js b/src/views/water/lake/statistic/inner/component/raw-colums.js new file mode 100644 index 0000000..c02d599 --- /dev/null +++ b/src/views/water/lake/statistic/inner/component/raw-colums.js @@ -0,0 +1,138 @@ +const innerFilterColumns = [ + {title: "pH值", dataIndex: "ph", sorter: true,}, + {title: "透明度(cm)", dataIndex: "transparency", sorter: true,}, + {title: "溶解氧饱和度(﹪)", dataIndex: "dissolvedOxygenSaturation", sorter: true,}, + {title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,}, + {title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true,}, + {title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true,}, + {title: "总氮 ", dataIndex: "totalNitrogen", sorter: true,}, + {title: "氨氮", dataIndex: "ammonia", sorter: true,}, + {title: "挥发酚", dataIndex: "volatilePhenol", sorter: true,}, + {title: "砷(mg/L)", dataIndex: "as", sorter: true,}, + {title: "汞 (mg/L)", dataIndex: "hg", sorter: true,}, + {title: "六价铬 (mg/L)", dataIndex: "cr6", sorter: true,}, + {title: "铅 (mg/L)", dataIndex: "pb", sorter: true,}, + {title: "镉 (mg/L)", dataIndex: "cd", sorter: true,}, + {title: "总磷", dataIndex: "totalPhosphorus", sorter: true,}, + {title: "石油类", dataIndex: "petro", sorter: true,}, + {title: "粪大肠菌群(MPN/L)", dataIndex: "fecalColiforms", sorter: true,}, + {title: "化学需氧量", dataIndex: "cod", sorter: true,}, + {title: "叶绿素a (mg/L)", dataIndex: "chlA", sorter: true,}, + {title: "阴离子表面活性剂(mg/L)", dataIndex: "anSaa", sorter: true,}, + {title: "硫化物(mg/L) ", dataIndex: "s", sorter: true,}, + {title: "氧化还原电位(mV)", dataIndex: "oxidationReductionPotential", sorter: true,} +] + +const innerTableColumns = [ + {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, + {title: "断面名称", dataIndex: "pointName", sorter: true,}, + {title: "水温(℃)", dataIndex: "waterTemperature", sorter: true,}, + {title: "pH值", dataIndex: "ph", sorter: true,}, + {title: "透明度(cm)", dataIndex: "transparency", sorter: true,}, + {title: "溶解氧饱和度(﹪)", dataIndex: "dissolvedOxygenSaturation", sorter: true,}, + {title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,}, + {title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true,}, + {title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true,}, + {title: "总氮 ", dataIndex: "totalNitrogen", sorter: true,}, + {title: "氨氮", dataIndex: "ammonia", sorter: true,}, + {title: "挥发酚", dataIndex: "volatilePhenol", sorter: true,}, + {title: "砷(mg/L)", dataIndex: "as", sorter: true,}, + {title: "汞 (mg/L)", dataIndex: "hg", sorter: true,}, + {title: "六价铬 (mg/L)", dataIndex: "cr6", sorter: true,}, + {title: "铅 (mg/L)", dataIndex: "pb", sorter: true,}, + {title: "镉 (mg/L)", dataIndex: "cd", sorter: true,}, + {title: "总磷", dataIndex: "totalPhosphorus", sorter: true,}, + {title: "石油类", dataIndex: "petro", sorter: true,}, + {title: "粪大肠菌群(MPN/L)", dataIndex: "fecalColiforms", sorter: true,}, + {title: "化学需氧量", dataIndex: "cod", sorter: true,}, + {title: "叶绿素a (mg/L)", dataIndex: "chlA", sorter: true,}, + {title: "阴离子表面活性剂(mg/L)", dataIndex: "anSaa", sorter: true,}, + {title: "硫化物(mg/L) ", dataIndex: "s", sorter: true,}, + {title: "氧化还原电位(mV)", dataIndex: "oxidationReductionPotential", sorter: true,} + // {title: "备注", dataIndex: "remark", sorter: true,}, +]; + +const averageTableColumns = [ + {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, + {title: "断面名称", dataIndex: "pointName", sorter: true,}, + {title: "水温(℃)", dataIndex: "waterTemperature", sorter: true,}, + {title: "pH值", dataIndex: "ph", sorter: true,}, + {title: "透明度(cm)", dataIndex: "transparency", sorter: true,}, + {title: "溶解氧饱和度(﹪)", dataIndex: "dissolvedOxygenSaturation", sorter: true,}, + {title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,}, + {title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true,}, + {title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true,}, + {title: "总氮 ", dataIndex: "totalNitrogen", sorter: true,}, + {title: "氨氮", dataIndex: "ammonia", sorter: true,}, + {title: "挥发酚", dataIndex: "volatilePhenol", sorter: true,}, + {title: "砷(mg/L)", dataIndex: "as", sorter: true,}, + {title: "汞 (mg/L)", dataIndex: "hg", sorter: true,}, + {title: "六价铬 (mg/L)", dataIndex: "cr6", sorter: true,}, + {title: "铅 (mg/L)", dataIndex: "pb", sorter: true,}, + {title: "镉 (mg/L)", dataIndex: "cd", sorter: true,}, + {title: "总磷", dataIndex: "totalPhosphorus", sorter: true,}, + {title: "石油类", dataIndex: "petro", sorter: true,}, + {title: "粪大肠菌群(MPN/L)", dataIndex: "fecalColiforms", sorter: true,}, + {title: "化学需氧量", dataIndex: "cod", sorter: true,}, + {title: "叶绿素a (mg/L)", dataIndex: "chlA", sorter: true,}, + {title: "阴离子表面活性剂(mg/L)", dataIndex: "anSaa", sorter: true,}, + {title: "硫化物(mg/L) ", dataIndex: "s", sorter: true,}, + {title: "氧化还原电位(mV)", dataIndex: "oxidationReductionPotential", sorter: true,} +]; + + +const specialFilterColumns = [ + {title: "浊度(NTU)", dataIndex: "turbidity", sorter: true,}, + {title: "水温(℃)", dataIndex: "wTemp", sorter: true,}, + {title: "水位(m)", dataIndex: "wd", sorter: true,}, + {title: "pH值", dataIndex: "ph", sorter: true,}, + {title: "电导率(ms/m)", dataIndex: "wCond", sorter: true,}, + {title: "透明度(cm)", dataIndex: "transp", sorter: true,}, + {title: "溶解氧 (mg/L)", dataIndex: "dissolvedOxygen", sorter: true,}, + {title: "高锰酸盐指数 (mg/L)", dataIndex: "codmn", sorter: true,}, + {title: "氨氮 (mg/L)", dataIndex: "nh4N", sorter: true,}, + {title: "石油类 (mg/L)", dataIndex: "oils", sorter: true,}, + {title: "总氮 (mg/L)", dataIndex: "nTotal", sorter: true,}, + {title: "总磷 (mg/L)", dataIndex: "pTotal", sorter: true,}, + {title: "叶绿素 (mg/L)", dataIndex: "chlA", sorter: true,}, + {title: "挥发酚 (mg/L)", dataIndex: "vPhen", sorter: true,}, + {title: "汞 (mg/L)", dataIndex: "wHg", sorter: true,}, + {title: "铅 (mg/L)", dataIndex: "wPb", sorter: true,}, + {title: "化学需氧量 (mg/L)", dataIndex: "codcr", sorter: true,}, + {title: "铜 (mg/L)", dataIndex: "wCu", sorter: true,}, + {title: "锌 (mg/L)", dataIndex: "wZn", sorter: true,}, + {title: "氟化物 (mg/L)", dataIndex: "f", sorter: true,}, + {title: "硒 (mg/L)", dataIndex: "se", sorter: true,}, + {title: "砷 (mg/L)", dataIndex: "as", sorter: true,}, + {title: "镉 (mg/L)", dataIndex: "cd", sorter: true,}, + {title: "六价铬 (mg/L)", dataIndex: "cr6", sorter: true,}, + {title: "氰化物 (mg/L)", dataIndex: "cnTotal", sorter: true,}, + {title: "阴离子表面活性剂 (mg/L)", dataIndex: "anSaa", sorter: true,}, + {title: "硫化物 (mg/L)", dataIndex: "s", sorter: true,}, + {title: "粪大肠菌群 (mg/L)", dataIndex: "coloOrg", sorter: true,}, + {title: "硫酸盐 (mg/L)", dataIndex: "so4", sorter: true,}, + {title: "氯化物 (mg/L)", dataIndex: "cl", sorter: true,}, + {title: "硝酸盐 (mg/L)", dataIndex: "no3N", sorter: true,}, + {title: "铁 (mg/L)", dataIndex: "wFe", sorter: true,}, + {title: "锰 (mg/L)", dataIndex: "wMn", sorter: true,} +] + +const specialTableColumns = [ + {title: "监测时间", dataIndex: "monitorTime", sorter: true,}, + {title: "测站名称", dataIndex: "stationName", sorter: true,}, + {title: "测站代码", dataIndex: "stationCode", sorter: true,}, + {title: "湖库名称", dataIndex: "lakeLibraryName", sorter: true,}, + {title: "湖库代码", dataIndex: "lakeLibraryCode", sorter: true,}, + {title: "断面名称", dataIndex: "sectionName", sorter: true,}, + {title: "断面代码", dataIndex: "sectionCode", sorter: true,}, + {title: "控制属性", dataIndex: "controlAttributes", sorter: true,}, + {title: "所属流域", dataIndex: "watershed", sorter: true,}, + {title: "水期代码", dataIndex: "waterPeriodCode", sorter: true,}, + + ...specialFilterColumns, + + {title: "水质类别", dataIndex: "waterQualityCategory", sorter: true,}, + {title: "系统编码", dataIndex: "systemCode", sorter: true,}, + {title: "备注", dataIndex: "remark", sorter: true,}, +]; +export {innerTableColumns, specialTableColumns, innerFilterColumns, specialFilterColumns, averageTableColumns} diff --git a/src/views/water/lake/statistic/inner/component/raw.vue b/src/views/water/lake/statistic/inner/component/raw.vue new file mode 100644 index 0000000..469faf0 --- /dev/null +++ b/src/views/water/lake/statistic/inner/component/raw.vue @@ -0,0 +1,167 @@ + + + + + + \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/component/search.vue b/src/views/water/lake/statistic/inner/component/search.vue new file mode 100644 index 0000000..79ff569 --- /dev/null +++ b/src/views/water/lake/statistic/inner/component/search.vue @@ -0,0 +1,277 @@ + + + + + \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/index.vue b/src/views/water/lake/statistic/inner/index.vue new file mode 100644 index 0000000..c256908 --- /dev/null +++ b/src/views/water/lake/statistic/inner/index.vue @@ -0,0 +1,65 @@ + + + + + \ No newline at end of file From 23d63cb7f4cfc78f93568d7f77ac18357e6e6f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=9E=97?= Date: Wed, 8 Dec 2021 10:43:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=9F=8E=E5=B8=82=E5=86=85=E6=B9=96?= =?UTF-8?q?=E5=89=8D3=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/ecology/new-lake.js | 38 ++++++++++ .../statistic/inner/component/average.vue | 70 +++++++++---------- .../inner/component/avg-nutritional.vue | 68 ++++++++---------- .../inner/component/com-nutritional.vue | 68 +++++++++--------- .../statistic/inner/component/comparison.vue | 64 ++++++++--------- .../lake/statistic/inner/component/raw.vue | 68 +++++++++--------- .../lake/statistic/inner/component/search.vue | 62 +++++++++++++--- .../water/lake/statistic/inner/index.vue | 4 +- 9 files changed, 252 insertions(+), 192 deletions(-) create mode 100644 src/api/ecology/new-lake.js diff --git a/.env.development b/.env.development index 31b1eb7..a6d0c96 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -VUE_APP_API_BASE_URL=http://localhost:10001/api +VUE_APP_API_BASE_URL=http://101.132.173.65:10001/api diff --git a/src/api/ecology/new-lake.js b/src/api/ecology/new-lake.js new file mode 100644 index 0000000..2fa9711 --- /dev/null +++ b/src/api/ecology/new-lake.js @@ -0,0 +1,38 @@ +import axios from 'axios'; + +// 湖库断面,区域 +export const getLakeDropdown = function () { + return axios.get(`/lakeLibrary/lakeCityDict/list`) +} + +// 湖库水质分析城市内湖原始数据接口 +export const cityOriginalUrl = '/lakeLibrary/wateAnalysis/city/originalData' +export const cityOriginalData = function (data) { + return axios.post(cityOriginalUrl,data) +} + +//城市内湖综合营养指数接口 +export const cityComprehensiveNutritionUrl = '/lakeLibrary/wateAnalysis/city/comprehensiveNutrition'; +export const cityComprehensiveNutritionData = function (data) { + return axios.post(cityComprehensiveNutritionUrl,data) +} + + +// 城市内湖平均数据接口 +export const cityAverageUrl = '/lakeLibrary/wateAnalysis/city/average'; +export const cityAverageData = function (data) { + return axios.post(cityAverageUrl,data) +} + + +// 城市内湖平均营养指数接口 +export const cityAverageNutritionUrl = '/lakeLibrary/wateAnalysis/city/averageNutrition'; +export const cityAverageNutrition = function (data) { + return axios.post(cityAverageNutritionUrl,data) +} + +// 城市内湖平均营养指数接口 +export const cityYearContrastUrl = '/lakeLibrary/wateAnalysis/city/yearContrast'; +export const cityYearContrastData = function (data) { + return axios.post(cityYearContrastUrl,data) +} \ No newline at end of file diff --git a/src/views/water/lake/statistic/inner/component/average.vue b/src/views/water/lake/statistic/inner/component/average.vue index c6b2956..c8c5e81 100644 --- a/src/views/water/lake/statistic/inner/component/average.vue +++ b/src/views/water/lake/statistic/inner/component/average.vue @@ -3,13 +3,13 @@
- + import XLSX from "xlsx"; -import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake"; +// import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake"; +import {cityAverageData} from "@/api/ecology/new-lake"; import locale from "ant-design-vue/es/date-picker/locale/zh_CN"; import Search from './search.vue'; import {averageTableColumns} from "./raw-colums" @@ -45,6 +46,9 @@ export default { default: function () { return [] }, + }, + visiable:{ + typeof:Boolean } }, data() { @@ -53,7 +57,7 @@ export default { locale, bill: {}, // 表格数据接口 - url: pageLakeUrl, + datasource:[], selection: [], // 表格列配置 columns: averageTableColumns, @@ -63,10 +67,10 @@ export default { where:{}, // 表格选中数据 selectionList: [], + loading: false }; }, mounted() { - // this.loadOptionData(); }, watch: { filterKeys(newKeys) { @@ -74,7 +78,24 @@ export default { }, }, methods: { - // 传上父级 + + // 获取列表数据 + getPageData(){ + this.loading = true; + cityAverageData(this.where).then(res=>{ + this.loading = false; + if(res.data.code){ + this.$message.error(res.data.msg); + this.datasource = [] + }else{ + this.datasource = res.data.data + } + }).catch(()=>{ + this.loading = false; + }) + }, + + // 传上父级 changeFilter(data){ this.$emit('changeFilter',data) }, @@ -105,39 +126,12 @@ export default { this.reload(); }, - /**获取下来框数据 */ - loadOptionData() { - getColumnOptions("place").then((res) => { - this.palceOptions = res.data.data.map((item) => { - return { - label: item, - value: item, - }; - }); - }); - getColumnOptions("area").then((res) => { - this.areaOptions = res.data.data.map((item) => { - return { - label: item, - value: item, - }; - }); - }); - getColumnOptions("region_level").then((res) => { - this.regionLevelOptions = res.data.data.map((item) => { - return { - label: item, - value: item, - }; - }); - }); - }, /* 刷新表格 */ reload() { - - this.$refs.table.reload({ - where: this.where, - }); + this.getPageData() + // this.$refs.table.reload({ + // where: this.where, + // }); }, /* 重置搜索 */ reset() { 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 2af7158..b6f12a3 100644 --- a/src/views/water/lake/statistic/inner/component/avg-nutritional.vue +++ b/src/views/water/lake/statistic/inner/component/avg-nutritional.vue @@ -3,15 +3,15 @@
- + @@ -23,7 +23,8 @@