Files
mosr-web/src/views/special-fund/detail.vue
2024-05-31 20:56:58 +08:00

50 lines
1.4 KiB
Vue

<template>
<special-fund-detail :formData="fundData.formData" :data="fundData" :showTable="showTable" :processViewer="fundProcessViewer"
:loading="loading"/>
</template>
<script setup lang="jsx">
import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
import {getFundDetailProcess} from "@api/special-fund";
const processStore = useProcessStore()
const route = useRoute()
const fundData = ref({})
const fundProcessViewer = ref(true)
const showTable = ref(true)
const loading = ref(false)
const getDetail = async () => {
const specialFundId = route.query.id
showTable.value = false
loading.value = true
fundProcessViewer.value = false
const {code, data, msg} = await getFundDetailProcess(specialFundId)
ElNotification({
title: '提示',
message: msg,
type: code === 1000 ? 'success' : 'error'
})
if (code === 1000) {
fundData.value = data
loading.value = false
if(data.operationList==null)return;
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(() => {
fundProcessViewer.value = true
showTable.value = true
})
}else {
loading.value = false
}
}
getDetail()
</script>
<style scoped>
</style>