Merge pull request 'dj' (#213) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/213
This commit is contained in:
@@ -241,7 +241,6 @@ getBaseInfo()
|
||||
watchEffect(() => {
|
||||
console.log(props.active, 'props.active');
|
||||
localActive.value = props.active
|
||||
getBaseInfo()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<steps :active="active" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" @getInfo="getDemandCollectionInfo"/>
|
||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" />
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer"/>
|
||||
</template>
|
||||
@@ -12,21 +12,26 @@
|
||||
<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';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const active = ref(route.query.state)
|
||||
const showActive = ref()
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getInfo = async (state) => {
|
||||
const projectId = route.query.projectId
|
||||
const {code, data} = await getMapProjectStateInfo(projectId, state)
|
||||
await getCompanyOption()
|
||||
summaryProcessViewer.value = false
|
||||
const {code, data} = await getMapProjectStateInfo(projectId, state)
|
||||
summaryData.value = data;
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -35,43 +40,19 @@ const getInfo = async (state) => {
|
||||
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) => {
|
||||
console.log('active', active)
|
||||
showActive.value = active
|
||||
getInfo(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
console.log(data)
|
||||
showActive.value = data.active
|
||||
getInfo(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>
|
||||
|
||||
Reference in New Issue
Block a user