| | |
| | | return req1({ |
| | | url: "/account/register", |
| | | method: "post", |
| | | data: Obj |
| | | data: Obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | method: "post", |
| | | data: req, |
| | | headers: { |
| | | "Content-Type": "multipart/form-data" |
| | | } |
| | | "Content-Type": "multipart/form-data", |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/account/verification", |
| | | method: "post", |
| | | data: req |
| | | data: req, |
| | | }); |
| | | }; |
| | | // 获取用户信息 |
| | | export const getUserInfo = () => { |
| | | return req1({ |
| | | url: "/account/getUserInfo", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/account/resetPassword", |
| | | method: "post", |
| | | data: Obj |
| | | data: Obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getlogout = () => { |
| | | return req1({ |
| | | url: "/account/logout", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/account/changePassword", |
| | | method: "post", |
| | | data: obj |
| | | data: obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getdataOutput = () => { |
| | | return req1({ |
| | | url: "/person/dataOutput", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getHotSearch = () => { |
| | | return req1({ |
| | | url: "/person/hotSearch", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | // 人物相关的 来源 |
| | |
| | | return req1({ |
| | | url: "/person/source", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | // 人物相关的 个人时空地图 |
| | |
| | | return req1({ |
| | | url: "/person/spaceTime", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/person/images", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | // 医学人物知识库 个人事迹 |
| | |
| | | return req1({ |
| | | url: "/person/biog", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | // 医学人物知识库 人物关系 |
| | |
| | | return req1({ |
| | | url: "/person/personRelationAtSchool", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | // 医学人物知识库 人物关系 |
| | |
| | | return req1({ |
| | | url: "/inheritMedical/nodeCount", |
| | | method: "post", |
| | | data: data |
| | | data: data, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/person/writings", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | // 医学人物知识库 人物详情 |
| | |
| | | return req1({ |
| | | url: "/person/getPersonInfo", |
| | | method: "post", |
| | | params: Obj |
| | | params: Obj, |
| | | }); |
| | | }; |
| | | export const getWebBasic = (Obj) => { |
| | | return req1({ |
| | | url: "/person/webBasic", |
| | | method: "post", |
| | | params: Obj |
| | | params: Obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | params: { |
| | | keyword: requestData?.keyword, |
| | | personId: requestData?.personId, |
| | | } |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/person/advanceSearch", |
| | | method: "post", |
| | | data: Obj |
| | | data: Obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | requestData?.keyword + |
| | | "&dynasty=" + |
| | | requestData?.dynasty, |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | // 中国地域地谱检索人物 |
| | | export const getPreCount = (requestData) => { |
| | | return req1({ |
| | | url: |
| | | "/person/retrieval/preCount?keyword=" + |
| | | "/person/retrieval/preCount?keyword=" + |
| | | requestData?.keyword + |
| | | "&dynasty=" + |
| | | requestData?.dynasty, |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | // 医学人物知识库 |
| | |
| | | return req1({ |
| | | url: "/inheritMedical/list", |
| | | method: "post", |
| | | data: requestData |
| | | data: requestData, |
| | | }); |
| | | }; |
| | | export const inheritMedicalSataStatistics = (requestData) => { |
| | | return req1({ |
| | | url: "/inheritMedical/dataStatistics", |
| | | method: "post", |
| | | data: requestData |
| | | data: requestData, |
| | | }); |
| | | }; |
| | | export const inheritMedicalCultureList = (requestData) => { |
| | | return req1({ |
| | | url: "/inheritMedical/cultureList", |
| | | method: "post", |
| | | data: requestData |
| | | data: requestData, |
| | | }); |
| | | }; |
| | | export const inheritMedicalRelationList = (requestData) => { |
| | | return req1({ |
| | | url: "/inheritMedical/relationList", |
| | | method: "post", |
| | | data: requestData |
| | | data: requestData, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/person/list", |
| | | method: "post", |
| | | data: data |
| | | data: data, |
| | | }); |
| | | }; |
| | | // 检索数据到出 |
| | | export const getPDownload = () => { |
| | | return req1({ |
| | | url: "/person/download", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | // -------------------------P |
| | |
| | | export const getDynastyAll = () => { |
| | | return req1({ |
| | | url: "/dynasty/list", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | | export const getDynasty = () => { |
| | | return req1({ |
| | | url: "/dynasty/listAll", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | export const getDynastyData = () => { |
| | | return req1({ |
| | | url: "/person/retrieval/dynasty", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getDynastyStatistics = () => { |
| | | return req1({ |
| | | url: "/school/dynasty/statistics", |
| | | method: "get" |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | export const getIntroduction = (id) => { |
| | | return req1({ |
| | | url: "/school/introduction?id=" + id, |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | | export const schoolAtlas = (id) => { |
| | | return req1({ |
| | | url: "/person/schoolAtlas?schoolId=" + id, |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // 查询人物6类数据 |
| | | export const getPersonData = (id) => { |
| | | return req1({ |
| | | url: "/person/chain/search/person?personId=" + id + "&maxStep=3", |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | | export const searchSchoolPerson = (data) => { |
| | | return req1({ |
| | | url: "/person/searchSchoolPerson", |
| | | method: "post", |
| | | params: data |
| | | params: data, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getDataStatistics = () => { |
| | | return req1({ |
| | | url: "/medical/dataStatistics", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | // 查询 |
| | |
| | | return req1({ |
| | | url: "/medical/list", |
| | | method: "post", |
| | | data: data |
| | | data: data, |
| | | }); |
| | | }; |
| | | // 详情 |
| | |
| | | return req1({ |
| | | url: "/medical/details", |
| | | method: "post", |
| | | data: data |
| | | data: data, |
| | | }); |
| | | }; |
| | | // 取值:RDF、NT、XML、JSON |
| | |
| | | return req1({ |
| | | url: "/medical/dataOutput", |
| | | method: "post", |
| | | data: Obj |
| | | data: Obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return req1({ |
| | | url: "/person/dataOutput", |
| | | method: "post", |
| | | params: Obj |
| | | params: Obj, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getPDataStatistics = () => { |
| | | return req1({ |
| | | url: "/person/dataStatistics", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | // ---------------- |
| | |
| | | export const getRelationTypeTreeList = () => { |
| | | return req1({ |
| | | url: "/personRelationType/getRelationTypeTreeList", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | | export const getInstitutionList = () => { |
| | | return req1({ |
| | | url: "/medical/institutionList", |
| | | method: "post" |
| | | method: "post", |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | class="search-logo" |
| | | @click="toggleSearch" |
| | | :style="{ |
| | | backgroundColor: searchBg == true ? '#244A7B' : '#DA7A2B' |
| | | backgroundColor: searchBg == true ? '#244A7B' : '#DA7A2B', |
| | | }" |
| | | style=" |
| | | background-color: #000; |
| | | border-radius: 50%; |
| | | " |
| | | style="background-color: #000; border-radius: 50%" |
| | | ></view> |
| | | </view> |
| | | <el-dropdown trigger="click" @command="handleCommand"> |
| | |
| | | type: String, |
| | | default() { |
| | | return "标题"; |
| | | } |
| | | }, |
| | | }, |
| | | searchBg: { |
| | | type: Boolean, |
| | | default() { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | bg: { |
| | | type: String, |
| | | default() { |
| | | return "/static/image/topBg.png"; |
| | | } |
| | | }, |
| | | }, |
| | | bg1: { |
| | | type: String, |
| | | default() { |
| | | return "/static/image/line.png"; |
| | | } |
| | | }, |
| | | }, |
| | | idIndex: { |
| | | type: String, |
| | | default() { |
| | | return "1"; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | searchInput: "", // 搜索框输入的内容 |
| | | menuNav: false, |
| | | dialogVisible: false, |
| | | isCommand: true |
| | | isCommand: true, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | if (res.confirm) { |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: "/pages/Login/Login" |
| | | url: "/pages/Login/Login", |
| | | }); |
| | | }, 1500); |
| | | } else if (res.cancel) { |
| | | // console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | // uni.navigateTo({ |
| | |
| | | handleCommand(int) { |
| | | if (int == 1) { |
| | | uni.navigateTo({ |
| | | url: "/pages/changePassword/changePassword" |
| | | url: "/pages/changePassword/changePassword", |
| | | }); |
| | | } else if (int == 2) { |
| | | uni.showModal({ |
| | |
| | | //退出成功!并跳转到其他页面 |
| | | this.$message.success("退出成功"); |
| | | uni.reLaunch({ |
| | | url: "/pages/Login/Login" |
| | | url: "/pages/Login/Login", |
| | | }); |
| | | }); |
| | | } else if (res.cancel) { |
| | | // console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | }, |
| | | handleSelect(index) { |
| | | if (index === "0") { |
| | | uni.navigateTo({ |
| | | url: "/pages/index/index?id=" + 0 |
| | | url: "/pages/index/index?id=" + 0, |
| | | }); |
| | | } else if (index === "1") { |
| | | uni.navigateTo({ |
| | | url: "/pages/character/index?id=" + 1 |
| | | url: "/pages/character/index?id=" + 1, |
| | | }); |
| | | } else if (index === "2") { |
| | | uni.navigateTo({ |
| | | url: "/pages/inherit/index?id=" + 2 |
| | | url: "/pages/inherit/index?id=" + 2, |
| | | }); |
| | | } else if (index === "3") { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicGenres/index?id=" + 3 |
| | | url: "/pages/academicGenres/index?id=" + 3, |
| | | }); |
| | | } else if (index === "4") { |
| | | uni.navigateTo({ |
| | | url: "/pages/territory/territory?id=" + 4 |
| | | url: "/pages/territory/territory?id=" + 4, |
| | | }); |
| | | } else if (index === "5") { |
| | | uni.navigateTo({ |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + 5 |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + 5, |
| | | }); |
| | | } else if (index === "6") { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicSchools/index", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | if (this.searchInput.trim() !== "") { |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput |
| | | "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput, |
| | | }); |
| | | } |
| | | this.searchInput = ""; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <template> |
| | | <view> |
| | | <headNav :idIndex="6" text="学术流派" /> |
| | | <headNav :idIndex="'6'" text="学术流派" /> |
| | | <!-- 高级搜索 --> |
| | | <view style="margin-top: 0.1rem"> |
| | | <advancedSearch |
| | | @onSearch="onSearch" |
| | | @onSubmit="onSubmit" |
| | | :from="From" |
| | | placehold="请输入关键字" |
| | | :keyword="searchKey" |
| | | :advancedSearchBack="advancedSearchBack" |
| | | /> |
| | | </view> |
| | | <!-- 热门搜索 --> |
| | | <view class="flex flex-center hotSearch"> |
| | | 热门搜索: |
| | | <ul class="flex" style="margin-right: 10rpx"> |
| | | <li |
| | | @click="onSearch({ text: item }, index)" |
| | | :class="{ cursor: true, active: hotAciveIndex === index }" |
| | | v-for="(item, index) in hotKeyList" |
| | | :key="item" |
| | | > |
| | | {{ item }} |
| | | </li> |
| | | </ul> |
| | | </view> |
| | | <view style="margin-left: 0.2rem">书中最常提到的100位人物</view> |
| | | <!-- 关系表地图 --> |
| | | <div |
| | | id="relation" |
| | | style="margin-top: 0.1rem; flex: 1; width: 100%; position: relative" |
| | | > |
| | | <div |
| | | v-if="!loading && relationships.length == 0" |
| | | style=" |
| | | position: absolute; |
| | | top: 30%; |
| | | left: 0; |
| | | right: 0; |
| | | text-align: center; |
| | | font-size: 0.2rem; |
| | | color: #666; |
| | | " |
| | | > |
| | | 暂无相关数据 |
| | | </div> |
| | | </div> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import * as echarts from "echarts"; |
| | | // import axios from "axios"; |
| | | import { |
| | | getPersonData, |
| | | getHotSearch, |
| | | getPDataStatistics, |
| | | } from "@/api/index.js"; |
| | | import * as echarts from "echarts"; |
| | | export default { |
| | | data() { |
| | | return {}; |
| | | return { |
| | | loading: true, |
| | | hotAciveIndex: "", |
| | | currentId: 21682, |
| | | // echarts数据 |
| | | nodes: [], |
| | | // echarts两者的关系 |
| | | relationships: [], |
| | | // 高级搜索 |
| | | From: { |
| | | from: [ |
| | | { |
| | | type: "input", |
| | | label: "姓名", |
| | | name: "name", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "input", |
| | | label: "别名", |
| | | name: "alias", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "input", |
| | | label: "籍贯", |
| | | name: "location", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "select", |
| | | label: "职业", |
| | | name: "sdId", |
| | | value: "", |
| | | options: [ |
| | | { |
| | | label: "未指明", |
| | | value: "UNKNOWN", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: "input", |
| | | label: "官职", |
| | | name: "office", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "select", |
| | | label: "性别", |
| | | value: "", |
| | | name: "genderTypeEO", |
| | | options: [ |
| | | { |
| | | label: "未指明", |
| | | value: "UNKNOWN", |
| | | }, |
| | | { |
| | | label: "男", |
| | | value: "MALE", |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: "WOMAN", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: "input", |
| | | label: "时期", |
| | | name: "period", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "input", |
| | | label: "机构", |
| | | name: "inst", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "number", |
| | | label: "页码", |
| | | name: "page", |
| | | value: "", |
| | | }, |
| | | { |
| | | type: "number", |
| | | label: "页大小", |
| | | name: "pageSize", |
| | | value: "", |
| | | }, |
| | | ], |
| | | }, |
| | | // 下面的朝代1 |
| | | dynastyColor: 1, |
| | | // 朝代 |
| | | dynasty: [ |
| | | { |
| | | name: "夏朝", |
| | | coord: "2070BC", |
| | | id: 1, |
| | | }, |
| | | { |
| | | name: "商朝", |
| | | id: 2, |
| | | coord: "1600BC", |
| | | }, |
| | | { |
| | | name: "西周", |
| | | id: 3, |
| | | coord: "1600BC", |
| | | }, |
| | | { |
| | | name: "春秋战国", |
| | | id: 4, |
| | | coord: "770BC", |
| | | }, |
| | | { |
| | | name: "秦朝", |
| | | id: 5, |
| | | coord: "221BC", |
| | | }, |
| | | { |
| | | name: "汉朝", |
| | | id: 6, |
| | | coord: "202BC", |
| | | }, |
| | | { |
| | | name: "三国两晋南北朝", |
| | | id: 7, |
| | | coord: "184", |
| | | }, |
| | | { |
| | | name: "隋朝", |
| | | id: 8, |
| | | coord: "581", |
| | | }, |
| | | { |
| | | name: "唐朝", |
| | | id: 9, |
| | | coord: "618", |
| | | }, |
| | | { |
| | | name: "五代十国", |
| | | id: 10, |
| | | coord: "907", |
| | | }, |
| | | { |
| | | name: "辽夏金", |
| | | id: 11, |
| | | coord: "907", |
| | | }, |
| | | { |
| | | name: "宋朝", |
| | | id: 12, |
| | | coord: "960", |
| | | }, |
| | | { |
| | | name: "元朝", |
| | | id: 13, |
| | | coord: "1271", |
| | | }, |
| | | |
| | | { |
| | | name: "明朝", |
| | | id: 14, |
| | | coord: "1368", |
| | | }, |
| | | { |
| | | name: "清朝", |
| | | id: 15, |
| | | coord: "1636", |
| | | }, |
| | | ], |
| | | // 热门搜索 |
| | | hotKeyList: [], |
| | | searchKey: "", |
| | | |
| | | // 分类 |
| | | categories: [], |
| | | // 人物信息 |
| | | infoOfPersons: [], |
| | | // 当前人物信息 |
| | | ownInfo: null, |
| | | }; |
| | | }, |
| | | onLoad(options) {}, |
| | | methods: {} |
| | | mounted() { |
| | | this.getData(); |
| | | // this.echartsArr(); |
| | | this.hotSearch(); |
| | | // 监听窗口大小变化 |
| | | window.addEventListener("resize", this.relation); |
| | | this.innt(); |
| | | }, |
| | | onLoad(options) { |
| | | this.searchKey = options.keyword; |
| | | }, |
| | | methods: { |
| | | getPersonInfo(arr, str, newArr, order, type) { |
| | | for (let i = 0; i < arr.length; i++) { |
| | | const ele = arr[i]; |
| | | const personInfo = this.infoOfPersons.find( |
| | | (item) => item.id == ele.personId |
| | | ); |
| | | const obj = { |
| | | personId: ele.personId, |
| | | id1: this.ownInfo.id, |
| | | id2: personInfo.id, |
| | | relationTypeId: ele.relationTypeId, |
| | | relationTypeName: ele.relationTypeName, |
| | | name1: this.ownInfo?.NAME[0]?.content1, |
| | | name2: personInfo?.NAME[0]?.content1, |
| | | category: type, |
| | | }; |
| | | newArr.push(obj); |
| | | if (ele[str] && ele[str]?.length) { |
| | | this.getPersonInfo(ele[str], "kinList", newArr, 2, type); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | //数组去重 |
| | | deduplicateArray(arr, idKey) { |
| | | // 使用一个辅助对象来跟踪已经见过的ID |
| | | const seen = {}; |
| | | // 使用filter方法过滤数组 |
| | | const deduplicatedArray = arr.filter((item) => { |
| | | // 获取当前对象的ID |
| | | const id = item[idKey]; |
| | | // 如果ID在辅助对象中不存在,则将其添加到对象并返回true |
| | | if (!seen[id]) { |
| | | seen[id] = true; |
| | | return true; |
| | | } |
| | | // 如果ID已经存在,返回false |
| | | return false; |
| | | }); |
| | | |
| | | return deduplicatedArray; |
| | | }, |
| | | getData() { |
| | | this.loading = true; |
| | | getPersonData(this.currentId).then((res) => { |
| | | this.nodes = []; |
| | | this.relationships = []; |
| | | let kin = []; |
| | | let teacher = []; |
| | | if (res && res.success && res.object) { |
| | | console.log(res.object); |
| | | this.infoOfPersons = res.object?.infoOfPersons; |
| | | if (res.object?.personChain) { |
| | | this.ownInfo = this.infoOfPersons.find( |
| | | (item) => item.id == res.object?.personChain.personId |
| | | ); |
| | | const obj = res.object?.personChain; |
| | | console.log(obj.kinList, "kinList"); |
| | | if (obj.kinList?.length) { |
| | | let newArr = []; |
| | | this.categories.push({ name: "亲属关系" }); |
| | | this.getPersonInfo(obj.kinList, "kinList", newArr, 1, 0); |
| | | console.log(newArr, "list"); |
| | | newArr.forEach((item) => { |
| | | let exists1 = this.nodes.some( |
| | | (node) => node.id === item.id1 && node.name === item.name1 |
| | | ); |
| | | let exists2 = this.nodes.some( |
| | | (node) => node.id === item.id1 && node.name === item.name2 |
| | | ); |
| | | // 证明不存在 |
| | | if (item.name1 && exists1 !== true) { |
| | | this.nodes.push({ |
| | | name: item.name1, |
| | | id: item.id1, |
| | | ...item, |
| | | }); |
| | | } |
| | | if (item.name2 && exists2 !== true) { |
| | | this.nodes.push({ |
| | | name: item.name2, |
| | | id: item.id2, |
| | | ...item, |
| | | }); |
| | | } |
| | | let obj = { |
| | | source: item.name1, |
| | | target: item.name2, |
| | | relation: item.relationTypeName || "", // 如果存在 relationName 字段则使用,否则为空字符串 |
| | | }; |
| | | this.relationships.push(obj); |
| | | }); |
| | | } |
| | | if (obj.teacherStudentList?.length) { |
| | | this.categories.push({ name: "师承关系" }); |
| | | } |
| | | if (obj.literatureList?.length) { |
| | | this.categories.push({ name: "文献作品" }); |
| | | } |
| | | if (obj.socialList?.length) { |
| | | this.categories.push({ name: "社会关系" }); |
| | | } |
| | | if (obj.placeList?.length) { |
| | | this.categories.push({ name: "活动地" }); |
| | | } |
| | | if (obj.schoolList?.length) { |
| | | this.categories.push({ name: "学术流派" }); |
| | | } |
| | | } |
| | | } |
| | | this.loading = false; |
| | | this.relation(); |
| | | }); |
| | | }, |
| | | // 关系图谱 |
| | | relation() { |
| | | var chartDom = document.getElementById("relation"); |
| | | var myChart = echarts.init(chartDom); |
| | | // 假设您有节点名称和它们之间的关系数据 |
| | | var nodes = this.deduplicateArray(this.nodes, "id"); |
| | | var relationships = this.relationships; |
| | | |
| | | let FontSize = 12; // 字体大小 |
| | | let BorderWidth = 2; // 边框大小 |
| | | let SymbolSize = 80; // 尺寸距离 |
| | | let Distance = 10; |
| | | // 不同尺寸下修改echarts的字体 |
| | | if (window.innerWidth > 2560 && window.innerWidth <= 3840) { |
| | | FontSize = 20; |
| | | BorderWidth = 5; |
| | | SymbolSize = 90; |
| | | Distance = 33; |
| | | } else if (window.innerWidth > 1920 && window.innerWidth <= 2560) { |
| | | FontSize = 18; |
| | | BorderWidth = 4; |
| | | SymbolSize = 80; |
| | | Distance = 22; |
| | | } else if (window.innerWidth >= 1366 && window.innerWidth <= 1920) { |
| | | FontSize = 14; |
| | | BorderWidth = 4; |
| | | SymbolSize = 70; |
| | | Distance = 22; |
| | | } |
| | | // 根据关系数据生成连接线 |
| | | var links = []; |
| | | relationships.forEach((relationship, i) => { |
| | | var sourceIndex = nodes.findIndex( |
| | | (node) => node.name === relationship.source |
| | | ); |
| | | var targetIndex = nodes.findIndex( |
| | | (node) => node.name === relationship.target |
| | | ); |
| | | if (relationship.relation) { |
| | | if (sourceIndex !== -1 && targetIndex !== -1) { |
| | | links.push({ |
| | | source: sourceIndex, |
| | | target: targetIndex, |
| | | label: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | // 使用函数动态生成标签内容 |
| | | // return relationships.find(rel => rel.source === nodes[params.data |
| | | // .source] && rel.target === nodes[params.data.target]) |
| | | // .relation; |
| | | return relationship.relation; |
| | | }, // 设置关系标签内容为"Child-Parent" |
| | | color: "#2C2C2C", |
| | | fontSize: FontSize - 2, |
| | | backgroundColor: "rgba(255, 255, 255, 1)", |
| | | padding: [3, 8], |
| | | borderRadius: 30, |
| | | position: "middle", // 设置标签文本在线的中间位置上居中显示 |
| | | // z: -1, // 设置标签的z轴高度,使其比连接线更高 |
| | | distance: -10, // 将标签放置在连接线上 |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | // 根据nodes动态生成节点数据 |
| | | var nodeData = nodes.map(function (node, index) { |
| | | return { |
| | | name: node.name, |
| | | id: node.id, |
| | | itemStyle: { |
| | | color: "#eae0eb", // 可以根据索引设置不同的颜色 |
| | | borderWidth: BorderWidth, |
| | | borderColor: "#996f9f", |
| | | }, |
| | | }; |
| | | }); |
| | | |
| | | var option; |
| | | option = { |
| | | title: { |
| | | // text: '书中最常提到的100位人物', |
| | | // subtext: '', |
| | | left: "center", |
| | | top: FontSize + 10, |
| | | // textStyle: { |
| | | // fontSize: FontSize // 设置标题文字大小为 18px |
| | | // }, |
| | | subtextStyle: { |
| | | fontSize: FontSize, // 设置副标题文字大小为 14px |
| | | color: "#2C2C2C", |
| | | }, |
| | | }, |
| | | backgroundColor: { |
| | | type: "image", |
| | | image: "/static/image/characterRelationBg.png", |
| | | // repeat: 'repeat-x', // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat' |
| | | size: "100% 100%", // 背景图片的尺寸,可以是百分比或者像素 |
| | | position: "center center", // 背景图片的位置,可以是 top, bottom, middle 或者百分比 |
| | | }, |
| | | tooltip: {}, |
| | | legend: [ |
| | | { |
| | | // selectedMode: 'single', |
| | | data: this.categories.map(function (a) { |
| | | return a.name; |
| | | }), |
| | | }, |
| | | ], |
| | | animationDurationUpdate: 1500, |
| | | animationEasingUpdate: "quinticInOut", |
| | | series: [ |
| | | { |
| | | type: "graph", |
| | | layout: "force", |
| | | roam: true, |
| | | symbolSize: SymbolSize, // 调整节点大小 |
| | | label: { |
| | | show: true, |
| | | color: "black", // 设置节点文字颜色为黑色 |
| | | fontSize: FontSize, // 设置文字大小 |
| | | }, |
| | | edgeSymbol: ["circle", "arrow"], |
| | | edgeSymbolSize: [4, 10], |
| | | data: nodeData, |
| | | links: links, |
| | | categories: this.categories, |
| | | lineStyle: { |
| | | opacity: 0.9, |
| | | width: 2, |
| | | curveness: 0.3, |
| | | }, |
| | | emphasis: { |
| | | focus: "adjacency", |
| | | lineStyle: { |
| | | width: 10, |
| | | }, |
| | | }, |
| | | force: { |
| | | // layoutAnimation: false, |
| | | // friction: 1, |
| | | repulsion: 800, |
| | | edgeLength: 400, |
| | | }, |
| | | }, |
| | | // { |
| | | // name: "Les Miserables", |
| | | // type: "graph", |
| | | // legendHoverLink: false, |
| | | // layout: "none", |
| | | // data: nodeData, |
| | | // links: links, |
| | | // categories: this.categories, |
| | | // roam: true, |
| | | // label: { |
| | | // position: "right", |
| | | // formatter: "{b}", |
| | | // }, |
| | | // lineStyle: { |
| | | // color: "source", |
| | | // curveness: 0.3, |
| | | // }, |
| | | // emphasis: { |
| | | // focus: "adjacency", |
| | | // lineStyle: { |
| | | // width: 10, |
| | | // }, |
| | | // }, |
| | | // }, |
| | | ], |
| | | }; |
| | | // 将生成的连接线添加到echarts图表的option中 |
| | | option.series[0].links = links; |
| | | // 设置点击事件监听 |
| | | myChart.off("click"); |
| | | myChart.on("click", (params) => { |
| | | if (params.dataType === "node") { |
| | | this.spaceTimeArr(params.data.id); |
| | | } |
| | | }); |
| | | option && myChart.setOption(option); |
| | | }, |
| | | // 基础搜索 |
| | | onSearch(val, index) { |
| | | if (index !== undefined) { |
| | | this.searchKey = ""; |
| | | this.hotAciveIndex = index; |
| | | } else { |
| | | this.hotAciveIndex = ""; |
| | | } |
| | | // this.searchKey = val.text; |
| | | this.getData(val.text); |
| | | }, |
| | | // 高级搜索 |
| | | onSubmit(val) { |
| | | getAdvanceSearch({ |
| | | ...val, |
| | | page: 1, |
| | | pageSize: 100, |
| | | }).then((res) => { |
| | | console.log(res, "res"); |
| | | }); |
| | | }, |
| | | advancedSearchBack() { |
| | | uni.navigateTo({ |
| | | url: "/pages/knowledgeBase/knowledgeBase", |
| | | }); |
| | | }, |
| | | // 点击下面的朝代按钮 |
| | | dynastyBottomClick(item) { |
| | | this.dynastyColor = item.id; |
| | | this.onSearch({ |
| | | text: item.name, |
| | | }); |
| | | }, |
| | | // 关系图 点击里面的元素 |
| | | spaceTimeArr(id) { |
| | | // 关系图的数据 |
| | | uni.navigateTo({ |
| | | url: "/pages/character/detail?id=" + id, |
| | | }); |
| | | }, |
| | | // 获取朝代echarts的数据 |
| | | echartsArr() { |
| | | getDataStatistics().then((res) => { |
| | | res.object.dynastyStatistic.details.map((item, index) => { |
| | | // this.dynasty.id = item.dynastyId |
| | | // this.dynasty.name = item.dynastyName |
| | | // this.dynasty.coord = item.count |
| | | this.dynasty[index].id = item.dynastyId; |
| | | this.dynasty[index].name = item.dynastyName; |
| | | this.dynasty[index].coord = item.count; |
| | | }); |
| | | }); |
| | | }, |
| | | // 热门搜索 |
| | | hotSearch() { |
| | | getHotSearch().then((res) => { |
| | | const indexList = Object.keys(res.object); |
| | | indexList.sort((a, b) => parseInt(b) - parseInt(a)); |
| | | this.hotKeyList = indexList.map((item) => { |
| | | return res.object[item]; |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 高级搜索里面职业的下拉菜单 |
| | | innt() { |
| | | getPDataStatistics().then((res) => { |
| | | const professionIndex = this.From.from.findIndex( |
| | | (field) => field.label === "职业" |
| | | ); |
| | | // 如果找到了职业字段 |
| | | if (professionIndex !== -1) { |
| | | // 将 profession.list 转换为 options 格式 |
| | | const options = res.object.occupationStatistic.details.map( |
| | | (item) => ({ |
| | | label: item.tagName, |
| | | value: item.tagId.toString(), // 将 id 转换为字符串,确保与 value 类型一致 |
| | | }) |
| | | ); |
| | | // 更新职业字段的 options 属性 |
| | | this.$set(this.From.from[professionIndex], "options", options); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
| | | <style> |
| | | @media screen and (min-width: 2560px) and (max-width: 3840px) { |
| | | } |
| | | |
| | | @media screen and (min-width: 1366px) and (max-width: 1920px) { |
| | | } |
| | | |
| | | ::v-deep .uni-input-placeholder { |
| | | line-height: 1; |
| | | font-size: 0.12rem; |
| | | } |
| | | |
| | | ::v-deep .ffff { |
| | | border-radius: 0.5rem; |
| | | } |
| | | |
| | | ::v-deep .widget_button { |
| | | border-radius: 0.5rem; |
| | | margin: 0.02rem; |
| | | } |
| | | |
| | | .hotSearch { |
| | | font-size: 0.12rem; |
| | | color: #2c2c2c; |
| | | |
| | | li { |
| | | color: #244a7b; |
| | | margin: 0 0.1rem; |
| | | color: #244a7b; |
| | | &.active { |
| | | color: #027edc; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | } |
| | | }; |
| | | }); |
| | | |
| | | var option; |
| | | option = { |
| | | title: { |
| | |
| | | import Footer1 from "@/components/footer/footer.vue"; |
| | | export default { |
| | | components: { |
| | | Footer1 |
| | | Footer1, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | pass: "", |
| | | checkPass: "", |
| | | cellphoneORmailbox: "", |
| | | verifyCode: "" |
| | | verifyCode: "", |
| | | }, |
| | | // 登录用户账号 |
| | | loginData: { |
| | | // 账号 |
| | | loginID: "", |
| | | pass: "" |
| | | pass: "", |
| | | }, |
| | | // 重置密码 |
| | | resetDataPass: { |
| | | cellphoneORmailbox: "", |
| | | verifyCode: "", |
| | | newPass: "", |
| | | checkPass: "" |
| | | checkPass: "", |
| | | }, |
| | | // 修改密码 |
| | | amendDataPass: { |
| | | loginID: "", |
| | | originalPass: "", |
| | | newPass: "", |
| | | checkPass: "" |
| | | checkPass: "", |
| | | }, |
| | | // 书籍数据 |
| | | listData: [ |
| | | { |
| | | name: "历代人物", |
| | | id: 1 |
| | | id: 1, |
| | | }, |
| | | { |
| | | name: "家学传承", |
| | | id: 2 |
| | | id: 2, |
| | | }, |
| | | { |
| | | name: "学术流派", |
| | | id: 6 |
| | | id: 6, |
| | | }, |
| | | { |
| | | name: "学术图谱", |
| | | id: 3 |
| | | id: 3, |
| | | }, |
| | | { |
| | | name: "地域图谱", |
| | | id: 4 |
| | | id: 4, |
| | | }, |
| | | // { |
| | | // name: "中医医事制度", |
| | | // id: 5 |
| | | // } |
| | | ] |
| | | ], |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | success: function (info) { |
| | | // console.log('屏幕的宽度:' + info.windowWidth); |
| | | // console.log('屏幕的高度:' + info.windowHeight); |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | mounted() { |
| | |
| | | // 搜索 |
| | | onSearch(val) { |
| | | uni.navigateTo({ |
| | | url: "/pages/knowledgeBase/knowledgeBase?keyword=" + val.text |
| | | url: "/pages/knowledgeBase/knowledgeBase?keyword=" + val.text, |
| | | }); |
| | | }, |
| | | // 搜索 |
| | |
| | | if (this.searchInput.trim() !== "") { |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput |
| | | "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput, |
| | | }); |
| | | } |
| | | this.searchInput = ""; |
| | |
| | | if (item.id == 1) { |
| | | uni.navigateTo({ |
| | | // url: '/pages/character/detail?id=' + item.id |
| | | url: "/pages/character/index?id=" + item.id |
| | | url: "/pages/character/index?id=" + item.id, |
| | | }); |
| | | } else if (item.id == 2) { |
| | | uni.navigateTo({ |
| | | url: "/pages/inherit/index?id=" + item.id |
| | | url: "/pages/inherit/index?id=" + item.id, |
| | | }); |
| | | // uni.navigateTo({ |
| | | // url: '/pages/shiyiHome/shiyiHome' |
| | | // }) |
| | | } else if (item.id == 3) { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicGenres/index?id=" + item.id |
| | | url: "/pages/academicGenres/index?id=" + item.id, |
| | | }); |
| | | } else if (item.id == 4) { |
| | | uni.navigateTo({ |
| | | url: "/pages/territory/territory?id=" + item.id |
| | | url: "/pages/territory/territory?id=" + item.id, |
| | | }); |
| | | } else if (item.id == 5) { |
| | | uni.navigateTo({ |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + item.id |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + item.id, |
| | | }); |
| | | } else if (item.id == 6) { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicSchools/academicSchools" |
| | | url: "/pages/academicSchools/index", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | // token 不存在 |
| | | this.isCommand = false; |
| | | uni.navigateTo({ |
| | | url: "/pages/Login/Login" |
| | | url: "/pages/Login/Login", |
| | | }); |
| | | } |
| | | } else if (index == 3) { |
| | |
| | | handleCommand(int) { |
| | | if (int == 1) { |
| | | uni.navigateTo({ |
| | | url: "/pages/changePassword/changePassword" |
| | | url: "/pages/changePassword/changePassword", |
| | | }); |
| | | } else if (int == 2) { |
| | | uni.showModal({ |
| | |
| | | //退出成功!并跳转到其他页面 |
| | | this.$message.success("退出成功"); |
| | | uni.reLaunch({ |
| | | url: "/pages/Login/Login" |
| | | url: "/pages/Login/Login", |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | } |
| | | |
| | | .secretary li .detailBtn { |
| | | transition: translate .3s; |
| | | transition: translate 0.3s; |
| | | } |
| | | .secretary li .detailBtn:hover { |
| | | translate: 0 -5px; |
| | |
| | | class="information" |
| | | v-for="(item, index) in SearchArr" |
| | | :key="index" |
| | | style="cursor: pointer;" |
| | | style="cursor: pointer" |
| | | @click="showCard(item)" |
| | | > |
| | | <li style="font-size: 0.18rem; font-weight: 700"> |
| | |
| | | 姓名: |
| | | {{ currentMark[0].name ? currentMark[0].name : "-" }} |
| | | </li> |
| | | <li>别名: {{ currentMark[0].nikeName ? currentMark[0].nikeName : "-" }}</li> |
| | | <li>籍贯: {{ currentMark[0].nativePlace ? currentMark[0].nativePlace : "-" }}</li> |
| | | <li>医学分科: {{ currentMark[0].barnch ? currentMark[0].barnch : "-" }}</li> |
| | | <li> |
| | | 别名: |
| | | {{ currentMark[0].nikeName ? currentMark[0].nikeName : "-" }} |
| | | </li> |
| | | <li> |
| | | 籍贯: |
| | | {{ |
| | | currentMark[0].nativePlace |
| | | ? currentMark[0].nativePlace |
| | | : "-" |
| | | }} |
| | | </li> |
| | | <li> |
| | | 医学分科: |
| | | {{ currentMark[0].barnch ? currentMark[0].barnch : "-" }} |
| | | </li> |
| | | <li |
| | | class="medicalLi" |
| | | :title="currentMark[0].medical ? currentMark[0].medical : '-'" |
| | | > |
| | | 小传: {{ currentMark[0].medical ? currentMark[0].medical : "-" }} |
| | | 小传: |
| | | {{ currentMark[0].medical ? currentMark[0].medical : "-" }} |
| | | </li> |
| | | </ul> |
| | | <el-button |
| | |
| | | <el-collapse-item |
| | | v-for="(item, index) in currentMark" |
| | | :name="index" |
| | | :key="index" |
| | | > |
| | | <template slot="title"> |
| | | <div class="titleImg"> |
| | |
| | | > |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | " |
| | | :style="{ |
| | | marginRight: index === dynasty1.length - 1 ? '0' : '0.03rem', |
| | | background: dynasty1Color == item.id ? '#244A7B' : '#597AA5' |
| | | background: dynasty1Color == item.id ? '#244A7B' : '#597AA5', |
| | | }" |
| | | > |
| | | {{ item.dynastyChs }} |
| | |
| | | getRetrieval, |
| | | getDynasty, |
| | | getPreCount, |
| | | getDynastyData |
| | | getDynastyData, |
| | | } from "@/api/index.js"; |
| | | |
| | | export default { |
| | |
| | | information: [ |
| | | { |
| | | label: "姓名", |
| | | content: "李时珍" |
| | | content: "李时珍", |
| | | }, |
| | | { |
| | | label: "别名", |
| | | content: "东丽先生" |
| | | content: "东丽先生", |
| | | }, |
| | | { |
| | | label: "籍贯", |
| | | content: "湖北" |
| | | content: "湖北", |
| | | }, |
| | | { |
| | | label: "医学分科", |
| | | content: "中药,针灸" |
| | | content: "中药,针灸", |
| | | }, |
| | | { |
| | | label: "小传", |
| | | content: |
| | | "李时珍(约1518年~1593 年), 字东璧, 晚年自号濒湖山人, 湖广黄州府薪州(今湖北省薪春县) 人, 明代著名医药学家。 与“ 医圣” 万密斋齐名, 古有“ 万密斋的方, 李时珍的药” 之说。 后为楚干府..." |
| | | } |
| | | "李时珍(约1518年~1593 年), 字东璧, 晚年自号濒湖山人, 湖广黄州府薪州(今湖北省薪春县) 人, 明代著名医药学家。 与“ 医圣” 万密斋齐名, 古有“ 万密斋的方, 李时珍的药” 之说。 后为楚干府...", |
| | | }, |
| | | ], |
| | | // 下面的朝代1 |
| | | dynasty1Color: "", |
| | |
| | | { |
| | | name: "夏朝", |
| | | coord: "2070BC", |
| | | id: 1 |
| | | id: 1, |
| | | }, |
| | | { |
| | | name: "商朝", |
| | | id: 2, |
| | | coord: "1600BC" |
| | | coord: "1600BC", |
| | | }, |
| | | { |
| | | name: "西周", |
| | | id: 3, |
| | | coord: "1600BC" |
| | | coord: "1600BC", |
| | | }, |
| | | { |
| | | name: "春秋战国", |
| | | id: 4, |
| | | coord: "770BC" |
| | | coord: "770BC", |
| | | }, |
| | | { |
| | | name: "秦朝", |
| | | id: 5, |
| | | coord: "221BC" |
| | | coord: "221BC", |
| | | }, |
| | | { |
| | | name: "汉朝", |
| | | id: 6, |
| | | coord: "202BC" |
| | | coord: "202BC", |
| | | }, |
| | | { |
| | | name: "三国两晋南北朝", |
| | | id: 7, |
| | | coord: "184" |
| | | coord: "184", |
| | | }, |
| | | { |
| | | name: "隋朝", |
| | | id: 8, |
| | | coord: "581" |
| | | coord: "581", |
| | | }, |
| | | { |
| | | name: "唐朝", |
| | | id: 9, |
| | | coord: "618" |
| | | coord: "618", |
| | | }, |
| | | { |
| | | name: "五代十国", |
| | | id: 10, |
| | | coord: "907" |
| | | coord: "907", |
| | | }, |
| | | { |
| | | name: "辽夏金", |
| | | id: 11, |
| | | coord: "907" |
| | | coord: "907", |
| | | }, |
| | | { |
| | | name: "宋朝", |
| | | id: 12, |
| | | coord: "960" |
| | | coord: "960", |
| | | }, |
| | | { |
| | | name: "元朝", |
| | | id: 13, |
| | | coord: "1271" |
| | | coord: "1271", |
| | | }, |
| | | { |
| | | name: "明朝", |
| | | id: 14, |
| | | coord: "1368" |
| | | coord: "1368", |
| | | }, |
| | | { |
| | | name: "清朝", |
| | | id: 15, |
| | | coord: "1636" |
| | | } |
| | | coord: "1636", |
| | | }, |
| | | ], |
| | | // 标题顶部栏需要的东西 |
| | | idIndex: 0, |
| | |
| | | { |
| | | name: "夏", |
| | | color: "#90BBD8", |
| | | id: 1 |
| | | id: 1, |
| | | }, |
| | | { |
| | | name: "商", |
| | | color: "#EDD28B", |
| | | id: 2 |
| | | id: 2, |
| | | }, |
| | | { |
| | | name: "西周", |
| | | color: "#CF746D", |
| | | id: 3 |
| | | id: 3, |
| | | }, |
| | | { |
| | | name: "秦", |
| | | color: "#9CC27A", |
| | | id: 4 |
| | | id: 4, |
| | | }, |
| | | { |
| | | name: "汉", |
| | | color: "#5B6CB9", |
| | | id: 5 |
| | | id: 5, |
| | | }, |
| | | { |
| | | name: "隋", |
| | | color: "#8860A8", |
| | | id: 6 |
| | | id: 6, |
| | | }, |
| | | { |
| | | name: "唐", |
| | | color: "#DE8E66", |
| | | id: 7 |
| | | id: 7, |
| | | }, |
| | | { |
| | | name: "明", |
| | | color: "#DE8E66", |
| | | id: 8 |
| | | } |
| | | id: 8, |
| | | }, |
| | | ], |
| | | // 搜索后是否显示弹框 |
| | | isSearch: false, |
| | |
| | | id: 1, |
| | | name: "李时珍", |
| | | birthAndDeath: "1518-1593", |
| | | source: "国图规范档,CBDB,上图古籍数据库 籍贯:湖北" |
| | | source: "国图规范档,CBDB,上图古籍数据库 籍贯:湖北", |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: "李时珍", |
| | | birthAndDeath: "1518-1593", |
| | | source: "国图规范档,CBDB,上图古籍数据库 籍贯:湖北" |
| | | } |
| | | source: "国图规范档,CBDB,上图古籍数据库 籍贯:湖北", |
| | | }, |
| | | ], |
| | | zoomLevel: 5, |
| | | oldMarkList: [], |
| | | aggregatedData: [], |
| | | openData: null |
| | | openData: null, |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | let times = 0; |
| | | getPreCount({ |
| | | keyword: this.keyword, |
| | | dynasty: this.dynasty1Color |
| | | dynasty: this.dynasty1Color, |
| | | }).then(async (res) => { |
| | | const totalCount = res.object; |
| | | if (totalCount % 200 == 0) { |
| | |
| | | name: item?.NAME[0]?.content1, |
| | | source: "-", |
| | | nativPlace: item?.NATIVE_PLACE[0].content1, |
| | | id: item.id |
| | | id: item.id, |
| | | })); |
| | | this.loading = false; |
| | | this.markerList = markerList; |
| | |
| | | keyword: this.keyword, |
| | | dynasty: this.dynasty1Color, |
| | | page: count, |
| | | pageSize: 200 |
| | | pageSize: 200, |
| | | }); |
| | | if (res.object) { |
| | | let markerList = []; |
| | |
| | | } |
| | | var map = L.map("map", { |
| | | preferCanvas: true, |
| | | attributionControl: false |
| | | attributionControl: false, |
| | | }).setView([34.3227, 108.5525], this.zoomLevel); |
| | | map.on("moveend", this.onMapMoveEnd); |
| | | map.on("zoomend", () => { |
| | |
| | | .chinaProvider("TianDiTu.Normal.Map", { |
| | | key: "76bc34ead7e30e663a4eded8aeaf5860", |
| | | maxZoom: 18, |
| | | minZoom: 3 |
| | | minZoom: 3, |
| | | }) |
| | | .addTo(map); |
| | | L.tileLayer |
| | | .chinaProvider("TianDiTu.Normal.Annotion", { |
| | | key: "76bc34ead7e30e663a4eded8aeaf5860", |
| | | maxZoom: 18, |
| | | minZoom: 3 |
| | | minZoom: 3, |
| | | }) |
| | | .addTo(map); |
| | | this.map = map; |
| | |
| | | 17: 4513.997733376551, |
| | | 18: 2256.9988666882755, |
| | | 19: 1128.4994333441377, |
| | | 20: 564.24971667206887 |
| | | 20: 564.24971667206887, |
| | | }; |
| | | // 根据比例尺计算当前地图1厘米的经纬度差值 |
| | | const cmData = scale[this.zoomLevel] / 100; // 将厘米转换为米 |
| | |
| | | contentY: "", |
| | | xList: [], |
| | | yList: [], |
| | | data: [] |
| | | data: [], |
| | | }; |
| | | obj.xList.push(item.xCoord); |
| | | obj.yList.push(item.yCoord); |
| | |
| | | : "99+" |
| | | }</div>`, |
| | | iconSize: [30, 30], |
| | | className: "map-circle" |
| | | className: "map-circle", |
| | | }); |
| | | const temp_mark = L.marker( |
| | | [aggregatedItem.contentY, aggregatedItem.contentX], |
| | | { |
| | | icon: icon |
| | | icon: icon, |
| | | } |
| | | ); |
| | | this.oldMarkList.push(temp_mark); |
| | |
| | | nativePlace: item?.content1, |
| | | barnch: item?.MEDICAL_BRANCH[0]?.content1, |
| | | medical: item?.BIOGRAPHY, |
| | | id: item.id |
| | | id: item.id, |
| | | }; |
| | | }); |
| | | this.isTop = e.containerPoint.y - 435 + "px"; |
| | |
| | | nativePlace: item?.content1, |
| | | barnch: item?.MEDICAL_BRANCH[0]?.content1, |
| | | medical: item?.BIOGRAPHY, |
| | | id: item.id |
| | | id: item.id, |
| | | }; |
| | | }); |
| | | this.isEchTrue = true; |
| | |
| | | // 查看更多>> |
| | | viewMoreClick(data) { |
| | | uni.navigateTo({ |
| | | url: "/pages/character/detail?id=" + data.id |
| | | url: "/pages/character/detail?id=" + data.id, |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |