提交 25767136 authored 作者: coderBryanFu's avatar coderBryanFu

Merge branch 'pre' of http://8.140.26.4:10003/caijian/risk-monitor into fk-dev

流水线 #142 已失败 于阶段
in 34 秒
...@@ -315,6 +315,7 @@ onMounted(() => { ...@@ -315,6 +315,7 @@ onMounted(() => {
.pagination-box { .pagination-box {
display: flex; display: flex;
justify-content: center; justify-content: center;
position: relative;
} }
} }
} }
......
...@@ -51,7 +51,8 @@ const onInitGraph = () => { ...@@ -51,7 +51,8 @@ const onInitGraph = () => {
rankdir: 'LR', // 布局从左向右 rankdir: 'LR', // 布局从左向右
controlPoints: true, // 节点间连线的控制点 controlPoints: true, // 节点间连线的控制点
nodesep: 10, // 同一层节点之间的距离 nodesep: 10, // 同一层节点之间的距离
ranksep: 50, // 不同层节点之间的距离 ranksep: 100, // 不同层节点之间的距离
// begin: [250, 100], // 左上角坐标
}, },
modes: { modes: {
default: [ default: [
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
</div> </div>
</div> </div>
<el-dialog v-model="isTreeDialog" width="1540px" top="8vh" class="viewpoint-dialog" destroy-on-close> <el-dialog v-model="isTreeDialog" width="1400px" top="8vh" class="viewpoint-dialog" destroy-on-close>
<template #header> <template #header>
<div class="viewpoint-header"> <div class="viewpoint-header">
<div class="viewpoint-title">政令举措思维导图</div> <div class="viewpoint-title">政令举措思维导图</div>
...@@ -318,20 +318,22 @@ const onDecreeMindMap = async () => { ...@@ -318,20 +318,22 @@ const onDecreeMindMap = async () => {
if (res.code === 200) { if (res.code === 200) {
let nodes = [] let nodes = []
let edges = [] let edges = []
Object.keys(res.data||{}).forEach((label, count) => { let obj = {}
nodes.push({ id:`node-${count}`, label })
}) let list = onUniqueArray(Object.values(res.data||{}).flat(1), 'sectionId')
Object.values(res.data||{}).forEach((list, count) => { list.forEach((item, index) => {
list.forEach((item, index) => { nodes.push({ id:`node-${item.orderNum}-${item.sectionId}`, label:item.textZh, maxWidth:600, labelCfg, layer:1 })
if (item.execAgent?.length) { if (item.execAgent?.length) {
nodes.push({ id:`node-${count}-${index}`, label:item.textZh, maxWidth:600, labelCfg }) item.execAgent.forEach((label, num) => {
item.execAgent.forEach((label, num) => { if (!obj[label]) {
nodes.push({ id:`node-${count}-${index}-${num}`, label }) obj[label] = `${index}-${num}`
edges.push({ id:`edge1-${count}-${index}-${num}`, source:`node-${count}-${index}-${num}`, target:`node-${count}-${index}` }) nodes.push({ id:`node-${obj[label]}`, label, layer:0 })
edges.push({ id:`edge2-${count}-${index}-${num}`, source:`node-${count}`, target:`node-${count}-${index}-${num}` }) }
}) edges.push({ id:`edge-${index}-${num}`, source:`node-${obj[label]}`, target:`node-${item.orderNum}-${item.sectionId}` })
} })
}) } else {
edges.push({ id:`edge-${index}`, source:`root-virtual`, target:`node-${item.orderNum}-${item.sectionId}` })
}
}) })
setTimeout(() => { refMindGraph.value.onMindGraphData(nodes, edges) }, 100) setTimeout(() => { refMindGraph.value.onMindGraphData(nodes, edges) }, 100)
...@@ -341,6 +343,18 @@ const onDecreeMindMap = async () => { ...@@ -341,6 +343,18 @@ const onDecreeMindMap = async () => {
} }
} }
// 对象数组去重
const onUniqueArray = (list, key = 'id') => {
const obj = {};
return list.reduce((total, item) => {
if (!obj[String(item[key])]) {
obj[String(item[key])] = true;
total.push(item);
}
return total;
}, []);
}
// 相关实体 // 相关实体
const entityList = ref([]); const entityList = ref([]);
const onRelatedEntityData = async () => { const onRelatedEntityData = async () => {
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="sanctionCountChart.interpretation" /> <AiPane :aiContent="sanctionCountChart.loading ? '解读生成中...' : sanctionCountChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="rankChart.interpretation" /> <AiPane :aiContent="rankChart.loading ? '解读生成中...' : rankChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="domainChart.interpretation" /> <AiPane :aiContent="domainChart.loading ? '解读生成中...' : domainChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="typeChart.interpretation" /> <AiPane :aiContent="typeChart.loading ? '解读生成中...' : typeChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="domainChart.interpretation" /> <AiPane :aiContent="domainChart.loading ? '解读生成中...' : domainChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="typeChart.interpretation" /> <AiPane :aiContent="typeChart.loading ? '解读生成中...' : typeChart.interpretation" />
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -154,7 +154,11 @@ ...@@ -154,7 +154,11 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="countryDistributionChart.interpretation" /> <AiPane
:aiContent="
countryDistributionChart.loading ? '解读生成中...' : countryDistributionChart.interpretation
"
/>
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -198,7 +202,11 @@ ...@@ -198,7 +202,11 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="regionDistributionChart.interpretation" /> <AiPane
:aiContent="
regionDistributionChart.loading ? '解读生成中...' : regionDistributionChart.interpretation
"
/>
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="revenueChart.interpretation" /> <AiPane :aiContent="revenueChart.loading ? '解读生成中...' : revenueChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="marketChart.interpretation" /> <AiPane :aiContent="marketChart.loading ? '解读生成中...' : marketChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="rdChart.interpretation" /> <AiPane :aiContent="rdChart.loading ? '解读生成中...' : rdChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="shareChart.interpretation" /> <AiPane :aiContent="shareChart.loading ? '解读生成中...' : shareChart.interpretation" />
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
......
...@@ -60,7 +60,13 @@ ...@@ -60,7 +60,13 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="rdInstrumentDependencyChart.interpretation" /> <AiPane
:aiContent="
rdInstrumentDependencyChart.loading
? '解读生成中...'
: rdInstrumentDependencyChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -96,7 +102,13 @@ ...@@ -96,7 +102,13 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="rdInstrumentImportCountryChart.interpretation" /> <AiPane
:aiContent="
rdInstrumentImportCountryChart.loading
? '解读生成中...'
: rdInstrumentImportCountryChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -165,7 +177,13 @@ ...@@ -165,7 +177,13 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="internationalCooperationChart.interpretation" /> <AiPane
:aiContent="
internationalCooperationChart.loading
? '解读生成中...'
: internationalCooperationChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -234,7 +252,11 @@ ...@@ -234,7 +252,11 @@
</div> </div>
<div class="ai-pane"> <div class="ai-pane">
<AiButton /> <AiButton />
<AiPane :aiContent="internationalPaperChart.interpretation" /> <AiPane
:aiContent="
internationalPaperChart.loading ? '解读生成中...' : internationalPaperChart.interpretation
"
/>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
......
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
<div class="right-main"> <div class="right-main">
<el-empty v-if="surveyInfoList.length === 0" description="当前条件下暂无数据" :image-size="200" /> <el-empty v-if="surveyInfoList.length === 0" description="当前条件下暂无数据" :image-size="200" />
<div v-else class="right-main-item" v-for="(item, index) in surveyInfoList" :key="index" <div v-else class="right-main-item" v-for="(item, index) in surveyInfoList" :key="index"
@click="handleClickToSurveyDetail(item.sortcode)"> @click="handleClickCardToDetail(item.sortcode, item.sortName)">
<div class="item-left"> <div class="item-left">
<div class="item-left-item"> {{ formatDate(item.searchdate, 'year') }}</div> <div class="item-left-item"> {{ formatDate(item.searchdate, 'year') }}</div>
<div class="item-left-item"> {{ formatDate(item.searchdate, 'date') }}</div> <div class="item-left-item"> {{ formatDate(item.searchdate, 'date') }}</div>
...@@ -495,23 +495,11 @@ const handleClickToDetail = () => { ...@@ -495,23 +495,11 @@ const handleClickToDetail = () => {
activeIndex = carouselRef.value.activeIndex; activeIndex = carouselRef.value.activeIndex;
} }
console.log("当前 Carousel 激活索引:", activeIndex);
const id = box1DataList.value[activeIndex].SEARCHSORT; const id = box1DataList.value[activeIndex].SEARCHSORT;
window.sessionStorage.setItem("curTabName", id + "调查概览"); handleClickCardToDetail(id, id + "调查概览")
const route = router.resolve({
path: "/marketAccessLayout",
query: {
id: id
}
});
window.open(route.href, "_blank");
}; };
const handleClickCardToDetail = (id, name) => { const handleClickCardToDetail = (id, name) => {
// console.log('id',id);
window.sessionStorage.setItem("curTabName", name); window.sessionStorage.setItem("curTabName", name);
const route = router.resolve({ const route = router.resolve({
path: "/marketAccessLayout", path: "/marketAccessLayout",
...@@ -1319,16 +1307,6 @@ const handleGetSurveyList = async () => { ...@@ -1319,16 +1307,6 @@ const handleGetSurveyList = async () => {
} catch (error) { } } catch (error) { }
}; };
const handleClickToSurveyDetail = id => {
const route = router.resolve({
path: "/marketAccessLayout",
query: {
id: id
}
});
window.open(route.href, "_blank");
};
// 查看更多风险信号 // 查看更多风险信号
const handleToMoreRiskSignal = () => { const handleToMoreRiskSignal = () => {
const route = router.resolve("/viewRiskSignal"); const route = router.resolve("/viewRiskSignal");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论