能力申请单位

This commit is contained in:
851673013@qq.com 2022-09-16 15:15:03 +08:00
parent dfba732000
commit f2e68d0105
1 changed files with 702 additions and 649 deletions

View File

@ -67,7 +67,22 @@
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 }}
</a-select-option>
</a-select>
</a-form-item>
</div>
<div class="base-info" v-if="flag">
@ -195,6 +210,7 @@ import {
relaunch,
selectOne,
} from '@/api/home'
import { getDeptAll } from '@/api/user'
import { getCategoryTreePage, endProcess } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus'
import { sgcDel, getApplyForm } from '@/api/personalCenter'
@ -216,6 +232,8 @@ export default {
const integrationServicesItemInfo = ref(
JSON.parse(localStorage.getItem('integrationServicesItemInfo') || '{}')
)
const deptNameAll = ref([]) //
const deptFlage = ref(true) //
console.log(
'integrationServicesItemInfo------------>',
integrationServicesItemInfo
@ -268,6 +286,7 @@ export default {
userId: '',
phone: '',
unit: '',
deptId: '',
system: [],
enclosure: '', //
enclosureName: '', //
@ -303,8 +322,24 @@ export default {
formName.phone = res.data.data.mobile
}
formName.unit = res.data.data.deptName
if (!formName.unit) {
deptFlage.value = false
//
getDeptAll().then((res) => {
deptNameAll.value = res.data.data
})
}
})
})
//
const deptIdChangeFunction = (name) => {
deptNameAll.value.map((item) => {
if (item.name == name) {
formName.deptId = item.id
}
})
console.log(formName)
}
const applicationSceneOpthion = ref([])
getCategoryTreePage({
page: 1,
@ -344,13 +379,12 @@ export default {
router.push({
path: '/DetailsPageconetent',
query: {
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
},
})
}
const processStartHandle = () => {
debugger
formRef.value.validate().then(() => {
if (!formUrl) {
return message.error('请设置保存表单的URL')
@ -425,7 +459,11 @@ export default {
}
})
} else {
if (res.data.msg === 'success' && falgNum == 0 && sxt) {
if (
res.data.msg === 'success' &&
falgNum == 0 &&
sxt
) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
@ -458,7 +496,9 @@ export default {
})
} else {
// todo
if (Object.keys(integrationServicesItemInfo).length > 0) {
if (
Object.keys(integrationServicesItemInfo).length > 0
) {
updateIntegrationServiceAction()
}
jumpToDetailsPageconetent()
@ -542,7 +582,11 @@ export default {
}
})
} else {
if (res.data.msg === 'success' && falgNum == 0 && sxt) {
if (
res.data.msg === 'success' &&
falgNum == 0 &&
sxt
) {
message.success('申请提交成功,请到消息中心查看!')
sxt = false
}
@ -552,7 +596,11 @@ export default {
}
})
})
console.log('提交数据==========================>', formName, ids)
console.log(
'提交数据==========================>',
formName,
ids
)
if (formName.system.length !== 0) {
if (formName.applicationSystem.length == 0) {
formName.applicationSystem = ''
@ -571,7 +619,9 @@ export default {
})
} else {
// todo
if (Object.keys(integrationServicesItemInfo).length > 0) {
if (
Object.keys(integrationServicesItemInfo).length > 0
) {
updateIntegrationServiceAction()
}
jumpToDetailsPageconetent()
@ -761,8 +811,10 @@ export default {
})
}
return {
deptIdChangeFunction,
formRef,
formName,
deptNameAll,
instanceIdUrl,
formUrl,
processStartHandle,
@ -771,6 +823,7 @@ export default {
options,
fileList,
list,
deptFlage,
headers: {
authorization: 'authorization-text',
},