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

export end

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