饮用水框架页面
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="drinkingWaterId"
|
||||
:datasource="url"
|
||||
:datasource="datasource"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@@ -31,11 +32,10 @@
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import Search from "./../components/search.vue";
|
||||
import Search from "./../components/citySearch.vue";
|
||||
import {
|
||||
pageDrinkingWaterStatisticUrl,
|
||||
// getColumnOptions
|
||||
} from "@/api/ecology/drinking-water";
|
||||
overStandardCount
|
||||
} from "@/api/ecology/new-drinking-water";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
// import { tableColumns } from "./colums";
|
||||
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: pageDrinkingWaterStatisticUrl,
|
||||
datasource:[],
|
||||
selection: [],
|
||||
columns: [
|
||||
{title: "城市名称",dataIndex: "sourceWaterName",sorter: true,},
|
||||
@@ -84,12 +84,30 @@ export default {
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
loading:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.loadOptionData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取列表数据
|
||||
getPageData(){
|
||||
this.loading = true;
|
||||
overStandardCount(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);
|
||||
},
|
||||
@@ -107,9 +125,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