From c028e3f8ea083ed7ef78bf8aaf9f05866661f0dd Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期四, 18 七月 2024 11:19:23 +0800 Subject: [PATCH] 1 --- src/pages/academicSchools/index.vue | 143 ++++++++++++++++++++++++----------------------- 1 files changed, 73 insertions(+), 70 deletions(-) diff --git a/src/pages/academicSchools/index.vue b/src/pages/academicSchools/index.vue index 6c76c81..a37812d 100644 --- a/src/pages/academicSchools/index.vue +++ b/src/pages/academicSchools/index.vue @@ -1,5 +1,5 @@ <template> - <view> + <view style="width: 100%; height: 100%; display: flex; flex-direction: column;"> <headNav :idIndex="'6'" text="瀛︽湳娴佹淳" /> <!-- 楂樼骇鎼滅储 --> <view style="margin-top: 0.1rem"> @@ -26,7 +26,6 @@ </li> </ul> </view> - <view style="margin-left: 0.2rem">涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�</view> <!-- 鍏崇郴琛ㄥ湴鍥� --> <div id="relation" @@ -54,7 +53,7 @@ import { getPersonData, getHotSearch, - getPDataStatistics, + getPDataStatistics } from "@/api/index.js"; import * as echarts from "echarts"; export default { @@ -74,19 +73,19 @@ type: "input", label: "濮撳悕", name: "name", - value: "", + value: "" }, { type: "input", label: "鍒悕", name: "alias", - value: "", + value: "" }, { type: "input", label: "绫嶈疮", name: "location", - value: "", + value: "" }, { type: "select", @@ -96,15 +95,15 @@ options: [ { label: "鏈寚鏄�", - value: "UNKNOWN", - }, - ], + value: "UNKNOWN" + } + ] }, { type: "input", label: "瀹樿亴", name: "office", - value: "", + value: "" }, { type: "select", @@ -114,43 +113,43 @@ options: [ { label: "鏈寚鏄�", - value: "UNKNOWN", + value: "UNKNOWN" }, { label: "鐢�", - value: "MALE", + value: "MALE" }, { label: "濂�", - value: "WOMAN", - }, - ], + value: "WOMAN" + } + ] }, { type: "input", label: "鏃舵湡", name: "period", - value: "", + value: "" }, { type: "input", label: "鏈烘瀯", name: "inst", - value: "", + value: "" }, { type: "number", label: "椤电爜", name: "page", - value: "", + value: "" }, { type: "number", label: "椤靛ぇ灏�", name: "pageSize", - value: "", - }, - ], + value: "" + } + ] }, // 涓嬮潰鐨勬湞浠�1 dynastyColor: 1, @@ -159,79 +158,79 @@ { 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" + } ], // 鐑棬鎼滅储 hotKeyList: [], @@ -242,7 +241,7 @@ // 浜虹墿淇℃伅 infoOfPersons: [], // 褰撳墠浜虹墿淇℃伅 - ownInfo: null, + ownInfo: null }; }, mounted() { @@ -271,7 +270,7 @@ relationTypeName: ele.relationTypeName, name1: this.ownInfo?.NAME[0]?.content1, name2: personInfo?.NAME[0]?.content1, - category: type, + category: type }; newArr.push(obj); if (ele[str] && ele[str]?.length) { @@ -332,20 +331,20 @@ this.nodes.push({ name: item.name1, id: item.id1, - ...item, + ...item }); } if (item.name2 && exists2 !== true) { this.nodes.push({ name: item.name2, id: item.id2, - ...item, + ...item }); } let obj = { source: item.name1, target: item.name2, - relation: item.relationTypeName || "", // 濡傛灉瀛樺湪 relationName 瀛楁鍒欎娇鐢紝鍚﹀垯涓虹┖瀛楃涓� + relation: item.relationTypeName || "" // 濡傛灉瀛樺湪 relationName 瀛楁鍒欎娇鐢紝鍚﹀垯涓虹┖瀛楃涓� }; this.relationships.push(obj); }); @@ -430,8 +429,8 @@ borderRadius: 30, position: "middle", // 璁剧疆鏍囩鏂囨湰鍦ㄧ嚎鐨勪腑闂翠綅缃笂灞呬腑鏄剧ず // z: -1, // 璁剧疆鏍囩鐨剒杞撮珮搴︼紝浣垮叾姣旇繛鎺ョ嚎鏇撮珮 - distance: -10, // 灏嗘爣绛炬斁缃湪杩炴帴绾夸笂 - }, + distance: -10 // 灏嗘爣绛炬斁缃湪杩炴帴绾夸笂 + } }); } } @@ -441,11 +440,11 @@ return { name: node.name, id: node.id, - itemStyle: { - color: "#eae0eb", // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� - borderWidth: BorderWidth, - borderColor: "#996f9f", - }, + // itemStyle: { + // color: "#eae0eb", // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� + // borderWidth: BorderWidth, + // borderColor: "#996f9f" + // } }; }); @@ -461,15 +460,15 @@ // }, subtextStyle: { fontSize: FontSize, // 璁剧疆鍓爣棰樻枃瀛楀ぇ灏忎负 14px - color: "#2C2C2C", - }, + 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 鎴栬�呯櫨鍒嗘瘮 + position: "center center" // 鑳屾櫙鍥剧墖鐨勪綅缃紝鍙互鏄� top, bottom, middle 鎴栬�呯櫨鍒嗘瘮 }, tooltip: {}, legend: [ @@ -477,8 +476,8 @@ // selectedMode: 'single', data: this.categories.map(function (a) { return a.name; - }), - }, + }) + } ], animationDurationUpdate: 1500, animationEasingUpdate: "quinticInOut", @@ -520,27 +519,27 @@ name: "Les Miserables", type: "graph", legendHoverLink: false, - layout: "none", + layout: 'force', data: nodeData, links: links, categories: this.categories, roam: true, label: { position: "right", - formatter: "{b}", + formatter: "{b}" }, lineStyle: { color: "source", - curveness: 0.3, + curveness: 0.3 }, emphasis: { focus: "adjacency", lineStyle: { - width: 10, - }, - }, - }, - ], + width: 10 + } + } + } + ] }; // 灏嗙敓鎴愮殑杩炴帴绾挎坊鍔犲埌echarts鍥捐〃鐨刼ption涓� // option.series[0].links = links; @@ -551,7 +550,7 @@ this.spaceTimeArr(params.data.id); } }); - console.log(option,'option') + console.log(option, "option"); myChart.setOption(option); }, // 鍩虹鎼滅储 @@ -570,28 +569,28 @@ getAdvanceSearch({ ...val, page: 1, - pageSize: 100, + pageSize: 100 }).then((res) => { console.log(res, "res"); }); }, advancedSearchBack() { uni.navigateTo({ - url: "/pages/knowledgeBase/knowledgeBase", + url: "/pages/knowledgeBase/knowledgeBase" }); }, // 鐐瑰嚮涓嬮潰鐨勬湞浠f寜閽� dynastyBottomClick(item) { this.dynastyColor = item.id; this.onSearch({ - text: item.name, + text: item.name }); }, // 鍏崇郴鍥� 鐐瑰嚮閲岄潰鐨勫厓绱� spaceTimeArr(id) { // 鍏崇郴鍥剧殑鏁版嵁 uni.navigateTo({ - url: "/pages/character/detail?id=" + id, + url: "/pages/character/detail?id=" + id }); }, // 鑾峰彇鏈濅唬echarts鐨勬暟鎹� @@ -630,19 +629,23 @@ const options = res.object.occupationStatistic.details.map( (item) => ({ label: item.tagName, - value: item.tagId.toString(), // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� + value: item.tagId.toString() // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� }) ); // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� this.$set(this.From.from[professionIndex], "options", options); } }); - }, - }, + } + } }; </script> <style> +#relatio { + width: 100%; + height: 100%; +} @media screen and (min-width: 2560px) and (max-width: 3840px) { } -- Gitblit v1.9.1