Commit 141e41db by 侯昆

添加图片

1 parent b67e47e8
......@@ -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.WordDomain;
import com.dookay.coral.common.core.utils.lang.CollectionUtils;
import io.swagger.models.auth.In;
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.Map;
import java.util.stream.Collectors;
......@@ -34,7 +37,7 @@ import java.util.stream.Collectors;
public class OneWayRelateVO {
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) {
OneWayRelateVO vo = new OneWayRelateVO();
......@@ -42,13 +45,18 @@ public class OneWayRelateVO {
if (CollectionUtils.isNotEmpty(relatedWords) &&
CollectionUtils.isNotEmpty(relations)) {
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()) {
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());
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;
}
......
......@@ -13,9 +13,9 @@
<script src="${ctx}/static/js/plugins/jquery.min.js"></script>
<script src="${ctx}/static/js/vendor.js" merge="true"></script>
<script>
$('.js-collapse').each(function () {
$('.js-collapse').each(function() {
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');
});
});
......
......@@ -13,7 +13,16 @@
<div class="wrapper-ipad-app-h5">
<div class="header-main-1 clearfix">
<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>
</c:otherwise>
</c:choose>
<c:if test="${vo.word eq '象'}">
<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>
......
......@@ -106,8 +106,8 @@
</c:choose>
<c:forEach items="${vo.relationByGroup}" var="item">
<div class="list-group">
<span class="list-group-item list-group-item-header">${item.key}</span>
<c:forEach items="${item.value}" var="w">
<span class="list-group-item list-group-item-header">${item.middle}</span>
<c:forEach items="${item.right}" var="w">
<a class="list-group-item" href="/word/info/${w.id}">${w.word}</a>
</c:forEach>
</div>
......
......@@ -18,7 +18,7 @@
<div class="word-read pt-0">
<c:choose>
<c:when test="${vo.word eq '中华人民共和国'}">
<span>【Zhōnghuá Rénmín Gònghéguó】</span>
<span>【Zhōnghuá&nbsp;&nbsp;Rénmín&nbsp;&nbsp;Gònghéguó】</span>
<a class="link js-play-voice" href="javascript:;">
<i class="icon icon-shengyin"></i>
</a>
......@@ -663,19 +663,47 @@
<c:if test="${vo.word eq '心脏'}">
<script>
$(function () {
// 图谱
var nodeDatas = [{
atlasNodes: [{
id: 2,
label: '心脏'
label: '心脏',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '心内膜'
label: '心内膜',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '心肌'
label: '心肌',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
......@@ -723,19 +751,55 @@
},
{
id: 16,
label: '心室'
label: '心室',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 17,
label: '心房'
label: '心房',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 18,
label: '胸心血管外科学'
label: '胸心血管外科学',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 19,
label: '心率'
label: '心率',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 20,
......@@ -899,23 +963,68 @@
{
atlasNodes: [{
id: 2,
label: '心脏'
label: '心脏',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '心力衰竭'
label: '心力衰竭',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '心瓣膜病'
label: '心瓣膜病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
label: '先天性心脏病'
label: '先天性心脏病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 6,
label: '冠心病'
label: '冠心病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
......@@ -927,7 +1036,16 @@
},
{
id: 9,
label: '心脏导管检查术'
label: '心脏导管检查术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 10,
......@@ -935,23 +1053,68 @@
},
{
id: 11,
label: '心脏内直视手术'
label: '心脏内直视手术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 12,
label: '心脏闭合性损'
label: '心脏闭合性损',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 13,
label: '高血压心脏病'
label: '高血压心脏病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 14,
label: '心音'
label: '心音',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 15,
label: '心源性猝死'
label: '心源性猝死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 16,
......@@ -1103,11 +1266,29 @@
{
atlasNodes: [{
id: 2,
label: '冠心'
label: '冠心',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '冠状动脉搭桥术'
label: '冠状动脉搭桥术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
......@@ -1119,27 +1300,81 @@
},
{
id: 6,
label: '微创心脏外科手术'
label: '微创心脏外科手术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
label: '心绞痛'
label: '心绞痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 8,
label: '心律失常'
label: '心律失常',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 9,
label: '急性冠状动脉综合征'
label: '急性冠状动脉综合征',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 10,
label: '心肌衰竭'
label: '心肌衰竭',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 11,
label: '心源性猝死'
label: '心源性猝死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
],
atlasEdges: [{
......@@ -1188,23 +1423,68 @@
{
atlasNodes: [{
id: 2,
label: '心痛'
label: '心痛',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '真心痛'
label: '真心痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '抗心痛药'
label: '抗心痛药',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
label: '天王补心丹'
label: '天王补心丹',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 15,
label: '麝香保心丸'
label: '麝香保心丸',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 6,
......@@ -1224,19 +1504,55 @@
},
{
id: 11,
label: '虫痛'
label: '虫痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 12,
label: '心绞痛'
label: '心绞痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 13,
label: '心肌梗死'
label: '心肌梗死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 14,
label: '胃痛'
label: '胃痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
],
atlasEdges: [{
......@@ -1292,11 +1608,29 @@
{
atlasNodes: [{
id: 2,
label: '心'
label: '心',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '心律不齐'
label: '心律不齐',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
......@@ -1308,7 +1642,16 @@
},
{
id: 6,
label: '心动周期'
label: '心动周期',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
......@@ -1316,7 +1659,16 @@
},
{
id: 8,
label: '心电图'
label: '心电图',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 9,
......@@ -1324,7 +1676,16 @@
},
{
id: 10,
label: '窦性心律'
label: '窦性心律',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 11,
......@@ -1372,43 +1733,133 @@
{
atlasNodes: [{
id: 2,
label: '心病'
label: '心病',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '热入心包'
label: '热入心包',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '水气凌心'
label: '水气凌心',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
label: '心血虚'
label: '心血虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 6,
label: '心心血淤'
label: '心心血淤',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
label: '怔忡'
label: '怔忡',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 8,
label: '心悸'
label: '心悸',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 9,
label: '心阳虚'
label: '心阳虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 10,
label: '心阴虚'
label: '心阴虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 11,
label: '盗汗'
label: '盗汗',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
],
atlasEdges: [{
......@@ -1450,7 +1901,7 @@
]
}
];
// 图谱
function draw(atlasData, index) {
var container = document.getElementById('atlas-' + index);
var data = {
......
......@@ -340,15 +340,42 @@
var nodeDatas = [{
atlasNodes: [{
id: 2,
label: '心脏'
label: '心脏',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '心内膜'
label: '心内膜',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '心肌'
label: '心肌',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
......@@ -396,19 +423,55 @@
},
{
id: 16,
label: '心室'
label: '心室',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 17,
label: '心房'
label: '心房',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 18,
label: '胸心血管外科学'
label: '胸心血管外科学',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 19,
label: '心率'
label: '心率',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 20,
......@@ -572,23 +635,68 @@
{
atlasNodes: [{
id: 2,
label: '心脏'
label: '心脏',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '心力衰竭'
label: '心力衰竭',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '心瓣膜病'
label: '心瓣膜病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
label: '先天性心脏病'
label: '先天性心脏病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 6,
label: '冠心病'
label: '冠心病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
......@@ -600,7 +708,16 @@
},
{
id: 9,
label: '心脏导管检查术'
label: '心脏导管检查术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 10,
......@@ -608,23 +725,68 @@
},
{
id: 11,
label: '心脏内直视手术'
label: '心脏内直视手术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 12,
label: '心脏闭合性损'
label: '心脏闭合性损',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 13,
label: '高血压心脏病'
label: '高血压心脏病',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 14,
label: '心音'
label: '心音',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 15,
label: '心源性猝死'
label: '心源性猝死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 16,
......@@ -776,11 +938,29 @@
{
atlasNodes: [{
id: 2,
label: '冠心'
label: '冠心',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '冠状动脉搭桥术'
label: '冠状动脉搭桥术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
......@@ -792,27 +972,81 @@
},
{
id: 6,
label: '微创心脏外科手术'
label: '微创心脏外科手术',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
label: '心绞痛'
label: '心绞痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 8,
label: '心律失常'
label: '心律失常',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 9,
label: '急性冠状动脉综合征'
label: '急性冠状动脉综合征',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 10,
label: '心肌衰竭'
label: '心肌衰竭',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 11,
label: '心源性猝死'
label: '心源性猝死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
],
atlasEdges: [{
......@@ -861,23 +1095,68 @@
{
atlasNodes: [{
id: 2,
label: '心痛'
label: '心痛',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '真心痛'
label: '真心痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '抗心痛药'
label: '抗心痛药',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
label: '天王补心丹'
label: '天王补心丹',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 15,
label: '麝香保心丸'
label: '麝香保心丸',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 6,
......@@ -897,19 +1176,55 @@
},
{
id: 11,
label: '虫痛'
label: '虫痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 12,
label: '心绞痛'
label: '心绞痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 13,
label: '心肌梗死'
label: '心肌梗死',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 14,
label: '胃痛'
label: '胃痛',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
],
atlasEdges: [{
......@@ -965,11 +1280,29 @@
{
atlasNodes: [{
id: 2,
label: '心'
label: '心',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '心律不齐'
label: '心律不齐',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
......@@ -981,7 +1314,16 @@
},
{
id: 6,
label: '心动周期'
label: '心动周期',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
......@@ -989,7 +1331,16 @@
},
{
id: 8,
label: '心电图'
label: '心电图',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 9,
......@@ -997,7 +1348,16 @@
},
{
id: 10,
label: '窦性心律'
label: '窦性心律',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 11,
......@@ -1045,43 +1405,133 @@
{
atlasNodes: [{
id: 2,
label: '心病'
label: '心病',
size: 50,
color: {
border: '#187bb2',
background: '#187bb2',
highlight: {
border: '#187bb2',
background: '#187bb2'
}
}
},
{
id: 3,
label: '热入心包'
label: '热入心包',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 4,
label: '水气凌心'
label: '水气凌心',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 5,
label: '心血虚'
label: '心血虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 6,
label: '心心血淤'
label: '心心血淤',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 7,
label: '怔忡'
label: '怔忡',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 8,
label: '心悸'
label: '心悸',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 9,
label: '心阳虚'
label: '心阳虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 10,
label: '心阴虚'
label: '心阴虚',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
},
{
id: 11,
label: '盗汗'
label: '盗汗',
size: 40,
color: {
border: '#61a0a8',
background: '#61a0a8',
highlight: {
border: '#61a0a8',
background: '#61a0a8'
}
}
}
],
atlasEdges: [{
......@@ -1133,13 +1583,13 @@
var options = {
nodes: {
shape: 'dot',
borderWidth: 2,
size: 25,
color: {
border: '#6faae8',
background: '#ecf6ff',
border: '#bda29a',
background: '#bda29a',
highlight: {
border: '#6faae8',
background: '#ecf6ff'
border: '#bda29a',
background: '#bda29a'
}
},
font: {
......
This diff could not be displayed because it is too large.
......@@ -11,7 +11,9 @@
<div class="wrapper-ipad-app-h5">
<div class="header-main-1 clearfix">
<div class="header-main-left">
<h1></h1>
<h1>
<span class="bg-xiang"></span>
</h1>
<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-2" data-toggle="collapse">书法</a>
......
......@@ -25,6 +25,7 @@ import com.dookay.coral.common.core.utils.lang.StringUtils;
import com.dookay.coral.common.web.utils.upload.model.ImageModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.ArrayUtils;
import java.util.Comparator;
import java.util.List;
......@@ -79,6 +80,9 @@ public class WordDTO {
relationOneWayQuery.setWordId(word.getId());
List<RelationOneWayDomain> relateList = relationOneWayService.getList(relationOneWayQuery);
wordDTO.setHasRelated(CollectionUtils.isNotEmpty(relateList));
if (ArrayUtils.contains(new String[]{"象", "中国", "中华人民共和国", "太阳系"}, word.getWord())) {
wordDTO.setHasRelated(true);
}
return wordDTO;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!