Merge branch 'yinyongshui'
This commit is contained in:
83
src/api/ecology/new-drinking-water.js
Normal file
83
src/api/ecology/new-drinking-water.js
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
|
||||
// 市级监测数据报送表
|
||||
export const pageBsaeListUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const analysePageData = function (data) {
|
||||
return axios.post(pageBsaeListUrl,data)
|
||||
}
|
||||
|
||||
//市级—报送情况说明表
|
||||
export const pageDescListUrl = '/drinkingWater/drinkingWater/getDescripForm';
|
||||
export const getDescripForm = function (data) {
|
||||
return axios.post(pageDescListUrl,data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//市级—取水量统计
|
||||
export const pageanalyseListUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const getWaterCount = function (data) {
|
||||
return axios.post(pageanalyseListUrl,data)
|
||||
}
|
||||
|
||||
//市级—超标评价
|
||||
export const overStandardtUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const overStandardCount = function (data) {
|
||||
return axios.post(overStandardtUrl,data)
|
||||
}
|
||||
|
||||
|
||||
//市级—水质类别
|
||||
export const waterQualityUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const waterQualityData = function (data) {
|
||||
return axios.post(waterQualityUrl,data)
|
||||
}
|
||||
|
||||
//市级—水质统计
|
||||
export const waterQualityCountUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const waterQualityCountData = function (data) {
|
||||
return axios.post(waterQualityCountUrl,data)
|
||||
}
|
||||
|
||||
//市级—水质达标情况
|
||||
export const waterQualityUpUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const waterQualityUpData = function (data) {
|
||||
return axios.post(waterQualityUpUrl,data)
|
||||
}
|
||||
|
||||
//市级—备用水源营养指数
|
||||
export const waterNutritionalUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const waterNutritionalData = function (data) {
|
||||
return axios.post(waterNutritionalUrl,data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 县级
|
||||
//监测数据报送表
|
||||
export const countyPageBsaeListUrl = '/drinkingWater/drinkingWater/CountyAnalysePage';
|
||||
export const countyPageBsaeData = function (data) {
|
||||
return axios.post(countyPageBsaeListUrl,data)
|
||||
}
|
||||
|
||||
//报送情况说明表
|
||||
export const countyDescripFormUrl = '/drinkingWater/drinkingWater/getCountyDescripForm';
|
||||
export const countyDescripFormData = function (data) {
|
||||
return axios.post(countyDescripFormUrl,data)
|
||||
}
|
||||
|
||||
//县级—超标评价
|
||||
export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||
export const countyOverStandardCount = function (data) {
|
||||
return axios.post(countyOverStandardtUrl,data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 农村
|
||||
export const villageAnalysePageUrl = '/drinkingWaterVillage/drinkingWaterVillage/VillageAnalysePage';
|
||||
export const villageAnalysePageData = function (data) {
|
||||
return axios.post(villageAnalysePageUrl,data)
|
||||
}
|
||||
215
src/views/water/drinking-water/statistic/city/base.vue
Normal file
215
src/views/water/drinking-water/statistic/city/base.vue
Normal file
@@ -0,0 +1,215 @@
|
||||
<!--市级 检测数据报送表-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
饮用水源水质监测累积月份统计样品数:{{count}}个
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #waterCode="{ text, record }">
|
||||
<span>
|
||||
{{
|
||||
record.reportTime == null
|
||||
? (text = "")
|
||||
: record.reportTime.substr(5, 2) == "01" ||
|
||||
record.reportTime.substr(5, 2) == "02" ||
|
||||
record.reportTime.substr(5, 2) == "03" ||
|
||||
record.reportTime.substr(5, 2) == "12"
|
||||
? (text = "K")
|
||||
: record.reportTime.substr(5, 2) == "04" ||
|
||||
record.reportTime.substr(5, 2) == "05" ||
|
||||
record.reportTime.substr(5, 2) == "10" ||
|
||||
record.reportTime.substr(5, 2) == "11"
|
||||
? (text = "P")
|
||||
: record.reportTime.substr(5, 2) == "06" ||
|
||||
record.reportTime.substr(5, 2) == "07" ||
|
||||
record.reportTime.substr(5, 2) == "08" ||
|
||||
record.reportTime.substr(5, 2) == "09"
|
||||
? (text = "F")
|
||||
: (text = "无采样时间")
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
analysePageData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { tableColumns } from "./../colums/base";
|
||||
import Search from "./../components/citySearch.vue";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search,
|
||||
},
|
||||
props: {
|
||||
// 表格搜索条件
|
||||
searchForm: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
filterKeys: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
count:0, //样品数
|
||||
current:0,
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource: [],
|
||||
selection: [],
|
||||
columns: [...tableColumns],
|
||||
|
||||
// 表格列配置
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
filterKeys(newKeys) {
|
||||
this.filterColumns(newKeys);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
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 = []
|
||||
this.count = 0
|
||||
}else{
|
||||
this.datasource = res.data.data
|
||||
this.count = res.data.count
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
JumpFieldClick(record, column) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
// 传上父级
|
||||
changeFilter(data) {
|
||||
this.$emit("changeFilter", data);
|
||||
},
|
||||
//动态修改表头
|
||||
filterColumns(keys) {
|
||||
if (!Array.isArray(keys)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let newCloumns = [...tableColumns];
|
||||
|
||||
let filterIndex = [];
|
||||
newCloumns.forEach((item, index) => {
|
||||
if (keys.indexOf(item.dataIndex) > -1) {
|
||||
filterIndex.push(index);
|
||||
}
|
||||
});
|
||||
|
||||
const newList = newCloumns.filter((item, index) => {
|
||||
return filterIndex.indexOf(index) == -1;
|
||||
});
|
||||
this.columns = newList;
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data) {
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
const columns = [...tableColumns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
arr.push([`饮用水源水质监测累积月份统计样品数:${this.count}个`]);
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.footer{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
99
src/views/water/drinking-water/statistic/city/index.vue
Normal file
99
src/views/water/drinking-water/statistic/city/index.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<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" >
|
||||
<city-water-quality :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base2'"></city-water-quality>
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane tab="水质统计" key="base7" >
|
||||
<water-quality-count :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base7'"></water-quality-count>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="水质达标情况" key="base8" >
|
||||
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base8'"></water-quality-up>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="备用水源营养指数" key="base5">
|
||||
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base5'"></water-nutritional>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
//市级监测数据报表
|
||||
import BaseStatistic from "./base.vue"
|
||||
// 报送情况说明
|
||||
import cityAppraise from "./situation.vue"
|
||||
// 取水量
|
||||
import cityWaterWithdrawal from "./waterCount.vue"
|
||||
// 超标评价
|
||||
import cityOverStandard from './overStandard.vue'
|
||||
// 水质类别
|
||||
import cityWaterQuality from "./waterQuality.vue"
|
||||
// 水质统计
|
||||
import waterQualityCount from "./waterQualityCount.vue";
|
||||
// 水质达标情况
|
||||
import waterQualityUp from "./waterQualityUp.vue";
|
||||
//综合营养指数
|
||||
|
||||
import waterNutritional from "./waterNutritional.vue"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'city-com',
|
||||
components: {
|
||||
BaseStatistic,
|
||||
cityAppraise,
|
||||
cityWaterQuality,
|
||||
waterQualityCount,
|
||||
waterQualityUp,
|
||||
waterNutritional,
|
||||
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>
|
||||
157
src/views/water/drinking-water/statistic/city/overStandard.vue
Normal file
157
src/views/water/drinking-water/statistic/city/overStandard.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<!--超标评价-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import Search from "./../components/citySearch.vue";
|
||||
import {
|
||||
overStandardCount
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource:[],
|
||||
selection: [],
|
||||
columns: [
|
||||
{title: "城市名称",dataIndex: "sourceWaterName",sorter: true,},
|
||||
{title: "水源地名称",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "取水量(万m3)",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "超标水源取水量",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "超标项目",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "水源性质",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
],
|
||||
|
||||
// 表格列配置
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
overStandardCount(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) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
|
||||
// 传上父级
|
||||
changeFilter(data){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [...this.columns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
298
src/views/water/drinking-water/statistic/city/situation.vue
Normal file
298
src/views/water/drinking-water/statistic/city/situation.vue
Normal file
@@ -0,0 +1,298 @@
|
||||
<!--情况说明-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
|
||||
<ele-pro-table ref="table" row-key="drinkingWaterId" :datasource="datasource" :columns="columns" :where="where"
|
||||
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
|
||||
<template #county="{text}">
|
||||
{{text="市区"}}
|
||||
</template>
|
||||
|
||||
<template #enumber="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index3'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index3']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index3')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #wnumber="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index4'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index4']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index4')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #desc="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index6'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index6']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index6')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #remark="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='remark'" class="editable-cell-input-wrapper">
|
||||
<a-textarea class="edit-input" v-model:value="editableData[index]['remark']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'remark')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</ele-pro-table>
|
||||
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
getDescripForm
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
// import moment from "moment";
|
||||
|
||||
import Search from "./../components/citySearch.vue";
|
||||
import { CheckOutlined, EditOutlined } from '@ant-design/icons-vue';
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search,
|
||||
CheckOutlined,
|
||||
EditOutlined,
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
editableData:[],
|
||||
// 表格数据接口
|
||||
datasource:{},
|
||||
selection: [],
|
||||
columns:[
|
||||
{key: "index",title:"序号",dataIndex: "index",width: 48,align: "center",customRender: ({ index }) => index + 1,},
|
||||
{title:"城市",dataIndex:"city",},
|
||||
{title:"县城",dataIndex:"county",slots:{customRender:'county'}},
|
||||
{title:"水源地名称",dataIndex:"sourceWaterName",},
|
||||
{title:"类型",dataIndex:"waterSourceProperty",},
|
||||
{title:"监测时间",dataIndex:"reportTime"},
|
||||
// {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:"index3",
|
||||
slots: {
|
||||
customRender: 'enumber',
|
||||
},
|
||||
},
|
||||
{title:"外送分析项目个数",dataIndex:"index4", slots: {
|
||||
customRender: 'wnumber',
|
||||
},},
|
||||
{title:"超标项目",dataIndex:"index5",},
|
||||
{title:"情况说明或原因",dataIndex:"index6", slots: {
|
||||
customRender: 'desc',
|
||||
}},
|
||||
{title:"备注",dataIndex:"remark",slots: {
|
||||
customRender: 'remark',
|
||||
},},
|
||||
],
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
page:1,
|
||||
limit:10
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
getDescripForm(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,key){
|
||||
this.editableData[index] = item
|
||||
this.editableData[index].edable=key
|
||||
},
|
||||
|
||||
save(index){
|
||||
// console.log('item',this.editableData[index]['index3'])
|
||||
// // console.log('item.remark', item.remark)
|
||||
this.datasource[index] = {...this.editableData[index]}
|
||||
this.editableData = []
|
||||
|
||||
},
|
||||
|
||||
JumpFieldClick(record, column) {
|
||||
console.log(column.dataIndex)
|
||||
},
|
||||
// 传上父级
|
||||
changeFilter(data){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
|
||||
this.columns[6].filters = []
|
||||
if(this.where.drinkingWaterAnalyse.waterSourceType ==1 ){
|
||||
// 地表水
|
||||
this.columns[6].filters = [
|
||||
{
|
||||
text: '61',
|
||||
value: '61',
|
||||
},
|
||||
{
|
||||
text: '63',
|
||||
value: '63',
|
||||
},
|
||||
{
|
||||
text: '64',
|
||||
value: '64',
|
||||
},
|
||||
]
|
||||
}
|
||||
if(this.where.drinkingWaterAnalyse.waterSourceType ==2 ){
|
||||
// 地下水
|
||||
this.columns[6].filters = [
|
||||
{
|
||||
text: '39',
|
||||
value: '39',
|
||||
},
|
||||
{
|
||||
text: '94',
|
||||
value: '94',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
...this.columns,
|
||||
];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.datasource.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.editable-cell-input-wrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.edit-input{
|
||||
margin-right: 5px;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
.editable-cell-text-wrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
</style>
|
||||
159
src/views/water/drinking-water/statistic/city/waterCount.vue
Normal file
159
src/views/water/drinking-water/statistic/city/waterCount.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<!--取水量统计-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import Search from "./../components/citySearch.vue";
|
||||
|
||||
import {
|
||||
getWaterCount
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
selection: [],
|
||||
columns: [
|
||||
{title: "水源名称",dataIndex: "sourceWaterName",sorter: true,},
|
||||
{title: "取水量",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
],
|
||||
|
||||
// 表格列配置
|
||||
|
||||
// palceOptions: [],
|
||||
// areaOptions: [],
|
||||
// roadOptions: [],
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
getWaterCount(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) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
|
||||
// 传上父级
|
||||
changeFilter(data){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [...this.columns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
|
||||
import {
|
||||
waterNutritionalData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
|
||||
import Search from "./../components/citySearch.vue";
|
||||
|
||||
export default {
|
||||
name: "waterQuality",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource:{},
|
||||
selection: [],
|
||||
columns:[
|
||||
{title:"监测时间",dataIndex:"city",},
|
||||
{title:"类别",dataIndex:"place",},
|
||||
{title:"点位名称",dataIndex:"sourceWaterName",},
|
||||
{title:"水质类别",dataIndex:"waterSourceProperty",},
|
||||
{title: "级别", dataIndex: ""},
|
||||
{title: "综合营养指数", dataIndex: ""},
|
||||
],
|
||||
|
||||
|
||||
// 表格列配置
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
waterNutritionalData(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) {
|
||||
console.log(column.dataIndex)
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
...this.columns,
|
||||
];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
183
src/views/water/drinking-water/statistic/city/waterQuality.vue
Normal file
183
src/views/water/drinking-water/statistic/city/waterQuality.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
|
||||
import {
|
||||
waterQualityData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
|
||||
import Search from "./../components/citySearch.vue";
|
||||
|
||||
export default {
|
||||
name: "waterQuality",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource:{},
|
||||
selection: [],
|
||||
columns:[
|
||||
{title:"城市名称",dataIndex:"city",},
|
||||
{title:"水源地名称",dataIndex:"place",},
|
||||
{title:"期数",dataIndex:"sourceWaterName",},
|
||||
{title:"水源地性质",dataIndex:"waterSourceProperty",},
|
||||
{title:"断面水质",align: 'center',children: [
|
||||
{title: "本月", dataIndex: ""},
|
||||
{title: "上月", dataIndex: ""},
|
||||
{title: "去年同期", dataIndex: ""},
|
||||
]
|
||||
},
|
||||
{title:"主要污染指标",dataIndex:"",},
|
||||
],
|
||||
|
||||
|
||||
// 表格列配置
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
waterQualityData(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) {
|
||||
console.log(column.dataIndex)
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
const columns = [...this.columns];
|
||||
const arr = [];
|
||||
let th1 = []
|
||||
let th2 = []
|
||||
const sColumns = []
|
||||
columns.forEach(item=>{
|
||||
th1.push(item.title)
|
||||
if(Array.isArray(item.children) && item.children.length>0){
|
||||
item.children.forEach(single=>{
|
||||
th1.push('')
|
||||
th2.push(single.title)
|
||||
sColumns.push({dataIndex:single.dataIndex})
|
||||
})
|
||||
}else{
|
||||
th2.push('')
|
||||
sColumns.push({dataIndex:item.dataIndex})
|
||||
}
|
||||
})
|
||||
arr.push(th1)
|
||||
arr.push(th2)
|
||||
this.datasource.forEach((d) => {
|
||||
const td = sColumns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
@@ -0,0 +1,160 @@
|
||||
<!--水质统计-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
|
||||
import {
|
||||
waterQualityCountData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
|
||||
import Search from "./../components/citySearch.vue";
|
||||
|
||||
export default {
|
||||
name: "waterQualityCount",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource:{},
|
||||
selection: [],
|
||||
columns:[
|
||||
{title:"年份",dataIndex:"city",},
|
||||
{title:"指标",dataIndex:"place",},
|
||||
{title:"平均值",dataIndex:"sourceWaterName",},
|
||||
{title:"最大值",dataIndex:"waterSourceProperty",},
|
||||
{title:"最小值",dataIndex:"",},
|
||||
],
|
||||
|
||||
|
||||
// 表格列配置
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
waterQualityCountData(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) {
|
||||
console.log(column.dataIndex)
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
...this.columns,
|
||||
];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
166
src/views/water/drinking-water/statistic/city/waterQualityUp.vue
Normal file
166
src/views/water/drinking-water/statistic/city/waterQualityUp.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
|
||||
import {
|
||||
waterQualityUpData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
|
||||
import Search from "./../components/citySearch.vue";
|
||||
|
||||
export default {
|
||||
name: "waterQuality",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource:{},
|
||||
selection: [],
|
||||
columns:[
|
||||
{title:"断面名称",dataIndex:"city",},
|
||||
{title:"时间",dataIndex:"place",},
|
||||
{title:"水质目标",dataIndex:"sourceWaterName",},
|
||||
{title:"水质类别",dataIndex:"waterSourceProperty",},
|
||||
{title: "达标情况", dataIndex: ""},
|
||||
{title: "达标率", dataIndex: ""},
|
||||
// {title:"达标情况",align: 'center',children: [
|
||||
// {title: "达标情况", dataIndex: ""},
|
||||
// {title: "达标率", dataIndex: ""},
|
||||
// {title: "去年同期", dataIndex: ""},
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
|
||||
|
||||
// 表格列配置
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
waterQualityUpData(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) {
|
||||
console.log(column.dataIndex)
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
...this.columns,
|
||||
];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
515
src/views/water/drinking-water/statistic/colums/base.js
Normal file
515
src/views/water/drinking-water/statistic/colums/base.js
Normal file
@@ -0,0 +1,515 @@
|
||||
import moment from "moment"
|
||||
//市级数据总览表格
|
||||
|
||||
export const filterColumns = [
|
||||
{ title: "pH(无量纲)", dataIndex: "ph", sorter: true, },
|
||||
{ title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true, },
|
||||
{ title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true, },
|
||||
{ title: "化学需氧量", dataIndex: "cod", sorter: true, },
|
||||
{ title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true, },
|
||||
{ title: "氨氮", dataIndex: "ammonia", sorter: true, },
|
||||
{ title: "总磷", dataIndex: "totalPhosphorus", sorter: true, },
|
||||
{ title: "总氮", dataIndex: "totalNitrogen", sorter: true, },
|
||||
{ title: "铜", dataIndex: "cu", sorter: true, },
|
||||
{ title: "锌", dataIndex: "zn", sorter: true, },
|
||||
{ title: "氟化物", dataIndex: "fluoride", sorter: true, },
|
||||
{ title: "硒", dataIndex: "se", sorter: true, },
|
||||
{ title: "砷", dataIndex: "as", sorter: true, },
|
||||
{ title: "汞", dataIndex: "hg", sorter: true, },
|
||||
{ title: "镉", dataIndex: "cd", sorter: true, },
|
||||
{ title: "铬(六价)", dataIndex: "cr", sorter: true, },
|
||||
{ title: "铅", dataIndex: "pb", sorter: true, },
|
||||
{ title: "氰化物", dataIndex: "cyanide", sorter: true, },
|
||||
{ title: "挥发酚", dataIndex: "volatilePhenol", sorter: true, },
|
||||
{ title: "石油类", dataIndex: "petro", sorter: true, },
|
||||
{ title: "阴离子表面活性剂", dataIndex: "anionicSurfactant", sorter: true, },
|
||||
{ title: "硫化物", dataIndex: "sulfide", sorter: true, },
|
||||
{ title: "粪大肠菌群(MPN/L)", dataIndex: "fecalColiforms", sorter: true, },
|
||||
{ title: "硫酸盐", dataIndex: "sulfate", sorter: true, },
|
||||
{ title: "氯化物", dataIndex: "chloride", sorter: true, },
|
||||
{ title: "硝酸盐氮", dataIndex: "nitrateNitrogen", sorter: true, },
|
||||
{ title: "铁", dataIndex: "fe", sorter: true, },
|
||||
{ title: "锰", dataIndex: "mn", sorter: true, },
|
||||
{ title: "三氯甲烷", dataIndex: "chcl3", sorter: true, },
|
||||
{ title: "四氯化碳", dataIndex: "ccl4", sorter: true, },
|
||||
{ title: "三溴甲烷", dataIndex: "chbr3", sorter: true, },
|
||||
{ title: "二氯甲烷", dataIndex: "ch2cl2", sorter: true, },
|
||||
{ title: "1,2-二氯乙烷", dataIndex: "c2h4cl2", sorter: true, },
|
||||
{ title: "环氧氯丙烷", dataIndex: "c3h5clO", sorter: true, },
|
||||
{ title: "氯乙烯", dataIndex: "c2h3cl", sorter: true, },
|
||||
{ title: "1,1-二氯乙烯", dataIndex: "c2h2cl211", sorter: true, },
|
||||
{ title: "1,2-二氯乙烯", dataIndex: "c2h2cl212", sorter: true, },
|
||||
{ title: "三氯乙烯", dataIndex: "c2hcl3", sorter: true, },
|
||||
{ title: "四氯乙烯", dataIndex: "c2cl4", sorter: true, },
|
||||
{ title: "氯丁二烯", dataIndex: "c4h5cl", sorter: true, },
|
||||
{ title: "六氯丁二烯", dataIndex: "c4cl6", sorter: true, },
|
||||
{ title: "苯乙烯", dataIndex: "c8h8", sorter: true, },
|
||||
{ title: "甲醛", dataIndex: "ch2o", sorter: true, },
|
||||
{ title: "乙醛", dataIndex: "c2h4o", sorter: true, },
|
||||
{ title: "丙烯醛", dataIndex: "c3h4o", sorter: true, },
|
||||
{ title: "三氯乙醛", dataIndex: "c2hcl3o", sorter: true, },
|
||||
{ title: "苯", dataIndex: "c6h6", sorter: true, },
|
||||
{ title: "甲苯", dataIndex: "c7h8", sorter: true, },
|
||||
{ title: "乙苯", dataIndex: "c8h10Ethylbenzene", sorter: true, },
|
||||
{ title: "二甲苯", dataIndex: "c8h10Dimethylbenzene", sorter: true, },
|
||||
{ title: "异丙苯", dataIndex: "c9h12", sorter: true, },
|
||||
{ title: "氯苯", dataIndex: "c6h5cl", sorter: true, },
|
||||
{ title: "1,2-二氯苯", dataIndex: "c6h4cl212", sorter: true, },
|
||||
{ title: "1,4-二氯苯", dataIndex: "c6h4cl214", sorter: true, },
|
||||
{ title: "三氯苯", dataIndex: "c6h3cl3", sorter: true, },
|
||||
{ title: "四氯苯", dataIndex: "c6h2cl4", sorter: true, },
|
||||
{ title: "六氯苯", dataIndex: "c6cl6", sorter: true, },
|
||||
{ title: "硝基苯", dataIndex: "c6h5no2", sorter: true, },
|
||||
{ title: "二硝基苯", dataIndex: "c6h4n2o4", sorter: true, },
|
||||
{ title: "2,4-二硝基甲苯", dataIndex: "c7h6n2o4", sorter: true, },
|
||||
{ title: "2,4,6-三硝基甲苯", dataIndex: "c7h5o6n3", sorter: true, },
|
||||
{ title: "硝基氯苯", dataIndex: "c6h4clno2", sorter: true, },
|
||||
{ title: "2,4-二硝基氯苯 ", dataIndex: "c6h3cln2o4", sorter: true, },
|
||||
{ title: "2,4-二氯苯酚", dataIndex: "c6h4cl2o", sorter: true, },
|
||||
{ title: "2,4,6-三氯苯酚", dataIndex: "c6h3cl3o", sorter: true, },
|
||||
{ title: "五氯酚", dataIndex: "c6hcl5o", sorter: true, },
|
||||
{ title: "苯胺", dataIndex: "c6h7n", sorter: true, },
|
||||
{ title: "联苯胺", dataIndex: "c6h4nh22", sorter: true, },
|
||||
{ title: "丙烯酰胺", dataIndex: "c3h5no", sorter: true, },
|
||||
{ title: "丙烯腈", dataIndex: "c3h3n", sorter: true, },
|
||||
{ title: "邻苯二甲酸二丁酯", dataIndex: "c16h22o4", sorter: true, },
|
||||
{ title: "邻苯二甲酸二(2-乙基已基)酯", dataIndex: "c16h35o4p", sorter: true, },
|
||||
{ title: "水合肼", dataIndex: "n2h4h2o", sorter: true, },
|
||||
{ title: "四乙基铅", dataIndex: "c8h20pd", sorter: true, },
|
||||
{ title: "吡啶", dataIndex: "c5h5n", sorter: true, },
|
||||
{ title: "松节油", dataIndex: "turpentine", sorter: true, },
|
||||
{ title: "苦味酸", dataIndex: "c6h3n3o7", sorter: true, },
|
||||
{ title: "丁基黄原酸", dataIndex: "butylXanthogenAcid", sorter: true, },
|
||||
{ title: "活性氯", dataIndex: "activeChlorine", sorter: true, },
|
||||
{ title: "滴滴涕", dataIndex: "c14h9cl5", sorter: true, },
|
||||
{ title: "林丹", dataIndex: "c6h6cl6", sorter: true, },
|
||||
{ title: "环氧七氯", dataIndex: "c10h5cl7O", sorter: true, },
|
||||
{ title: "对硫磷", dataIndex: "c10h14no5ps", sorter: true, },
|
||||
{ title: "甲基对硫磷", dataIndex: "c8h10o5nps", sorter: true, },
|
||||
{ title: "马拉硫磷", dataIndex: "c10h19o6ps2", sorter: true, },
|
||||
{ title: "乐果", dataIndex: "c5h12no3ps2", sorter: true, },
|
||||
{ title: "敌敌畏", dataIndex: "c4h7cl2o4p", sorter: true, },
|
||||
{ title: "敌百虫", dataIndex: "c4h8cl3o4p", sorter: true, },
|
||||
{ title: "内吸磷", dataIndex: "c8h19o3ps2", sorter: true, },
|
||||
{ title: "百菌清", dataIndex: "c8cl4n2", sorter: true, },
|
||||
{ title: "甲萘威", dataIndex: "c12h11no2", sorter: true, },
|
||||
{ title: "溴氰菊酯", dataIndex: "c22h19br2no3", sorter: true, },
|
||||
{ title: "阿特拉津", dataIndex: "c8h14cln5", sorter: true, },
|
||||
{ title: "苯并(a)芘 ", dataIndex: "c20h12", sorter: true, },
|
||||
{ title: "甲基汞", dataIndex: "ch3hg", sorter: true, },
|
||||
{ title: "多氯联苯", dataIndex: "c12h10Xclx", sorter: true, },
|
||||
{ title: "微囊藻毒素-LR", dataIndex: "微囊藻毒素-LR", sorter: true, },
|
||||
{ title: "黄磷", dataIndex: "p4", sorter: true, },
|
||||
{ title: "钼", dataIndex: "mo", sorter: true, },
|
||||
{ title: "钴", dataIndex: "co", sorter: true, },
|
||||
{ title: "铍", dataIndex: "be", sorter: true, },
|
||||
{ title: "硼", dataIndex: "b", sorter: true, },
|
||||
{ title: "锑", dataIndex: "sb", sorter: true, },
|
||||
{ title: "镍", dataIndex: "ni", sorter: true, },
|
||||
{ title: "钡", dataIndex: "ba", sorter: true, },
|
||||
{ title: "钒", dataIndex: "v", sorter: true, },
|
||||
{ title: "钛", dataIndex: "ti", sorter: true, },
|
||||
{ title: "铊", dataIndex: "tl", sorter: true, },
|
||||
|
||||
{ title: "六价铬", dataIndex: "cr6", sorter: true, },
|
||||
{ title: "邻二氯苯", dataIndex: "odcb", sorter: true, },
|
||||
{ title: "对二氯苯", dataIndex: "pdcp", sorter: true, },
|
||||
|
||||
{ title: "苯并(a)芘", dataIndex: "bap", sorter: true, },
|
||||
{ title: "苯并(b)荧蒽", dataIndex: "bbfa", sorter: true, },
|
||||
{ title: "磷酸盐", dataIndex: "phosphate", sorter: true, },
|
||||
{ title: "急性毒性", dataIndex: "acuteToxicity", sorter: true, },
|
||||
{ title: "余氯", dataIndex: "residualChlorine", sorter: true, },
|
||||
{ title: "六六六", dataIndex: "c6h6cl6666", sorter: true, },
|
||||
{ title: "2,4,6-三氯酚", dataIndex: "c6h3cl3o246", sorter: true, },
|
||||
//新增
|
||||
{ title: "叶绿素(mg/m3)", dataIndex: "chlorophyll", sorter: true, },
|
||||
{ title: "透明度(cm)", dataIndex: "transparency", sorter: true, },
|
||||
{ title: "总α放射性", dataIndex: "totalAlphaRadioactivity", sorter: true, },
|
||||
{ title: "总β放射性", dataIndex: "totalBetaRadioactivity", sorter: true, },
|
||||
{ title: "1,1,1-三氯乙烷(mg/L)", dataIndex: "c2h3cl3_111", sorter: true, },
|
||||
{ title: "1,1,2-三氯乙烷(mg/L)", dataIndex: "c2h3cl3_112", sorter: true, },
|
||||
]
|
||||
|
||||
const tableColumns = [
|
||||
|
||||
{ title: "省份", dataIndex: "province", sorter: true, },
|
||||
{ title: "省份代码", dataIndex: "provinceCode", sorter: true, },
|
||||
{ title: "城市名称", dataIndex: "city", sorter: true, },
|
||||
{ title: "城市代码", dataIndex: "cityCode", sorter: true, },
|
||||
{ title: "重点城市区分", dataIndex: "keyCity", sorter: true, },
|
||||
{ title: "南北方城市", dataIndex: "cityOrientation", sorter: true, },
|
||||
{ title: "断面名称", dataIndex: "place", sorter: true, },
|
||||
{ title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
||||
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
||||
{ title: "所属水系", dataIndex: "subordinateWater", sorter: true, },
|
||||
{ title: "水源地性质", dataIndex: "waterSourceProperty", sorter: true, },
|
||||
{ title: "取水点经度", dataIndex: "longitude", sorter: true, },
|
||||
{ title: "取水点纬度", dataIndex: "latitude", sorter: true, },
|
||||
{ title: "本月取水量", dataIndex: "waterWithdrawal", sorter: true, },
|
||||
{ title: "采样时间", dataIndex: "reportTime", sorter: true, customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
||||
slots:{customRender:'waterCode' }
|
||||
},
|
||||
{ title: "水温", dataIndex: "waterTemperature", sorter: true, },
|
||||
// {title: "采样时间",dataIndex: "monitorTime",sorter: true,},
|
||||
{ title: "pH(无量纲)", dataIndex: "ph", sorter: true, },
|
||||
{ title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true, },
|
||||
{ title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true, },
|
||||
{ title: "化学需氧量", dataIndex: "cod", sorter: true, },
|
||||
{ title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true, },
|
||||
{ title: "氨氮", dataIndex: "ammonia", sorter: true, },
|
||||
{ title: "总磷", dataIndex: "totalPhosphorus", sorter: true, },
|
||||
{ title: "总氮", dataIndex: "totalNitrogen", sorter: true, },
|
||||
{ title: "铜", dataIndex: "cu", sorter: true, },
|
||||
{ title: "锌", dataIndex: "zn", sorter: true, },
|
||||
{ title: "氟化物", dataIndex: "fluoride", sorter: true, },
|
||||
{ title: "硒", dataIndex: "se", sorter: true, },
|
||||
{ title: "砷", dataIndex: "as", sorter: true, },
|
||||
{ title: "汞", dataIndex: "hg", sorter: true, },
|
||||
{ title: "镉", dataIndex: "cd", sorter: true, },
|
||||
{ title: "铬(六价)", dataIndex: "cr", sorter: true, },
|
||||
{ title: "铅", dataIndex: "pb", sorter: true, },
|
||||
{ title: "氰化物", dataIndex: "cyanide", sorter: true, },
|
||||
{ title: "挥发酚", dataIndex: "volatilePhenol", sorter: true, },
|
||||
{ title: "石油类", dataIndex: "petro", sorter: true, },
|
||||
{ title: "阴离子表面活性剂", dataIndex: "anionicSurfactant", sorter: true, },
|
||||
{ title: "硫化物", dataIndex: "sulfide", sorter: true, },
|
||||
{ title: "粪大肠菌群(MPN/L)", dataIndex: "fecalColiforms", sorter: true, },
|
||||
{ title: "硫酸盐", dataIndex: "sulfate", sorter: true, },
|
||||
{ title: "氯化物", dataIndex: "chloride", sorter: true, },
|
||||
{ title: "硝酸盐氮", dataIndex: "nitrateNitrogen", sorter: true, },
|
||||
{ title: "铁", dataIndex: "fe", sorter: true, },
|
||||
{ title: "锰", dataIndex: "mn", sorter: true, },
|
||||
{ title: "三氯甲烷", dataIndex: "chcl3", sorter: true, },
|
||||
{ title: "四氯化碳", dataIndex: "ccl4", sorter: true, },
|
||||
{ title: "三溴甲烷", dataIndex: "chbr3", sorter: true, },
|
||||
{ title: "二氯甲烷", dataIndex: "ch2cl2", sorter: true, },
|
||||
{ title: "1,2-二氯乙烷", dataIndex: "c2h4cl2", sorter: true, },
|
||||
{ title: "环氧氯丙烷", dataIndex: "c3h5clO", sorter: true, },
|
||||
{ title: "氯乙烯", dataIndex: "c2h3cl", sorter: true, },
|
||||
{ title: "1,1-二氯乙烯", dataIndex: "c2h2cl211", sorter: true, },
|
||||
{ title: "1,2-二氯乙烯", dataIndex: "c2h2cl212", sorter: true, },
|
||||
{ title: "三氯乙烯", dataIndex: "c2hcl3", sorter: true, },
|
||||
{ title: "四氯乙烯", dataIndex: "c2cl4", sorter: true, },
|
||||
{ title: "氯丁二烯", dataIndex: "c4h5cl", sorter: true, },
|
||||
{ title: "六氯丁二烯", dataIndex: "c4cl6", sorter: true, },
|
||||
{ title: "苯乙烯", dataIndex: "c8h8", sorter: true, },
|
||||
{ title: "甲醛", dataIndex: "ch2o", sorter: true, },
|
||||
{ title: "乙醛", dataIndex: "c2h4o", sorter: true, },
|
||||
{ title: "丙烯醛", dataIndex: "c3h4o", sorter: true, },
|
||||
{ title: "三氯乙醛", dataIndex: "c2hcl3o", sorter: true, },
|
||||
{ title: "苯", dataIndex: "c6h6", sorter: true, },
|
||||
{ title: "甲苯", dataIndex: "c7h8", sorter: true, },
|
||||
{ title: "乙苯", dataIndex: "c8h10Ethylbenzene", sorter: true, },
|
||||
{ title: "二甲苯", dataIndex: "c8h10Dimethylbenzene", sorter: true, },
|
||||
{ title: "异丙苯", dataIndex: "c9h12", sorter: true, },
|
||||
{ title: "氯苯", dataIndex: "c6h5cl", sorter: true, },
|
||||
{ title: "1,2-二氯苯", dataIndex: "c6h4cl212", sorter: true, },
|
||||
{ title: "1,4-二氯苯", dataIndex: "c6h4cl214", sorter: true, },
|
||||
{ title: "三氯苯", dataIndex: "c6h3cl3", sorter: true, },
|
||||
{ title: "四氯苯", dataIndex: "c6h2cl4", sorter: true, },
|
||||
{ title: "六氯苯", dataIndex: "c6cl6", sorter: true, },
|
||||
{ title: "硝基苯", dataIndex: "c6h5no2", sorter: true, },
|
||||
{ title: "二硝基苯", dataIndex: "c6h4n2o4", sorter: true, },
|
||||
{ title: "2,4-二硝基甲苯", dataIndex: "c7h6n2o4", sorter: true, },
|
||||
{ title: "2,4,6-三硝基甲苯", dataIndex: "c7h5o6n3", sorter: true, },
|
||||
{ title: "硝基氯苯", dataIndex: "c6h4clno2", sorter: true, },
|
||||
{ title: "2,4-二硝基氯苯 ", dataIndex: "c6h3cln2o4", sorter: true, },
|
||||
{ title: "2,4-二氯苯酚", dataIndex: "c6h4cl2o", sorter: true, },
|
||||
{ title: "2,4,6-三氯苯酚", dataIndex: "c6h3cl3o", sorter: true, },
|
||||
{ title: "五氯酚", dataIndex: "c6hcl5o", sorter: true, },
|
||||
{ title: "苯胺", dataIndex: "c6h7n", sorter: true, },
|
||||
{ title: "联苯胺", dataIndex: "c6h4nh22", sorter: true, },
|
||||
{ title: "丙烯酰胺", dataIndex: "c3h5no", sorter: true, },
|
||||
{ title: "丙烯腈", dataIndex: "c3h3n", sorter: true, },
|
||||
{ title: "邻苯二甲酸二丁酯", dataIndex: "c16h22o4", sorter: true, },
|
||||
{ title: "邻苯二甲酸二(2-乙基已基)酯", dataIndex: "c16h35o4p", sorter: true, },
|
||||
{ title: "水合肼", dataIndex: "n2h4h2o", sorter: true, },
|
||||
{ title: "四乙基铅", dataIndex: "c8h20pd", sorter: true, },
|
||||
{ title: "吡啶", dataIndex: "c5h5n", sorter: true, },
|
||||
{ title: "松节油", dataIndex: "turpentine", sorter: true, },
|
||||
{ title: "苦味酸", dataIndex: "c6h3n3o7", sorter: true, },
|
||||
{ title: "丁基黄原酸", dataIndex: "butylXanthogenAcid", sorter: true, },
|
||||
{ title: "活性氯", dataIndex: "activeChlorine", sorter: true, },
|
||||
{ title: "滴滴涕", dataIndex: "c14h9cl5", sorter: true, },
|
||||
{ title: "林丹", dataIndex: "c6h6cl6", sorter: true, },
|
||||
{ title: "环氧七氯", dataIndex: "c10h5cl7O", sorter: true, },
|
||||
{ title: "对硫磷", dataIndex: "c10h14no5ps", sorter: true, },
|
||||
{ title: "甲基对硫磷", dataIndex: "c8h10o5nps", sorter: true, },
|
||||
{ title: "马拉硫磷", dataIndex: "c10h19o6ps2", sorter: true, },
|
||||
{ title: "乐果", dataIndex: "c5h12no3ps2", sorter: true, },
|
||||
{ title: "敌敌畏", dataIndex: "c4h7cl2o4p", sorter: true, },
|
||||
{ title: "敌百虫", dataIndex: "c4h8cl3o4p", sorter: true, },
|
||||
{ title: "内吸磷", dataIndex: "c8h19o3ps2", sorter: true, },
|
||||
{ title: "百菌清", dataIndex: "c8cl4n2", sorter: true, },
|
||||
{ title: "甲萘威", dataIndex: "c12h11no2", sorter: true, },
|
||||
{ title: "溴氰菊酯", dataIndex: "c22h19br2no3", sorter: true, },
|
||||
{ title: "阿特拉津", dataIndex: "c8h14cln5", sorter: true, },
|
||||
{ title: "苯并(a)芘 ", dataIndex: "c20h12", sorter: true, },
|
||||
{ title: "甲基汞", dataIndex: "ch3hg", sorter: true, },
|
||||
{ title: "多氯联苯", dataIndex: "c12h10Xclx", sorter: true, },
|
||||
{ title: "微囊藻毒素-LR", dataIndex: "微囊藻毒素-LR", sorter: true, },
|
||||
{ title: "黄磷", dataIndex: "p4", sorter: true, },
|
||||
{ title: "钼", dataIndex: "mo", sorter: true, },
|
||||
{ title: "钴", dataIndex: "co", sorter: true, },
|
||||
{ title: "铍", dataIndex: "be", sorter: true, },
|
||||
{ title: "硼", dataIndex: "b", sorter: true, },
|
||||
{ title: "锑", dataIndex: "sb", sorter: true, },
|
||||
{ title: "镍", dataIndex: "ni", sorter: true, },
|
||||
{ title: "钡", dataIndex: "ba", sorter: true, },
|
||||
{ title: "钒", dataIndex: "v", sorter: true, },
|
||||
{ title: "钛", dataIndex: "ti", sorter: true, },
|
||||
{ title: "铊", dataIndex: "tl", sorter: true, },
|
||||
|
||||
{ title: "六价铬", dataIndex: "cr6", sorter: true, },
|
||||
{ title: "邻二氯苯", dataIndex: "odcb", sorter: true, },
|
||||
{ title: "对二氯苯", dataIndex: "pdcp", sorter: true, },
|
||||
|
||||
{ title: "苯并(a)芘", dataIndex: "bap", sorter: true, },
|
||||
{ title: "苯并(b)荧蒽", dataIndex: "bbfa", sorter: true, },
|
||||
{ title: "磷酸盐", dataIndex: "phosphate", sorter: true, },
|
||||
{ title: "急性毒性", dataIndex: "acuteToxicity", sorter: true, },
|
||||
{ title: "余氯", dataIndex: "residualChlorine", sorter: true, },
|
||||
{ title: "六六六", dataIndex: "c6h6cl6666", sorter: true, },
|
||||
{ title: "2,4,6-三氯酚", dataIndex: "c6h3cl3o246", sorter: true, },
|
||||
//新增
|
||||
{ title: "叶绿素(mg/m3)", dataIndex: "chlorophyll", sorter: true, },
|
||||
{ title: "透明度(cm)", dataIndex: "transparency", sorter: true, },
|
||||
{ title: "总α放射性", dataIndex: "totalAlphaRadioactivity", sorter: true, },
|
||||
{ title: "总β放射性", dataIndex: "totalBetaRadioactivity", sorter: true, },
|
||||
{ title: "1,1,1-三氯乙烷(mg/L)", dataIndex: "c2h3cl3_111", sorter: true, },
|
||||
{ title: "1,1,2-三氯乙烷(mg/L)", dataIndex: "c2h3cl3_112", sorter: true, },
|
||||
];
|
||||
export { tableColumns }
|
||||
|
||||
//县级数据总览表格
|
||||
const tableColumns2 = [
|
||||
{ title: "省份", dataIndex: "province", sorter: true, },
|
||||
{ title: "省份代码", dataIndex: "provinceCode", sorter: true, },
|
||||
{ title: "城市名称", dataIndex: "city", sorter: true, },
|
||||
{ title: "城市代码", dataIndex: "cityCode", sorter: true, },
|
||||
// { title: "重点城市区分", dataIndex: "keyCity", sorter: true, },
|
||||
{title:"县域名称",dataIndex:"countyName",sorter:true},
|
||||
{title:"县域代码",dataIndex:"countyCode",sorter:true},
|
||||
// { title: "南北方城市", dataIndex: "cityOrientation", sorter: true, },
|
||||
{ title: "断面名称", dataIndex: "place", sorter: true, },
|
||||
// { title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
||||
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
||||
{ title: "所属水系", dataIndex: "subordinateWater", sorter: true, },
|
||||
{ title: "水源地性质", dataIndex: "waterSourceProperty", sorter: true, },
|
||||
{ title: "取水点经度", dataIndex: "longitude", sorter: true, },
|
||||
{ title: "取水点纬度", dataIndex: "latitude", sorter: true, },
|
||||
{ title: "本月取水量", dataIndex: "waterWithdrawal", sorter: true, },
|
||||
{ title: "采样时间", dataIndex: "reportTime", sorter: true, customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
||||
slots:{customRender:'waterCode' }
|
||||
},
|
||||
{ title: "水温", dataIndex: "waterTemperature", sorter: true, },
|
||||
// {title: "采样时间",dataIndex: "monitorTime",sorter: true,},
|
||||
{ title: "pH(无量纲)", dataIndex: "ph", sorter: true, },
|
||||
{ title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true, },
|
||||
{ title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true, },
|
||||
{ title: "化学需氧量", dataIndex: "cod", sorter: true, },
|
||||
{ title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true, },
|
||||
{ title: "氨氮", dataIndex: "ammonia", sorter: true, },
|
||||
{ title: "总磷", dataIndex: "totalPhosphorus", sorter: true, },
|
||||
{ title: "总氮", dataIndex: "totalNitrogen", sorter: true, },
|
||||
{ title: "铜", dataIndex: "cu", sorter: true, },
|
||||
{ title: "锌", dataIndex: "zn", sorter: true, },
|
||||
{ title: "氟化物", dataIndex: "fluoride", sorter: true, },
|
||||
{ title: "硒", dataIndex: "se", sorter: true, },
|
||||
{ title: "砷", dataIndex: "as", sorter: true, },
|
||||
{ title: "汞", dataIndex: "hg", sorter: true, },
|
||||
{ title: "镉", dataIndex: "cd", sorter: true, },
|
||||
{ title: "铬(六价)", dataIndex: "cr", sorter: true, },
|
||||
{ title: "铅", dataIndex: "pb", sorter: true, },
|
||||
{ title: "氰化物", dataIndex: "cyanide", sorter: true, },
|
||||
{ title: "挥发酚", dataIndex: "volatilePhenol", sorter: true, },
|
||||
{ title: "石油类", dataIndex: "petro", sorter: true, },
|
||||
{ title: "阴离子表面活性剂", dataIndex: "anionicSurfactant", sorter: true, },
|
||||
{ title: "硫化物", dataIndex: "sulfide", sorter: true, },
|
||||
{ title: "粪大肠菌群(MPN/L)", dataIndex: "fecalColiforms", sorter: true, },
|
||||
{ title: "硫酸盐", dataIndex: "sulfate", sorter: true, },
|
||||
{ title: "氯化物", dataIndex: "chloride", sorter: true, },
|
||||
{ title: "硝酸盐氮", dataIndex: "nitrateNitrogen", sorter: true, },
|
||||
{ title: "铁", dataIndex: "fe", sorter: true, },
|
||||
{ title: "锰", dataIndex: "mn", sorter: true, },
|
||||
{ title: "三氯甲烷", dataIndex: "chcl3", sorter: true, },
|
||||
{ title: "四氯化碳", dataIndex: "ccl4", sorter: true, },
|
||||
{ title: "三溴甲烷", dataIndex: "chbr3", sorter: true, },
|
||||
{ title: "二氯甲烷", dataIndex: "ch2cl2", sorter: true, },
|
||||
{ title: "1,2-二氯乙烷", dataIndex: "c2h4cl2", sorter: true, },
|
||||
{ title: "环氧氯丙烷", dataIndex: "c3h5clO", sorter: true, },
|
||||
{ title: "氯乙烯", dataIndex: "c2h3cl", sorter: true, },
|
||||
{ title: "1,1-二氯乙烯", dataIndex: "c2h2cl211", sorter: true, },
|
||||
{ title: "1,2-二氯乙烯", dataIndex: "c2h2cl212", sorter: true, },
|
||||
{ title: "三氯乙烯", dataIndex: "c2hcl3", sorter: true, },
|
||||
{ title: "四氯乙烯", dataIndex: "c2cl4", sorter: true, },
|
||||
{ title: "氯丁二烯", dataIndex: "c4h5cl", sorter: true, },
|
||||
{ title: "六氯丁二烯", dataIndex: "c4cl6", sorter: true, },
|
||||
{ title: "苯乙烯", dataIndex: "c8h8", sorter: true, },
|
||||
{ title: "甲醛", dataIndex: "ch2o", sorter: true, },
|
||||
{ title: "乙醛", dataIndex: "c2h4o", sorter: true, },
|
||||
{ title: "丙烯醛", dataIndex: "c3h4o", sorter: true, },
|
||||
{ title: "三氯乙醛", dataIndex: "c2hcl3o", sorter: true, },
|
||||
{ title: "苯", dataIndex: "c6h6", sorter: true, },
|
||||
{ title: "甲苯", dataIndex: "c7h8", sorter: true, },
|
||||
{ title: "乙苯", dataIndex: "c8h10Ethylbenzene", sorter: true, },
|
||||
{ title: "二甲苯", dataIndex: "c8h10Dimethylbenzene", sorter: true, },
|
||||
{ title: "异丙苯", dataIndex: "c9h12", sorter: true, },
|
||||
{ title: "氯苯", dataIndex: "c6h5cl", sorter: true, },
|
||||
{ title: "1,2-二氯苯", dataIndex: "c6h4cl212", sorter: true, },
|
||||
{ title: "1,4-二氯苯", dataIndex: "c6h4cl214", sorter: true, },
|
||||
{ title: "三氯苯", dataIndex: "c6h3cl3", sorter: true, },
|
||||
{ title: "四氯苯", dataIndex: "c6h2cl4", sorter: true, },
|
||||
{ title: "六氯苯", dataIndex: "c6cl6", sorter: true, },
|
||||
{ title: "硝基苯", dataIndex: "c6h5no2", sorter: true, },
|
||||
{ title: "二硝基苯", dataIndex: "c6h4n2o4", sorter: true, },
|
||||
{ title: "2,4-二硝基甲苯", dataIndex: "c7h6n2o4", sorter: true, },
|
||||
{ title: "2,4,6-三硝基甲苯", dataIndex: "c7h5o6n3", sorter: true, },
|
||||
{ title: "硝基氯苯", dataIndex: "c6h4clno2", sorter: true, },
|
||||
{ title: "2,4-二硝基氯苯 ", dataIndex: "c6h3cln2o4", sorter: true, },
|
||||
{ title: "2,4-二氯苯酚", dataIndex: "c6h4cl2o", sorter: true, },
|
||||
{ title: "2,4,6-三氯苯酚", dataIndex: "c6h3cl3o", sorter: true, },
|
||||
{ title: "五氯酚", dataIndex: "c6hcl5o", sorter: true, },
|
||||
{ title: "苯胺", dataIndex: "c6h7n", sorter: true, },
|
||||
{ title: "联苯胺", dataIndex: "c6h4nh22", sorter: true, },
|
||||
{ title: "丙烯酰胺", dataIndex: "c3h5no", sorter: true, },
|
||||
{ title: "丙烯腈", dataIndex: "c3h3n", sorter: true, },
|
||||
{ title: "邻苯二甲酸二丁酯", dataIndex: "c16h22o4", sorter: true, },
|
||||
{ title: "邻苯二甲酸二(2-乙基已基)酯", dataIndex: "c16h35o4p", sorter: true, },
|
||||
{ title: "水合肼", dataIndex: "n2h4h2o", sorter: true, },
|
||||
{ title: "四乙基铅", dataIndex: "c8h20pd", sorter: true, },
|
||||
{ title: "吡啶", dataIndex: "c5h5n", sorter: true, },
|
||||
{ title: "松节油", dataIndex: "turpentine", sorter: true, },
|
||||
{ title: "苦味酸", dataIndex: "c6h3n3o7", sorter: true, },
|
||||
{ title: "丁基黄原酸", dataIndex: "butylXanthogenAcid", sorter: true, },
|
||||
{ title: "活性氯", dataIndex: "activeChlorine", sorter: true, },
|
||||
{ title: "滴滴涕", dataIndex: "c14h9cl5", sorter: true, },
|
||||
{ title: "林丹", dataIndex: "c6h6cl6", sorter: true, },
|
||||
{ title: "环氧七氯", dataIndex: "c10h5cl7O", sorter: true, },
|
||||
{ title: "对硫磷", dataIndex: "c10h14no5ps", sorter: true, },
|
||||
{ title: "甲基对硫磷", dataIndex: "c8h10o5nps", sorter: true, },
|
||||
{ title: "马拉硫磷", dataIndex: "c10h19o6ps2", sorter: true, },
|
||||
{ title: "乐果", dataIndex: "c5h12no3ps2", sorter: true, },
|
||||
{ title: "敌敌畏", dataIndex: "c4h7cl2o4p", sorter: true, },
|
||||
{ title: "敌百虫", dataIndex: "c4h8cl3o4p", sorter: true, },
|
||||
{ title: "内吸磷", dataIndex: "c8h19o3ps2", sorter: true, },
|
||||
{ title: "百菌清", dataIndex: "c8cl4n2", sorter: true, },
|
||||
{ title: "甲萘威", dataIndex: "c12h11no2", sorter: true, },
|
||||
{ title: "溴氰菊酯", dataIndex: "c22h19br2no3", sorter: true, },
|
||||
{ title: "阿特拉津", dataIndex: "c8h14cln5", sorter: true, },
|
||||
{ title: "苯并(a)芘 ", dataIndex: "c20h12", sorter: true, },
|
||||
{ title: "甲基汞", dataIndex: "ch3hg", sorter: true, },
|
||||
{ title: "多氯联苯", dataIndex: "c12h10Xclx", sorter: true, },
|
||||
{ title: "微囊藻毒素-LR", dataIndex: "微囊藻毒素-LR", sorter: true, },
|
||||
{ title: "黄磷", dataIndex: "p4", sorter: true, },
|
||||
{ title: "钼", dataIndex: "mo", sorter: true, },
|
||||
{ title: "钴", dataIndex: "co", sorter: true, },
|
||||
{ title: "铍", dataIndex: "be", sorter: true, },
|
||||
{ title: "硼", dataIndex: "b", sorter: true, },
|
||||
{ title: "锑", dataIndex: "sb", sorter: true, },
|
||||
{ title: "镍", dataIndex: "ni", sorter: true, },
|
||||
{ title: "钡", dataIndex: "ba", sorter: true, },
|
||||
{ title: "钒", dataIndex: "v", sorter: true, },
|
||||
{ title: "钛", dataIndex: "ti", sorter: true, },
|
||||
{ title: "铊", dataIndex: "tl", sorter: true, },
|
||||
|
||||
{ title: "六价铬", dataIndex: "cr6", sorter: true, },
|
||||
{ title: "邻二氯苯", dataIndex: "odcb", sorter: true, },
|
||||
{ title: "对二氯苯", dataIndex: "pdcp", sorter: true, },
|
||||
|
||||
{ title: "苯并(a)芘", dataIndex: "bap", sorter: true, },
|
||||
{ title: "苯并(b)荧蒽", dataIndex: "bbfa", sorter: true, },
|
||||
{ title: "磷酸盐", dataIndex: "phosphate", sorter: true, },
|
||||
{ title: "急性毒性", dataIndex: "acuteToxicity", sorter: true, },
|
||||
{ title: "余氯", dataIndex: "residualChlorine", sorter: true, },
|
||||
{ title: "六六六", dataIndex: "c6h6cl6666", sorter: true, },
|
||||
{ title: "2,4,6-三氯酚", dataIndex: "c6h3cl3o246", sorter: true, },
|
||||
//新增
|
||||
{ title: "叶绿素(mg/m3)", dataIndex: "chlorophyll", sorter: true, },
|
||||
{ title: "透明度(cm)", dataIndex: "transparency", sorter: true, },
|
||||
{ title: "总α放射性", dataIndex: "totalAlphaRadioactivity", sorter: true, },
|
||||
{ title: "总β放射性", dataIndex: "totalBetaRadioactivity", sorter: true, },
|
||||
{ title: "1,1,1-三氯乙烷(mg/L)", dataIndex: "c2h3cl3_111", sorter: true, },
|
||||
{ title: "1,1,2-三氯乙烷(mg/L)", dataIndex: "c2h3cl3_112", sorter: true, },
|
||||
];
|
||||
export { tableColumns2 }
|
||||
|
||||
//农村数据总览表格
|
||||
const tableColumns3=[
|
||||
{title:"断面代码",dataIndex:"sectionCode",sorter:true},
|
||||
{title: "省",dataIndex: "province",sorter: true,},
|
||||
{title: "市",dataIndex: "city",sorter: true,},
|
||||
{title: "乡镇",dataIndex: "township",sorter: true,},
|
||||
{title: "村",dataIndex: "village",sorter: true,},
|
||||
{title: "点位名称",dataIndex: "place",sorter: true,},
|
||||
{title: "湖库(是/否)",dataIndex: "lakeLibraryFlag",sorter: true,},
|
||||
{title: "经度(°)",dataIndex: "longitude",sorter: true,},
|
||||
{title: "纬度(°)",dataIndex: "latitude",sorter: true,},
|
||||
{title: "服务人口数量(人)",dataIndex: "numberServingPopulation",sorter: true,},
|
||||
{title: "日供水规模(吨)",dataIndex: "dailyWaterSupplyScale",sorter: true,},
|
||||
// {title: "监测时间",dataIndex: "monitorTime",sorter: true,customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||
// { title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
||||
// slots:{customRender:'waterCode' }
|
||||
// },
|
||||
// {title: "必测村庄(是/否) ",dataIndex: "mustTestVillagesFlag",sorter: true,},
|
||||
|
||||
{title: "水温(℃)",dataIndex: "waterTemperature",sorter: true,},
|
||||
{title: "pH(mg/L)",dataIndex: "ph",sorter: true,},
|
||||
{title: "溶解氧(mg/L)",dataIndex: "dissolvedOxygen",sorter: true,},
|
||||
{title: "高锰酸盐指数(mg/L)",dataIndex: "permanganateIndex",sorter: true,},
|
||||
{title: "五日生化需氧量(mg/L)",dataIndex: "fiveDayBod",sorter: true,},
|
||||
{title: "氨氮(mg/L)",dataIndex: "ammonia",sorter: true,},
|
||||
{title: "总磷 (mg/L)",dataIndex: "totalPhosphorus",sorter: true,},
|
||||
{title: "总氮 (mg/L)",dataIndex: "totalNitrogen",sorter: true,},
|
||||
{title: "铜 (mg/L)",dataIndex: "cu",sorter: true,},
|
||||
{title: "锌 (mg/L)",dataIndex: "zn",sorter: true,},
|
||||
{title: "氟化物(mg/L)",dataIndex: "fluoride",sorter: true,},
|
||||
{title: "硒 (mg/L)",dataIndex: "se",sorter: true,},
|
||||
{title: "砷 (mg/L)",dataIndex: "as",sorter: true,},
|
||||
{title: "汞 (mg/L)",dataIndex: "hg",sorter: true,},
|
||||
{title: "镉 (mg/L)",dataIndex: "cd",sorter: true,},
|
||||
{title: "铬(六价)(mg/L)",dataIndex: "cr",sorter: true,},
|
||||
{title: "铅 (mg/L)",dataIndex: "pb",sorter: true,},
|
||||
{title: "氰化物 (mg/L)",dataIndex: "cyanide",sorter: true,},
|
||||
{title: "挥发酚 (mg/L)",dataIndex: "volatilePhenol",sorter: true,},
|
||||
{title: "石油类 (mg/L)",dataIndex: "petro",sorter: true,},
|
||||
{title: "阴离子表面活性剂 (mg/L)",dataIndex: "anionicSurfactant",sorter: true,},
|
||||
{title: "硫化物 (mg/L)",dataIndex: "sulfide",sorter: true,},
|
||||
{title: "粪大肠菌群(个/L)",dataIndex: "fecalColiforms",sorter: true,},
|
||||
{title: "硫酸盐 (mg/L)",dataIndex: "sulfate",sorter: true,},
|
||||
{title: "氯化物 (mg/L)",dataIndex: "chloride",sorter: true,},
|
||||
{title: "硝酸盐氮 (mg/L)",dataIndex: "nitrateNitrogen",sorter: true,},
|
||||
{title: "铁 (mg/L)",dataIndex: "fe",sorter: true,},
|
||||
{title: "锰 (mg/L)",dataIndex: "mn",sorter: true,},
|
||||
{title: "水质类别",dataIndex: "waterQualityCategory",sorter: true,},
|
||||
{title: "特征污染物监测项目名称",dataIndex: "characteristicPollutantMonitoringProjectName",sorter: true,},
|
||||
{title: "特征污染物监测数值(mg/L)",dataIndex: "characteristicPollutantMonitoringValue",sorter: true,},
|
||||
{title: "色(mg/L)",dataIndex: "color",sorter: true,},
|
||||
{title: "嗅和味",dataIndex: "smellAndTaste",sorter: true,},
|
||||
{title: "浊度",dataIndex: "turbidity",sorter: true,},
|
||||
{title: "肉眼可见物",dataIndex: "visibleNakedEye",sorter: true,},
|
||||
{title: "总硬度(mg/L)",dataIndex: "totalHardness",sorter: true,},
|
||||
{title: "溶解性总固体(mg/L)",dataIndex: "totalDissolvedSolids",sorter: true,},
|
||||
{title: "铝(mg/L)",dataIndex: "ai",sorter: true,},
|
||||
{title: "耗氧量(mg/L)",dataIndex: "oxygenConsumption",sorter: true,},
|
||||
{title: "硝酸盐(mg/L)",dataIndex: "nitrate",sorter: true,},
|
||||
{title: "亚硝酸盐(mg/L)",dataIndex: "nitrite",sorter: true,},
|
||||
{title: "钠(mg/L)",dataIndex: "na",sorter: true,},
|
||||
{title: "碘化物(mg/L)",dataIndex: "lodide",sorter: true,},
|
||||
{title: "总大肠菌群(个/L)",dataIndex: "totalColiform",sorter: true,},
|
||||
{title: "菌落总数(CFU/mL))",dataIndex: "totalNumberColonies",sorter: true,},
|
||||
{title: "三氯甲烷(μg/L)",dataIndex: "chcl3",sorter: true,},
|
||||
{title: "四氯化碳 (μg/L)",dataIndex: "ccl4",sorter: true,},
|
||||
{title: "苯 (μg/L)",dataIndex: "c6h6",sorter: true,},
|
||||
{title: "甲苯 (μg/L)",dataIndex: "c7h8",sorter: true,},
|
||||
{title: "总α放射性(Bq/L)",dataIndex: "totalAlphaRadioactivity",sorter: true,},
|
||||
{title: "总β放射性(Bq/L)",dataIndex: "totalBetaRadioactivity",sorter: true,},
|
||||
{title: "备注",dataIndex: "remark",sorter: true,},
|
||||
];
|
||||
|
||||
export {
|
||||
tableColumns3
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<a-form
|
||||
:model="where"
|
||||
:label-col="{ md: { span: 6 }, sm: { span: 24 } }"
|
||||
:wrapper-col="{ md: { span: 18 }, sm: { span: 24 } }"
|
||||
>
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="水源类型:">
|
||||
<a-select v-model:value="where.drinkingWaterAnalyse.waterSourceType" allowClear showSearch>
|
||||
<a-select-option :value="'1'">地表水</a-select-option>
|
||||
<a-select-option :value="'2'">地下水</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="水源状态:">
|
||||
<a-select v-model:value="where.drinkingWaterAnalyse.drinkingWaterType" allowClear showSearch>
|
||||
<a-select-option :value="'1'">在用</a-select-option>
|
||||
<a-select-option :value="'2'">备用</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="起始时间:" name="monitorStartTime" >
|
||||
<a-month-picker
|
||||
v-model:value="where.monitorStartTime"
|
||||
valueFormat="YYYY-MM"
|
||||
:locale="locale"
|
||||
placeholder="请输入起始时间"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="结束时间:" name="monitorEndTime">
|
||||
<a-month-picker
|
||||
v-model:value="where.monitorEndTime"
|
||||
valueFormat="YYYY-MM"
|
||||
:locale="locale"
|
||||
placeholder="请输入结束时间"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="断面名称:">
|
||||
<a-select v-model:value="where.drinkingWaterAnalyse.sectionNames" mode="multiple" allowClear showSearch>
|
||||
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="监测指标:">
|
||||
<div class="input-item" @click="showModal">
|
||||
<a-checkbox
|
||||
:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
>
|
||||
全选
|
||||
</a-checkbox>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item class="ele-text-right" :wrapper-col="{ span: 24 }">
|
||||
<a-space>
|
||||
<a-button type="primary" @click="searchData">查询</a-button>
|
||||
<a-button @click="reset">重置</a-button>
|
||||
<a-button @click="exportFile">导出Excel</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-modal v-model:visible="visible" width="760px" title="监测指标" @ok="handleOk" @cancel="handleCancel">
|
||||
<div :style="{ borderBottom: '1px solid #E9E9E9', marginBottom: '5px', paddingBottom: '5px' }">
|
||||
<a-checkbox
|
||||
v-model:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="onCheckAllChange"
|
||||
>
|
||||
全选
|
||||
</a-checkbox>
|
||||
</div>
|
||||
|
||||
<a-checkbox-group
|
||||
style="width: 100%"
|
||||
@change="handleChange"
|
||||
v-model:value="filter"
|
||||
>
|
||||
<a-row>
|
||||
<a-col
|
||||
:span="8"
|
||||
v-for="item in filterColumns"
|
||||
:key="item.dataIndex"
|
||||
>
|
||||
<a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-checkbox-group>
|
||||
|
||||
</a-modal>
|
||||
</a-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { filterColumns } from "./../colums/base";
|
||||
import { listInfo } from "@/api/ecology/water/river-plcae";
|
||||
export default {
|
||||
name: "city-search",
|
||||
props: {
|
||||
// 表格搜索条件
|
||||
searchForm: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
indeterminate:false,
|
||||
checkAll: true,
|
||||
where: {
|
||||
drinkingWaterAnalyse:{}
|
||||
},
|
||||
filter:[],
|
||||
columnsKey:[],
|
||||
locale,
|
||||
visible: false,
|
||||
filterColumns: filterColumns,
|
||||
newCloumns:[],
|
||||
oldCloumns:[],
|
||||
filterItem:[],
|
||||
sectionInfo:[]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
searchForm(newV) {
|
||||
this.where = newV;
|
||||
},
|
||||
filterKeys(newKeys){
|
||||
this.initFilter(newKeys)
|
||||
},
|
||||
// 监控修改全选框图标状态
|
||||
filter(newV){
|
||||
if(newV.length !== this.filterColumns.length){
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
if(newV.length){
|
||||
this.indeterminate = true
|
||||
}
|
||||
}else{
|
||||
this.checkAll = true
|
||||
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() {
|
||||
this.where = this.searchForm;
|
||||
this.filter = filterColumns.map((item) => item.dataIndex);
|
||||
this.columnsKey = [...this.filter]
|
||||
// 生成复选框
|
||||
this.newCloumns = [...filterColumns];
|
||||
// 缓存复选框
|
||||
this.oldCloumns = [...filterColumns];
|
||||
// this.$emit("buildColumns", filterColumns);
|
||||
// 根据父级传回来需要去掉勾的值映射到复选框
|
||||
this.initFilter(this.filterKeys);
|
||||
// 将父级回传的搜索条件上传父级进行页面搜索
|
||||
this.emitData(true)
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
emitData(val){
|
||||
// if(val && this.where.startTime && this.where.endTime){
|
||||
if(val){
|
||||
this.searchData();
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化选择
|
||||
initFilter(newKeys){
|
||||
let filterIndex =this.filterColumns.map(item=>(item.dataIndex))
|
||||
const newList = filterIndex.filter((item) => {
|
||||
return newKeys.indexOf(item) == -1
|
||||
})
|
||||
this.filter = newList;
|
||||
},
|
||||
|
||||
onCheckAllChange (e) {
|
||||
this.filter = e.target.checked ? filterColumns.map((item) => item.dataIndex) : []
|
||||
|
||||
},
|
||||
|
||||
handleChange(e) {
|
||||
let newCloumns = [];
|
||||
filterColumns.forEach((item) => {
|
||||
const index = e.indexOf(item.dataIndex);
|
||||
if (index > -1) {
|
||||
newCloumns.push(item);
|
||||
}
|
||||
});
|
||||
this.newCloumns = newCloumns;
|
||||
},
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
drinkingWaterAnalyse:{
|
||||
regionLevel: this.where.drinkingWaterAnalyse.regionLevel
|
||||
}
|
||||
}
|
||||
this.searchData();
|
||||
},
|
||||
searchData() {
|
||||
this.where.filter = [...this.filter]
|
||||
this.$emit("search", this.where);
|
||||
},
|
||||
exportFile() {
|
||||
this.$emit("exportFile");
|
||||
},
|
||||
showModal() {
|
||||
this.visible = true;
|
||||
},
|
||||
handleCancel(){
|
||||
this.visible = false;
|
||||
// 如果是取消,则还原上次勾选项
|
||||
this.filter = this.oldCloumns.map(item=>item.dataIndex)
|
||||
},
|
||||
handleOk() {
|
||||
this.visible = false;
|
||||
this.oldCloumns = [...this.newCloumns];
|
||||
// 选中的所有项
|
||||
// console.log(this.columnsKey)
|
||||
|
||||
// 得到没有选中的项,然后在表头将没选中项去除
|
||||
let filterKey = []
|
||||
this.columnsKey.forEach(key=>{
|
||||
if(this.filter.indexOf(key) == -1){
|
||||
filterKey.push(key)
|
||||
}
|
||||
})
|
||||
|
||||
this.$emit("filterColumns", filterKey);
|
||||
|
||||
// this.$emit("selectKeys", this.columnsKey);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ant-calendar-picker {
|
||||
width: 100%;
|
||||
}
|
||||
.input-item {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-variant: tabular-nums;
|
||||
list-style: none;
|
||||
font-feature-settings: "tnum";
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 4px 11px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<a-form
|
||||
:model="where"
|
||||
:label-col="{ md: { span: 6 }, sm: { span: 24 } }"
|
||||
:wrapper-col="{ md: { span: 18 }, sm: { span: 24 } }"
|
||||
>
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="水源类型:">
|
||||
<a-select v-model:value="where.drinkingWaterCountyAnalyse.waterSourceType" allowClear showSearch>
|
||||
<a-select-option :value="'1'">地表水</a-select-option>
|
||||
<a-select-option :value="'2'">地下水</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="水源状态:">
|
||||
<a-select v-model:value="where.drinkingWaterCountyAnalyse.drinkingWaterType" allowClear showSearch>
|
||||
<a-select-option :value="'1'">在用</a-select-option>
|
||||
<a-select-option :value="'2'">备用</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="起始时间:" name="monitorStartTime" >
|
||||
<a-month-picker
|
||||
v-model:value="where.monitorStartTime"
|
||||
valueFormat="YYYY-MM"
|
||||
:locale="locale"
|
||||
placeholder="请输入起始时间"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="结束时间:" name="monitorEndTime">
|
||||
<a-month-picker
|
||||
v-model:value="where.monitorEndTime"
|
||||
valueFormat="YYYY-MM"
|
||||
:locale="locale"
|
||||
placeholder="请输入结束时间"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="断面名称:">
|
||||
<a-select v-model:value="where.drinkingWaterCountyAnalyse.sectionNames" mode="multiple" allowClear showSearch>
|
||||
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="监测指标:">
|
||||
<div class="input-item" @click="showModal">
|
||||
<a-checkbox
|
||||
:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
>
|
||||
全选
|
||||
</a-checkbox>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item class="ele-text-right" :wrapper-col="{ span: 24 }">
|
||||
<a-space>
|
||||
<a-button type="primary" @click="searchData">查询</a-button>
|
||||
<a-button @click="reset">重置</a-button>
|
||||
<a-button @click="exportFile">导出Excel</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-modal v-model:visible="visible" width="760px" title="监测指标" @ok="handleOk" @cancel="handleCancel">
|
||||
<div :style="{ borderBottom: '1px solid #E9E9E9', marginBottom: '5px', paddingBottom: '5px' }">
|
||||
<a-checkbox
|
||||
v-model:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="onCheckAllChange"
|
||||
>
|
||||
全选
|
||||
</a-checkbox>
|
||||
</div>
|
||||
|
||||
<a-checkbox-group
|
||||
style="width: 100%"
|
||||
@change="handleChange"
|
||||
v-model:value="filter"
|
||||
>
|
||||
<a-row>
|
||||
<a-col
|
||||
:span="8"
|
||||
v-for="item in filterColumns"
|
||||
:key="item.dataIndex"
|
||||
>
|
||||
<a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-checkbox-group>
|
||||
|
||||
</a-modal>
|
||||
</a-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { filterColumns } from "./../colums/base";
|
||||
import { listInfo } from "@/api/ecology/water/river-plcae";
|
||||
export default {
|
||||
name: "city-search",
|
||||
props: {
|
||||
// 表格搜索条件
|
||||
searchForm: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
indeterminate:false,
|
||||
checkAll: true,
|
||||
where: {
|
||||
drinkingWaterCountyAnalyse:{}
|
||||
},
|
||||
filter:[],
|
||||
columnsKey:[],
|
||||
locale,
|
||||
visible: false,
|
||||
filterColumns: filterColumns,
|
||||
newCloumns:[],
|
||||
oldCloumns:[],
|
||||
filterItem:[],
|
||||
sectionInfo:[]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
searchForm(newV) {
|
||||
this.where = newV;
|
||||
},
|
||||
filterKeys(newKeys){
|
||||
this.initFilter(newKeys)
|
||||
},
|
||||
// 监控修改全选框图标状态
|
||||
filter(newV){
|
||||
if(newV.length !== this.filterColumns.length){
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
if(newV.length){
|
||||
this.indeterminate = true
|
||||
}
|
||||
}else{
|
||||
this.checkAll = true
|
||||
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() {
|
||||
this.where = this.searchForm;
|
||||
this.filter = filterColumns.map((item) => item.dataIndex);
|
||||
this.columnsKey = [...this.filter]
|
||||
// 生成复选框
|
||||
this.newCloumns = [...filterColumns];
|
||||
// 缓存复选框
|
||||
this.oldCloumns = [...filterColumns];
|
||||
// this.$emit("buildColumns", filterColumns);
|
||||
// 根据父级传回来需要去掉勾的值映射到复选框
|
||||
this.initFilter(this.filterKeys);
|
||||
// 将父级回传的搜索条件上传父级进行页面搜索
|
||||
this.emitData(true)
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
emitData(val){
|
||||
// if(val && this.where.startTime && this.where.endTime){
|
||||
if(val){
|
||||
this.searchData();
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化选择
|
||||
initFilter(newKeys){
|
||||
let filterIndex =this.filterColumns.map(item=>(item.dataIndex))
|
||||
const newList = filterIndex.filter((item) => {
|
||||
return newKeys.indexOf(item) == -1
|
||||
})
|
||||
this.filter = newList;
|
||||
},
|
||||
|
||||
onCheckAllChange (e) {
|
||||
this.filter = e.target.checked ? filterColumns.map((item) => item.dataIndex) : []
|
||||
|
||||
},
|
||||
|
||||
handleChange(e) {
|
||||
let newCloumns = [];
|
||||
filterColumns.forEach((item) => {
|
||||
const index = e.indexOf(item.dataIndex);
|
||||
if (index > -1) {
|
||||
newCloumns.push(item);
|
||||
}
|
||||
});
|
||||
this.newCloumns = newCloumns;
|
||||
},
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
drinkingWaterCountyAnalyse:{
|
||||
regionLevel: this.where.drinkingWaterCountyAnalyse.regionLevel
|
||||
}
|
||||
}
|
||||
this.searchData();
|
||||
},
|
||||
searchData() {
|
||||
this.where.filter = [...this.filter]
|
||||
this.$emit("search", this.where);
|
||||
},
|
||||
exportFile() {
|
||||
this.$emit("exportFile");
|
||||
},
|
||||
showModal() {
|
||||
this.visible = true;
|
||||
},
|
||||
handleCancel(){
|
||||
this.visible = false;
|
||||
// 如果是取消,则还原上次勾选项
|
||||
this.filter = this.oldCloumns.map(item=>item.dataIndex)
|
||||
},
|
||||
handleOk() {
|
||||
this.visible = false;
|
||||
this.oldCloumns = [...this.newCloumns];
|
||||
// 选中的所有项
|
||||
// console.log(this.columnsKey)
|
||||
|
||||
// 得到没有选中的项,然后在表头将没选中项去除
|
||||
let filterKey = []
|
||||
this.columnsKey.forEach(key=>{
|
||||
if(this.filter.indexOf(key) == -1){
|
||||
filterKey.push(key)
|
||||
}
|
||||
})
|
||||
|
||||
this.$emit("filterColumns", filterKey);
|
||||
|
||||
// this.$emit("selectKeys", this.columnsKey);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ant-calendar-picker {
|
||||
width: 100%;
|
||||
}
|
||||
.input-item {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-variant: tabular-nums;
|
||||
list-style: none;
|
||||
font-feature-settings: "tnum";
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 4px 11px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<a-form
|
||||
:model="where"
|
||||
:label-col="{ md: { span: 6 }, sm: { span: 24 } }"
|
||||
:wrapper-col="{ md: { span: 18 }, sm: { span: 24 } }"
|
||||
>
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="水源类型:">
|
||||
<a-select v-model:value="where.drinkingWaterVillageAnalyse.waterSourceType" allowClear showSearch>
|
||||
<a-select-option :value="'1'">地表水</a-select-option>
|
||||
<a-select-option :value="'2'">地下水</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="水源状态:">
|
||||
<a-select v-model:value="where.drinkingWaterVillageAnalyse.drinkingWaterType" allowClear showSearch>
|
||||
<a-select-option :value="'1'">在用</a-select-option>
|
||||
<a-select-option :value="'2'">备用</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="起始时间:" name="monitorStartTime" >
|
||||
<a-month-picker
|
||||
v-model:value="where.monitorStartTime"
|
||||
valueFormat="YYYY-MM"
|
||||
:locale="locale"
|
||||
placeholder="请输入起始时间"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="结束时间:" name="monitorEndTime">
|
||||
<a-month-picker
|
||||
v-model:value="where.monitorEndTime"
|
||||
valueFormat="YYYY-MM"
|
||||
:locale="locale"
|
||||
placeholder="请输入结束时间"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="断面名称:">
|
||||
<a-select v-model:value="where.drinkingWaterVillageAnalyse.sectionNames" mode="multiple" allowClear showSearch>
|
||||
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item label="监测指标:">
|
||||
<div class="input-item" @click="showModal">
|
||||
<a-checkbox
|
||||
:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
>
|
||||
全选
|
||||
</a-checkbox>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||
<a-form-item class="ele-text-right" :wrapper-col="{ span: 24 }">
|
||||
<a-space>
|
||||
<a-button type="primary" @click="searchData">查询</a-button>
|
||||
<a-button @click="reset">重置</a-button>
|
||||
<a-button @click="exportFile">导出Excel</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-modal v-model:visible="visible" width="760px" title="监测指标" @ok="handleOk" @cancel="handleCancel">
|
||||
<div :style="{ borderBottom: '1px solid #E9E9E9', marginBottom: '5px', paddingBottom: '5px' }">
|
||||
<a-checkbox
|
||||
v-model:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="onCheckAllChange"
|
||||
>
|
||||
全选
|
||||
</a-checkbox>
|
||||
</div>
|
||||
|
||||
<a-checkbox-group
|
||||
style="width: 100%"
|
||||
@change="handleChange"
|
||||
v-model:value="filter"
|
||||
>
|
||||
<a-row>
|
||||
<a-col
|
||||
:span="8"
|
||||
v-for="item in filterColumns"
|
||||
:key="item.dataIndex"
|
||||
>
|
||||
<a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-checkbox-group>
|
||||
|
||||
</a-modal>
|
||||
</a-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { filterColumns } from "./../colums/base";
|
||||
import { listInfo } from "@/api/ecology/water/river-plcae";
|
||||
export default {
|
||||
name: "city-search",
|
||||
props: {
|
||||
// 表格搜索条件
|
||||
searchForm: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
indeterminate:false,
|
||||
checkAll: true,
|
||||
where: {
|
||||
drinkingWaterVillageAnalyse:{}
|
||||
},
|
||||
filter:[],
|
||||
columnsKey:[],
|
||||
locale,
|
||||
visible: false,
|
||||
filterColumns: filterColumns,
|
||||
newCloumns:[],
|
||||
oldCloumns:[],
|
||||
filterItem:[],
|
||||
sectionInfo:[]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
searchForm(newV) {
|
||||
this.where = newV;
|
||||
},
|
||||
filterKeys(newKeys){
|
||||
this.initFilter(newKeys)
|
||||
},
|
||||
// 监控修改全选框图标状态
|
||||
filter(newV){
|
||||
if(newV.length !== this.filterColumns.length){
|
||||
this.checkAll = false
|
||||
this.indeterminate = false
|
||||
if(newV.length){
|
||||
this.indeterminate = true
|
||||
}
|
||||
}else{
|
||||
this.checkAll = true
|
||||
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() {
|
||||
this.where = this.searchForm;
|
||||
this.filter = filterColumns.map((item) => item.dataIndex);
|
||||
this.columnsKey = [...this.filter]
|
||||
// 生成复选框
|
||||
this.newCloumns = [...filterColumns];
|
||||
// 缓存复选框
|
||||
this.oldCloumns = [...filterColumns];
|
||||
// this.$emit("buildColumns", filterColumns);
|
||||
// 根据父级传回来需要去掉勾的值映射到复选框
|
||||
this.initFilter(this.filterKeys);
|
||||
// 将父级回传的搜索条件上传父级进行页面搜索
|
||||
this.emitData(true)
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
emitData(val){
|
||||
// if(val && this.where.startTime && this.where.endTime){
|
||||
if(val){
|
||||
this.searchData();
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化选择
|
||||
initFilter(newKeys){
|
||||
let filterIndex =this.filterColumns.map(item=>(item.dataIndex))
|
||||
const newList = filterIndex.filter((item) => {
|
||||
return newKeys.indexOf(item) == -1
|
||||
})
|
||||
this.filter = newList;
|
||||
},
|
||||
|
||||
onCheckAllChange (e) {
|
||||
this.filter = e.target.checked ? filterColumns.map((item) => item.dataIndex) : []
|
||||
|
||||
},
|
||||
|
||||
handleChange(e) {
|
||||
let newCloumns = [];
|
||||
filterColumns.forEach((item) => {
|
||||
const index = e.indexOf(item.dataIndex);
|
||||
if (index > -1) {
|
||||
newCloumns.push(item);
|
||||
}
|
||||
});
|
||||
this.newCloumns = newCloumns;
|
||||
},
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
drinkingWaterVillageAnalyse:{
|
||||
regionLevel: this.where.drinkingWaterVillageAnalyse.regionLevel
|
||||
}
|
||||
}
|
||||
this.searchData();
|
||||
},
|
||||
searchData() {
|
||||
this.where.filter = [...this.filter]
|
||||
this.$emit("search", this.where);
|
||||
},
|
||||
exportFile() {
|
||||
this.$emit("exportFile");
|
||||
},
|
||||
showModal() {
|
||||
this.visible = true;
|
||||
},
|
||||
handleCancel(){
|
||||
this.visible = false;
|
||||
// 如果是取消,则还原上次勾选项
|
||||
this.filter = this.oldCloumns.map(item=>item.dataIndex)
|
||||
},
|
||||
handleOk() {
|
||||
this.visible = false;
|
||||
this.oldCloumns = [...this.newCloumns];
|
||||
// 选中的所有项
|
||||
// console.log(this.columnsKey)
|
||||
|
||||
// 得到没有选中的项,然后在表头将没选中项去除
|
||||
let filterKey = []
|
||||
this.columnsKey.forEach(key=>{
|
||||
if(this.filter.indexOf(key) == -1){
|
||||
filterKey.push(key)
|
||||
}
|
||||
})
|
||||
|
||||
this.$emit("filterColumns", filterKey);
|
||||
|
||||
// this.$emit("selectKeys", this.columnsKey);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ant-calendar-picker {
|
||||
width: 100%;
|
||||
}
|
||||
.input-item {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-variant: tabular-nums;
|
||||
list-style: none;
|
||||
font-feature-settings: "tnum";
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 4px 11px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
214
src/views/water/drinking-water/statistic/countryside/base.vue
Normal file
214
src/views/water/drinking-water/statistic/countryside/base.vue
Normal file
@@ -0,0 +1,214 @@
|
||||
<!--农村 检测数据报送表-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
饮用水源水质监测累积月份统计样品数:{{count}}个
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #waterCode="{ text, record }">
|
||||
<span>
|
||||
{{
|
||||
record.reportTime == null
|
||||
? (text = "")
|
||||
: record.reportTime.substr(5, 2) == "01" ||
|
||||
record.reportTime.substr(5, 2) == "02" ||
|
||||
record.reportTime.substr(5, 2) == "03" ||
|
||||
record.reportTime.substr(5, 2) == "12"
|
||||
? (text = "K")
|
||||
: record.reportTime.substr(5, 2) == "04" ||
|
||||
record.reportTime.substr(5, 2) == "05" ||
|
||||
record.reportTime.substr(5, 2) == "10" ||
|
||||
record.reportTime.substr(5, 2) == "11"
|
||||
? (text = "P")
|
||||
: record.reportTime.substr(5, 2) == "06" ||
|
||||
record.reportTime.substr(5, 2) == "07" ||
|
||||
record.reportTime.substr(5, 2) == "08" ||
|
||||
record.reportTime.substr(5, 2) == "09"
|
||||
? (text = "F")
|
||||
: (text = "无采样时间")
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
villageAnalysePageData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { tableColumns } from "./../colums/base";
|
||||
import Search from "./../components/countySideSeatch.vue";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search,
|
||||
},
|
||||
props: {
|
||||
// 表格搜索条件
|
||||
searchForm: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
filterKeys: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
count:0,
|
||||
current:0,
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource: [],
|
||||
selection: [],
|
||||
columns: [...tableColumns],
|
||||
|
||||
// 表格列配置
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
filterKeys(newKeys) {
|
||||
this.filterColumns(newKeys);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
villageAnalysePageData(this.where).then(res=>{
|
||||
this.loading = false;
|
||||
if(res.data.code){
|
||||
this.$message.error(res.data.msg);
|
||||
this.datasource = []
|
||||
this.count = 0
|
||||
}else{
|
||||
this.datasource = res.data.data
|
||||
this.count = res.data.data
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
JumpFieldClick(record, column) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
// 传上父级
|
||||
changeFilter(data) {
|
||||
this.$emit("changeFilter", data);
|
||||
},
|
||||
//动态修改表头
|
||||
filterColumns(keys) {
|
||||
if (!Array.isArray(keys)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let newCloumns = [...tableColumns];
|
||||
|
||||
let filterIndex = [];
|
||||
newCloumns.forEach((item, index) => {
|
||||
if (keys.indexOf(item.dataIndex) > -1) {
|
||||
filterIndex.push(index);
|
||||
}
|
||||
});
|
||||
|
||||
const newList = newCloumns.filter((item, index) => {
|
||||
return filterIndex.indexOf(index) == -1;
|
||||
});
|
||||
this.columns = newList;
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data) {
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
const columns = [...tableColumns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.footer{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane tab="监测数据报送表" key="base" >
|
||||
<base-statistic :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base'"></base-statistic>
|
||||
</a-tab-pane>
|
||||
<!-- <a-tab-pane tab="报送情况说明表" key="base1">
|
||||
<county-appraise :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base1'"></county-appraise>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="取水量统计" key="base3">
|
||||
<county-water-withdrawal :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base3'"></county-water-withdrawal>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="超标评价" key="base4">
|
||||
<county-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base4'"></county-over-standard>
|
||||
</a-tab-pane> -->
|
||||
<!--<a-tab-pane tab="水质类别" key="base2" >
|
||||
<city-water-quality :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base2'"></city-water-quality>
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane tab="水质统计" key="base7" >
|
||||
<water-quality-count :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base7'"></water-quality-count>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="水质达标情况" key="base8" >
|
||||
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base8'"></water-quality-up>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="备用水源营养指数" key="base5">
|
||||
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base5'"></water-nutritional>
|
||||
</a-tab-pane> -->
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
//市级监测数据报表
|
||||
import BaseStatistic from "./base.vue"
|
||||
// 报送情况说明
|
||||
// import countyAppraise from "./situation.vue"
|
||||
// // 取水量
|
||||
// import countyWaterWithdrawal from "./waterCount.vue"
|
||||
// // 超标评价
|
||||
// import countyOverStandard from './overStandard.vue'
|
||||
// // 水质类别
|
||||
// import cityWaterQuality from "./waterQuality.vue"
|
||||
// // 水质统计
|
||||
// import waterQualityCount from "./waterQualityCount.vue";
|
||||
// // 水质达标情况
|
||||
// import waterQualityUp from "./waterQualityUp.vue";
|
||||
// //综合营养指数
|
||||
|
||||
// import waterNutritional from "./waterNutritional.vue"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'city-com',
|
||||
components: {
|
||||
BaseStatistic,
|
||||
// countyAppraise,
|
||||
// cityWaterQuality,
|
||||
// waterQualityCount,
|
||||
// waterQualityUp,
|
||||
// waterNutritional,
|
||||
// countyWaterWithdrawal,
|
||||
// countyOverStandard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeKey:'base',
|
||||
searchForm:{
|
||||
checked: 1,
|
||||
page:1,
|
||||
limit:10,
|
||||
drinkingWaterVillageAnalyse:{
|
||||
regionLevel:"农村"
|
||||
},
|
||||
},
|
||||
filterKeys:[]
|
||||
};
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeSearch(data){
|
||||
this.searchForm = data
|
||||
},
|
||||
changeFilter(data){
|
||||
this.filterKeys = data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
215
src/views/water/drinking-water/statistic/county/base.vue
Normal file
215
src/views/water/drinking-water/statistic/county/base.vue
Normal file
@@ -0,0 +1,215 @@
|
||||
<!--市级 检测数据报送表-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
饮用水源水质监测累积月份统计样品数:{{count}}个
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #waterCode="{ text, record }">
|
||||
<span>
|
||||
{{
|
||||
record.reportTime == null
|
||||
? (text = "")
|
||||
: record.reportTime.substr(5, 2) == "01" ||
|
||||
record.reportTime.substr(5, 2) == "02" ||
|
||||
record.reportTime.substr(5, 2) == "03" ||
|
||||
record.reportTime.substr(5, 2) == "12"
|
||||
? (text = "K")
|
||||
: record.reportTime.substr(5, 2) == "04" ||
|
||||
record.reportTime.substr(5, 2) == "05" ||
|
||||
record.reportTime.substr(5, 2) == "10" ||
|
||||
record.reportTime.substr(5, 2) == "11"
|
||||
? (text = "P")
|
||||
: record.reportTime.substr(5, 2) == "06" ||
|
||||
record.reportTime.substr(5, 2) == "07" ||
|
||||
record.reportTime.substr(5, 2) == "08" ||
|
||||
record.reportTime.substr(5, 2) == "09"
|
||||
? (text = "F")
|
||||
: (text = "无采样时间")
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
countyPageBsaeData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { tableColumns } from "./../colums/base";
|
||||
import Search from "./../components/countySearch.vue";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search,
|
||||
},
|
||||
props: {
|
||||
// 表格搜索条件
|
||||
searchForm: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
filterKeys: {
|
||||
typeof: Object,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
count:0, //样品数
|
||||
current:0,
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource: [],
|
||||
selection: [],
|
||||
columns: [...tableColumns],
|
||||
|
||||
// 表格列配置
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
filterKeys(newKeys) {
|
||||
this.filterColumns(newKeys);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
countyPageBsaeData(this.where).then(res=>{
|
||||
this.loading = false;
|
||||
if(res.data.code){
|
||||
this.$message.error(res.data.msg);
|
||||
this.datasource = []
|
||||
this.count = 0
|
||||
}else{
|
||||
this.datasource = res.data.data
|
||||
this.count = res.data.count
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
JumpFieldClick(record, column) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
// 传上父级
|
||||
changeFilter(data) {
|
||||
this.$emit("changeFilter", data);
|
||||
},
|
||||
//动态修改表头
|
||||
filterColumns(keys) {
|
||||
if (!Array.isArray(keys)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let newCloumns = [...tableColumns];
|
||||
|
||||
let filterIndex = [];
|
||||
newCloumns.forEach((item, index) => {
|
||||
if (keys.indexOf(item.dataIndex) > -1) {
|
||||
filterIndex.push(index);
|
||||
}
|
||||
});
|
||||
|
||||
const newList = newCloumns.filter((item, index) => {
|
||||
return filterIndex.indexOf(index) == -1;
|
||||
});
|
||||
this.columns = newList;
|
||||
},
|
||||
|
||||
// 执行搜索
|
||||
searchData(data) {
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
const columns = [...tableColumns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
arr.push([`饮用水源水质监测累积月份统计样品数:${this.count}个`]);
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.footer{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
99
src/views/water/drinking-water/statistic/county/index.vue
Normal file
99
src/views/water/drinking-water/statistic/county/index.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane tab="监测数据报送表" key="base" >
|
||||
<base-statistic :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base'"></base-statistic>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="报送情况说明表" key="base1">
|
||||
<county-appraise :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base1'"></county-appraise>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="取水量统计" key="base3">
|
||||
<county-water-withdrawal :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base3'"></county-water-withdrawal>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="超标评价" key="base4">
|
||||
<county-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base4'"></county-over-standard>
|
||||
</a-tab-pane>
|
||||
<!--<a-tab-pane tab="水质类别" key="base2" >
|
||||
<city-water-quality :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base2'"></city-water-quality>
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane tab="水质统计" key="base7" >
|
||||
<water-quality-count :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base7'"></water-quality-count>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="水质达标情况" key="base8" >
|
||||
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base8'"></water-quality-up>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="备用水源营养指数" key="base5">
|
||||
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base5'"></water-nutritional>
|
||||
</a-tab-pane> -->
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
//市级监测数据报表
|
||||
import BaseStatistic from "./base.vue"
|
||||
// 报送情况说明
|
||||
import countyAppraise from "./situation.vue"
|
||||
// 取水量
|
||||
import countyWaterWithdrawal from "./waterCount.vue"
|
||||
// 超标评价
|
||||
import countyOverStandard from './overStandard.vue'
|
||||
// // 水质类别
|
||||
// import cityWaterQuality from "./waterQuality.vue"
|
||||
// // 水质统计
|
||||
// import waterQualityCount from "./waterQualityCount.vue";
|
||||
// // 水质达标情况
|
||||
// import waterQualityUp from "./waterQualityUp.vue";
|
||||
// //综合营养指数
|
||||
|
||||
// import waterNutritional from "./waterNutritional.vue"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'city-com',
|
||||
components: {
|
||||
BaseStatistic,
|
||||
countyAppraise,
|
||||
// cityWaterQuality,
|
||||
// waterQualityCount,
|
||||
// waterQualityUp,
|
||||
// waterNutritional,
|
||||
countyWaterWithdrawal,
|
||||
countyOverStandard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeKey:'base',
|
||||
searchForm:{
|
||||
checked: 1,
|
||||
page:1,
|
||||
limit:10,
|
||||
drinkingWaterCountyAnalyse:{
|
||||
regionLevel:"县级"
|
||||
},
|
||||
},
|
||||
filterKeys:[]
|
||||
};
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeSearch(data){
|
||||
this.searchForm = data
|
||||
},
|
||||
changeFilter(data){
|
||||
this.filterKeys = data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
157
src/views/water/drinking-water/statistic/county/overStandard.vue
Normal file
157
src/views/water/drinking-water/statistic/county/overStandard.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<!--超标评价-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import Search from "./../components/citySearch.vue";
|
||||
import {
|
||||
countyOverStandardCount
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
datasource:[],
|
||||
selection: [],
|
||||
columns: [
|
||||
{title: "城市名称",dataIndex: "sourceWaterName",sorter: true,},
|
||||
{title: "水源地名称",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "取水量(万m3)",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "超标水源取水量",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "超标项目",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "水源性质",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
],
|
||||
|
||||
// 表格列配置
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
countyOverStandardCount(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) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
|
||||
// 传上父级
|
||||
changeFilter(data){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [...this.columns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
298
src/views/water/drinking-water/statistic/county/situation.vue
Normal file
298
src/views/water/drinking-water/statistic/county/situation.vue
Normal file
@@ -0,0 +1,298 @@
|
||||
<!--情况说明-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
|
||||
<ele-pro-table ref="table" row-key="drinkingWaterId" :datasource="datasource" :columns="columns" :where="where"
|
||||
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
|
||||
<template #county="{text}">
|
||||
{{text="市区"}}
|
||||
</template>
|
||||
|
||||
<template #enumber="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index3'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index3']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index3')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #wnumber="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index4'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index4']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index4')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #desc="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index6'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index6']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index6')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #remark="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='remark'" class="editable-cell-input-wrapper">
|
||||
<a-textarea class="edit-input" v-model:value="editableData[index]['remark']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'remark')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</ele-pro-table>
|
||||
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
countyDescripFormData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
// import moment from "moment";
|
||||
|
||||
import Search from "./../components/countySearch.vue";
|
||||
import { CheckOutlined, EditOutlined } from '@ant-design/icons-vue';
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search,
|
||||
CheckOutlined,
|
||||
EditOutlined,
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
editableData:[],
|
||||
// 表格数据接口
|
||||
datasource:{},
|
||||
selection: [],
|
||||
columns:[
|
||||
{key: "index",title:"序号",dataIndex: "index",width: 48,align: "center",customRender: ({ index }) => index + 1,},
|
||||
{title:"城市",dataIndex:"city",},
|
||||
{title:"县城",dataIndex:"county",slots:{customRender:'county'}},
|
||||
{title:"水源地名称",dataIndex:"sourceWaterName",},
|
||||
{title:"类型",dataIndex:"waterSourceProperty",},
|
||||
{title:"监测时间",dataIndex:"reportTime"},
|
||||
// {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:"index3",
|
||||
slots: {
|
||||
customRender: 'enumber',
|
||||
},
|
||||
},
|
||||
{title:"外送分析项目个数",dataIndex:"index4", slots: {
|
||||
customRender: 'wnumber',
|
||||
},},
|
||||
{title:"超标项目",dataIndex:"index5",},
|
||||
{title:"情况说明或原因",dataIndex:"index6", slots: {
|
||||
customRender: 'desc',
|
||||
}},
|
||||
{title:"备注",dataIndex:"remark",slots: {
|
||||
customRender: 'remark',
|
||||
},},
|
||||
],
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
page:1,
|
||||
limit:10
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
countyDescripFormData(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,key){
|
||||
this.editableData[index] = item
|
||||
this.editableData[index].edable=key
|
||||
},
|
||||
|
||||
save(index){
|
||||
// console.log('item',this.editableData[index]['index3'])
|
||||
// // console.log('item.remark', item.remark)
|
||||
this.datasource[index] = {...this.editableData[index]}
|
||||
this.editableData = []
|
||||
|
||||
},
|
||||
|
||||
JumpFieldClick(record, column) {
|
||||
console.log(column.dataIndex)
|
||||
},
|
||||
// 传上父级
|
||||
changeFilter(data){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
|
||||
this.columns[6].filters = []
|
||||
if(this.where.drinkingWaterCountyAnalyse.waterSourceType ==1 ){
|
||||
// 地表水
|
||||
this.columns[6].filters = [
|
||||
{
|
||||
text: '61',
|
||||
value: '61',
|
||||
},
|
||||
{
|
||||
text: '63',
|
||||
value: '63',
|
||||
},
|
||||
{
|
||||
text: '64',
|
||||
value: '64',
|
||||
},
|
||||
]
|
||||
}
|
||||
if(this.where.drinkingWaterCountyAnalyse.waterSourceType ==2 ){
|
||||
// 地下水
|
||||
this.columns[6].filters = [
|
||||
{
|
||||
text: '39',
|
||||
value: '39',
|
||||
},
|
||||
{
|
||||
text: '94',
|
||||
value: '94',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
...this.columns,
|
||||
];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.datasource.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.editable-cell-input-wrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.edit-input{
|
||||
margin-right: 5px;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
.editable-cell-text-wrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
</style>
|
||||
159
src/views/water/drinking-water/statistic/county/waterCount.vue
Normal file
159
src/views/water/drinking-water/statistic/county/waterCount.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<!--取水量统计-->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<!-- 搜索表单 -->
|
||||
<search
|
||||
:searchForm="searchForm"
|
||||
:filterKeys="filterKeys"
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="datasource"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
<!-- 编辑弹窗 -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import Search from "./../components/countySearch.vue";
|
||||
|
||||
import {
|
||||
getWaterCount
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
|
||||
export default {
|
||||
name: "DrinkingWaterBase",
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
props:{
|
||||
// 表格搜索条件
|
||||
searchForm:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
filterKeys:{
|
||||
typeof:Object,
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
selection: [],
|
||||
columns: [
|
||||
{title: "水源名称",dataIndex: "sourceWaterName",sorter: true,},
|
||||
{title: "取水量",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
],
|
||||
|
||||
// 表格列配置
|
||||
|
||||
// palceOptions: [],
|
||||
// areaOptions: [],
|
||||
// roadOptions: [],
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
getWaterCount(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) {
|
||||
console.log(column.dataIndex);
|
||||
},
|
||||
|
||||
// 传上父级
|
||||
changeFilter(data){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
// 执行搜索
|
||||
searchData(data){
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [...this.columns];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
@@ -1,35 +1,16 @@
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tabs v-model:activeKey="activeWrapKey">
|
||||
<a-tab-pane key="city" tab="市级">
|
||||
<a-tabs v-model:active="activeCity">
|
||||
<a-tab-pane tab="监测数据报送表" key="city" >
|
||||
<base-statistic></base-statistic>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="报送情况说明表" key="base1">
|
||||
<city-appraise></city-appraise>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="取水量统计" key="base3">
|
||||
<city-water-withdrawal></city-water-withdrawal>
|
||||
|
||||
</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>
|
||||
<City />
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane key="county" tab="县级">
|
||||
<a-tabs v-model:active="activeCounty">
|
||||
<County />
|
||||
<!-- <a-tabs v-model:active="activeCounty">
|
||||
<a-tab-pane tab="监测数据报送表" key="County">
|
||||
<county-data></county-data>
|
||||
<county-data :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></county-data>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="报送情况说明表" key="base1">
|
||||
<county-appraise></county-appraise>
|
||||
@@ -46,11 +27,12 @@
|
||||
<a-tab-pane tab="综合指数" key="base5">
|
||||
<county-avg-index></county-avg-index>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-tabs> -->
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane key="village" tab="农村">
|
||||
<a-tabs v-model:active="activeVillage">
|
||||
<Countryside />
|
||||
<!-- <a-tabs v-model:active="activeVillage">
|
||||
<a-tab-pane tab="数据总览" key="village">
|
||||
<village></village>
|
||||
</a-tab-pane>
|
||||
@@ -66,7 +48,7 @@
|
||||
<a-tab-pane tab="综合指数" key="base5">
|
||||
<village-avg-index></village-avg-index>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-tabs> -->
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
@@ -74,68 +56,59 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import City from './city/index.vue'
|
||||
import County from './county/index.vue'
|
||||
import Countryside from './countryside/index.vue'
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
import BaseStatistic from "./cityDate.vue"
|
||||
import countyData from "./countyData.vue"
|
||||
import village from "./villageData.vue"
|
||||
import cityAppraise from "./cityAppraise.vue"
|
||||
import countyAppraise from "./countyAppraise.vue"
|
||||
import villageAppraise from "./villageAppraise.vue"
|
||||
import cityWaterQuality from "./cityWaterQuality.vue"
|
||||
import countyWaterQuality from "./countyWaterQuality.vue"
|
||||
import villageWaterQuality from "./villageWaterQuality.vue"
|
||||
import cityAvgIndex from "./city-avg-index.vue"
|
||||
import countyAvgIndex from "./county-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 villageMonthStandard from "./village-base-standard.vue"
|
||||
import cityWaterWithdrawal from "./cityWaterWithdrawal.vue"
|
||||
import countyWaterWithdrawal from "./countyWaterWithdrawal.vue"
|
||||
|
||||
// import QuarterStatistic from "./quarter.vue";
|
||||
// import Compare from "./compare.vue"
|
||||
// import AverageStatistic from "./average.vue"
|
||||
//县级监测数据报表
|
||||
// import countyData from "./countyData.vue"
|
||||
// import countyData from "./county/base.vue"
|
||||
|
||||
// import village from "./villageData.vue"
|
||||
|
||||
// import countyAppraise from "./countyAppraise.vue"
|
||||
// import villageAppraise from "./villageAppraise.vue"
|
||||
// import countyWaterQuality from "./countyWaterQuality.vue"
|
||||
// import villageWaterQuality from "./villageWaterQuality.vue"
|
||||
// import countyAvgIndex from "./county-avg-index.vue"
|
||||
// import villageAvgIndex from "./village-avg-index.vue"
|
||||
// import countyMonthStandard from "./county-base-standard.vue"
|
||||
// import villageMonthStandard from "./village-base-standard.vue"
|
||||
// import countyWaterWithdrawal from "./countyWaterWithdrawal.vue"
|
||||
|
||||
|
||||
export default {
|
||||
name: 'DrinkWaterCollectIndex',
|
||||
components: {
|
||||
BaseStatistic,
|
||||
countyData,
|
||||
village,
|
||||
cityAppraise,
|
||||
countyAppraise,
|
||||
villageAppraise,
|
||||
cityWaterQuality,
|
||||
countyWaterQuality,
|
||||
villageWaterQuality,
|
||||
cityAvgIndex,
|
||||
countyAvgIndex,
|
||||
villageAvgIndex,
|
||||
cityMonthStandard,
|
||||
countyMonthStandard,
|
||||
villageMonthStandard,
|
||||
cityWaterWithdrawal,
|
||||
countyWaterWithdrawal
|
||||
// QuarterStatistic,
|
||||
// Compare,
|
||||
// AverageStatistic
|
||||
City,
|
||||
County,
|
||||
Countryside,
|
||||
// countyData,
|
||||
// village,
|
||||
// countyAppraise,
|
||||
// villageAppraise,
|
||||
// countyWaterQuality,
|
||||
// villageWaterQuality,
|
||||
// countyAvgIndex,
|
||||
// villageAvgIndex,
|
||||
// countyMonthStandard,
|
||||
// villageMonthStandard,
|
||||
// countyWaterWithdrawal,
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeKey: 'city',
|
||||
activeCity:'city',
|
||||
activeCounty:'county',
|
||||
activeVillage:'village',
|
||||
activeWrapKey: 'city',
|
||||
};
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user