Browse Source

editer:fix>调试设备属性栏

YaolongHan 4 years ago
parent
commit
eccd6e8763

+ 0 - 1
src/components/editview/leftToolBar/equipmentList.vue

@@ -239,7 +239,6 @@ export default {
     const boxPorfess = document.getElementById("boxPorfess");
     if (dombox) {
       boxPorfess.style.height = dombox.offsetHeight - 90 + "px";
-      console.log("boxPorfess", boxPorfess.style);
     }
   },
 };

+ 15 - 6
src/components/editview/rightPropertyBar/BaseEquipment.vue

@@ -101,7 +101,7 @@
                 :checked="a.checked ? 'checked' : 'uncheck'"
                 @change="changeCheck(a)"
               />
-              <p>{{ a.msgName }}</p>
+              <p>{{ a.name }}</p>
             </li>
           </ul>
         </div>
@@ -110,17 +110,15 @@
   </div>
 </template>
 <script>
-import { msgData } from "./msgData.js";
 import { queryEquipMsg, queryDict } from "@/api/editer";
 export default {
-  props: ["InfoPointList", "EquipData"],
+  props: ["InfoPointList", "EquipData", "equipHeight"],
   data() {
     return {
       activeName: "first",
       width: "",
       height: "",
       checked1: "checked",
-      isShow: true,
       msgData: [],
       pressMsgData: [], // 搜索后得信息点数组
       getPressMsg: "", //输入信息
@@ -132,7 +130,13 @@ export default {
       item.showChildren = !item.showChildren;
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      // 设置高度
+      if (tab.paneName == "second") {
+        const box = document.getElementsByClassName("msgPoint-list")[0];
+        const box2 = document.getElementsByClassName("msgPoint-list-press")[0];
+        box.style.height = this.equipHeight;
+        box2.style.height = this.equipHeight;
+      }
     },
     changeWidth() {},
     changeHeight() {},
@@ -151,7 +155,7 @@ export default {
       // 对信息点相同得提取出来
       this.msgData.forEach((item) => {
         item.children.forEach((a) => {
-          if (a.msgName.includes(this.getPressMsg)) {
+          if (a.name.includes(this.getPressMsg)) {
             list.push(a);
           }
         });
@@ -185,6 +189,7 @@ export default {
             return item;
           });
         }
+        this.msgData = msgData;
         //  生成二级树
         msgData.forEach((item) => {
           const itemTag = item.secondTag
@@ -248,6 +253,7 @@ export default {
       });
     },
   },
+  mounted() {},
 };
 </script>
 <style lang="less" scoped>
@@ -301,6 +307,8 @@ p {
     box-sizing: border-box;
     .msgPoint-list {
       margin-top: 20px;
+      height: 100%;
+      overflow-y: scroll;
       .type-list {
         .type-title {
           cursor: pointer;
@@ -330,6 +338,7 @@ p {
     }
     .msgPoint-list-press {
       margin-top: 12px;
+      overflow-y: scroll;
       li {
         display: flex;
         height: 40px;

+ 6 - 2
src/components/editview/rightPropertyBar/property.vue

@@ -45,6 +45,7 @@
       :InfoPointList="infoPointList"
       :EquipData="EquipData"
       v-show="itemType == 'BaseEquipment'"
+      :equipHeight="equipHeight"
     ></BaseEquipment>
   </div>
 </template>
@@ -98,9 +99,12 @@ export default {
       end: "", //结尾样式
       infoPointList: [], //设备--信息点数组
       EquipData: {}, //设备 id
+      equipHeight: "", // 设备属性栏得高度
     };
   },
   mounted() {
+    const box = document.getElementsByClassName("propertys")[0];
+    this.equipHeight = box.offsetHeight - 150 + "px";
     bus.$on("emitChoice", this.emitChoice);
   },
   methods: {
@@ -119,7 +123,6 @@ export default {
       }
       // 同步联动样式
       this.linkStyle(itemList);
-      console.log("itemList", itemList);
     },
     // 同步样式
     linkStyle(itemList) {
@@ -130,7 +133,6 @@ export default {
         this.lineWidth = item.lineWidth;
         this.begin = arrowType[item.begin];
         this.end = arrowType[item.end];
-        console.log(this.begin, this.end);
       } else if (
         this.itemType == "BaseText" ||
         this.itemType == "BaseExplain"
@@ -179,5 +181,7 @@ export default {
 </script>
 <style lang="less" scoped>
 .propertys {
+  width: 100%;
+  height: 100%;
 }
 </style>