提交 298e3708 authored 作者: yanpeng's avatar yanpeng

export end

上级 a3d71f4f
......@@ -292,10 +292,10 @@ export function getSingleSanctionOverviewList(data) {
* @param {string} params.sanRecordId - 制裁记录ID
* @header token
*/
export function getSingleSanctionTotalCount(id) {
export function getSingleSanctionTotalCount(sanTypeId, recordId) {
return request({
method: "GET",
url: `/api/sanctionList/statistics/total?sanTypeId=${id}`,
url: `/api/sanctionList/statistics/total?sanTypeId=${sanTypeId}&sanRecordId=${recordId}`,
});
}
......
import request from "@/api/request.js";
\ No newline at end of file
......@@ -77,7 +77,7 @@
<el-col :span="16">
<custom-container titleType="primary" title="最新出口管制政策" :titleIcon="houseIcon" height="450px">
<template #header-right>
<el-button type="primary" @click="handleToEntityList()" link>
<el-button type="primary" @click="handleToEntityList" link>
{{ "查看详情 >" }}
</el-button>
</template>
......@@ -995,8 +995,6 @@ onMounted(async () => {
const maxCountItem1 = _.maxBy(cclList1, "count");
const maxCountForList1 = maxCountItem1 ? maxCountItem1.count : 0;
console.log("shuju list", list);
console.log("shuju total", total);
tableData1.value = _.map(list, item => {
return {
year: item.year,
......@@ -1147,10 +1145,13 @@ const handleCarouselChange = index => {
// 跳转到V2.0单次制裁
const handleToEntityList = item => {
console.log("这是什么数据1 =>", item);
let id = item?.id;
let sanTypeId = item?.sanTypeId || 1;
if (!id) {
const currentItem = entitiesDataInfoList.value[currentCarouselIndex.value];
id = currentItem?.id;
sanTypeId = currentItem?.sanTypeId || 1;
}
window.sessionStorage.setItem(
"curTabName",
......@@ -1159,7 +1160,8 @@ const handleToEntityList = item => {
const routeData = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: id
id,
sanTypeId
}
});
// 打开一个新页面
......@@ -2363,7 +2365,8 @@ const handleMediaClick = item => {
overflow-y: auto;
.home-top-bg {
background: url("./assets/images/background.png"),
background:
url("./assets/images/background.png"),
linear-gradient(180deg, rgba(229, 241, 254, 1) 0%, rgba(246, 251, 255, 0) 30%);
background-size: 100% 100%;
position: absolute;
......@@ -3631,7 +3634,7 @@ const handleMediaClick = item => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
padding: 22px 0;
.data-origin-icon {
width: 16px;
......
......@@ -105,7 +105,7 @@
</div>
</template>
<!-- <div class="echarts" ref="sanctionCountChartRef"></div> -->
<EChart :option="sanctionCountChartOption" autoresize :style="{ height: '300px' }" />
<EChart :option="sanctionCountChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }" />
<!-- <div class="bottom">
<div class="ai">
<div class="left">
......@@ -186,7 +186,7 @@
</el-select>
</template>
<!-- <div class="echarts" ref="domainChartRef"></div> -->
<EChart :option="domainChartOption" autoresize :style="{ height: '300px' }" />
<EChart :option="domainChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }" />
<!-- <div class="bottom">
<div class="ai">
<div class="left">
......@@ -218,7 +218,7 @@
</el-select>
</template>
<!-- <div class="echarts" ref="typeChartRef"></div> -->
<EChart :option="typeChartOption" autoresize :style="{ height: '300px' }" />
<EChart :option="typeChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }" />
<!-- <div class="bottom">
<div class="ai">
<div class="left">
......@@ -717,8 +717,21 @@ const domainChartOption = ref({
width: 1.1
}
},
labelLayout: {
hideOverlap: true
labelLayout: function (params) {
// hideOverlap: true
const points = params.labelLinePoints;
const isLeft = params.labelRect.x < params.rect.x + params.rect.width / 2;
// 调整指示线终点到 label 垂直中心
const labelCenterY = params.labelRect.y + params.labelRect.height / 2;
points[2][1] = labelCenterY;
// 调整指示线终点到 label 水平边缘
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
itemStyle: {
borderWidth: 0
......@@ -926,10 +939,23 @@ const typeChartOption = ref({
}
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < chart.getWidth() / 2;
// const isLeft = params.labelRect.x < chart.getWidth() / 2;
// const points = params.labelLinePoints;
// points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width;
// return {
// labelLinePoints: points
// };
const points = params.labelLinePoints;
// Update the end point.
const isLeft = params.labelRect.x < params.rect.x + params.rect.width / 2;
// 调整指示线终点到 label 垂直中心
const labelCenterY = params.labelRect.y + params.labelRect.height / 2;
points[2][1] = labelCenterY;
// 调整指示线终点到 label 水平边缘
points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
......@@ -1508,8 +1534,8 @@ onMounted(() => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 22px 0;
justify-content: flex-start;
padding: 22px;
.data-origin-icon {
width: 16px;
height: 16px;
......
......@@ -241,11 +241,11 @@ const handleClick = item => {
const route = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id
id: item.id,
sanTypeId: item.sanTypeId || 1
}
});
window.open(route.href, "_blank");
};
const selectedDomain = ref(0);
......
......@@ -54,7 +54,7 @@
</div>
</div>
</div> -->
<EChart :option="domainChartOption" autoresize :style="{ height: '300px' }" />
<EChart :option="domainChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }" />
<div class="data-origin-box">
<div class="data-origin-icon">
<img :src="tipsIcon" alt="" />
......@@ -104,7 +104,7 @@
</div>
</div>
</div> -->
<EChart :option="typeChartOption" autoresize :style="{ height: '300px' }" />
<EChart :option="typeChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }" />
<div class="data-origin-box">
<div class="data-origin-icon">
<img :src="tipsIcon" alt="" />
......@@ -348,7 +348,7 @@ const totalCount = ref({});
const getTotalCount = async () => {
if (!sanRecordId.value) return;
try {
const res = await getSingleSanctionTotalCount(route.query.sanTypeId);
const res = await getSingleSanctionTotalCount(route.query.sanTypeId, sanRecordId.value);
if (res.code === 200) {
totalCount.value = res.data || {};
}
......@@ -1264,8 +1264,8 @@ onMounted(() => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 22px 0;
justify-content: flex-start;
padding: 22px;
.data-origin-icon {
width: 16px;
height: 16px;
......
......@@ -1317,7 +1317,7 @@ onMounted(async () => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
padding: 30px 0;
.data-origin-icon {
width: 16px;
......
......@@ -1543,7 +1543,7 @@ onBeforeUnmount(() => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
padding: 35px 0;
.data-origin-icon {
width: 16px;
......
......@@ -52,7 +52,7 @@
:close-on-click-modal="false"
@close="resetModal"
>
<div class="sanction-list">
<div class="sanction-list" :loading="loading">
<div
v-for="item in sanctionList"
:key="item.id"
......@@ -61,6 +61,7 @@
@click="selectSanction(item)"
>
{{ item.name }}
<div class="sanction-type">{{ item.postDate }}</div>
</div>
</div>
......@@ -193,6 +194,7 @@ const handleAnalysisClick = () => {
};
// ========== 新增响应式状态 ==========
const loading = ref(false);
const sanctionModalVisible = ref(false);
const sanctionList = ref([]);
const selectedSanctionId = ref(null);
......@@ -204,6 +206,7 @@ const totalElements = ref(0);
const openSanctionModal = async () => {
sanctionModalVisible.value = true;
console.log("制裁事件列表11:", sanctionList.value);
loading.value = true;
await fetchSanctionData();
};
......@@ -211,6 +214,7 @@ const openSanctionModal = async () => {
const fetchSanctionData = async () => {
try {
const res = await getSanctionProcess([1], currentPage.value, 10);
loading.value = false;
if (res && !!res.content) {
sanctionList.value = res.content || [];
totalElements.value = res.totalElements || 0;
......@@ -225,6 +229,7 @@ const fetchSanctionData = async () => {
}
} catch (error) {
console.error("获取制裁事件失败:", error);
loading.value = false;
sanctionList.value = [];
totalElements.value = 0;
}
......@@ -237,7 +242,7 @@ const handlePageChange = async newPage => {
};
// ========== 选择某项 ==========
const selectSanction = item => {
const selectSanction = async item => {
selectedSanctionId.value = item.id;
router.replace({
path: window.location.pathname,
......@@ -247,7 +252,10 @@ const selectSanction = item => {
}
});
sanctionModalVisible.value = false;
window.location.reload();
console.log("跳转URL:", window.location.href);
// 根据最新URL参数刷新当前页面
window.open(`${window.location.pathname}?id=${item.id}&sanTypeId=${item.sanTypeId}`, "_self");
};
// ========== 关闭弹窗时重置 ==========
......@@ -467,6 +475,8 @@ onMounted(() => {
font-size: 14px;
color: #333;
transition: background-color 0.2s;
display: flex;
justify-content: space-between;
}
.sanction-item:hover {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论