diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue index 0820bcb..32faf70 100644 --- a/src/components/DetailComponent/ProjectApply.vue +++ b/src/components/DetailComponent/ProjectApply.vue @@ -124,7 +124,7 @@ - + {{ optionalChargeLeadershipList?.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择' @@ -258,7 +258,10 @@ import {useTagsView} from '@/stores/tagsview.js' import Paging from "@/components/pagination/index.vue"; import UserPicker from "@/views/workflow/process/common/UserPicker.vue"; import {getBaseInfoApi, getMapProjectStateInfo} from "@/components/steps/api"; +import {useAuthStore} from "@/stores/userstore"; +const authStore = useAuthStore() +const userInfo =ref( authStore.userinfo) const router = useRouter() const route = useRoute() const formRef = ref() @@ -370,7 +373,10 @@ const filePreviewParam = ref({ fileType: 'pdf' }) const filePreviewShow = ref(false) - +const isKcjUser=()=>{ + const hasDstiAdmin = userInfo.value.roles?.some(item => item.roleKey != 'dsti_admin'); + return hasDstiAdmin; +} const getSummaryInfo = async () => { if (props.mode === 'resubmit') return; if(props.title === 'check'){ @@ -789,6 +795,14 @@ const handleSubmit = async (instance) => { }) return; } + if (optionalChargeLeadershipList.value && optionalChargeLeadershipList.value.length === 0&&isKcjUser()) { + ElNotification({ + title: '提示', + message: '请选择部门分管领导!', + type: 'error' + }) + return; + } params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id) params.projectPersonIds = projectPersonIds params.optionalChargeLeadership = optionalChargeLeadershipList.value