Compare commits
2 Commits
6827b2ebe5
...
e7a5a21430
Author | SHA1 | Date |
---|---|---|
guoyue | e7a5a21430 | |
guoyue | 11f4c3fe25 |
|
@ -444,3 +444,19 @@ export function selectAppList(params) {
|
|||
params,
|
||||
})
|
||||
}
|
||||
// 西海岸-获取无人机和单兵设备列表
|
||||
export function getSoldierList(params) {
|
||||
return request({
|
||||
url: '/device/page',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 西海岸-无人机和单兵设备提交申请
|
||||
export function soldierApply(data) {
|
||||
return request({
|
||||
url: '/deviceApply',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
|
@ -126,7 +126,7 @@ import mybus from '@/myplugins/mybus'
|
|||
import { sgcDel, getApplyForm } from '@/api/personalCenter'
|
||||
import { pageWithAttrs, updateIntegrationServices } from '@/api/home'
|
||||
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
|
||||
import { getIntegrationDetail } from '@/api/home'
|
||||
import { getIntegrationDetail, soldierApply } from '@/api/home'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
|
@ -140,7 +140,6 @@ export default {
|
|||
const disabled = ref(false)
|
||||
const flag = ref(false)
|
||||
const list = ref(JSON.parse(localStorage.getItem('applyList')))
|
||||
|
||||
const deptNameAll = ref([]) //所有部门名称
|
||||
const deptFlage = ref(true) //判断是否存在默认部门名称
|
||||
const applyAll = router.currentRoute.value.query.applyAll;
|
||||
|
@ -148,17 +147,15 @@ export default {
|
|||
const integrationServicesId = router.currentRoute.value.query.integrationServicesId;
|
||||
// 融合服务详情
|
||||
const integrationServicesItemInfo = ref(null)
|
||||
|
||||
const num = ref(0)
|
||||
|
||||
if (!applyAll) {
|
||||
list.value.map((item) => {
|
||||
item.arr.map((val) => {
|
||||
console.log(item, '组件===========================')
|
||||
let obj = item.children
|
||||
? item.children.filter((type) => type.id == val.id)[0]
|
||||
: val.type !== '应用资源'
|
||||
if (obj) {
|
||||
console.log('11111111111111111111111111111', obj, flag.value)
|
||||
if (obj.type !== '应用资源') {
|
||||
flag.value = true
|
||||
}
|
||||
|
@ -174,11 +171,13 @@ export default {
|
|||
const baseURL = window.SITE_CONFIG.apiURL
|
||||
let record = ref('1')
|
||||
const text = ref('')
|
||||
// 西海岸-特殊处理 todo
|
||||
let wrjAndDbText = ['单兵设备', '无人机']
|
||||
const formName = reactive({
|
||||
title: applyAll
|
||||
? '全部应用资源申请'
|
||||
: list.value[0].arr && list.value[0].arr[0].type == '单兵设备'
|
||||
? '单兵设备申请'
|
||||
: wrjAndDbText.includes(list.value[0].arr && list.value[0].arr[0] && list.value[0].arr[0].type)
|
||||
? list.value[0].arr[0].type + '申请'
|
||||
: list.value[0].children
|
||||
? '申请' +
|
||||
list.value[0].children
|
||||
|
@ -262,9 +261,7 @@ export default {
|
|||
label: val.dictLabel,
|
||||
})
|
||||
})
|
||||
// console.log('字典值========>', applicationSceneOpthion.value)
|
||||
})
|
||||
// console.log(formName.system)
|
||||
const formRef = ref()
|
||||
const applySuccess = ref(true)
|
||||
const dataForm = {
|
||||
|
@ -293,6 +290,7 @@ export default {
|
|||
})
|
||||
}
|
||||
|
||||
// 提交申请
|
||||
const processStartHandle = () => {
|
||||
formRef.value.validate().then(() => {
|
||||
if (!formUrl) {
|
||||
|
@ -301,6 +299,7 @@ export default {
|
|||
if (!formName) {
|
||||
return message.error('请设置表单名称')
|
||||
}
|
||||
|
||||
if (id) {
|
||||
endProcess({ instanceId: taskId }).then((end) => {
|
||||
if (end.data.code == 0) {
|
||||
|
@ -421,12 +420,6 @@ export default {
|
|||
})
|
||||
} else {
|
||||
if (!applyAll) {
|
||||
console.log(list.value[0].arr[0])
|
||||
// 单兵设备为了演示 添加 不做处理
|
||||
if (list.value[0].arr[0].type == '单兵设备') {
|
||||
message.success('单兵设备申请提交成功!')
|
||||
jumpToDetailsPageconetent()
|
||||
} else {
|
||||
let ids = []
|
||||
let falgNum = 0
|
||||
let sxt = true
|
||||
|
@ -505,15 +498,16 @@ export default {
|
|||
}
|
||||
})
|
||||
})
|
||||
console.log(
|
||||
'提交数据==========================>',
|
||||
formName,
|
||||
ids
|
||||
)
|
||||
console.log('formName--ids-提交数据--------->', formName, ids);
|
||||
if (formName.system.length !== 0) {
|
||||
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('申请提交成功,请到消息中心查看!')
|
||||
|
@ -540,7 +534,6 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
formName.applicationSystem = ''
|
||||
applyAllApplication(formName).then((res) => {
|
||||
|
@ -737,7 +730,32 @@ export default {
|
|||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
// 西海岸:单兵设备、无人机提交申请 todo
|
||||
const handleWrjApply = (formName) => {
|
||||
let _data = {
|
||||
deviceId: formName.system && formName.system[0] && formName.system[0].resourceId,
|
||||
title: formName.title,
|
||||
name: formName.user,
|
||||
phone: formName.phone,
|
||||
dept: formName.unit, // 单位
|
||||
system: formName.applicationSystem, // 应用系统
|
||||
area: formName.applicationScene, // 应用领域
|
||||
demand: formName.applicationBackground, // 需求依据
|
||||
}
|
||||
console.log('_data-----提交申请------->', _data);
|
||||
soldierApply(_data).then(res => {
|
||||
console.log('res----提交申请-------->', res);
|
||||
if (res.data.code == 0) {
|
||||
message.success(res.data.msg)
|
||||
jumpToDetailsPageconetent()
|
||||
} else {
|
||||
message.error('申请失败!')
|
||||
}
|
||||
}).catch(err => {
|
||||
message.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue