瀏覽代碼

Merge remote-tracking branch 'origin/demo_' into demo_

1 年之前
父節點
當前提交
61f6fcb091

+ 1 - 0
src/utils/dict.js

@@ -175,6 +175,7 @@ DictCache.TYPE = {
   REMOTE_DEGREE: 'REMOTE_DEGREE', // 设备电度
   REMOTE_OPC: 'REMOTE_OPC', // OPC
   REMOTE_OPC_IMG_POSITION: 'REMOTE_OPC_IMG_POSITION', // 图片方向
+  REMOTE_POSITION_TYPE: 'REMOTE_POSITION_TYPE', // 位置类型,
   FILL_GATHER_TASK_STATUS: 'FILL_GATHER_TASK_STATUS', // 巡检任务状态
   FILL_UPDATE_TYPE: 'FILL_UPDATE_TYPE', // 巡检操作类型
   /* 审批单 */

+ 6 - 0
src/views/opc/Opc.vue

@@ -155,6 +155,7 @@
     <div class="btn">
       <a-button-group>
         <a-button v-for="item in list" :key="item.id" :disabled="positionId===item.id" @click="getOpcInfo(item.id)">{{ item.name }}</a-button>
+        <a-button @click="back()">返回主页</a-button>
       </a-button-group>
     </div>
     <BaseChartInfo ref="baseChartInfo" @ok="handleOk"/>
@@ -315,6 +316,11 @@ export default {
     onClose () {
       this.visible = false
     },
+    back () {
+      const a = document.createElement('a')
+      a.href = '/sb/position/opc'
+      a.click()
+    },
     handleOk () {
       this.getOpcInfo(this.positionId)
     }

+ 6 - 0
src/views/opc/OpcInfo.vue

@@ -399,6 +399,12 @@ export default {
         modal.base(res.data)
       })
     },
+    backParent () {
+      const a = document.createElement('a')
+      a.href = '/sb/position/opc/for/producer'
+      a.target = '_blank'
+      a.click()
+    },
     handleOk () {
 
     }

+ 1 - 1
src/views/preparation/preparation/Preparation.vue

@@ -28,7 +28,7 @@
       <div class="table-operator" style="margin-bottom: 8px;">
         <a-row>
           <a-col :md="16">
-            <a-button v-if="$auth('preparation-preparations-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+            <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('preparation-preparations-export')" type="primary" icon="download" @click="doExport">导出</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('preparation-preparations-del')">
               <a-menu slot="overlay">

+ 34 - 6
src/views/remote/opc/OpcPosition.vue

@@ -1,11 +1,25 @@
 <template>
-  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+  <a-card :bordered="false" class="card" :title="modalTitle">
     <h1 style="margin:20px auto; text-align: center"> 生产过程工艺流程画面 </h1>
-    <a-card v-for="position in treeData" :key="position.key" :title="position.title">
-      <a-card-grid v-for="child in position.children" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child, position.key)">
+    <a-card v-show="visible">
+      <a-card-grid v-for="position in treeData" v-if="position.type==1" :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" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child)">
         {{ child.title }}
       </a-card-grid>
     </a-card>
+
   </a-card>
 </template>
 
@@ -22,7 +36,9 @@ export default {
       confirmLoading: false,
       modalTitle: null,
       treeData: [],
-      visible: true
+      childData: [],
+      visible: true,
+      visible2: false
     }
   },
   props: {
@@ -33,11 +49,23 @@ export default {
     })
   },
   methods: {
-    showScreen (position, parentId) {
+    showChild (position) {
+      this.visible = false
+      this.visible2 = true
+      this.childData = position.children
+    },
+    showScreen (position) {
       const a = document.createElement('a')
-      a.href = '/opc?line=' + position.key + '&parentId=' + parentId
+      const select = position.children[0]
+      a.href = '/opc?line=' + select.id + '&parentId=' + position.id
       a.target = '_blank'
       a.click()
+    },
+    handleCancel () {
+      this.visible = true
+      this.visible2 = false
+      this.childData = []
+      this.confirmLoading = false
     }
   }
 }

+ 33 - 6
src/views/remote/opc/OpcPositionForProducer.vue

@@ -1,8 +1,21 @@
 <template>
-  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+  <a-card :bordered="false"  class="card" :title="modalTitle">
     <h1 style="margin:20px auto; text-align: center"> 生产过程工艺流程画面 </h1>
-    <a-card v-for="position in treeData" :key="position.key" :title="position.title">
-      <a-card-grid v-for="child in position.children" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child, position.key)">
+    <a-card v-show="visible">
+      <a-card-grid v-for="position in treeData" v-if="position.type==1" :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" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child)">
         {{ child.title }}
       </a-card-grid>
     </a-card>
@@ -22,7 +35,9 @@ export default {
       confirmLoading: false,
       modalTitle: null,
       treeData: [],
-      visible: true
+      childData: [],
+      visible: true,
+      visible2: false
     }
   },
   props: {
@@ -33,11 +48,23 @@ export default {
     })
   },
   methods: {
-    showScreen (position, parentId) {
+    showChild (position) {
+      this.visible = false
+      this.visible2 = true
+      this.childData = position.children
+    },
+    showScreen (position) {
       const a = document.createElement('a')
-      a.href = '/opc/info?line=' + position.key + '&parentId=' + parentId
+      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
     }
   }
 }

+ 1 - 1
src/views/remote/position/RemotePosition.vue

@@ -200,7 +200,7 @@ export default {
     this.tableOption()
     this.delFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DELFLAG)
     this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
-    this.positionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBPOSITION_TYPE)
+    this.positionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_POSITION_TYPE)
   },
   methods: {
     tableOption () {

+ 1 - 1
src/views/remote/position/modules/BaseForm.vue

@@ -144,7 +144,7 @@ export default {
   created () {
     this.delFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DELFLAG)
     this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
-    this.positionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBPOSITION_TYPE)
+    this.positionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_POSITION_TYPE)
     const params = { roleType: 3, deptId: null, queryType: 1 }
     queryRepairUser(params).then(res => {
       this.userList = res.data

+ 1 - 1
src/views/remote/position/modules/Detail.vue

@@ -67,7 +67,7 @@ export default {
   created () {
     this.delFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DELFLAG)
     this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
-    this.positionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBPOSITION_TYPE)
+    this.positionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_POSITION_TYPE)
   },
   methods: {
     base (record) {