城市内湖前3表
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
<div class="ele-body">
|
||||
<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
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="lakeLibrarySpecialId"
|
||||
:datasource="url"
|
||||
:loading="loading"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
<script>
|
||||
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 Search from './search.vue';
|
||||
import {averageTableColumns} from "./raw-colums"
|
||||
@@ -45,6 +46,9 @@ export default {
|
||||
default: function () {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -53,7 +57,7 @@ export default {
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: pageLakeUrl,
|
||||
datasource:[],
|
||||
selection: [],
|
||||
// 表格列配置
|
||||
columns: averageTableColumns,
|
||||
@@ -63,10 +67,10 @@ export default {
|
||||
where:{},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
watch: {
|
||||
filterKeys(newKeys) {
|
||||
@@ -74,7 +78,24 @@ export default {
|
||||
},
|
||||
},
|
||||
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){
|
||||
this.$emit('changeFilter',data)
|
||||
},
|
||||
@@ -105,39 +126,12 @@ export default {
|
||||
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() {
|
||||
|
||||
this.$refs.table.reload({
|
||||
where: this.where,
|
||||
});
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
|
||||
Reference in New Issue
Block a user