饮用水监测数据报送表

This commit is contained in:
庞东林
2021-12-08 14:08:53 +08:00
parent bedb854224
commit e72f3d6109
7 changed files with 181 additions and 62 deletions

View File

@@ -4,6 +4,10 @@ import axios from 'axios';
// 市级监测数据报送表 // 市级监测数据报送表
export const pageBsaeListUrl = '/drinkingWater/drinkingWater/AnalysePage'; export const pageBsaeListUrl = '/drinkingWater/drinkingWater/AnalysePage';
export const analysePageData = function (data) {
return axios.post(pageBsaeListUrl,data)
}
//市级—报送情况说明表 //市级—报送情况说明表
export const pageDescListUrl = '/drinkingWater/drinkingWater/getDescripForm'; export const pageDescListUrl = '/drinkingWater/drinkingWater/getDescripForm';
//市级—取水量统计 //市级—取水量统计

View File

@@ -9,13 +9,15 @@
@search="searchData" @search="searchData"
@exportFile="exportFile" @exportFile="exportFile"
@filterColumns="changeFilter" @filterColumns="changeFilter"
:visiable="visiable"
:loading="loading"
/> />
<!-- 表格 --> <!-- 表格 -->
<ele-pro-table <ele-pro-table
v-model:selection="selectionList" v-model:selection="selectionList"
ref="table" ref="table"
row-key="drinkingWaterId" row-key="drinkingWaterId"
:datasource="url" :datasource="datasource"
:columns="columns" :columns="columns"
:where="where" :where="where"
:scroll="{ x: 'max-content' }" :scroll="{ x: 'max-content' }"
@@ -54,7 +56,7 @@
<script> <script>
import XLSX from "xlsx"; import XLSX from "xlsx";
import { import {
pageBsaeListUrl analysePageData
} from "@/api/ecology/new-drinking-water"; } from "@/api/ecology/new-drinking-water";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN"; import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
import { tableColumns } from "./../colums/base"; import { tableColumns } from "./../colums/base";
@@ -79,6 +81,9 @@ export default {
return []; return [];
}, },
}, },
visiable:{
typeof:Boolean
}
}, },
data() { data() {
return { return {
@@ -86,7 +91,7 @@ export default {
locale, locale,
bill: {}, bill: {},
// 表格数据接口 // 表格数据接口
url: pageBsaeListUrl, datasource: [],
selection: [], selection: [],
columns: [...tableColumns], columns: [...tableColumns],
@@ -94,10 +99,11 @@ export default {
regionLevelOptions: [], regionLevelOptions: [],
// 表格搜索条件 // 表格搜索条件
where: { where: {
checked: 1,
}, },
// 表格选中数据 // 表格选中数据
selectionList: [], selectionList: [],
loading:false
}; };
}, },
watch: { watch: {
@@ -109,6 +115,23 @@ export default {
// this.loadOptionData(); // this.loadOptionData();
}, },
methods: { methods: {
// 获取列表数据
getPageData(){
this.loading = true;
analysePageData(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;
})
},
JumpFieldClick(record, column) { JumpFieldClick(record, column) {
console.log(column.dataIndex); console.log(column.dataIndex);
}, },
@@ -145,9 +168,10 @@ export default {
}, },
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.$refs.table.reload({ this.getPageData()
where: this.where, // this.$refs.table.reload({
}); // where: this.where,
// });
}, },
/* 重置搜索 */ /* 重置搜索 */
reset() { reset() {

View File

@@ -0,0 +1,91 @@
<template>
<div>
<a-tabs v-model:activeKey="activeCity">
<a-tab-pane tab="监测数据报送表" key="city" >
<base-statistic :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='city'"></base-statistic>
</a-tab-pane>
<a-tab-pane tab="报送情况说明表" key="base1">
<city-appraise :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base1'"></city-appraise>
</a-tab-pane>
<a-tab-pane tab="取水量统计" key="base3">
<city-water-withdrawal :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base3'"></city-water-withdrawal>
</a-tab-pane>
<a-tab-pane tab="超标评价" key="base4">
<city-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base4'"></city-over-standard>
</a-tab-pane>
<a-tab-pane tab="水质类别" key="base2" :visiable="activeCity=='base2'">
<city-water-quality></city-water-quality>
</a-tab-pane>
<a-tab-pane tab="达标率" key="base6" :visiable="activeCity=='base6'">
<city-month-standard></city-month-standard>
</a-tab-pane>
<a-tab-pane tab="综合指数" key="base5" :visiable="activeCity=='base5'">
<city-avg-index></city-avg-index>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script>
/**
*
*
*
*/
//市级监测数据报表
import BaseStatistic from "./base.vue"
// 报送情况说明
import cityAppraise from "./situation.vue"
// 取水量
import cityWaterWithdrawal from "../city/waterCount.vue"
// 超标评价
import cityOverStandard from '../city/overStandard.vue'
import cityWaterQuality from "../cityWaterQuality.vue"
import cityAvgIndex from "../city-avg-index.vue"
import cityMonthStandard from "../city-base-standard.vue"
export default {
name: 'city-com',
components: {
BaseStatistic,
cityAppraise,
cityWaterQuality,
cityAvgIndex,
cityMonthStandard,
cityWaterWithdrawal,
cityOverStandard
},
data() {
return {
activeCity:'city',
searchForm:{
checked: 1,
page:1,
limit:10,
drinkingWaterAnalyse:{
regionLevel:"市级"
},
},
filterKeys:[]
};
},
methods: {
changeSearch(data){
this.searchForm = data
},
changeFilter(data){
this.filterKeys = data
}
}
}
</script>

View File

@@ -9,6 +9,8 @@
@search="searchData" @search="searchData"
@exportFile="exportFile" @exportFile="exportFile"
@filterColumns="changeFilter" @filterColumns="changeFilter"
:visiable="visiable"
:loading="loading"
/> />
<!-- 表格 --> <!-- 表格 -->
<!-- <ele-pro-table <!-- <ele-pro-table
@@ -100,7 +102,10 @@ export default {
default: function () { default: function () {
return [] return []
}, },
} },
visiable:{
typeof:Boolean
}
}, },
data() { data() {
@@ -155,6 +160,7 @@ export default {
}, },
// 表格选中数据 // 表格选中数据
selectionList: [], selectionList: [],
loading:false
}; };
}, },
mounted() { mounted() {
@@ -163,6 +169,22 @@ export default {
}, },
methods: { methods: {
// // 获取列表数据
// getPageData(){
// this.loading = true;
// cityAverageNutrition(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;
// })
// },
//编辑单元格 //编辑单元格
edit(item,index){ edit(item,index){
console.log('key',item.drinkingWaterId) console.log('key',item.drinkingWaterId)

View File

@@ -127,6 +127,9 @@ export default {
default: function () { default: function () {
return []; return [];
}, },
},
visiable:{
typeof:Boolean
} }
}, },
data() { data() {
@@ -164,9 +167,25 @@ export default {
this.checkAll = true this.checkAll = true
this.indeterminate = false this.indeterminate = false
} }
},
// 监听组件显示
visiable(val){
console.log('change',val)
this.emitData(val)
} }
}, },
created(){
listInfo().then((res) => {
if (res.data.code == 0) {
this.visibleWater = true;
this.sectionInfo = res.data.data
} else {
this.$message.error(res.data.msg);
}
})
},
mounted() { mounted() {
this.where = this.searchForm; this.where = this.searchForm;
this.filter = filterColumns.map((item) => item.dataIndex); this.filter = filterColumns.map((item) => item.dataIndex);
@@ -176,18 +195,18 @@ export default {
// this.$emit("buildColumns", filterColumns); // this.$emit("buildColumns", filterColumns);
this.initFilter(this.filterKeys); this.initFilter(this.filterKeys);
this.emitData(true)
listInfo().then((res) => {
if (res.data.code == 0) {
this.visibleWater = true;
this.sectionInfo = res.data.data
} else {
this.$message.error(res.data.msg);
}
})
}, },
methods: { methods: {
emitData(val){
// if(val && this.where.startTime && this.where.endTime){
if(val){
this.$emit("search", this.where);
}
},
// 初始化选择 // 初始化选择
initFilter(newKeys){ initFilter(newKeys){
let filterIndex =this.filterColumns.map(item=>(item.dataIndex)) let filterIndex =this.filterColumns.map(item=>(item.dataIndex))

View File

@@ -3,31 +3,7 @@
<a-card :bordered="false"> <a-card :bordered="false">
<a-tabs v-model:activeKey="activeKey"> <a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="city" tab="市级"> <a-tab-pane key="city" tab="市级">
<a-tabs v-model:active="activeCity"> <City />
<a-tab-pane tab="监测数据报送表" key="city" >
<base-statistic :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></base-statistic>
</a-tab-pane>
<a-tab-pane tab="报送情况说明表" key="base1">
<city-appraise :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></city-appraise>
</a-tab-pane>
<a-tab-pane tab="取水量统计" key="base3">
<city-water-withdrawal :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></city-water-withdrawal>
</a-tab-pane>
<a-tab-pane tab="超标评价" key="base4">
<city-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></city-over-standard>
</a-tab-pane>
<a-tab-pane tab="水质类别" key="base2">
<city-water-quality></city-water-quality>
</a-tab-pane>
<a-tab-pane tab="达标率" key="base6">
<city-month-standard></city-month-standard>
</a-tab-pane>
<a-tab-pane tab="综合指数" key="base5">
<city-avg-index></city-avg-index>
</a-tab-pane>
</a-tabs>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="county" tab="县级"> <a-tab-pane key="county" tab="县级">
@@ -78,65 +54,48 @@
</template> </template>
<script> <script>
import City from './city/index.vue'
/** /**
* *
* *
* *
*/ */
//市级监测数据报表
// import BaseStatistic from "./cityDate.vue"
import BaseStatistic from "./city/base.vue"
//县级监测数据报表 //县级监测数据报表
// import countyData from "./countyData.vue" // import countyData from "./countyData.vue"
import countyData from "./county/base.vue" import countyData from "./county/base.vue"
import village from "./villageData.vue" import village from "./villageData.vue"
// import cityAppraise from "./cityAppraise.vue"
import cityAppraise from "./city/situation.vue"
import countyAppraise from "./countyAppraise.vue" import countyAppraise from "./countyAppraise.vue"
import villageAppraise from "./villageAppraise.vue" import villageAppraise from "./villageAppraise.vue"
import cityWaterQuality from "./cityWaterQuality.vue"
import countyWaterQuality from "./countyWaterQuality.vue" import countyWaterQuality from "./countyWaterQuality.vue"
import villageWaterQuality from "./villageWaterQuality.vue" import villageWaterQuality from "./villageWaterQuality.vue"
import cityAvgIndex from "./city-avg-index.vue"
import countyAvgIndex from "./county-avg-index.vue" import countyAvgIndex from "./county-avg-index.vue"
import villageAvgIndex from "./village-avg-index.vue" import villageAvgIndex from "./village-avg-index.vue"
import cityMonthStandard from "./city-base-standard.vue"
import countyMonthStandard from "./county-base-standard.vue" import countyMonthStandard from "./county-base-standard.vue"
import villageMonthStandard from "./village-base-standard.vue" import villageMonthStandard from "./village-base-standard.vue"
import cityWaterWithdrawal from "./city/waterCount.vue"
import countyWaterWithdrawal from "./countyWaterWithdrawal.vue" import countyWaterWithdrawal from "./countyWaterWithdrawal.vue"
import cityOverStandard from './city/overStandard.vue'
// import QuarterStatistic from "./quarter.vue";
// import Compare from "./compare.vue"
// import AverageStatistic from "./average.vue"
export default { export default {
name: 'DrinkWaterCollectIndex', name: 'DrinkWaterCollectIndex',
components: { components: {
BaseStatistic, City,
countyData, countyData,
village, village,
cityAppraise,
countyAppraise, countyAppraise,
villageAppraise, villageAppraise,
cityWaterQuality,
countyWaterQuality, countyWaterQuality,
villageWaterQuality, villageWaterQuality,
cityAvgIndex,
countyAvgIndex, countyAvgIndex,
villageAvgIndex, villageAvgIndex,
cityMonthStandard,
countyMonthStandard, countyMonthStandard,
villageMonthStandard, villageMonthStandard,
cityWaterWithdrawal,
countyWaterWithdrawal, countyWaterWithdrawal,
cityOverStandard
}, },
data() { data() {
return { return {