基础设施申请添加提示

This commit is contained in:
a0049873 2022-07-25 10:17:08 +08:00
parent afc9b1c1f7
commit 011cd3708a
1 changed files with 22 additions and 2 deletions

View File

@ -426,8 +426,17 @@
} }
if (!applyAll) { if (!applyAll) {
let ids = [] let ids = []
let falgNum = 0
let sxt = true
formName.system = [] formName.system = []
console.log('list==================', list.value) console.log('list==================', list.value)
list.value.map((val) => {
val.arr.map((item) => {
if (item.type !== '基础设施') {
falgNum++
}
})
})
list.value.map((val) => { list.value.map((val) => {
val.arr.map((item) => { val.arr.map((item) => {
if (item.type !== '基础设施') { if (item.type !== '基础设施') {
@ -435,6 +444,7 @@
resourceId: item.resourceId, resourceId: item.resourceId,
resourceName: item.resourceName, resourceName: item.resourceName,
}) })
falgNum++
console.log(item.id) console.log(item.id)
if (item.id) { if (item.id) {
ids.push(item.id) ids.push(item.id)
@ -456,8 +466,14 @@
// applySuccess.value = false // applySuccess.value = false
console.log('摄像头申请================>', res) console.log('摄像头申请================>', res)
if (item.id) { if (item.id) {
sgcDel({ ids: [item.id] }).then((res) => { sgcDel({ ids: [item.id] }).then((res1) => {
if (res.data.msg === 'success') { if (res1.data.msg === 'success') {
if (falgNum == 0 && sxt) {
message.success(
'申请提交成功,请到消息中心查看!'
)
sxt = false
}
mybus.emit('getSgcNum') mybus.emit('getSgcNum')
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
@ -468,6 +484,10 @@
} }
}) })
} else { } else {
if (res.data.msg === 'success' && falgNum == 0 && sxt) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
router.push({ router.push({
path: '/DetailsPageconetent', path: '/DetailsPageconetent',
query: { query: {