<template>
	<div class="page-container">

		<!-- 导航 -->
		<div class="breadcrumb">
			<el-breadcrumb :separator-icon="ArrowRight" class="breadcrumb">
				<el-breadcrumb-item>国家科技安全</el-breadcrumb-item>
				<el-breadcrumb-item>中美博弈概览</el-breadcrumb-item>
				<el-breadcrumb-item :to="{ path: '/' }">美对华科技合作限制信息平台</el-breadcrumb-item>
			</el-breadcrumb>
		</div>

		<!-- 搜索 -->
		<div class="search-section">
		<el-input 
		v-model="searchKey" 
		style="max-width: 800px" 
		placeholder="搜索政策关键词" 
		class="input-with-select"
		size="large">
			<template #append>
				<el-button 
				:icon="Search" 
				type="primary"
				style="background: #1677FF; color: #fff;"
				>搜索</el-button>
			</template>
		</el-input>
		</div>
		

		<div class="page-data">
			<div class="page-data-item" v-for="item in pageData" :key="item.desc">
				<div class="page-data-item-num">
					{{ item.num }}
				</div>
				<div class="page-data-item-desc">
					{{ item.desc }}
				</div>
			</div>
		</div>

		<!-- 内容 -->
		<div class="page-content">
			<el-row :gutter="20">
				<el-col :span="16">
					<custom-container title="最新限制动态" height="850px">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon" src="@/assets/images/icon-law.png" alt="" />
								<span class="custom-container-title">最新限制动态</span>
							</div>
						</template>
						<!-- 顶部右侧自定义内容 -->
						<template #header-right>
							<div style="display: flex; gap: 12px">
								<el-button type="primary" link>查看详情 ></el-button>
							</div>
						</template>

						<!-- 中间内容自定义 -->
						<template #default>
							<div class="content-card" v-for="item in limitData" :key="item.title">
								<div class="content-card-date">{{ `${item.date} · ${item.importance}` }}</div>
								<div class="content-card-title">
									<div class="content-card-title-text">{{ item.title }}</div>
									<!-- <div class="content-card-title-tag" v-for="tag in item.tag" :key="tag">{{ tag }}</div> -->

									<el-tag  v-for="(tag,index) in item.tag" :key="tag" :type="tagType[index]">{{ tag }}</el-tag>
								</div>
								<div class="content-card-desc">{{ item.desc }}</div>
							</div>
						</template>

						<!-- 底部自定义内容 -->
						<!-- <template #footer>
					<el-button>取消</el-button>
					<el-button type="primary">保存更改</el-button>
				</template> -->
					</custom-container>
				</el-col>
				<el-col :span="8">
					<custom-container title="风险信号" height="434px">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon" src="@/assets/images/icon-warning.png" alt="" />
								<span class="custom-container-title">风险信号</span>
								<span class="custom-container-count">5</span>
							</div>
						</template>
						<!-- 顶部右侧自定义内容 -->
						<template #header-right>
							<div style="display: flex; gap: 12px">
								<el-button type="primary" link>更多 ></el-button>
							</div>
						</template>

						<!-- 中间内容自定义 -->
						<template #default>
							<div class="content-list-card" v-for="item in riskData" :key="item.title">
								<el-tag :type="item.danger" size="small" round style="width: 45px;height: 40px;">{{ item.importance }}</el-tag>						
								<div class="content-list">
									<div class="content-list-title">{{ item.title }}</div>
									<div class="content-list-time">{{ item.date }}</div>
								</div>
							</div>
							<div class="content-list-footer">
								<el-button type="primary" size="default" style="width: 100%">
									<img class="icon-mark" src="@/assets/images/icon-mark.png" alt="" />
									风险处理
								</el-button>
							</div>
						</template>
					</custom-container>

					<custom-container title="学术交流限制" height="400px">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon" src="@/assets/images/icon-hot.png" alt="" />
								<span class="custom-container-title">学术交流限制</span>
							</div>
						</template>

						<!-- 中间内容自定义 -->
						<template #default>
							<div v-for="item in academicData" :key="item.title">
								<!-- <el-tag :type="item.danger" size="small">{{ item.importance }}</el-tag> -->
								<div class="content-list-row">
									<div class="content-card-title-text">{{ item.title }}</div>

									<div class="content-card-desc">{{ item.desc }}</div>
								</div>
							</div>
						</template>
					</custom-container>
				</el-col>
			</el-row>

			<el-row :gutter="20">
				<el-col :span="12">
					<custom-container title="政策禁令限制" height="410px">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon-gai" src="@/assets/images/icon-rectangle.png" alt="" />
								<span class="custom-container-title">政策禁令限制</span>
							</div>
						</template>
						<template #default>
							<div class="content-list-item content-card-title-text-2" v-for="item in policyBanData" :key="item.title">
								<!-- <el-tag :type="item.danger" size="small">{{ item.importance }}</el-tag> -->
								<div class="content-card-title-text">{{ item.title }}</div>
								<div class="content-card-desc">{{ item.desc }}</div>
								<div class="content-card-tag-box">
									<div class="content-card-tag-box-item">
										<el-tag :type="tagType[index*3]" v-for="(tag,index) in item.tag" :key="tag">{{ tag }}</el-tag>
									</div>
									<el-button class="content-card-tag-btn" type="primary" link>查看全文 ></el-button>
								</div>
							</div>
							<div class="content-card-footer">
								<el-button type="primary" link>
									查看详情 <img class="icon-mark" src="@/assets/images/icon-double-down.png" alt="" />
								</el-button>
							</div>
						</template>
					</custom-container>
				</el-col>
				<el-col :span="12">
					<custom-container title="近期时间线" height="410px">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon-gai" src="@/assets/images/icon-rectangle.png" alt="" />
								<span class="custom-container-title">近期时间线</span>
							</div>
						</template>
						<template #default>
							<div style="text-align: center; width: 100%; margin-bottom: 20px">
								<el-space>
									<el-button plain type="primary">全部</el-button>
									<el-button>半导体</el-button>
									<el-button>人工智能</el-button>
									<el-button>出口管制</el-button>
									<el-button>学术交流</el-button>
									<el-button>投资审查</el-button>
								</el-space>
							</div>
							<div class="time-line" v-for="item in recentTimeline" :key="item.title">
								<img class="time-line-dot" src="@/assets/images/dot.png" alt="" />
								<div class="time-line-title">
									<span class="time-line-title-text">{{ item.date }}</span>
									<div class="time-line-desc">
										<div class="time-line-desc-title">{{ item.title }}</div>
										<div class="content-card-tag-box-item">
											<el-tag :type="tagType[index+2]" v-for="(tag,index) in item.tag" :key="tag">{{ tag }}</el-tag>
										</div>
									</div>
								</div>
							</div>
							<div class="content-card-footer">
								<el-button type="primary" link>
									查看详情 <img class="icon-mark" src="@/assets/images/icon-double-down.png" alt="" />
								</el-button>
							</div>
						</template>
					</custom-container>
				</el-col>
			</el-row>

			<el-row :gutter="20">
				<el-col :span="12">
					<custom-container title="科研项目合作情况">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon-gai" src="@/assets/images/icon-rectangle.png" alt="" />
								<span class="custom-container-title">科研项目合作情况</span>
							</div>
						</template>
						<template #default>
							<div class="content-list-item content-card-title-text-2" v-for="item in researchData" :key="item.title">
								<!-- <el-tag :type="item.danger" size="small">{{ item.importance }}</el-tag> -->
								<div class="content-card-title-text">{{ item.title }}</div>
								<div class="content-card-desc">{{ item.desc }}</div>
							</div>
							<div class="content-card-footer">
								<el-button type="primary" link>
									查看更多 <img class="icon-mark" src="@/assets/images/icon-double-down.png" alt="" />
								</el-button>
							</div>
						</template>
					</custom-container>
				</el-col>
				<el-col :span="12">
					<custom-container title="人才流动限制情况">
						<template #header-left>
							<div class="custom-container-header-left">
								<img class="custom-container-icon-gai" src="@/assets/images/icon-rectangle.png" alt="" />
								<span class="custom-container-title">人才流动限制情况</span>
							</div>
						</template>
						<template #default>
							<div class="content-list-item content-card-title-text-2" v-for="item in talentData" :key="item.title">
								<div class="content-card-title-text">{{ item.title }}</div>
								<div class="content-card-desc">{{ item.desc }}</div>
							</div>
							<div class="content-card-footer">
								<el-button type="primary" link>
									查看更多 <img class="icon-mark" src="@/assets/images/icon-double-down.png" alt="" />
								</el-button>
							</div>
						</template>
					</custom-container>
				</el-col>
			</el-row>
		</div>
	</div>
