feat(ProjectApply): 科技处用户申请项目时增加部门分管领导必选项

This commit is contained in:
dj
2025-05-19 22:13:03 +08:00
parent 4e5a4bb4b9
commit 9adea1060c

View File

@@ -124,7 +124,7 @@
</el-form-item>
</el-col>
<el-col :span="6" v-if="title==='apply'||title==='check'">
<el-form-item label="部门分管领导" :label-width="title==='check'?130:115">
<el-form-item label="部门分管领导" :label-width="title==='check'?130:115" :required="isKcjUser()">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
{{
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