From 01cf3af5a11fd91225358496a650841ca443ad1e Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期三, 24 七月 2024 11:19:36 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary

---
 src/pages/academicSchools/index.vue |  198 +++++++++++++++++++++++++++++++++----------------
 src/pages/territory/territory.vue   |    3 
 src/pages/inherit/list.vue          |   14 +--
 3 files changed, 137 insertions(+), 78 deletions(-)

diff --git a/src/pages/academicSchools/index.vue b/src/pages/academicSchools/index.vue
index 39e8061..b77bb62 100644
--- a/src/pages/academicSchools/index.vue
+++ b/src/pages/academicSchools/index.vue
@@ -217,6 +217,21 @@
       </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"
@@ -326,7 +341,26 @@
       hotKeyList: [],
       searchKey: "",
       // 鍒嗙被
-      categories: [],
+      categories: [
+        {
+          name: "浜插睘鍏崇郴"
+        },
+        {
+          name: "甯堟壙鍏崇郴"
+        },
+        {
+          name: "鏂囩尞浣滃搧"
+        },
+        {
+          name: "绀句細鍏崇郴"
+        },
+        {
+          name: "娲诲姩鍦�"
+        },
+        {
+          name: "瀛︽湳娴佹淳"
+        }
+      ],
       // 褰撳墠浜虹墿淇℃伅
       ownInfo: null,
       detailData: {
@@ -799,11 +833,9 @@
                 );
                 if (p) {
                   this.nodeDatas.push({
+                    category: 0,
                     id: item.mainId,
-                    name: p.NAME[0].content1,
-                    itemStyle: {
-                      color: "#5470c6",
-                    },
+                    name: p.NAME[0].content1
                   });
                 }
               }
@@ -830,11 +862,9 @@
                 -1
               ) {
                 this.nodeDatas.push({
+                  category: 2,
                   id: item.mainId,
-                  name: item.literatureName,
-                  itemStyle: {
-                    color: "#fac858",
-                  },
+                  name: item.literatureName
                 });
               }
               this.links.push({
@@ -849,11 +879,9 @@
                 -1
               ) {
                 this.nodeDatas.push({
+                  category: 4,
                   id: item.mainId,
-                  name: item.ancientName,
-                  itemStyle: {
-                    color: "#ea7ccc",
-                  },
+                  name: item.ancientName
                 });
               }
               this.links.push({
@@ -870,16 +898,11 @@
                 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]
                   });
                 }
               }
@@ -899,11 +922,9 @@
                 );
                 if (p) {
                   this.nodeDatas.push({
+                    category: 3,
                     id: item.mainId,
-                    name: p.NAME[0].content1,
-                    itemStyle: {
-                      color: "#ee6666",
-                    },
+                    name: p.NAME[0].content1
                   });
                 }
               }
@@ -934,11 +955,9 @@
                 );
                 if (p) {
                   this.nodeDatas.push({
+                    category: 1,
                     id: item.mainId,
-                    name: p.NAME[0].content1,
-                    itemStyle: {
-                      color: "#3dae7b",
-                    },
+                    name: p.NAME[0].content1
                   });
                 }
               }
@@ -1051,7 +1070,7 @@
             symbolSize: 15,
             data: this.nodeDatas,
             links: this.links,
-            categories: [{}],
+            categories: this.categories,
             roam: true,
             label: {
               show: true,
@@ -1074,10 +1093,18 @@
             },
             force: {
               repulsion: 600,
-              edgeLength: 300,
-            },
-          },
+              edgeLength: 300
+            }
+          }
         ],
+        color: [
+          "#5470c6",
+          "#3dae7b",
+          "#fac858",
+          "#ee6666",
+          "#ea7ccc",
+          "#9a60b4"
+        ]
       };
       // 璁剧疆鐐瑰嚮浜嬩欢鐩戝惉
       myChart.off("click");
@@ -1090,39 +1117,80 @@
     },
 
     creatDom(params) {
-      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
-      );
-      const obj = {
-        id: params.data.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;
+      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 == 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,
+          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;
+      }
     },
 
     closeDom() {
diff --git a/src/pages/inherit/list.vue b/src/pages/inherit/list.vue
index 6e98240..109c6f9 100644
--- a/src/pages/inherit/list.vue
+++ b/src/pages/inherit/list.vue
@@ -286,7 +286,8 @@
       if (dataList && dataList.length) {
         const G6Data = dataList.map((f) => {
           return {
-            id: f.name,
+            id: f.value + "-" + f.name,
+            name: f.name,
             personId: f.personId,
             relationInfo: f?.relationInfo?.relation
               ? f.relationInfo.relation
@@ -307,6 +308,7 @@
       const data = {
         isRoot: true,
         id: this.dataList.name,
+        name:this.dataList.name,
         style: {
           fill: "red"
         },
@@ -324,14 +326,6 @@
         linkCenter: true,
         modes: {
           default: [
-            // {
-            //   type: "collapse-expand",
-            //   onChange: function onChange(item, collapsed) {
-            //     const data = item.get("model");
-            //     data.collapsed = collapsed;
-            //     return true;
-            //   },
-            // },
             "drag-canvas",
             "zoom-canvas"
           ]
@@ -374,7 +368,7 @@
             fill: node.relationType ? "#EDF4FF" : "#FCEFE3",
             stroke: node.relationType ? "#5E7AA7" : "#D3791E"
           },
-          label: node.id,
+          label: node.name,
           labelCfg: {
             position: "center",
             offset: 5,
diff --git a/src/pages/territory/territory.vue b/src/pages/territory/territory.vue
index 4f8e055..d7a2790 100644
--- a/src/pages/territory/territory.vue
+++ b/src/pages/territory/territory.vue
@@ -314,10 +314,8 @@
 <!-- <script src="https://api.map.baidu.com/api?v=3.0&ak=5USVDAhhS4ssz44HLq3gNPZai7naXf4Q&callback=initializeMap"></script> -->
 <!-- 5USVDAhhS4ssz44HLq3gNPZai7naXf4Q -->
 <script>
-import { loadBMap } from "@/static/map.js";
 import L from "leaflet";
 import "leaflet.chinatmsproviders";
-import * as echarts from "echarts";
 import "echarts/extension/bmap/bmap";
 import {
   getRetrieval,
@@ -512,7 +510,6 @@
   },
   mounted() {
     this.getDynastyList();
-
     this.getDataList();
     this.getHaveDataDynasty();
   },

--
Gitblit v1.9.1