From ae247daf445bf7f6cc8f8d346397b2c5dbe29c9f Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Mon, 29 Dec 2025 19:45:55 +0800 Subject: [PATCH] add flxg7e8f --- .../src/ui/FLXG7E8F/components/CaseDetail.vue | 404 ++++++++++++++++ .../components/StatisticsOverview.vue | 285 +++++++++++ report-viewer/src/ui/FLXG7E8F/index.vue | 457 ++++++++++++++++++ .../src/ui/FLXG7E8F/utils/lawsuitUtils.js | 303 ++++++++++++ 4 files changed, 1449 insertions(+) create mode 100644 report-viewer/src/ui/FLXG7E8F/components/CaseDetail.vue create mode 100644 report-viewer/src/ui/FLXG7E8F/components/StatisticsOverview.vue create mode 100644 report-viewer/src/ui/FLXG7E8F/index.vue create mode 100644 report-viewer/src/ui/FLXG7E8F/utils/lawsuitUtils.js diff --git a/report-viewer/src/ui/FLXG7E8F/components/CaseDetail.vue b/report-viewer/src/ui/FLXG7E8F/components/CaseDetail.vue new file mode 100644 index 0000000..06d0299 --- /dev/null +++ b/report-viewer/src/ui/FLXG7E8F/components/CaseDetail.vue @@ -0,0 +1,404 @@ + + + + diff --git a/report-viewer/src/ui/FLXG7E8F/components/StatisticsOverview.vue b/report-viewer/src/ui/FLXG7E8F/components/StatisticsOverview.vue new file mode 100644 index 0000000..1fad049 --- /dev/null +++ b/report-viewer/src/ui/FLXG7E8F/components/StatisticsOverview.vue @@ -0,0 +1,285 @@ + + + + diff --git a/report-viewer/src/ui/FLXG7E8F/index.vue b/report-viewer/src/ui/FLXG7E8F/index.vue new file mode 100644 index 0000000..cef906a --- /dev/null +++ b/report-viewer/src/ui/FLXG7E8F/index.vue @@ -0,0 +1,457 @@ + + + + + + diff --git a/report-viewer/src/ui/FLXG7E8F/utils/lawsuitUtils.js b/report-viewer/src/ui/FLXG7E8F/utils/lawsuitUtils.js new file mode 100644 index 0000000..7f1ff3d --- /dev/null +++ b/report-viewer/src/ui/FLXG7E8F/utils/lawsuitUtils.js @@ -0,0 +1,303 @@ +// 案件类型映射表 +export const lawsuitTypeMap = { + breachCase: { + text: '失信被执行', + color: 'text-red-600 bg-red-50', + darkColor: 'bg-red-500', + riskLevel: 'high', // 高风险 + }, + consumptionRestriction: { + text: '限高被执行', + color: 'text-orange-600 bg-orange-50', + darkColor: 'bg-orange-500', + riskLevel: 'high', // 高风险 + }, + criminal: { + text: '刑事案件', + color: 'text-red-600 bg-red-50', + darkColor: 'bg-red-500', + riskLevel: 'high', // 高风险 + }, + civil: { + text: '民事案件', + color: 'text-blue-600 bg-blue-50', + darkColor: 'bg-blue-500', + riskLevel: 'medium', // 中风险 + }, + administrative: { + text: '行政案件', + color: 'text-purple-600 bg-purple-50', + darkColor: 'bg-purple-500', + riskLevel: 'medium', // 中风险 + }, + implement: { + text: '执行案件', + color: 'text-orange-600 bg-orange-50', + darkColor: 'bg-orange-500', + riskLevel: 'medium', // 中风险 + }, + bankrupt: { + text: '强制清算与破产案件', + color: 'text-rose-600 bg-rose-50', + darkColor: 'bg-rose-500', + riskLevel: 'high', // 高风险 + }, + preservation: { + text: '非诉保全审查', + color: 'text-amber-600 bg-amber-50', + darkColor: 'bg-amber-500', + riskLevel: 'low', // 低风险 + }, +} + +// 案件类型文本 +export const getCaseTypeText = type => { + return lawsuitTypeMap[type]?.text || '其他案件' +} + +// 案件类型颜色 +export const getCaseTypeColor = type => { + return lawsuitTypeMap[type]?.color || 'text-gray-600 bg-gray-50' +} + +// 案件类型深色 +export const getCaseTypeDarkColor = type => { + return lawsuitTypeMap[type]?.darkColor || 'bg-gray-500' +} + +// 格式化日期显示 +export const formatDate = dateStr => { + if (!dateStr) return '—' + // 转换YYYY-MM-DD为年月日格式 + if (dateStr.includes('-')) { + const parts = dateStr.split('-') + if (parts.length === 3) { + return `${parts[0]}年${parts[1]}月${parts[2]}日` + } + } + return dateStr // 如果不是标准格式则返回原始字符串 +} + +// 格式化金额显示(单位:万元) +export const formatLawsuitMoney = money => { + if (!money) return '—' + + const value = parseFloat(money) + if (isNaN(value)) return '—' + + // 超过1亿显示亿元 + if (value >= 10000) { + return ( + (value / 10000).toLocaleString('zh-CN', { + minimumFractionDigits: 0, + maximumFractionDigits: 2, + }) + ' 亿元' + ) + } + + // 否则显示万元 + return ( + value.toLocaleString('zh-CN', { + minimumFractionDigits: 0, + maximumFractionDigits: 2, + }) + ' 万元' + ) +} + +// 获取案件状态样式 +export const getCaseStatusClass = status => { + if (!status) return 'bg-gray-100 text-gray-500' + + if (status.includes('已结') || status.includes('已办结')) { + return 'bg-green-50 text-green-600' + } else if (status.includes('执行中') || status.includes('审理中')) { + return 'bg-blue-50 text-blue-600' + } else if (status.includes('未执行')) { + return 'bg-amber-50 text-amber-600' + } else { + return 'bg-gray-100 text-gray-500' + } +} + +// 获取企业状态对应的样式 +export const getStatusClass = status => { + if (!status) return 'bg-gray-100 text-gray-500' + + if (status.includes('注销') || status.includes('吊销')) { + return 'bg-red-50 text-red-600' + } else if (status.includes('存续') || status.includes('在营')) { + return 'bg-green-50 text-green-600' + } else if (status.includes('筹建') || status.includes('新设')) { + return 'bg-blue-50 text-blue-600' + } else { + return 'bg-yellow-50 text-yellow-600' + } +} + +// 格式化资本金额显示 +export const formatCapital = (capital, currency) => { + if (!capital) return '—' + + // 检查是否包含"万"字或需要显示为万元 + let unit = '' + let value = parseFloat(capital) + + // 处理原始数据中可能带有的单位 + if (typeof capital === 'string' && capital.includes('万')) { + unit = '万' + // 提取数字部分 + const numMatch = capital.match(/[\d.]+/) + value = numMatch ? parseFloat(numMatch[0]) : 0 + } else if (value >= 10000) { + // 大额数字转换为万元显示 + value = value / 10000 + unit = '万' + } + + // 格式化数字,保留两位小数(如果有小数部分) + const formattedValue = value.toLocaleString('zh-CN', { + minimumFractionDigits: 0, + maximumFractionDigits: 2, + }) + + return `${formattedValue}${unit} ${currency || '人民币'}` +} + +// 获取涉诉风险等级 +export const getRiskLevel = lawsuitInfo => { + if (!lawsuitInfo) { + return { + level: 'low', + text: '低风险', + color: 'text-green-600 bg-green-50', + } + } + + // 失信被执行人是最高风险 + if (lawsuitInfo.breachCaseList && lawsuitInfo.breachCaseList.length > 0) { + return { + level: 'high', + text: '高风险', + color: 'text-red-600 bg-red-50', + } + } + + // 限高被执行人是最高风险 + if (lawsuitInfo.consumptionRestrictionList && lawsuitInfo.consumptionRestrictionList.length > 0) { + return { + level: 'high', + text: '高风险', + color: 'text-red-600 bg-red-50', + } + } + + // 有涉诉数据的风险级别 + if (lawsuitInfo.lawsuitStat && Object.keys(lawsuitInfo.lawsuitStat).length > 0) { + // 检查是否有未结案的案件 + const data = lawsuitInfo.lawsuitStat + if (data.count && data.count.count_wei_total && data.count.count_wei_total > 0) { + return { + level: 'medium', + text: '中风险', + color: 'text-amber-600 bg-amber-50', + } + } + + // 只有已结案的为低中风险 + return { + level: 'low-medium', + text: '低中风险', + color: 'text-yellow-600 bg-yellow-50', + } + } + + return { + level: 'low', + text: '低风险', + color: 'text-green-600 bg-green-50', + } +} + +// 获取涉诉案件统计 +export const getLawsuitStats = lawsuitInfo => { + if (!lawsuitInfo) return null + + const stats = { + total: 0, + types: [], + } + + // 统计各类型案件数量 + Object.keys(lawsuitTypeMap).forEach(type => { + let count = 0 + + if (type === 'breachCase') { + count = lawsuitInfo.breachCaseList && lawsuitInfo.breachCaseList.length > 0 ? lawsuitInfo.breachCaseList.length : 0 + } else if (type === 'consumptionRestriction') { + count = lawsuitInfo.consumptionRestrictionList && lawsuitInfo.consumptionRestrictionList.length > 0 ? lawsuitInfo.consumptionRestrictionList.length : 0 + } else if (lawsuitInfo.lawsuitStat && lawsuitInfo.lawsuitStat[type] && Object.keys(lawsuitInfo.lawsuitStat[type]).length > 0) { + const typeData = lawsuitInfo.lawsuitStat[type] + count = typeData.cases && typeData.cases.length ? typeData.cases.length : 0 + } + + if (count > 0) { + stats.total += count + stats.types.push({ + type, + count, + name: getCaseTypeText(type), + color: getCaseTypeColor(type), + darkColor: getCaseTypeDarkColor(type), + }) + } + }) + + return stats +} + +// 获取案件类型优先级顺序 +export const getCaseTypePriority = () => { + return [ + 'breachCase', // 失信被执行人(最高风险) + 'consumptionRestriction', // 限高被执行人 + 'criminal', // 刑事案件 + 'civil', // 民事案件 + 'administrative', // 行政案件 + 'implement', // 执行案件 + 'bankrupt', // 强制清算与破产案件 + 'preservation', // 非诉保全审查 + ] +} + +// 根据案件类型获取风险等级 +export const getCaseTypeRiskLevel = caseType => { + const typeInfo = lawsuitTypeMap[caseType] + if (!typeInfo) { + return { + level: 'low', + text: '低风险', + color: 'text-green-600 bg-green-50', + } + } + + const riskLevelMap = { + high: { + text: '高风险', + color: 'text-red-600 bg-red-50', + }, + medium: { + text: '中风险', + color: 'text-amber-600 bg-amber-50', + }, + low: { + text: '低风险', + color: 'text-green-600 bg-green-50', + }, + } + + return { + level: typeInfo.riskLevel, + ...riskLevelMap[typeInfo.riskLevel], + } +} +