Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
1e67cba0
提交
1e67cba0
authored
4月 23, 2026
作者:
coderBryanFu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:更新关系图配置
上级
c3dec961
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
17 行删除
+27
-17
index.vue
src/components/base/RelationChart/index.vue
+10
-4
SearchBar.vue
src/components/layout/SearchBar.vue
+13
-9
index.vue
src/styles/components/RelationChart/index.vue
+1
-1
setChart.js
src/utils/setChart.js
+3
-3
没有找到文件。
src/components/base/RelationChart/index.vue
浏览文件 @
1e67cba0
...
...
@@ -4,7 +4,7 @@
<template
#
node=
"
{ node }">
<div
class=
"custom-node"
:style=
"
{
backgroundColor: node.color || 'var(--color-primary-50)'
}">
}"
>
<span
:style=
"
{
color: node.fontColor || '#ffffff',
fontSize: node.customFontSize || '24px',
...
...
@@ -12,8 +12,8 @@
textAlign: 'center',
wordBreak: 'break-word',
padding: '0 8px'
}">
{{
node
.
text
}}
}"
:title="node.text"
>
{{
truncateText
(
node
.
text
,
10
)
}}
</span>
</div>
</
template
>
...
...
@@ -26,6 +26,11 @@ import RelationGraph from "relation-graph-vue3";
const
graphRef
=
ref
(
null
);
const
truncateText
=
(
text
,
maxLen
)
=>
{
if
(
!
text
)
return
''
;
return
text
.
length
>
maxLen
?
text
.
slice
(
0
,
maxLen
)
+
'...'
:
text
;
};
// 定义 Props
const
props
=
defineProps
({
isVerticalChart
:
{
...
...
@@ -49,7 +54,7 @@ const emit = defineEmits(["nodeClick", "lineClick"]);
const
baseGraphOptionsH
=
{
layout
:
{
layoutName
:
"tree"
,
min_per_height
:
"auto"
// min_per_height: "auto",
},
defaultLineMarker
:
{
markerWidth
:
12
,
...
...
@@ -60,6 +65,7 @@ const baseGraphOptionsH = {
},
defaultNodeShape
:
1
,
defaultNodeWidth
:
35
,
maxNodeHeight
:
240
,
defaultLineShape
:
4
,
defaultJunctionPoint
:
"tb"
,
defaultNodeBorderWidth
:
2
,
...
...
src/components/layout/SearchBar.vue
浏览文件 @
1e67cba0
...
...
@@ -49,18 +49,22 @@
import
{
onMounted
,
ref
,
computed
,
onUnmounted
,
nextTick
,
watch
,
watchEffect
}
from
"vue"
;
import
router
from
"@/router/index"
;
import
{
useWrittingAsstaintStore
}
from
"@/stores/writtingAsstaintStore"
;
import
{
goToSearch
}
from
"@/utils/goToPage"
;
const
store
=
useWrittingAsstaintStore
();
const
handleSearch
=
()
=>
{
window
.
sessionStorage
.
setItem
(
"curTabName"
,
`搜索-
${
store
.
searchBillText
}
`
);
const
curRoute
=
router
.
resolve
({
path
:
"/searchResults"
,
query
:
{
searchText
:
store
.
searchBillText
,
areaName
:
store
.
searchData
.
areaName
}
});
window
.
open
(
curRoute
.
href
,
"_blank"
);
// window.sessionStorage.setItem("curTabName", `搜索-${store.searchBillText}`);
// const curRoute = router.resolve({
// path: "/searchResults",
// query: {
// searchText: store.searchBillText,
// areaName: store.searchData.areaName
// }
// });
// window.open(curRoute.href, "_blank");
goToSearch
(
store
.
searchBillText
,
store
.
searchData
.
areaName
)
};
let
containerRef
=
computed
(()
=>
store
.
searchData
.
containerRef
);
const
handleToPosi
=
id
=>
{
...
...
src/styles/components/RelationChart/index.vue
浏览文件 @
1e67cba0
...
...
@@ -50,7 +50,7 @@ const graphData = ref({
rootId
:
"a"
,
nodes
:
[
{
id
:
"a"
,
text
:
"a"
},
{
id
:
"b"
,
text
:
"b"
},
{
id
:
"b"
,
text
:
"b
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
"
},
{
id
:
"b1"
,
text
:
"b1"
},
{
id
:
"b1-1"
,
text
:
"b1-1"
},
{
id
:
"b1-2"
,
text
:
"b1-2"
},
...
...
src/utils/setChart.js
浏览文件 @
1e67cba0
...
...
@@ -4,7 +4,7 @@ import getQuarterRange from './getQuarterRange';
import
*
as
echarts
from
'echarts'
import
'echarts-wordcloud'
;
import
router
from
'@/router/index'
import
{
goToDataCountryBill
,
goToDataDecree
}
from
'./goToPage'
;
import
{
goToDataCountryBill
,
goToDataDecree
,
goToDataThinkTank
}
from
'./goToPage'
;
const
setChart
=
(
option
,
chartId
,
allowClick
,
selectParam
,
otherAreaList
)
=>
{
let
chartDom
=
document
.
getElementById
(
chartId
);
if
(
!
chartDom
)
{
...
...
@@ -105,11 +105,11 @@ const setChart = (option, chartId, allowClick, selectParam, otherAreaList) => {
const
year
=
params
.
name
.
slice
(
0
,
4
)
const
quatarNum
=
Number
(
params
.
name
[
params
.
name
.
length
-
1
])
selectParam
.
selectedDate
=
JSON
.
stringify
(
getQuarterRange
(
year
,
quatarNum
))
open
DataThinkTank
(
selectParam
);
goTo
DataThinkTank
(
selectParam
);
return
}
else
if
(
selectParam
.
key
===
2
)
{
selectParam
.
domains
=
params
.
name
open
DataThinkTank
(
selectParam
);
goTo
DataThinkTank
(
selectParam
);
return
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论