From c99cfa08505196fd6ba4d0ea8bd4dcf7a1fb268e Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期五, 07 六月 2024 16:27:53 +0800 Subject: [PATCH] 1 --- src/pages/character/detail.vue | 97 ++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 80 insertions(+), 17 deletions(-) diff --git a/src/pages/character/detail.vue b/src/pages/character/detail.vue index 10fcf40..e2f199c 100644 --- a/src/pages/character/detail.vue +++ b/src/pages/character/detail.vue @@ -290,11 +290,16 @@ <span>鐩稿叧闄勮〃/鍥惧儚</span> </div> <view> - <div class="flex"> + <div style="overflow: auto"> <el-image v-for="item in imageList" :key="item" - style="width: 2.05rem; height: 2.4rem" + style=" + width: 2.05rem; + height: 2.4rem; + margin-right: 0.2rem; + margin-bottom: 0.1rem; + " :src="item" fit="fill" ></el-image> @@ -318,7 +323,7 @@ > <span>鐜颁唬鐮旂┒</span> </div> - <ul class="font-family" style="font-size: 0.13rem; line-height: 2"> + <ul class="fileul" style="font-size: 0.13rem; line-height: 2"> <li style="cursor: pointer" v-for="(item, index) in personResearchList" @@ -401,6 +406,7 @@ import { getFuzzySearch, getPersonInfo, + getRelationTypeTreeList, getWebBasic, getIntroduction, getSource, @@ -410,7 +416,7 @@ 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"; @@ -535,7 +541,8 @@ }, methods: { copyText() { - const textToCopy = this.biogData[0].content + " 鏉ユ簮锛氫腑鍖诲尰瀛︿汉鐗╃煡璇嗗簱"; + const textToCopy = + this.biogData[0].content + "\n鏉ユ簮锛氫腑鍖诲尰瀛︿汉鐗╃煡璇嗗簱"; const textarea = document.createElement("textarea"); textarea.value = textToCopy; document.body.appendChild(textarea); @@ -553,7 +560,7 @@ window.open(item.url); } if (item.filePath) { - window.open(getFile(item.filePath)); + window.open(getImg(item.filePath)); } }, getData() { @@ -636,7 +643,14 @@ }, { name: "鎵�澶勬椂鏈�", - value: obj.dynastyDesc || "-" + value: obj.dynastyDesc || "-", + valueClick: () => { + uni.navigateTo({ + url: + "/pages/knowledgeBase/knowledgeBase?dynasty=" + + obj.dynastyId + }); + } }, { name: "姘戞棌", @@ -656,7 +670,14 @@ }, { name: "鑱屽畼", - value: obj.official || "-" + value: obj.official || "-", + valueClick: () => { + uni.navigateTo({ + url: + "/pages/knowledgeBase/knowledgeBase?isAdvancedSearch=1&official=" + + obj.official + }); + } }, { name: "娴佹淳", @@ -697,7 +718,11 @@ this.biogData = res.list.map((item) => { return { content: item.content1, - bookName: "銆�" + item.bookName + "銆� " + "P " + item.pageNo // 杩欓噷鍙湁bookid鏃犳硶鍖归厤鍒颁功鍚� + bookName: + "銆�" + + item.bookName + + "銆� " + + (item.pageNo ? "P " + item.pageNo : "") // 杩欓噷鍙湁bookid鏃犳硶鍖归厤鍒颁功鍚� }; }); }); @@ -718,6 +743,10 @@ }); }, getRelationship() { + getRelationTypeTreeList().then((res) => { + console.log(res, "getRelationTypeTreeList"); + console.log(res); + }); // getPersonRelationAtSchool({ // personId: this.detailId, // }).then((res) => { @@ -731,6 +760,13 @@ // }); // } // }); + getPersonInfo({ + id: this.detailId, + type: "PERSON_RELATIONS" + }).then((res) => { + this.tableData4; + console.log(res, "PERSON_RELATIONS"); + }); // 绀句細鍏崇郴 getPersonRelationAtSchool({ personId: this.detailId, @@ -817,15 +853,23 @@ 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(() => { @@ -837,9 +881,16 @@ 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 @@ -854,6 +905,14 @@ 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) { @@ -1500,4 +1559,8 @@ opacity: 0; } } + +.fileul li:hover { + color: #597aa5; +} </style> -- Gitblit v1.9.1