From df6f49caeb38b8d8157eec049065b99d2f3ab373 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 4 Jun 2024 18:43:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=BB=86?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailComponent/ApprovalDetail.vue | 42 +++++++++++++++++-- .../implementation/phaseDetail.vue | 18 ++++---- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/src/components/DetailComponent/ApprovalDetail.vue b/src/components/DetailComponent/ApprovalDetail.vue index 0bc03e8..8867bfa 100644 --- a/src/components/DetailComponent/ApprovalDetail.vue +++ b/src/components/DetailComponent/ApprovalDetail.vue @@ -2,7 +2,7 @@
- @@ -122,7 +122,7 @@ const schema = computed(()=>{ ) }, ] - } else { + } else if(props.type == 'archivist'){ arr = [ { label: '项目归档附件', @@ -144,13 +144,49 @@ const schema = computed(()=>{ }
+ ) + }, + ] + } else if(props.type == 'phase'){ + arr = [ + { + label: '阶段变更附件', + prop: 'singleFile', + colProps: { + span: 24 + }, + component: ()=>( +
+ { + props.formData.singleFile?.originalFileName? + handleDownload(props.formData.singleFile)} + > + {props.formData.singleFile?.originalFileName} + : + {'--'} + } +
+ ) }, ] } return arr }) - +const getTagName = (type) => { + switch (type) { + case 'approval': + return '项目立项' + case 'execute': + return '项目实施' + case 'archivist': + return '项目归档' + case 'phase': + return '阶段变更' + } +} const handleDownload = (row) => { const loading = ElLoading.service({fullscreen: true}) downloadFile(row.fileId).then(res => { diff --git a/src/views/project-management/implementation/phaseDetail.vue b/src/views/project-management/implementation/phaseDetail.vue index 5a9813c..834dc15 100644 --- a/src/views/project-management/implementation/phaseDetail.vue +++ b/src/views/project-management/implementation/phaseDetail.vue @@ -1,5 +1,6 @@ @@ -8,6 +9,7 @@ import {ElNotification} from "element-plus"; import {useProcessStore} from '@/stores/processStore.js'; import {getPhaseDetail} from "@/api/project-manage"; + const route = useRoute() const summaryData = ref({}) const summaryProcessViewer = ref(true) @@ -15,12 +17,12 @@ const processStore = useProcessStore() const loading = ref(false) const fileListShow = ref('READ') const getInfo = async () => { - fileListShow.value='READ' + fileListShow.value = 'READ' const projectId = route.query.projectId summaryProcessViewer.value = false loading.value = true - const {code, data,msg} = await getPhaseDetail(projectId) - if(code===1000){ + const {code, data, msg} = await getPhaseDetail(projectId) + if (code === 1000) { summaryData.value = data; loading.value = false processStore.setDesign(data) @@ -35,14 +37,14 @@ const getInfo = async () => { fileListShow.value = data.formPermMap["fileList"].perm } }) - }else { + } else { ElNotification({ title: '提示', message: msg, - type: 'error' + type: 'error' }) - if(msg==='查询结果为空'){ - summaryData.value=[] + if (msg === '查询结果为空') { + summaryData.value = [] } loading.value = false }