refactor(credit): 更新搜索工具栏组件以支持动态模块配置

- 修改 CreditSearchToolbar 组件以接收 module 属性并传递给 RefreshCompanyIdButton
- 在所有信用相关页面中添加对应的 module 属性配置
- 优化组件代码格式化和导入语句
- 添加 reload 方法以在刷新 companyId 后保持搜索条件
- 修复图标组件标签闭合格式问题
This commit is contained in:
2026-02-06 13:20:52 +08:00
parent d97d279670
commit c16b857505
13 changed files with 68 additions and 49 deletions

View File

@@ -19,7 +19,7 @@
</template> </template>
<span>导出</span> <span>导出</span>
</a-button> </a-button>
<RefreshCompanyIdButton module="credit-case-filing" @done="reload"/> <RefreshCompanyIdButton :module="props.module" @done="reload" />
<a-button <a-button
danger danger
class="ele-btn-icon" class="ele-btn-icon"
@@ -49,10 +49,12 @@ import {
CloudDownloadOutlined, CloudDownloadOutlined,
DeleteOutlined DeleteOutlined
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
import RefreshCompanyIdButton from "@/views/credit/components/RefreshCompanyIdButton.vue"; import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
/** 后端模块路径片段,如: credit-breach-of-trust */
module: string;
selection?: any[]; selection?: any[];
}>(), }>(),
{ {
@@ -82,6 +84,11 @@ const handleSearch = () => {
emit('search', { keywords: keywords.value }); emit('search', { keywords: keywords.value });
}; };
// 刷新 companyId 后,保持当前条件并触发父级 reload
const reload = () => {
emit('search', { keywords: keywords.value });
};
// 导入 // 导入
const openImport = () => { const openImport = () => {
emit('importData'); emit('importData');

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-breach-of-trust"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-case-filing"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-court-announcement"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-court-session"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-delivery-notice"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-final-version"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -16,6 +16,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-gqdj"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-judgment-debtor"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -16,6 +16,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-judicial-document"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-mediation"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -13,6 +13,7 @@
<template #toolbar> <template #toolbar>
<search <search
@search="reload" @search="reload"
module="credit-project"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"

View File

@@ -15,6 +15,7 @@
<a-space class="flex"> <a-space class="flex">
<search <search
@search="reload" @search="reload"
module="credit-xgxf"
:selection="selection" :selection="selection"
@add="openEdit" @add="openEdit"
@remove="removeBatch" @remove="removeBatch"