7cf9b4cb by weimo934

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

1 parent 2986383b
...@@ -145,3 +145,26 @@ export function moveH(data) { ...@@ -145,3 +145,26 @@ export function moveH(data) {
145 data:data 145 data:data
146 }) 146 })
147 } 147 }
148
149 /**
150 * 删除逻辑幢
151 * @param bsm
152 */
153 export function deleteLjz(id) {
154 return request({
155 url:'system/qjLjz/deleteLjzByBsm',
156 method:'delete',
157 params:{
158 id
159 }
160 })
161 }
162 export function deleteZdy(id) {
163 return request({
164 url:'system/qjZdy/deleteZdyByBsm',
165 method:'delete',
166 params:{
167 id
168 }
169 })
170 }
......
...@@ -89,6 +89,8 @@ ...@@ -89,6 +89,8 @@
89 <li v-show="zdData.type == 'zrz'" @click="openLpbDialog('ljz')">添加逻辑幢</li> 89 <li v-show="zdData.type == 'zrz'" @click="openLpbDialog('ljz')">添加逻辑幢</li>
90 <li v-show="zdData.type == 'zrz' || zdData.type == 'ljz'" @click="openLpbDialog('zdy')">添加幢单元</li> 90 <li v-show="zdData.type == 'zrz' || zdData.type == 'ljz'" @click="openLpbDialog('zdy')">添加幢单元</li>
91 <li v-show="zdData.type == 'zrz' || zdData.type == 'ljz' || zdData.type == 'zdy'" @click="openLpbDialog('ch')">添加层户</li> 91 <li v-show="zdData.type == 'zrz' || zdData.type == 'ljz' || zdData.type == 'zdy'" @click="openLpbDialog('ch')">添加层户</li>
92 <li v-show="zdData.type == 'ljz'" @click="deleteLjz">删除逻辑幢</li>
93 <li v-show="zdData.type == 'zdy'" @click="deleteZdy">删除幢单元</li>
92 </ul> 94 </ul>
93 <!-- 添加定着物弹框 --> 95 <!-- 添加定着物弹框 -->
94 <el-dialog title="新建" :visible.sync="dialogVisible" width="40%"> 96 <el-dialog title="新建" :visible.sync="dialogVisible" width="40%">
...@@ -100,6 +102,7 @@ ...@@ -100,6 +102,7 @@
100 import lineItem from "./lineItem.vue"; 102 import lineItem from "./lineItem.vue";
101 import {deleteZdInfoByBsm} from "../../api/zd"; 103 import {deleteZdInfoByBsm} from "../../api/zd";
102 import Create from "../../views/panel/create/index"; 104 import Create from "../../views/panel/create/index";
105 import {deleteLjz,deleteZdy} from "./../../api/lpb"
103 export default { 106 export default {
104 inheritAttrs: false, 107 inheritAttrs: false,
105 props: { 108 props: {
...@@ -173,6 +176,29 @@ export default { ...@@ -173,6 +176,29 @@ export default {
173 }, 176 },
174 177
175 methods: { 178 methods: {
179 loading(){
180 this.$emit("loading")
181 },
182 deleteLjz(){
183 console.log("删除逻辑幢")
184 console.log(this.zdData,"zdData")
185 deleteLjz(this.zdData.bsm).then(res=>{
186 if (res.success) {
187 this.loading()
188 }else {
189
190 }
191 })
192 },
193 deleteZdy(){
194 console.log("删除幢单元")
195 console.log(this.zdData,"zdData")
196 deleteZdy(this.zdData.bsm).then(res=>{
197 if (res.success) {
198 this.loading()
199 }
200 })
201 },
176 // 改变菜单数据 202 // 改变菜单数据
177 changeVisible(data) { 203 changeVisible(data) {
178 this.visible = data; 204 this.visible = data;
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
79 > 79 >
80 <!-- 左侧树结构 --> 80 <!-- 左侧树结构 -->
81 <div class="lp-tree" :class="createFlag ? 'w260' : 'w0'"> 81 <div class="lp-tree" :class="createFlag ? 'w260' : 'w0'">
82 <LineTree :pd="pd" class="treeData" :islpb="islpb"></LineTree> 82 <LineTree :pd="pd" class="treeData" :islpb="islpb" @loading="loading"></LineTree>
83 <p 83 <p
84 @click="createFlag = false" 84 @click="createFlag = false"
85 style="width:20px;float:left;margin-top: 12px;margin-left:10px;cursor:pointer;" 85 style="width:20px;float:left;margin-top: 12px;margin-left:10px;cursor:pointer;"
...@@ -393,6 +393,9 @@ export default { ...@@ -393,6 +393,9 @@ export default {
393 }, 100); 393 }, 100);
394 }, 394 },
395 methods: { 395 methods: {
396 loading(){
397 this.getLpbMenuTree(this.$store.state.zrzbsm);
398 },
396 openPlC(){ 399 openPlC(){
397 if (this.cbsmList.length <= 0) { 400 if (this.cbsmList.length <= 0) {
398 Message.warning("请选择层") 401 Message.warning("请选择层")
......