7cf9b4cb by weimo934

feat(bjlp,lineTree):添加删除逻辑幢、幢单元

1 parent 2986383b
......@@ -145,3 +145,26 @@ export function moveH(data) {
data:data
})
}
/**
* 删除逻辑幢
* @param bsm
*/
export function deleteLjz(id) {
return request({
url:'system/qjLjz/deleteLjzByBsm',
method:'delete',
params:{
id
}
})
}
export function deleteZdy(id) {
return request({
url:'system/qjZdy/deleteZdyByBsm',
method:'delete',
params:{
id
}
})
}
......
......@@ -27,7 +27,7 @@
reTree_collapse_icon: item.expand && item.children.length > 0,
reTree_expand_icon: !item.expand && item.children.length > 0,
}"
></div>
></div>
<div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">{{ item.mc }}</div>
</div>
......@@ -89,6 +89,8 @@
<li v-show="zdData.type == 'zrz'" @click="openLpbDialog('ljz')">添加逻辑幢</li>
<li v-show="zdData.type == 'zrz' || zdData.type == 'ljz'" @click="openLpbDialog('zdy')">添加幢单元</li>
<li v-show="zdData.type == 'zrz' || zdData.type == 'ljz' || zdData.type == 'zdy'" @click="openLpbDialog('ch')">添加层户</li>
<li v-show="zdData.type == 'ljz'" @click="deleteLjz">删除逻辑幢</li>
<li v-show="zdData.type == 'zdy'" @click="deleteZdy">删除幢单元</li>
</ul>
<!-- 添加定着物弹框 -->
<el-dialog title="新建" :visible.sync="dialogVisible" width="40%">
......@@ -100,6 +102,7 @@
import lineItem from "./lineItem.vue";
import {deleteZdInfoByBsm} from "../../api/zd";
import Create from "../../views/panel/create/index";
import {deleteLjz,deleteZdy} from "./../../api/lpb"
export default {
inheritAttrs: false,
props: {
......@@ -142,7 +145,7 @@ export default {
this.formatData = this.preDealData(n);
console.log(this.formatData);
},
lpbvisible(value) {
if (value) {
document.body.addEventListener("click", this.closeMenu);
......@@ -157,7 +160,7 @@ export default {
document.body.removeEventListener("click", this.closeMenu);
}
},
// createVisible(value) {
// if (value) {
// document.body.addEventListener("click", this.closeMenu);
......@@ -173,6 +176,29 @@ export default {
},
methods: {
loading(){
this.$emit("loading")
},
deleteLjz(){
console.log("删除逻辑幢")
console.log(this.zdData,"zdData")
deleteLjz(this.zdData.bsm).then(res=>{
if (res.success) {
this.loading()
}else {
}
})
},
deleteZdy(){
console.log("删除幢单元")
console.log(this.zdData,"zdData")
deleteZdy(this.zdData.bsm).then(res=>{
if (res.success) {
this.loading()
}
})
},
// 改变菜单数据
changeVisible(data) {
this.visible = data;
......@@ -295,7 +321,7 @@ export default {
},
//楼盘表右键菜单项打开父组件弹框
openLpbDialog(type){
this.$parent.openLpbDialog(this.zdData,type);
this.$parent.openLpbDialog(this.zdData,type);
},
detailDoubleClick(data) {
clearTimeout(this.timer);
......@@ -315,7 +341,7 @@ export default {
case 'zrz':
name = '自然幢'
break;
default:
break;
}
......@@ -363,7 +389,7 @@ export default {
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.row-flex-start {
display: flex;
......
......@@ -79,7 +79,7 @@
>
<!-- 左侧树结构 -->
<div class="lp-tree" :class="createFlag ? 'w260' : 'w0'">
<LineTree :pd="pd" class="treeData" :islpb="islpb"></LineTree>
<LineTree :pd="pd" class="treeData" :islpb="islpb" @loading="loading"></LineTree>
<p
@click="createFlag = false"
style="width:20px;float:left;margin-top: 12px;margin-left:10px;cursor:pointer;"
......@@ -393,6 +393,9 @@ export default {
}, 100);
},
methods: {
loading(){
this.getLpbMenuTree(this.$store.state.zrzbsm);
},
openPlC(){
if (this.cbsmList.length <= 0) {
Message.warning("请选择层")
......