feat : 需求上报,项目立项,验收加上分管领导选择

This commit is contained in:
2024-07-25 19:36:06 +08:00
parent 15689dfbc1
commit 8901053fd6
3 changed files with 97 additions and 31 deletions

View File

@@ -35,7 +35,6 @@
<el-form-item label="项目负责人" :required="true" prop=""
label-width="125">
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
<!-- {{ localFormData.projectChargePerson ? '更改' : '请选择' }}-->
{{ projectChargePersonUserList.length !== 0 ? '更改' : '请选择' }}
</el-button>
<div v-for="item in projectChargePersonUserList" :key="item.id" style="margin-right: 5px">
@@ -49,7 +48,6 @@
<el-form-item label="项目成员" :required="true" prop=""
label-width="125">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
<!-- {{ localFormData.projectPersonIds ? '更改' : '请选择' }}-->
{{ projectPersonUserList.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
</el-button>
<div v-for="item in getProjectPerson(projectPersonUserList)" :key="item.id" style="margin-right: 5px">
@@ -59,6 +57,19 @@
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="title==='apply'||title==='check'">
<el-form-item label="分管领导" :required="true" prop=""
label-width="125">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
{{ optionalChargeLeadershipList.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择' }}
</el-button>
<div v-for="item in getOptionalChargeLeadershipList(optionalChargeLeadershipList)" :key="item.id" style="margin-right: 5px">
{{ item.name }}
</div>
<user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择分管领导"
v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOk"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="preProcessShow === 'EDIT'">
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
@@ -303,13 +314,23 @@ const deploymentId = ref()
const selectRows = ref([])
const projectId = ref(route.query.projectId)
const sessionParams = ref({})
const optionalChargeLeadershipPickerRef = ref()
const optionalChargeLeadershipList = ref([])
const filePreviewParam = ref({
fileUrl: '',
fileName: '',
fileType: 'pdf'
})
const filePreviewShow = ref(false)
const handleShowOptionalChargeLeadershipPicker = () => {
optionalChargeLeadershipPickerRef.value.showUserPicker()
}
const optionalChargeLeaderPickerOk = (userList) => {
optionalChargeLeadershipList.value = userList
localStorage.setItem('optionalChargeLeadershipList', JSON.stringify(optionalChargeLeadershipList.value))
}
const clickToPreview=(row)=>{
filePreviewShow.value = false
filePreviewParam.value = {
@@ -322,6 +343,17 @@ const clickToPreview=(row)=>{
})
}
const getOptionalChargeLeadershipList = (list) => {
if (!list || list && list.length === 0) {
if (localStorage.getItem('optionalChargeLeadershipList')) {
let param = JSON.parse(localStorage.getItem('optionalChargeLeadershipList'))
optionalChargeLeadershipList.value = param
return optionalChargeLeadershipList.value
}
} else {
return list
}
}
const getProjectPerson = (list) => {
if (!list || list && list.length === 0) {
if (localStorage.getItem('projectPersonUserList')) {
@@ -615,12 +647,14 @@ const handleSubmit = async () => {
}
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
params.projectPersonIds = projectPersonIds
params.optionalChargeLeadership = optionalChargeLeadershipList.value
if (props.mode === 'resubmit') {
res = await resubmitApply(params)
} else {
res = await projectApply(params)
}
} else if (props.step === '40') {
params.optionalChargeLeadership = optionalChargeLeadershipList.value
if (props.mode === 'resubmit') {
res = await resubmitCheck(params)
} else {
@@ -745,6 +779,12 @@ watchEffect(() => {
localProjectPerson.value = param
localStorage.setItem('projectPersonUserList', JSON.stringify(param))
}
if (localStorage.getItem('optionalChargeLeadershipList')) {
let param = JSON.parse(localStorage.getItem('optionalChargeLeadershipList'))
optionalChargeLeadershipList.value = param
// localProjectPerson.value = param
localStorage.setItem('optionalChargeLeadershipList', JSON.stringify(param))
}
return flag
})