Commit faf143da authored by 高滢's avatar 高滢

feat(项目库详情): 新增合同刷新

parent 54414d25
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<template v-for="item in tabList" :key="item.key"> <template v-for="item in tabList" :key="item.key">
<TabPane :tab="item.tab"> <TabPane :tab="item.tab">
<div> <div>
<component :is="tabs[item.component]" /> <component :is="tabs[item.component]" :ref="`child${item.component}`" />
</div> </div>
</TabPane> </TabPane>
</template> </template>
...@@ -90,11 +90,11 @@ ...@@ -90,11 +90,11 @@
import projectDrawer from './projectDrawer.vue'; import projectDrawer from './projectDrawer.vue';
import uploadModal from './uploadModal.vue'; import uploadModal from './uploadModal.vue';
import uploadContractModal from './uploadContractModal.vue'; import uploadContractModal from './uploadContractModal.vue';
import { Tabs, Modal } from 'ant-design-vue'; import { Tabs } from 'ant-design-vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import { getItem, deleteItem } from '@/api/project/project'; import { getItem, deleteItem } from '@/api/project/project';
import { tabList } from './project.data'; import { tabList } from './project.data';
import { ref, onMounted, provide } from 'vue'; import { ref, provide, getCurrentInstance } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useDrawer } from '@/components/Drawer'; import { useDrawer } from '@/components/Drawer';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
...@@ -169,7 +169,11 @@ ...@@ -169,7 +169,11 @@
projectId: detailId.value, projectId: detailId.value,
}); });
} }
async function handleRegisterSuccess(params: any) {} const instance = getCurrentInstance();
async function handleRegisterSuccess() {
instance.refs.childcontract[0].reload();
}
async function handleSuccess(record: any) { async function handleSuccess(record: any) {
// detail.value = record; // detail.value = record;
await handleDetail(); await handleDetail();
......
...@@ -98,4 +98,5 @@ ...@@ -98,4 +98,5 @@
function handleSuccess() { function handleSuccess() {
reload(); reload();
} }
defineExpose({reload})
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment