| | |
| | | getPersonRelationAtSchool, |
| | | getSpaceTime |
| | | } from "@/api/index.js"; |
| | | import { getImg, getFile } from "@/static/tool.js"; |
| | | import { getImg } from "@/static/tool.js"; |
| | | import L from "leaflet"; |
| | | import "leaflet.chinatmsproviders"; |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | copyText() { |
| | | const textToCopy = this.biogData[0].content + "\n来源:中医医学人物知识库"; |
| | | const textToCopy = |
| | | this.biogData[0].content + "\n来源:中医医学人物知识库"; |
| | | const textarea = document.createElement("textarea"); |
| | | textarea.value = textToCopy; |
| | | document.body.appendChild(textarea); |
| | |
| | | window.open(item.url); |
| | | } |
| | | if (item.filePath) { |
| | | window.open(getFile(item.filePath)); |
| | | window.open(getImg(item.filePath)); |
| | | } |
| | | }, |
| | | getData() { |
| | |
| | | }, |
| | | { |
| | | name: "所处时期", |
| | | value: obj.dynastyDesc || "-" |
| | | value: obj.dynastyDesc || "-", |
| | | valueClick: () => { |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/knowledgeBase/knowledgeBase?dynasty=" + |
| | | obj.dynastyId |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | name: "民族", |
| | |
| | | }, |
| | | { |
| | | name: "职官", |
| | | value: obj.official || "-" |
| | | value: obj.official || "-", |
| | | valueClick: () => { |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/knowledgeBase/knowledgeBase?isAdvancedSearch=1&official=" + |
| | | obj.official |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | name: "流派", |
| | |
| | | personId: this.detailId |
| | | }).then((res) => { |
| | | if (res.list && res.list.length) { |
| | | const data = res.list.map((item) => { |
| | | return { |
| | | name: item.activityName, |
| | | value: [item.xcoord, item.ycoord] |
| | | }; |
| | | }); |
| | | const data = []; |
| | | for (let i = 0; i < res.list.length; i++) { |
| | | const item = res.list[i]; |
| | | if (item.xcoord && item.ycoord) { |
| | | const obj = { |
| | | name: item.activityName, |
| | | value: [item.xcoord, item.ycoord] |
| | | }; |
| | | data.push(obj); |
| | | } |
| | | } |
| | | this.markerList = data; |
| | | // 时空地图 |
| | | // 这里只取了第一条,需要全部数据 |
| | | this.initMap(data[0]); |
| | | if (data && data.length) { |
| | | this.initMap(data); |
| | | } |
| | | } |
| | | |
| | | // loadBMap("1NJdwrI1CfT6lrykVhDkmWgsO6O2bjQK").then(() => { |
| | |
| | | var map = L.map("spaceTime", { |
| | | preferCanvas: true, |
| | | attributionControl: false |
| | | }).setView([markerList.value[1], markerList.value[0]], 13); |
| | | }).setView([markerList[0].value[1], markerList[0].value[0]], 13); |
| | | L.tileLayer |
| | | .chinaProvider("TianDiTu.Normal.Map", { |
| | | key: "76bc34ead7e30e663a4eded8aeaf5860", |
| | | maxZoom: 18, |
| | | minZoom: 3 |
| | | }) |
| | | .addTo(map); |
| | | L.tileLayer |
| | | .chinaProvider("TianDiTu.Normal.Annotion", { |
| | | key: "76bc34ead7e30e663a4eded8aeaf5860", |
| | | maxZoom: 18, |
| | | minZoom: 3 |
| | |
| | | const temp_mark = L.marker([markerList.value[1], markerList.value[0]], { |
| | | icon: icon |
| | | }).addTo(map); |
| | | if (markerList.length) { |
| | | for (let i = 0; i < markerList.length; i++) { |
| | | const item = markerList[i]; |
| | | const temp_mark = L.marker([item.value[1], item.value[0]], { |
| | | icon: icon |
| | | }).addTo(map); |
| | | } |
| | | } |
| | | }, |
| | | // 放大地图跳转 |
| | | fangdaClick(index) { |