From 9342d91f064ab3056d0fcfad5ad3f78833e8c536 Mon Sep 17 00:00:00 2001 From: y505174330 <505174330@qq.com> Date: 星期六, 18 五月 2024 17:20:14 +0800 Subject: [PATCH] 1 --- src/pages/inherit/index.vue | 36 +++++++++++++++++------------------- 1 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/pages/inherit/index.vue b/src/pages/inherit/index.vue index 88a8415..fcb2093 100644 --- a/src/pages/inherit/index.vue +++ b/src/pages/inherit/index.vue @@ -71,7 +71,7 @@ </div> <div class="contentBox"> <!-- echarts鍥� --> - <div class="barChart" ref="barChart"></div> + <div class="barChart" ref="barChart" ></div> <div class="toolBox" v-if="showTool" @@ -88,7 +88,7 @@ import * as echarts from "echarts"; import { inheritMedicalSataStatistics, - inheritMedicalList + inheritMedicalList, } from "@/api/index.js"; export default { data() { @@ -96,43 +96,41 @@ // 鏍囬椤堕儴鏍忛渶瑕佺殑涓滆タ keyword: "", idIndex: 0, - activeId: "", + activeId: 28, conditionId: "", - searchType: "KEYWORD", + searchType: "DYNASTY", dynasty: [], nodeData: [], showTool: false, toolTop: 0, toolLeft: 0, - toolInfo: {} + toolInfo: {}, }; }, onLoad(options) { this.idIndex = options.id; console.log("optionsoptionsoptions", options.id); - getDynasty() }, mounted() { this.getStatistics(); - this.getData(); - this.getDynasty() - }, methods: { getStatistics() { inheritMedicalSataStatistics().then((res) => { this.dynasty = res.object; + this.getData(); }); }, getData() { this.nodeData = []; + // const defaultDynasty = this.dynasty.find(f.dynasty == "瀹�"); + // this.activeId = defaultDynasty.dynastyId inheritMedicalList({ keywords: this.keyword, dynastyId: this.activeId, searchType: this.searchType, - path: this.conditionId + path: this.conditionId, }).then((res) => { - console.log(res); for (let i = 0; i < res.object.nodeList.length; i++) { const node = res.object.nodeList[i]; if ( @@ -143,8 +141,8 @@ itemStyle: { color: "#F8E2D7", borderColor: "#F3AA78", - borderWidth: "3" - } + borderWidth: "3", + }, }); } } @@ -254,7 +252,7 @@ this.toolLeft = params.event.offsetX + "px"; this.toolInfo = { id: params.data.identifier, - name: encodeURIComponent(params.data.name) + name: encodeURIComponent(params.data.name), }; } else { this.showTool = false; @@ -265,7 +263,7 @@ switch (type) { case 1: uni.navigateTo({ - url: "/pages/character/detail?id=" + this.toolInfo.id + url: "/pages/character/detail?id=" + this.toolInfo.id, }); break; case 2: @@ -276,7 +274,7 @@ "&id=" + this.toolInfo.id + "&name=" + - this.toolInfo.name + this.toolInfo.name, }); break; case 3: @@ -287,7 +285,7 @@ "&id=" + this.toolInfo.id + "&name=" + - this.toolInfo.name + this.toolInfo.name, }); break; } @@ -327,8 +325,8 @@ this.keyword = ""; } this.getData(); - } - } + }, + }, }; </script> <style scoped> -- Gitblit v1.9.1