feat: 需求上报详情
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
<template>
|
||||
<summary-detail :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"/>
|
||||
<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"/>
|
||||
</template>
|
||||
</steps>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
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';
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const active = route.query.state
|
||||
const showActive = ref()
|
||||
const getDemandSummaryInfo = async () => {
|
||||
if (!route.query.id) return
|
||||
// await getCompanyOption()
|
||||
@@ -27,7 +37,54 @@ const getDemandSummaryInfo = async () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
getDemandSummaryInfo()
|
||||
// getDemandSummaryInfo()
|
||||
|
||||
const getInfo = async (state) => {
|
||||
const projectId = route.query.projectId
|
||||
const { code, data } = await getMapProjectStateInfo(projectId, state)
|
||||
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(() => {
|
||||
// stepList[1].props.formData = data.formData
|
||||
// stepList[1].props.data = data
|
||||
// stepList[1].props.processViewer = true
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getInfo(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
console.log(data)
|
||||
showActive.value = data.active
|
||||
}
|
||||
|
||||
const summaryDetailRef = ref()
|
||||
|
||||
// const stepList = reactive([
|
||||
// {
|
||||
// key: 'collect',
|
||||
// component: ()=>(<span>需求征集</span>)
|
||||
// },
|
||||
// {
|
||||
// key: 'report',
|
||||
// component: ()=>(<SummaryDetail ref={summaryDetailRef.value}></SummaryDetail>),
|
||||
// props: {
|
||||
// formData: summaryData.value.formData,
|
||||
// data: summaryData.value,
|
||||
// processViewer: summaryProcessViewer.value
|
||||
// }
|
||||
// }
|
||||
// ])
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -174,7 +174,9 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/detail',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id:row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user