Merge branch 'hi-ucs-dev' of http://124.222.94.39:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-09-16 16:45:53 +08:00
commit de605dd446
1 changed files with 702 additions and 649 deletions

View File

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