refactor(credit): 更新搜索工具栏组件以支持动态模块配置
- 修改 CreditSearchToolbar 组件以接收 module 属性并传递给 RefreshCompanyIdButton - 在所有信用相关页面中添加对应的 module 属性配置 - 优化组件代码格式化和导入语句 - 添加 reload 方法以在刷新 companyId 后保持搜索条件 - 修复图标组件标签闭合格式问题
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
<span>导出</span>
|
||||
</a-button>
|
||||
<RefreshCompanyIdButton module="credit-case-filing" @done="reload"/>
|
||||
<RefreshCompanyIdButton :module="props.module" @done="reload" />
|
||||
<a-button
|
||||
danger
|
||||
class="ele-btn-icon"
|
||||
@@ -49,10 +49,12 @@ import {
|
||||
CloudDownloadOutlined,
|
||||
DeleteOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import RefreshCompanyIdButton from "@/views/credit/components/RefreshCompanyIdButton.vue";
|
||||
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 后端模块路径片段,如: credit-breach-of-trust */
|
||||
module: string;
|
||||
selection?: any[];
|
||||
}>(),
|
||||
{
|
||||
@@ -82,6 +84,11 @@ const handleSearch = () => {
|
||||
emit('search', { keywords: keywords.value });
|
||||
};
|
||||
|
||||
// 刷新 companyId 后,保持当前条件并触发父级 reload
|
||||
const reload = () => {
|
||||
emit('search', { keywords: keywords.value });
|
||||
};
|
||||
|
||||
// 导入
|
||||
const openImport = () => {
|
||||
emit('importData');
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-breach-of-trust"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-case-filing"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-court-announcement"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-court-session"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-delivery-notice"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-final-version"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-gqdj"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-judgment-debtor"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-judicial-document"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-mediation"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<template #toolbar>
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-project"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<a-space class="flex">
|
||||
<search
|
||||
@search="reload"
|
||||
module="credit-xgxf"
|
||||
:selection="selection"
|
||||
@add="openEdit"
|
||||
@remove="removeBatch"
|
||||
|
||||
Reference in New Issue
Block a user