BUG修改 下架的能力 不允许申请

This commit is contained in:
a0049873 2022-07-26 10:43:28 +08:00
parent 8be597f9cf
commit 15a3236516
1 changed files with 28 additions and 30 deletions

View File

@ -312,18 +312,18 @@
// ) // )
let scArr = [] let scArr = []
if (checkedListAbility.value.length === 0) { if (checkedListAbility.value.length === 0) {
message.error('请选择需要收藏的数据') message.warning('请选择需要收藏的数据')
} else { } else {
list.value.forEach((val) => { list.value.forEach((val) => {
if (val.children) { if (val.children) {
val.children.map((item) => { val.children.map((item) => {
if (item.resourceId == '8888888880000000001') {
message.warning('摄像头无法添加收藏!')
} else {
if ( if (
checkedListAbility.value.indexOf(item.id) > -1 && checkedListAbility.value.indexOf(item.id) > -1 &&
item.delFlag == 0 item.delFlag == 0
) { ) {
if (item.resourceId == '8888888880000000001') {
message.warning('摄像头无法添加收藏!')
} else {
scArr.push({ resourceId: item.resourceId }) scArr.push({ resourceId: item.resourceId })
} }
} }
@ -338,7 +338,7 @@
} }
}) })
} else { } else {
message.error('下架的数据无法收藏') message.warning('下架的数据无法收藏')
} }
} }
} }
@ -750,7 +750,7 @@
// //
const delList = () => { const delList = () => {
if (checkedListAbility.value.length == 0) { if (checkedListAbility.value.length == 0) {
message.error('请先选择需要操作的数据!') message.warning('请先选择需要操作的数据!')
} else { } else {
sgcDel({ sgcDel({
ids: checkedListAbility.value, ids: checkedListAbility.value,
@ -807,31 +807,28 @@
} }
// //
const apply = () => { const apply = () => {
// list.value.forEach((val) => {
// if (checkedList.value.indexOf(val.deptId) !== -1) {
// if (val.delFlag != 0) {
// checkedList.value.splice(checkedList.value.indexOf(val.deptId), 1)
// val.checked = false
// message.error('')
// }
// }
// })
if (checkedListAbility.value.length == 0) { if (checkedListAbility.value.length == 0) {
message.error('请先选择需要申请的数据!') message.warning('请先选择需要申请的数据!')
} else { } else {
let arr = [] let arr = []
let delArr = []
list.value.map((val) => { list.value.map((val) => {
val.arr = val.children.filter((item) => { val.arr = val.children.filter((item) => {
console.log('选择的数据=============>', item) console.log('选择的数据=============>', item)
if ( if (checkedListAbility.value.indexOf(item.id) > -1) {
checkedListAbility.value.indexOf(item.id) > -1 && if (item.delFlag == 0) {
item.delFlag != 0
) {
return item return item
} else {
delArr.push(item)
}
} }
}) })
}) })
arr = list.value.filter((val) => val.arr.length !== 0) arr = list.value.filter((val) => val.arr.length !== 0)
if (delArr.length > 0) {
message.warning('已经下架的能力无法申请!')
}
if (arr.length > 0) {
console.log('一键申请===================>', arr) console.log('一键申请===================>', arr)
localStorage.setItem('applyList', JSON.stringify(arr)) localStorage.setItem('applyList', JSON.stringify(arr))
router.push({ router.push({
@ -839,6 +836,7 @@
}) })
} }
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ant-list { .ant-list {