Parcourir la source

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

haojianlong il y a 4 ans
Parent
commit
cbc9575774

+ 1 - 1
src/components/edit/attr_select.vue

@@ -480,7 +480,7 @@ export default {
   watch: {
     focusItemList: function(newval) {
       const Item = newval.itemList[0];
-      this.getmajorId = Item.data.Properties.GraphCategoryId;
+      this.getmajorId = Item.data.Properties.InfoSystemId;
       if (Item.data && Item.data.SubType) {
         this.SubType = Item.data.SubType;
       }else{

+ 3 - 1
src/components/edit/edit-dialog.vue

@@ -414,7 +414,9 @@
           }
           this.getQuerySmsxt();
           //如果有专业就带过来
-          this.getQuerySmsxtBy(this.majorId)
+          if(this.majorId){
+            this.getQuerySmsxtBy(this.majorId)
+          }
           this.getPlazaFloor();
 
         }

+ 41 - 13
src/components/edit/leftbar_components/itemTree.vue

@@ -2,19 +2,26 @@
   <div class="treeList">
     <div class="tree-body">
       <a-spin :spinning="spinning">
-      <a-tree
-        v-model="checkedKeys"
-        show-checkbox
-        checkable
-        :expanded-keys="expandedKeys"
-        :auto-expand-parent="autoExpandParent"
-        :selected-keys="selectedKeys"
-        :tree-data="treeData"
-        node-key="id"
-        @expand="onExpand"
-        @select="onSelect"
-        @check="onCheck"
-      />
+        <Tree
+                :multiple="true"
+                :notNull="true"
+                :returnParentNode="false"
+                :data="treeData"
+                @change="onChange"
+        />
+<!--      <a-tree-->
+<!--        v-model="checkedKeys"-->
+<!--        show-checkbox-->
+<!--        checkable-->
+<!--        :expanded-keys="expandedKeys"-->
+<!--        :auto-expand-parent="autoExpandParent"-->
+<!--        :selected-keys="selectedKeys"-->
+<!--        :tree-data="treeData"-->
+<!--        node-key="id"-->
+<!--        @expand="onExpand"-->
+<!--        @select="onSelect"-->
+<!--        @check="onCheck"-->
+<!--      />-->
       </a-spin>
     </div>
 
@@ -70,6 +77,10 @@ export default {
       console.log("onSelect", info);
       this.selectedKeys = selectedKeys;
     },
+      onChange(id){
+          console.log(id);
+          this.checkedKeys = id.checkedIds;
+      },
     queryByGroup() {
       this.spinning = true;
       const data = {
@@ -88,23 +99,29 @@ export default {
           const children = this.mapTree(item.Category);
           newTree.push({
             title: item.Name,
+            name: item.Name,
             id: item.Id,
             key:item.Id,
+            checked: 'uncheck',
             children
           });
         } else {
           newTree.push({
             title: item.Name,
+            name: item.Name,
             id: item.Id,
             key:item.Id,
+            checked: 'uncheck',
             children: []
           });
         }
       });
       newTree.push({
         title: '其他分组',
+        name: '其他分组',
         id: '#',
         key:'#',
+          checked: 'uncheck',
         children: []
       })
       return newTree;
@@ -113,9 +130,20 @@ export default {
     getSelectId(data){
       if(data == 'cancel'){
         this.checkedKeys = this.categoryIdS;
+          this.treeData.map(item=>{
+              if(this.categoryIdS.indexOf(item.id)>-1){
+                  item.checked = 'checked'
+              }else{
+                  item.checked = 'uncheck'
+
+              }
+          })
       }else if(data == 'rest'){
         // this.checkedKeys = [this.categoryId];
         this.checkedKeys = [];
+          this.treeData.map(item=>{
+              item.checked = 'uncheck'
+          })
       }else{
         this.checkedKeys =data;
       }

+ 3 - 2
src/components/mapClass/EditScence.ts

@@ -93,7 +93,6 @@ export class EditScence extends SGraphScene {
     };
     set setlegend(obj: any) {
         this._legend = obj;
-        console.log('aaaaaa', obj)
     }
     /** fid=>item映射,由解析器存入   */
     fidToItem = {}
@@ -426,6 +425,7 @@ export class EditScence extends SGraphScene {
      */
     addIconItem(event: SMouseEvent): void {
         //获取信息工程化相关参数
+        const InfoSystemId = this._legend.InfoSystemId ? this._legend.InfoSystemId  :''
         const LegendData: Legend = {
             ID: uuid(),
             Name: this._legend.Name,
@@ -446,7 +446,8 @@ export class EditScence extends SGraphScene {
                 sHeight: 24,   //icon 的高
                 font: 12,    //font
                 color: '',  //字体颜色
-                GraphCategoryId: this._legend.GraphCategoryId
+                GraphCategoryId: this._legend.GraphCategoryId,
+                InfoSystemId:InfoSystemId   //信息工程话分类ID分类
             },
         }
         const item = new SImageLegendItem(null, LegendData);

+ 1 - 0
src/lib/items/SImageLegendItem.ts

@@ -39,6 +39,7 @@ export class SImageLegendItem extends SIconTextItem {
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent, data.AnchorList);
         this.zOrder = ItemOrder.markOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;

+ 1 - 0
src/lib/items/SImageMarkerItem.ts

@@ -22,6 +22,7 @@ export class SImageMarkerItem extends SImageItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.zOrder = ItemOrder.imageOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;

+ 1 - 0
src/lib/items/STextMarkerItem.ts

@@ -21,6 +21,7 @@ export class STextMarkerItem extends STextItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.zOrder = ItemOrder.textOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;