Merge remote-tracking branch 'origin/yinyongshui'
This commit is contained in:
@@ -30,7 +30,7 @@ export const overStandardCount = function (data) {
|
|||||||
|
|
||||||
|
|
||||||
//市级—水质类别
|
//市级—水质类别
|
||||||
export const waterQualityUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
export const waterQualityUrl = '/drinkingWater/drinkingWater/getWaterQualityCategory';
|
||||||
export const waterQualityData = function (data) {
|
export const waterQualityData = function (data) {
|
||||||
return axios.post(waterQualityUrl,data)
|
return axios.post(waterQualityUrl,data)
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ export const waterQualityCountData = function (data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//市级—水质达标情况
|
//市级—水质达标情况
|
||||||
export const waterQualityUpUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
export const waterQualityUpUrl = '/drinkingWater/drinkingWater/getWaterQualityStandard';
|
||||||
export const waterQualityUpData = function (data) {
|
export const waterQualityUpData = function (data) {
|
||||||
return axios.post(waterQualityUpUrl,data)
|
return axios.post(waterQualityUpUrl,data)
|
||||||
}
|
}
|
||||||
@@ -74,6 +74,17 @@ export const countyOverStandardCount = function (data) {
|
|||||||
return axios.post(countyOverStandardtUrl,data)
|
return axios.post(countyOverStandardtUrl,data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//县级—水质类别
|
||||||
|
export const countyWaterQualityUrl = '/drinkingWater/drinkingWater/getWaterQualityCategory';
|
||||||
|
export const countyWaterQualityData = function (data) {
|
||||||
|
return axios.post(countyWaterQualityUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
//县级—水质达标情况
|
||||||
|
export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getWaterQualityStandard';
|
||||||
|
export const countyWaterQualityUpData = function (data) {
|
||||||
|
return axios.post(countyWaterQualityUpUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 农村
|
// 农村
|
||||||
@@ -81,3 +92,15 @@ export const villageAnalysePageUrl = '/drinkingWaterVillage/drinkingWaterVillage
|
|||||||
export const villageAnalysePageData = function (data) {
|
export const villageAnalysePageData = function (data) {
|
||||||
return axios.post(villageAnalysePageUrl,data)
|
return axios.post(villageAnalysePageUrl,data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//农村—水质类别
|
||||||
|
export const villageWaterQualityUrl = '/drinkingWaterVillage/drinkingWaterVillage/getWaterQualityCategoryVillage';
|
||||||
|
export const villageWaterQualityData = function (data) {
|
||||||
|
return axios.post(villageWaterQualityUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
//农村—水质达标情况
|
||||||
|
export const villageWaterQualityUpUrl = '/drinkingWaterVillage/drinkingWaterVillage/getWaterQualityStandard';
|
||||||
|
export const villageWaterQualityUpData = function (data) {
|
||||||
|
return axios.post(villageWaterQualityUpUrl,data)
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
:where="where"
|
:where="where"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
@done="(d) => (data = d.data)"
|
@done="(d) => (data = d.data)"
|
||||||
|
@change="handleTableChange"
|
||||||
>
|
>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
@@ -123,7 +124,9 @@ export default {
|
|||||||
// this.loadOptionData();
|
// this.loadOptionData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleTableChange(page){
|
||||||
|
console.log(page)
|
||||||
|
},
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
getPageData(){
|
getPageData(){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -52,7 +52,6 @@
|
|||||||
// 水质达标情况
|
// 水质达标情况
|
||||||
import waterQualityUp from "./waterQualityUp.vue";
|
import waterQualityUp from "./waterQualityUp.vue";
|
||||||
//综合营养指数
|
//综合营养指数
|
||||||
|
|
||||||
import waterNutritional from "./waterNutritional.vue"
|
import waterNutritional from "./waterNutritional.vue"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,13 +73,13 @@ export default {
|
|||||||
selection: [],
|
selection: [],
|
||||||
columns:[
|
columns:[
|
||||||
{title:"城市名称",dataIndex:"city",},
|
{title:"城市名称",dataIndex:"city",},
|
||||||
{title:"水源地名称",dataIndex:"place",},
|
{title:"水源地名称",dataIndex:"sourceWaterName",},
|
||||||
{title:"期数",dataIndex:"sourceWaterName",},
|
{title:"期数",dataIndex:"sourceWaterName",},
|
||||||
{title:"水源地性质",dataIndex:"waterSourceProperty",},
|
{title:"水源地性质",dataIndex:"waterSourceProperty",},
|
||||||
{title:"断面水质",align: 'center',children: [
|
{title:"断面水质",align: 'center',children: [
|
||||||
{title: "本月", dataIndex: ""},
|
{title: "本月", dataIndex: "waterQualityCategory"},
|
||||||
{title: "上月", dataIndex: ""},
|
{title: "上月", dataIndex: "waterQualityCategoryMom"},
|
||||||
{title: "去年同期", dataIndex: ""},
|
{title: "去年同期", dataIndex: "waterQualityCategoryYoy"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{title:"主要污染指标",dataIndex:"",},
|
{title:"主要污染指标",dataIndex:"",},
|
||||||
@@ -89,7 +89,7 @@ export default {
|
|||||||
// 表格列配置
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
// 表格搜索条件
|
// 表格搜索条件
|
||||||
where: {
|
where: {
|
||||||
checked: 1,
|
checked: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ export default {
|
|||||||
datasource:{},
|
datasource:{},
|
||||||
selection: [],
|
selection: [],
|
||||||
columns:[
|
columns:[
|
||||||
{title:"断面名称",dataIndex:"city",},
|
{title:"断面名称",dataIndex:"sectionName",},
|
||||||
{title:"时间",dataIndex:"place",},
|
{title:"时间",dataIndex:"time",},
|
||||||
{title:"水质目标",dataIndex:"sourceWaterName",},
|
{title:"水质目标",dataIndex:"waterTarget",},
|
||||||
{title:"水质类别",dataIndex:"waterSourceProperty",},
|
{title:"水质类别",dataIndex:"waterQualityCategory",},
|
||||||
{title: "达标情况", dataIndex: ""},
|
{title: "达标情况", dataIndex: "standard"},
|
||||||
{title: "达标率", dataIndex: ""},
|
{title: "达标率", dataIndex: "standardRate"},
|
||||||
// {title:"达标情况",align: 'center',children: [
|
// {title:"达标情况",align: 'center',children: [
|
||||||
// {title: "达标情况", dataIndex: ""},
|
// {title: "达标情况", dataIndex: ""},
|
||||||
// {title: "达标率", dataIndex: ""},
|
// {title: "达标率", dataIndex: ""},
|
||||||
@@ -112,7 +112,12 @@ export default {
|
|||||||
this.$message.error(res.data.msg);
|
this.$message.error(res.data.msg);
|
||||||
this.datasource = []
|
this.datasource = []
|
||||||
}else{
|
}else{
|
||||||
this.datasource = res.data.data
|
let newData = []
|
||||||
|
const resData = res.data.data || {}
|
||||||
|
for(let i in resData){
|
||||||
|
newData.push(resData[i])
|
||||||
|
}
|
||||||
|
this.datasource = newData
|
||||||
}
|
}
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import moment from "moment"
|
// import moment from "moment"
|
||||||
//市级数据总览表格
|
//市级数据总览表格
|
||||||
|
|
||||||
export const filterColumns = [
|
export const filterColumns = [
|
||||||
@@ -147,7 +147,8 @@ const tableColumns = [
|
|||||||
{ title: "取水点经度", dataIndex: "longitude", sorter: true, },
|
{ title: "取水点经度", dataIndex: "longitude", sorter: true, },
|
||||||
{ title: "取水点纬度", dataIndex: "latitude", sorter: true, },
|
{ title: "取水点纬度", dataIndex: "latitude", sorter: true, },
|
||||||
{ title: "本月取水量", dataIndex: "waterWithdrawal", 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: "reportTime", sorter: true, customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||||
|
{ title: "采样时间", dataIndex: "reportTime", sorter: true,},
|
||||||
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
||||||
slots:{customRender:'waterCode' }
|
slots:{customRender:'waterCode' }
|
||||||
},
|
},
|
||||||
@@ -301,7 +302,7 @@ const tableColumns2 = [
|
|||||||
{ title: "取水点经度", dataIndex: "longitude", sorter: true, },
|
{ title: "取水点经度", dataIndex: "longitude", sorter: true, },
|
||||||
{ title: "取水点纬度", dataIndex: "latitude", sorter: true, },
|
{ title: "取水点纬度", dataIndex: "latitude", sorter: true, },
|
||||||
{ title: "本月取水量", dataIndex: "waterWithdrawal", 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: "reportTime", sorter: true},
|
||||||
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
{ title: "水期代码", dataIndex: "waterPhaseCode",sorter: true,
|
||||||
slots:{customRender:'waterCode' }
|
slots:{customRender:'waterCode' }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,6 +4,15 @@
|
|||||||
<a-tab-pane tab="监测数据报送表" key="base" >
|
<a-tab-pane tab="监测数据报送表" key="base" >
|
||||||
<base-statistic :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base'"></base-statistic>
|
<base-statistic :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base'"></base-statistic>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
|
<a-tab-pane tab="水质类别" key="base2" >
|
||||||
|
<water-quality :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base2'"></water-quality>
|
||||||
|
</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="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>
|
||||||
@@ -13,16 +22,12 @@
|
|||||||
<a-tab-pane tab="超标评价" key="base4">
|
<a-tab-pane tab="超标评价" key="base4">
|
||||||
<county-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base4'"></county-over-standard>
|
<county-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base4'"></county-over-standard>
|
||||||
</a-tab-pane> -->
|
</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" >
|
<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="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">
|
<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>
|
||||||
</a-tab-pane> -->
|
</a-tab-pane> -->
|
||||||
@@ -45,12 +50,12 @@
|
|||||||
// import countyWaterWithdrawal from "./waterCount.vue"
|
// import countyWaterWithdrawal from "./waterCount.vue"
|
||||||
// // 超标评价
|
// // 超标评价
|
||||||
// import countyOverStandard from './overStandard.vue'
|
// import countyOverStandard from './overStandard.vue'
|
||||||
// // 水质类别
|
// 水质类别
|
||||||
// import cityWaterQuality 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";
|
||||||
// //综合营养指数
|
// //综合营养指数
|
||||||
|
|
||||||
// import waterNutritional from "./waterNutritional.vue"
|
// import waterNutritional from "./waterNutritional.vue"
|
||||||
@@ -64,9 +69,9 @@
|
|||||||
components: {
|
components: {
|
||||||
BaseStatistic,
|
BaseStatistic,
|
||||||
// countyAppraise,
|
// countyAppraise,
|
||||||
// cityWaterQuality,
|
waterQuality,
|
||||||
// waterQualityCount,
|
// waterQualityCount,
|
||||||
// waterQualityUp,
|
waterQualityUp,
|
||||||
// waterNutritional,
|
// waterNutritional,
|
||||||
// countyWaterWithdrawal,
|
// countyWaterWithdrawal,
|
||||||
// countyOverStandard
|
// countyOverStandard
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
villageWaterQualityData
|
||||||
|
} 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: "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:"sourceWaterName",},
|
||||||
|
{title:"期数",dataIndex:"sourceWaterName",},
|
||||||
|
{title:"水源地性质",dataIndex:"waterSourceProperty",},
|
||||||
|
{title:"断面水质",align: 'center',children: [
|
||||||
|
{title: "本月", dataIndex: "waterQualityCategory"},
|
||||||
|
{title: "上月", dataIndex: "waterQualityCategoryMom"},
|
||||||
|
{title: "去年同期", dataIndex: "waterQualityCategoryYoy"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{title:"主要污染指标",dataIndex:"",},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
|
// 表格搜索条件
|
||||||
|
where: {
|
||||||
|
checked: 1,
|
||||||
|
},
|
||||||
|
// 表格选中数据
|
||||||
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
getPageData(){
|
||||||
|
this.loading = true;
|
||||||
|
villageWaterQualityData(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,165 @@
|
|||||||
|
<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 {
|
||||||
|
villageWaterQualityUpData
|
||||||
|
} 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: "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:"sectionName",},
|
||||||
|
{title:"时间",dataIndex:"time",},
|
||||||
|
{title:"水质目标",dataIndex:"waterTarget",},
|
||||||
|
{title:"水质类别",dataIndex:"waterQualityCategory",},
|
||||||
|
{title: "达标情况", dataIndex: "standard"},
|
||||||
|
{title: "达标率", dataIndex: "standardRate"},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
|
// 表格搜索条件
|
||||||
|
where: {
|
||||||
|
checked: 1,
|
||||||
|
},
|
||||||
|
// 表格选中数据
|
||||||
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
getPageData(){
|
||||||
|
this.loading = true;
|
||||||
|
villageWaterQualityUpData(this.where).then(res=>{
|
||||||
|
this.loading = false;
|
||||||
|
if(res.data.code){
|
||||||
|
this.$message.error(res.data.msg);
|
||||||
|
this.datasource = []
|
||||||
|
}else{
|
||||||
|
let newData = []
|
||||||
|
const resData = res.data.data || {}
|
||||||
|
for(let i in resData){
|
||||||
|
newData.push(resData[i])
|
||||||
|
}
|
||||||
|
this.datasource = newData
|
||||||
|
}
|
||||||
|
}).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>
|
||||||
@@ -13,16 +13,21 @@
|
|||||||
<a-tab-pane tab="超标评价" key="base4">
|
<a-tab-pane tab="超标评价" key="base4">
|
||||||
<county-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base4'"></county-over-standard>
|
<county-over-standard :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base4'"></county-over-standard>
|
||||||
</a-tab-pane>
|
</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 tab="水质类别" key="base2" >
|
||||||
|
<water-quality :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base2'"></water-quality>
|
||||||
</a-tab-pane>
|
</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="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="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">
|
<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>
|
||||||
</a-tab-pane> -->
|
</a-tab-pane> -->
|
||||||
@@ -45,12 +50,12 @@
|
|||||||
import countyWaterWithdrawal from "./waterCount.vue"
|
import countyWaterWithdrawal from "./waterCount.vue"
|
||||||
// 超标评价
|
// 超标评价
|
||||||
import countyOverStandard from './overStandard.vue'
|
import countyOverStandard from './overStandard.vue'
|
||||||
// // 水质类别
|
// 水质类别
|
||||||
// import cityWaterQuality 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";
|
||||||
// //综合营养指数
|
// //综合营养指数
|
||||||
|
|
||||||
// import waterNutritional from "./waterNutritional.vue"
|
// import waterNutritional from "./waterNutritional.vue"
|
||||||
@@ -64,9 +69,9 @@
|
|||||||
components: {
|
components: {
|
||||||
BaseStatistic,
|
BaseStatistic,
|
||||||
countyAppraise,
|
countyAppraise,
|
||||||
// cityWaterQuality,
|
waterQuality,
|
||||||
// waterQualityCount,
|
// waterQualityCount,
|
||||||
// waterQualityUp,
|
waterQualityUp,
|
||||||
// waterNutritional,
|
// waterNutritional,
|
||||||
countyWaterWithdrawal,
|
countyWaterWithdrawal,
|
||||||
countyOverStandard
|
countyOverStandard
|
||||||
|
|||||||
183
src/views/water/drinking-water/statistic/county/waterQuality.vue
Normal file
183
src/views/water/drinking-water/statistic/county/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 {
|
||||||
|
countyWaterQualityData
|
||||||
|
} 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:"city",},
|
||||||
|
{title:"水源地名称",dataIndex:"sourceWaterName",},
|
||||||
|
{title:"期数",dataIndex:"sourceWaterName",},
|
||||||
|
{title:"水源地性质",dataIndex:"waterSourceProperty",},
|
||||||
|
{title:"断面水质",align: 'center',children: [
|
||||||
|
{title: "本月", dataIndex: "waterQualityCategory"},
|
||||||
|
{title: "上月", dataIndex: "waterQualityCategoryMom"},
|
||||||
|
{title: "去年同期", dataIndex: "waterQualityCategoryYoy"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{title:"主要污染指标",dataIndex:"",},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
|
// 表格搜索条件
|
||||||
|
where: {
|
||||||
|
checked: 1,
|
||||||
|
},
|
||||||
|
// 表格选中数据
|
||||||
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
getPageData(){
|
||||||
|
this.loading = true;
|
||||||
|
countyWaterQualityData(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,171 @@
|
|||||||
|
<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 {
|
||||||
|
countyWaterQualityUpData
|
||||||
|
} 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:"sectionName",},
|
||||||
|
{title:"时间",dataIndex:"time",},
|
||||||
|
{title:"水质目标",dataIndex:"waterTarget",},
|
||||||
|
{title:"水质类别",dataIndex:"waterQualityCategory",},
|
||||||
|
{title: "达标情况", dataIndex: "standard"},
|
||||||
|
{title: "达标率", dataIndex: "standardRate"},
|
||||||
|
// {title:"达标情况",align: 'center',children: [
|
||||||
|
// {title: "达标情况", dataIndex: ""},
|
||||||
|
// {title: "达标率", dataIndex: ""},
|
||||||
|
// {title: "去年同期", dataIndex: ""},
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
// 表格列配置
|
||||||
|
|
||||||
|
|
||||||
|
// 表格搜索条件
|
||||||
|
where: {
|
||||||
|
checked: 1,
|
||||||
|
},
|
||||||
|
// 表格选中数据
|
||||||
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
getPageData(){
|
||||||
|
this.loading = true;
|
||||||
|
countyWaterQualityUpData(this.where).then(res=>{
|
||||||
|
this.loading = false;
|
||||||
|
if(res.data.code){
|
||||||
|
this.$message.error(res.data.msg);
|
||||||
|
this.datasource = []
|
||||||
|
}else{
|
||||||
|
let newData = []
|
||||||
|
const resData = res.data.data || {}
|
||||||
|
for(let i in resData){
|
||||||
|
newData.push(resData[i])
|
||||||
|
}
|
||||||
|
this.datasource = newData
|
||||||
|
}
|
||||||
|
}).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