浏览代码

滚动条BUG修复

Koishi 3 年之前
父节点
当前提交
dff2c9456a

+ 14 - 13
src/components/control/areaCard.vue

@@ -36,8 +36,8 @@
       </div>
       </div>
     </div>
     </div>
     <div style="margin-top: 50px; height: 85%" @contextmenu="contextmenu">
     <div style="margin-top: 50px; height: 85%" @contextmenu="contextmenu">
-      <el-scrollbar>
-        <div class="scoll">
+      <div class="scoll currentScroll">
+        <div class="currentScroll" style="height: 100%; overflow-y: scroll">
           <div class="matrix" v-if="startList.length > 0">
           <div class="matrix" v-if="startList.length > 0">
             <div class="problemTitle">启动</div>
             <div class="problemTitle">启动</div>
             <MatrixBlock
             <MatrixBlock
@@ -75,7 +75,7 @@
             </MatrixBlock>
             </MatrixBlock>
           </div>
           </div>
         </div>
         </div>
-      </el-scrollbar>
+      </div>
     </div>
     </div>
     <div v-if="current == 1" class="send" @click="handleSend">发送</div>
     <div v-if="current == 1" class="send" @click="handleSend">发送</div>
     <!-- <div class="success" v-if="showFlag&&current===0">指令发送成功</div> -->
     <!-- <div class="success" v-if="showFlag&&current===0">指令发送成功</div> -->
