717d5878 by 蔡俊立

删除不动产单元

1 parent 56e5520d
...@@ -155,8 +155,9 @@ export function choiceBdcdy (data) { ...@@ -155,8 +155,9 @@ export function choiceBdcdy (data) {
155 // 申请列表删除 155 // 申请列表删除
156 export function deleteBdcdy (data) { 156 export function deleteBdcdy (data) {
157 return request({ 157 return request({
158 url: 'business/workFlow/deleteBdcdy?sldybsm=' + data, 158 url: 'business/workFlow/deleteBdcdy',
159 method: 'get', 159 method: 'post',
160 data,
160 showLoading: true 161 showLoading: true
161 }) 162 })
162 } 163 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -16,6 +16,7 @@ const service = axios.create({ ...@@ -16,6 +16,7 @@ const service = axios.create({
16 //admin:bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO 16 //admin:bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO
17 //renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI 17 //renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI
18 //tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6 18 //tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6
19 //zhangh:bearer AT-7-Tx8dlZH0LNRc33UjD1CX1xwa-1D7kQmQ
19 }, 20 },
20 timeout: 15000 21 timeout: 15000
21 }) 22 })
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
4 --> 4 -->
5 <template> 5 <template>
6 <div class='batchDel'> 6 <div class='batchDel'>
7 <lb-table :column="columns" :data="dataList" :heightNum="500" :pagination="false"> 7 <lb-table :column="columns" :data="formData.dataList" :heightNum="500" :pagination="false" @selection-change="handleSelectionChange">
8 </lb-table> 8 </lb-table>
9 </div> 9 </div>
10 </template> 10 </template>
11 <script> 11 <script>
12 12 import { deleteBdcdy } from "@/api/ywbl.js"
13 export default { 13 export default {
14 components: {}, 14 components: {},
15 props: { 15 props: {
...@@ -31,11 +31,36 @@ export default { ...@@ -31,11 +31,36 @@ export default {
31 width: '50', 31 width: '50',
32 }, 32 },
33 { 33 {
34 prop: "status", 34 prop: "bdcdyh",
35 label: "状态", 35 label: "不动产单元号",
36 },
37 {
38 prop: "zl",
39 label: "坐落",
36 }, 40 },
37 ], 41 ],
38 dataList: [] 42 dataList: [],
43 selectBdcdy: [],
44 }
45 },
46 methods:{
47 childFn(){
48 deleteBdcdy({
49 bsmSlsq: this.formData.bsmSlsq,
50 bsmSldyList: this.selectBdcdy
51 }).then(res => {
52 if(res.code == 200){
53 this.$message.success("删除成功");
54 }else{
55 this.$message.error(res.message)
56 }
57 })
58 },
59 handleSelectionChange (e) {
60 this.selectBdcdy = [];
61 e.forEach((item, index) => {
62 this.selectBdcdy.push(item.bsmSldy)
63 })
39 } 64 }
40 } 65 }
41 } 66 }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 <div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }"> 23 <div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
24 <div v-if="this.isShowdrawer"> 24 <div v-if="this.isShowdrawer">
25 <div class="title">申请单元列表({{ unitData.length }}) 25 <div class="title">申请单元列表({{ unitData.length }})
26 <el-button type="text" class="batchDel" @click="handleBatchDel">批量删除</el-button> 26 <el-button type="text" class="batchDel" @click="handleBatchDel" v-if="unitData.length>1">批量删除</el-button>
27 </div> 27 </div>
28 <el-menu :default-active="activeIndex" @select="unitClick"> 28 <el-menu :default-active="activeIndex" @select="unitClick">
29 <el-menu-item v-for="(item, index) in unitData" :index="index.toString()" :key="index"> 29 <el-menu-item v-for="(item, index) in unitData" :index="index.toString()" :key="index">
...@@ -136,19 +136,44 @@ export default { ...@@ -136,19 +136,44 @@ export default {
136 }, 136 },
137 // 删除左侧列表 137 // 删除左侧列表
138 handleDel (item) { 138 handleDel (item) {
139 deleteBdcdy(item.sldybsm).then(res => { 139 this.$confirm('确定要删除吗, 是否继续?', '提示', {
140 140 confirmButtonText: '确定',
141 cancelButtonText: '取消',
142 type: 'warning'
143 }).then(() => {
144 deleteBdcdy({
145 bsmSlsq: this.bsmSlsq,
146 bsmSldyList: item.bsmSldy.split(',')
147 }).then(res => {
148 if(res.code == 200){
149 this.$message.success("删除成功");
150 this.updateDialog();
151 }else{
152 this.$message.error(res.message)
153 }
154 })
155 }).catch(() => {
156 this.$message({
157 type: 'info',
158 message: '已取消删除'
159 })
141 }) 160 })
142 }, 161 },
143 handleBatchDel () { 162 handleBatchDel () {
163 let that = this;
144 this.$popup({ 164 this.$popup({
145 title: '批量删除', 165 title: '批量删除',
146 width: '50%', 166 width: '50%',
147 btnShow: true, 167 btnShow: true,
148 editItem: 'workflow/components/batchDel', 168 editItem: 'workflow/components/batchDel',
149 formData: {}, 169 formData: {
170 bsmSlsq: this.bsmSlsq,
171 dataList: this.unitData
172 },
150 cancel: function () { }, //取消事件的回调 173 cancel: function () { }, //取消事件的回调
151 confirm: function () { }, //确认事件的回调 174 confirm: function () {
175 that.updateDialog();
176 }, //确认事件的回调
152 }) 177 })
153 }, 178 },
154 //加载流程初始参数 179 //加载流程初始参数
......