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
}
})
}
......
......@@ -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: {
......@@ -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;
......
......@@ -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("请选择层")
......