提交 eaf16a6e authored 作者: 闫鹏's avatar 闫鹏

合并分支 'yp-dev' 到 'pre'

Yp dev 查看合并请求 !344
流水线 #477 已通过 于阶段
in 3 分 41 秒
......@@ -105,8 +105,12 @@
</div>
</template>
<!-- <div class="echarts" ref="sanctionCountChartRef"></div> -->
<EChart :option="sanctionCountChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }"
@chart-click="handleBarChartClick" />
<EChart
:option="sanctionCountChartOption"
autoresize
:style="{ height: '300px', padding: '0 20px' }"
@chart-click="handleBarChartClick"
/>
<!-- <div class="bottom">
<div class="ai">
<div class="left">
......@@ -140,14 +144,22 @@
<div class="map-wrapper">
<div class="map-chart" ref="mapChartRef"></div>
<div class="rank-list">
<div class="rank-item" v-for="(item, index) in rankData" :key="index" @click="handleClickRankChart(item)">
<div
class="rank-item"
v-for="(item, index) in rankData"
:key="index"
@click="handleClickRankChart(item)"
>
<div class="rank-index" :class="'rank-' + (index + 1)">{{ index + 1 }}</div>
<div class="rank-name">{{ item.name }}</div>
<div class="rank-bar-bg">
<div class="rank-bar-fill" :style="{
width: (item.value / maxRankValue) * 100 + '%',
background: getBarColor(index)
}"></div>
<div
class="rank-bar-fill"
:style="{
width: (item.value / maxRankValue) * 100 + '%',
background: getBarColor(index)
}"
></div>
</div>
<div class="rank-value">{{ item.value }}家</div>
</div>
......@@ -184,8 +196,12 @@
</el-select>
</template>
<!-- <div class="echarts" ref="domainChartRef"></div> -->
<EChart :option="domainChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }"
@chart-click="handlePieChartClick" />
<EChart
:option="domainChartOption"
autoresize
:style="{ height: '300px', padding: '0 20px' }"
@chart-click="handlePieChartClick"
/>
<!-- <div class="bottom">
<div class="ai">
<div class="left">
......@@ -217,7 +233,12 @@
</el-select>
</template>
<!-- <div class="echarts" ref="typeChartRef"></div> -->
<EChart :option="typeChartOption" autoresize :style="{ height: '300px', padding: '0 20px' }" @chart-click="handlePieChartClick1" />
<EChart
:option="typeChartOption"
autoresize
:style="{ height: '300px', padding: '0 20px' }"
@chart-click="handlePieChartClick1"
/>
<!-- <div class="bottom">
<div class="ai">
<div class="left">
......@@ -271,7 +292,7 @@ const typeChart = useChartInterpretation();
const rankChart = useChartInterpretation();
const route = useRoute();
const router = useRouter()
const router = useRouter();
// 实体清单-数据统计-制裁实体类型分布情况
const typeData = ref([]);
const getTypeCountData = async () => {
......@@ -638,13 +659,14 @@ const updateMapChart = () => {
};
mapChartInstance.setOption(option);
mapChartInstance.on('click', function (params) {
mapChartInstance.on("click", function (params) {
const param = {
selectedProvince: params.name,
selectedDate: regionTime.value === 'all' ? null : JSON.stringify([regionTime.value + '-01-01', regionTime.value + '-12-31'])
}
selectedDate:
regionTime.value === "all" ? null : JSON.stringify([regionTime.value + "-01-01", regionTime.value + "-12-31"])
};
const route = router.resolve({
path: '/dataLibrary/dataEntityList',
path: "/dataLibrary/dataEntityList",
query: param
});
window.open(route.href, "_blank");
......@@ -988,10 +1010,10 @@ const updateTypeChart = () => {
let data = typeData.value.length
? [...typeData.value]
: [
{ value: 50, name: "企业" },
{ value: 32, name: "高校" },
{ value: 32, name: "科研院所" }
];
{ value: 50, name: "企业" },
{ value: 32, name: "高校" },
{ value: 32, name: "科研院所" }
];
// 2. 聚合逻辑:保留前5项,其余合并为“其他”
data.sort((a, b) => b.value - a.value);
......@@ -1114,61 +1136,64 @@ const initTypeChart = () => {
const sanTypeId = ref("");
// 点击制裁实体数量变化情况
const handleBarChartClick = (val) => {
console.log('value', val);
const handleBarChartClick = val => {
console.log("value", val);
const params = {
selectedDate: activeTab.value === 'year' ? JSON.stringify([val.name + '-01-01', val.name + '-12-31']) : JSON.stringify([val.name, val.name])
}
selectedDate:
activeTab.value === "year"
? JSON.stringify([val.name + "-01-01", val.name + "-12-31"])
: JSON.stringify([val.name, val.name])
};
const route = router.resolve({
path: '/dataLibrary/dataEntityList',
path: "/dataLibrary/dataEntityList",
query: params
});
window.open(route.href, "_blank");
}
};
// 制裁实体各省分布情况
const handleClickRankChart = (item) => {
const handleClickRankChart = item => {
// console.log('item', item);
const params = {
selectedProvince: item.name,
selectedDate: regionTime.value === 'all' ? null : JSON.stringify([regionTime.value + '-01-01', regionTime.value + '-12-31'])
}
selectedDate:
regionTime.value === "all" ? null : JSON.stringify([regionTime.value + "-01-01", regionTime.value + "-12-31"])
};
const route = router.resolve({
path: '/dataLibrary/dataEntityList',
path: "/dataLibrary/dataEntityList",
query: params
});
window.open(route.href, "_blank");
}
};
// 制裁实体领域分布情况
const handlePieChartClick = (val) => {
console.log('val', val);
const handlePieChartClick = val => {
console.log("val", val);
const params = {
domains: val.name,
selectedDate: domainTime.value === 'all' ? null : JSON.stringify([domainTime.value + '-01-01', domainTime.value + '-12-31'])
}
selectedDate:
domainTime.value === "all" ? null : JSON.stringify([domainTime.value + "-01-01", domainTime.value + "-12-31"])
};
const route = router.resolve({
path: '/dataLibrary/dataEntityList',
path: "/dataLibrary/dataEntityList",
query: params
});
window.open(route.href, "_blank");
}
};
// 制裁实体类型分布情况
const handlePieChartClick1 = (val) => {
console.log('val', val);
const handlePieChartClick1 = val => {
console.log("val", val);
const params = {
selectedEntityType: val.name,
selectedDate: typeTime.value === 'all' ? null : JSON.stringify([typeTime.value + '-01-01', typeTime.value + '-12-31'])
}
selectedDate: typeTime.value === "all" ? null : JSON.stringify([typeTime.value + "-01-01", typeTime.value + "-12-31"])
};
const route = router.resolve({
path: '/dataLibrary/dataEntityList',
path: "/dataLibrary/dataEntityList",
query: params
});
window.open(route.href, "_blank");
}
};
onMounted(() => {
sanTypeId.value = route.query.sanTypeId || "";
......@@ -1191,11 +1216,6 @@ onMounted(() => {
</script>
<style scoped lang="scss">
* {
margin: 0;
padding: 0;
}
.data-statistics {
width: 1601px;
margin: 0 auto;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论