LAPTOP-FO2T5SIU\35838 před 9 měsíci
rodič
revize
667f69dacb

+ 30 - 32
src/views/parkAssets/parkBuild/index.vue

@@ -58,8 +58,8 @@
               <el-table-column label="套数" prop="numberInfo" />
               <el-table-column label="操作" header-align="center" width="160">
                 <template scope="scope">
-                  <el-button size="mini" type="primary" class="editButton" @click="handleEdit(scope.row)">编辑</el-button>
-                  <el-button size="mini" type="info" class="deleButton" @click="buildDel(scope.row)">删除</el-button>
+                  <el-button size="mini" type="text" class="editButton" @click="handleEdit(scope.row)">编辑</el-button>
+                  <el-button size="mini" type="text" class="deleButton" @click="handleDelete(scope.row)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -430,36 +430,6 @@ export default {
             this.dialogVisible = true
             this.dialogTitle = '编辑楼栋'
         },
-        buildDel(val) {
-            this.$confirm('此操作将删除楼栋, 是否继续?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                this.baseRequest('remove/' + val.id, {}).then(res => {
-                    if (res.data.code == 200) {
-                        // this.getData()
-                        this.getList()
-                        this.getTreeData()
-                        this.$message({
-                            type: 'success',
-                            message: '删除成功!'
-                        })
-                    }
-                }).catch((err) => {
-                    this.$message({
-                        type: 'error',
-                        message: err
-                    })
-                })
-            }).catch(() => {
-                this.$message({
-                    type: 'info',
-                    message: '已取消删除'
-                })
-            })
-        },
-
         confirmSubmit: function() {
             this.$refs.buildForm.validate(valid => {
                 if (valid) {
@@ -534,6 +504,34 @@ export default {
             this.getTreeData()
             this.getList()
         },
+        handleDelete(val) {
+            this.$confirm('确认删除该数据,删除后将无法恢复,确认删除吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.baseRequest('delete', { id: val.id }).then(res => {
+                    if (res.data.code == 200) {
+                        this.getData()
+                        this.getTreeData()
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        })
+                    }
+                }).catch((err) => {
+                    this.$message({
+                        type: 'error',
+                        message: err
+                    })
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                })
+            })
+        },
         // 请求封装,继承类中调用,必须存在
         baseRequest: function(opUrl, postData) {
             return this.$channel.baseRequest('MnpBuildingController', opUrl, postData, 'User')

+ 31 - 31
src/views/parkAssets/parkFloorDisc/index.vue

@@ -61,8 +61,8 @@
               <el-table-column label="分期名称" prop="name" />
               <el-table-column label="操作" header-align="center" width="160">
                 <template scope="scope">
-                  <el-button size="mini" type="primary" class="editButton" @click="handleEdit(scope.row)">编辑</el-button>
-                  <el-button size="mini" type="info" class="deleButton" @click="handleDelete(scope.row)">删除</el-button>
+                  <el-button size="mini" type="text" class="editButton" @click="handleEdit(scope.row)">编辑</el-button>
+                  <el-button size="mini" type="text" class="deleButton" @click="handleDelete(scope.row)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -541,34 +541,6 @@ export default {
             }).catch(() => {
             })
         },
