fix : 修复所属公司及详情loading

This commit is contained in:
2024-05-20 11:45:53 +08:00
parent 1d772e1414
commit f83ae8df51
4 changed files with 268 additions and 248 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="detail-block">
<div class="detail-block" v-loading="loading">
<baseTitle title="需求上报"></baseTitle>
<el-form :model="formData" ref="summaryForm" :rules="rules">
<el-row gutter="50">
@@ -251,6 +251,7 @@ const processStore = useProcessStore()
const router = useRouter()
const route = useRoute()
const name=ref(router.currentRoute.value.name)
const loading = ref(false)
const processDiagramViewer = ref(false)
const tagsViewStore = useTagsView()
const companyOption = ref([])
@@ -440,6 +441,7 @@ const getDetailInfo = async () => {
})
if (res.code === 1000) {
formData.value = res.data.formData
loading.value=false
}
})
}
@@ -468,16 +470,17 @@ const init = async () => {
})
}
onMounted(async () => {
loading.value=true
await init()
if (route.query.projectId) {
await getDetailInfo()
}
})
const staging = async () => {
}
</script>
<style lang="scss" scoped>
.detail-block {
overflow: hidden;
padding-bottom: 30px;

View File

@@ -2,9 +2,9 @@
<steps :active="active" @setDetail="setDetail" @stepChange="stepChange">
<template #content>
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :companyOption="companyOption" />
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer"/>
:processViewer="summaryProcessViewer" :loading="loading"/>
</template>
</steps>
</template>
@@ -20,6 +20,7 @@ const route = useRoute()
const companyOption = ref([])
const summaryData = ref({})
const summaryProcessViewer = ref(true)
const loading = ref(false)
const processStore = useProcessStore()
const active = ref(route.query.state)
const showActive = ref()
@@ -31,9 +32,10 @@ const getInfo = async (state) => {
const projectId = route.query.projectId
await getCompanyOption()
summaryProcessViewer.value = false
loading.value = true
const {code, data} = await getMapProjectStateInfo(projectId, state)
summaryData.value = data;
console.log('data',data)
loading.value = false
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;