提交 4034a374 authored 作者: 张烨's avatar 张烨

Merge branch 'zy-tmp' into zy-dev

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