Commit 8910a1be authored by p-wanping.song's avatar p-wanping.song

修改楼层,清空所属房间

parent 565e2fc9
......@@ -1038,8 +1038,7 @@ export default {
const currentFloor = floors.find(x=>x.id===data)
console.log(floors,currentFloor);
if(currentFloor){
this.form.floorId = currentFloor.id;
this.form.floorName = currentFloor.text
this.saveSlectfloor(currentFloor);
}
})
}
......@@ -1343,6 +1342,9 @@ export default {
this.ShowfloorList = false;
},
saveSlectfloor(data) {
if(this.form.floorId!=data.id){
this.form.roomName = ''
}
this.form.floorId = data.id;
this.form.floorName = data.text;
this.ShowfloorList = false;
......
......@@ -860,8 +860,7 @@ export default {
const floors=[].concat(this.floorSource.map(x=>x.children).flat())
const currentFloor = floors.find(x=>x.id===data)
if(currentFloor){
this.form.floorId = currentFloor.id;
this.form.floorName = currentFloor.name
this.saveSlectfloor(currentFloor);
}
})
}
......@@ -981,7 +980,6 @@ export default {
getFloor() {
return getFun(`/risk/plan/floor/list/${this.form.buildingIds}`)
.then(res => {
debugger
// this.$toast.clear();
// this.showSource = true;
......@@ -1058,6 +1056,9 @@ export default {
this.ShowfloorList = false;
},
saveSlectfloor(data) {
if(this.form.floorId!=data.id){
this.form.roomName = ''
}
this.form.floorId = data.id;
this.form.floorName = data.text;
this.ShowfloorList = false;
......
......@@ -74,7 +74,9 @@ import { getFun, postFun } from "@/service/table";
},
methods:{
getName(item){
return item.factorItemsList.find(x=>x.id===item.value)?.indicatorItem||''
const name = item.factorItemsList.find(x=>x.id===item.value)
// return ?.indicatorItem||''
return name?name.indicatorItem:''
},
// 根据ids获取列表
getList(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment