diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue
index ea3343c6..391c868c 100644
--- a/front/src/views/home/DetailsPageconetent.vue
+++ b/front/src/views/home/DetailsPageconetent.vue
@@ -269,14 +269,14 @@
class="resultListSearchInput"
/>
-
+ -->
diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue
index 74cfa2f4..6df54af7 100644
--- a/front/src/views/home/apply.vue
+++ b/front/src/views/home/apply.vue
@@ -310,6 +310,8 @@
const formName = reactive({
title: applyAll
? '全部应用资源申请'
+ : list.value[0].arr && list.value[0].arr[0].type == '单兵设备'
+ ? '单兵设备申请'
: list.value[0].children
? list.value[0].children
.filter((val) => val.id == list.value[0].checkedList[0])[0]
@@ -425,65 +427,122 @@
return message.error('请设置表单名称')
}
if (!applyAll) {
- let ids = []
- let falgNum = 0
- let sxt = true
- formName.system = []
- console.log('list==================', list.value)
- list.value.map((val) => {
- val.arr.map((item) => {
- if (item.type !== '基础设施') {
- falgNum++
- }
+ console.log(list.value[0].arr[0])
+ // 单兵设备为了演示 添加 不做处理
+ if (list.value[0].arr[0].type == '单兵设备') {
+ message.success('单兵设备申请提交成功!')
+ router.push({
+ path: '/DetailsPageconetent',
+ query: {
+ select: '组件服务',
+ },
})
- })
- list.value.map((val) => {
- val.arr.map((item) => {
- if (item.type !== '基础设施') {
- formName.system.push({
- resourceId: item.resourceId,
- resourceName: item.resourceName,
- })
- falgNum++
- console.log(item.id)
- if (item.id) {
- ids.push(item.id)
+ } else {
+ let ids = []
+ let falgNum = 0
+ let sxt = true
+ formName.system = []
+ console.log('list==================', list.value)
+ list.value.map((val) => {
+ val.arr.map((item) => {
+ if (item.type !== '基础设施') {
+ falgNum++
}
- } 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 + '',
+ })
+ })
+ list.value.map((val) => {
+ val.arr.map((item) => {
+ if (item.type !== '基础设施') {
+ formName.system.push({
+ resourceId: item.resourceId,
+ resourceName: item.resourceName,
})
- })
- submitApply(obj).then((res) => {
- // applySuccess.value = false
- console.log('摄像头申请================>', res)
+ falgNum++
+ console.log(item.id)
if (item.id) {
- sgcDel({ ids: [item.id] }).then((res1) => {
- if (res1.data.msg === 'success') {
- if (falgNum == 0 && sxt) {
- message.success(
- '申请提交成功,请到消息中心查看!'
- )
- sxt = false
+ 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')
+ router.push({
+ path: '/DetailsPageconetent',
+ query: {
+ select: '组件服务',
+ },
+ })
}
+ })
+ } else {
+ if (
+ res.data.msg === 'success' &&
+ falgNum == 0 &&
+ sxt
+ ) {
+ message.success('申请提交成功,请到消息中心查看!')
+ sxt = false
+ }
+ router.push({
+ path: '/DetailsPageconetent',
+ query: {
+ select: '组件服务',
+ },
+ })
+ }
+ })
+ }
+ })
+ })
+ console.log(
+ '提交数据==========================>',
+ 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) {
+ if (ids && ids.length > 0) {
+ sgcDel({ ids: ids }).then((res) => {
+ if (res.data.msg === 'success') {
mybus.emit('getSgcNum')
router.push({
path: '/DetailsPageconetent',
@@ -494,10 +553,6 @@
}
})
} else {
- if (res.data.msg === 'success' && falgNum == 0 && sxt) {
- message.success('申请提交成功,请到消息中心查看!')
- sxt = false
- }
router.push({
path: '/DetailsPageconetent',
query: {
@@ -505,44 +560,11 @@
},
})
}
- })
- }
- })
- })
- console.log('提交数据==========================>', 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) {
- if (ids && ids.length > 0) {
- sgcDel({ ids: ids }).then((res) => {
- if (res.data.msg === 'success') {
- mybus.emit('getSgcNum')
- router.push({
- path: '/DetailsPageconetent',
- query: {
- select: '组件服务',
- },
- })
- }
- })
} else {
- router.push({
- path: '/DetailsPageconetent',
- query: {
- select: '组件服务',
- },
- })
+ message.error('申请失败!')
}
- } else {
- message.error('申请失败!')
- }
- })
+ })
+ }
}
} else {
formName.applicationSystem = ''
diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue
index 837b1700..88adb112 100644
--- a/front/src/views/home/infrastructurePage.vue
+++ b/front/src/views/home/infrastructurePage.vue
@@ -32,7 +32,7 @@