ad511cad by 杨威

删除增加二次提醒,删除成功后,页面跳转到首页

1 parent c9646189
...@@ -300,26 +300,46 @@ export default { ...@@ -300,26 +300,46 @@ export default {
300 }, 300 },
301 //右键菜单的删除 301 //右键菜单的删除
302 deleteByBsm(){ 302 deleteByBsm(){
303 let params={"bsm":this.zdData.bsm,"type":this.zdData.type}; 303 let name='';
304 if(this.zdData.type=='zd'){ 304 switch (this.zdData.type) {
305 params={"bsm":this.zdData.zdbsm,"type":this.zdData.type}; 305 case 'zd':
306 name = '宗地'
307 break;
308 case 'dz':
309 name = '多幢'
310 break;
311 case 'zrz':
312 name = '自然幢'
313 break;
314
315 default:
316 break;
306 } 317 }
307 deleteZdInfoByBsm(params) 318 this.$confirm('是否确定删除该'+name+'?', '提示', {
308 .then((res) => { 319 confirmButtonText: '确定',
309 if(res.code=200){ 320 cancelButtonText: '取消',
310 this.$message({ 321 type: 'warning'
311 message: res.message, 322 }).then(() => {
312 type: "success", 323 let params={"bsm":this.zdData.bsm,"type":this.zdData.type};
313 }); 324 deleteZdInfoByBsm(params)
314 } else { 325 .then((res) => {
315 this.$message({ 326 if(res.code=200){
316 message: res.message, 327 this.$message({
317 type: "warning", 328 type: 'success',
318 }); 329 message: '删除成功!'
319 } 330 });
320 }) 331 this.$router.push("/panel");
321 .catch((error) => {}); 332 } else {
333 this.$message({
334 message: res.message,
335 type: "warning",
336 });
337 }
338 })
339 .catch((error) => {});
340 }).catch(() => {
322 341
342 });
323 }, 343 },
324 }, 344 },
325 }; 345 };
...@@ -352,12 +372,6 @@ export default { ...@@ -352,12 +372,6 @@ export default {
352 text-overflow: ellipsis; 372 text-overflow: ellipsis;
353 white-space: nowrap; 373 white-space: nowrap;
354 } 374 }
355 // .active_color {
356 // color: #ffffff;
357 // }
358 .reTree_box {
359 // overflow-y: auto;
360 }
361 .reTree_icon { 375 .reTree_icon {
362 width: 17px; 376 width: 17px;
363 height: 17px; 377 height: 17px;
...@@ -369,7 +383,6 @@ export default { ...@@ -369,7 +383,6 @@ export default {
369 position: relative; 383 position: relative;
370 color: #ffffff; 384 color: #ffffff;
371 cursor: pointer; 385 cursor: pointer;
372 moz-user-select: -moz-none;
373 -moz-user-select: none; 386 -moz-user-select: none;
374 -o-user-select: none; 387 -o-user-select: none;
375 -khtml-user-select: none; 388 -khtml-user-select: none;
......