Browse Source

opc: dcs雨水管网单独展示

hfxc226 1 year ago
parent
commit
2bf950dee2

+ 1 - 0
src/router/generator-platform-routers.js

@@ -388,6 +388,7 @@ const constantRouterComponents = {
   'OpcPosition': () => import('@/views/remote/opc/OpcPosition'), // opc车间
   'OpcPositionNot': () => import('@/views/remote/opc/OpcPositionNot'), // opc车间未配置
   'OpcPositionForProducer': () => import('@/views/remote/opc/OpcPositionForProducer'), // opc车间生产入口
+  'OpcPositionForProducerYushui': () => import('@/views/remote/opc/OpcPositionForProducerYushui'), // opc车间生产入口-雨水入口
   'RemotePosition': () => import('@/views/remote/position/RemotePosition'), // opc车间配置
   // 初始化导入
   'ImportExcel': () => import('@/views/excel/ImportExcel'),

+ 71 - 0
src/views/remote/opc/OpcPositionForProducerYushui.vue

@@ -0,0 +1,71 @@
+<template>
+  <a-card :bordered="false"  class="card" :title="modalTitle">
+    <h1 style="margin:20px auto; text-align: center"> 生产过程工艺流程画面 </h1>
+    <a-card v-show="visible">
+      <a-card-grid v-for="position in treeData" v-if="position.type==1 && position.title == '动力车间'" :key="position.key" style="cursor: pointer;width:25%;text-align:center" @click="showChild(position)">
+        {{ position.title }}
+      </a-card-grid>
+    </a-card>
+
+    <a-card v-show="visible2">
+      <a-row :gutter="48" slot="extra">
+        <a-col :md="48" :sm="48">
+        <span class="table-page-search-submitButtons" style="float: right">
+          <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+        </span>
+        </a-col>
+      </a-row>
+      <a-card-grid v-for="child in childData" v-if="child.type==2 && child.title == '雨水管网'" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child)">
+        {{ child.title }}
+      </a-card-grid>
+    </a-card>
+  </a-card>
+</template>
+
+<script>
+
+import { getSbPositionTree } from '@/api/remote/remote-position'
+
+export default {
+  name: 'OpcPosition',
+  components: {
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      treeData: [],
+      childData: [],
+      visible: true,
+      visible2: false
+    }
+  },
+  props: {
+  },
+  created () {
+    getSbPositionTree({ opcFlag: 1 }).then(res => {
+      this.treeData = res.data
+    })
+  },
+  methods: {
+    showChild (position) {
+      this.visible = false
+      this.visible2 = true
+      this.childData = position.children
+    },
+    showScreen (position) {
+      const a = document.createElement('a')
+      const select = position.children[0]
+      a.href = '/opc/info?line=' + select.id + '&parentId=' + position.id
+      a.target = '_blank'
+      a.click()
+    },
+    handleCancel () {
+      this.visible = true
+      this.visible2 = false
+      this.childData = []
+      this.confirmLoading = false
+    }
+  }
+}
+</script>