饮用水监测数据报送表
This commit is contained in:
@@ -9,13 +9,15 @@
|
||||
@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' }"
|
||||
@@ -54,7 +56,7 @@
|
||||
<script>
|
||||
import XLSX from "xlsx";
|
||||
import {
|
||||
pageBsaeListUrl
|
||||
analysePageData
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import { tableColumns } from "./../colums/base";
|
||||
@@ -79,6 +81,9 @@ export default {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -86,7 +91,7 @@ export default {
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: pageBsaeListUrl,
|
||||
datasource: [],
|
||||
selection: [],
|
||||
columns: [...tableColumns],
|
||||
|
||||
@@ -94,10 +99,11 @@ export default {
|
||||
regionLevelOptions: [],
|
||||
// 表格搜索条件
|
||||
where: {
|
||||
checked: 1,
|
||||
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -109,6 +115,23 @@ export default {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
analysePageData(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);
|
||||
},
|
||||
@@ -145,9 +168,10 @@ export default {
|
||||
},
|
||||
/* 刷新表格 */
|
||||
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