allen 2 年之前
父節點
當前提交
1dbc13044f
共有 1 個文件被更改,包括 14 次插入4 次删除
  1. 14 4
      src/views/repair/noun/detail.vue

+ 14 - 4
src/views/repair/noun/detail.vue

@@ -2,8 +2,9 @@
     <div class="app-container">
         <div class="nuonClass">
             <p v-html="selected.msg"></p>
+            <Graph ref="charts" :chartList="searchList"></Graph>
         </div>
-        <Chart
+        <!-- <Chart
             ref="chart"
             @changeRoot="redrawChart"
             @c_click="getInfoTooltip"
@@ -19,7 +20,8 @@
             @delete="delNode"
             :minWid="600"
             :minHie="400"
-        />
+        /> -->
+        
     </div>
 </template>
 <style scoped>
@@ -33,10 +35,12 @@
 </style>
 <script>
 import Chart from "@/views/knowledge/common/chart";
+import Graph from "@/components/Echarts/graph.vue";
 import test from "@/views/repair/noun/test.json";
+import fiveAircraft from "@/views/repair/noun/5aircraft.json"
 export default {
     name: "NounDetail",
-    components: {Chart},
+    components: { Chart, Graph},
     data() {
         return {
             nodes: [],
@@ -85,6 +89,7 @@ export default {
             ],
             selected: {},
             graph: {},
+            searchList:{},
         }
     },
     created() {
@@ -97,7 +102,12 @@ export default {
                 this.selected = data;
             }
         }
-        this.redrawChart();
+        if(this.selected.id === "2"){
+            this.searchList = fiveAircraft
+        }else{
+            this.searchList = {}
+        }
+        // this.redrawChart();
     },
     methods: {
         /**