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) { gotoDetail(row) {
if (row.postStatus == '0') { if (row.postStatus == '0') {
this.detail = row; this.$nextTick(() => {
this.showList = false; this.showSet = false;
this.showAdd = true; this.showList = false;
this.showDetail = true;
})
} else { } else {
this.detail = row; this.detail = row;
this.showList = false;
this.showDetail = true; this.$nextTick(() => {
this.showSet = false;
this.showList = false;
this.showDetail = true;
})
} }
// this.detail = row; // this.detail = row;
// this.showList = false; // this.showList = false;

View File

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