Merge remote-tracking branch 'origin/yinyongshui'
This commit is contained in:
@@ -1,6 +1,24 @@
|
|||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
|
// 获取市级下拉
|
||||||
|
|
||||||
|
export const listInfoUrl = '/drinkingWater/drinkingWaterDict/list';
|
||||||
|
export const listInfo = function (data) {
|
||||||
|
return axios.get(listInfoUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 县级
|
||||||
|
export const countyListInfoUrl = '/drinkingWater/drinkingWaterCountyDict/list';
|
||||||
|
export const countyListInfo = function (data) {
|
||||||
|
return axios.get(countyListInfoUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 村级
|
||||||
|
export const villageListInfoUrl = '/drinkingWater/drinkingWaterVillageBottomDict/list';
|
||||||
|
export const villageListInfo = function (data) {
|
||||||
|
return axios.get(villageListInfoUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
// 市级监测数据报送表
|
// 市级监测数据报送表
|
||||||
export const pageBsaeListUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
export const pageBsaeListUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||||
@@ -36,7 +54,7 @@ export const waterQualityData = function (data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//市级—水质统计
|
//市级—水质统计
|
||||||
export const waterQualityCountUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
export const waterQualityCountUrl = '/drinkingWater/drinkingWater/getWaterQualityStatistics';
|
||||||
export const waterQualityCountData = function (data) {
|
export const waterQualityCountData = function (data) {
|
||||||
return axios.post(waterQualityCountUrl,data)
|
return axios.post(waterQualityCountUrl,data)
|
||||||
}
|
}
|
||||||
@@ -48,7 +66,7 @@ export const waterQualityUpData = function (data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//市级—备用水源营养指数
|
//市级—备用水源营养指数
|
||||||
export const waterNutritionalUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
export const waterNutritionalUrl = '/drinkingWater/drinkingWater/getCompositeNutritionIndex';
|
||||||
export const waterNutritionalData = function (data) {
|
export const waterNutritionalData = function (data) {
|
||||||
return axios.post(waterNutritionalUrl,data)
|
return axios.post(waterNutritionalUrl,data)
|
||||||
}
|
}
|
||||||
@@ -80,6 +98,12 @@ export const countyWaterQualityData = function (data) {
|
|||||||
return axios.post(countyWaterQualityUrl,data)
|
return axios.post(countyWaterQualityUrl,data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//县级—水质统计
|
||||||
|
export const countyWaterQualityCountUrl = '/drinkingWater/drinkingWater/getWaterQualityStatistics';
|
||||||
|
export const countyWaterQualityCountData = function (data) {
|
||||||
|
return axios.post(countyWaterQualityCountUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
//县级—水质达标情况
|
//县级—水质达标情况
|
||||||
export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getWaterQualityStandard';
|
export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getWaterQualityStandard';
|
||||||
export const countyWaterQualityUpData = function (data) {
|
export const countyWaterQualityUpData = function (data) {
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ export default {
|
|||||||
datasource:{},
|
datasource:{},
|
||||||
selection: [],
|
selection: [],
|
||||||
columns:[
|
columns:[
|
||||||
{title:"年份",dataIndex:"city",},
|
{title:"年份",dataIndex:"year",},
|
||||||
{title:"指标",dataIndex:"place",},
|
{title:"指标",dataIndex:"targetName",},
|
||||||
{title:"平均值",dataIndex:"sourceWaterName",},
|
{title:"平均值",dataIndex:"averageValue",},
|
||||||
{title:"最大值",dataIndex:"waterSourceProperty",},
|
{title:"最大值",dataIndex:"maxValue",},
|
||||||
{title:"最小值",dataIndex:"",},
|
{title:"最小值",dataIndex:"minValue",},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ const tableColumns = [
|
|||||||
{ title: "城市代码", dataIndex: "cityCode", sorter: true, },
|
{ title: "城市代码", dataIndex: "cityCode", sorter: true, },
|
||||||
{ title: "重点城市区分", dataIndex: "keyCity", sorter: true, },
|
{ title: "重点城市区分", dataIndex: "keyCity", sorter: true, },
|
||||||
{ title: "南北方城市", dataIndex: "cityOrientation", sorter: true, },
|
{ title: "南北方城市", dataIndex: "cityOrientation", sorter: true, },
|
||||||
{ title: "断面名称", dataIndex: "place", sorter: true, },
|
{ title: "断面名称", dataIndex: "sectionName", sorter: true, },
|
||||||
{ title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
{ title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
||||||
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
||||||
{ title: "所属水系", dataIndex: "subordinateWater", sorter: true, },
|
{ title: "所属水系", dataIndex: "subordinateWater", sorter: true, },
|
||||||
@@ -294,7 +294,7 @@ const tableColumns2 = [
|
|||||||
{title:"县域名称",dataIndex:"countyName",sorter:true},
|
{title:"县域名称",dataIndex:"countyName",sorter:true},
|
||||||
{title:"县域代码",dataIndex:"countyCode",sorter:true},
|
{title:"县域代码",dataIndex:"countyCode",sorter:true},
|
||||||
// { title: "南北方城市", dataIndex: "cityOrientation", sorter: true, },
|
// { title: "南北方城市", dataIndex: "cityOrientation", sorter: true, },
|
||||||
{ title: "断面名称", dataIndex: "place", sorter: true, },
|
{ title: "断面名称", dataIndex: "sectionName", sorter: true, },
|
||||||
// { title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
// { title: "断面代码", dataIndex: "sectionCode", sorter: true, },
|
||||||
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
{ title: "水源名称", dataIndex: "sourceWaterName", sorter: true, },
|
||||||
{ title: "所属水系", dataIndex: "subordinateWater", sorter: true, },
|
{ title: "所属水系", dataIndex: "subordinateWater", sorter: true, },
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||||
import { filterColumns } from "./../colums/base";
|
import { filterColumns } from "./../colums/base";
|
||||||
import { listInfo } from "@/api/ecology/water/river-plcae";
|
import { listInfo } from "@/api/ecology/new-drinking-water";
|
||||||
export default {
|
export default {
|
||||||
name: "city-search",
|
name: "city-search",
|
||||||
props: {
|
props: {
|
||||||
@@ -248,7 +248,9 @@ export default {
|
|||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData() {
|
||||||
this.where.filter = [...this.filter]
|
if(Array.isArray(this.filter) && this.filter.length){
|
||||||
|
this.where.filter = [...this.filter]
|
||||||
|
}
|
||||||
this.$emit("search", this.where);
|
this.$emit("search", this.where);
|
||||||
},
|
},
|
||||||
exportFile() {
|
exportFile() {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||||
import { filterColumns } from "./../colums/base";
|
import { filterColumns } from "./../colums/base";
|
||||||
import { listInfo } from "@/api/ecology/water/river-plcae";
|
import { countyListInfo as listInfo } from "@/api/ecology/new-drinking-water";
|
||||||
export default {
|
export default {
|
||||||
name: "city-search",
|
name: "city-search",
|
||||||
props: {
|
props: {
|
||||||
@@ -248,7 +248,9 @@ export default {
|
|||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData() {
|
||||||
this.where.filter = [...this.filter]
|
if(Array.isArray(this.filter) && this.filter.length){
|
||||||
|
this.where.filter = [...this.filter]
|
||||||
|
}
|
||||||
this.$emit("search", this.where);
|
this.$emit("search", this.where);
|
||||||
},
|
},
|
||||||
exportFile() {
|
exportFile() {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||||
import { filterColumns } from "./../colums/base";
|
import { filterColumns } from "./../colums/base";
|
||||||
import { listInfo } from "@/api/ecology/water/river-plcae";
|
import { villageListInfo as listInfo } from "@/api/ecology/new-drinking-water";
|
||||||
export default {
|
export default {
|
||||||
name: "city-search",
|
name: "city-search",
|
||||||
props: {
|
props: {
|
||||||
@@ -248,7 +248,9 @@ export default {
|
|||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData() {
|
||||||
this.where.filter = [...this.filter]
|
if(Array.isArray(this.filter) && this.filter.length){
|
||||||
|
this.where.filter = [...this.filter]
|
||||||
|
}
|
||||||
this.$emit("search", this.where);
|
this.$emit("search", this.where);
|
||||||
},
|
},
|
||||||
exportFile() {
|
exportFile() {
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base8'"></water-quality-up>
|
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base8'"></water-quality-up>
|
||||||
</a-tab-pane>
|
</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="base1">
|
<!-- <a-tab-pane tab="报送情况说明表" key="base1">
|
||||||
<county-appraise :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base1'"></county-appraise>
|
<county-appraise :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base1'"></county-appraise>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -24,9 +28,7 @@
|
|||||||
</a-tab-pane> -->
|
</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="base5">
|
<a-tab-pane tab="备用水源营养指数" key="base5">
|
||||||
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base5'"></water-nutritional>
|
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base5'"></water-nutritional>
|
||||||
@@ -53,7 +55,7 @@
|
|||||||
// 水质类别
|
// 水质类别
|
||||||
import waterQuality from "./waterQuality.vue"
|
import waterQuality from "./waterQuality.vue"
|
||||||
// // 水质统计
|
// // 水质统计
|
||||||
// import waterQualityCount from "./waterQualityCount.vue";
|
import waterQualityCount from "./waterQualityCount.vue";
|
||||||
// 水质达标情况
|
// 水质达标情况
|
||||||
import waterQualityUp from "./waterQualityUp.vue";
|
import waterQualityUp from "./waterQualityUp.vue";
|
||||||
// //综合营养指数
|
// //综合营养指数
|
||||||
@@ -70,7 +72,7 @@
|
|||||||
BaseStatistic,
|
BaseStatistic,
|
||||||
// countyAppraise,
|
// countyAppraise,
|
||||||
waterQuality,
|
waterQuality,
|
||||||
// waterQualityCount,
|
waterQualityCount,
|
||||||
waterQualityUp,
|
waterQualityUp,
|
||||||
// waterNutritional,
|
// waterNutritional,
|
||||||
// countyWaterWithdrawal,
|
// countyWaterWithdrawal,
|
||||||
|
|||||||
@@ -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/countySideSeatch.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:"year",},
|
||||||
|
{title:"指标",dataIndex:"targetName",},
|
||||||
|
{title:"平均值",dataIndex:"averageValue",},
|
||||||
|
{title:"最大值",dataIndex:"maxValue",},
|
||||||
|
{title:"最小值",dataIndex:"minValue",},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
|
// 表格搜索条件
|
||||||
|
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>
|
||||||
@@ -22,11 +22,12 @@
|
|||||||
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base8'"></water-quality-up>
|
<water-quality-up :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base8'"></water-quality-up>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
<a-tab-pane tab="水质统计" key="base7" >
|
<a-tab-pane tab="水质统计" key="base7" >
|
||||||
<water-quality-count :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base7'"></water-quality-count>
|
<water-quality-count :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base7'"></water-quality-count>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a-tab-pane tab="备用水源营养指数" key="base5">
|
<a-tab-pane tab="备用水源营养指数" key="base5">
|
||||||
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base5'"></water-nutritional>
|
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base5'"></water-nutritional>
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
// 水质类别
|
// 水质类别
|
||||||
import waterQuality from "./waterQuality.vue"
|
import waterQuality from "./waterQuality.vue"
|
||||||
// // 水质统计
|
// // 水质统计
|
||||||
// import waterQualityCount from "./waterQualityCount.vue";
|
import waterQualityCount from "./waterQualityCount.vue";
|
||||||
// 水质达标情况
|
// 水质达标情况
|
||||||
import waterQualityUp from "./waterQualityUp.vue";
|
import waterQualityUp from "./waterQualityUp.vue";
|
||||||
// //综合营养指数
|
// //综合营养指数
|
||||||
@@ -70,7 +71,7 @@
|
|||||||
BaseStatistic,
|
BaseStatistic,
|
||||||
countyAppraise,
|
countyAppraise,
|
||||||
waterQuality,
|
waterQuality,
|
||||||
// waterQualityCount,
|
waterQualityCount,
|
||||||
waterQualityUp,
|
waterQualityUp,
|
||||||
// waterNutritional,
|
// waterNutritional,
|
||||||
countyWaterWithdrawal,
|
countyWaterWithdrawal,
|
||||||
|
|||||||
@@ -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/countySearch.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:"year",},
|
||||||
|
{title:"指标",dataIndex:"targetName",},
|
||||||
|
{title:"平均值",dataIndex:"averageValue",},
|
||||||
|
{title:"最大值",dataIndex:"maxValue",},
|
||||||
|
{title:"最小值",dataIndex:"minValue",},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
|
// 表格搜索条件
|
||||||
|
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>
|
||||||
Reference in New Issue
Block a user