diff --git a/src/api/ecology/new-drinking-water.js b/src/api/ecology/new-drinking-water.js index b50e605..41bad3f 100644 --- a/src/api/ecology/new-drinking-water.js +++ b/src/api/ecology/new-drinking-water.js @@ -89,7 +89,7 @@ export const countyDescripFormData = function (data) { } //县级—超标评价 -export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/getCompositeNutritionIndex'; +export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/getWaterEvaluate'; export const countyOverStandardCount = function (data) { return axios.post(countyOverStandardtUrl,data) } @@ -135,4 +135,12 @@ export const villageWaterQualityUpData = function (data) { export const villageOverStandardtUrl = '/drinkingWaterVillage/drinkingWaterVillage/getWaterVillageEvaluate'; export const villageOverStandardCount = function (data) { return axios.post(villageOverStandardtUrl,data) -} \ No newline at end of file +} + + +// /api/waterFunctionArea/drinkingWaterEvaluationStandard + +export const filterList = function (data) { + return axios.post('/waterFunctionArea/drinkingWaterEvaluationStandard',data) +} + diff --git a/src/views/water/drinking-water/statistic/city/base.vue b/src/views/water/drinking-water/statistic/city/base.vue index 44dd5e6..ec22536 100644 --- a/src/views/water/drinking-water/statistic/city/base.vue +++ b/src/views/water/drinking-water/statistic/city/base.vue @@ -11,6 +11,7 @@ @filterColumns="changeFilter" :visiable="visiable" :loading="loading" + :loadSearch="true" />
-
- +
+
{{ text || ' ' }} - +
@@ -131,10 +131,10 @@ export default { {title:"县城",dataIndex:"county",slots:{customRender:'county'}}, {title:"水源地名称",dataIndex:"sourceWaterName",}, {title:"类型",dataIndex:"waterSourceProperty",}, - {title:"监测时间",dataIndex:"reportTime"}, + {title:"监测时间",dataIndex:"monitorTime"}, // {title:"监测时间",dataIndex:"reportTime",customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")}, - {title:"应当监测项目个数",dataIndex:'index1'}, - {title:"未测个数",dataIndex:"index2",}, + {title:"应当监测项目个数",dataIndex:'index1', }, + {title:"未测个数",dataIndex:"noCheckNum",}, {title:"独立分析项目个数",dataIndex:"index3", slots: { customRender: 'enumber', @@ -143,8 +143,8 @@ export default { {title:"外送分析项目个数",dataIndex:"index4", slots: { customRender: 'wnumber', },}, - {title:"超标项目",dataIndex:"index5",}, - {title:"情况说明或原因",dataIndex:"index6", slots: { + {title:"超标项目",dataIndex:"exceedingStandard",}, + {title:"情况说明或原因",dataIndex:"reason", slots: { customRender: 'desc', }}, {title:"备注",dataIndex:"remark",slots: { diff --git a/src/views/water/drinking-water/statistic/components/citySearch.vue b/src/views/water/drinking-water/statistic/components/citySearch.vue index 1df666d..2b04583 100644 --- a/src/views/water/drinking-water/statistic/components/citySearch.vue +++ b/src/views/water/drinking-water/statistic/components/citySearch.vue @@ -130,6 +130,9 @@ export default { }, visiable:{ typeof:Boolean + }, + loadSearch:{ + typeof:Boolean } }, data() { @@ -199,7 +202,8 @@ export default { // 根据父级传回来需要去掉勾的值映射到复选框 this.initFilter(this.filterKeys); // 将父级回传的搜索条件上传父级进行页面搜索 - this.emitData(true) + let isSearch = (this.where.monitorStartTime && this.where.monitorEndTime) || this.loadSearch; + this.emitData(isSearch) }, methods: { @@ -246,7 +250,9 @@ export default { }, searchData() { if(Array.isArray(this.filter) && this.filter.length){ - this.where.filter = [...this.filter] + this.where.filter = this.changeKeyToName([...this.filter]) + }else{ + delete this.where.filter; } const sectionNames = this.where.sectionNames if(sectionNames && Array.isArray(sectionNames) && !sectionNames.length){ @@ -254,6 +260,17 @@ export default { } this.$emit("search", this.where); }, + + // 将key转文字 + changeKeyToName(keys){ + const targetNames = filterColumns.map(item=>{ + if(keys.indexOf(item.dataIndex)>-1){ + return item.title + } + }) + return targetNames; + }, + exportFile() { this.$emit("exportFile"); }, diff --git a/src/views/water/drinking-water/statistic/components/countySearch.vue b/src/views/water/drinking-water/statistic/components/countySearch.vue index 766b71d..f6bb3e4 100644 --- a/src/views/water/drinking-water/statistic/components/countySearch.vue +++ b/src/views/water/drinking-water/statistic/components/countySearch.vue @@ -130,6 +130,9 @@ export default { }, visiable:{ typeof:Boolean + }, + loadSearch:{ + typeof:Boolean } }, data() { @@ -199,7 +202,8 @@ export default { // 根据父级传回来需要去掉勾的值映射到复选框 this.initFilter(this.filterKeys); // 将父级回传的搜索条件上传父级进行页面搜索 - this.emitData(true) + let isSearch = (this.where.monitorStartTime && this.where.monitorEndTime) || this.loadSearch; + this.emitData(isSearch) }, methods: { @@ -246,10 +250,22 @@ export default { }, searchData() { if(Array.isArray(this.filter) && this.filter.length){ - this.where.filter = [...this.filter] + this.where.filter = this.changeKeyToName([...this.filter]) + }else{ + delete this.where.filter; } this.$emit("search", this.where); }, + // 将key转文字 + changeKeyToName(keys){ + const targetNames = filterColumns.map(item=>{ + if(keys.indexOf(item.dataIndex)>-1){ + return item.title + } + }) + return targetNames; + }, + exportFile() { this.$emit("exportFile"); }, diff --git a/src/views/water/drinking-water/statistic/components/countySideSeatch.vue b/src/views/water/drinking-water/statistic/components/countySideSeatch.vue index 25beed7..54838f8 100644 --- a/src/views/water/drinking-water/statistic/components/countySideSeatch.vue +++ b/src/views/water/drinking-water/statistic/components/countySideSeatch.vue @@ -130,6 +130,9 @@ export default { }, visiable:{ typeof:Boolean + }, + loadSearch:{ + typeof:Boolean } }, data() { @@ -199,7 +202,8 @@ export default { // 根据父级传回来需要去掉勾的值映射到复选框 this.initFilter(this.filterKeys); // 将父级回传的搜索条件上传父级进行页面搜索 - this.emitData(true) + let isSearch = (this.where.monitorStartTime && this.where.monitorEndTime) || this.loadSearch; + this.emitData(isSearch) }, methods: { @@ -246,9 +250,20 @@ export default { }, searchData() { if(Array.isArray(this.filter) && this.filter.length){ - this.where.filter = [...this.filter] + this.where.filter = this.changeKeyToName([...this.filter]) + }else{ + delete this.where.filter; } this.$emit("search", this.where); + }, + // 将key转文字 + changeKeyToName(keys){ + const targetNames = filterColumns.map(item=>{ + if(keys.indexOf(item.dataIndex)>-1){ + return item.title + } + }) + return targetNames; }, exportFile() { this.$emit("exportFile"); diff --git a/src/views/water/drinking-water/statistic/county/situation.vue b/src/views/water/drinking-water/statistic/county/situation.vue index ab0a9a5..56f35af 100644 --- a/src/views/water/drinking-water/statistic/county/situation.vue +++ b/src/views/water/drinking-water/statistic/county/situation.vue @@ -132,10 +132,10 @@ export default { {title:"县城",dataIndex:"county",slots:{customRender:'county'}}, {title:"水源地名称",dataIndex:"sourceWaterName",}, {title:"类型",dataIndex:"waterSourceProperty",}, - {title:"监测时间",dataIndex:"reportTime"}, + {title:"监测时间",dataIndex:"monitorTime"}, // {title:"监测时间",dataIndex:"reportTime",customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")}, - {title:"应当监测项目个数",dataIndex:'index1'}, - {title:"未测个数",dataIndex:"index2",}, + {title:"应当监测项目个数",dataIndex:'index1', }, + {title:"未测个数",dataIndex:"noCheckNum",}, {title:"独立分析项目个数",dataIndex:"index3", slots: { customRender: 'enumber', @@ -144,8 +144,8 @@ export default { {title:"外送分析项目个数",dataIndex:"index4", slots: { customRender: 'wnumber', },}, - {title:"超标项目",dataIndex:"index5",}, - {title:"情况说明或原因",dataIndex:"index6", slots: { + {title:"超标项目",dataIndex:"exceedingStandard",}, + {title:"情况说明或原因",dataIndex:"reason", slots: { customRender: 'desc', }}, {title:"备注",dataIndex:"remark",slots: {