消防区域管理、消防点位维护选择框全开

pull/11/head
limingyu 2024-04-01 19:15:16 +08:00
parent cd3437b03c
commit 533c901b47
2 changed files with 30 additions and 2 deletions

View File

@ -235,7 +235,8 @@ export default {
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
}, },
selectable(row, index) { selectable(row, index) {
return row.DEVICE_COUNT == 0 // return row.DEVICE_COUNT == 0
return true
}, },
getRowKey(row) { getRowKey(row) {
return row.FIRE_POINT_ID return row.FIRE_POINT_ID
@ -413,6 +414,19 @@ export default {
}) })
return return
} }
var flag = true
selection.forEach(item => {
if (item.DEVICE_COUNT > 0) {
flag = false
}
})
if (!flag) {
this.$message({
type: 'warning',
message: '选择的点位中有子数据,不能删除'
})
return
}
selection.forEach(item => { selection.forEach(item => {
DATA_IDS.push(item.FIRE_POINT_ID) DATA_IDS.push(item.FIRE_POINT_ID)
}) })

View File

@ -268,7 +268,8 @@ export default {
return row.FIRE_REGION_ID return row.FIRE_REGION_ID
}, },
selectable(row, index) { selectable(row, index) {
return row.ITEMCOUNT == 0 // return row.ITEMCOUNT == 0
return true
}, },
// //
handelEditDept(row) { handelEditDept(row) {
@ -334,6 +335,19 @@ export default {
}) })
return return
} }
var isFlag = true
selection.forEach(item => {
if (item.ITEMCOUNT > 0) {
isFlag = false
}
})
if (!isFlag) {
this.$message({
type: 'warning',
message: '选择区域中存在下级数据,不能删除'
})
return
}
selection.forEach(item => { selection.forEach(item => {
DATA_IDS.push(item.FIRE_REGION_ID) DATA_IDS.push(item.FIRE_REGION_ID)
}) })