县级监测数据
This commit is contained in:
@@ -9,18 +9,26 @@
|
||||
@search="searchData"
|
||||
@exportFile="exportFile"
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="url"
|
||||
:datasource="datasource"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
饮用水源水质监测累积月份统计样品数:10个
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #waterCode="{ text, record }">
|
||||
<span>
|
||||
{{
|
||||
@@ -54,7 +62,7 @@
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
countyPageBsaeListUrl
|
||||
countyPageBsaeData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { tableColumns } from "./../colums/base";
|
||||
@@ -79,14 +87,18 @@ export default {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
current:0,
|
||||
data: [],
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: countyPageBsaeListUrl,
|
||||
datasource: [],
|
||||
selection: [],
|
||||
columns: [...tableColumns],
|
||||
|
||||
@@ -94,11 +106,11 @@ export default {
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
ionLevel:'县级'
|
||||
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -110,6 +122,23 @@ export default {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
countyPageBsaeData(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);
|
||||
},
|
||||
@@ -140,24 +169,25 @@ export default {
|
||||
|
||||
// 执行搜索
|
||||
searchData(data) {
|
||||
this.where = {...this.where,...data};
|
||||
this.where = data;
|
||||
this.$emit("search", this.where);
|
||||
this.reload();
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.$refs.table.reload({
|
||||
where: this.where,
|
||||
});
|
||||
this.getPageData()
|
||||
// this.$refs.table.reload({
|
||||
// where: this.where,
|
||||
// });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
checked: 1,
|
||||
ionLevel:'县级'
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
const columns = [...tableColumns];
|
||||
const arr = [];
|
||||
@@ -175,4 +205,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.footer{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user