能力申请单位

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