소스 검색

1.url参数 mock参数
2.管架桥线 gjqxList mockData

yx 4 년 전
부모
커밋
1eed8fde13
5개의 변경된 파일73개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 0
      src/components/baseEditer.vue
  2. 8 1
      src/components/edit/left_toolbar.vue
  3. 2 0
      src/components/edit/top_toolbar.vue
  4. 59 1
      src/components/equipmentMockData.js
  5. 2 0
      src/components/urlMsg.js

+ 2 - 0
src/components/baseEditer.vue

@@ -924,6 +924,8 @@ export default {
         // const route = href.split("?")[0];
         // 参数处理
         let params = href.split('?')[1]
+        // mock参数
+params = 'categoryId%3DGDXT%26projectId%3D1000423%26BuildingID%3D1%26FloorID%3Df1%26FloorName%3DF1%26fmapID%3D1000423_124%26seq%3D100%26token%3DC8A3AC652FC7C3AF7FCDA19A6B14994'
         if (!params) {
             // 参数有问题
             return false

+ 8 - 1
src/components/edit/left_toolbar.vue

@@ -348,6 +348,13 @@ export default {
                     this.itemList = require('../equipmentMockData.js').eqipList
                     return true
                 }
+                // 管架桥线 使用mock数据
+                if(item.type === 'Line'){
+                    this.spinning = false
+                    this.itemList =  require('../equipmentMockData.js').gjqxList
+                    console.log(this.itemList)
+                    return true
+                }
                 queryGroup(data).then(res => {
                     this.itemList = res.Data;
                 });
@@ -358,7 +365,7 @@ export default {
 
                 graphElementGroup(arr).then(res => {
                     this.spinning = false;
-                    res.Data.map(item => {
+                    res.Data && res.Data.map(item => {
                         this.itemList.push(item);
                     });
                 });

+ 2 - 0
src/components/edit/top_toolbar.vue

@@ -373,6 +373,8 @@ export default {
         // const route = href.split("?")[0];
         // 参数处理
         let params = href.split("?")[1];
+        // mock参数
+params = 'categoryId%3DGDXT%26projectId%3D1000423%26BuildingID%3D1%26FloorID%3Df1%26FloorName%3DF1%26fmapID%3D1000423_124%26seq%3D100%26token%3DC8A3AC652FC7C3AF7FCDA19A6B14994'
         if (!params) {
             // 参数有问题
             return false;

+ 59 - 1
src/components/equipmentMockData.js

@@ -620,4 +620,62 @@ let eqipList = [
         Name: '设备列表2',
     }, */
 ]
-export { eqipList }
+// 管架桥线
+let gjqxList = [
+    {
+        GraphCategoryId: 'GDXT',
+        GraphElements: [
+            {
+                Color: '#4DAE6C',
+                Deleted: false,
+                FillColor: '#ffffff',
+                GraphCategoryId: 'GDXT',
+                Id: '100110',
+                InfoLocal: [
+                    {
+                        name: '供配电系统/供配电系统/干线设备/母线',
+                        id: '2092',
+                        type: '2',
+                    },
+                    {
+                        name: '供配电系统/供配电系统/干线设备/电缆',
+                        id: '2095',
+                        type: '2',
+                    },
+                ],
+                InfoTypeId: [],
+                LineDash: 'solid',
+                LineWidth: 3,
+                Name: '母线',
+                OrderId: 6,
+                Type: 'Line',
+                Unit: '--',
+                Url: 'b5ebdcce645c441a8864a8a4d67bc93d',
+            },
+            {
+                Color: '#E89926',
+                Deleted: false,
+                FillColor: '#ffffff',
+                GraphCategoryId: 'GDXT',
+                Id: '100111',
+                InfoLocal: [
+                    {
+                        name: '供配电系统/供配电系统/干线设备/桥架',
+                        id: '2094',
+                        type: '2',
+                    },
+                ],
+                InfoTypeId: [],
+                LineDash: 'solid',
+                LineWidth: 3,
+                Name: '强电桥架',
+                OrderId: 7,
+                Type: 'Line',
+                Unit: '--',
+                Url: 'a2ba811a17574f7a80754572cf8cf598',
+            },
+        ],
+        Name: '供电系统',
+    },
+]
+export { eqipList, gjqxList }

+ 2 - 0
src/components/urlMsg.js

@@ -4,6 +4,8 @@ export function getUrlMsg() {
 // const route = href.split("?")[0];
 // 参数处理
 let params = href.split("?")[1];
+// mock参数
+params = 'categoryId%3DGDXT%26projectId%3D1000423%26BuildingID%3D1%26FloorID%3Df1%26FloorName%3DF1%26fmapID%3D1000423_124%26seq%3D100%26token%3DC8A3AC652FC7C3AF7FCDA19A6B14994'
 if (!params) {
     // 参数有问题
     return false;