Merge pull request 'feat(ProjectApply): 科技处用户申请项目时增加部门分管领导必选项' (#1007) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1007
This commit is contained in:
@@ -124,7 +124,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="title==='apply'||title==='check'">
|
<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">
|
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
|
||||||
{{
|
{{
|
||||||
optionalChargeLeadershipList?.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择'
|
optionalChargeLeadershipList?.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择'
|
||||||
@@ -258,7 +258,10 @@ import {useTagsView} from '@/stores/tagsview.js'
|
|||||||
import Paging from "@/components/pagination/index.vue";
|
import Paging from "@/components/pagination/index.vue";
|
||||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||||
import {getBaseInfoApi, getMapProjectStateInfo} from "@/components/steps/api";
|
import {getBaseInfoApi, getMapProjectStateInfo} from "@/components/steps/api";
|
||||||
|
import {useAuthStore} from "@/stores/userstore";
|
||||||
|
|
||||||
|
const authStore = useAuthStore()
|
||||||
|
const userInfo =ref( authStore.userinfo)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
@@ -370,7 +373,10 @@ const filePreviewParam = ref({
|
|||||||
fileType: 'pdf'
|
fileType: 'pdf'
|
||||||
})
|
})
|
||||||
const filePreviewShow = ref(false)
|
const filePreviewShow = ref(false)
|
||||||
|
const isKcjUser=()=>{
|
||||||
|
const hasDstiAdmin = userInfo.value.roles?.some(item => item.roleKey != 'dsti_admin');
|
||||||
|
return hasDstiAdmin;
|
||||||
|
}
|
||||||
const getSummaryInfo = async () => {
|
const getSummaryInfo = async () => {
|
||||||
if (props.mode === 'resubmit') return;
|
if (props.mode === 'resubmit') return;
|
||||||
if(props.title === 'check'){
|
if(props.title === 'check'){
|
||||||
@@ -789,6 +795,14 @@ const handleSubmit = async (instance) => {
|
|||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (optionalChargeLeadershipList.value && optionalChargeLeadershipList.value.length === 0&&isKcjUser()) {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请选择部门分管领导!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
|
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
|
||||||
params.projectPersonIds = projectPersonIds
|
params.projectPersonIds = projectPersonIds
|
||||||
params.optionalChargeLeadership = optionalChargeLeadershipList.value
|
params.optionalChargeLeadership = optionalChargeLeadershipList.value
|
||||||
|
|||||||
Reference in New Issue
Block a user