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

exportcontrol

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