城市内湖前3表
This commit is contained in:
@@ -1 +1 @@
|
|||||||
VUE_APP_API_BASE_URL=http://localhost:10001/api
|
VUE_APP_API_BASE_URL=http://101.132.173.65:10001/api
|
||||||
|
|||||||
38
src/api/ecology/new-lake.js
Normal file
38
src/api/ecology/new-lake.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
// 湖库断面,区域
|
||||||
|
export const getLakeDropdown = function () {
|
||||||
|
return axios.get(`/lakeLibrary/lakeCityDict/list`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 湖库水质分析城市内湖原始数据接口
|
||||||
|
export const cityOriginalUrl = '/lakeLibrary/wateAnalysis/city/originalData'
|
||||||
|
export const cityOriginalData = function (data) {
|
||||||
|
return axios.post(cityOriginalUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
//城市内湖综合营养指数接口
|
||||||
|
export const cityComprehensiveNutritionUrl = '/lakeLibrary/wateAnalysis/city/comprehensiveNutrition';
|
||||||
|
export const cityComprehensiveNutritionData = function (data) {
|
||||||
|
return axios.post(cityComprehensiveNutritionUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 城市内湖平均数据接口
|
||||||
|
export const cityAverageUrl = '/lakeLibrary/wateAnalysis/city/average';
|
||||||
|
export const cityAverageData = function (data) {
|
||||||
|
return axios.post(cityAverageUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 城市内湖平均营养指数接口
|
||||||
|
export const cityAverageNutritionUrl = '/lakeLibrary/wateAnalysis/city/averageNutrition';
|
||||||
|
export const cityAverageNutrition = function (data) {
|
||||||
|
return axios.post(cityAverageNutritionUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 城市内湖平均营养指数接口
|
||||||
|
export const cityYearContrastUrl = '/lakeLibrary/wateAnalysis/city/yearContrast';
|
||||||
|
export const cityYearContrastData = function (data) {
|
||||||
|
return axios.post(cityYearContrastUrl,data)
|
||||||
|
}
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
<div class="ele-body">
|
<div class="ele-body">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter"/>
|
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter" :visiable="visiable"/>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
v-model:selection="selectionList"
|
v-model:selection="selectionList"
|
||||||
ref="table"
|
ref="table"
|
||||||
row-key="lakeLibrarySpecialId"
|
:loading="loading"
|
||||||
:datasource="url"
|
:datasource="datasource"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:where="where"
|
:where="where"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import XLSX from "xlsx";
|
import XLSX from "xlsx";
|
||||||
import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
// import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
||||||
|
import {cityAverageData} from "@/api/ecology/new-lake";
|
||||||
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 Search from './search.vue';
|
import Search from './search.vue';
|
||||||
import {averageTableColumns} from "./raw-colums"
|
import {averageTableColumns} from "./raw-colums"
|
||||||
@@ -45,6 +46,9 @@ export default {
|
|||||||
default: function () {
|
default: function () {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
visiable:{
|
||||||
|
typeof:Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -53,7 +57,7 @@ export default {
|
|||||||
locale,
|
locale,
|
||||||
bill: {},
|
bill: {},
|
||||||
// 表格数据接口
|
// 表格数据接口
|
||||||
url: pageLakeUrl,
|
datasource:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
columns: averageTableColumns,
|
columns: averageTableColumns,
|
||||||
@@ -63,10 +67,10 @@ export default {
|
|||||||
where:{},
|
where:{},
|
||||||
// 表格选中数据
|
// 表格选中数据
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
loading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.loadOptionData();
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
filterKeys(newKeys) {
|
filterKeys(newKeys) {
|
||||||
@@ -74,6 +78,23 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
getPageData(){
|
||||||
|
this.loading = true;
|
||||||
|
cityAverageData(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;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 传上父级
|
// 传上父级
|
||||||
changeFilter(data){
|
changeFilter(data){
|
||||||
this.$emit('changeFilter',data)
|
this.$emit('changeFilter',data)
|
||||||
@@ -105,39 +126,12 @@ export default {
|
|||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**获取下来框数据 */
|
|
||||||
loadOptionData() {
|
|
||||||
getColumnOptions("place").then((res) => {
|
|
||||||
this.palceOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("area").then((res) => {
|
|
||||||
this.areaOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("region_level").then((res) => {
|
|
||||||
this.regionLevelOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
|
this.getPageData()
|
||||||
this.$refs.table.reload({
|
// this.$refs.table.reload({
|
||||||
where: this.where,
|
// where: this.where,
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
/* 重置搜索 */
|
/* 重置搜索 */
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
<div class="ele-body">
|
<div class="ele-body">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter"/>
|
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter" :visiable="visiable"/>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
v-model:selection="selectionList"
|
v-model:selection="selectionList"
|
||||||
ref="table"
|
ref="table"
|
||||||
row-key="lakeLibrarySpecialId"
|
:datasource="datasource"
|
||||||
:datasource="url"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:where="where"
|
:where="where"
|
||||||
|
:loading="loading"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
@done="(d) => (data = d.data)"
|
@done="(d) => (data = d.data)"
|
||||||
>
|
>
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import XLSX from "xlsx";
|
import XLSX from "xlsx";
|
||||||
import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
// import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
||||||
|
import {cityAverageNutrition} from "@/api/ecology/new-lake";
|
||||||
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 Search from './search.vue';
|
import Search from './search.vue';
|
||||||
export default {
|
export default {
|
||||||
@@ -44,6 +45,9 @@ export default {
|
|||||||
default: function () {
|
default: function () {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
visiable:{
|
||||||
|
typeof:Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -52,7 +56,7 @@ export default {
|
|||||||
locale,
|
locale,
|
||||||
bill: {},
|
bill: {},
|
||||||
// 表格数据接口
|
// 表格数据接口
|
||||||
url: pageLakeUrl,
|
datasource:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
columns: [
|
columns: [
|
||||||
@@ -70,10 +74,11 @@ export default {
|
|||||||
where:{},
|
where:{},
|
||||||
// 表格选中数据
|
// 表格选中数据
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
loading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.loadOptionData();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 传上父级
|
// 传上父级
|
||||||
@@ -86,40 +91,27 @@ export default {
|
|||||||
this.$emit("search", this.where);
|
this.$emit("search", this.where);
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
|
// 获取列表数据
|
||||||
/**获取下来框数据 */
|
getPageData(){
|
||||||
loadOptionData() {
|
this.loading = true;
|
||||||
getColumnOptions("place").then((res) => {
|
cityAverageNutrition(this.where).then(res=>{
|
||||||
this.palceOptions = res.data.data.map((item) => {
|
this.loading = false;
|
||||||
return {
|
if(res.data.code){
|
||||||
label: item,
|
this.$message.error(res.data.msg);
|
||||||
value: item,
|
this.datasource = []
|
||||||
};
|
}else{
|
||||||
});
|
this.datasource = res.data.data
|
||||||
});
|
}
|
||||||
getColumnOptions("area").then((res) => {
|
}).catch(()=>{
|
||||||
this.areaOptions = res.data.data.map((item) => {
|
this.loading = false;
|
||||||
return {
|
})
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("region_level").then((res) => {
|
|
||||||
this.regionLevelOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
|
this.getPageData();
|
||||||
this.$refs.table.reload({
|
// this.$refs.table.reload({
|
||||||
where: this.where,
|
// where: this.where,
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
/* 重置搜索 */
|
/* 重置搜索 */
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
<div class="ele-body">
|
<div class="ele-body">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter"/>
|
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter" :visiable="visiable"/>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
v-model:selection="selectionList"
|
v-model:selection="selectionList"
|
||||||
ref="table"
|
ref="table"
|
||||||
row-key="lakeLibraryInnerCityId"
|
:datasource="datasource"
|
||||||
:datasource="url"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:where="where"
|
:where="where"
|
||||||
|
:loading="loading"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
@done="(d) => (data = d.data)"
|
@done="(d) => (data = d.data)"
|
||||||
>
|
>
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import XLSX from "xlsx";
|
import XLSX from "xlsx";
|
||||||
import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
// import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
||||||
|
import {cityComprehensiveNutritionData} from "@/api/ecology/new-lake";
|
||||||
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 Search from './search.vue';
|
import Search from './search.vue';
|
||||||
export default {
|
export default {
|
||||||
@@ -44,6 +45,9 @@ export default {
|
|||||||
default: function () {
|
default: function () {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
visiable:{
|
||||||
|
typeof:Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -52,7 +56,8 @@ export default {
|
|||||||
locale,
|
locale,
|
||||||
bill: {},
|
bill: {},
|
||||||
// 表格数据接口
|
// 表格数据接口
|
||||||
url: pageLakeUrl,
|
// url: pageLakeUrl,
|
||||||
|
datasource:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
columns: [
|
columns: [
|
||||||
@@ -70,6 +75,7 @@ export default {
|
|||||||
where:{},
|
where:{},
|
||||||
// 表格选中数据
|
// 表格选中数据
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -87,39 +93,29 @@ export default {
|
|||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**获取下来框数据 */
|
// 获取列表数据
|
||||||
loadOptionData() {
|
getPageData(){
|
||||||
getColumnOptions("place").then((res) => {
|
console.log('请求')
|
||||||
this.palceOptions = res.data.data.map((item) => {
|
this.loading = true;
|
||||||
return {
|
cityComprehensiveNutritionData(this.where).then(res=>{
|
||||||
label: item,
|
this.loading = false;
|
||||||
value: item,
|
if(res.data.code){
|
||||||
};
|
this.$message.error(res.data.msg);
|
||||||
});
|
this.datasource = []
|
||||||
});
|
}else{
|
||||||
getColumnOptions("area").then((res) => {
|
this.datasource = res.data.data
|
||||||
this.areaOptions = res.data.data.map((item) => {
|
}
|
||||||
return {
|
}).catch(()=>{
|
||||||
label: item,
|
this.loading = false;
|
||||||
value: item,
|
})
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("region_level").then((res) => {
|
|
||||||
this.regionLevelOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
|
this.getPageData();
|
||||||
this.$refs.table.reload({
|
// this.$refs.table.reload({
|
||||||
where: this.where,
|
// where: this.where,
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
/* 重置搜索 */
|
/* 重置搜索 */
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
v-model:selection="selectionList"
|
v-model:selection="selectionList"
|
||||||
ref="table"
|
ref="table"
|
||||||
row-key="lakeLibraryInnerCityId"
|
:datasource="datasource"
|
||||||
:datasource="url"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:where="where"
|
:where="where"
|
||||||
|
:loading="loading"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
@done="(d) => (data = d.data)"
|
@done="(d) => (data = d.data)"
|
||||||
>
|
>
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import XLSX from "xlsx";
|
import XLSX from "xlsx";
|
||||||
import { pageLakeUrl, getColumnOptions } from "@/api/ecology/lake";
|
// import { pageLakeUrl, getColumnOptions } from "@/api/ecology/lake";
|
||||||
|
import {cityYearContrastData} from "@/api/ecology/new-lake";
|
||||||
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 Search from "./search.vue";
|
import Search from "./search.vue";
|
||||||
export default {
|
export default {
|
||||||
@@ -44,6 +45,9 @@ export default {
|
|||||||
default: function () {
|
default: function () {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
visiable:{
|
||||||
|
typeof:Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -52,7 +56,7 @@ export default {
|
|||||||
locale,
|
locale,
|
||||||
bill: {},
|
bill: {},
|
||||||
// 表格数据接口
|
// 表格数据接口
|
||||||
url: pageLakeUrl,
|
datasource: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
columns: [
|
columns: [
|
||||||
@@ -92,6 +96,7 @@ export default {
|
|||||||
where: {},
|
where: {},
|
||||||
// 表格选中数据
|
// 表格选中数据
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -109,38 +114,29 @@ export default {
|
|||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**获取下来框数据 */
|
|
||||||
loadOptionData() {
|
// 获取列表数据
|
||||||
getColumnOptions("place").then((res) => {
|
getPageData(){
|
||||||
this.palceOptions = res.data.data.map((item) => {
|
this.loading = true;
|
||||||
return {
|
cityYearContrastData(this.where).then(res=>{
|
||||||
label: item,
|
this.loading = false;
|
||||||
value: item,
|
if(res.data.code){
|
||||||
};
|
this.$message.error(res.data.msg);
|
||||||
});
|
this.datasource = []
|
||||||
});
|
}else{
|
||||||
getColumnOptions("area").then((res) => {
|
this.datasource = res.data.data
|
||||||
this.areaOptions = res.data.data.map((item) => {
|
}
|
||||||
return {
|
}).catch(()=>{
|
||||||
label: item,
|
this.loading = false;
|
||||||
value: item,
|
})
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("region_level").then((res) => {
|
|
||||||
this.regionLevelOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
this.$refs.table.reload({
|
this.getPageData()
|
||||||
where: this.where,
|
// this.$refs.table.reload({
|
||||||
});
|
// where: this.where,
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
/* 重置搜索 */
|
/* 重置搜索 */
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
<div class="ele-body">
|
<div class="ele-body">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter"/>
|
<search :searchForm="searchForm" :filterKeys="filterKeys" @search="searchData" @exportFile="exportFile" @filterColumns="changeFilter" :visiable="visiable"/>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
v-model:selection="selectionList"
|
v-model:selection="selectionList"
|
||||||
ref="table"
|
ref="table"
|
||||||
row-key="lakeLibraryInnerCityId"
|
:datasource="datasource"
|
||||||
:datasource="url"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
:loading="loading"
|
||||||
:where="where"
|
:where="where"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
@done="(d) => (data = d.data)"
|
@done="(d) => (data = d.data)"
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import XLSX from "xlsx";
|
import XLSX from "xlsx";
|
||||||
import {pageLakeUrl, getColumnOptions} from "@/api/ecology/lake";
|
import {getLakeDropdown, cityOriginalData} from "@/api/ecology/new-lake";
|
||||||
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 Search from './search.vue';
|
import Search from './search.vue';
|
||||||
import {innerTableColumns} from "./raw-colums"
|
import {innerTableColumns} from "./raw-colums"
|
||||||
@@ -45,6 +45,9 @@ export default {
|
|||||||
default: function () {
|
default: function () {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
visiable:{
|
||||||
|
typeof:Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -53,7 +56,8 @@ export default {
|
|||||||
locale,
|
locale,
|
||||||
bill: {},
|
bill: {},
|
||||||
// 表格数据接口
|
// 表格数据接口
|
||||||
url: pageLakeUrl,
|
// url: cityOriginalUrl,
|
||||||
|
datasource:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
columns: innerTableColumns,
|
columns: innerTableColumns,
|
||||||
@@ -63,17 +67,32 @@ export default {
|
|||||||
where:{},
|
where:{},
|
||||||
// 表格选中数据
|
// 表格选中数据
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
// this.loadOptionData();
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
filterKeys(newKeys) {
|
filterKeys(newKeys) {
|
||||||
this.filterColumns(newKeys)
|
this.filterColumns(newKeys)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
// 获取列表数据
|
||||||
|
getPageData(){
|
||||||
|
this.loading = true
|
||||||
|
cityOriginalData(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;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 传上父级
|
// 传上父级
|
||||||
changeFilter(data){
|
changeFilter(data){
|
||||||
this.$emit('changeFilter',data)
|
this.$emit('changeFilter',data)
|
||||||
@@ -108,37 +127,22 @@ export default {
|
|||||||
|
|
||||||
/**获取下来框数据 */
|
/**获取下来框数据 */
|
||||||
loadOptionData() {
|
loadOptionData() {
|
||||||
getColumnOptions("place").then((res) => {
|
getLakeDropdown().then((res) => {
|
||||||
this.palceOptions = res.data.data.map((item) => {
|
this.palceOptions = res.data.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
label: item,
|
label: item.sectionName,
|
||||||
value: item,
|
value: item.sectionName,
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("area").then((res) => {
|
|
||||||
this.areaOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getColumnOptions("region_level").then((res) => {
|
|
||||||
this.regionLevelOptions = res.data.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item,
|
|
||||||
value: item,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
|
this.getPageData();
|
||||||
this.$refs.table.reload({
|
// this.$refs.table.reload({
|
||||||
where: this.where,
|
// where: this.where,
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
/* 重置搜索 */
|
/* 重置搜索 */
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="断面名称:">
|
<a-form-item label="断面名称:">
|
||||||
<a-select v-model:value="where.sectionName" allowClear showSearch>
|
<a-select v-model:value="where.sectionName" allowClear showSearch>
|
||||||
<a-select-option v-for="item in palceOptions" :key="item.value"
|
<a-select-option v-for="item in sectionOptions" :key="item.value"
|
||||||
>{{ item.label }}
|
>{{ item.label }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -55,11 +55,9 @@
|
|||||||
allowClear
|
allowClear
|
||||||
placeholder="未选择"
|
placeholder="未选择"
|
||||||
>
|
>
|
||||||
<a-select-option value="良庆区">良庆区</a-select-option>
|
<a-select-option v-for="item in palceOptions" :key="item.value"
|
||||||
<a-select-option value="江南区">江南区</a-select-option>
|
>{{ item.label }}
|
||||||
<a-select-option value="江南区">横县</a-select-option>
|
</a-select-option>
|
||||||
<a-select-option value="江南区">青秀区</a-select-option>
|
|
||||||
<a-select-option value="江南区">良庆区</a-select-option>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -123,6 +121,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 { innerFilterColumns } from "./raw-colums";
|
import { innerFilterColumns } from "./raw-colums";
|
||||||
|
import {getLakeDropdown} from "@/api/ecology/new-lake";
|
||||||
export default {
|
export default {
|
||||||
name: "inner-search",
|
name: "inner-search",
|
||||||
props: {
|
props: {
|
||||||
@@ -138,6 +137,9 @@ export default {
|
|||||||
default: function () {
|
default: function () {
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
visiable:{
|
||||||
|
typeof:Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -152,9 +154,14 @@ export default {
|
|||||||
filterColumns: innerFilterColumns,
|
filterColumns: innerFilterColumns,
|
||||||
newCloumns:[],
|
newCloumns:[],
|
||||||
oldCloumns:[],
|
oldCloumns:[],
|
||||||
filterItem:[]
|
filterItem:[],
|
||||||
|
palceOptions:[],
|
||||||
|
sectionOptions:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
this.loadOptionData();
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
searchForm(newV) {
|
searchForm(newV) {
|
||||||
this.where = newV;
|
this.where = newV;
|
||||||
@@ -174,6 +181,10 @@ export default {
|
|||||||
this.checkAll = true
|
this.checkAll = true
|
||||||
this.indeterminate = false
|
this.indeterminate = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 监听组件显示
|
||||||
|
visiable(val){
|
||||||
|
this.emitData(val)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -184,9 +195,16 @@ export default {
|
|||||||
this.oldCloumns = [...innerFilterColumns];
|
this.oldCloumns = [...innerFilterColumns];
|
||||||
// this.$emit("buildColumns", innerFilterColumns);
|
// this.$emit("buildColumns", innerFilterColumns);
|
||||||
this.initFilter(this.filterKeys);
|
this.initFilter(this.filterKeys);
|
||||||
|
this.emitData(true)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
emitData(val){
|
||||||
|
if(val && this.where.startTime && this.where.endTime){
|
||||||
|
this.$emit("search", this.where);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 初始化选择
|
// 初始化选择
|
||||||
initFilter(newKeys){
|
initFilter(newKeys){
|
||||||
let filterIndex =this.filterColumns.map(item=>(item.dataIndex))
|
let filterIndex =this.filterColumns.map(item=>(item.dataIndex))
|
||||||
@@ -196,6 +214,26 @@ export default {
|
|||||||
this.filter = newList;
|
this.filter = newList;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**获取下来框数据 */
|
||||||
|
loadOptionData() {
|
||||||
|
getLakeDropdown().then((res) => {
|
||||||
|
this.palceOptions = res.data.data.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.regionName,
|
||||||
|
value: item.regionName,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
this.sectionOptions= res.data.data.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.sectionName,
|
||||||
|
value: item.sectionName,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// 指标全选
|
||||||
onCheckAllChange (e) {
|
onCheckAllChange (e) {
|
||||||
this.filter = e.target.checked ? innerFilterColumns.map((item) => item.dataIndex) : []
|
this.filter = e.target.checked ? innerFilterColumns.map((item) => item.dataIndex) : []
|
||||||
|
|
||||||
@@ -212,7 +250,9 @@ export default {
|
|||||||
this.newCloumns = newCloumns;
|
this.newCloumns = newCloumns;
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.where = {};
|
this.where = {
|
||||||
|
checked: 1,
|
||||||
|
};
|
||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData() {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-tabs v-model:activeKey="activeKey">
|
<a-tabs v-model:activeKey="activeKey">
|
||||||
<a-tab-pane key="raw" tab="原始数据">
|
<a-tab-pane key="raw" tab="原始数据">
|
||||||
<raw :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></raw>
|
<raw :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='raw'"></raw>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="com-nutritional" tab="综合营养指标">
|
<a-tab-pane key="com-nutritional" tab="综合营养指标">
|
||||||
<com-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></com-nutritional>
|
<com-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='com-nutritional'"></com-nutritional>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="average" tab="平均数据">
|
<a-tab-pane key="average" tab="平均数据">
|
||||||
<average :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></average>
|
<average :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter"></average>
|
||||||
|
|||||||
Reference in New Issue
Block a user