Prechádzať zdrojové kódy

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-editer into develop

YaolongHan 4 rokov pred
rodič
commit
864c53a43d

+ 8 - 0
src/api/editer.js

@@ -88,4 +88,12 @@ export function publishGraph(params){
 // 查询设备台账
 export function queryGlsmsAsset(data,params){
     return httputils.fetchJson(`${dataApi}/data/glsms_asset/query`,data, params)
+}
+// 查询工程信息化信息
+export function queryInfoSystem(params){
+    return httputils.postJson(`${testApi}/infoSystem/query`, params)
+}
+// 图例搜索
+export function graphElementGroup(params){
+    return httputils.postJson(`${testApi}/infoSystem/graphElementGroup`, params)
 }

+ 5 - 5
src/components/edit/left_toolbar.vue

@@ -57,8 +57,8 @@
     </ul>
 
     <a-popover trigger="click" placement="rightBottom" v-model="drawerVisible" >
-      <template slot="content">
-        <itemTree @getSelectId="getSelectId" :categoryIdS="categoryIdS" :key="new Date().getTime()" :categoryId="categoryId"></itemTree>
+      <template slot="content" >
+        <itemTree @getSelectId="getSelectId" :drawerVisible="drawerVisible" :categoryIdS="categoryIdS"  :categoryId="categoryId"></itemTree>
       </template>
       <div class="bottom-item">
         <a-icon type="ellipsis" />
@@ -128,7 +128,7 @@
 </template>
 <script>
 import itemTree from "./leftbar_components/itemTree";
-import { queryByGroup } from "@/api/editer.js";
+import { graphElementGroup} from "@/api/editer.js";
 import bus from "@/bus";
 import { queryGroup } from "@/api/editer.js";
 import { mapState, mapActions } from "vuex";
@@ -314,10 +314,10 @@ export default {
         // 接口请求
         this.spinning = true;
         const arr = {
-          GraphCategoryIds: this.categoryIdS,
+          InfoSystems: this.categoryIdS,
           Type: item.type
         };
-        queryGroup(arr).then(res => {
+        graphElementGroup(arr).then(res => {
           this.spinning = false;
           this.itemList = res.Data;
         });

+ 17 - 2
src/components/edit/leftbar_components/itemTree.vue

@@ -26,7 +26,7 @@
   </div>
 </template>
 <script>
-import { queryByGroup } from "@/api/editer.js";
+import { queryInfoSystem} from "@/api/editer.js";
 const treeData = [];
 export default {
   data() {
@@ -42,10 +42,16 @@ export default {
   props:{
     categoryIdS:Array,
     categoryId:String,
+    drawerVisible:Boolean
   },
   watch: {
     checkedKeys(val) {
       this.checkedKeys = val;
+    },
+    drawerVisible(val){
+      if(!val){
+        this.checkedKeys =this.categoryIdS;
+      }
     }
   },
   methods: {
@@ -66,7 +72,10 @@ export default {
     },
     queryByGroup() {
       this.spinning = true;
-      queryByGroup().then(res => {
+      const data = {
+        "Orders": "orderId asc",
+      }
+      queryInfoSystem(data).then(res => {
         this.spinning = false;
         this.treeData = this.mapTree(res.Content);
         this.checkedKeys = this.categoryIdS;
@@ -92,6 +101,12 @@ export default {
           });
         }
       });
+      newTree.push({
+        title: '其他分组',
+        id: '#',
+        key:'#',
+        children: []
+      })
       return newTree;
     },
     //确定

+ 6 - 6
src/lib/items/SImageLegendItem.ts

@@ -56,6 +56,12 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.Url) {
             this.img.url = data.Properties.Url;
         }
+        if (data.Properties.ImgPos) {
+            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
+        }
+        if (data.Properties.TextPos) {
+            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+        }
         if (data.Properties && data.Properties.sWidth) {
             this.sWidth = data.Properties.sWidth;
         }
@@ -68,12 +74,6 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.color) {
             this.color = new SColor(data.Properties.color);
         }
-        if (data.Properties.ImgPos) {
-            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
-        }
-        if (data.Properties.TextPos) {
-            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
-        }
     }
 
     toData(): Legend {