Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
94a16cce
提交
94a16cce
authored
3月 27, 2026
作者:
张烨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style:政令修改思维导图显示样式
上级
5df76eea
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
11 行删除
+26
-11
MindGraph.vue
src/views/decree/com/MindGraph.vue
+1
-1
index.vue
src/views/decree/decreeLayout/overview/measures/index.vue
+25
-10
没有找到文件。
src/views/decree/com/MindGraph.vue
浏览文件 @
94a16cce
...
...
@@ -51,7 +51,7 @@ const onInitGraph = () => {
rankdir
:
'LR'
,
// 布局从左向右
controlPoints
:
true
,
// 节点间连线的控制点
nodesep
:
10
,
// 同一层节点之间的距离
ranksep
:
5
0
,
// 不同层节点之间的距离
ranksep
:
10
0
,
// 不同层节点之间的距离
},
modes
:
{
default
:
[
...
...
src/views/decree/decreeLayout/overview/measures/index.vue
浏览文件 @
94a16cce
...
...
@@ -123,7 +123,7 @@
</div>
</div>
<el-dialog
v-model=
"isTreeDialog"
width=
"1
54
0px"
top=
"8vh"
class=
"viewpoint-dialog"
destroy-on-close
>
<el-dialog
v-model=
"isTreeDialog"
width=
"1
40
0px"
top=
"8vh"
class=
"viewpoint-dialog"
destroy-on-close
>
<
template
#
header
>
<div
class=
"viewpoint-header"
>
<div
class=
"viewpoint-title"
>
政令举措思维导图
</div>
...
...
@@ -318,20 +318,23 @@ const onDecreeMindMap = async () => {
if
(
res
.
code
===
200
)
{
let
nodes
=
[]
let
edges
=
[]
Object
.
keys
(
res
.
data
||
{}).
forEach
((
label
,
count
)
=>
{
nodes
.
push
({
id
:
`node-
${
count
}
`
,
label
})
})
Object
.
values
(
res
.
data
||
{}).
forEach
((
list
,
count
)
=>
{
let
obj
=
{}
let
list
=
onUniqueArray
(
Object
.
values
(
res
.
data
||
{}).
flat
(
1
),
'sectionId'
)
list
.
forEach
((
item
,
index
)
=>
{
nodes
.
push
({
id
:
`node-
${
item
.
orderNum
}
-
${
item
.
sectionId
}
`
,
label
:
item
.
textZh
,
maxWidth
:
600
,
labelCfg
})
if
(
item
.
execAgent
?.
length
)
{
nodes
.
push
({
id
:
`node-
${
count
}
-
${
index
}
`
,
label
:
item
.
textZh
,
maxWidth
:
600
,
labelCfg
})
item
.
execAgent
.
forEach
((
label
,
num
)
=>
{
nodes
.
push
({
id
:
`node-
${
count
}
-
${
index
}
-
${
num
}
`
,
label
})
edges
.
push
({
id
:
`edge1-
${
count
}
-
${
index
}
-
${
num
}
`
,
source
:
`node-
${
count
}
-
${
index
}
-
${
num
}
`
,
target
:
`node-
${
count
}
-
${
index
}
`
})
edges
.
push
({
id
:
`edge2-
${
count
}
-
${
index
}
-
${
num
}
`
,
source
:
`node-
${
count
}
`
,
target
:
`node-
${
count
}
-
${
index
}
-
${
num
}
`
})
})
if
(
!
obj
[
label
])
{
obj
[
label
]
=
`
${
index
}
-
${
num
}
`
nodes
.
push
({
id
:
`node-
${
obj
[
label
]}
`
,
label
})
}
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
}
`
})
}
nodes
.
push
({
id
:
'root-virtual'
,
label
:
'暂无部门'
})
})
setTimeout
(()
=>
{
refMindGraph
.
value
.
onMindGraphData
(
nodes
,
edges
)
},
100
)
...
...
@@ -341,6 +344,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
onRelatedEntityData
=
async
()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论