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

修改楼层,清空所属房间

parent 565e2fc9
...@@ -1038,8 +1038,7 @@ export default { ...@@ -1038,8 +1038,7 @@ export default {
const currentFloor = floors.find(x=>x.id===data) const currentFloor = floors.find(x=>x.id===data)
console.log(floors,currentFloor); console.log(floors,currentFloor);
if(currentFloor){ if(currentFloor){
this.form.floorId = currentFloor.id; this.saveSlectfloor(currentFloor);
this.form.floorName = currentFloor.text
} }
}) })
} }
...@@ -1343,6 +1342,9 @@ export default { ...@@ -1343,6 +1342,9 @@ export default {
this.ShowfloorList = false; this.ShowfloorList = false;
}, },
saveSlectfloor(data) { saveSlectfloor(data) {
if(this.form.floorId!=data.id){
this.form.roomName = ''
}
this.form.floorId = data.id; this.form.floorId = data.id;
this.form.floorName = data.text; this.form.floorName = data.text;
this.ShowfloorList = false; this.ShowfloorList = false;
......
...@@ -860,8 +860,7 @@ export default { ...@@ -860,8 +860,7 @@ export default {
const floors=[].concat(this.floorSource.map(x=>x.children).flat()) const floors=[].concat(this.floorSource.map(x=>x.children).flat())
const currentFloor = floors.find(x=>x.id===data) const currentFloor = floors.find(x=>x.id===data)
if(currentFloor){ if(currentFloor){
this.form.floorId = currentFloor.id; this.saveSlectfloor(currentFloor);
this.form.floorName = currentFloor.name
} }
}) })
} }
...@@ -981,7 +980,6 @@ export default { ...@@ -981,7 +980,6 @@ export default {
getFloor() { getFloor() {
return getFun(`/risk/plan/floor/list/${this.form.buildingIds}`) return getFun(`/risk/plan/floor/list/${this.form.buildingIds}`)
.then(res => { .then(res => {
debugger
// this.$toast.clear(); // this.$toast.clear();
// this.showSource = true; // this.showSource = true;
...@@ -1058,6 +1056,9 @@ export default { ...@@ -1058,6 +1056,9 @@ export default {
this.ShowfloorList = false; this.ShowfloorList = false;
}, },
saveSlectfloor(data) { saveSlectfloor(data) {
if(this.form.floorId!=data.id){
this.form.roomName = ''
}
this.form.floorId = data.id; this.form.floorId = data.id;
this.form.floorName = data.text; this.form.floorName = data.text;
this.ShowfloorList = false; this.ShowfloorList = false;
......
...@@ -74,7 +74,9 @@ import { getFun, postFun } from "@/service/table"; ...@@ -74,7 +74,9 @@ import { getFun, postFun } from "@/service/table";
}, },
methods:{ methods:{
getName(item){ 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获取列表 // 根据ids获取列表
getList(){ 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