Browse Source

添加点位类型和图片

hfxc226 2 years ago
parent
commit
42702ebb97
3 changed files with 27 additions and 7 deletions
  1. 21 1
      src/views/opc/Opc.vue
  2. 4 4
      src/views/opc/OpcInfo.vue
  3. 2 2
      src/views/remote/opc/RemoteOpc.vue

+ 21 - 1
src/views/opc/Opc.vue

@@ -29,7 +29,27 @@
           </a-tooltip>
         </VueDragResize>
         <VueDragResize
-          v-if="item.type===2"
+          v-if="item.type===2 && item.fetchFlag===1"
+          :isActive="item.isActive"
+          :w="35"
+          :h="35"
+          :minh="20"
+          :x="item.imgXPosition"
+          :y="item.imgYPosition"
+          :isDraggable="item.isActive"
+          :isResizable="item.isActive"
+          :stickSize="5"
+          @dragging="handleOpt(item)"
+          @dragstop="resizeImg">
+          <a-tooltip>
+            <template slot="title">
+              {{ item.description }}
+            </template>
+            <img src="@/assets/green.png" alt="" width="35px" height="35px">
+          </a-tooltip>
+        </VueDragResize>
+        <VueDragResize
+          v-if="item.type===2 && item.fetchFlag===0"
           :isActive="item.isActive"
           :w="35"
           :h="35"

+ 4 - 4
src/views/opc/OpcInfo.vue

@@ -34,7 +34,7 @@
         </VueDragResize>
         <VueDragResize
           v-if="item.type===2 && item.fetchFlag===1 "
-          v-show="item.result===0||item.result===null"
+          v-show="item.result===1"
           :isActive="item.isActive"
           :w="35"
           :h="35"
@@ -49,12 +49,12 @@
             <template slot="title">
               {{ item.description }}
             </template>
-            <img src="@/assets/green.png" alt="" width="35px" height="35px">
+            <img src="@/assets/green.png" @click="handleInfo(item)" alt="" width="35px" height="35px">
           </a-tooltip>
         </VueDragResize>
         <VueDragResize
           v-if="item.type===2 && item.fetchFlag===0 "
-          v-show="item.result===0||item.result===null"
+          v-show="item.result===0"
           :isActive="item.isActive"
           :w="35"
           :h="35"
@@ -69,7 +69,7 @@
             <template slot="title">
               {{ item.description }}
             </template>
-            <img style="z-index: 100" src="@/assets/stop.png" alt="" width="35px" height="35px">
+            <img style="z-index: 100" @click="handleInfo(item)" src="@/assets/stop.png" alt="" width="35px" height="35px">
           </a-tooltip>
         </VueDragResize>
       </div>

+ 2 - 2
src/views/remote/opc/RemoteOpc.vue

@@ -142,7 +142,7 @@
               v-if="record.type == 2"
               @click="handleAddFetch(record)">就地点位
             </a>
-            <!--            <a
+            <a
               style="margin-left: 8px"
               @click="doTestAdd(record)">测试写入
             </a>
@@ -155,7 +155,7 @@
             <a
               style="margin-left: 8px"
               @click="doTestSelect(record)">测试查询
-            </a>-->
+            </a>
           </template>
         </span>
       </s-table>