-
-        handleDelete: function(val) {
-            const _this = this
-            this.$confirm('是否确认删除?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                _this.baseFQRequest('remove/' + val.id, '').then((res) => {
-                    if (res.data.code == 200) {
-                        this.getData()
-                        this.getTreeData()
-                        _this.$message({
-                            type: 'success',
-                            message: '删除成功!'
-                        })
-                    }
-                }).catch((err) => {
-                    _this.$message({
-                        type: 'error',
-                        message: err
-                    })
-                })
-            }).catch(function(error) {
-                console.error(error)
-            })
-        },
-
         getData: function() {
             const _this = this
             _this.loading = true
@@ -615,7 +587,7 @@ export default {
                 cancelButtonText: '取消',
                 type: 'warning'
             }).then(() => {
-                this.baseRequest('remove/' + val.data.id, {}).then((res) => {
+                this.baseRequest('delete', {id:val.data.id}).then((res) => {
                     console.log('获取详情——:', res)
                     if (res.data.code == 200) {
                         this.getTreeData()
@@ -805,6 +777,34 @@ export default {
             this.getTreeData()
             this.getData()
         },
+        handleDelete(val) {
+            this.$confirm('确认删除该数据,删除后将无法恢复,确认删除吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.baseFQRequest('delete', { id: val }).then(res => {
+                    if (res.data.code == 200) {
+                        this.getData()
+                        this.getTreeData()
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        })
+                    }
+                }).catch((err) => {
+                    this.$message({
+                        type: 'error',
+                        message: err
+                    })
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                })
+            })
+        },
         // 请求封装,继承类中调用,必须存在
         baseRequest: function(opUrl, postData) {
             return this.$channel.baseRequest('ParkInfoController', opUrl, postData, 'User')

+ 43 - 15
src/views/parkAssets/parkRoom/index.vue

@@ -154,7 +154,7 @@
               <el-table-column label="操作" header-align="center" width="250">
                 <template scope="scope">
                   <el-button size="mini" type="text" @click="handleEdit(scope.row)">编辑</el-button>
-                  <el-button size="mini" type="text" @click="handleDel(scope.row)">删除</el-button>
+                  <el-button size="mini" type="text" @click="handleDelete(scope.row)">删除</el-button>
                   <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
                 </template>
               </el-table-column>
@@ -653,20 +653,6 @@ export default {
             }
         },
         dlgOpen: function() {
-            // 填充父级
-            this.houseForm.findids = []
-            if (undefined != this.houseForm.groupId && this.houseForm.groupId != null &&
-                this.houseForm.groupId != '') {
-                this.houseForm.findids[0] = this.houseForm.groupId
-                if (undefined != this.houseForm.discId && this.houseForm.discId != null &&
-                    this.houseForm.discId != '') {
-                    this.houseForm.findids[1] = this.houseForm.discId
-                    if (undefined != this.houseForm.buildId && this.houseForm.buildId != null &&
-                        this.houseForm.buildId != '') {
-                        this.houseForm.findids[2] = this.houseForm.buildId
-                    }
-                }
-            }
             const _this = this
             if (_this.houseForm.id) {
                 const postData = {
@@ -682,6 +668,20 @@ export default {
                             _this.getHouseTypeList({ discId: _this.houseForm.discId })
                             _this.houseForm.houseTypeId = res.data.houseTypeId + ''
 
+                            // 填充父级
+                            this.houseForm.findids = []
+                            if (undefined != this.houseForm.groupId && this.houseForm.groupId != null &&
+                                this.houseForm.groupId != '') {
+                                this.houseForm.findids[0] = this.houseForm.groupId
+                                if (undefined != this.houseForm.discId && this.houseForm.discId != null &&
+                                    this.houseForm.discId != '') {
+                                    this.houseForm.findids[1] = this.houseForm.discId
+                                    if (undefined != this.houseForm.buildId && this.houseForm.buildId != null &&
+                                        this.houseForm.buildId != '') {
+                                        this.houseForm.findids[2] = this.houseForm.buildId
+                                    }
+                                }
+                            }
                             // if (res.data.planPicture) {
                             //     res.data.planPicture.split(',').forEach(v => {
                             //         if (v) {
@@ -744,6 +744,34 @@ export default {
             this.getTreeData()
             this.getData()
         },
+        handleDelete(val) {
+            this.$confirm('确认删除该数据,删除后将无法恢复,确认删除吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.baseRequest('delete', { id: val }).then(res => {
+                    if (res.data.code == 200) {
+                        this.getData()
+                        this.getTreeData()
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        })
+                    }
+                }).catch((err) => {
+                    this.$message({
+                        type: 'error',
+                        message: err
+                    })
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                })
+            })
+        },
         // 请求封装,继承类中调用,必须存在
         baseRequest: function(opUrl, postData) {
             return this.$channel.baseRequest('ParkRoomController', opUrl, postData, 'User')