饮用水接口地址更换
This commit is contained in:
@@ -88,26 +88,31 @@ export const countyDescripFormData = function (data) {
|
||||
return axios.post(countyDescripFormUrl,data)
|
||||
}
|
||||
|
||||
//县级—取水量统计
|
||||
export const countyWaterCount = function (data) {
|
||||
return axios.post('/drinkingWater/drinkingWater/analyseCountyPage',data)
|
||||
}
|
||||
|
||||
//县级—超标评价
|
||||
export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/getWaterEvaluate';
|
||||
export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/getCountyWaterEvaluate';
|
||||
export const countyOverStandardCount = function (data) {
|
||||
return axios.post(countyOverStandardtUrl,data)
|
||||
}
|
||||
|
||||
//县级—水质类别
|
||||
export const countyWaterQualityUrl = '/drinkingWater/drinkingWater/getWaterQualityCategory';
|
||||
export const countyWaterQualityUrl = '/drinkingWater/drinkingWater/getCountyWaterQualityCategory';
|
||||
export const countyWaterQualityData = function (data) {
|
||||
return axios.post(countyWaterQualityUrl,data)
|
||||
}
|
||||
|
||||
//县级—水质统计
|
||||
export const countyWaterQualityCountUrl = '/drinkingWater/drinkingWater/getWaterQualityStatistics';
|
||||
export const countyWaterQualityCountUrl = '/drinkingWater/drinkingWater/getCountyWaterQualityStatistics';
|
||||
export const countyWaterQualityCountData = function (data) {
|
||||
return axios.post(countyWaterQualityCountUrl,data)
|
||||
}
|
||||
|
||||
//县级—水质达标情况
|
||||
export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getWaterQualityStandard';
|
||||
export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getCountyWaterQualityStandard';
|
||||
export const countyWaterQualityUpData = function (data) {
|
||||
return axios.post(countyWaterQualityUpUrl,data)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
<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="base9">
|
||||
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base9'"></water-nutritional>
|
||||
</a-tab-pane> -->
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -51,7 +53,8 @@
|
||||
import waterQualityCount from "./waterQualityCount.vue";
|
||||
// 水质达标情况
|
||||
import waterQualityUp from "./waterQualityUp.vue";
|
||||
|
||||
//综合营养指数
|
||||
// import waterNutritional from "./waterNutritional.vue"
|
||||
|
||||
export default {
|
||||
name: 'city-com',
|
||||
@@ -61,7 +64,7 @@
|
||||
waterQuality,
|
||||
waterQualityCount,
|
||||
waterQualityUp,
|
||||
// waterNutritional,
|
||||
// waterNutritional,
|
||||
countyWaterWithdrawal,
|
||||
countyOverStandard
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ import XLSX from "xlsx";
|
||||
import Search from "./../components/countySearch.vue";
|
||||
|
||||
import {
|
||||
getWaterCount
|
||||
countyWaterCount as getWaterCount
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<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)"
|
||||
>
|
||||
</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/countySearch.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:"monitorTime",},
|
||||
{title:"类别",dataIndex:"subordinateWater",},
|
||||
{title:"点位名称",dataIndex:"sectionName",},
|
||||
{title:"水质类别",dataIndex:"waterSourceProperty",},
|
||||
{title: "级别", dataIndex: "nutritionLevel"},
|
||||
{title: "综合营养指数", dataIndex: "compositeNutritionIndex"},
|
||||
],
|
||||
|
||||
|
||||
// 表格列配置
|
||||
|
||||
|
||||
// 表格搜索条件
|
||||
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.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">
|
||||
</style>
|
||||
@@ -32,7 +32,7 @@
|
||||
import XLSX from "xlsx";
|
||||
|
||||
import {
|
||||
waterQualityCountData
|
||||
countyWaterQualityCountData as waterQualityCountData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
|
||||
Reference in New Issue
Block a user