This commit is contained in:
yanran200730
2021-12-24 22:56:34 +08:00
parent 31df5592bf
commit 1a611ae18e
2 changed files with 24 additions and 9 deletions

View File

@@ -374,13 +374,19 @@ export default {
gotoDetail(row) {
if (row.postStatus == '0') {
this.detail = row;
this.showList = false;
this.showAdd = true;
this.$nextTick(() => {
this.showSet = false;
this.showList = false;
this.showDetail = true;
})
} else {
this.detail = row;
this.showList = false;
this.showDetail = true;
this.$nextTick(() => {
this.showSet = false;
this.showList = false;
this.showDetail = true;
})
}
// this.detail = row;
// this.showList = false;

View File

@@ -10,7 +10,7 @@
<el-progress type="circle" :width="40" :percentage="overview.percent" color="#19D286" :stroke-width="4"/>
</div>
<div flex search>
<el-select v-model="search.bind" size="mini" placeholder="全部" clearable>
<el-select v-model="search.bind" size="mini" placeholder="全部" clearable @change="onChange">
<el-option v-for="(op,i) in dict.getDict('deviceStatus')" :key="i" :value="op.dictValue"
:label="op.dictName"/>
</el-select>
@@ -76,7 +76,10 @@ export default {
list: [],
noArea: [],
staData: [],
search: {}
name: '',
search: {
bind: ''
}
}
},
methods: {
@@ -99,12 +102,18 @@ export default {
this.$emit('select', data)
},
handleFilter(v, data) {
if (!v) return true
if (!v) {
return !this.search.bind ? true : data.deviceStatus === this.search.bind
}
return data?.name?.indexOf(v) > -1
return data?.name?.indexOf(v) > -1 && (!this.search.bind ? true : data.deviceStatus === this.search.bind)
},
handleTreeFilter(v) {
this.$refs.deviceTree?.filter(v)
},
onChange () {
this.$refs.deviceTree?.filter(this.search.name)
}
},
created() {