</template>

<script setup>
import { ref } from "vue";
import { Search } from "@element-plus/icons-vue";
import { ArrowRight } from "@element-plus/icons-vue";
import CustomContainer from "@/components/Container/index.vue";
const searchKey = ref("");
const pageData = ref([
	{
		num: 42,
		desc: "生效政策禁令"
	},
	{
		num: 128,
		desc: "受限制实体"
	},
	{
		num: 16,
		desc: "受限制领域"
	},
	{
		num: 7,
		desc: "本月更新"
	}
]);

// tag类型
const tagType = ["primary", "success","warning","danger"];
// 限制动态数据
const limitData = ref([
	{
		date: "2025年9月2日",
		importance: "紧急",
		tag: ["半导体", "出口管制"],
		title: "美国撤销多家芯片企业在华VEU授权",
		desc: `美国最终用户审查委员会（ERC）宣布撤销英特尔、SK海力士和三星在中国工厂的"经验证最终用户"（VEU）授权，影响其在华芯片生产。新规定计划于10月2日《联邦公报》出版120天后正式生效:cite[3]:cite[4]。`
	},
	{
		date: "2025年9月2日",
		importance: "紧急",
		tag: [" 半导体", "晶圆制造"],
		title: "台积电南京厂VEU资格被撤销",
		desc: `台积电已收到美国政府通知，其南京工厂的"经验证最终用户"（VEU）资格将于2025年12月31日被撤销。此后，每一批运往南京工厂的受管制设备均需经过美国商务部逐案审批。`
	},
	{
		date: "2025年8月22日",
		importance: "重要",
		tag: [" 人工智能", "芯片"],
		title: "美国进一步限制AI芯片对华出口",
		desc: `美国商务部工业与安全局（BIS）推出多项强化半导体技术出口管制的措施，包括禁用华为昇腾系列AI芯片，限制AI芯片用于中国AI模型的训练或推理环节。`
	},
	{
		date: "2025年6月19日",
		importance: "一般",
		tag: [" 社交媒体", "数据安全"],
		title: "特朗普第三次推迟TikTok剥离期限",
		desc: `特朗普签署行政命令，将TikTok的剥离截止日期推迟90天至2025年9月17日。这是特朗普政府第三次推迟TikTok的剥离期限。`
	},
	{
		date: "2025年4月8日",
		importance: "重要",
		tag: ["隐私保护", "数据安全"],
		title: "14117最终规则生效",
		desc: `美国司法部《防止受关注国家或受规制主体获取美国敏感个人数据和与政府有关的数据》（14117规则）生效，部分合规义务将在2025年10月6日后逐步实施。`
	},
	{
		date: "2025年3月25日",
		importance: "重要",
		tag: ["人工智能", "出口管制"],
		title: "美国将54家中国实体列入实体清单",
		desc: `美国商务部工业与安全局（BIS）将54家中国实体（包括中国内地、中国香港和中国台湾地区）列入"实体清单"，重点针对AI和超级计算领域，禁止其获取美国技术、芯片和软件。`
	}
]);

