diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index 4a36418..0dc29f1 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -5,7 +5,7 @@ @@ -35,7 +35,7 @@ diff --git a/src/components/DetailComponent/ApprovalDetail.vue b/src/components/DetailComponent/ApprovalDetail.vue index 8d1bb39..27f6324 100644 --- a/src/components/DetailComponent/ApprovalDetail.vue +++ b/src/components/DetailComponent/ApprovalDetail.vue @@ -20,7 +20,7 @@
-
@@ -40,8 +40,8 @@ const props = defineProps({ default: {} }, data: { - type: Array, - default: [] + type: Object, + default: {} }, processViewer: { type: Boolean, diff --git a/src/components/DetailComponent/CollectionDetail.vue b/src/components/DetailComponent/CollectionDetail.vue index c455f3d..721f7bd 100644 --- a/src/components/DetailComponent/CollectionDetail.vue +++ b/src/components/DetailComponent/CollectionDetail.vue @@ -59,7 +59,7 @@
-
diff --git a/src/components/DetailComponent/ProjectApply.vue b/src/components/DetailComponent/ProjectApply.vue index 378b6be..045b9d7 100644 --- a/src/components/DetailComponent/ProjectApply.vue +++ b/src/components/DetailComponent/ProjectApply.vue @@ -1,32 +1,32 @@ @@ -40,101 +57,83 @@ import {ElLoading, ElNotification} from "element-plus"; import Opinion from "@/components/DetailComponent/Opinion.vue"; const route = useRoute() -const showApply = ref(false) -const showCheck = ref(false) -const showFiling = ref(false) +const editShow = ref(false) +const applyTitle = ref('apply') const loading = ref(false) const processStore = useProcessStore() const fileListShow = ref('READ') +const mode = ref('') const currentStep = ref() const auditOpinion = ref('') +// const step = ref(route.query.step) route.query.step == '10' && (currentStep.value = 1) route.query.step == '20' && (currentStep.value = 2) route.query.step == '40' && (currentStep.value = 3) route.query.step == '50' && (currentStep.value = 4) const showActive = ref() -const commonForm = ref({}) +const detailData = ref({}) const commonProvessViewer = ref(true) const getAllInfo = async (state) => { const loading = ElLoading.service({fullscreen: true}) try { + fileListShow.value = 'READ' commonProvessViewer.value = false const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state) - if (code !== 1000) { + if (code === 1000) { + detailData.value = data + mode.value = data.formData.mode + processStore.setDesign(data) + processStore.runningList.value = data.runningList; + processStore.endList.value = data.endList; + processStore.noTakeList.value = data.noTakeList; + processStore.refuseList.value = data.refuseList; + processStore.passList.value = data.passList; + nextTick(() => { + commonProvessViewer.value = true + if (data.formPermMap && data.formPermMap["fileList"]) { + fileListShow.value = data.formPermMap["fileList"].perm + } + }) + changeModel(state, mode.value) + loading.close() + } else { ElNotification({ title: '提示', message: msg, type: 'error' }) if (msg === '查询结果为空') { - commonForm.value = [] + detailData.value = [] + detailData.value.formData = {} } loading.close() } - if (data === undefined) return; - commonForm.value = data - processStore.setDesign(data) - processStore.runningList.value = data.runningList; - processStore.endList.value = data.endList; - processStore.noTakeList.value = data.noTakeList; - processStore.refuseList.value = data.refuseList; - processStore.passList.value = data.passList; - nextTick(() => { - commonProvessViewer.value = true - if (data.formPermMap && data.formPermMap["fileList"]) { - fileListShow.value = data.formPermMap["fileList"].perm - } - }) - loading.close() } catch { loading.close() } } -const changeModel = (active) => { - if (route.query.step === '20' && active === '20') { - if (route.query.state === '0') { - showApply.value = true - } else if (route.query.state === '3') { - showApply.value = true - getAllInfo(active) - } else { - showApply.value = false - getAllInfo(active) +const changeModel = (active, mode) => { + editShow.value = false + nextTick(() => { + editShow.value = mode === 'submit' || mode === 'resubmit'; + if (route.query.step === '20' && active === '20') { + applyTitle.value = 'apply' + } else if (route.query.step === '40' && active === '40') { + applyTitle.value = 'check' + } else if (route.query.step === '50' && active === '50') { + applyTitle.value = 'filing' } - } else if (route.query.step === '40' && active === '40') { - if (route.query.state === '0') { - showCheck.value = true - } else if (route.query.state === '3') { - showCheck.value = true - getAllInfo(active) - } else { - showCheck.value = false - getAllInfo(active) - } - } else if (route.query.step === '50' && active === '50') { - if (route.query.state === '0') { - showFiling.value = true - } else if (route.query.state === '3') { - showFiling.value = true - getAllInfo(active) - } else { - showFiling.value = false - getAllInfo(active) - } - } else { - getAllInfo(active) - } + }) } - const setDetail = (active) => { showActive.value = active - changeModel(active) + getAllInfo(active) } const stepChange = (data) => { showActive.value = data.active - changeModel(data.active) + getAllInfo(data.active) } diff --git a/src/views/project-management/implementation/index.vue b/src/views/project-management/implementation/index.vue index 7541b91..4065da3 100644 --- a/src/views/project-management/implementation/index.vue +++ b/src/views/project-management/implementation/index.vue @@ -251,22 +251,22 @@ const tableConfig = reactive({ let btn = [] let buttons = new Set(Array.from(row.buttons)) if (buttons.has("details")) { - btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) + btn.push({label: '详情', prem: ['mosr:implementation:info'], func: () => handleDetail(row), type: 'primary'}) } if (buttons.has("check")) { - btn.push({label: '验收', prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'}) + btn.push({label: '验收', prem: ['mosr:implementation:check'], func: () => handleCheck(row), type: 'primary'}) } if (buttons.has("edit")) { - btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'}) + btn.push({label: '编辑', prem: ['mosr:implementation:resubmit'], func: () => handleEdit(row), type: 'primary'}) } if (buttons.has("standing")) { - btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'}) + btn.push({label: '台账', prem: ['project:management:implementation:account'], func: () => handleStandingBook(row), type: 'primary'}) } if (buttons.has("attachments")) { - btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'}) + btn.push({label: '附件', prem: ['project:management:implementation:attachment'], func: () => handleAttachment(row), type: 'primary'}) } if (buttons.has("viewAllocation")) { - btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'}) + btn.push({label: '查看分摊', prem: ['project:management:implementation:share'], func: () => handleShare(row), type: 'primary'}) } if (buttons.has("phaseChange")) { btn.push({label: '阶段变更', prem: ['mosr:phase:change'], func: () => handlePhaseChange(row), type: 'primary'}) diff --git a/src/views/project-management/initiation/index.vue b/src/views/project-management/initiation/index.vue index 9c1dd36..d80ec63 100644 --- a/src/views/project-management/initiation/index.vue +++ b/src/views/project-management/initiation/index.vue @@ -226,21 +226,22 @@ const tableConfig = reactive({ prop: 'oper', label: '操作', align: 'center', + fixed:'right', showOverflowTooltip: false, currentRender: ({row, index}) => { let btn = [] let buttons = new Set(Array.from(row.buttons)) if (buttons.has("details")) { - btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) + btn.push({label: '详情', prem: ['mosr:approval:info'], func: () => handleDetail(row), type: 'primary'}) } if (buttons.has("edit")) { - btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'}) + btn.push({label: '编辑', prem: ['mosr:approval:resubmit'], func: () => handleEdit(row), type: 'primary'}) } // if (buttons.has("delete")) { // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // } if (buttons.has("apply")) { - btn.push({label: '立项',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'}) + btn.push({label: '立项',prem: ['mosr:approval:apply'], func: () => handleApply(row), type: 'primary'}) } return (