소스 검색

新增模拟参数

YaolongHan 4 년 전
부모
커밋
6fd29827f3
2개의 변경된 파일7588개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      docs/.vuepress/components/tuopu/baseTopu1.vue
  2. 7585 0
      docs/.vuepress/components/tuopu/data/data1.js

+ 3 - 4
docs/.vuepress/components/tuopu/baseTopu1.vue

@@ -13,6 +13,7 @@
 import { SGraphView, SGraphScene } from "@persagy-web/graph";
 import { PTopoParser } from "./PTopoParser";
 import axios from "axios";
+import { data } from "./data/data1.js"; //模拟接口返回参数
 export default {
   data() {
     return {
@@ -29,8 +30,6 @@ export default {
       this.view ? (this.view.scene = this.scene) : null;
       // 获取压缩包数据并解压
       this.getMapBlob();
-
-
     },
 
     // 请求获取地图的压缩包
@@ -63,8 +62,8 @@ export default {
       const parse = new PTopoParser();
 
       // 获取数据解析数据再将转化得实例添加到场景中
-
-      parse.parseData(res.data.content.elements);
+      // 测试数据
+      parse.parseData(data.content.elements);
       parse.markers.forEach((item) => {
         this.scene.addItem(item);
       });

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 7585 - 0
docs/.vuepress/components/tuopu/data/data1.js