Merge remote-tracking branch 'origin/yinyongshui'

This commit is contained in:
2021-12-21 12:14:29 +08:00
5 changed files with 25 additions and 5 deletions

View File

@@ -138,7 +138,7 @@ export default {
this.count = 0 this.count = 0
}else{ }else{
this.datasource = res.data.data this.datasource = res.data.data
this.count = res.data.count this.count = res.data.data.length
} }
}).catch(()=>{ }).catch(()=>{
this.loading = false; this.loading = false;

View File

@@ -13,7 +13,7 @@
:loading="loading" :loading="loading"
/> />
<ele-pro-table ref="table" row-key="drinkingWaterId" :datasource="datasource" :columns="columns" :where="where" <ele-pro-table ref="table" row-key="drinkingWaterId" :datasource="datasource" :columns="columns" :where="where" @change="onChange"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)"> :scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
<template #county="{text}"> <template #county="{text}">
{{text="市区"}} {{text="市区"}}
@@ -211,11 +211,21 @@ export default {
this.$emit("search", this.where); this.$emit("search", this.where);
this.reload(); this.reload();
}, },
onChange(e,filters){
this.datasource = this.datasource.map(item=>(
{
...item,
index1:filters.index1
}
))
},
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.getPageData() this.getPageData()
this.columns[6].filters = [] this.columns[6].filters = []
this.columns[6].filterMultiple = false
if(this.where.waterSourceType ==1 ){ if(this.where.waterSourceType ==1 ){
// 地表水 // 地表水
this.columns[6].filters = [ this.columns[6].filters = [

View File

@@ -134,7 +134,7 @@ export default {
this.count = 0 this.count = 0
}else{ }else{
this.datasource = res.data.data this.datasource = res.data.data
this.count = res.data.data this.count = res.data.data.length
} }
}).catch(()=>{ }).catch(()=>{
this.loading = false; this.loading = false;

View File

@@ -134,7 +134,7 @@ export default {
this.count = 0 this.count = 0
}else{ }else{
this.datasource = res.data.data this.datasource = res.data.data
this.count = res.data.count this.count = res.data.data.length
} }
}).catch(()=>{ }).catch(()=>{
this.loading = false; this.loading = false;

View File

@@ -13,7 +13,7 @@
:loading="loading" :loading="loading"
/> />
<ele-pro-table ref="table" row-key="drinkingWaterId" :datasource="datasource" :columns="columns" :where="where" <ele-pro-table ref="table" row-key="drinkingWaterId" :datasource="datasource" :columns="columns" :where="where" @change="onChange"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)"> :scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
<template #county="{text}"> <template #county="{text}">
{{text="市区"}} {{text="市区"}}
@@ -212,6 +212,16 @@ export default {
this.$emit("search", this.where); this.$emit("search", this.where);
this.reload(); this.reload();
}, },
onChange(e,filters){
this.datasource = this.datasource.map(item=>(
{
...item,
index1:filters.index1
}
))
},
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.getPageData() this.getPageData()