| | |
| | | </div> |
| | | <div class="btn" @click="spaceTimeArr(detailData.id)">查看更多>>></div> |
| | | </div> |
| | | <div id="schoolDialog" class="customDialog"> |
| | | <div class="title"> |
| | | <span>{{ detailData.name }}</span> |
| | | <span @click="closeDom">关闭</span> |
| | | </div> |
| | | <div class="content"> |
| | | <p>姓名:{{ detailData.name }}</p> |
| | | <p>别名:{{ detailData.alias }}</p> |
| | | <p>籍贯:{{ detailData.nativePlace }}</p> |
| | | <p>医学分科: {{ detailData.medicalBranch }}</p> |
| | | <p>小传:{{ detailData.biography }}</p> |
| | | </div> |
| | | <div class="btn" @click="spaceTimeArr(detailData.id)">查看更多>>></div> |
| | | </div> |
| | | |
| | | <el-drawer |
| | | title="地址列表" |
| | | :visible.sync="drawer" |
| | |
| | | hotKeyList: [], |
| | | searchKey: "", |
| | | // 分类 |
| | | categories: [], |
| | | categories: [ |
| | | { |
| | | name: "亲属关系" |
| | | }, |
| | | { |
| | | name: "师承关系" |
| | | }, |
| | | { |
| | | name: "文献作品" |
| | | }, |
| | | { |
| | | name: "社会关系" |
| | | }, |
| | | { |
| | | name: "活动地" |
| | | }, |
| | | { |
| | | name: "学术流派" |
| | | } |
| | | ], |
| | | // 当前人物信息 |
| | | ownInfo: null, |
| | | detailData: { |
| | |
| | | ); |
| | | if (p) { |
| | | this.nodeDatas.push({ |
| | | category: 0, |
| | | id: item.mainId, |
| | | name: p.NAME[0].content1, |
| | | itemStyle: { |
| | | color: "#5470c6", |
| | | }, |
| | | name: p.NAME[0].content1 |
| | | }); |
| | | } |
| | | } |
| | |
| | | -1 |
| | | ) { |
| | | this.nodeDatas.push({ |
| | | category: 2, |
| | | id: item.mainId, |
| | | name: item.literatureName, |
| | | itemStyle: { |
| | | color: "#fac858", |
| | | }, |
| | | name: item.literatureName |
| | | }); |
| | | } |
| | | this.links.push({ |
| | |
| | | -1 |
| | | ) { |
| | | this.nodeDatas.push({ |
| | | category: 4, |
| | | id: item.mainId, |
| | | name: item.ancientName, |
| | | itemStyle: { |
| | | color: "#ea7ccc", |
| | | }, |
| | | name: item.ancientName |
| | | }); |
| | | } |
| | | this.links.push({ |
| | |
| | | const s = this.infoOfSchools.find( |
| | | (sItem) => sItem.schoolId == item.schoolId |
| | | ); |
| | | console.log(this.infoOfSchools); |
| | | console.log(item.schoolId); |
| | | console.log(s); |
| | | if (s) { |
| | | this.nodeDatas.push({ |
| | | category: 5, |
| | | id: item.mainId, |
| | | name: s.name[0], |
| | | itemStyle: { |
| | | color: "#9a60b4", |
| | | }, |
| | | name: s.name[0] |
| | | }); |
| | | } |
| | | } |
| | |
| | | ); |
| | | if (p) { |
| | | this.nodeDatas.push({ |
| | | category: 3, |
| | | id: item.mainId, |
| | | name: p.NAME[0].content1, |
| | | itemStyle: { |
| | | color: "#ee6666", |
| | | }, |
| | | name: p.NAME[0].content1 |
| | | }); |
| | | } |
| | | } |
| | |
| | | ); |
| | | if (p) { |
| | | this.nodeDatas.push({ |
| | | category: 1, |
| | | id: item.mainId, |
| | | name: p.NAME[0].content1, |
| | | itemStyle: { |
| | | color: "#3dae7b", |
| | | }, |
| | | name: p.NAME[0].content1 |
| | | }); |
| | | } |
| | | } |
| | |
| | | symbolSize: 15, |
| | | data: this.nodeDatas, |
| | | links: this.links, |
| | | categories: [{}], |
| | | categories: this.categories, |
| | | roam: true, |
| | | label: { |
| | | show: true, |
| | |
| | | }, |
| | | force: { |
| | | repulsion: 600, |
| | | edgeLength: 300, |
| | | }, |
| | | }, |
| | | edgeLength: 300 |
| | | } |
| | | } |
| | | ], |
| | | color: [ |
| | | "#5470c6", |
| | | "#3dae7b", |
| | | "#fac858", |
| | | "#ee6666", |
| | | "#ea7ccc", |
| | | "#9a60b4" |
| | | ] |
| | | }; |
| | | // 设置点击事件监听 |
| | | myChart.off("click"); |
| | |
| | | }, |
| | | |
| | | creatDom(params) { |
| | | const id = params.data.id.split("_")[0]; |
| | | const type = params.data.id.split("_")[1]; |
| | | if (type == "p") { |
| | | // 人 |
| | | const e = params.event; |
| | | const div = document.getElementById("customDialog"); |
| | | div.style.display = "block"; |
| | | div.style.left = e.offsetX + 50 + "px"; |
| | | div.style.top = e.offsetY - 50 + "px"; |
| | | const data = this.infoOfPersons?.find( |
| | | (i) => i.id == params.data.personId |
| | | (i) => i.id == id |
| | | ); |
| | | const obj = { |
| | | id: id, |
| | | name: |
| | | data?.NAME?.map((e, i) => { |
| | | i += 1; |
| | | return e["content" + i]; |
| | | }).join("、") ?? "", |
| | | alias: |
| | | data?.ALIAS?.map((e, i) => { |
| | | i += 1; |
| | | return e["content" + i]; |
| | | }).join("、") ?? "", |
| | | nativePlace: |
| | | data?.NATIVE_PLACE?.map((e, i) => { |
| | | i += 1; |
| | | return e["content" + i]; |
| | | }).join("、") ?? "", |
| | | medicalBranch: |
| | | data?.MEDICAL_BRANCH?.map((e, i) => { |
| | | i += 1; |
| | | return e["content" + i]; |
| | | }).join("、") ?? "", |
| | | biography: data?.BIOGRAPHY ?? "" |
| | | }; |
| | | this.detailData = obj; |
| | | } |
| | | if (type == "s") { |
| | | // 学派 |
| | | const e = params.event; |
| | | const div = document.getElementById("schoolDialog"); |
| | | div.style.display = "block"; |
| | | div.style.left = e.offsetX + 50 + "px"; |
| | | div.style.top = e.offsetY - 50 + "px"; |
| | | const data = this.infoOfPersons?.find( |
| | | (i) => i.id == id |
| | | ); |
| | | const obj = { |
| | | id: params.data.id, |
| | |
| | | i += 1; |
| | | return e["content" + i]; |
| | | }).join("、") ?? "", |
| | | biography: data?.BIOGRAPHY ?? "", |
| | | biography: data?.BIOGRAPHY ?? "" |
| | | }; |
| | | this.detailData = obj; |
| | | } |
| | | }, |
| | | |
| | | closeDom() { |