From 9adea1060c33b57a3411321713424afdba666ba0 Mon Sep 17 00:00:00 2001 From: dj <1042039504@qq.com> Date: Mon, 19 May 2025 22:13:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(ProjectApply):=20=E7=A7=91=E6=8A=80?= =?UTF-8?q?=E5=A4=84=E7=94=A8=E6=88=B7=E7=94=B3=E8=AF=B7=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E9=83=A8=E9=97=A8=E5=88=86=E7=AE=A1?= =?UTF-8?q?=E9=A2=86=E5=AF=BC=E5=BF=85=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailComponent/ProjectApply.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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