1
y505174330
2024-05-18 9342d91f064ab3056d0fcfad5ad3f78833e8c536
src/pages/inherit/index.vue
@@ -71,10 +71,7 @@
    </div>
    <div class="contentBox">
      <!-- echarts图 -->
      <div v-if="nodeData.length > 0" class="barChart" ref="barChart"></div>
      <div v-else>
        <el-empty description="暂无数据"></el-empty>
      </div>
      <div class="barChart" ref="barChart" ></div>
      <div
        class="toolBox"
        v-if="showTool"
@@ -101,7 +98,7 @@
      idIndex: 0,
      activeId: 28,
      conditionId: "",
      searchType: "KEYWORD",
      searchType: "DYNASTY",
      dynasty: [],
      nodeData: [],
      showTool: false,
@@ -113,32 +110,27 @@
  onLoad(options) {
    this.idIndex = options.id;
    console.log("optionsoptionsoptions", options.id);
    // getDynasty();
  },
  mounted() {
    this.getStatistics();
    // this.getDynasty();
  },
  methods: {
    getStatistics() {
      inheritMedicalSataStatistics().then((res) => {
        this.dynasty = res.object;
        const defaultDynasty = this.dynasty.find((f) => f.dynasty == "宋");
        this.activeId = defaultDynasty.dynastyId;
        this.searchType = "DYNASTY";
        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,
      }).then((res) => {
        console.log(res);
        for (let i = 0; i < res.object.nodeList.length; i++) {
          const node = res.object.nodeList[i];
          if (
@@ -154,7 +146,7 @@
            });
          }
        }
        console.log(this.nodeData, "nodeData");
        console.log(this.nodeData);
        // 初始化 echarts
        this.initBarChart();
      });