// 风险
const riskType = ref(["特别重大", "重大风险", "一般风险"]);
const riskData = ref([
	{
		date: "一天前",
		importance: "特别重大",
		danger: "danger",
		title: "美国大而美法案落地，总统签署通过"
	},
	{
		date: "一天前",
		importance: "特别重大",
		danger: "danger",
		title: "美大而美法案7月1日以51:50的票数通过..."
	},
	{
		date: "一天前",
		importance: "重大风险",
		danger: "warning",
		title: "首次提出“限制外国敏感实体获取补贴”"
	},
	{
		date: "一天前",
		importance: "重大风险",
		danger: "warning",
		title: "将中国企业海外子公司、合资公司纳入受..."
	},
	{
		date: "一天前",
		importance: "一般风险",
		danger: "success",
		title: "H.R.8333《生物安全法案》将华大基因等..."
	}
]);

// 学术交流限制
const academicData = ref([
	{
		title: "签证限制",
		desc: "美国国务院已开始取消部分中国留学生的签证，针对STEM领域学生和研究人员加强审查。"
	},
	{
		title: "合作项目终止",
		desc: "密歇根大学终止了与上海交通大学的长期合作，佐治亚理工停止深圳学院运营。"
	},
	{
		title: "数据访问限制",
		desc: "美国国立卫生研究院（NIH）禁止中国、俄罗斯、伊朗等国的机构访问其受控数据。"
	}
]);

// 政策禁令限制
const policyBanData = ref([
	{
		title: "《美国优先投资政策》总统备忘录",
		desc: `2025年2月签署，限制美国资本投资中国"军民融合"战略相关产业，并审查甚至阻止中国对美关键领域的投资。备忘录扩大CFIUS的审查范围，要求将限制领域扩展到"医疗、农业、能源、原材料等战略行业"。`,
		tag: ["投资审查", "国家安全"]
	},
	{
		title: "《外国公司问责法》",
		desc: `2025年2月签署，限制美国资本投资中国"军民融合"战略相关产业，并审查甚至阻止中国对美关键领域的投资。备忘录扩大CFIUS的审查范围，要求将限制领域扩展到"医疗、农业、能源、原材料等战略行业"。`,
		tag: ["金融", "上市公司"]
	}
]);

// 近期时间线
const recentTimeline = ref([
	{
		date: "2025-09-02",
		tag: ["出口管制","半导体"],
		title: "撤销芯片企业VEU授权"
	},
	{
		date: "2025-08",
		tag: ["出口管制","人工智能"],
		title: "强化AI芯片出口限制"
	},
	{
		date: "2025-06",
		tag: ["出口管制"],
		title: "TikTok剥离期限再次延期"
	},
	{
		date: "2025-04",
		tag: ["出口管制"],
		title: "14117规则生效"
	}
]);

// 科研项目合作
const researchData = ref([
	{
		title: "合作范围缩小",
		desc: "中美科技合作协定虽得以续签，但范围有所收窄，更强调透明性、互惠性和研究人员保护。"
	},
	{
		title: "敏感领域合作遇冷",
		desc: `在人工智能、量子计算等敏感技术领域，合作项目面临严格的"国家安全审查"。`
	}
]);

// 人才流动限制
const talentData = ref([
	{
		title: "华人科学家离美趋势",
		desc: "2010年至2021年间，有近1.25万名华裔科学家离开美国回到中国。"
	},
	{
		title: "审查措施加强",
		desc: `美国政府以"国家安全"为由，调查并限制华人科学家参与美国科研项目。`
	}
]);
</script>

<style scoped>
.page-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
	background: url('@/assets/images/background.png') no-repeat;
	background-position: center -100px;
	background-size: 100% 100%;
	min-height: 100vh;
}


.breadcrumb{
	margin-bottom: 20px;
}

.el-breadcrumb__item:last-child ::v-deep .el-breadcrumb__inner{
	color: rgba(10, 87, 166, 1);
	font-weight: 800;
}

.search-section {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.page-data {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 20px;
	gap: 80px;
}
.page-data-item {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.page-data-item-num {
	font-size: 36px;
	font-weight: bold;
  	color: #1459BB;
  	line-height: 1;
  	margin-bottom: 8px;
}

.page-data-item-desc {
	font-size: 16px;
  	color: #666;
}
.page-content {
	margin-top: 20px;
	width: 100%;
	
	/* padding: 0px 20px; */
}
.custom-container-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-left: 18px;
	padding-bottom: 5px;
	/* border-bottom: 1px solid rgba(234, 236, 238, 1); */
}
.custom-container-title {
	font-size: 16px;
	font-weight: 700;
	color: #1459BB;
}
.custom-container-count {
	text-align: center;
	width: 24px;
	height: 16px;
	border-radius: 100px;
	font-size: 12px;
	background-color: rgba(255, 77, 79, 1);
	color: #fff;
}
.custom-container-icon {
	height: 18px;
	width: 18px;
}
.custom-container-icon-gai {
	height: 16px;
	width: 8px;
	padding-left:0px;
}
.content-card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 8px;
	padding: 12px 20px;
	background-color: rgba(247, 248, 249, 1);
	border-radius: 8px;
	margin-bottom: 14px;
}
.content-card-date {
	font-size: 14px;
	font-weight: 400;
	color: rgba(10, 87, 166, 1);
}
.content-card-title {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.content-card-title-text {
	font-size: 16px;
	font-weight: 700;
	color: rgba(10, 18, 30, 1);
	margin-right: auto;
}
.content-card-title-text-2 {
	display: flex;
	flex-direction: column;
	gap: 11px;
	padding: 10px;
	margin-bottom: 20px;
	border-radius: 4px;
	/* box-shadow: 0 2px 8px rgba(60, 87, 126, 0.2); */
	box-shadow: 0 0 15px 0 rgba(60, 87, 126, 0.2);
}
.content-card-tag-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.content-card-tag-box-item {
	display: flex;
	align-items: center;
	gap: 6px;
}
.content-card-tag-btn {
	margin-left: autp;
}
.content-card-title-tag {
	font-size: 12px;
	color: rgba(95, 101, 108, 1);
}
.content-card-desc {
	font-size: 12px;
	color: rgba(95, 101, 108, 1);
}

.content-list-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	height: 50px;
}
.content-list {
	height: 40px;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items:center;
	gap: 8px;
	border-bottom: 1px solid rgba(234, 236, 238, 1);
}
.content-list-row {
	height: 70px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(234, 236, 238, 1);
}
.content-list-title {
	width: 80%;
	font-size: 16px;
	font-weight: 400;
	color: rgba(59, 65, 75, 1);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.content-list-time {
	font-size: 14px;
	color: rgba(132, 136, 142, 1);
	text-align: right;

}
.content-list-footer {
	width: 100%;
	margin-top: 60px;
}
.icon-mark {
	height: 12px;
	width: 12px;
	margin-right: 5px;
	margin-left: 8px;
	
}
.content-card-footer {
	display: flex;
	width: 100%;
	justify-content: center;
	margin-top: 30px;
}

.time-line {
	display: flex;
	gap: 15px;
	align-items: flex-start;
	padding-left: 10px;
	margin-bottom: 10px;
}
.time-line-title {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}
.time-line-dot {
	width: 10px;
	height: 10px;
	margin-top: 5px;
}
.time-line-title-text {
	font-size: 14px;
	font-weight: 700;
	color: rgba(95, 101, 108, 1);
	color: var(--base-color);
}
.time-line-desc {
	width: 100%;
	display: flex;
	justify-content: space-between;
}
.time-line-desc-title {
	font-size: 16px;
	font-weight: 400;
	color: rgba(95, 101, 108, 1);
	margin-bottom: 5px;
}
.time-line-desc-text {
	font-size: 14px;
	font-weight: 400;
	color: rgba(95, 101, 108, 1);
}
.time-line-dot {
	width: 8px;
	height: 8px;
	background-color: rgba(10, 87, 166, 1);
	border-radius: 50%;
} 	
.el-tag{
    white-space: normal;
}
</style>
