diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue index ad5b6d8..504f414 100644 --- a/src/components/DetailComponent/ProjectApply.vue +++ b/src/components/DetailComponent/ProjectApply.vue @@ -35,7 +35,6 @@ - {{ projectChargePersonUserList.length !== 0 ? '更改' : '请选择' }}
@@ -49,7 +48,6 @@ - {{ projectPersonUserList.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
@@ -59,6 +57,19 @@ v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/> + + + + {{ optionalChargeLeadershipList.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择' }} + +
+ {{ item.name }} +
+ +
+
@@ -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 }) diff --git a/src/views/project-demand/summary/add.vue b/src/views/project-demand/summary/add.vue index bfd8a80..4ba6d35 100644 --- a/src/views/project-demand/summary/add.vue +++ b/src/views/project-demand/summary/add.vue @@ -128,7 +128,7 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -242,6 +245,19 @@ clearable> + + + + {{ optionalChargeLeadershipList.length !== 0 ? '更改' : '请选择' }} + +
+ {{ item.name }} +
+ +
+
{ + optionalChargeLeadershipPickerRef.value.showUserPicker() +} + +const optionalChargeLeaderPickerOk = (userList) => { + optionalChargeLeadershipList.value = userList +} const handleBack = () => { history.back() @@ -435,6 +461,7 @@ const handleSubmit = debounce(async (instance) => { otherFileList.value.forEach(item => { otherFiles.push(getFileParam(item)) }) + formData.value.optionalChargeLeadership=optionalChargeLeadershipList.value if (formData.value.singleFile !== undefined) { formData.value.singleFile = getFileParam(formData.value.singleFile) } @@ -447,7 +474,6 @@ const handleSubmit = debounce(async (instance) => { }) return; } else { - // formData.value.resultForm=JSON.stringify(formData.value.resultForm) attachment.value.clearValidate() } let params = { @@ -489,6 +515,7 @@ const handleResubmit = debounce((instance) => { otherFiles.push(getFileParam(item)) }) } + formData.value.optionalChargeLeadership=optionalChargeLeadershipList.value if (formData.value.isSpecialFund && formData.value.specialFund === null) { formData.value.specialFund = getFundName(formData.value.specialFundId) } @@ -501,7 +528,6 @@ const handleResubmit = debounce((instance) => { }) return; } else { - // formData.value.resultForm=JSON.stringify(formData.value.resultForm) attachment.value.clearValidate() } let params = { @@ -537,7 +563,6 @@ const getDetailInfo = async () => { }) if (res.code === 1000) { res.data.formData.specialFundId = res.data.formData.specialFundId === 0 ? null : res.data.formData.specialFundId - // res.data.formData.resultForm = JSON.parse(res.data.formData.resultForm) formData.value = res.data.formData loading.value = false } diff --git a/src/views/project-management/implementation/detail.vue b/src/views/project-management/implementation/detail.vue index ce570b1..2af33c0 100644 --- a/src/views/project-management/implementation/detail.vue +++ b/src/views/project-management/implementation/detail.vue @@ -86,6 +86,7 @@ localStorage.removeItem('otherFileList') localStorage.removeItem('preProcess') localStorage.removeItem('projectChargePersonUserList') localStorage.removeItem('projectPersonUserList') +localStorage.removeItem('optionalChargeLeadershipList') const getAllInfo = async (state) => { const loading = ElLoading.service({fullscreen: true}) detailData.value = {