From b4690c44b00625ed5f52f9ac0428262d229de2e4 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期三, 24 七月 2024 09:53:50 +0800 Subject: [PATCH] 世医传承数据结构调整 --- src/pages/territory/territory.vue | 3 --- src/pages/inherit/list.vue | 14 ++++---------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/pages/inherit/list.vue b/src/pages/inherit/list.vue index a51d860..081a6b1 100644 --- a/src/pages/inherit/list.vue +++ b/src/pages/inherit/list.vue @@ -252,7 +252,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 @@ -274,6 +275,7 @@ const data = { isRoot: true, id: this.dataList.name, + name:this.dataList.name, style: { fill: "red", }, @@ -291,14 +293,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", ], @@ -337,7 +331,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 5485113..43ff9e8 100644 --- a/src/pages/territory/territory.vue +++ b/src/pages/territory/territory.vue @@ -223,10 +223,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, @@ -416,7 +414,6 @@ }, mounted() { this.getDynastyList(); - this.getDataList(); this.getHaveDataDynasty(); }, -- Gitblit v1.9.1