Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
石磊
/
cihai
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 141e41db
authored
Jan 29, 2018
by
侯昆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加图片
1 parent
b67e47e8
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1041 additions
and
117 deletions
serverside/cihai-app/src/main/java/com/dookay/cihai/app/controller/vo/OneWayRelateVO.java
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/include/header.jsp
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/character_paraph.jsp
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/relate.jsp
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/statement_baike.jsp
serverside/cihai-app/src/main/webapp/static/baike.html
serverside/cihai-app/src/main/webapp/static/css/vendor.css
serverside/cihai-app/src/main/webapp/static/index.html
serverside/cihai-core/src/main/java/com/dookay/cihai/core/word/dto/WordDTO.java
serverside/cihai-app/src/main/java/com/dookay/cihai/app/controller/vo/OneWayRelateVO.java
View file @
141e41d
...
@@ -17,9 +17,12 @@ package com.dookay.cihai.app.controller.vo;
...
@@ -17,9 +17,12 @@ package com.dookay.cihai.app.controller.vo;
import
com.dookay.cihai.core.word.domain.RelationOneWayDomain
;
import
com.dookay.cihai.core.word.domain.RelationOneWayDomain
;
import
com.dookay.cihai.core.word.domain.WordDomain
;
import
com.dookay.cihai.core.word.domain.WordDomain
;
import
com.dookay.coral.common.core.utils.lang.CollectionUtils
;
import
com.dookay.coral.common.core.utils.lang.CollectionUtils
;
import
io.swagger.models.auth.In
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.tuple.MutableTriple
;
import
java.util.HashMap
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -34,7 +37,7 @@ import java.util.stream.Collectors;
...
@@ -34,7 +37,7 @@ import java.util.stream.Collectors;
public
class
OneWayRelateVO
{
public
class
OneWayRelateVO
{
private
String
word
;
private
String
word
;
private
Map
<
String
,
List
<
WordDomain
>>
relationByGroup
;
private
List
<
MutableTriple
<
Integer
,
String
,
List
<
WordDomain
>
>>
relationByGroup
;
public
static
OneWayRelateVO
fromDomain
(
WordDomain
word
,
List
<
RelationOneWayDomain
>
relations
,
List
<
WordDomain
>
relatedWords
)
{
public
static
OneWayRelateVO
fromDomain
(
WordDomain
word
,
List
<
RelationOneWayDomain
>
relations
,
List
<
WordDomain
>
relatedWords
)
{
OneWayRelateVO
vo
=
new
OneWayRelateVO
();
OneWayRelateVO
vo
=
new
OneWayRelateVO
();
...
@@ -42,13 +45,18 @@ public class OneWayRelateVO {
...
@@ -42,13 +45,18 @@ public class OneWayRelateVO {
if
(
CollectionUtils
.
isNotEmpty
(
relatedWords
)
&&
if
(
CollectionUtils
.
isNotEmpty
(
relatedWords
)
&&
CollectionUtils
.
isNotEmpty
(
relations
))
{
CollectionUtils
.
isNotEmpty
(
relations
))
{
Map
<
String
,
List
<
RelationOneWayDomain
>>
map
=
relations
.
stream
().
collect
(
Collectors
.
groupingBy
(
RelationOneWayDomain:
:
getGroupName
));
Map
<
String
,
List
<
RelationOneWayDomain
>>
map
=
relations
.
stream
().
collect
(
Collectors
.
groupingBy
(
RelationOneWayDomain:
:
getGroupName
));
HashMap
<
String
,
List
<
WordDomain
>>
relationByGroup
=
new
HashMap
<>(
map
.
size
()
);
List
<
MutableTriple
<
Integer
,
String
,
List
<
WordDomain
>>>
relationByGroup
=
new
ArrayList
<>(
);
for
(
Map
.
Entry
<
String
,
List
<
RelationOneWayDomain
>>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
RelationOneWayDomain
>>
entry
:
map
.
entrySet
())
{
List
<
Long
>
relatedIds
=
entry
.
getValue
().
stream
().
map
(
RelationOneWayDomain:
:
getRelateWordId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
relatedIds
=
entry
.
getValue
().
stream
().
map
(
RelationOneWayDomain:
:
getRelateWordId
).
collect
(
Collectors
.
toList
());
List
<
WordDomain
>
words
=
relatedWords
.
stream
().
filter
(
w
->
relatedIds
.
contains
(
w
.
getId
())).
collect
(
Collectors
.
toList
());
List
<
WordDomain
>
words
=
relatedWords
.
stream
().
filter
(
w
->
relatedIds
.
contains
(
w
.
getId
())).
collect
(
Collectors
.
toList
());
relationByGroup
.
put
(
entry
.
getKey
(),
words
);
MutableTriple
<
Integer
,
String
,
List
<
WordDomain
>>
triple
=
new
MutableTriple
<>();
triple
.
setLeft
(
entry
.
getValue
().
get
(
0
).
getGroupRank
());
triple
.
setMiddle
(
entry
.
getKey
());
triple
.
setRight
(
words
);
relationByGroup
.
add
(
triple
);
}
}
vo
.
setRelationByGroup
(
relationByGroup
);
List
<
MutableTriple
<
Integer
,
String
,
List
<
WordDomain
>>>
sorted
=
relationByGroup
.
stream
().
sorted
(
Comparator
.
comparing
(
MutableTriple:
:
getLeft
)).
collect
(
Collectors
.
toList
());
vo
.
setRelationByGroup
(
sorted
);
}
}
return
vo
;
return
vo
;
}
}
...
...
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/include/header.jsp
View file @
141e41d
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
<script
src=
"${ctx}/static/js/plugins/jquery.min.js"
></script>
<script
src=
"${ctx}/static/js/plugins/jquery.min.js"
></script>
<script
src=
"${ctx}/static/js/vendor.js"
merge=
"true"
></script>
<script
src=
"${ctx}/static/js/vendor.js"
merge=
"true"
></script>
<script>
<script>
$
(
'.js-collapse'
).
each
(
function
()
{
$
(
'.js-collapse'
).
each
(
function
()
{
var
$this
=
$
(
this
);
var
$this
=
$
(
this
);
$
(
$this
.
attr
(
'href'
)).
on
(
'show.bs.collapse'
,
function
()
{
$
(
$this
.
attr
(
'href'
)).
on
(
'show.bs.collapse'
,
function
()
{
$
(
$this
.
siblings
().
attr
(
'href'
)).
collapse
(
'hide'
);
$
(
$this
.
siblings
().
attr
(
'href'
)).
collapse
(
'hide'
);
});
});
});
});
...
...
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/character_paraph.jsp
View file @
141e41d
...
@@ -13,7 +13,16 @@
...
@@ -13,7 +13,16 @@
<div class="wrapper-ipad-app-h5">
<div class="wrapper-ipad-app-h5">
<div class="header-main-1 clearfix">
<div class="header-main-1 clearfix">
<div class="header-main-left">
<div class="header-main-left">
<c:choose>
<c:when test="${vo.word eq '象'}">
<h1>
<span class="bg-xiang">象</span>
</h1>
</c:when>
<c:otherwise>
<h1>${vo.word}</h1>
<h1>${vo.word}</h1>
</c:otherwise>
</c:choose>
<c:if test="${vo.word eq '象'}">
<c:if test="${vo.word eq '象'}">
<div class="header-main-word-dropdown clearfix">
<div class="header-main-word-dropdown clearfix">
<a class="btn btn-sm btn-link dropdown-toggle collapsed js-collapse" href="#header-main-collapse-1" data-toggle="collapse">字源</a>
<a class="btn btn-sm btn-link dropdown-toggle collapsed js-collapse" href="#header-main-collapse-1" data-toggle="collapse">字源</a>
...
...
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/relate.jsp
View file @
141e41d
...
@@ -106,8 +106,8 @@
...
@@ -106,8 +106,8 @@
</c:choose>
</c:choose>
<c:forEach
items=
"${vo.relationByGroup}"
var=
"item"
>
<c:forEach
items=
"${vo.relationByGroup}"
var=
"item"
>
<div
class=
"list-group"
>
<div
class=
"list-group"
>
<span
class=
"list-group-item list-group-item-header"
>
${item.
key
}
</span>
<span
class=
"list-group-item list-group-item-header"
>
${item.
middle
}
</span>
<c:forEach
items=
"${item.
value
}"
var=
"w"
>
<c:forEach
items=
"${item.
right
}"
var=
"w"
>
<a
class=
"list-group-item"
href=
"/word/info/${w.id}"
>
${w.word}
</a>
<a
class=
"list-group-item"
href=
"/word/info/${w.id}"
>
${w.word}
</a>
</c:forEach>
</c:forEach>
</div>
</div>
...
...
serverside/cihai-app/src/main/webapp/WEB-INF/jsp/word/statement_baike.jsp
View file @
141e41d
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<div class="word-read pt-0">
<div class="word-read pt-0">
<c:choose>
<c:choose>
<c:when test="${vo.word eq '中华人民共和国'}">
<c:when test="${vo.word eq '中华人民共和国'}">
<span>【Zhōnghuá
Rénmín
Gònghéguó】</span>
<span>【Zhōnghuá
Rénmín
Gònghéguó】</span>
<a class="link js-play-voice" href="javascript:;">
<a class="link js-play-voice" href="javascript:;">
<i class="icon icon-shengyin"></i>
<i class="icon icon-shengyin"></i>
</a>
</a>
...
@@ -663,19 +663,47 @@
...
@@ -663,19 +663,47 @@
<c:if test="${vo.word eq '心脏'}">
<c:if test="${vo.word eq '心脏'}">
<script>
<script>
$(function () {
$(function () {
// 图谱
// 图谱
var nodeDatas = [{
var nodeDatas = [{
atlasNodes: [{
atlasNodes: [{
id: 2,
id: 2,
label: '心脏'
label: '心脏',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
},
{
{
id: 3,
id: 3,
label: '心内膜'
label: '心内膜',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 4,
id: 4,
label: '心肌'
label: '心肌',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 5,
id: 5,
...
@@ -723,19 +751,55 @@
...
@@ -723,19 +751,55 @@
},
},
{
{
id: 16,
id: 16,
label: '心室'
label: '心室',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 17,
id: 17,
label: '心房'
label: '心房',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 18,
id: 18,
label: '胸心血管外科学'
label: '胸心血管外科学',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 19,
id: 19,
label: '心率'
label: '心率',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 20,
id: 20,
...
@@ -899,23 +963,68 @@
...
@@ -899,23 +963,68 @@
{
{
atlasNodes: [{
atlasNodes: [{
id: 2,
id: 2,
label: '心脏'
label: '心脏',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
},
{
{
id: 3,
id: 3,
label: '心力衰竭'
label: '心力衰竭',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 4,
id: 4,
label: '心瓣膜病'
label: '心瓣膜病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 5,
id: 5,
label: '先天性心脏病'
label: '先天性心脏病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 6,
id: 6,
label: '冠心病'
label: '冠心病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 7,
id: 7,
...
@@ -927,7 +1036,16 @@
...
@@ -927,7 +1036,16 @@
},
},
{
{
id: 9,
id: 9,
label: '心脏导管检查术'
label: '心脏导管检查术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 10,
id: 10,
...
@@ -935,23 +1053,68 @@
...
@@ -935,23 +1053,68 @@
},
},
{
{
id: 11,
id: 11,
label: '心脏内直视手术'
label: '心脏内直视手术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 12,
id: 12,
label: '心脏闭合性损'
label: '心脏闭合性损',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 13,
id: 13,
label: '高血压心脏病'
label: '高血压心脏病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 14,
id: 14,
label: '心音'
label: '心音',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 15,
id: 15,
label: '心源性猝死'
label: '心源性猝死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 16,
id: 16,
...
@@ -1103,11 +1266,29 @@
...
@@ -1103,11 +1266,29 @@
{
{
atlasNodes: [{
atlasNodes: [{
id: 2,
id: 2,
label: '冠心'
label: '冠心',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
},
{
{
id: 3,
id: 3,
label: '冠状动脉搭桥术'
label: '冠状动脉搭桥术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 4,
id: 4,
...
@@ -1119,27 +1300,81 @@
...
@@ -1119,27 +1300,81 @@
},
},
{
{
id: 6,
id: 6,
label: '微创心脏外科手术'
label: '微创心脏外科手术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 7,
id: 7,
label: '心绞痛'
label: '心绞痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 8,
id: 8,
label: '心律失常'
label: '心律失常',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 9,
id: 9,
label: '急性冠状动脉综合征'
label: '急性冠状动脉综合征',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 10,
id: 10,
label: '心肌衰竭'
label: '心肌衰竭',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 11,
id: 11,
label: '心源性猝死'
label: '心源性猝死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
}
],
],
atlasEdges: [{
atlasEdges: [{
...
@@ -1188,23 +1423,68 @@
...
@@ -1188,23 +1423,68 @@
{
{
atlasNodes: [{
atlasNodes: [{
id: 2,
id: 2,
label: '心痛'
label: '心痛',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
},
{
{
id: 3,
id: 3,
label: '真心痛'
label: '真心痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 4,
id: 4,
label: '抗心痛药'
label: '抗心痛药',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 5,
id: 5,
label: '天王补心丹'
label: '天王补心丹',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 15,
id: 15,
label: '麝香保心丸'
label: '麝香保心丸',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 6,
id: 6,
...
@@ -1224,19 +1504,55 @@
...
@@ -1224,19 +1504,55 @@
},
},
{
{
id: 11,
id: 11,
label: '虫痛'
label: '虫痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 12,
id: 12,
label: '心绞痛'
label: '心绞痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 13,
id: 13,
label: '心肌梗死'
label: '心肌梗死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 14,
id: 14,
label: '胃痛'
label: '胃痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
}
],
],
atlasEdges: [{
atlasEdges: [{
...
@@ -1292,11 +1608,29 @@
...
@@ -1292,11 +1608,29 @@
{
{
atlasNodes: [{
atlasNodes: [{
id: 2,
id: 2,
label: '心'
label: '心',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
},
{
{
id: 3,
id: 3,
label: '心律不齐'
label: '心律不齐',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 4,
id: 4,
...
@@ -1308,7 +1642,16 @@
...
@@ -1308,7 +1642,16 @@
},
},
{
{
id: 6,
id: 6,
label: '心动周期'
label: '心动周期',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 7,
id: 7,
...
@@ -1316,7 +1659,16 @@
...
@@ -1316,7 +1659,16 @@
},
},
{
{
id: 8,
id: 8,
label: '心电图'
label: '心电图',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 9,
id: 9,
...
@@ -1324,7 +1676,16 @@
...
@@ -1324,7 +1676,16 @@
},
},
{
{
id: 10,
id: 10,
label: '窦性心律'
label: '窦性心律',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 11,
id: 11,
...
@@ -1372,43 +1733,133 @@
...
@@ -1372,43 +1733,133 @@
{
{
atlasNodes: [{
atlasNodes: [{
id: 2,
id: 2,
label: '心病'
label: '心病',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
},
{
{
id: 3,
id: 3,
label: '热入心包'
label: '热入心包',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 4,
id: 4,
label: '水气凌心'
label: '水气凌心',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 5,
id: 5,
label: '心血虚'
label: '心血虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 6,
id: 6,
label: '心心血淤'
label: '心心血淤',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 7,
id: 7,
label: '怔忡'
label: '怔忡',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 8,
id: 8,
label: '心悸'
label: '心悸',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 9,
id: 9,
label: '心阳虚'
label: '心阳虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 10,
id: 10,
label: '心阴虚'
label: '心阴虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
},
{
{
id: 11,
id: 11,
label: '盗汗'
label: '盗汗',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
}
],
],
atlasEdges: [{
atlasEdges: [{
...
@@ -1450,7 +1901,7 @@
...
@@ -1450,7 +1901,7 @@
]
]
}
}
];
];
// 图谱
function draw(atlasData, index) {
function draw(atlasData, index) {
var container = document.getElementById('atlas-' + index);
var container = document.getElementById('atlas-' + index);
var data = {
var data = {
...
...
serverside/cihai-app/src/main/webapp/static/baike.html
View file @
141e41d
...
@@ -340,15 +340,42 @@
...
@@ -340,15 +340,42 @@
var
nodeDatas
=
[{
var
nodeDatas
=
[{
atlasNodes
:
[{
atlasNodes
:
[{
id
:
2
,
id
:
2
,
label
:
'心脏'
label
:
'心脏'
,
size
:
50
,
color
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
,
highlight
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
}
}
},
},
{
{
id
:
3
,
id
:
3
,
label
:
'心内膜'
label
:
'心内膜'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
4
,
id
:
4
,
label
:
'心肌'
label
:
'心肌'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
5
,
id
:
5
,
...
@@ -396,19 +423,55 @@
...
@@ -396,19 +423,55 @@
},
},
{
{
id
:
16
,
id
:
16
,
label
:
'心室'
label
:
'心室'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
17
,
id
:
17
,
label
:
'心房'
label
:
'心房'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
18
,
id
:
18
,
label
:
'胸心血管外科学'
label
:
'胸心血管外科学'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
19
,
id
:
19
,
label
:
'心率'
label
:
'心率'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
20
,
id
:
20
,
...
@@ -572,23 +635,68 @@
...
@@ -572,23 +635,68 @@
{
{
atlasNodes
:
[{
atlasNodes
:
[{
id
:
2
,
id
:
2
,
label
:
'心脏'
label
:
'心脏'
,
size
:
50
,
color
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
,
highlight
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
}
}
},
},
{
{
id
:
3
,
id
:
3
,
label
:
'心力衰竭'
label
:
'心力衰竭'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
4
,
id
:
4
,
label
:
'心瓣膜病'
label
:
'心瓣膜病'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
5
,
id
:
5
,
label
:
'先天性心脏病'
label
:
'先天性心脏病'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
6
,
id
:
6
,
label
:
'冠心病'
label
:
'冠心病'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
7
,
id
:
7
,
...
@@ -600,7 +708,16 @@
...
@@ -600,7 +708,16 @@
},
},
{
{
id
:
9
,
id
:
9
,
label
:
'心脏导管检查术'
label
:
'心脏导管检查术'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
10
,
id
:
10
,
...
@@ -608,23 +725,68 @@
...
@@ -608,23 +725,68 @@
},
},
{
{
id
:
11
,
id
:
11
,
label
:
'心脏内直视手术'
label
:
'心脏内直视手术'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
12
,
id
:
12
,
label
:
'心脏闭合性损'
label
:
'心脏闭合性损'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
13
,
id
:
13
,
label
:
'高血压心脏病'
label
:
'高血压心脏病'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
14
,
id
:
14
,
label
:
'心音'
label
:
'心音'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
15
,
id
:
15
,
label
:
'心源性猝死'
label
:
'心源性猝死'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
16
,
id
:
16
,
...
@@ -776,11 +938,29 @@
...
@@ -776,11 +938,29 @@
{
{
atlasNodes
:
[{
atlasNodes
:
[{
id
:
2
,
id
:
2
,
label
:
'冠心'
label
:
'冠心'
,
size
:
50
,
color
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
,
highlight
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
}
}
},
},
{
{
id
:
3
,
id
:
3
,
label
:
'冠状动脉搭桥术'
label
:
'冠状动脉搭桥术'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
4
,
id
:
4
,
...
@@ -792,27 +972,81 @@
...
@@ -792,27 +972,81 @@
},
},
{
{
id
:
6
,
id
:
6
,
label
:
'微创心脏外科手术'
label
:
'微创心脏外科手术'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
7
,
id
:
7
,
label
:
'心绞痛'
label
:
'心绞痛'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
8
,
id
:
8
,
label
:
'心律失常'
label
:
'心律失常'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
9
,
id
:
9
,
label
:
'急性冠状动脉综合征'
label
:
'急性冠状动脉综合征'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
10
,
id
:
10
,
label
:
'心肌衰竭'
label
:
'心肌衰竭'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
11
,
id
:
11
,
label
:
'心源性猝死'
label
:
'心源性猝死'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
}
}
],
],
atlasEdges
:
[{
atlasEdges
:
[{
...
@@ -861,23 +1095,68 @@
...
@@ -861,23 +1095,68 @@
{
{
atlasNodes
:
[{
atlasNodes
:
[{
id
:
2
,
id
:
2
,
label
:
'心痛'
label
:
'心痛'
,
size
:
50
,
color
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
,
highlight
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
}
}
},
},
{
{
id
:
3
,
id
:
3
,
label
:
'真心痛'
label
:
'真心痛'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
4
,
id
:
4
,
label
:
'抗心痛药'
label
:
'抗心痛药'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
5
,
id
:
5
,
label
:
'天王补心丹'
label
:
'天王补心丹'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
15
,
id
:
15
,
label
:
'麝香保心丸'
label
:
'麝香保心丸'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
6
,
id
:
6
,
...
@@ -897,19 +1176,55 @@
...
@@ -897,19 +1176,55 @@
},
},
{
{
id
:
11
,
id
:
11
,
label
:
'虫痛'
label
:
'虫痛'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
12
,
id
:
12
,
label
:
'心绞痛'
label
:
'心绞痛'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
13
,
id
:
13
,
label
:
'心肌梗死'
label
:
'心肌梗死'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
14
,
id
:
14
,
label
:
'胃痛'
label
:
'胃痛'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
}
}
],
],
atlasEdges
:
[{
atlasEdges
:
[{
...
@@ -965,11 +1280,29 @@
...
@@ -965,11 +1280,29 @@
{
{
atlasNodes
:
[{
atlasNodes
:
[{
id
:
2
,
id
:
2
,
label
:
'心'
label
:
'心'
,
size
:
50
,
color
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
,
highlight
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
}
}
},
},
{
{
id
:
3
,
id
:
3
,
label
:
'心律不齐'
label
:
'心律不齐'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
4
,
id
:
4
,
...
@@ -981,7 +1314,16 @@
...
@@ -981,7 +1314,16 @@
},
},
{
{
id
:
6
,
id
:
6
,
label
:
'心动周期'
label
:
'心动周期'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
7
,
id
:
7
,
...
@@ -989,7 +1331,16 @@
...
@@ -989,7 +1331,16 @@
},
},
{
{
id
:
8
,
id
:
8
,
label
:
'心电图'
label
:
'心电图'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
9
,
id
:
9
,
...
@@ -997,7 +1348,16 @@
...
@@ -997,7 +1348,16 @@
},
},
{
{
id
:
10
,
id
:
10
,
label
:
'窦性心律'
label
:
'窦性心律'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
11
,
id
:
11
,
...
@@ -1045,43 +1405,133 @@
...
@@ -1045,43 +1405,133 @@
{
{
atlasNodes
:
[{
atlasNodes
:
[{
id
:
2
,
id
:
2
,
label
:
'心病'
label
:
'心病'
,
size
:
50
,
color
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
,
highlight
:
{
border
:
'#187bb2'
,
background
:
'#187bb2'
}
}
},
},
{
{
id
:
3
,
id
:
3
,
label
:
'热入心包'
label
:
'热入心包'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
4
,
id
:
4
,
label
:
'水气凌心'
label
:
'水气凌心'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
5
,
id
:
5
,
label
:
'心血虚'
label
:
'心血虚'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
6
,
id
:
6
,
label
:
'心心血淤'
label
:
'心心血淤'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
7
,
id
:
7
,
label
:
'怔忡'
label
:
'怔忡'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
8
,
id
:
8
,
label
:
'心悸'
label
:
'心悸'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
9
,
id
:
9
,
label
:
'心阳虚'
label
:
'心阳虚'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
10
,
id
:
10
,
label
:
'心阴虚'
label
:
'心阴虚'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
},
},
{
{
id
:
11
,
id
:
11
,
label
:
'盗汗'
label
:
'盗汗'
,
size
:
40
,
color
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
,
highlight
:
{
border
:
'#61a0a8'
,
background
:
'#61a0a8'
}
}
}
}
],
],
atlasEdges
:
[{
atlasEdges
:
[{
...
@@ -1133,13 +1583,13 @@
...
@@ -1133,13 +1583,13 @@
var
options
=
{
var
options
=
{
nodes
:
{
nodes
:
{
shape
:
'dot'
,
shape
:
'dot'
,
borderWidth
:
2
,
size
:
25
,
color
:
{
color
:
{
border
:
'#
6faae8
'
,
border
:
'#
bda29a
'
,
background
:
'#
ecf6ff
'
,
background
:
'#
bda29a
'
,
highlight
:
{
highlight
:
{
border
:
'#
6faae8
'
,
border
:
'#
bda29a
'
,
background
:
'#
ecf6ff
'
background
:
'#
bda29a
'
}
}
},
},
font
:
{
font
:
{
...
...
serverside/cihai-app/src/main/webapp/static/css/vendor.css
View file @
141e41d
This diff could not be displayed because it is too large.
serverside/cihai-app/src/main/webapp/static/index.html
View file @
141e41d
...
@@ -11,7 +11,9 @@
...
@@ -11,7 +11,9 @@
<div
class=
"wrapper-ipad-app-h5"
>
<div
class=
"wrapper-ipad-app-h5"
>
<div
class=
"header-main-1 clearfix"
>
<div
class=
"header-main-1 clearfix"
>
<div
class=
"header-main-left"
>
<div
class=
"header-main-left"
>
<h1>
象
</h1>
<h1>
<span
class=
"bg-xiang"
>
象
</span>
</h1>
<div
class=
"header-main-word-dropdown clearfix"
>
<div
class=
"header-main-word-dropdown clearfix"
>
<a
class=
"btn btn-sm btn-link dropdown-toggle collapsed js-collapse"
href=
"#header-main-collapse-1"
data-toggle=
"collapse"
>
字源
</a>
<a
class=
"btn btn-sm btn-link dropdown-toggle collapsed js-collapse"
href=
"#header-main-collapse-1"
data-toggle=
"collapse"
>
字源
</a>
<a
class=
"btn btn-sm btn-link dropdown-toggle collapsed js-collapse"
href=
"#header-main-collapse-2"
data-toggle=
"collapse"
>
书法
</a>
<a
class=
"btn btn-sm btn-link dropdown-toggle collapsed js-collapse"
href=
"#header-main-collapse-2"
data-toggle=
"collapse"
>
书法
</a>
...
...
serverside/cihai-core/src/main/java/com/dookay/cihai/core/word/dto/WordDTO.java
View file @
141e41d
...
@@ -25,6 +25,7 @@ import com.dookay.coral.common.core.utils.lang.StringUtils;
...
@@ -25,6 +25,7 @@ import com.dookay.coral.common.core.utils.lang.StringUtils;
import
com.dookay.coral.common.web.utils.upload.model.ImageModel
;
import
com.dookay.coral.common.web.utils.upload.model.ImageModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.ArrayUtils
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
...
@@ -79,6 +80,9 @@ public class WordDTO {
...
@@ -79,6 +80,9 @@ public class WordDTO {
relationOneWayQuery
.
setWordId
(
word
.
getId
());
relationOneWayQuery
.
setWordId
(
word
.
getId
());
List
<
RelationOneWayDomain
>
relateList
=
relationOneWayService
.
getList
(
relationOneWayQuery
);
List
<
RelationOneWayDomain
>
relateList
=
relationOneWayService
.
getList
(
relationOneWayQuery
);
wordDTO
.
setHasRelated
(
CollectionUtils
.
isNotEmpty
(
relateList
));
wordDTO
.
setHasRelated
(
CollectionUtils
.
isNotEmpty
(
relateList
));
if
(
ArrayUtils
.
contains
(
new
String
[]{
"象"
,
"中国"
,
"中华人民共和国"
,
"太阳系"
},
word
.
getWord
()))
{
wordDTO
.
setHasRelated
(
true
);
}
return
wordDTO
;
return
wordDTO
;
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment