style(credit): 格式化代码并优化表格渲染逻辑

- 统一API请求参数格式化,在多个信用模块中添加对象参数换行
- 移除多余空行和尾随逗号,保持代码整洁
- 优化信用公司组件中的表格列配置,修复被执行人字段显示逻辑
- 调整信用案件导入模板下载链接的布局格式
- 优化表格数据分页计算,改进总数判断逻辑
- 调整搜索组件中注释按钮的缩进格式
- 修复信用司法页面的导入按钮组件路径引用格式
This commit is contained in:
2026-02-14 17:37:48 +08:00
parent ff186910da
commit d3345d14d6
16 changed files with 167 additions and 100 deletions

View File

@@ -26,4 +26,3 @@ export async function refreshCreditCompanyId(
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -15,7 +15,9 @@ export async function pageCreditAdministrativeLicense(
) {
const res = await request.get<
ApiResult<PageResult<CreditAdministrativeLicense>>
>('/credit/credit-administrative-license/page', { params: withCreditUserScope(params) });
>('/credit/credit-administrative-license/page', {
params: withCreditUserScope(params)
});
if (res.data.code === 0) {
return res.data.data;
}

View File

@@ -15,7 +15,9 @@ export async function pageCreditHistoricalLegalPerson(
) {
const res = await request.get<
ApiResult<PageResult<CreditHistoricalLegalPerson>>
>('/credit/credit-historical-legal-person/page', { params: withCreditUserScope(params) });
>('/credit/credit-historical-legal-person/page', {
params: withCreditUserScope(params)
});
if (res.data.code === 0) {
return res.data.data;
}

View File

@@ -15,7 +15,9 @@ export async function pageCreditSuspectedRelationship(
) {
const res = await request.get<
ApiResult<PageResult<CreditSuspectedRelationship>>
>('/credit/credit-suspected-relationship/page', { params: withCreditUserScope(params) });
>('/credit/credit-suspected-relationship/page', {
params: withCreditUserScope(params)
});
if (res.data.code === 0) {
return res.data.data;
}

View File

@@ -57,4 +57,3 @@
});
};
</script>

View File

@@ -221,7 +221,7 @@
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
},
}
// {
// title: '操作',
// key: 'action',

View File

@@ -24,7 +24,6 @@
@exportData="exportData"
/>
</a-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'companyName'">
@@ -194,7 +193,7 @@
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
},
}
// {
// title: '操作',
// key: 'action',

View File

@@ -197,7 +197,7 @@
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
},
}
// {
// title: '操作',
// key: 'action',

View File

@@ -22,9 +22,7 @@
</a-spin>
<div class="ele-text-center">
<span>只能上传xlsxlsx文件</span>
<a :href="templateUrl" download="立案信息导入模板.xlsx">
下载导入模板
</a>
<a :href="templateUrl" download="立案信息导入模板.xlsx"> 下载导入模板 </a>
</div>
</ele-modal>
</template>

View File

