| | |
| | | </div> |
| | | <div class="contentBox"> |
| | | <!-- echarts图 --> |
| | | <div class="barChart" ref="barChart"></div> |
| | | <div class="barChart" ref="barChart" ></div> |
| | | <div |
| | | class="toolBox" |
| | | v-if="showTool" |
| | |
| | | import * as echarts from "echarts"; |
| | | import { |
| | | inheritMedicalSataStatistics, |
| | | inheritMedicalList |
| | | inheritMedicalList, |
| | | } from "@/api/index.js"; |
| | | export default { |
| | | data() { |
| | |
| | | // 标题顶部栏需要的东西 |
| | | 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++) { |
| | |
| | | itemStyle: { |
| | | color: "#F8E2D7", |
| | | borderColor: "#F3AA78", |
| | | borderWidth: "3" |
| | | } |
| | | borderWidth: "3", |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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: |
| | |
| | | "&id=" + |
| | | this.toolInfo.id + |
| | | "&name=" + |
| | | this.toolInfo.name |
| | | this.toolInfo.name, |
| | | }); |
| | | break; |
| | | case 3: |
| | |
| | | "&id=" + |
| | | this.toolInfo.id + |
| | | "&name=" + |
| | | this.toolInfo.name |
| | | this.toolInfo.name, |
| | | }); |
| | | break; |
| | | } |
| | |
| | | this.keyword = ""; |
| | | } |
| | | this.getData(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |