提交 a7b9a8ac authored 作者: yanpeng's avatar yanpeng

exportcontrol

上级 b687b9fe
......@@ -17,6 +17,7 @@
"axios": "^1.12.2",
"d3": "^7.9.0",
"d3-cloud": "^1.2.7",
"dayjs": "^1.11.20",
"default-passive-events": "^4.0.0",
"echarts": "^5.4.3",
"echarts-liquidfill": "^3.1.0",
......@@ -2447,10 +2448,9 @@
}
},
"node_modules/dayjs": {
"version": "1.11.18",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.18.tgz",
"integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==",
"license": "MIT"
"version": "1.11.20",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.20.tgz",
"integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ=="
},
"node_modules/debug": {
"version": "4.4.3",
......
......@@ -26,6 +26,7 @@
"axios": "^1.12.2",
"d3": "^7.9.0",
"d3-cloud": "^1.2.7",
"dayjs": "^1.11.20",
"default-passive-events": "^4.0.0",
"echarts": "^5.4.3",
"echarts-liquidfill": "^3.1.0",
......
......@@ -1453,7 +1453,8 @@ watch(
// 获取实体清单数据
const fetchEntitiesList = async (page = 1, size = 10) => {
try {
const res = await getEntitiesList(activeResourceTabItem.value.id, page, size);
console.log("activeResourceTabItem.value.id", activeResourceTabItem.value.id);
const res = await getEntitiesList(activeResourceTabItem.value.id.join(","), page, size);
if (res) {
entitiesList.value = res.content.map(item => ({
...item,
......@@ -1499,8 +1500,13 @@ const handleGetMore = async () => {
// 获取历次制裁过程数据
const fetchSanctionProcess = async (page = 1, size = 10) => {
try {
const res = await getSanctionProcess(allSanTypeIds.value, page, size);
const res = await getSanctionProcess(
activeResourceTabItem.value.id ? activeResourceTabItem.value.id : allSanTypeIds.value,
page,
size
);
if (res) {
// 暂无商业管制清单数据
sanctionProcessList.value = res.content.map(item => ({
...item,
title: item.name,
......@@ -1543,6 +1549,11 @@ const handleResourceTabClick = tab => {
if (tab.disabled) return;
activeResourceTab.value = tab.value;
activeResourceTabItem.value = tab;
fetchSanctionProcess();
console.log("tabMap[tab.id]", tabMap[tab.id]);
if (tabMap[tab.id] === "entity") {
fetchEntitiesList();
}
};
const strengthLabels = {
......
......@@ -2,13 +2,16 @@
<div class="list-page">
<div class="search-box">
<div style="display: flex; justify-content: center">
<el-select v-model="currentCCLType" style="width: 388px; height: 32px; margin-right: 14px">
<el-option v-for="item in CCLTypeList" :key="item.id" :label="item.name" :value="item.id" />
<el-select v-model="currentCCLVersion" style="width: 388px; height: 32px; margin-right: 14px">
<el-option v-for="item in cclVersionList" :key="item.key" :label="item.value" :value="item.key" />
</el-select>
<el-input v-model="searchKeyword" class="search-input" placeholder="搜索物项或ECCN编码" :suffix-icon="Search" />
</div>
<div class="filters">
<el-checkbox v-model="viewNew" label="查看最近更新内容" />
<el-select v-model="currentCCLType" style="width: 388px; height: 32px; margin-right: 14px">
<el-option v-for="item in CCLTypeList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</div>
</div>
<div class="main">
......@@ -93,6 +96,7 @@ import {
getExportControlList,
get50PercentEntityCount
} from "@/api/exportControlV2.0.js";
import dayjs from "dayjs";
const router = useRouter();
......@@ -155,7 +159,7 @@ const getCclList = async () => {
keyword: searchKeyword.value || "",
controlIds: controls,
isLatest: viewNew.value,
recordId: ""
recordId: currentCCLVersion.value || ""
};
console.log(JSON.stringify(params));
try {
......@@ -245,13 +249,22 @@ const getCclList = async () => {
// 商业管制清单-CCL清单列表-清单版本
const cclVersionList = ref([]);
// 当前选中的清单版本
const currentCCLVersion = ref("");
// 获取清单版本列表
const getCCLVersionListApi = async () => {
try {
const res = await getCCLVersionList();
if (res && res.code === 200) {
console.log("----getCCLVersionList", res.data);
cclVersionList.value = res.data;
cclVersionList.value = res.data.map(item => {
return {
key: item.key,
value: `清单版本-${dayjs(item.value).format("YYYY年MM月DD日")}`
// value: `清单版本-${item.value}`
};
});
currentCCLVersion.value = res.data[0].key;
}
} catch (error) {
console.error("获取清单版本列表失败:", error);
......@@ -273,6 +286,11 @@ watch(currentCCLType, newValue => {
getCclList();
});
watch(currentCCLVersion, newValue => {
console.log(newValue);
getCclList();
});
// const searchDebounceTimer = ref(null);
// watch(searchKeyword, () => {
// if (searchDebounceTimer.value) {
......
<template>
<div class="relation-graph-wrapper">
<div class="graph-controls">
<div
v-for="item in controlBtns"
:key="item.type"
:class="['control-btn', { 'control-btn-active': currentLayoutType === item.type }]"
@click="handleClickControlBtn(item.type)"
>
<img :src="item.icon" alt="" />
<div class="graph-chart-controls">
<div
v-for="item in controlBtns"
:key="item.type"
:class="['control-btn', { 'control-btn-active': currentLayoutType === item.type }]"
@click="handleClickControlBtn(item.type)"
>
<img :src="item.icon" alt="" />
</div>
</div>
<div class="graph-chart-legend">
<div class="legend-item">
<div class="legend-dot"></div>
<span class="legend-text">已被制裁实体</span>
</div>
<div class="legend-item">
<div class="legend-dot"></div>
<span class="legend-text">未被制裁实体</span>
</div>
</div>
</div>
<div ref="containerRef" class="graph-container"></div>
......@@ -179,13 +191,13 @@ const initNormalGraph = (layoutType, width, height) => {
labelCfg: {
autoRotate: true,
style: {
fill: "#333",
fill: "rgba(137, 193, 255, 1)",
fontSize: 10,
fontFamily: "Microsoft YaHei",
background: {
fill: "#fff",
fill: "rgba(231, 243, 255, 1)",
padding: [2, 4, 2, 4],
radius: 2
radius: 5
}
}
}
......@@ -524,7 +536,7 @@ const processGraphData = rawData => {
if (!rawData || !rawData.nodes || rawData.nodes.length === 0) {
return { nodes: [], edges: [] };
}
console.log("数据处理 =>", rawData);
const nodeMap = new Map();
const nodes = [];
......@@ -541,7 +553,7 @@ const processGraphData = rawData => {
// 根据 isSanctioned 设置节点边框
const strokeColor = !node.isSanctioned ? "rgba(231, 243, 255, 1)" : "transparent";
const lineWidth = !node.isSanctioned ? 10 : 0;
const fontColor = node.isSanctioned ? "rgba(5, 95, 194, 1)" : "#333";
nodes.push({
id: nodeId,
label: node.name || "",
......@@ -562,7 +574,7 @@ const processGraphData = rawData => {
position: "bottom",
offset: 12,
style: {
fill: isCenter ? "#1459BB" : "#333",
fill: fontColor,
fontSize: isCenter ? 13 : 11,
fontWeight: isCenter ? "bold" : "normal",
fontFamily: "Microsoft YaHei",
......@@ -582,6 +594,9 @@ const processGraphData = rawData => {
const source = String(edge.source);
const target = String(edge.target);
const edgeKey = `${source}-${target}`;
const isSanctioned = rawData.nodes[index].isSanctioned;
const strokeColor = isSanctioned ? "rgba(5, 95, 194, 1)" : "#5B8FF9";
const lineColor = isSanctioned ? "rgba(5, 95, 194, 1)" : "rgba(59, 65, 75, .3)";
if (edgeMap.has(edgeKey)) {
return;
......@@ -598,14 +613,14 @@ const processGraphData = rawData => {
label: edge.name || "",
// 添加边的边框效果(使用 shadow 模拟)
style: {
stroke: "#5B8FF9",
lineWidth: 3,
stroke: lineColor,
lineWidth: 2,
opacity: 0.9,
shadowColor: "rgba(231, 243, 255, 1)",
shadowBlur: 4,
endArrow: {
path: "M 0,0 L 12,6 L 12,-6 Z",
fill: "#5B8FF9"
fill: lineColor
}
}
});
......
......@@ -130,7 +130,7 @@ import companyActive from "./assets/company-active.png";
import {
getSingleSanctionEntityList,
getSingleSanctionEntitySupplyChain,
getSingleSanctionEntityEquity,
getSingleSanctionEntityEquity
} from "@/api/exportControlV2.0";
import RelationGraph from "./components/RelationGraph.vue";
import AnalysisBox from "@/components/base/BoxBackground/AnalysisBox.vue";
......@@ -289,7 +289,8 @@ const getSingleSanctionEntityEquityRequest = async () => {
const getSingleSanctionEntitySupplyChainRequest = async () => {
try {
const res = await getSingleSanctionEntitySupplyChain({
orgId: activeEntityId.value
orgId: activeEntityId.value,
domainId: searchDomain.value || undefined
});
if (res.code === 200) {
singleSanctionEntitySupplyChainData.value = res.data || null;
......@@ -358,6 +359,10 @@ watch(is50PercentRule, async () => {
}
});
watch(searchDomain, async () => {
getSingleSanctionEntityListRequest();
});
onMounted(async () => {
getUrlParams();
await getSingleSanctionEntityListRequest();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论