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
8a548ab9
Commit
8a548ab9
authored
Oct 14, 2021
by
liyuhang19990520
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟节点图片
parent
9f628497
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
18 deletions
+27
-18
src/components/RelationalGraph.vue
+24
-15
src/components/ptCxForm_components.vue
+1
-1
src/setting.js
+2
-2
src/utils/gxt.js
+0
-0
No files found.
src/components/RelationalGraph.vue
View file @
8a548ab9
...
...
@@ -82,6 +82,7 @@
import
{
get
}
from
"@/utils/http.js"
;
import
utils
from
"@/utils/util.js"
;
import
SeeksRelationGraph
from
"relation-graph"
;
// import SeeksRelationGraph from "@/utils/gxt.js";
export
default
{
name
:
"SeeksRelationGraphDemo"
,
components
:
{
SeeksRelationGraph
},
...
...
@@ -270,13 +271,13 @@ export default {
ajlbdmStr
=
resData
?.
ajlbdmStr
;
ajlbdm
=
resData
?.
ajlbdm
;
isXsAj
=
resData
?.
isXsAj
;
nodePhoto
=
resData
?.
edzzplj
;
nodePhoto
=
resData
?.
edzzplj
||
resData
?.
img
;
}
//如果没有调用接口或者不存在
if
(
!
nodePhoto
)
{
nodePhoto
=
this
.
selectIcon
(
this
.
nodedata
.
type
,
false
);
}
else
{
nodePhoto
+=
"data:image/jpg;base64,"
;
nodePhoto
=
"data:image/jpg;base64,"
+
nodePhoto
;
}
this
.
activeIdArr
=
[
this
.
nodedata
.
name
];
//创建根节点
...
...
@@ -383,7 +384,6 @@ export default {
if
(
this
.
type
==
"shce"
)
{
setTimeout
(()
=>
{
let
arr
=
seeksRGGraph
.
getNodes
();
console
.
log
(
arr
);
arr
.
forEach
((
i
)
=>
{
if
(
i
.
data
.
type
==
"person"
&&
!
i
.
data
.
shcePhoto
)
{
this
.
callApi
(
"/shceapi/ryksh/getQgckZp"
,
{
...
...
@@ -677,7 +677,6 @@ export default {
this
.
callApi
(
str
,
obj
).
then
((
res
)
=>
{
//获取所有的节点对象
let
nodeAllData
=
this
.
$refs
.
seeksRelationGraph
.
getNodes
();
console
.
log
(
nodeAllData
,
2222222
);
let
nodeArr
=
[];
let
linkArr
=
[];
let
responseData
=
res
.
data
.
rows
||
res
.
rows
||
res
.
data
;
...
...
@@ -716,7 +715,6 @@ export default {
linkArr
.
push
(
linkObj
);
this
.
linkAll
.
push
(
linkObj
);
}
else
if
(
this
.
linkAll
.
length
>
0
)
{
console
.
log
(
this
.
linkAll
);
let
index
=
this
.
linkAll
.
findIndex
((
i
)
=>
{
return
(
i
.
from
==
linkObj
.
from
&&
...
...
@@ -730,7 +728,6 @@ export default {
}
}
});
console
.
log
(
nodeArr
,
linkArr
);
this
.
$refs
.
seeksRelationGraph
.
appendJsonData
(
{
nodes
:
nodeArr
,
...
...
@@ -785,6 +782,7 @@ export default {
*/
deleLinkAll
(
id
)
{
let
lines
=
this
.
$refs
.
seeksRelationGraph
.
getLines
();
let
getGraphJsonData
=
this
.
$refs
.
seeksRelationGraph
.
getGraphJsonData
();
this
.
linkAll
=
[];
lines
.
forEach
((
e
)
=>
{
if
(
e
.
relations
.
length
==
1
)
{
...
...
@@ -797,15 +795,26 @@ export default {
to
:
e
.
toNode
.
id
,
});
}
else
if
(
e
.
relations
.
length
>
1
)
{
e
.
relations
.
forEach
((
j
)
=>
{
this
.
linkAll
.
push
({
color
:
"#1789DB"
,
fontColor
:
"#000"
,
from
:
e
.
fromNode
.
id
,
isHide
:
false
,
text
:
j
.
text
,
to
:
e
.
toNode
.
id
,
});
e
.
relations
.
forEach
((
j
,
index
)
=>
{
if
(
index
==
0
)
{
this
.
linkAll
.
push
({
color
:
"#1789DB"
,
fontColor
:
"#000"
,
from
:
e
.
fromNode
.
id
,
isHide
:
false
,
text
:
j
.
text
,
to
:
e
.
toNode
.
id
,
});
}
else
{
this
.
linkAll
.
push
({
color
:
"#1789DB"
,
fontColor
:
"#000"
,
from
:
e
.
toNode
.
id
,
isHide
:
false
,
text
:
j
.
text
,
to
:
e
.
fromNode
.
id
,
});
}
});
}
});
...
...
src/components/ptCxForm_components.vue
View file @
8a548ab9
...
...
@@ -913,7 +913,7 @@ export default {
});
self.excelHeader = this.$route.meta.title;
if (this.cxUrl == "/api/ksh/getHdList") {
postJson(this.cxUrl,
JSON.stringify(json)
).then((res) => {
postJson(this.cxUrl,
json
).then((res) => {
if (res.code === 200) {
require.ensure([], () => {
const {
...
...
src/setting.js
View file @
8a548ab9
/*
* @Author: your name
* @Date: 2021-06-20 11:48:40
* @LastEditTime: 2021-10-1
1 14:17:49
* @LastEditTime: 2021-10-1
4 11:36:56
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \control_platform\src\settings.js
...
...
@@ -22,5 +22,5 @@ module.exports = {
// 湖南可视化
BaseURL3
:
"/hnapi"
,
// 打包方式阿里云(aly) 和 公安网(gaw)
packType
:
'
gaw
'
packType
:
'
aly
'
}
src/utils/gxt.js
0 → 100644
View file @
8a548ab9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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