Merge remote-tracking branch 'origin/yinyongshui'
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 = [
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user