Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
K
knowledgeServiceAdmin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
quanlili
knowledgeServiceAdmin
Commits
9b1df1dd
提交
9b1df1dd
authored
12月 04, 2019
作者:
王腾飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1204
上级
1caebe17
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
146 行增加
和
49 行删除
+146
-49
storagemodule.js
src/api/storagemodule.js
+8
-0
character.vue
src/views/storagemodule/namedentity/character.vue
+138
-49
没有找到文件。
src/api/storagemodule.js
浏览文件 @
9b1df1dd
...
@@ -144,3 +144,11 @@ export function updateDateAttrAPI(data) { //修改(新增)实体自定义属
...
@@ -144,3 +144,11 @@ export function updateDateAttrAPI(data) { //修改(新增)实体自定义属
data
data
})
})
}
}
export
function
deleteEchartsEntityAPI
(
data
)
{
//实体关系图中删除(批量删除)实体
return
request
({
url
:
`
${
requestPath
.
common
}
/relation/batch/delete`
,
method
:
'post'
,
data
})
}
src/views/storagemodule/namedentity/character.vue
浏览文件 @
9b1df1dd
...
@@ -179,6 +179,7 @@
...
@@ -179,6 +179,7 @@
<h2
v-else-if=
"entityTypeFlag == 3"
>
>地点实体关系
</h2>
<h2
v-else-if=
"entityTypeFlag == 3"
>
>地点实体关系
</h2>
<h2
v-else-if=
"entityTypeFlag == 2"
>
>组织机构实体关系
</h2>
<h2
v-else-if=
"entityTypeFlag == 2"
>
>组织机构实体关系
</h2>
<h2
v-else
>
>时间实体关系
</h2>
<h2
v-else
>
>时间实体关系
</h2>
<el-button
@
click=
"showDelEntityMark"
icon=
"el-icon-delete"
size=
"mini"
type=
"primary"
style=
"position:absolute; right:0; top:71px"
>
删除实体
</el-button>
<div>
<div>
<div
id=
"relationChart"
style=
"width:100%; height:100%;"
></div>
<div
id=
"relationChart"
style=
"width:100%; height:100%;"
></div>
</div>
</div>
...
@@ -193,6 +194,21 @@
...
@@ -193,6 +194,21 @@
</div>
</div>
</section>
</section>
</div>
</div>
<el-dialog
title=
"删除实体"
:visible
.
sync=
"dialogFormVisible3"
@
close=
"closeDiaThr"
>
<template>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</el-checkbox>
<div
style=
"margin: 15px 0;"
></div>
<el-checkbox-group
v-model=
"checkedCities"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
v-for=
"(item, key) in cities"
:label=
"item.id"
:key=
"key"
>
{{
item
.
brelationword
}}
</el-checkbox>
</el-checkbox-group>
</
template
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible3 = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"deleteItems"
>
确 定
</el-button>
</div>
</el-dialog>
<h2
id=
"moduleId6"
>
>相关人物
</h2>
<h2
id=
"moduleId6"
>
>相关人物
</h2>
<div
class=
"relateCharacer"
>
<div
class=
"relateCharacer"
>
<section
v-for=
"(item, key) in relatePeopleData"
:key=
"key"
>
<section
v-for=
"(item, key) in relatePeopleData"
:key=
"key"
>
...
@@ -352,6 +368,7 @@
...
@@ -352,6 +368,7 @@
<
script
>
<
script
>
import
{
debounce
}
from
'@/utils'
import
{
debounce
}
from
'@/utils'
import
echarts
from
'echarts'
import
echarts
from
'echarts'
import
{
operationMsg
,
confirm
}
from
'@/utils/publicFunctions'
import
{
import
{
characterDetailAPI
,
characterDetailAPI
,
relateCharacterAPI
,
relateCharacterAPI
,
...
@@ -364,6 +381,7 @@ import {
...
@@ -364,6 +381,7 @@ import {
organDetailAPI
,
organDetailAPI
,
timerDetailAPI
,
timerDetailAPI
,
updateDateAttrAPI
,
updateDateAttrAPI
,
deleteEchartsEntityAPI
}
from
'@/api/storagemodule'
}
from
'@/api/storagemodule'
var
size
=
50
;
//节点大小
var
size
=
50
;
//节点大小
// var listdata = []; //节点数组
// var listdata = []; //节点数组
...
@@ -371,35 +389,35 @@ var size = 50; //节点大小
...
@@ -371,35 +389,35 @@ var size = 50; //节点大小
//1 :为人物 2:组织机构 3: 地址 4:时间
//1 :为人物 2:组织机构 3: 地址 4:时间
// var legendes = ["人物", "组织机构",'地址','时间', "对象"];
// var legendes = ["人物", "组织机构",'地址','时间', "对象"];
let
relateOptaion
=
{
let
relateOptaion
=
{
title
:
{
title
:
{
//标题
text
:
""
,
text
:
""
,
top
:
"top"
,
top
:
"top"
,
left
:
"left"
,
left
:
"left"
,
textStyle
:
{
textStyle
:
{
color
:
'#000000'
color
:
'#000000'
}
}
},
},
tooltip
:
{
tooltip
:
{
},
},
animationDuration
:
1500
,
animationDuration
:
1500
,
animationEasingUpdate
:
'quinticInOut'
,
animationEasingUpdate
:
'quinticInOut'
,
toolbox
:
{
toolbox
:
{
//还原和下载
show
:
false
,
show
:
false
,
feature
:
{
feature
:
{
restore
:
{
restore
:
{
show
:
true
show
:
true
},
},
magicType
:
{
magicType
:
{
show
:
true
,
show
:
true
,
type
:
[
'force'
,
'chord'
]
type
:
[
'force'
,
'chord'
]
},
},
saveAsImage
:
{
saveAsImage
:
{
show
:
true
show
:
true
}
}
}
}
},
},
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
legend
:
{
legend
:
{
//图例
data
:
[
"对象"
,
"人物"
,
"组织机构"
,
'地址'
,
'时间'
,],
data
:
[
"对象"
,
"人物"
,
"组织机构"
,
'地址'
,
'时间'
,],
textStyle
:
{
textStyle
:
{
color
:
'#000000'
color
:
'#000000'
...
@@ -440,9 +458,9 @@ let relateOptaion={
...
@@ -440,9 +458,9 @@ let relateOptaion={
focusNodeAdjacency
:
true
,
//是否在鼠标移到节点上的时候突出显示节点以及节点的边和邻接节点。
focusNodeAdjacency
:
true
,
//是否在鼠标移到节点上的时候突出显示节点以及节点的边和邻接节点。
lineStyle
:
{
lineStyle
:
{
normal
:
{
normal
:
{
// text: relarr[i],
// text: relarr[i],
//color: 'source'
//color: 'source'
color
:
'#DCDFE6'
color
:
'#DCDFE6'
}
}
},
},
label
:
{
label
:
{
...
@@ -450,9 +468,9 @@ let relateOptaion={
...
@@ -450,9 +468,9 @@ let relateOptaion={
show
:
true
,
show
:
true
,
position
:
'inside'
,
position
:
'inside'
,
textStyle
:
{
//标签的字体样式
textStyle
:
{
//标签的字体样式
color
:
'#fff'
,
//字体颜色
color
:
'#fff'
,
//字体颜色
fontWeight
:
'normal'
,
//'normal'标准'bold'粗的'bolder'更粗的'lighter'更细的或100 | 200 | 300 | 400...
fontWeight
:
'normal'
,
//'normal'标准'bold'粗的'bolder'更粗的'lighter'更细的或100 | 200 | 300 | 400...
fontSize
:
"12"
//字体大小
fontSize
:
"12"
//字体大小
},
},
formatter
:
function
(
params
)
{
formatter
:
function
(
params
)
{
return
params
.
data
.
showName
//此处为label转换 并转换颜色
return
params
.
data
.
showName
//此处为label转换 并转换颜色
...
@@ -462,22 +480,30 @@ let relateOptaion={
...
@@ -462,22 +480,30 @@ let relateOptaion={
}
}
},
},
edgeLabel
:
{
edgeLabel
:
{
normal
:
{
normal
:
{
show
:
true
,
show
:
true
,
textStyle
:
{
textStyle
:
{
fontSize
:
12
fontSize
:
12
},
},
formatter
:
"{c}"
formatter
:
"{c}"
}
}
}
}
}],
}],
//#c23531#91c7ae#4592ff
//#c23531#91c7ae#4592ff
color
:
[
'#c23531'
,
'#91c7ae'
,
'#4592ff'
,
'#f8b829'
,
'#26f0a5'
]
//自定义调色板
color
:
[
'#c23531'
,
'#91c7ae'
,
'#4592ff'
,
'#f8b829'
,
'#26f0a5'
]
//自定义调色板
};
};
//const cityOptions = ['上海', '北京', '广州', '深圳'];
export
default
{
export
default
{
name
:
'character'
,
name
:
'character'
,
data
()
{
data
()
{
return
{
return
{
checkAll
:
false
,
checkedCities
:
[],
cities
:
[],
isIndeterminate
:
true
,
deleteEntityform
:
{
id
:
[]
},
options1
:
[{
options1
:
[{
value
:
'选项1'
,
value
:
'选项1'
,
label
:
'黄金糕1'
label
:
'黄金糕1'
...
@@ -520,6 +546,7 @@ export default {
...
@@ -520,6 +546,7 @@ export default {
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
dialogFormVisible1
:
false
,
dialogFormVisible1
:
false
,
dialogFormVisible2
:
false
,
dialogFormVisible2
:
false
,
dialogFormVisible3
:
false
,
formLabelWidth
:
'82px'
,
formLabelWidth
:
'82px'
,
dynamicValidateForm
:
{
dynamicValidateForm
:
{
domains
:
[{
domains
:
[{
...
@@ -637,6 +664,7 @@ export default {
...
@@ -637,6 +664,7 @@ export default {
localtionDetailAPI
(
this
.
entityId
)
localtionDetailAPI
(
this
.
entityId
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
if
(
res
.
data
.
code
===
0
)
{
console
.
log
(
this
.
entityId
,
'12311'
)
_this
.
characterDetailData
=
res
.
data
.
data
;
_this
.
characterDetailData
=
res
.
data
.
data
;
_this
.
filedJosnArr
=
JSON
.
parse
(
res
.
data
.
data
.
fieldJson
)
||
[];
_this
.
filedJosnArr
=
JSON
.
parse
(
res
.
data
.
data
.
fieldJson
)
||
[];
_this
.
peopleName
=
res
.
data
.
data
.
keyword
;
_this
.
peopleName
=
res
.
data
.
data
.
keyword
;
...
@@ -858,6 +886,7 @@ export default {
...
@@ -858,6 +886,7 @@ export default {
//{name: "工程建设情况", showName: "工程建设情况", symbolSize: 50, category: 0},
//{name: "工程建设情况", showName: "工程建设情况", symbolSize: 50, category: 0},
if
(
res
.
data
.
code
===
0
){
if
(
res
.
data
.
code
===
0
){
let
resData
=
res
.
data
.
data
;
let
resData
=
res
.
data
.
data
;
this
.
cities
=
res
.
data
.
data
;
if
(
resData
.
length
!=
0
)
{
if
(
resData
.
length
!=
0
)
{
let
data
=
[
let
data
=
[
{
{
...
@@ -865,7 +894,8 @@ export default {
...
@@ -865,7 +894,8 @@ export default {
showName
:
resData
[
0
][
'relationword'
],
showName
:
resData
[
0
][
'relationword'
],
category
:
0
,
category
:
0
,
entityTypeFlag
:
resData
[
0
].
state
,
entityTypeFlag
:
resData
[
0
].
state
,
entityId
:
resData
[
0
].
bripid
entityId
:
resData
[
0
].
rtpid
,
dataType
:
'node'
}
}
];
];
let
links
=
[];
let
links
=
[];
...
@@ -876,9 +906,10 @@ export default {
...
@@ -876,9 +906,10 @@ export default {
showName
:
list
.
brelationword
,
showName
:
list
.
brelationword
,
category
:
state
,
category
:
state
,
entityTypeFlag
:
list
.
state
,
entityTypeFlag
:
list
.
state
,
entityId
:
list
.
bripid
entityId
:
list
.
bripid
,
dataType
:
'node'
})
})
links
.
push
({
source
:
resData
[
0
][
'relationword'
],
target
:
list
.
brelationword
,
value
:
list
.
relation
})
links
.
push
({
source
:
resData
[
0
][
'relationword'
],
target
:
list
.
brelationword
,
value
:
list
.
relation
,
dataType
:
'link'
})
})
})
relateOptaion
.
series
[
0
][
'data'
]
=
data
;
relateOptaion
.
series
[
0
][
'data'
]
=
data
;
relateOptaion
.
series
[
0
][
'links'
]
=
links
;
relateOptaion
.
series
[
0
][
'links'
]
=
links
;
...
@@ -914,18 +945,27 @@ export default {
...
@@ -914,18 +945,27 @@ export default {
var
_this
=
this
;
var
_this
=
this
;
this
.
relationChart
.
on
(
'click'
,
function
(
params
)
{
this
.
relationChart
.
on
(
'click'
,
function
(
params
)
{
console
.
log
(
params
.
data
,
"小红真美"
)
//获取点击的头像的数据信息
console
.
log
(
params
.
data
,
"小红真美"
)
//获取点击的头像的数据信息
window
.
scrollTo
(
0
,
0
)
if
(
params
.
data
.
dataType
==
'node'
)
{
_this
.
entityTypeFlag
=
params
.
data
.
entityTypeFlag
;
window
.
scrollTo
(
0
,
0
)
_this
.
entityId
=
params
.
data
.
entityId
;
_this
.
entityTypeFlag
=
params
.
data
.
entityTypeFlag
;
_this
.
peopleName
=
params
.
data
.
name
;
_this
.
entityId
=
params
.
data
.
entityId
;
_this
.
getDetailAPI
();
_this
.
peopleName
=
params
.
data
.
name
;
_this
.
getRelateCharacterAPI
();
console
.
log
(
_this
.
entityId
,
'6666'
)
_this
.
getRelateOrganAPI
();
_this
.
getDetailAPI
();
_this
.
getRelateAreaAPI
();
_this
.
getRelateCharacterAPI
();
_this
.
getRelateResourceListAPI
();
_this
.
getRelateOrganAPI
();
_this
.
getKeyWordsRelation
();
_this
.
getRelateAreaAPI
();
_this
.
drawLine
();
_this
.
getRelateResourceListAPI
();
_this
.
getKeyWordsRelation
();
_this
.
drawLine
();
}
else
{
_this
.
dialogFormVisible2
=
true
;
}
});
});
// document.oncontextmenu = function () { return false; };
// this.relationChart.on('contextmenu', function(params) {
// alert(11111)
// })
},
},
addNewDataAttr
()
{
addNewDataAttr
()
{
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
...
@@ -986,6 +1026,54 @@ export default {
...
@@ -986,6 +1026,54 @@ export default {
sureSetting
()
{
sureSetting
()
{
this
.
dialogFormVisible1
=
false
this
.
dialogFormVisible1
=
false
this
.
dialogFormVisible2
=
true
this
.
dialogFormVisible2
=
true
},
showDelEntityMark
()
{
this
.
dialogFormVisible3
=
true
},
handleCheckAllChange
(
val
)
{
var
_this
=
this
;
if
(
val
===
true
)
{
this
.
cities
.
map
((
item
,
index
)
=>
{
_this
.
checkedCities
.
push
(
item
.
id
);
_this
.
deleteEntityform
.
id
.
push
(
item
.
id
)
console
.
log
(
_this
.
checkedCities
,
'我是所有id'
)
this
.
isIndeterminate
=
false
;
})
}
else
{
this
.
checkedCities
=
[]
this
.
isIndeterminate
=
true
;
}
//this.checkedCities = val ? this.cities : [];
},
handleCheckedCitiesChange
(
value
)
{
console
.
log
(
value
,
'666'
)
this
.
deleteEntityform
.
id
=
value
;
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
},
deleteItems
()
{
//this.dialogFormVisible3 = false
confirm
.
apply
(
this
,
[
'确认删除当前选中的实体吗?'
])
.
then
(()
=>
{
deleteEchartsEntityAPI
(
this
.
deleteEntityform
)
.
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
code
===
0
)
{
this
.
$message
.
success
(
'删除成功'
);
this
.
getKeyWordsRelation
();
this
.
dialogFormVisible3
=
false
;
}
else
{
this
.
$message
.
error
(
'删除失败'
);
}
})
})
},
closeDiaThr
()
{
this
.
checkedCities
=
[];
//this.isIndeterminate = true;//true 没有√,false有√
}
}
}
}
}
}
...
@@ -1104,6 +1192,7 @@ export default {
...
@@ -1104,6 +1192,7 @@ export default {
flex:1;
flex:1;
&:nth-of-type(1) {
&:nth-of-type(1) {
margin-right:24px;
margin-right:24px;
position:relative;
}
}
&:nth-of-type(2) {
&:nth-of-type(2) {
margin-left:24px;
margin-left:24px;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论