提交 3def5f9f authored 作者: 张烨's avatar 张烨

代码合并

...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>
<script src="./js/config.js"></script> <script src="/js/config.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -4,6 +4,7 @@ import { ElMessage } from "element-plus"; ...@@ -4,6 +4,7 @@ import { ElMessage } from "element-plus";
const request200 = requestP => { const request200 = requestP => {
return requestP.then(data => { return requestP.then(data => {
if (data.code === 200) { if (data.code === 200) {
console.log('返回的数据结构 =>', data.data)
return data.data; return data.data;
} }
ElMessage({ ElMessage({
...@@ -122,13 +123,14 @@ export function getSanctionsInfoCount() { ...@@ -122,13 +123,14 @@ export function getSanctionsInfoCount() {
* sanReason: string * sanReason: string
* }[]>} * }[]>}
*/ */
export function getSanctionProcess(typeName = "实体清单", pageNum = 1, pageSize = 10, isCn = false) { export function getSanctionProcess(sanTypeIds = "1", pageNum = 1, pageSize = 10, isCn = false) {
return request200( return request200(
request({ request({
method: "POST", method: "POST",
url: "/api/entitiesDataCount/getSanctionProcess", url: "/api/entitiesDataCount/getSanctionProcess",
data: { data: {
typeName, sanTypeIds,
// typeName: tabMap[sanTypeId],
pageNum, pageNum,
pageSize, pageSize,
isCn isCn
......
import request from "@/api/request.js"; import request from "@/api/request.js";
// 实体清单-制裁概况-获取实体清单基本信息 // 实体清单-制裁概况-获取实体清单基本信息
export function getEntityInfo(sanType) { export function getEntityInfo(id) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/baseInfo/${sanType}` url: `/api/sanctionList/baseInfoById/${id}`
}); });
} }
...@@ -98,10 +98,10 @@ export function get50PercentEntityCount(data) { ...@@ -98,10 +98,10 @@ export function get50PercentEntityCount(data) {
} }
// 实体清单-数据统计-总量统计 // 实体清单-数据统计-总量统计
export function getTotalCount() { export function getTotalCount(id) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/total` url: `/api/sanctionList/statistics/total?sanTypeId=${id}`
}); });
} }
...@@ -113,7 +113,7 @@ export function getTotalCount() { ...@@ -113,7 +113,7 @@ export function getTotalCount() {
export function getSanctionCountChange(params) { export function getSanctionCountChange(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/num`, url: `/api/sanctionList/statistics/num`,
params params
}); });
} }
...@@ -128,7 +128,7 @@ export function getSanctionCountChange(params) { ...@@ -128,7 +128,7 @@ export function getSanctionCountChange(params) {
export function getRegionCount(params) { export function getRegionCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/region`, url: `/api/sanctionList/statistics/region`,
params params
}); });
} }
...@@ -143,7 +143,7 @@ export function getRegionCount(params) { ...@@ -143,7 +143,7 @@ export function getRegionCount(params) {
export function getTechDomainCount(params) { export function getTechDomainCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/domain`, url: `/api/sanctionList/statistics/domain`,
params params
}); });
} }
...@@ -158,7 +158,7 @@ export function getTechDomainCount(params) { ...@@ -158,7 +158,7 @@ export function getTechDomainCount(params) {
export function getEntityTypeCount(params) { export function getEntityTypeCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/entityType`, url: `/api/sanctionList/statistics/entityType`,
params params
}); });
} }
...@@ -247,7 +247,7 @@ export function getSingleSanctionOverview(params) { ...@@ -247,7 +247,7 @@ export function getSingleSanctionOverview(params) {
export function getSingleSanctionEntityCountry(params) { export function getSingleSanctionEntityCountry(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/countryRegion`, url: `/api/sanctionList/statistics/countryRegion`,
params params
}); });
} }
...@@ -292,11 +292,10 @@ export function getSingleSanctionOverviewList(data) { ...@@ -292,11 +292,10 @@ export function getSingleSanctionOverviewList(data) {
* @param {string} params.sanRecordId - 制裁记录ID * @param {string} params.sanRecordId - 制裁记录ID
* @header token * @header token
*/ */
export function getSingleSanctionTotalCount(params) { export function getSingleSanctionTotalCount(id) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/total`, url: `/api/sanctionList/statistics/total?sanTypeId=${id}`,
params
}); });
} }
...@@ -311,7 +310,7 @@ export function getSingleSanctionTotalCount(params) { ...@@ -311,7 +310,7 @@ export function getSingleSanctionTotalCount(params) {
export function getSingleSanctionDomainCount(params) { export function getSingleSanctionDomainCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/domain`, url: `/api/sanctionList/statistics/domain`,
params params
}); });
} }
...@@ -327,7 +326,7 @@ export function getSingleSanctionDomainCount(params) { ...@@ -327,7 +326,7 @@ export function getSingleSanctionDomainCount(params) {
export function getSingleSanctionEntityTypeCount(params) { export function getSingleSanctionEntityTypeCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/entityType`, url: `/api/sanctionList/statistics/entityType`,
params params
}); });
} }
...@@ -341,7 +340,7 @@ export function getSingleSanctionEntityTypeCount(params) { ...@@ -341,7 +340,7 @@ export function getSingleSanctionEntityTypeCount(params) {
export function getSingleSanctionEntityCountryCount(params) { export function getSingleSanctionEntityCountryCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/countryRegion`, url: `/api/sanctionList/statistics/countryRegion`,
params params
}); });
} }
...@@ -357,7 +356,7 @@ export function getSingleSanctionEntityCountryCount(params) { ...@@ -357,7 +356,7 @@ export function getSingleSanctionEntityCountryCount(params) {
export function getSingleSanctionEntityRegionCount(params) { export function getSingleSanctionEntityRegionCount(params) {
return request({ return request({
method: "GET", method: "GET",
url: `/api/sanctionList/statistics/el/region`, url: `/api/sanctionList/statistics/region`,
params params
}); });
} }
......
...@@ -50,7 +50,7 @@ export const countryCoordMap = { ...@@ -50,7 +50,7 @@ export const countryCoordMap = {
// 欧洲 // 欧洲
俄罗斯: [37.6184, 55.7558], // 俄罗斯莫斯科 俄罗斯: [37.6184, 55.7558], // 俄罗斯莫斯科
德国: [10.4515, 51.1657], // 德国柏林 德国: [10.4515, 51.1657], // 德国柏林
英国: [-3.436, 55.3781], // 英国伦敦 英国: [-2, 54], // 英国伦敦
法国: [2.2137, 46.2276], // 法国巴黎 法国: [2.2137, 46.2276], // 法国巴黎
意大利: [12.5674, 41.8719], // 意大利罗马 意大利: [12.5674, 41.8719], // 意大利罗马
西班牙: [-3.7492, 40.4637], // 西班牙马德里 西班牙: [-3.7492, 40.4637], // 西班牙马德里
...@@ -218,12 +218,12 @@ export function convertAsiaCenterCoord(coord) { ...@@ -218,12 +218,12 @@ export function convertAsiaCenterCoord(coord) {
const [lng, lat] = coord; const [lng, lat] = coord;
// 将以本初子午线为基准的坐标转换为以亚洲为中心的坐标 // 将以本初子午线为基准的坐标转换为以亚洲为中心的坐标
// world-asia-center.json 是将标准坐标的经度减去了 180 度 // world-asia-center.json 是将标准坐标的经度加上了 180 度(地图向右平移)
let newLng = lng - 180; let newLng = lng + 180;
// 规范化到 [-180, 180] 范围 // 规范化到 [-180, 180] 范围
if (newLng < -180) { if (newLng > 180) {
newLng += 360; newLng -= 360;
} }
return [newLng, lat]; return [newLng, lat];
......
...@@ -135,8 +135,8 @@ const headerTitleClasses = computed(() => [ ...@@ -135,8 +135,8 @@ const headerTitleClasses = computed(() => [
.header-icon { .header-icon {
width: 22px; width: 22px;
height: 18px; height: 18px;
margin-left: 5px; margin-left: 0px;
margin-right: 14px; margin-right: 10px;
} }
.blue-title-block { .blue-title-block {
...@@ -155,6 +155,7 @@ const headerTitleClasses = computed(() => [ ...@@ -155,6 +155,7 @@ const headerTitleClasses = computed(() => [
/* color: var(--base-color); */ /* color: var(--base-color); */
color: $base-color; color: $base-color;
line-height: 48px; line-height: 48px;
padding: 0 5px;
// padding: 0 12px; // padding: 0 12px;
} }
......
...@@ -626,6 +626,7 @@ function createChart() { ...@@ -626,6 +626,7 @@ function createChart() {
map: "world", map: "world",
roam: true, roam: true,
zoom: 1.2, zoom: 1.2,
nameMap: nameMap,
label: { label: {
show: false show: false
}, },
......
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
<div class="content-header"> <div class="content-header">
<ChartHeader :list="staticsDemensionList" @clickItem="handleClickDemensionItem"> <ChartHeader :list="staticsDemensionList" @clickItem="handleClickDemensionItem">
<template #chart-header-right> <template #chart-header-right>
<el-select v-model="selectedTime" placeholder="选择时间" style="width: 150px" v-show="curDemension === '时间'"> <el-select v-model="selectedTime" placeholder="选择时间" style="width: 150px"
v-show="curDemension === '提案时间'">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
...@@ -49,7 +50,10 @@ ...@@ -49,7 +50,10 @@
</ChartHeader> </ChartHeader>
</div> </div>
<div class="content-main"> <div class="content-main">
<ChartContainer chartTitle="美国会法案提出数量随时间变化趋势" @clickChartItem="handleSwitchActiveChart"> <ChartContainer
chartTitle="美国会法案提出数量随时间变化趋势"
:chartTypeList="curChartTypeList"
@clickChartItem="handleSwitchActiveChart">
<template #chart-box> <template #chart-box>
<LineChart v-if="activeChart === '折线图'" :lineChartData="lineChartData" /> <LineChart v-if="activeChart === '折线图'" :lineChartData="lineChartData" />
<PieChart v-if="activeChart === '饼状图'" :pieChartData="pieChartData" /> <PieChart v-if="activeChart === '饼状图'" :pieChartData="pieChartData" />
...@@ -124,7 +128,7 @@ ...@@ -124,7 +128,7 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref, computed } from 'vue'
import ChartContainer from '../../components/ChartContainer/index.vue' import ChartContainer from '../../components/ChartContainer/index.vue'
import ChartHeader from '../../components/ChartHeader/index.vue' import ChartHeader from '../../components/ChartHeader/index.vue'
import ActiveTag from '../../components/ActiveTag/index.vue' import ActiveTag from '../../components/ActiveTag/index.vue'
...@@ -148,33 +152,44 @@ const totalNum = ref(12) ...@@ -148,33 +152,44 @@ const totalNum = ref(12)
// 统计维度列表 // 统计维度列表
const staticsDemensionList = ref([ const staticsDemensionList = ref([
{ {
name: '时间', name: '提案时间',
active: true active: true,
chartTypeList: ['折线图', '柱状图']
}, },
{ {
name: '领域', name: '科技领域',
active: false active: false,
chartTypeList: ['饼状图']
}, },
{ {
name: '党派', name: '提出议院',
active: false active: false,
chartTypeList: ['饼状图']
}, },
{ {
name: '议院', name: '提出委员会',
active: false active: false,
chartTypeList: ['饼状图']
}, },
{ {
name: '委员会', name: '提出议员党派',
active: false active: false,
chartTypeList: ['饼状图']
}, },
{ {
name: '所处阶段', name: '立法阶段',
active: false active: false,
chartTypeList: ['饼状图']
}, },
]) ])
const curChartTypeList = computed(() => {
let arr = staticsDemensionList.value.filter(item =>item.active)
return arr[0].chartTypeList
})
// 当前维度 // 当前维度
const curDemension = ref('时间') const curDemension = ref('提案时间')
const handleClickDemensionItem = (val) => { const handleClickDemensionItem = (val) => {
staticsDemensionList.value.forEach(item => { staticsDemensionList.value.forEach(item => {
...@@ -182,6 +197,7 @@ const handleClickDemensionItem = (val) => { ...@@ -182,6 +197,7 @@ const handleClickDemensionItem = (val) => {
}) })
val.active = true val.active = true
curDemension.value = val.name curDemension.value = val.name
activeChart.value = val.chartTypeList[0]
} }
const selectedTime = ref('按月统计') const selectedTime = ref('按月统计')
...@@ -698,9 +714,8 @@ const tableData = [ ...@@ -698,9 +714,8 @@ const tableData = [
.item3 {} .item3 {}
} }
} }
.data-main-box-main-content{
} .data-main-box-main-content {}
} }
.data-main-box-footer { .data-main-box-footer {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref, computed, onMounted, nextTick } from 'vue'
import Line from './assets/icons/line.svg' import Line from './assets/icons/line.svg'
import LineActive from './assets/icons/line-active.svg' import LineActive from './assets/icons/line-active.svg'
import Bar from './assets/icons/bar.svg' import Bar from './assets/icons/bar.svg'
...@@ -34,10 +34,11 @@ import PieActive from './assets/icons/pie-active.svg' ...@@ -34,10 +34,11 @@ import PieActive from './assets/icons/pie-active.svg'
import Radar from './assets/icons/radar.svg' import Radar from './assets/icons/radar.svg'
import RadarActive from './assets/icons/radar-active.svg' import RadarActive from './assets/icons/radar-active.svg'
import TipTab from '@/components/base/TipTab/index.vue' import TipTab from '@/components/base/TipTab/index.vue'
const chartItemList = ref([
const defaultChartTypeList = [
{ {
name: '折线图', name: '折线图',
active: true, active: false,
icon: Line, icon: Line,
activeIcon: LineActive activeIcon: LineActive
}, },
...@@ -59,7 +60,8 @@ const chartItemList = ref([ ...@@ -59,7 +60,8 @@ const chartItemList = ref([
icon: Radar, icon: Radar,
activeIcon: RadarActive activeIcon: RadarActive
}, },
]) ]
const emit = defineEmits('clickChartItem') const emit = defineEmits('clickChartItem')
...@@ -75,9 +77,39 @@ const props = defineProps({ ...@@ -75,9 +77,39 @@ const props = defineProps({
chartTitle: { chartTitle: {
type: String, type: String,
default: '' default: ''
},
chartTypeList : {
type: Array,
default: []
} }
}) })
const chartItemList = computed(() => {
let arr = []
props.chartTypeList.forEach(item => {
defaultChartTypeList.forEach(val => {
if(val.name === item) {
arr.push(val)
}
})
})
arr.forEach(item => {
item.active = false
})
arr[0].active = true
return arr
})
// nextTick(() => {
// let arr = chartItemList.value.filter(item => item.active)
// if(!arr.length) {
// alert(1)
// chartItemList.value[0].active = true
// }
// })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -3,13 +3,8 @@ ...@@ -3,13 +3,8 @@
<div class="left"> <div class="left">
<div class="left-text text-tip-1">{{ '统计维度:' }}</div> <div class="left-text text-tip-1">{{ '统计维度:' }}</div>
<div class="left-list"> <div class="left-list">
<ActionButton <ActionButton v-for="item, index in list" :key="index" :name="item.name"
v-for="item, index in list" :type="item.active ? 'active' : 'normal'" @click="handleClickItem(item)" />
:key="index"
:name="item.name"
:type="item.active ? 'active' : 'normal'"
@click="handleClickItem(item)"
/>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
...@@ -25,18 +20,6 @@ const props = defineProps({ ...@@ -25,18 +20,6 @@ const props = defineProps({
list: { list: {
type: Array, type: Array,
default: [ default: [
{
name: '时间',
active: true
},
{
name: '领域',
active: false
},
{
name: '党派',
active: false
},
] ]
} }
}) })
......
...@@ -7,12 +7,19 @@ ...@@ -7,12 +7,19 @@
<div class="sub-title">{{ subtitle }}</div> <div class="sub-title">{{ subtitle }}</div>
</div> </div>
<div class="description">{{ description }}</div> <div class="description">{{ description }}</div>
<div v-if="quantity > 0" class="quantity" :style="{ color: color }">{{ quantity }}{{ unit || "个" }}</div> <div v-if="quantity > 0" class="quantity" :style="{ color: color }">
{{ quantity }}{{ unit || "个" }}
<div class="quantity-title-des" v-if="desMap[title]">
<img class="info-icon" :src="infoIcon" alt="" />
{{ desMap[title] }}
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import infoIcon from "../assets/icons/info-icon.png";
defineProps({ defineProps({
title: { title: {
type: String, type: String,
...@@ -39,6 +46,11 @@ defineProps({ ...@@ -39,6 +46,11 @@ defineProps({
default: "#409EFF" default: "#409EFF"
} }
}); });
const desMap = {
实体清单: "中国实体数量",
商业管制清单: "受管制物项数量",
关键与新兴技术清单: "关键与新兴技术数量"
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -53,9 +65,7 @@ defineProps({ ...@@ -53,9 +65,7 @@ defineProps({
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
transition: transition: transform 0.3s ease, box-shadow 0.3s ease;
transform 0.3s ease,
box-shadow 0.3s ease;
cursor: pointer; cursor: pointer;
} }
...@@ -117,9 +127,27 @@ defineProps({ ...@@ -117,9 +127,27 @@ defineProps({
.quantity { .quantity {
position: absolute; position: absolute;
top: 20px; top: 15px;
right: 20px; right: 20px;
font-size: 32px; font-size: 32px;
font-weight: 700; font-weight: 700;
width: 150px;
display: flex;
flex-direction: column;
align-items: flex-end;
.quantity-title-des {
display: flex;
align-items: center;
font-family: Source Han Sans CN;
font-size: 14px;
font-weight: 400;
color: rgba(95, 101, 108, 1);
line-height: 1.4;
.info-icon {
width: 16px;
height: 16px;
margin-right: 4px;
}
}
} }
</style> </style>
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
</div> </div>
<div class="department">{{ headerTitle.department }}</div> <div class="department">{{ headerTitle.department }}</div>
</div> </div>
<div class="btn"> <div class="btn"><img :src="icon01" alt />切换</div>
<img :src="icon01" alt />切换
</div>
</div> </div>
<div class="header-nav"> <div class="header-nav">
<div <div
...@@ -38,15 +36,16 @@ ...@@ -38,15 +36,16 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import sanctionsOverview from "./components/sanctionsOverview/index.vue" import sanctionsOverview from "./components/sanctionsOverview/index.vue";
// import dataStatistics from "./components/dataStatistics/index.vue" // import dataStatistics from "./components/dataStatistics/index.vue"
// import deepMining from "./components/deepMining/index.vue" // import deepMining from "./components/deepMining/index.vue"
// import impactAnalysis from "./components/impactAnalysis/index.vue" // import impactAnalysis from "./components/impactAnalysis/index.vue"
import title from "./assets/title.png" import title from "./assets/title.png";
import icon01 from "./assets/icon01.png" import icon01 from "./assets/icon01.png";
import icon1 from "../assets/icons/icon1.png"; import icon1 from "../assets/icons/icon1.png";
import icon1Active from "../assets/icons/icon1_active.png"; import icon1Active from "../assets/icons/icon1_active.png";
import icon5 from "../assets/icons/icon5.png"; import icon5 from "../assets/icons/icon5.png";
...@@ -56,15 +55,22 @@ import icon2Active from "../assets/icons/icon2_active.png"; ...@@ -56,15 +55,22 @@ import icon2Active from "../assets/icons/icon2_active.png";
import icon3 from "../assets/icons/icon3.png"; import icon3 from "../assets/icons/icon3.png";
import icon3Active from "../assets/icons/icon3_active.png"; import icon3Active from "../assets/icons/icon3_active.png";
const route = useRoute();
const sanTypeId = ref("");
onMounted(() => {
// 获取路由参数sanTypeId
sanTypeId.value = route.query.sanTypeId;
console.log("CommercialControlList 页面接收到的 sanTypeId:", sanTypeId.value);
});
const headerTitle = ref({ const headerTitle = ref({
img: title, img: title,
title: "商业管制清单(CCL)", title: "商业管制清单(CCL)",
titleEn: "Commercial Control List", titleEn: "Commercial Control List",
department: "美国商务部工业与安全局" department: "美国商务部工业与安全局"
}) });
const activeIndex = ref(0) const activeIndex = ref(0);
const headerNavList = ref([ const headerNavList = ref([
{ {
...@@ -87,10 +93,7 @@ const headerNavList = ref([ ...@@ -87,10 +93,7 @@ const headerNavList = ref([
imgActive: icon3Active, imgActive: icon3Active,
title: "影响分析" title: "影响分析"
} }
]) ]);
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -178,8 +178,13 @@ ...@@ -178,8 +178,13 @@
<div class="rank-index" :class="'rank-' + (index + 1)">{{ index + 1 }}</div> <div class="rank-index" :class="'rank-' + (index + 1)">{{ index + 1 }}</div>
<div class="rank-name">{{ item.name }}</div> <div class="rank-name">{{ item.name }}</div>
<div class="rank-bar-bg"> <div class="rank-bar-bg">
<div class="rank-bar-fill" <div
:style="{ width: (item.value / maxRankValue) * 100 + '%', background: getBarColor(index) }"></div> class="rank-bar-fill"
:style="{
width: (item.value / maxRankValue) * 100 + '%',
background: getBarColor(index)
}"
></div>
</div> </div>
<div class="rank-value">{{ item.value }}家</div> <div class="rank-value">{{ item.value }}家</div>
</div> </div>
...@@ -302,13 +307,22 @@ import * as echarts from "echarts"; ...@@ -302,13 +307,22 @@ import * as echarts from "echarts";
import chinaJson from "../../../utils/China.json"; import chinaJson from "../../../utils/China.json";
import ai from "./assets/ai.png"; import ai from "./assets/ai.png";
import right from "./assets/right.png"; import right from "./assets/right.png";
import { getTotalCount, getSanctionCountChange, getRegionCount, getTechDomainCount, getEntityTypeCount } from "@/api/exportControlV2.0"; import {
getTotalCount,
getSanctionCountChange,
getRegionCount,
getTechDomainCount,
getEntityTypeCount
} from "@/api/exportControlV2.0";
import { useRoute } from "vue-router";
const route = useRoute();
// 实体清单-数据统计-制裁实体类型分布情况 // 实体清单-数据统计-制裁实体类型分布情况
const typeData = ref([]); const typeData = ref([]);
const getTypeCountData = async () => { const getTypeCountData = async () => {
// 参数 // 参数
const param = {}; const param = {};
param.sanTypeId = sanTypeId.value;
if (typeTime.value !== "all") { if (typeTime.value !== "all") {
param.startDate = `${typeTime.value}-01-01`; param.startDate = `${typeTime.value}-01-01`;
...@@ -330,14 +344,12 @@ const getTypeCountData = async () => { ...@@ -330,14 +344,12 @@ const getTypeCountData = async () => {
} }
}; };
// 实体清单-数据统计-制裁实体领域分布情况 // 实体清单-数据统计-制裁实体领域分布情况
const domainData = ref([]); const domainData = ref([]);
const getDomainCountData = async () => { const getDomainCountData = async () => {
// 参数 // 参数
const param = {}; const param = {};
param.sanTypeId = sanTypeId.value;
if (domainTime.value !== "all") { if (domainTime.value !== "all") {
param.startDate = `${domainTime.value}-01-01`; param.startDate = `${domainTime.value}-01-01`;
...@@ -371,7 +383,7 @@ const maxRankValue = computed(() => { ...@@ -371,7 +383,7 @@ const maxRankValue = computed(() => {
const getRegionCountData = async () => { const getRegionCountData = async () => {
// 参数 // 参数
const param = {}; const param = {};
param.sanTypeId = sanTypeId.value;
if (regionTime.value !== "all") { if (regionTime.value !== "all") {
param.startDate = `${regionTime.value}-01-01`; param.startDate = `${regionTime.value}-01-01`;
param.endDate = `${regionTime.value}-12-31`; param.endDate = `${regionTime.value}-12-31`;
...@@ -396,14 +408,14 @@ const getRegionCountData = async () => { ...@@ -396,14 +408,14 @@ const getRegionCountData = async () => {
} }
}; };
// 实体清单-数据统计-制裁实体数量变化情况 // 实体清单-数据统计-制裁实体数量变化情况
const sanctionCountChange = ref([]); const sanctionCountChange = ref([]);
// 获取实体清单-数据统计-制裁实体数量变化情况 // 获取实体清单-数据统计-制裁实体数量变化情况
const getSanctionCountChangeData = async () => { const getSanctionCountChangeData = async () => {
// 参数 // 参数
const param = { const param = {
countType: activeTab.value === "year" ? "year" : "record" countType: activeTab.value === "year" ? "year" : "record",
sanTypeId: sanTypeId.value
}; };
try { try {
const res = await getSanctionCountChange(param); const res = await getSanctionCountChange(param);
...@@ -419,7 +431,7 @@ const totalCount = ref(0); ...@@ -419,7 +431,7 @@ const totalCount = ref(0);
// 获取实体清单-数据统计-总量统计 // 获取实体清单-数据统计-总量统计
const getTotalCountData = async () => { const getTotalCountData = async () => {
try { try {
const res = await getTotalCount(); const res = await getTotalCount(sanTypeId.value);
totalCount.value = res.data || 0; totalCount.value = res.data || 0;
} catch (error) { } catch (error) {
console.error("获取实体清单-数据统计-总量统计失败:", error); console.error("获取实体清单-数据统计-总量统计失败:", error);
...@@ -438,9 +450,7 @@ const typeTime = ref("all"); ...@@ -438,9 +450,7 @@ const typeTime = ref("all");
const currentYear = new Date().getFullYear(); const currentYear = new Date().getFullYear();
const timeOptions = [ const timeOptions = [{ label: "全部时间", value: "all" }];
{ label: "全部时间", value: "all" },
];
for (let i = 0; i <= 10; i++) { for (let i = 0; i <= 10; i++) {
const year = currentYear - i; const year = currentYear - i;
...@@ -749,7 +759,9 @@ const updateTypeChart = () => { ...@@ -749,7 +759,9 @@ const updateTypeChart = () => {
chart = echarts.init(typeChartRef.value); chart = echarts.init(typeChartRef.value);
} }
let data = typeData.value.length ? [...typeData.value] : [ let data = typeData.value.length
? [...typeData.value]
: [
{ value: 50, name: "企业" }, { value: 50, name: "企业" },
{ value: 32, name: "高校" }, { value: 32, name: "高校" },
{ value: 32, name: "科研院所" } { value: 32, name: "科研院所" }
...@@ -873,7 +885,10 @@ const initTypeChart = () => { ...@@ -873,7 +885,10 @@ const initTypeChart = () => {
updateTypeChart(); updateTypeChart();
}; };
const sanTypeId = ref("");
onMounted(() => { onMounted(() => {
sanTypeId.value = route.query.sanTypeId || "";
console.log("数据统计页面接收到的 sanTypeId:", sanTypeId.value);
// initSanctionCountChart(); // initSanctionCountChart();
initMapChart(); initMapChart();
initDomainChart(); initDomainChart();
......
...@@ -75,9 +75,17 @@ ...@@ -75,9 +75,17 @@
<AnalysisBox title="实体清单更新历史" :showAllBtn="false"> <AnalysisBox title="实体清单更新历史" :showAllBtn="false">
<template #header-btn> <template #header-btn>
<div class="filters"> <div class="filters">
<el-select v-model="selectedDomain" placeholder="Select" <el-select
style="width: 150px; height: 32px; margin-right: 16px"> v-model="selectedDomain"
<el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value" /> placeholder="Select"
style="width: 150px; height: 32px; margin-right: 16px"
>
<el-option
v-for="item in domainOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
<el-checkbox v-model="onlyChina">只看涉华动态</el-checkbox> <el-checkbox v-model="onlyChina">只看涉华动态</el-checkbox>
</div> </div>
...@@ -91,8 +99,13 @@ ...@@ -91,8 +99,13 @@
<img :src="item.icon || title" alt="" /> <img :src="item.icon || title" alt="" />
<div class="main"> <div class="main">
<div class="main-title" @click="handleClick(item)">{{ item.name }}</div> <div class="main-title" @click="handleClick(item)">{{ item.name }}</div>
<el-tooltip effect="dark" :content="item.summary" popper-class="common-prompt-popper" placement="top" <el-tooltip
:show-after="500"> effect="dark"
:content="item.summary"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="main-desc">{{ item.summary }}</div> <div class="main-desc">{{ item.summary }}</div>
</el-tooltip> </el-tooltip>
<div class="tag-box"> <div class="tag-box">
...@@ -107,8 +120,14 @@ ...@@ -107,8 +120,14 @@
</div> </div>
<div class="left-footer"> <div class="left-footer">
<div class="total-count"> {{ totalAll }} </div> <div class="total-count"> {{ totalAll }} </div>
<el-pagination v-model:current-page="currentPageAll" :page-size="pageSizeAll" :total="totalAll" <el-pagination
layout="prev, pager, next" background @current-change="handlePageChangeAll" /> v-model:current-page="currentPageAll"
:page-size="pageSizeAll"
:total="totalAll"
layout="prev, pager, next"
background
@current-change="handlePageChangeAll"
/>
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -130,8 +149,12 @@ ...@@ -130,8 +149,12 @@
<span>关键人物</span> <span>关键人物</span>
</div> </div>
<div class="key-person-list"> <div class="key-person-list">
<div class="person-item" v-for="(item, index) in publishInfo.personList" :key="index" <div
@click="handlePerClick(item)"> class="person-item"
v-for="(item, index) in publishInfo.personList"
:key="index"
@click="handlePerClick(item)"
>
<img :src="item.imageUrl" alt="" /> <img :src="item.imageUrl" alt="" />
<div class="person-info"> <div class="person-info">
<CommonPrompt :content="item.name"> <CommonPrompt :content="item.name">
...@@ -183,7 +206,9 @@ import icon02 from "../../assets/icon02.png"; ...@@ -183,7 +206,9 @@ import icon02 from "../../assets/icon02.png";
import { ArrowDown } from "@element-plus/icons-vue"; import { ArrowDown } from "@element-plus/icons-vue";
import CommonPrompt from "../../../../../commonPrompt/index.vue"; import CommonPrompt from "../../../../../commonPrompt/index.vue";
import { getEntityInfo, getPublishInfo, getPublishOrgInfo, getEntityUpdateInfo } from "@/api/exportControlV2.0.js"; import { getEntityInfo, getPublishInfo, getPublishOrgInfo, getEntityUpdateInfo } from "@/api/exportControlV2.0.js";
import { useRoute } from "vue-router";
const route = useRoute();
// 处理点击发布机构的方法 // 处理点击发布机构的方法
const handleClickOrg = item => { const handleClickOrg = item => {
// console.log("点击了发布机构:", item); // console.log("点击了发布机构:", item);
...@@ -275,9 +300,10 @@ const getSanctionUpdate = async () => { ...@@ -275,9 +300,10 @@ const getSanctionUpdate = async () => {
const data = { const data = {
isCn: onlyChina.value, isCn: onlyChina.value,
techDomainIds: selectedDomain.value ? [selectedDomain.value] : [], techDomainIds: selectedDomain.value ? [selectedDomain.value] : [],
typeName: "实体清单", // typeName: "实体清单",
pageNum: currentPageAll.value, pageNum: currentPageAll.value,
pageSize: pageSizeAll.value pageSize: pageSizeAll.value,
sanTypeIds: [sanTypeId.value] || ["1"] // 实体清单固定1
}; };
try { try {
const res = await getEntityUpdateInfo(data); const res = await getEntityUpdateInfo(data);
...@@ -324,7 +350,7 @@ const handlePageChangeAll = val => { ...@@ -324,7 +350,7 @@ const handlePageChangeAll = val => {
const publishInfo = ref({}); const publishInfo = ref({});
const getPublishInfoFn = async () => { const getPublishInfoFn = async () => {
const params = { const params = {
sanTypeId: 1 // 实体清单固定1 sanTypeId: sanTypeId.value || 1 // 实体清单固定1
}; };
try { try {
const res = await getPublishInfo(params); const res = await getPublishInfo(params);
...@@ -379,22 +405,25 @@ const handleLoadMoreDynamic = () => { ...@@ -379,22 +405,25 @@ const handleLoadMoreDynamic = () => {
// 获取实体清单基本信息 // 获取实体清单基本信息
const entityInfo = ref({}); const entityInfo = ref({});
const emit = defineEmits(['update-entity-info']); const emit = defineEmits(["update-entity-info"]);
const getEntityInfoFn = async () => { const getEntityInfoFn = async id => {
try { try {
const res = await getEntityInfo("el"); const res = await getEntityInfo(id);
if (res && res.code === 200) { if (res && res.code === 200) {
entityInfo.value = res.data; entityInfo.value = res.data;
emit('update-entity-info', res.data); console.log("获取实体清单基本信息成功:", res.data);
emit("update-entity-info", res.data);
} }
} catch (error) { } catch (error) {
console.error("获取实体清单基本信息失败:", error); console.error("获取实体清单基本信息失败:", error);
} }
}; };
const sanTypeId = ref("");
onMounted(() => { onMounted(() => {
sanTypeId.value = route.query.sanTypeId;
// 获取实体清单基本信息 // 获取实体清单基本信息
getEntityInfoFn(); getEntityInfoFn(sanTypeId.value);
// 获取实体清单发布机构 // 获取实体清单发布机构
getPublishInfoFn(); getPublishInfoFn();
// 获取实体清单更新历史 // 获取实体清单更新历史
......
<template> <template>
<div class="sanctions-overview"> <div class="sanctions-overview">
<div class="side-nav"> <div class="side-nav">
<div v-for="(item, index) in activeTab" :key="index" class="tab-item" :class="{'active': index === activeIndex}" @click="activeIndex = index"> <div
{{item}} 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> <span v-if="index === activeIndex" class="arrow"></span>
</div> </div>
</div> </div>
<div class="content-box"> <div class="content-box">
<introductionPage v-if="activeIndex === 0" @update-entity-info="(data) => $emit('update-entity-info', data)"></introductionPage> <introductionPage
<listPage v-if="activeIndex === 1"></listPage> v-show="activeIndex === 1"
@update-entity-info="data => $emit('update-entity-info', data)"
></introductionPage>
<listPage v-show="activeIndex === 0"></listPage>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineEmits } from 'vue' import { ref, defineEmits } from "vue";
import introductionPage from "./components/introductionPage/index.vue" import introductionPage from "./components/introductionPage/index.vue";
import listPage from "./components/listPage/index.vue" import listPage from "./components/listPage/index.vue";
const emit = defineEmits(['update-entity-info'])
const activeTab = ref(["实体清单简介", "实体清单列表"])
const activeIndex = ref(0)
const emit = defineEmits(["update-entity-info"]);
const activeTab = ref(["实体清单列表", "实体清单简介"]);
const activeIndex = ref(0);
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
*{ * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.sanctions-overview{ .sanctions-overview {
width: 1601px; width: 1601px;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="entity-list"> <div class="entity-list">
<div class="header"> <div class="header">
<div class="header-title"> <div class="header-title">
<img :src="headerTitle.img" alt=""> <img :src="headerTitle.img" alt="" />
<div> <div>
<div class="title"> <div class="title">
{{ headerTitle.title }} {{ headerTitle.title }}
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
{{ headerTitle.department }} {{ headerTitle.department }}
</div> </div>
</div> </div>
<div class="btn"> <div class="btn"><img :src="icon01" alt="" />切换</div>
<img :src="icon01" alt="">切换
</div>
</div> </div>
<div class="header-nav"> <div class="header-nav">
<div <div
...@@ -24,7 +22,7 @@ ...@@ -24,7 +22,7 @@
:class="{ active: activeIndex === index }" :class="{ active: activeIndex === index }"
@click="activeIndex = index" @click="activeIndex = index"
> >
<img :src="activeIndex === index ? item.imgActive : item.img" alt=""> <img :src="activeIndex === index ? item.imgActive : item.img" alt="" />
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
<div class="active-line" v-if="activeIndex === index"></div> <div class="active-line" v-if="activeIndex === index"></div>
</div> </div>
...@@ -40,7 +38,8 @@ ...@@ -40,7 +38,8 @@
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import sanctionsOverview from "./components/sanctionsOverview/index.vue"; import sanctionsOverview from "./components/sanctionsOverview/index.vue";
import dataStatistics from "./components/dataStatistics/index.vue"; import dataStatistics from "./components/dataStatistics/index.vue";
...@@ -58,14 +57,21 @@ import icon2Active from "../assets/icons/icon2_active.png"; ...@@ -58,14 +57,21 @@ import icon2Active from "../assets/icons/icon2_active.png";
import icon3 from "../assets/icons/icon3.png"; import icon3 from "../assets/icons/icon3.png";
import icon3Active from "../assets/icons/icon3_active.png"; import icon3Active from "../assets/icons/icon3_active.png";
const route = useRoute();
const headerTitle = ref({ const headerTitle = ref({
// img: title, // img: title,
// title: "实体清单", // title: "实体清单",
// titleEn: "Entity List", // titleEn: "Entity List",
// department: "美国商务部工业与安全局" // department: "美国商务部工业与安全局"
}) });
const handleUpdateEntityInfo = (data) => { onMounted(() => {
// 获取路由参数id
const id = route.query.id;
console.log("EntityList 页面接收到的 id:", id);
});
const handleUpdateEntityInfo = data => {
console.log("更新实体清单基本信息:", data);
if (data) { if (data) {
headerTitle.value = { headerTitle.value = {
...headerTitle.value, ...headerTitle.value,
...@@ -74,11 +80,11 @@ const handleUpdateEntityInfo = (data) => { ...@@ -74,11 +80,11 @@ const handleUpdateEntityInfo = (data) => {
department: data.orgName, department: data.orgName,
departId: data.orgId, departId: data.orgId,
img: data.orgLogoUrl || title img: data.orgLogoUrl || title
};
} }
} };
}
const activeIndex = ref(0) const activeIndex = ref(0);
const headerNavList = ref([ const headerNavList = ref([
{ {
......
...@@ -137,15 +137,18 @@ ...@@ -137,15 +137,18 @@
<AnalysisBox title="制裁实体国家分布情况"> <AnalysisBox title="制裁实体国家分布情况">
<div class="country-list"> <div class="country-list">
<div class="list-item" v-for="(item, index) in countryDistribution" :key="index"> <div class="list-item" v-for="(item, index) in countryDistribution" :key="index">
<img :src="flag" alt="" class="flag"> <img :src="flag" alt="" class="flag" />
<div class="country-name">{{ item.name }}</div> <div class="country-name">{{ item.name }}</div>
<div class="progress-bar-container"> <div class="progress-bar-container">
<div class="progress-bar" :style="{ <div
class="progress-bar"
:style="{
width: item.width, width: item.width,
background: item.gradient background: item.gradient
}"></div> }"
></div>
</div> </div>
<div class="count" :class="{ 'highlight': index === 0 }">{{ item.count }}</div> <div class="count" :class="{ highlight: index === 0 }">{{ item.count }}</div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
...@@ -170,9 +173,13 @@ ...@@ -170,9 +173,13 @@
<div class="rank-index" :class="'rank-' + (index + 1)">{{ index + 1 }}</div> <div class="rank-index" :class="'rank-' + (index + 1)">{{ index + 1 }}</div>
<div class="rank-name">{{ item.name }}</div> <div class="rank-name">{{ item.name }}</div>
<div class="rank-bar-bg"> <div class="rank-bar-bg">
<div class="rank-bar-fill" <div
:style="{ width: (maxRegionCount > 0 ? (item.count / maxRegionCount) * 100 : 0) + '%', background: getBarColor(index) }"> class="rank-bar-fill"
</div> :style="{
width: (maxRegionCount > 0 ? (item.count / maxRegionCount) * 100 : 0) + '%',
background: getBarColor(index)
}"
></div>
</div> </div>
<div class="rank-value">{{ item.count }}</div> <div class="rank-value">{{ item.count }}</div>
</div> </div>
...@@ -201,10 +208,18 @@ import * as echarts from "echarts"; ...@@ -201,10 +208,18 @@ import * as echarts from "echarts";
import chinaJson from "../../../utils/China.json"; import chinaJson from "../../../utils/China.json";
import ai from "./assets/ai.png"; import ai from "./assets/ai.png";
import right from "./assets/right.png"; import right from "./assets/right.png";
import flag from "../../assets/default-icon2.png" import flag from "../../assets/default-icon2.png";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { getSingleSanctionTotalCount, getSingleSanctionDomainCount, getSingleSanctionEntityTypeCount, getSingleSanctionEntityCountryCount, getSingleSanctionEntityRegionCount } from "@/api/exportControlV2.0"; import {
getSingleSanctionTotalCount,
getSingleSanctionDomainCount,
getSingleSanctionEntityTypeCount,
getSingleSanctionEntityCountryCount,
getSingleSanctionEntityRegionCount
} from "@/api/exportControlV2.0";
import { useRoute } from "vue-router";
const route = useRoute();
// 单次制裁-数据统计-制裁实体地域分布情况 // 单次制裁-数据统计-制裁实体地域分布情况
const regionDistribution = ref([]); const regionDistribution = ref([]);
const maxRegionCount = ref(0); const maxRegionCount = ref(0);
...@@ -212,8 +227,8 @@ const maxRegionCount = ref(0); ...@@ -212,8 +227,8 @@ const maxRegionCount = ref(0);
const getRegionData = async () => { const getRegionData = async () => {
if (!sanRecordId.value) return; if (!sanRecordId.value) return;
try { try {
const params = { sanRecordId: sanRecordId.value }; const params = { sanRecordId: sanRecordId.value, sanTypeId: route.query.sanTypeId || "1" };
if (regionTime.value && regionTime.value !== 'all') { if (regionTime.value && regionTime.value !== "all") {
params.startDate = `${regionTime.value}-01-01`; params.startDate = `${regionTime.value}-01-01`;
params.endDate = `${regionTime.value}-12-31`; params.endDate = `${regionTime.value}-12-31`;
} }
...@@ -226,9 +241,7 @@ const getRegionData = async () => { ...@@ -226,9 +241,7 @@ const getRegionData = async () => {
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
} };
// 单次制裁-数据统计-制裁实体国家分布情况 // 单次制裁-数据统计-制裁实体国家分布情况
const countryDistribution = ref([]); const countryDistribution = ref([]);
...@@ -236,7 +249,7 @@ const countryDistribution = ref([]); ...@@ -236,7 +249,7 @@ const countryDistribution = ref([]);
const getCountryCount = async () => { const getCountryCount = async () => {
if (!sanRecordId.value) return; if (!sanRecordId.value) return;
try { try {
const params = { sanRecordId: sanRecordId.value }; const params = { sanRecordId: sanRecordId.value, sanTypeId: sanTypeId.value };
const res = await getSingleSanctionEntityCountryCount(params); const res = await getSingleSanctionEntityCountryCount(params);
if (res.code === 200) { if (res.code === 200) {
const rawData = res.data || []; const rawData = res.data || [];
...@@ -245,7 +258,7 @@ const getCountryCount = async () => { ...@@ -245,7 +258,7 @@ const getCountryCount = async () => {
countryDistribution.value = rawData.map((item, index) => { countryDistribution.value = rawData.map((item, index) => {
// 计算宽度,最大值对应 80% // 计算宽度,最大值对应 80%
const width = maxCount > 0 ? (item.count / maxCount) * 80 + '%' : '0%'; const width = maxCount > 0 ? (item.count / maxCount) * 80 + "%" : "0%";
// 根据索引分配渐变色 // 根据索引分配渐变色
let gradient = ""; let gradient = "";
...@@ -267,9 +280,7 @@ const getCountryCount = async () => { ...@@ -267,9 +280,7 @@ const getCountryCount = async () => {
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
} };
// 单次制裁-数据统计-制裁实体类型分布情况 // 单次制裁-数据统计-制裁实体类型分布情况
const entityTypeCount = ref([]); const entityTypeCount = ref([]);
...@@ -277,8 +288,8 @@ const entityTypeCount = ref([]); ...@@ -277,8 +288,8 @@ const entityTypeCount = ref([]);
const getEntityTypeCount = async () => { const getEntityTypeCount = async () => {
if (!sanRecordId.value) return; if (!sanRecordId.value) return;
try { try {
const params = { sanRecordId: sanRecordId.value }; const params = { sanRecordId: sanRecordId.value, sanTypeId: sanTypeId.value };
if (typeTime.value && typeTime.value !== 'all') { if (typeTime.value && typeTime.value !== "all") {
params.startDate = `${typeTime.value}-01-01`; params.startDate = `${typeTime.value}-01-01`;
params.endDate = `${typeTime.value}-12-31`; params.endDate = `${typeTime.value}-12-31`;
} }
...@@ -290,10 +301,7 @@ const getEntityTypeCount = async () => { ...@@ -290,10 +301,7 @@ const getEntityTypeCount = async () => {
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
} };
// 单次制裁-数据统计-制裁实体领域分布情况 // 单次制裁-数据统计-制裁实体领域分布情况
const domainCount = ref([]); const domainCount = ref([]);
...@@ -301,8 +309,8 @@ const domainCount = ref([]); ...@@ -301,8 +309,8 @@ const domainCount = ref([]);
const getDomainCount = async () => { const getDomainCount = async () => {
if (!sanRecordId.value) return; if (!sanRecordId.value) return;
try { try {
const params = { sanRecordId: sanRecordId.value }; const params = { sanRecordId: sanRecordId.value, sanTypeId: sanTypeId.value };
if (domainTime.value && domainTime.value !== 'all') { if (domainTime.value && domainTime.value !== "all") {
params.startDate = `${domainTime.value}-01-01`; params.startDate = `${domainTime.value}-01-01`;
params.endDate = `${domainTime.value}-12-31`; params.endDate = `${domainTime.value}-12-31`;
} }
...@@ -314,8 +322,7 @@ const getDomainCount = async () => { ...@@ -314,8 +322,7 @@ const getDomainCount = async () => {
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
} };
// 单次制裁-数据统计-总量统计 // 单次制裁-数据统计-总量统计
const totalCount = ref({}); const totalCount = ref({});
...@@ -323,22 +330,21 @@ const totalCount = ref({}); ...@@ -323,22 +330,21 @@ const totalCount = ref({});
const getTotalCount = async () => { const getTotalCount = async () => {
if (!sanRecordId.value) return; if (!sanRecordId.value) return;
try { try {
const res = await getSingleSanctionTotalCount({ sanRecordId: sanRecordId.value }); const res = await getSingleSanctionTotalCount(route.query.sanTypeId);
if (res.code === 200) { if (res.code === 200) {
totalCount.value = res.data || {}; totalCount.value = res.data || {};
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
} };
const router = useRouter(); const router = useRouter();
const sanRecordId = ref("") const sanRecordId = ref("");
const getUrlParams = () => { const getUrlParams = () => {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
sanRecordId.value = urlParams.get("id") || "" sanRecordId.value = urlParams.get("id") || "";
} };
const regionTime = ref("all"); const regionTime = ref("all");
const domainTime = ref("all"); const domainTime = ref("all");
...@@ -355,11 +361,7 @@ watch(regionTime, () => { ...@@ -355,11 +361,7 @@ watch(regionTime, () => {
getRegionData(); getRegionData();
}); });
const timeOptions = [{ label: "全部时间", value: "all" }];
const timeOptions = [
{ label: "全部时间", value: "all" }
];
// 生成2000-2025年的选项 // 生成2000-2025年的选项
for (let i = 2025; i >= 2000; i--) { for (let i = 2025; i >= 2000; i--) {
timeOptions.push({ label: `${i}年`, value: `${i}` }); timeOptions.push({ label: `${i}年`, value: `${i}` });
...@@ -640,8 +642,11 @@ const initTypeChart = () => { ...@@ -640,8 +642,11 @@ const initTypeChart = () => {
chart.resize(); chart.resize();
}); });
}; };
const sanTypeId = ref("");
onMounted(() => { onMounted(() => {
// 获取路由参数id
sanTypeId.value = route.query.sanTypeId;
console.log("页面接收到的 sanTypeId:", sanTypeId.value);
// 获取url参数 // 获取url参数
getUrlParams(); getUrlParams();
// 单次制裁-数据统计-总量统计-请求 // 单次制裁-数据统计-总量统计-请求
......
...@@ -39,6 +39,9 @@ export default defineConfig({ ...@@ -39,6 +39,9 @@ export default defineConfig({
} }
} }
}, },
publicDir: 'public', // 指定 public 目录的位置
// 服务器的根路径
base: '/',
server: { server: {
host: '0.0.0.0', // 监听所有网络接口 host: '0.0.0.0', // 监听所有网络接口
port: 3000, port: 3000,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论