@@ -654,7 +654,7 @@
// 每个tab的“字段顺序/隐藏字段/中文表头”在这里配置
const tabColumnConfigMap: Record<string, TabColumnConfig> = {
'招投标': {
招投标: {
order: [
'id',
'companyName',
@@ -684,7 +684,7 @@
createTime: '创建时间'
}
},
'对外投资': {
对外投资: {
order: [
'id',
'companyName',
@@ -720,9 +720,9 @@
relatedProductsInstitutions: '关联产品/机构',
realName: '操作人',
createTime: '创建时间'
}
},
},
'风险关系': {
风险关系: {
order: [
'id',
'companyName',
@@ -748,7 +748,7 @@
createTime: '创建时间'
}
},
'竞争对手': {
竞争对手: {
order: [
'id',
'companyName',
@@ -775,7 +775,7 @@
},
hidden: ['mainCompanyName']
},
'供应商': {
供应商: {
order: [
'id',
'companyName',
@@ -799,7 +799,7 @@
createTime: '创建时间'
}
},
'客户': {
客户: {
order: [
'id',
'companyName',
@@ -821,9 +821,9 @@
dataSource: '数据来源',
realName: '操作人',
createTime: '创建时间'
}
},
},
'司法案件': {
司法案件: {
order: [
'id',
'companyName',
@@ -865,13 +865,12 @@
'expirationTime'
]
},
'被执行人': {
被执行人: {
order: [
'id',
'plaintiffAppellant',
'appellee',
'otherPartiesThirdParty',
'name1',
'occurrenceTime',
'caseNumber',
'amount',
@@ -896,11 +895,15 @@
},
hidden: ['historyId', 'historyName']
},
'限制高消费': {
限制高消费: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -912,13 +915,21 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'终本案件': {
终本案件: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人', key: 'otherPartiesThirdParty' },
{
dataIndex: 'otherPartiesThirdParty',
title: '其他当事人/第三人',
key: 'otherPartiesThirdParty'
},
{ dataIndex: 'occurrenceTime', title: '发生时间' },
{ dataIndex: 'caseNumber', title: '案号' },
{ dataIndex: 'involvedAmount', title: '涉案金额' },
@@ -928,11 +939,15 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'开庭公告': {
开庭公告: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -945,11 +960,15 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'法院公告': {
法院公告: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -962,11 +981,15 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'失信被执行人': {
失信被执行人: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -978,7 +1001,7 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'裁判文书': {
裁判文书: {
order: [
'id',
'companyName',
@@ -1012,11 +1035,15 @@
},
hidden: []
},
'立案信息': {
立案信息: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -1029,11 +1056,15 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'诉前调解': {
诉前调解: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -1046,11 +1077,15 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'送达公告': {
送达公告: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'plaintiffAppellant', title: '原告/上诉人', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '原告/上诉人',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被告/被上诉人', key: 'appellee' },
{ dataIndex: 'otherPartiesThirdParty', title: '其他当事人/第三人' },
{ dataIndex: 'occurrenceTime', title: '发生时间' },
@@ -1063,24 +1098,31 @@
{ dataIndex: 'createTime', title: '创建时间' }
]
},
'股权冻结': {
股权冻结: {
columns: [
{ dataIndex: 'id', title: 'ID' },
{ dataIndex: 'companyName', title: '主体企业' },
{ dataIndex: 'caseNumber', title: '案号' },
{ dataIndex: 'plaintiffAppellant', title: '冻结股权标的企业', key: 'plaintiffAppellant' },
{
dataIndex: 'plaintiffAppellant',
title: '冻结股权标的企业',
key: 'plaintiffAppellant'
},
{ dataIndex: 'appellee', title: '被执行人', key: 'appellee' },
{ dataIndex: 'courtName', title: '执行法院' },
{ dataIndex: 'involvedAmount', title: '被执行人持有股权、其他投资权益数额' },
{
dataIndex: 'involvedAmount',
title: '被执行人持有股权、其他投资权益数额'
},
{ dataIndex: 'publicDate', title: '公示日期' },
{ dataIndex: 'freezeDateStart', title: '冻结开始日期' },
{ dataIndex: 'freezeDateEnd', title: '冻结结束日期' },
{ dataIndex: 'dataStatus', title: '数据状态' },
{ dataIndex: 'realName', title: '操作人' },
{ dataIndex: 'createTime', title: '创建时间' }
],
]
},
'附近企业': {
附近企业: {
order: [
'id',
'companyName',
@@ -1197,7 +1239,7 @@
},
hidden: ['parentId']
},
'分支机构': {
分支机构: {
order: [
'id',
'companyName',
@@ -1222,7 +1264,7 @@
},
hidden: []
},
'破产重整': {
破产重整: {
order: [
'id',
'companyName',
@@ -1247,7 +1289,7 @@
},
hidden: []
},
'行政许可': {
行政许可: {
order: [
'id',
'companyName',
@@ -1280,7 +1322,7 @@
},
hidden: []
},
'疑似关系': {
疑似关系: {
order: [
'id',
'companyName',
@@ -1311,7 +1353,7 @@
},
hidden: []
},
'专利': {
专利: {
order: [
'id',
'companyName',
@@ -1344,7 +1386,7 @@
},
hidden: []
},
'历史法定代表人': {
历史法定代表人: {
order: [
'id',
'companyName',
@@ -1747,6 +1789,10 @@
'registerNo'
]);
const pickValue = (value: any) => {
return value !== undefined && value !== null && value !== '';
};
// Prefer explicit columns to match the corresponding credit module headers exactly.
const explicitColumns = config?.columns;
if (explicitColumns?.length) {
@@ -1769,6 +1815,15 @@
return text;
};
}
// 被执行人:优先展示 name1没有再展示 appellee
if (tabKey === '被执行人' && dataIndex === 'appellee') {
column.customRender = ({ record }) => {
const v = pickValue(record?.name1)
? record.name1
: record?.appellee;
return formatValue(v);
};
}
return column;
});
}
@@ -1804,6 +1859,13 @@
return text;
};
}
// 被执行人:优先展示 name1没有再展示 appellee
if (tabKey === '被执行人' && dataIndex === 'appellee') {
column.customRender = ({ record }) => {
const v = pickValue(record?.name1) ? record.name1 : record?.appellee;
return formatValue(v);
};
}
return column;
});
};
@@ -1874,7 +1936,9 @@
let res = await fetchPage(requestedPage);
let list = res?.list || [];
const total =
typeof (res as any)?.count === 'number' ? (res as any).count : list.length;
typeof (res as any)?.count === 'number'
? (res as any).count
: list.length;
if (total > 0 && list.length === 0 && requestedPage > 1) {
setTabPagination(key, { current: 1 });
@@ -1883,7 +1947,9 @@
}
state.pagination.total =
typeof (res as any)?.count === 'number' ? (res as any).count : list.length;
typeof (res as any)?.count === 'number'
? (res as any).count
: list.length;
// Keep the count field in sync (only when backend returns a count), so Tab highlight can update after import/refresh.
const countField = tabCountFieldMap[key];
if (countField && typeof (res as any)?.count === 'number') {

View File

@@ -53,7 +53,7 @@
CreditJudiciary,
CreditJudiciaryParam
} from '@/api/credit/creditJudiciary/model';
import RefreshCompanyIdButton from "@/views/credit/components/RefreshCompanyIdButton.vue";
import RefreshCompanyIdButton from '@/views/credit/components/RefreshCompanyIdButton.vue';
const props = withDefaults(
defineProps<{

View File

@@ -217,7 +217,7 @@
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
},
}
// {
// title: '操作',
// key: 'action',

View File

@@ -246,7 +246,7 @@
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
},
}
// {
// title: '操作',
// key: 'action',