|
@@ -154,7 +154,7 @@
|
|
<el-table-column label="操作" header-align="center" width="250">
|
|
<el-table-column label="操作" header-align="center" width="250">
|
|
<template scope="scope">
|
|
<template scope="scope">
|
|
<el-button size="mini" type="text" @click="handleEdit(scope.row)">编辑</el-button>
|
|
<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>
|
|
<el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -653,20 +653,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
dlgOpen: function() {
|
|
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
|
|
const _this = this
|
|
if (_this.houseForm.id) {
|
|
if (_this.houseForm.id) {
|
|
const postData = {
|
|
const postData = {
|
|
@@ -682,6 +668,20 @@ export default {
|
|
_this.getHouseTypeList({ discId: _this.houseForm.discId })
|
|
_this.getHouseTypeList({ discId: _this.houseForm.discId })
|
|
_this.houseForm.houseTypeId = res.data.houseTypeId + ''
|
|
_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) {
|
|
// if (res.data.planPicture) {
|
|
// res.data.planPicture.split(',').forEach(v => {
|
|
// res.data.planPicture.split(',').forEach(v => {
|
|
// if (v) {
|
|
// if (v) {
|
|
@@ -744,6 +744,34 @@ export default {
|
|
this.getTreeData()
|
|
this.getTreeData()
|
|
this.getData()
|
|
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) {
|
|
baseRequest: function(opUrl, postData) {
|
|
return this.$channel.baseRequest('ParkRoomController', opUrl, postData, 'User')
|
|
return this.$channel.baseRequest('ParkRoomController', opUrl, postData, 'User')
|