|
@@ -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>
|