From 91f21409f652172c7f26c2f171ebf3e8590b08ed Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 18 Jun 2024 23:46:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E5=89=8D=E7=BD=AE=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailComponent/ProjectApply.vue | 201 +++++++++++------- 1 file changed, 119 insertions(+), 82 deletions(-) diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue index b8ae84a..a58047c 100644 --- a/src/components/DetailComponent/ProjectApply.vue +++ b/src/components/DetailComponent/ProjectApply.vue @@ -4,10 +4,12 @@ - {{ localFormData.preProcess?.requestName }} +
+ {{ item.requestName }} +
- {{ localFormData.preProcess?.requestName ? '更改' : '请选择' }} + {{ localFormData.preProcess ? '更改' : '请选择' }}
@@ -32,29 +34,30 @@
- +
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
提交 重新提交 @@ -71,7 +74,9 @@ 重置 - + + @@ -81,15 +86,17 @@ +
+ 确定 + 取消 +
@@ -163,11 +170,13 @@ const tagsViewStore = useTagsView() const processStore = useProcessStore() const otherFileList = ref([]) const localFormData = ref({ - preProcess: { - requestId: null, - requestName: '', - baseUrl: '' - } + preProcess: [ + // { + // requestId: null, + // requestName: '', + // baseUrl: '' + // } + ] }) const attachment = ref() const deploymentData = ref({}) @@ -177,7 +186,24 @@ const loading = ref(false) const processDiagramViewer = ref(false) const name = ref(router.currentRoute.value.name) const deploymentId = ref() +const selectRows = ref([]) const projectId = ref(route.query.projectId) +const getPreProcessUrl = (list) => { + // list.map(item => { + // item.baseUrl = getPreProcessUrl(item.preProcess) + // }) + // let baseUrl= + // list.forEach(item => { + // baseUrl=item.baseUrl + // }) + // return baseUrl +} +const handleSelect = async (selection) => { + selectRows.value = selection +} +const handleCancel = () => { + showPreTable.value = false +} const searchPreProcess = () => { getPreProcessList() @@ -207,12 +233,19 @@ const getPreProcessList = () => { preProcessList.value = currentList.value.slice(0, 10) }) } -const chooseProProcess = (item) => { - localFormData.value.preProcess = { - requestId: item.requestId, - requestName: item.requestName, - baseUrl: item.baseUrl - } +const choosePreProcess = () => { + let preProcessObj = {} + let preProcessArray = [] + selectRows.value.forEach((item) => { + preProcessObj = { + requestId: item.requestId, + requestName: item.requestName, + baseUrl: item.baseUrl + } + preProcessArray.push(preProcessObj) + }) + localFormData.value.preProcess = preProcessArray + console.log('localFormData.value.preProcess', localFormData.value.preProcess) showPreTable.value = false } @@ -252,11 +285,11 @@ const compositeParam = (item) => { } } const getAttachment = (val) => { - console.log('上传文件getAttachment', val) + // console.log('上传文件getAttachment', val) localFormData.value.singleFile = compositeParam(val) } const getOtherFile = (val) => { - console.log('上传文件getOtherFile', val) + // console.log('上传文件getOtherFile', val) showTable.value = false let fileObj = compositeParam(val) otherFileList.value.push(fileObj) @@ -271,7 +304,7 @@ const getFileParam = (item) => { } } const handleSubmit = async () => { - if(deploymentData.value.deploymentName==='重大项目立项'||deploymentData.value.deploymentName==='重大项目验收'){ + if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') { if (localFormData.value.preProcess === undefined) { ElNotification({ title: '提示', @@ -320,46 +353,46 @@ const handleSubmit = async () => { } console.log('params', params) let res - if (props.step === '20') { - if (props.mode === 'resubmit') { - res = await resubmitApply(params) - } else { - res = await projectApply(params) - } - } else if (props.step === '40') { - if (props.mode === 'resubmit') { - res = await resubmitCheck(params) - } else { - res = await projectCheck(params) - } - } else if (props.step === '50') { - if (props.mode === 'resubmit') { - res = await resubmitConclusion(params) - } else { - res = await projectConclusion(params) - } - } - ElNotification({ - title: '提示', - message: res.msg, - type: res.code === 1000 ? 'success' : 'error' - }) - if (res.code === 1000) { - tagsViewStore.delVisitedViews(router.currentRoute.value.path) - if (props.step === '20') { - await router.push({ - name: 'Initiation' - }) - } else if (props.step === '40') { - await router.push({ - name: 'Implementation' - }) - } else if (props.step === '50') { - await router.push({ - name: 'Filing' - }) - } - } + // if (props.step === '20') { + // if (props.mode === 'resubmit') { + // res = await resubmitApply(params) + // } else { + // res = await projectApply(params) + // } + // } else if (props.step === '40') { + // if (props.mode === 'resubmit') { + // res = await resubmitCheck(params) + // } else { + // res = await projectCheck(params) + // } + // } else if (props.step === '50') { + // if (props.mode === 'resubmit') { + // res = await resubmitConclusion(params) + // } else { + // res = await projectConclusion(params) + // } + // } + // ElNotification({ + // title: '提示', + // message: res.msg, + // type: res.code === 1000 ? 'success' : 'error' + // }) + // if (res.code === 1000) { + // tagsViewStore.delVisitedViews(router.currentRoute.value.path) + // if (props.step === '20') { + // await router.push({ + // name: 'Initiation' + // }) + // } else if (props.step === '40') { + // await router.push({ + // name: 'Implementation' + // }) + // } else if (props.step === '50') { + // await router.push({ + // name: 'Filing' + // }) + // } + // } } const init = async () => { let id = projectId.value @@ -377,7 +410,7 @@ const init = async () => { let data = res.data deploymentId.value = data.deploymentId deploymentData.value = data - preProcessRequired.value = data.deploymentName === '重大项目立项'||data.deploymentName === '重大项目验收'; + preProcessRequired.value = data.deploymentName === '重大项目立项' || data.deploymentName === '重大项目验收'; processStore.setDesign(data) processStore.runningList.value = data.runningList; processStore.endList.value = data.endList; @@ -406,5 +439,9 @@ onMounted(async () => {