提交 23a7bd89 authored 作者: 张烨's avatar 张烨

fix:政令-修复关键条款词云数据没变化问题

上级 dff685d2
流水线 #157 已失败 于阶段
......@@ -965,6 +965,7 @@ const box8Params = reactive({
})
const handleGetDecreeKeyInstruction = async () => {
box8Params.loading = true
wordCloudData.value = []
try {
let { year, domainId, proposeName } = box8Params;
const res = await getDecreeKeyInstruction({
......@@ -973,8 +974,13 @@ const handleGetDecreeKeyInstruction = async () => {
orgId: proposeName || undefined
});
console.log("政令重点条款", res);
wordCloudData.value = res.data.map(item => ({name: item.clause, value: item.count}));
if (res.code==200) {
wordCloudData.value = res.data.map(item => ({name: item.clause, value: item.count}));
} else {
wordCloudData.value = []
}
} catch (error) {
wordCloudData.value = []
console.error("政令重点条款error", error);
}
box8Params.loading = false
......@@ -1264,8 +1270,7 @@ onMounted(async () => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 16px 0;
padding: 16px 22px;
.data-origin-icon {
width: 16px;
height: 16px;
......
......@@ -2,7 +2,7 @@
<div class="wrap">
<div class="box1">
<AnalysisBox title="相关政令" :showAllBtn="false">
<div class="box1-main">
<div class="box1-main" v-loading="isLoading">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<el-scrollbar height="100%" always>
<div class="left-item" :class="{ 'item-active': false }" v-for="(item, index) in siderList" :key="index" @click="handleClickDecree(item)">
......@@ -18,9 +18,11 @@
</div>
<div class="box2">
<AnalysisBox title="政令关系挖掘" :showAllBtn="false">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<div class="box2-main" v-if="graphData.nodes?.length">
<GraphChart :nodes="graphData.nodes" :links="graphData.links" layoutType="force" @handleClickNode="handleClickNode" />
<div style="height: 100%; width: 100%;" v-loading="isLoading">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<div class="box2-main" v-if="graphData.nodes?.length">
<GraphChart :nodes="graphData.nodes" :links="graphData.links" layoutType="force" @handleClickNode="handleClickNode" />
</div>
</div>
</AnalysisBox>
</div>
......@@ -28,7 +30,7 @@
<el-dialog v-model="dialogVisible" width="1000px" class="viewpoint-dialog">
<template #header>
<div class="viewpoint-header">
<div class="viewpoint-title">冲突关系</div>
<div class="viewpoint-title">关联关系</div>
</div>
</template>
<div class="viewpoint-body">
......@@ -61,7 +63,7 @@ import icon1629 from "./assets/icons/icon1629.png";
const route = useRoute();
// 冲突关系
// 关联关系
const dialogVisible = ref(false);
// 基本信息
......@@ -123,13 +125,16 @@ const handleClickNode = ({data}) => {
if (node) handleClickDecree(node)
}
}
const isLoading = ref(false);
const initGraphChart = () => {
isLoading.value = true;
Promise.all([onDecreeSummaryData(), handleGetRelateOrder()]).then(() => {
if (mainInfo.value.id && siderList.value.length) {
graphData.links = siderList.value.map(onFormatLink)
graphData.nodes = siderList.value.map(onFormatNode)
graphData.nodes.unshift(onFormatNode(mainInfo.value))
}
isLoading.value = false;
})
}
const onFormatLink = (item, index) => {
......@@ -179,7 +184,7 @@ const handleClickDecree = decree => {
window.open(route.href, "_blank");
};
// 冲突关系
// 关联关系
const graphContainer = ref(null);
let graph = null;
const onRelationChart = () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论