能力申请单位

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="请输入单位" 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">
@ -176,14 +191,14 @@
</div> </div>
</template> </template>
<script> <script>
import AbilityToApplyFor from './AbilityToApplyFor.vue' import AbilityToApplyFor from './AbilityToApplyFor.vue'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { reactive, ref, watch, onBeforeUnmount } from 'vue' import { reactive, ref, watch, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import qs from 'qs' import qs from 'qs'
import { Upload } from 'ant-design-vue' import { Upload } from 'ant-design-vue'
import { import {
lastestPage, lastestPage,
tabilityapplication, tabilityapplication,
startOfBusinessKey, startOfBusinessKey,
@ -194,14 +209,15 @@ import {
getUserInfo, getUserInfo,
relaunch, relaunch,
selectOne, selectOne,
} from '@/api/home' } from '@/api/home'
import { getCategoryTreePage, endProcess } from '@/api/personalCenter' import { getDeptAll } from '@/api/user'
import mybus from '@/myplugins/mybus' import { getCategoryTreePage, endProcess } from '@/api/personalCenter'
import { sgcDel, getApplyForm } from '@/api/personalCenter' import mybus from '@/myplugins/mybus'
import { pageWithAttrs, updateIntegrationServices } from '@/api/home' import { sgcDel, getApplyForm } from '@/api/personalCenter'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js' import { pageWithAttrs, updateIntegrationServices } from '@/api/home'
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
export default { export default {
name: '', name: '',
props: {}, props: {},
components: { components: {
@ -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',
}, },
@ -790,10 +843,10 @@ export default {
applyAll, applyAll,
} }
}, },
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
#apply-container { #apply-container {
// background-color: #f5f8fc; // background-color: #f5f8fc;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -856,22 +909,22 @@ export default {
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
} }
.applicationScene { .applicationScene {
:deep(.ant-select-selector) { :deep(.ant-select-selector) {
overflow-x: scroll; overflow-x: scroll;
} }
:deep(.ant-select-selection-overflow) { :deep(.ant-select-selection-overflow) {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
} }
textarea { textarea {
resize: none; resize: none;
font-size: 14px; font-size: 14px;
} }
.bottom-btn { .bottom-btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
// position: fixed; // position: fixed;
} }
</style> </style>