base
This commit is contained in:
410
src/ui/CQYGL3F8E/components/InvestHistory.vue
Normal file
410
src/ui/CQYGL3F8E/components/InvestHistory.vue
Normal file
@@ -0,0 +1,410 @@
|
||||
<template>
|
||||
<div class="card shadow-sm rounded-xl overflow-hidden">
|
||||
<LTitle title="对外投资历史" class="mb-4" />
|
||||
|
||||
<!-- 按投资企业分组显示 -->
|
||||
<div v-if="groupedInvestments.length > 0" class="space-y-6">
|
||||
<div v-for="(group, groupIndex) in groupedInvestments" :key="groupIndex" class="investment-group">
|
||||
<!-- 投资企业标题 -->
|
||||
<div class="bg-gradient-to-r from-blue-100 to-blue-200 text-blue-800 rounded-t-lg px-6 py-4 shadow-sm border border-blue-200">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<div class="w-8 h-8 bg-blue-300 bg-opacity-30 rounded-full flex items-center justify-center mr-3">
|
||||
🏢
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-lg font-semibold">{{ group.investorCompany }}</div>
|
||||
<div class="text-blue-600 text-sm">投资企业</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="text-2xl font-bold">{{ group.totalInvestments }}</div>
|
||||
<div class="text-blue-600 text-sm">投资项目</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 被投资企业列表 -->
|
||||
<div class="bg-white border-l-4 border-r-4 border-b-4 border-blue-100 rounded-b-lg">
|
||||
<div class="space-y-3 p-4">
|
||||
<div v-for="(investment, index) in group.investments" :key="index" class="company-wrapper">
|
||||
<div
|
||||
class="bg-white rounded-lg overflow-hidden shadow-sm border border-gray-200 hover:border-orange-300 hover:shadow-md transition-all duration-300 cursor-pointer relative"
|
||||
:class="{
|
||||
'border-orange-400 shadow-md': isCompanyExpanded(investment.name, 'investHistory', index),
|
||||
}"
|
||||
@click="toggleCompanyExpand(investment.name, 'investHistory', index)"
|
||||
>
|
||||
<!-- 投资关系指示器 -->
|
||||
<div class="absolute left-0 top-0 bottom-0 w-1 bg-gradient-to-b from-blue-300 to-orange-300"></div>
|
||||
|
||||
<!-- 被投资企业信息 -->
|
||||
<div class="pl-4 pr-4 py-3">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<div class="flex-1">
|
||||
<div class="font-semibold text-gray-800 text-lg">{{ investment.name }}</div>
|
||||
<div class="text-sm text-gray-600 flex items-center gap-2 mt-1">
|
||||
<span class="px-2 py-1 bg-orange-100 text-orange-700 rounded-full text-xs font-medium">
|
||||
{{ getPersonTypeText(investment.personType) }}法人
|
||||
</span>
|
||||
<span class="text-gray-500">成立: {{ formatDate(investment.estiblishTime) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="text-xl font-bold text-orange-600">{{ investment.percent || '—' }}</div>
|
||||
<div class="text-xs text-gray-500">持股比例</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 关键信息标签 -->
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-700">
|
||||
注册资本: {{ formatCapital(investment.regCapital) }}
|
||||
</span>
|
||||
<span v-if="investment.amount" class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-700">
|
||||
投资金额: {{ formatAmount(investment.amount) }}
|
||||
</span>
|
||||
<span
|
||||
v-if="investment.regStatus"
|
||||
class="px-2 py-1 text-xs rounded-full"
|
||||
:class="getStatusClass(investment.regStatus)"
|
||||
>
|
||||
{{ investment.regStatus }}
|
||||
</span>
|
||||
<span v-if="investment.withdrawalTime" class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-700">
|
||||
⚠️ 已退出 ({{ formatDate(investment.withdrawalTime) }})
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 展开指示器 -->
|
||||
<div
|
||||
class="absolute right-4 bottom-2 flex items-center text-xs text-gray-500 hover:text-orange-600 transition-colors duration-300"
|
||||
:class="{
|
||||
'text-orange-600': isCompanyExpanded(investment.name, 'investHistory', index),
|
||||
}"
|
||||
>
|
||||
<span class="mr-1">{{
|
||||
isCompanyExpanded(investment.name, 'investHistory', index) ? '收起详情' : '查看详情'
|
||||
}}</span>
|
||||
<div
|
||||
class="w-5 h-5 rounded-full bg-gray-100 flex items-center justify-center transition-transform duration-300"
|
||||
:class="{
|
||||
'bg-orange-100 text-orange-600 rotate-180': isCompanyExpanded(
|
||||
investment.name,
|
||||
'investHistory',
|
||||
index,
|
||||
),
|
||||
}"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-3 w-3"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 企业详情抽屉 -->
|
||||
<div
|
||||
class="overflow-hidden transition-all duration-500 ease-in-out"
|
||||
:class="{
|
||||
'max-h-0 opacity-0': !isCompanyExpanded(investment.name, 'investHistory', index),
|
||||
'max-h-[500px] opacity-100': isCompanyExpanded(investment.name, 'investHistory', index),
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="mt-1 bg-gray-50 rounded-lg overflow-hidden p-4 pb-0 border border-gray-200 transform transition-all duration-300 max-h-[500px] overflow-y-auto"
|
||||
>
|
||||
<div class="relative">
|
||||
<!-- 投资信息 -->
|
||||
<div class="mb-6 relative">
|
||||
<div class="flex items-center mb-3 relative z-10">
|
||||
<div class="w-7 h-7 rounded-full bg-orange-100 text-orange-600 flex items-center justify-center mr-3">
|
||||
💰
|
||||
</div>
|
||||
<div class="text-base font-medium text-orange-700">投资信息</div>
|
||||
</div>
|
||||
<div class="pl-10">
|
||||
<div class="bg-orange-50 p-4 rounded-lg border border-orange-100">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3">
|
||||
<div>
|
||||
<div class="text-xs text-gray-500 mb-1">持股比例</div>
|
||||
<div class="text-sm font-medium text-orange-700">{{ investment.percent || '—' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-gray-500 mb-1">投资金额</div>
|
||||
<div class="text-sm text-gray-800">
|
||||
{{ formatAmount(investment.amount) }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-gray-500 mb-1">企业评分</div>
|
||||
<div class="text-sm text-gray-800">
|
||||
{{ formatScore(investment.pencertileScore) }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-gray-500 mb-1">法人类型</div>
|
||||
<div class="text-sm text-gray-800">
|
||||
{{ getPersonTypeText(investment.personType) }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="investment.withdrawalTime">
|
||||
<div class="text-xs text-gray-500 mb-1">退出时间</div>
|
||||
<div class="text-sm text-red-600">
|
||||
{{ formatDate(investment.withdrawalTime) }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-gray-500 mb-1">省份</div>
|
||||
<div class="text-sm text-gray-800">
|
||||
{{ getProvinceName(investment.base) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 垂直连接线 -->
|
||||
<div class="absolute left-0 top-8 bottom-0 w-0.5 bg-gray-200 ml-3"></div>
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<div class="space-y-6">
|
||||
<div class="relative">
|
||||
<!-- 分组标题 -->
|
||||
<div class="flex items-center mb-3 relative z-10">
|
||||
<div class="w-7 h-7 rounded-full bg-orange-100 text-orange-600 flex items-center justify-center mr-3">
|
||||
🏢
|
||||
</div>
|
||||
<div class="text-base font-medium text-gray-700">基本信息</div>
|
||||
</div>
|
||||
|
||||
<!-- 分组内容 -->
|
||||
<div class="pl-10 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">企业状态</div>
|
||||
<div class="text-sm px-2 py-0.5 rounded-full inline-block"
|
||||
:class="getStatusClass(investment.regStatus)">
|
||||
{{ investment.regStatus || '—' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">统一社会信用代码</div>
|
||||
<div class="text-sm font-medium text-gray-800">
|
||||
{{ investment.creditCode || '—' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">企业类型</div>
|
||||
<div class="text-sm font-medium text-gray-800">
|
||||
{{ investment.orgType || '—' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">行业</div>
|
||||
<div class="text-sm font-medium text-gray-800">
|
||||
{{ investment.category || '—' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">注册资本</div>
|
||||
<div class="text-sm font-medium text-gray-800">
|
||||
{{ formatCapital(investment.regCapital) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">成立日期</div>
|
||||
<div class="text-sm font-medium text-gray-800 flex items-center">
|
||||
<span class="mr-1">📅</span>
|
||||
{{ formatDate(investment.estiblishTime) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg p-3 shadow-sm">
|
||||
<div class="text-xs text-gray-500 mb-1">法人代表</div>
|
||||
<div class="text-sm font-medium text-gray-800">
|
||||
{{ investment.legalPersonName || '—' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 经营范围 -->
|
||||
<div v-if="investment.business_scope" class="mt-6 relative">
|
||||
<div class="flex items-center mb-3 relative z-10">
|
||||
<div class="w-7 h-7 rounded-full bg-orange-100 text-orange-600 flex items-center justify-center mr-3">
|
||||
📝
|
||||
</div>
|
||||
<div class="text-base font-medium text-gray-700">经营范围</div>
|
||||
</div>
|
||||
<div class="pl-10">
|
||||
<div class="text-sm bg-white p-4 rounded-lg shadow-sm border border-gray-100 leading-relaxed">
|
||||
{{ investment.business_scope }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部收起按钮 -->
|
||||
<div class="flex justify-center sticky bottom-0 pt-2 pb-2 bg-gradient-to-t from-gray-50 to-transparent">
|
||||
<button
|
||||
@click.stop="toggleCompanyExpand(investment.name, 'investHistory', index)"
|
||||
class="flex items-center px-4 py-2 rounded-full bg-orange-50 text-orange-600 hover:bg-orange-100 transition-colors duration-300"
|
||||
>
|
||||
<span class="mr-1">收起详情</span>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-4 w-4 transform rotate-180"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="text-gray-500 py-10 text-center bg-gray-50 rounded-lg mx-4 mb-4">
|
||||
<div class="text-gray-300 text-3xl mb-2">💰</div>
|
||||
暂无对外投资历史
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 温馨提示 -->
|
||||
<LRemark content="对外投资历史展示申请人相关企业的对外投资情况,包括被投资企业名称、投资金额、投资比例和投资时间等。数据来源于工商登记信息和公开披露信息。对外投资可以反映企业的扩张能力、投资策略和资金实力。多元化投资组合通常表明企业具有较强的风险管控能力。建议关注投资集中度、被投资企业的行业分布和投资回报情况。" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import LTitle from '@/components/LTitle.vue'
|
||||
import LRemark from '@/components/LRemark.vue'
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({ items: [], total: 0 }),
|
||||
},
|
||||
})
|
||||
|
||||
const investHistory = computed(() => props.data?.items || [])
|
||||
|
||||
// 按投资企业分组
|
||||
const groupedInvestments = computed(() => {
|
||||
const groups = {}
|
||||
|
||||
investHistory.value.forEach(investment => {
|
||||
const investorCompany = investment.companyName || '未知企业'
|
||||
|
||||
if (!groups[investorCompany]) {
|
||||
groups[investorCompany] = {
|
||||
investorCompany,
|
||||
investments: [],
|
||||
totalInvestments: 0
|
||||
}
|
||||
}
|
||||
|
||||
groups[investorCompany].investments.push(investment)
|
||||
groups[investorCompany].totalInvestments++
|
||||
})
|
||||
|
||||
return Object.values(groups)
|
||||
})
|
||||
|
||||
// 用于跟踪展开的企业卡片
|
||||
const expandedCompanies = ref({})
|
||||
|
||||
// 切换展开/收起企业详情
|
||||
const toggleCompanyExpand = (companyId, listType, index) => {
|
||||
const uniqueKey = `${companyId}_${listType}_${index}`
|
||||
expandedCompanies.value[uniqueKey] = !expandedCompanies.value[uniqueKey]
|
||||
}
|
||||
|
||||
// 检查企业是否展开
|
||||
const isCompanyExpanded = (companyId, listType, index) => {
|
||||
const uniqueKey = `${companyId}_${listType}_${index}`
|
||||
return !!expandedCompanies.value[uniqueKey]
|
||||
}
|
||||
|
||||
// 获取企业状态对应的样式
|
||||
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'
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化日期显示
|
||||
const formatDate = (dateStr) => {
|
||||
if (!dateStr) return '—'
|
||||
// 如果是时间戳,转换为日期
|
||||
if (typeof dateStr === 'number') {
|
||||
return new Date(dateStr).toLocaleDateString('zh-CN')
|
||||
}
|
||||
return dateStr
|
||||
}
|
||||
|
||||
// 格式化资本金额显示
|
||||
const formatCapital = (capital) => {
|
||||
if (!capital) return '—'
|
||||
return capital
|
||||
}
|
||||
|
||||
// 获取法人类型文本
|
||||
const getPersonTypeText = (personType) => {
|
||||
if (personType === 1) return '自然人'
|
||||
if (personType === 2) return '企业法人'
|
||||
return '—'
|
||||
}
|
||||
|
||||
// 格式化金额显示
|
||||
const formatAmount = (amount) => {
|
||||
if (!amount) return '—'
|
||||
return amount
|
||||
}
|
||||
|
||||
// 格式化评分显示
|
||||
const formatScore = (score) => {
|
||||
if (!score) return '—'
|
||||
return `${score}/10000`
|
||||
}
|
||||
|
||||
// 获取省份名称
|
||||
const getProvinceName = (base) => {
|
||||
const provinceMap = {
|
||||
'bj': '北京',
|
||||
'sh': '上海',
|
||||
'gz': '广州',
|
||||
'sz': '深圳',
|
||||
'hz': '杭州',
|
||||
'cd': '成都',
|
||||
'wh': '武汉',
|
||||
'nj': '南京',
|
||||
'tj': '天津',
|
||||
'xa': '西安'
|
||||
}
|
||||
return provinceMap[base] || base || '—'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user