西海岸:基础设施--批量申请--增加参数

This commit is contained in:
guoyue 2022-09-27 18:04:07 +08:00
parent fc8f43b94c
commit 787ceeef3f
1 changed files with 64 additions and 110 deletions

View File

@ -359,72 +359,15 @@ export default {
ids.push(item.id)
}
} else {
let obj = {}
// todo
console.log('formName---摄像头--------->', formName);
obj.system = []
item.note1 = JSON.parse(item.note1)
item.note1.map((sxt) => {
obj.system.push({
resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName,
cameraId: sxt.channelId, //
channelCode: sxt.channelCode,
channelId: sxt.channelId,
channelName: sxt.channelName,
checkStatus: sxt.checkStatus + '',
gpsX: sxt.gpsX,
gpsY: sxt.gpsY,
idtCameraChannel: sxt.idtCameraChannel + '',
nodeName: sxt.nodeName,
parentId: sxt.parentId,
status: sxt.status + '',
})
})
console.log('obj----摄像头申请-------->', obj);
return;
submitApply(obj).then((res) => {
// applySuccess.value = false
console.log('摄像头申请================>', res)
if (item.id) {
sgcDel({ ids: [item.id] }).then((res1) => {
if (res1.data.msg === 'success') {
if (falgNum == 0 && sxt) {
message.success(
'申请提交成功,请到消息中心查看!'
)
sxt = false
}
mybus.emit('getSgcNum')
jumpToDetailsPageconetent()
}
})
} else {
if (
res.data.msg === 'success' &&
falgNum == 0 &&
sxt
) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
jumpToDetailsPageconetent()
}
})
infrastructureConfirm(item)
}
})
})
console.log(
'提交数据============submitApply==============>',
formName,
ids
)
if (formName.system.length !== 0) {
if (formName.applicationSystem.length == 0) {
formName.applicationSystem = ''
}
submitApply(formName).then((res) => {
// applySuccess.value = false
message.success('申请提交成功,请到消息中心查看!')
console.log('能力申请================>', res)
if (res.data.code == 0) {
@ -478,56 +421,7 @@ export default {
ids.push(item.id)
}
} else {
let obj = {}
Object.assign(obj, formName)
console.log('摄像头===============>', obj, item)
obj.system = []
item.note1 = JSON.parse(item.note1)
item.note1.map((sxt) => {
obj.system.push({
resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName,
cameraId: sxt.channelId, //
channelCode: sxt.channelCode,
channelId: sxt.channelId,
channelName: sxt.channelName,
checkStatus: sxt.checkStatus + '',
gpsX: sxt.gpsX,
gpsY: sxt.gpsY,
idtCameraChannel: sxt.idtCameraChannel + '',
nodeName: sxt.nodeName,
parentId: sxt.parentId,
status: sxt.status + '',
})
})
submitApply(obj).then((res) => {
// applySuccess.value = false
console.log('摄像头申请================>', res)
if (item.id) {
sgcDel({ ids: [item.id] }).then((res1) => {
if (res1.data.msg === 'success') {
if (falgNum == 0 && sxt) {
message.success(
'申请提交成功,请到消息中心查看!'
)
sxt = false
}
mybus.emit('getSgcNum')
jumpToDetailsPageconetent()
}
})
} else {
if (
res.data.msg === 'success' &&
falgNum == 0 &&
sxt
) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
jumpToDetailsPageconetent()
}
})
infrastructureConfirm(item)
}
})
})
@ -536,13 +430,12 @@ export default {
if (formName.applicationSystem.length == 0) {
formName.applicationSystem = ''
}
// todo 西
// 西
if (wrjAndDbText.includes(list.value[0].arr[0].type)) {
handleWrjApply(formName)
return;
}
submitApply(formName).then((res) => {
// applySuccess.value = false
message.success('申请提交成功,请到消息中心查看!')
console.log('能力申请================>', res)
if (res.data.code == 0) {
@ -581,6 +474,67 @@ export default {
}
})
}
// --
const infrastructureConfirm = (item) => {
let obj = {}
Object.assign(obj, formName)
console.log('摄像头===============>', obj, item)
obj.system = []
item.note1 = JSON.parse(item.note1)
item.note1.map((sxt) => {
let _itemData = {
resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName,
cameraId: sxt.channelId, //
channelCode: sxt.channelCode,
channelId: sxt.channelId,
channelName: sxt.channelName,
checkStatus: sxt.checkStatus + '',
gpsX: sxt.gpsX,
gpsY: sxt.gpsY,
idtCameraChannel: sxt.idtCameraChannel + '',
nodeName: sxt.nodeName,
parentId: sxt.parentId,
status: sxt.status + '',
}
// 西
if (isXiHaiAn) {
_itemData.managementUnitName = sxt.managementUnitName;
_itemData.cameraPointTypeName = sxt.cameraPointTypeName;
}
obj.system.push(_itemData)
})
submitApply(obj).then((res) => {
// applySuccess.value = false
console.log('摄像头申请================>', res)
if (item.id) {
sgcDel({ ids: [item.id] }).then((res1) => {
if (res1.data.msg === 'success') {
if (falgNum == 0 && sxt) {
message.success(
'申请提交成功,请到消息中心查看!'
)
sxt = false
}
mybus.emit('getSgcNum')
jumpToDetailsPageconetent()
}
})
} else {
if (
res.data.msg === 'success' &&
falgNum == 0 &&
sxt
) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
jumpToDetailsPageconetent()
}
})
}
//
const startProcess = (processDefinitionKey, businessKey, formData) => {
var data = {