@@ -112,7 +112,7 @@ export default {
   created: function () {
   created: function () {
     this.initData();
     this.initData();
     this.suggestion();
     this.suggestion();
-    // this.getControlType();
+    this.getControlType();
   },
   },
   emits: ["parentRun"],
   emits: ["parentRun"],
   props: {
   props: {
@@ -145,7 +145,7 @@ export default {
       stationName: "",
       stationName: "",
       // 定时器
       // 定时器
       timer: "",
       timer: "",
-      // controlTypeList: [],
+      controlTypeList: [],
       controlErorCodes: [
       controlErorCodes: [
         "控制成功",
         "控制成功",
         "控制命令发送失败",
         "控制命令发送失败",
@@ -172,13 +172,13 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
-    // getControlType() {
-    //   api.getControlType().then((res) => {
-    //     if (res) {
-    //       this.controlTypeList = res.data;
-    //     }
-    //   });
-    // },
+    getControlType() {
+      api.getControlType().then((res) => {
+        if (res) {
+          this.controlTypeList = res.data;
+        }
+      });
+    },
     control(current) {
     control(current) {
       this.current = current === 0 ? current : current === 1 ? current : 1;
       this.current = current === 0 ? current : current === 1 ? current : 1;
       this.suggestion();
       this.suggestion();
@@ -769,7 +769,7 @@ export default {
     "$store.getters.current": {
     "$store.getters.current": {
       handler: function (json) {
       handler: function (json) {
         this.current = json;
         this.current = json;
-        // this.getControlType();
+        this.getControlType();
         if (json === 0) {
         if (json === 0) {
           let dateList = [];
           let dateList = [];
           this.titleList.forEach((item) => {
           this.titleList.forEach((item) => {
@@ -828,6 +828,7 @@ export default {
 
 
 .body .scoll {
 .body .scoll {
   height: 91%;
   height: 91%;
+  overflow-y: scroll;
 }
 }
 
 
 .title {
 .title {

+ 10 - 2
src/components/control/controlAllArea.vue

@@ -39,17 +39,23 @@
     </div>
     </div>
     <WindturbineDetailPages
     <WindturbineDetailPages
       v-model="dialogVisible"
       v-model="dialogVisible"
-      :showSvg="showSvg"
       @close="handleClose"
       @close="handleClose"
       :svgWeb="svgWeb"
       :svgWeb="svgWeb"
       :windturbine="currentWindturbine"
       :windturbine="currentWindturbine"
     ></WindturbineDetailPages>
     ></WindturbineDetailPages>
+    <StationSvgDetailPages
+    v-model="showSvg"
+    :stationName="stationName"
+    :svgWeb="svgWeb"
+    @close="close"
+  ></StationSvgDetailPages>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import WindturbineDetailPages from "../WindturbineDetailPages.vue";
 import WindturbineDetailPages from "../WindturbineDetailPages.vue";
 import MatrixBlock from "../matrixBlock.vue";
 import MatrixBlock from "../matrixBlock.vue";
+import StationSvgDetailPages from "../stationSvgDetailPages.vue";
 import BackgroundData from "utils/BackgroundData";
 import BackgroundData from "utils/BackgroundData";
 import MessageBridge from "utils/MessageBridge";
 import MessageBridge from "utils/MessageBridge";
 import api from "api/index";
 import api from "api/index";
@@ -58,6 +64,7 @@ export default {
   components: {
   components: {
     WindturbineDetailPages,
     WindturbineDetailPages,
     MatrixBlock,
     MatrixBlock,
+    StationSvgDetailPages,
   },
   },
   props: {
   props: {
     current: {
     current: {
@@ -253,8 +260,9 @@ export default {
         } else if (arr[0] === "CLOSE") {
         } else if (arr[0] === "CLOSE") {
           this.dialogVisible = false;
           this.dialogVisible = false;
         } else if (arr[0] === "OPEN_SYZ") {
         } else if (arr[0] === "OPEN_SYZ") {
+          this.currentWindturbine = this.windturbinelist[arr[1]];
           this.showSvg = true;
           this.showSvg = true;
-          this.dialogVisible = true;
+          this.svgVisible = true;
           this.svgWeb = arr[1];
           this.svgWeb = arr[1];
         } else if (
         } else if (
           arr[0] === "CONTROL_START" ||
           arr[0] === "CONTROL_START" ||

+ 1 - 1
src/components/matrixBlock.vue

@@ -15,7 +15,7 @@
       :key="index"
       :key="index"
       @click="onSelectHandler(item)"
       @click="onSelectHandler(item)"
       @dblclick="sendMsg(item)"
       @dblclick="sendMsg(item)"
-      style="margin-right: 15px"
+      style="margin-right: 8px"
     >
     >
       <div
       <div
         :class="item.active ? 'left-' + item.status : 'unleft-' + item.status"
         :class="item.active ? 'left-' + item.status : 'unleft-' + item.status"

+ 4 - 3
src/components/problem/areaCard.vue

@@ -4,8 +4,8 @@
     <img class="logo" src="../../assets/img/logo.png" alt="" />
     <img class="logo" src="../../assets/img/logo.png" alt="" />
     <div class="title">{{ title }}</div>
     <div class="title">{{ title }}</div>
     <div style="margin-top: 50px; height: 94%" @contextmenu="contextmenu">
     <div style="margin-top: 50px; height: 94%" @contextmenu="contextmenu">
-      <el-scrollbar>
-        <div class="scoll">
+      <div class="scoll currentScroll">
+        <div class="currentScroll" style="height: 100%; overflow-y: scroll">
           <div class="matrix" v-if="faultList.length > 0">
           <div class="matrix" v-if="faultList.length > 0">
             <div class="problemTitle">故障</div>
             <div class="problemTitle">故障</div>
             <MatrixBlock
             <MatrixBlock
@@ -43,7 +43,7 @@
             ></MatrixBlock>
             ></MatrixBlock>
           </div>
           </div>
         </div>
         </div>
-      </el-scrollbar>
+      </div>
     </div>
     </div>
   </div>
   </div>
   <WindturbineDetailPages
   <WindturbineDetailPages
@@ -462,6 +462,7 @@ export default {
 
 
 .body .scoll {
 .body .scoll {
   height: 91%;
   height: 91%;
+  overflow-y: scroll;
 }
 }
 
 
 .title {
 .title {