bug申请能力应用系统选项下方加提示:如选项没有系统请新增
This commit is contained in:
parent
a906b433f2
commit
cce81f9ece
|
@ -8,65 +8,159 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div v-if="applySuccess">
|
<div v-if="applySuccess">
|
||||||
<a-form ref="formRef" :model="formName" name="basic" :label-col="{ style: { width: '106px' } }"
|
<a-form
|
||||||
:wrapper-col="{ style: { width: '230px' } }" labelAlign="left" autocomplete="off">
|
ref="formRef"
|
||||||
|
:model="formName"
|
||||||
|
name="basic"
|
||||||
|
:label-col="{ style: { width: '106px' } }"
|
||||||
|
:wrapper-col="{ style: { width: '230px' } }"
|
||||||
|
labelAlign="left"
|
||||||
|
autocomplete="off"
|
||||||
|
>
|
||||||
<div class="base-info flex-row-start">
|
<div class="base-info flex-row-start">
|
||||||
<a-form-item label="申请标题" name="title" :rules="[{ required: true, message: '请输入申请标题' }]">
|
<a-form-item
|
||||||
<a-input placeholder="请输入能力申请标题" v-model:value="formName.title" />
|
label="申请标题"
|
||||||
|
name="title"
|
||||||
|
:rules="[{ required: true, message: '请输入申请标题' }]"
|
||||||
|
>
|
||||||
|
<a-input
|
||||||
|
placeholder="请输入能力申请标题"
|
||||||
|
v-model:value="formName.title"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 西海岸-摄像头-增加过期时间 -->
|
<!-- 西海岸-摄像头-增加过期时间 -->
|
||||||
<a-form-item v-if="isCamera && isXiHaiAn" label="过期时间" name="expireDate"
|
<a-form-item
|
||||||
:rules="[{ required: true, message: '请选择过期时间' }]" style="margin-left: 22px">
|
v-if="isCamera && isXiHaiAn"
|
||||||
<a-select v-model:value="formName.expireDate" placeholder="请选择过期时间" style="width: 200px;"
|
label="过期时间"
|
||||||
:options="expireDateOptions">
|
name="expireDate"
|
||||||
</a-select>
|
:rules="[{ required: true, message: '请选择过期时间' }]"
|
||||||
|
style="margin-left: 22px"
|
||||||
|
>
|
||||||
|
<a-select
|
||||||
|
v-model:value="formName.expireDate"
|
||||||
|
placeholder="请选择过期时间"
|
||||||
|
style="width: 200px"
|
||||||
|
:options="expireDateOptions"
|
||||||
|
></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="base-info">
|
<div class="base-info">
|
||||||
<a-form-item label="申请人信息" name="user" :rules="[{ required: true, message: '请输入申请人' }]">
|
<a-form-item
|
||||||
<a-input placeholder="请输入申请人" v-model:value="formName.user" disabled />
|
label="申请人信息"
|
||||||
|
name="user"
|
||||||
|
:rules="[{ required: true, message: '请输入申请人' }]"
|
||||||
|
>
|
||||||
|
<a-input
|
||||||
|
placeholder="请输入申请人"
|
||||||
|
v-model:value="formName.user"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item style="margin: 0 22px" label="电话" name="phone" :rules="[
|
<a-form-item
|
||||||
|
style="margin: 0 22px"
|
||||||
|
label="电话"
|
||||||
|
name="phone"
|
||||||
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
pattern: /^1[3456789]\d{9}$/,
|
pattern: /^1[3456789]\d{9}$/,
|
||||||
message: '请输入正确的电话号码',
|
message: '请输入正确的电话号码',
|
||||||
},
|
},
|
||||||
]">
|
]"
|
||||||
<a-input placeholder="请输入申请人电话" v-model:value="formName.phone" />
|
>
|
||||||
|
<a-input
|
||||||
|
placeholder="请输入申请人电话"
|
||||||
|
v-model:value="formName.phone"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="单位" name="unit" :rules="[{ required: true, message: '请输入单位' }]">
|
<a-form-item
|
||||||
<a-input placeholder="请输入单位" v-model:value="formName.unit" disabled v-if="deptFlage" />
|
label="单位"
|
||||||
<a-select v-else placeholder="请选择归属部门" v-model:value="formName.unit" @change="deptIdChangeFunction">
|
name="unit"
|
||||||
<a-select-option v-for="(item, index) in deptNameAll" :key="`${index}-${item}`" :value="item.name">
|
:rules="[{ required: true, message: '请输入单位' }]"
|
||||||
|
>
|
||||||
|
<a-input
|
||||||
|
placeholder="请输入单位"
|
||||||
|
v-model:value="formName.unit"
|
||||||
|
disabled
|
||||||
|
v-if="deptFlage"
|
||||||
|
/>
|
||||||
|
<a-select
|
||||||
|
v-else
|
||||||
|
placeholder="请选择归属部门"
|
||||||
|
v-model:value="formName.unit"
|
||||||
|
@change="deptIdChangeFunction"
|
||||||
|
>
|
||||||
|
<a-select-option
|
||||||
|
v-for="(item, index) in deptNameAll"
|
||||||
|
:key="`${index}-${item}`"
|
||||||
|
:value="item.name"
|
||||||
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="base-info" v-if="flag">
|
<div class="base-info" v-if="flag">
|
||||||
<a-form-item label="应用系统" name="applicationSystem" :rules="[{ required: true, message: '请选择应用系统' }]">
|
<a-form-item
|
||||||
<a-select v-model:value="formName.applicationSystem" show-search placeholder="请输入关键字"
|
label="应用系统"
|
||||||
style="width: 200px" :options="systemOptions" @focus="handleFocus" @blur="handleBlur"
|
name="applicationSystem"
|
||||||
@change="systemHandleChange" @search="systemHandleSearch"></a-select>
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择应用系统(如选项没有系统请新增)',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<a-select
|
||||||
|
v-model:value="formName.applicationSystem"
|
||||||
|
show-search
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
style="width: 200px"
|
||||||
|
:options="systemOptions"
|
||||||
|
@focus="handleFocus"
|
||||||
|
@blur="handleBlur"
|
||||||
|
@change="systemHandleChange"
|
||||||
|
@search="systemHandleSearch"
|
||||||
|
></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="applicationScene" label="应用领域" name="applicationScene"
|
<a-form-item
|
||||||
:rules="[{ required: true, message: '请选择应用领域' }]" style="width: 6.93rem">
|
class="applicationScene"
|
||||||
<a-select v-model:value="formName.applicationScene" :options="applicationSceneOpthion" mode="tags"
|
label="应用领域"
|
||||||
:size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false"
|
name="applicationScene"
|
||||||
style="width: 5.87rem"></a-select>
|
:rules="[{ required: true, message: '请选择应用领域' }]"
|
||||||
|
style="width: 6.93rem"
|
||||||
|
>
|
||||||
|
<a-select
|
||||||
|
v-model:value="formName.applicationScene"
|
||||||
|
:options="applicationSceneOpthion"
|
||||||
|
mode="tags"
|
||||||
|
:size="size"
|
||||||
|
placeholder="请选择应用领域"
|
||||||
|
:filterOption="false"
|
||||||
|
:searchValue="false"
|
||||||
|
style="width: 5.87rem"
|
||||||
|
></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a-form-item label="需求依据" name="applicationBackground" :rules="[
|
<a-form-item
|
||||||
|
label="需求依据"
|
||||||
|
name="applicationBackground"
|
||||||
|
:rules="[
|
||||||
{ required: true, message: '请输入需求依据' },
|
{ required: true, message: '请输入需求依据' },
|
||||||
{ min: 50, message: '需求依据最少为50个字' },
|
{ min: 50, message: '需求依据最少为50个字' },
|
||||||
]">
|
]"
|
||||||
<a-textarea placeholder="请输入需求依据" v-model:value="formName.applicationBackground" :rows="4" />
|
>
|
||||||
|
<a-textarea
|
||||||
|
placeholder="请输入需求依据"
|
||||||
|
v-model:value="formName.applicationBackground"
|
||||||
|
:rows="4"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom-btn">
|
<div class="bottom-btn">
|
||||||
<a-button style="
|
<a-button
|
||||||
|
style="
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
@ -77,10 +171,15 @@
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
" type="primary" html-type="cancle" @click="resetFields()">
|
"
|
||||||
|
type="primary"
|
||||||
|
html-type="cancle"
|
||||||
|
@click="resetFields()"
|
||||||
|
>
|
||||||
退出申请
|
退出申请
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button style="
|
<a-button
|
||||||
|
style="
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
background: #0087ff;
|
background: #0087ff;
|
||||||
|
@ -90,7 +189,11 @@
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
" type="primary" html-type="submit" @click="processStartHandle()">
|
"
|
||||||
|
type="primary"
|
||||||
|
html-type="submit"
|
||||||
|
@click="processStartHandle()"
|
||||||
|
>
|
||||||
提交申请
|
提交申请
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,9 +253,10 @@ export default {
|
||||||
const list = ref(JSON.parse(localStorage.getItem('applyList')))
|
const list = ref(JSON.parse(localStorage.getItem('applyList')))
|
||||||
const deptNameAll = ref([]) //所有部门名称
|
const deptNameAll = ref([]) //所有部门名称
|
||||||
const deptFlage = ref(true) //判断是否存在默认部门名称
|
const deptFlage = ref(true) //判断是否存在默认部门名称
|
||||||
const applyAll = router.currentRoute.value.query.applyAll;
|
const applyAll = router.currentRoute.value.query.applyAll
|
||||||
// 融合服务id
|
// 融合服务id
|
||||||
const integrationServicesId = router.currentRoute.value.query.integrationServicesId;
|
const integrationServicesId =
|
||||||
|
router.currentRoute.value.query.integrationServicesId
|
||||||
// 融合服务详情
|
// 融合服务详情
|
||||||
const integrationServicesItemInfo = ref(null)
|
const integrationServicesItemInfo = ref(null)
|
||||||
const num = ref(0)
|
const num = ref(0)
|
||||||
|
@ -198,14 +302,23 @@ export default {
|
||||||
let wrjAndDbText = ['单兵设备', '无人机']
|
let wrjAndDbText = ['单兵设备', '无人机']
|
||||||
const isXiHaiAn = ref(whoShow.itShowXiHaiAn)
|
const isXiHaiAn = ref(whoShow.itShowXiHaiAn)
|
||||||
// 西海岸-判断是否是基础设施-摄像头
|
// 西海岸-判断是否是基础设施-摄像头
|
||||||
const isCamera = ref(false);
|
const isCamera = ref(false)
|
||||||
if (list.value[0] && list.value[0].arr && list.value[0].arr[0] && list.value[0].arr[0].type == '基础设施') {
|
if (
|
||||||
|
list.value[0] &&
|
||||||
|
list.value[0].arr &&
|
||||||
|
list.value[0].arr[0] &&
|
||||||
|
list.value[0].arr[0].type == '基础设施'
|
||||||
|
) {
|
||||||
isCamera.value = true
|
isCamera.value = true
|
||||||
}
|
}
|
||||||
const formName = reactive({
|
const formName = reactive({
|
||||||
title: applyAll
|
title: applyAll
|
||||||
? '全部应用资源申请'
|
? '全部应用资源申请'
|
||||||
: wrjAndDbText.includes(list.value[0].arr && list.value[0].arr[0] && 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].arr[0].type + '申请'
|
||||||
: list.value[0].children
|
: list.value[0].children
|
||||||
? '申请' +
|
? '申请' +
|
||||||
|
@ -381,7 +494,9 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
// 融合服务
|
// 融合服务
|
||||||
if (integrationServicesId) {
|
if (integrationServicesId) {
|
||||||
getIntegrationServicesDeatil(integrationServicesId).then(res => {
|
getIntegrationServicesDeatil(
|
||||||
|
integrationServicesId
|
||||||
|
).then((res) => {
|
||||||
updateIntegrationServiceAction()
|
updateIntegrationServiceAction()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -425,7 +540,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log('formName--ids-提交数据--------->', formName, ids);
|
console.log('formName--ids-提交数据--------->', formName, ids)
|
||||||
if (formName.system.length !== 0) {
|
if (formName.system.length !== 0) {
|
||||||
if (formName.applicationSystem.length == 0) {
|
if (formName.applicationSystem.length == 0) {
|
||||||
formName.applicationSystem = ''
|
formName.applicationSystem = ''
|
||||||
|
@ -433,7 +548,7 @@ export default {
|
||||||
// 西海岸:单兵设备、无人机单独调取其他接口
|
// 西海岸:单兵设备、无人机单独调取其他接口
|
||||||
if (wrjAndDbText.includes(list.value[0].arr[0].type)) {
|
if (wrjAndDbText.includes(list.value[0].arr[0].type)) {
|
||||||
handleWrjApply(formName)
|
handleWrjApply(formName)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
submitApply(formName).then((res) => {
|
submitApply(formName).then((res) => {
|
||||||
message.success('申请提交成功,请到消息中心查看!')
|
message.success('申请提交成功,请到消息中心查看!')
|
||||||
|
@ -449,7 +564,9 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
// 融合服务
|
// 融合服务
|
||||||
if (integrationServicesId) {
|
if (integrationServicesId) {
|
||||||
getIntegrationServicesDeatil(integrationServicesId).then(res => {
|
getIntegrationServicesDeatil(
|
||||||
|
integrationServicesId
|
||||||
|
).then((res) => {
|
||||||
updateIntegrationServiceAction()
|
updateIntegrationServiceAction()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -501,9 +618,9 @@ export default {
|
||||||
status: sxt.status + '',
|
status: sxt.status + '',
|
||||||
}
|
}
|
||||||
// 西海岸
|
// 西海岸
|
||||||
if (isXiHaiAn) {
|
if (isXiHaiAn.value) {
|
||||||
_itemData.managementUnitName = sxt.managementUnitName;
|
_itemData.managementUnitName = sxt.managementUnitName
|
||||||
_itemData.cameraPointTypeName = sxt.cameraPointTypeName;
|
_itemData.cameraPointTypeName = sxt.cameraPointTypeName
|
||||||
}
|
}
|
||||||
obj.system.push(_itemData)
|
obj.system.push(_itemData)
|
||||||
})
|
})
|
||||||
|
@ -514,9 +631,7 @@ export default {
|
||||||
sgcDel({ ids: [item.id] }).then((res1) => {
|
sgcDel({ ids: [item.id] }).then((res1) => {
|
||||||
if (res1.data.msg === 'success') {
|
if (res1.data.msg === 'success') {
|
||||||
if (falgNum == 0 && sxt) {
|
if (falgNum == 0 && sxt) {
|
||||||
message.success(
|
message.success('申请提交成功,请到消息中心查看!')
|
||||||
'申请提交成功,请到消息中心查看!'
|
|
||||||
)
|
|
||||||
sxt = false
|
sxt = false
|
||||||
}
|
}
|
||||||
mybus.emit('getSgcNum')
|
mybus.emit('getSgcNum')
|
||||||
|
@ -524,11 +639,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (res.data.msg === 'success' && falgNum == 0 && sxt) {
|
||||||
res.data.msg === 'success' &&
|
|
||||||
falgNum == 0 &&
|
|
||||||
sxt
|
|
||||||
) {
|
|
||||||
message.success('申请提交成功,请到消息中心查看!')
|
message.success('申请提交成功,请到消息中心查看!')
|
||||||
sxt = false
|
sxt = false
|
||||||
}
|
}
|
||||||
|
@ -724,8 +835,14 @@ export default {
|
||||||
// 西海岸:单兵设备、无人机提交申请
|
// 西海岸:单兵设备、无人机提交申请
|
||||||
const handleWrjApply = (formName) => {
|
const handleWrjApply = (formName) => {
|
||||||
let _data = {
|
let _data = {
|
||||||
deviceId: formName.system && formName.system[0] && formName.system[0].resourceId,
|
deviceId:
|
||||||
deviceName: formName.system && formName.system[0] && formName.system[0].resourceName,
|
formName.system &&
|
||||||
|
formName.system[0] &&
|
||||||
|
formName.system[0].resourceId,
|
||||||
|
deviceName:
|
||||||
|
formName.system &&
|
||||||
|
formName.system[0] &&
|
||||||
|
formName.system[0].resourceName,
|
||||||
title: formName.title,
|
title: formName.title,
|
||||||
name: formName.user,
|
name: formName.user,
|
||||||
phone: formName.phone,
|
phone: formName.phone,
|
||||||
|
@ -734,14 +851,16 @@ export default {
|
||||||
applicationArea: JSON.stringify(formName.applicationScene), // 应用领域
|
applicationArea: JSON.stringify(formName.applicationScene), // 应用领域
|
||||||
demand: formName.applicationBackground, // 需求依据
|
demand: formName.applicationBackground, // 需求依据
|
||||||
}
|
}
|
||||||
soldierApply(_data).then(res => {
|
soldierApply(_data)
|
||||||
|
.then((res) => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
message.success(res.data.msg)
|
message.success(res.data.msg)
|
||||||
jumpToDetailsPageconetent()
|
jumpToDetailsPageconetent()
|
||||||
} else {
|
} else {
|
||||||
message.error('申请失败!')
|
message.error('申请失败!')
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
})
|
||||||
|
.catch((err) => {
|
||||||
message.error(err)
|
message.error(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue