提交 3ac30423 authored 作者: yanpeng's avatar yanpeng

export CCL

上级 d9782725
......@@ -47,7 +47,7 @@ export function getLatestEntityListInfo() {
* 风险信号
* url:/commonFeature/riskSignal/{moduleId}
*/
export function getRiskSignal(moduleId = "0104") {
export function getRiskSignal(moduleId = "0109") {
return http.get(`/api/commonFeature/riskSignal/${moduleId}`);
}
......@@ -55,7 +55,7 @@ export function getRiskSignal(moduleId = "0104") {
* 新闻资讯
* url:/commonFeature/news/{moduleId}
*/
export function getNewsInfo(moduleId = "0104") {
export function getNewsInfo(moduleId = "0109") {
return http.get(`/api/commonFeature/news/${moduleId}`);
}
......@@ -63,7 +63,7 @@ export function getNewsInfo(moduleId = "0104") {
* 社交媒体信息
* url:/commonFeature/remarks/{moduleId}
*/
export function getSocialMediaInfo(moduleId = "0104") {
export function getSocialMediaInfo(moduleId = "0109") {
return http.get(`/api/commonFeature/remarks/${moduleId}`);
}
......
......@@ -89,29 +89,49 @@
</div>
</div>
<div class="box1-bottom">
<div class="box1-bottom-title">· 涉及主要实体:</div>
<div class="box1-bottom-content">
<div
class="box1-bottom-content-item"
v-for="(ett, index) in item.sanEntities"
:key="index"
@click="handleEntityClick(ett)"
>
<el-image
v-if="ett.img"
class="box1-bottom-content-item-img"
:src="ett.img"
alt=""
></el-image>
<div v-else class="box1-bottom-content-item-imgUndefined">
{{
(ett.orgName || ett.orgNameZh)?.match(
/[\u4e00-\u9fa5a-zA-Z0-9]/
)?.[0]
}}
<div class="box1-bottom-sanTypeId" v-if="item.sanEntities?.length">
<div class="box1-bottom-title">· 涉及主要实体:</div>
<div class="box1-bottom-content">
<div
class="box1-bottom-content-item"
v-for="(ett, index) in item.sanEntities"
:key="index"
@click="handleEntityClick(ett)"
>
<el-image
v-if="ett.img"
class="box1-bottom-content-item-img"
:src="ett.img"
alt=""
></el-image>
<div v-else class="box1-bottom-content-item-imgUndefined">
{{
(ett.orgName || ett.orgNameZh)?.match(
/[\u4e00-\u9fa5a-zA-Z0-9]/
)?.[0]
}}
</div>
<div class="box1-bottom-content-item-txt">
{{ ett.orgName || ett.orgNameZh }}
</div>
</div>
<div class="box1-bottom-content-item-txt">
{{ ett.orgName || ett.orgNameZh }}
</div>
</div>
<div class="box1-bottom-sanTypeId" v-if="item.sanItems?.length > 0">
<div class="box1-bottom-title">· 涉及管制物项:</div>
<div class="box1-bottom-content__wx">
<div
class="box1-bottom-content__wx-item"
v-for="(ett, index) in item.sanItems"
:key="index"
@click="handleWxClick(item)"
>
<div class="box1-bottom-content__wx-item-id">
{{ ett.id }}
</div>
<div class="box1-bottom-content__wx-item-txt">
{{ ett.name }}
</div>
</div>
</div>
</div>
......@@ -121,7 +141,9 @@
<el-icon>
<Warning color="rgba(206, 79, 81, 1)" />
</el-icon>
<span>新增中国实体</span>
<span>{{
item.sanTypeId == allSanTypeIds[0] ? "新增中国实体" : "新增物项"
}}</span>
</div>
<div class="box1-absolute-num">{{ item.cnEntityCount }}</div>
</div>
......@@ -949,7 +971,7 @@ onMounted(async () => {
getIndustryCountByYear(13)
]);
// 交换第二个和第三个元素
[dataCount[1], dataCount[2]] = [dataCount[2], dataCount[1]];
// [dataCount[1], dataCount[2]] = [dataCount[2], dataCount[1]];
infoList.value = dataCount.slice(0, 2).map((item, idx) => {
return {
...item,
......@@ -965,9 +987,7 @@ onMounted(async () => {
}));
resourceTabs.value.unshift({ label: "全部制裁", value: "all", id: "", disabled: false });
console.log("返回的数据结构 infoList =》", resourceTabs.value);
const entityList = _.map(entitiesDataInfo?.sanEntities ?? [], ({ entityNameZh, entityName }) => {
return { name: entityNameZh, enName: entityName };
});
entitiesDataInfoList.value = entitiesDataInfo || [];
const list = _.chain(industryCountByYear).filter("year").orderBy("year", "desc").value().slice(0, 5);
const cclList1 = _.chain(cclList).filter("year").orderBy("year", "desc").value().slice(0, 5);
......@@ -1100,37 +1120,21 @@ const handleEntityClick = item => {
console.log("item", item);
window.sessionStorage.setItem("curTabName", item.name || item.entityNameZh);
gotoCompanyPages(item.id);
// const route = router.resolve({
// name: "companyPages",
// params: {
// // startTime: item.startTime,
// id: item.entityId
// }
// });
// window.open(route.href, "_blank");
};
const handleWxClick = item => {
const routeData = router.resolve({
path: "/exportControl/commercialControlList",
query: {
sanTypeId: item.sanTypeId,
key: item.id
}
});
// 打开一个新页面
window.open(routeData.href, "_blank");
};
const carouselRef = ref(null);
// const handleToDetail = () => {
// let activeIndex = 0;
// if (carouselRef.value) {
// activeIndex = carouselRef.value.activeIndex;
// }
// console.log("当前 Carousel 激活索引:", activeIndex);
// // 使用当前激活项的数据
// const currentItem = entitiesDataInfoList.value[activeIndex];
// if (currentItem) {
// const route = router.resolve({
// path: "/exportControlAnalysis",
// query: {
// startTime: currentItem.postDate
// }
// });
// window.open(route.href, "_blank");
// }
// };
const currentCarouselIndex = ref(0);
const handleCarouselChange = index => {
currentCarouselIndex.value = index;
......@@ -2050,6 +2054,34 @@ const handleMediaClick = item => {
margin-bottom: 15px;
}
&-content__wx {
display: flex;
flex-direction: column;
gap: 10px;
justify-content: flex-start;
padding-left: 10px;
height: 156px;
overflow: auto;
&-item {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
cursor: pointer;
&-id {
font-family: "Source Han Sans CN";
font-size: 16px;
font-weight: 700;
color: rgb(95, 101, 108);
}
&-txt {
font-size: 16px;
font-weight: 400;
color: rgba(95, 101, 108, 1);
line-height: 24px;
}
}
}
&-content {
display: flex;
gap: 15px;
......
......@@ -89,7 +89,7 @@
<script setup>
import { ref, computed, onMounted, watch } from "vue";
import { useRouter } from "vue-router";
import { useRouter, useRoute } from "vue-router";
import { Search, Select } from "@element-plus/icons-vue";
import defaultIcon from "../../../../../assets/icons/default-avatar.png";
import {
......@@ -104,6 +104,7 @@ import {
import dayjs from "dayjs";
const router = useRouter();
const route = useRoute();
const currentCCLType = ref("");
const CCLTypeList = ref([]);
......@@ -111,7 +112,7 @@ const getTypeList = async () => {
try {
const res = await getECCNCategory();
if (res && res.code === 200) {
console.log("-----getTypeList", res.data);
// console.log("-----getTypeList", res.data);
CCLTypeList.value = [{ id: "", name: "全部类别" }].concat(res.data);
currentCCLType.value = "";
}
......@@ -125,7 +126,7 @@ const getTechFields = async () => {
try {
const res = await getAreaType();
if (res && res.code === 200) {
console.log("-----getTechFields", res.data);
// console.log("-----getTechFields", res.data);
techFields.value = [{ id: "all", name: "全部领域", checked: true }].concat(res.data);
// 默认选中第一个
// techFields.value[0].checked = true;
......@@ -225,7 +226,6 @@ const getCclList = async () => {
try {
const res = await getCclQuery(params);
if (res && res.code === 200) {
console.log("----getCclList", res.data);
cclList.value = res.data;
// ✅ 新增:处理 changeFlag 向上继承逻辑
......@@ -251,7 +251,7 @@ const getCclList = async () => {
});
});
console.log("----getCclList 11", cclList.value);
// console.log("----getCclList 11", cclList.value);
loading.value = false;
}
} catch (error) {
......@@ -262,14 +262,14 @@ const getCclList = async () => {
// 商业管制清单-CCL清单列表-清单版本
const cclVersionList = ref([]);
const key = ref("");
// 当前选中的清单版本
const currentCCLVersion = ref("");
const currentCCLVersion = ref(Number(key.value) || "");
// 获取清单版本列表
const getCCLVersionListApi = async () => {
try {
const res = await getCCLVersionList();
if (res && res.code === 200) {
console.log("----getCCLVersionList", res.data);
cclVersionList.value = res.data.map(item => {
return {
key: item.key,
......@@ -277,7 +277,8 @@ const getCCLVersionListApi = async () => {
// value: `清单版本-${item.value}`
};
});
currentCCLVersion.value = res.data[0].key;
// currentCCLVersion.value = res.data[0].key;
currentCCLVersion.value = key.value ? Number(key.value) : res.data[0].key;
}
} catch (error) {
console.error("获取清单版本列表失败:", error);
......@@ -341,7 +342,6 @@ watch(currentCCLVersion, newValue => {
// }, 300);
// });
watch(searchKeyword, newValue => {
console.log("-----searchKey", newValue);
getCclList();
});
const loading = ref(false);
......@@ -349,6 +349,8 @@ const loading = ref(false);
const cclList = ref([]);
onMounted(async () => {
key.value = route.query.key;
console.log("url参数 =>", route.query);
// 获取类别字段
await getTypeList();
// 获取科技领域字典
......
......@@ -5,81 +5,86 @@
* @LastEditTime: 2026-01-07 09:58:04
-->
<template>
<div class="sanctions-overview">
<div class="side-nav">
<div v-for="(item, index) in activeTab" :key="index" class="tab-item" :class="{'active': index === activeIndex}" @click="activeIndex = index">
{{item}}
<span v-if="index === activeIndex" class="arrow"></span>
</div>
</div>
<div class="content-box">
<introductionPage v-if="activeIndex === 0"></introductionPage>
<listPage v-if="activeIndex === 1"></listPage>
</div>
</div>
<div class="sanctions-overview">
<div class="side-nav">
<div
v-for="(item, index) in activeTab"
:key="index"
class="tab-item"
:class="{ active: index === activeIndex }"
@click="activeIndex = index"
>
{{ item }}
<span v-if="index === activeIndex" class="arrow"></span>
</div>
</div>
<div class="content-box">
<introductionPage v-if="activeIndex === 0"></introductionPage>
<listPage v-if="activeIndex === 1"></listPage>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import introductionPage from "./components/introductionPage/index.vue"
import listPage from "./components/listPage/index.vue"
const activeTab = ref(["CCL清单简介", "CCL清单列表"])
const activeIndex = ref(0)
import { onMounted, ref } from "vue";
import introductionPage from "./components/introductionPage/index.vue";
import listPage from "./components/listPage/index.vue";
import { useRoute } from "vue-router";
const route = useRoute();
const activeTab = ref(["CCL清单简介", "CCL清单列表"]);
const activeIndex = ref(0);
onMounted(() => {
activeIndex.value = route.query.key ? 1 : 0;
});
</script>
<style scoped lang="scss">
*{
margin: 0;
padding: 0;
}
.sanctions-overview{
width: 1601px;
margin: 0 auto;
position: relative;
// min-height: 800px;
.side-nav {
position: absolute;
top: 27px;
right: 100%;
margin-right: 12px;
display: flex;
flex-direction: column;
gap: 16px;
.tab-item {
cursor: pointer;
padding: 4px 20px;
border-radius: 22px;
font-size: 16px;
font-weight: 400;
font-family: "Microsoft YaHei";
line-height: 24px;
color: rgb(95, 101, 108);
white-space: nowrap;
display: flex;
align-items: center;
&.active {
background-color: rgb(5, 95, 194);
color: #fff;
.arrow {
display: inline-block;
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 6px solid #fff;
margin-left: 8px;
}
}
}
}
.content-box {
width: 100%;
}
.sanctions-overview {
width: 1601px;
margin: 0 auto;
position: relative;
// min-height: 800px;
.side-nav {
position: absolute;
top: 27px;
right: 100%;
margin-right: 12px;
display: flex;
flex-direction: column;
gap: 16px;
.tab-item {
cursor: pointer;
padding: 4px 20px;
border-radius: 22px;
font-size: 16px;
font-weight: 400;
font-family: "Microsoft YaHei";
line-height: 24px;
color: rgb(95, 101, 108);
white-space: nowrap;
display: flex;
align-items: center;
&.active {
background-color: rgb(5, 95, 194);
color: #fff;
.arrow {
display: inline-block;
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 6px solid #fff;
margin-left: 8px;
}
}
}
}
.content-box {
width: 100%;
}
}
</style>
......@@ -57,9 +57,11 @@ import icon3Active from "../assets/icons/icon3_active.png";
const route = useRoute();
const sanTypeId = ref("");
const key = ref("");
onMounted(() => {
// 获取路由参数sanTypeId
sanTypeId.value = route.query.sanTypeId;
key.value = route.query.key;
console.log("CommercialControlList 页面接收到的 sanTypeId:", sanTypeId.value);
});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论