fix : 修复页面细节功能及附件上传组件

This commit is contained in:
2024-05-20 00:29:31 +08:00
parent 1f4389eb5e
commit 9661cdbb2b
10 changed files with 268 additions and 157 deletions

View File

@@ -1,47 +1,32 @@
<template>
<steps :active="active" @setDetail="setDetail" @stepChange="stepChange">
<template #content>
<span v-show="showActive == '00'">需求征集</span>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"/>
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :companyOption="companyOption" @getInfo="getDemandCollectionInfo"/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer"/>
</template>
</steps>
</template>
<script setup lang="jsx">
import SummaryDetail from '../../../components/DetailComponent/SummaryDetail.vue';
import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
import {useProcessStore} from '@/stores/processStore.js';
import {getDetail} from "./api";
import { markRaw, reactive, ref, shallowRef } from 'vue';
import { getMapProjectStateInfo } from '../../../components/steps/api';
import {markRaw, reactive, ref, shallowRef} from 'vue';
import {getMapProjectStateInfo} from '@/components/steps/api';
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
const route = useRoute()
const summaryData = ref({})
const summaryProcessViewer = ref(true)
const processStore = useProcessStore()
const active = route.query.state
const active = ref(route.query.state)
const showActive = ref()
const getDemandSummaryInfo = async () => {
if (!route.query.id) return
// await getCompanyOption()
summaryProcessViewer.value = false
getDetail(route.query.id).then(res => {
let data = res.data
summaryData.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(() => {
summaryProcessViewer.value = true
})
})
}
// getDemandSummaryInfo()
const getInfo = async (state) => {
const projectId = route.query.projectId
const { code, data } = await getMapProjectStateInfo(projectId, state)
const {code, data} = await getMapProjectStateInfo(projectId, state)
summaryProcessViewer.value = false
summaryData.value = data;
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
@@ -58,6 +43,7 @@ const getInfo = async (state) => {
}
const setDetail = (active) => {
console.log('active', active)
showActive.value = active
getInfo(active)
}
@@ -65,6 +51,7 @@ const setDetail = (active) => {
const stepChange = (data) => {
console.log(data)
showActive.value = data.active
getInfo(data.active)
}
const summaryDetailRef = ref()