Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
b1345b72
Commit
b1345b72
authored
Sep 26, 2021
by
liyuhang19990520
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
即是根节点又是子节点判断
parent
a34065a0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
14 deletions
+41
-14
dist.rar
+0
-0
src/components/RelationalGraph.vue
+38
-13
src/setting.js
+1
-1
src/views/hnksh/hnsjfx.vue
+2
-0
No files found.
dist.rar
View file @
b1345b72
No preview for this file type
src/components/RelationalGraph.vue
View file @
b1345b72
...
...
@@ -14,8 +14,9 @@
slot-scope=
"
{ node }"
:class="{
w100h100: true,
highlight: judgeHeightLine(node),
gen: negativeHeightLine(node),
highlight: judgeHeightLine(node),
yellow: yellowActiveHeightLine(node),
}"
>
<div
...
...
@@ -316,10 +317,15 @@ export default {
if
(
this
.
nodedata
)
{
let
nodes
;
if
(
this
.
type
==
"hnthfx"
)
{
nodes
=
this
.
nodeArr
.
filter
((
i
)
=>
i
.
data
.
more
==
true
);
console
.
log
(
nodes
,
222222222222222
);
nodes
=
this
.
nodeArr
.
filter
(
(
i
)
=>
i
.
data
.
gen
==
true
&&
i
.
data
.
parentId
==
"1111"
);
}
responseData
.
forEach
((
item
)
=>
{
if
(
nodes
&&
nodes
.
length
>
0
)
{
let
sonParentNodes
=
nodes
.
find
((
j
)
=>
j
.
id
==
item
.
name
);
if
(
sonParentNodes
)
return
}
this
.
linkArr
.
push
({
from
:
this
.
nodedata
.
name
,
isHide
:
this
.
type
==
"hnthfx"
?
true
:
false
,
...
...
@@ -329,6 +335,7 @@ export default {
fontColor
:
"#000"
,
});
});
console
.
log
(
nodes
,
this
.
linkArr
,
222222222222222
);
}
//如果返回的数据有children数组 则计算link
this
.
createLink
(
responseData
);
...
...
@@ -362,7 +369,7 @@ export default {
}
else
if
(
this
.
type
==
"hnthfx"
)
{
this
.
toolbarBoo
=
true
;
let
nodes
=
seeksRGGraph
.
getNodes
();
//
即是根节点也是子节点背景图变黑
//
湖南可视化染色
setTimeout
(()
=>
{
if
(
nodes
.
length
>
0
)
{
nodes
.
forEach
((
i
)
=>
{
...
...
@@ -395,17 +402,24 @@ export default {
});
},
gainImg
()
{
this
.
g_loading
=
true
;
let
_this
=
this
;
this
.
callApi
(
"/hnapi/hnksh/getAndSaveImg"
,
this
.
params
).
then
((
res
)
=>
{
this
.
g_loading
=
false
;
if
(
res
.
success
&&
res
.
code
==
200
)
{
this
.
$message
.
success
(
"获取成功"
);
setTimeout
(()
=>
{
location
.
reload
();
_this
.
activeIdArr
=
[];
_this
.
nodeArr
=
[];
_this
.
linkArr
=
[];
_this
.
linkAll
=
[];
_this
.
genData
=
[];
_this
.
setGraphData
();
},
200
);
location
.
reload
();
}
else
if
(
res
.
success
&&
res
.
code
==
207
)
{
this
.
$message
.
warning
(
res
.
message
);
}
else
if
(
res
.
code
==
207
)
{
this
.
$notify
.
info
({
title
:
"提示"
,
message
:
res
.
message
,
duration
:
3000
,
});
}
});
},
...
...
@@ -422,10 +436,16 @@ export default {
this
.
highLightArr
.
includes
(
node
.
data
.
ajlbdm
);
return
boo
;
},
//黑色背景高亮
negativeHeightLine
(
node
)
{
let
boo
=
node
.
data
.
str
;
return
boo
;
},
//黄色背景高亮
yellowActiveHeightLine
(
node
)
{
let
boo
=
node
.
data
.
yellow
;
return
boo
;
},
/**
* @description: 存储节点的各个信息
* @param {*} selfObj 自己定义的对象
...
...
@@ -453,7 +473,7 @@ export default {
* @param {*} boo 是否是初始化时自动获取数据
* @return {*}
*/
createNode
(
data
,
boo
)
{
createNode
(
data
,
boo
,
parentId
)
{
let
_this
=
this
;
//先给根节点上色,在管后面的节点
data
.
forEach
((
item
)
=>
{
...
...
@@ -474,7 +494,7 @@ export default {
data
:
this
.
setNodeData
(
{
str
,
parentId
:
this
?.
nodedata
?.
name
||
0
,
parentId
:
parentId
||
this
?.
nodedata
?.
name
||
0
,
describe
:
this
.
filterDescribe
(
item
.
describe
),
nodePhoto
:
base64
,
},
...
...
@@ -489,7 +509,7 @@ export default {
Array
.
isArray
(
item
.
children
)
&&
item
.
children
.
length
>
0
)
{
this
.
createNode
(
item
.
children
);
this
.
createNode
(
item
.
children
,
null
,
item
.
name
);
}
});
},
...
...
@@ -783,6 +803,11 @@ $marginTop: 308px;
box-shadow
:
0
0
30px
#6670fb
;
border-radius
:
50%
;
}
.yellow
{
border
:
2px
solid
yellow
;
box-shadow
:
0
0
30px
yellow
;
border-radius
:
50%
;
}
.backImg
{
border-radius
:
50%
;
cursor
:
pointer
;
...
...
src/setting.js
View file @
b1345b72
/*
* @Author: your name
* @Date: 2021-06-20 11:48:40
* @LastEditTime: 2021-09-2
4 17:26:48
* @LastEditTime: 2021-09-2
6 09:35:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \control_platform\src\settings.js
...
...
src/views/hnksh/hnsjfx.vue
View file @
b1345b72
...
...
@@ -160,7 +160,9 @@ export default {
created
()
{
let
user
=
util
.
getCookie
(
"hnUser"
);
if
(
!
user
)
{
setTimeout
(()
=>
{
this
.
$message
.
error
(
"请输入正确的身份证号"
);
},
200
);
}
this
.
$set
(
this
.
cxFormData
,
"username"
,
util
.
getCookie
(
"hnUser"
));
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment