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 }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
27 reTree_collapse_icon: item.expand && item.children.length > 0, 27 reTree_collapse_icon: item.expand && item.children.length > 0,
28 reTree_expand_icon: !item.expand && item.children.length > 0, 28 reTree_expand_icon: !item.expand && item.children.length > 0,
29 }" 29 }"
30 ></div> 30 ></div>
31 <div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">{{ item.mc }}</div> 31 <div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">{{ item.mc }}</div>
32 </div> 32 </div>
33 33
...@@ -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: {
...@@ -142,7 +145,7 @@ export default { ...@@ -142,7 +145,7 @@ export default {
142 this.formatData = this.preDealData(n); 145 this.formatData = this.preDealData(n);
143 console.log(this.formatData); 146 console.log(this.formatData);
144 }, 147 },
145 148
146 lpbvisible(value) { 149 lpbvisible(value) {
147 if (value) { 150 if (value) {
148 document.body.addEventListener("click", this.closeMenu); 151 document.body.addEventListener("click", this.closeMenu);
...@@ -157,7 +160,7 @@ export default { ...@@ -157,7 +160,7 @@ export default {
157 document.body.removeEventListener("click", this.closeMenu); 160 document.body.removeEventListener("click", this.closeMenu);
158 } 161 }
159 }, 162 },
160 163
161 // createVisible(value) { 164 // createVisible(value) {
162 // if (value) { 165 // if (value) {
163 // document.body.addEventListener("click", this.closeMenu); 166 // document.body.addEventListener("click", this.closeMenu);
...@@ -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;
...@@ -295,7 +321,7 @@ export default { ...@@ -295,7 +321,7 @@ export default {
295 }, 321 },
296 //楼盘表右键菜单项打开父组件弹框 322 //楼盘表右键菜单项打开父组件弹框
297 openLpbDialog(type){ 323 openLpbDialog(type){
298 this.$parent.openLpbDialog(this.zdData,type); 324 this.$parent.openLpbDialog(this.zdData,type);
299 }, 325 },
300 detailDoubleClick(data) { 326 detailDoubleClick(data) {
301 clearTimeout(this.timer); 327 clearTimeout(this.timer);
...@@ -315,7 +341,7 @@ export default { ...@@ -315,7 +341,7 @@ export default {
315 case 'zrz': 341 case 'zrz':
316 name = '自然幢' 342 name = '自然幢'
317 break; 343 break;
318 344
319 default: 345 default:
320 break; 346 break;
321 } 347 }
...@@ -363,7 +389,7 @@ export default { ...@@ -363,7 +389,7 @@ export default {
363 flex-direction: column; 389 flex-direction: column;
364 justify-content: flex-start; 390 justify-content: flex-start;
365 align-items: center; 391 align-items: center;
366 392
367 } 393 }
368 .row-flex-start { 394 .row-flex-start {
369 display: flex; 395 display: flex;
......
...@@ -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("请选择层")
......