oyq28 2 роки тому
батько
коміт
b9e790922a
21 змінених файлів з 1465 додано та 686 видалено
  1. 30 0
      imcs-ui/src/api/index/index.js
  2. 30 0
      imcs-ui/src/api/lineSideLibrary/warnLog.js
  3. 10 0
      imcs-ui/src/api/machiningClient/machiningClient.js
  4. 10 0
      imcs-ui/src/api/resourceProductMgr/equipmentMgr.js
  5. 29 7
      imcs-ui/src/views/zuihou/developer/warnLong/Index.vue
  6. 321 73
      imcs-ui/src/views/zuihou/developer/warnLong/components/View.vue
  7. 3 1
      imcs-ui/src/views/zuihou/lineSideLibrary/lineSideMgr/components/EditList.vue
  8. 11 8
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue
  9. 451 514
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View.vue
  10. 91 7
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue
  11. 53 3
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View4.vue
  12. 81 19
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View5.vue
  13. 24 12
      imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View7.vue
  14. 5 3
      imcs-ui/src/views/zuihou/prepareProductMgr/bomMgr/components/Edit.vue
  15. 26 8
      imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/Index.vue
  16. 198 0
      imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/dyPriority.vue
  17. 36 18
      imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/index.vue
  18. 6 5
      imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/Index.vue
  19. 24 3
      imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/SchedTask.vue
  20. 1 1
      imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/View.vue
  21. 25 4
      imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/ViewNode.vue

+ 30 - 0
imcs-ui/src/api/index/index.js

@@ -64,6 +64,18 @@ const apiList = {
   getResourceTaskStatistics: {
     method: 'POST',
     url: `/authority/task/getResourceTaskStatistics`
+  },
+  getRunningProcedureData: {
+    method: 'POST',
+    url: `/authority/workpiece/workpieceStatistics`
+  },
+  getRunningResourceData: {
+    method: 'POST',
+    url: `/authority/workpiece/resourceStatistics`
+  },
+  riseUp:{
+    method: 'POST',
+    url: `/authority/workpiece/riseUp`
   }
 }
 
@@ -179,5 +191,23 @@ export default {
       ...apiList.getResourceTaskStatistics,
       data
     })
+  },
+  getRunningProcedureData (data) {
+    return axiosApi({
+      ...apiList.getRunningProcedureData,
+      data
+    })
+  },
+  getRunningResourceData (data) {
+    return axiosApi({
+      ...apiList.getRunningResourceData,
+      data
+    })
+  },
+  riseUp (data) {
+    return axiosApi({
+      ...apiList.riseUp,
+      data
+    })
   }
 }

+ 30 - 0
imcs-ui/src/api/lineSideLibrary/warnLog.js

@@ -53,6 +53,18 @@ const apiList = {
   complete: {
     method: 'POST',
     url: `/authority/dispatchException/complete`
+  },
+  connected: {
+    method: 'POST',
+    url: `/authority/taskNode/getConnectedNodes`
+  },
+  getStorageNode: {
+    method: 'POST',
+    url: `/authority/taskNode/getResourceStorge`
+  },
+  nodeCallback: {
+    method: 'POST',
+    url: `/authority/dispatchException/nodeCallback`
   }
 }
 
@@ -148,5 +160,23 @@ export default {
       ...apiList.complete,
       data
     })
+  },
+  connected (data) {
+    return axiosApi({
+      ...apiList.connected,
+      data
+    })
+  },
+  getStorageNode (data) {
+    return axiosApi({
+      ...apiList.getStorageNode,
+      data
+    })
+  },
+  nodeCallback (data) {
+    return axiosApi({
+      ...apiList.nodeCallback,
+      data
+    })
   }
 }

+ 10 - 0
imcs-ui/src/api/machiningClient/machiningClient.js

@@ -92,6 +92,10 @@ const apiList = {
         method: 'POST',
     	url: `/authority/taskNode/callRobot`
 	},
+	getValidTrayCount:{
+        method: 'POST',
+    	url: `/authority/task/getValidTrayCount`
+	},
 	read: {
 		method: 'POST',
     	url: `http://192.168.11.245:8089/api/ReadRFID`
@@ -244,6 +248,12 @@ export default {
 	      	data
 	    })
 	},
+	getValidTrayCount (data) {
+	    return axiosApi({
+	      	...apiList.getValidTrayCount,
+	      	data
+	    })
+	},
 	read (data) {
 	    return axiosApi({
 	      	...apiList.read,

+ 10 - 0
imcs-ui/src/api/resourceProductMgr/equipmentMgr.js

@@ -37,6 +37,10 @@ const apiList = {
 	    method: 'DELETE',
 	    url: `/authority/productionresource`
 	},
+	updateOnline: {
+	    method: 'POST',
+	    url: `/authority/productionresourceBiz/updateOnline`
+	},
 
 	// 【设备-包含指令】-数据
 	getProductionresourceList: {
@@ -106,4 +110,10 @@ export default {
 	      data
 	    })
 	},
+	updateOnline (data) {
+	    return axiosApi({
+	      ...apiList.updateOnline,
+	      data
+	    })
+	},
 }

+ 29 - 7
imcs-ui/src/views/zuihou/developer/warnLong/Index.vue

@@ -122,6 +122,22 @@
 	         <span v-if="row.status == '1'">{{row.updateTime}}</span>
 	     </template>
 	  </el-table-column>        
+	  <el-table-column 
+	       :label="$t('table.operation')"
+		   fixed="right"
+		    align="center"
+		    column-key="operation"
+		    width="85px">
+			<template slot-scope="{ row }">
+		        	<el-tooltip class="item" content='分析处理' effect="dark" placement="top-start">
+			          <i
+			            class="el-icon-bell table-operation"
+			            style="color: #87d068;"
+			            @click="view(row)"
+			          />
+		          </el-tooltip>
+		    </template>	
+	  </el-table-column>
     </el-table>
     <pagination
       v-show="tableData.total > 0"
@@ -147,8 +163,9 @@
       :close-on-click-modal="false"
       :close-on-press-escape="true"
       title="预览"
-      width="80%"
+      width="100%"
       top="50px"
+	  customClass="customWidth"
       :visible.sync="preview.isVisible"
     >
       <el-scrollbar>
@@ -308,6 +325,10 @@
 	    clearSelections () {
 	      this.$refs.table.clearSelection()
 	    },
+		view(row){
+			this.$refs.view.setTenant(row)
+			this.tenantViewVisible = true
+		},
 		marking(){
 		   if (!this.selection.length) {
 	        this.$message({
@@ -348,10 +369,6 @@
 	        }
 	      })
 	    },
-	    view (row) {
-	      this.$refs.view.setTenant(row)
-	      this.tenantViewVisible = true
-	    },
 	    // 【修改】表头上Btn-事件
 	    editOne() {
 	    	if (!this.selection.length) {
@@ -377,11 +394,15 @@
 	      this.dialog.isVisible = true
 	    },
 	    fetch (params = {}) {
-	      this.loading = true
+	      this.loading = true		  
 	      if (this.queryParams.timeRange) {
 	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
 	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
 	      }
+		  let id = this.$route.query.id
+		  if(id!=null && id!=""){
+			this.queryParams.model.id = id
+		  }
 	
 	      this.queryParams.current = params.current ? params.current : this.queryParams.current
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size
@@ -415,4 +436,5 @@
 	  }
 	}
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+</style>

+ 321 - 73
imcs-ui/src/views/zuihou/developer/warnLong/components/View.vue

@@ -6,121 +6,294 @@
     :visible.sync="isVisible"
     class="tenant-view"
   >
-    <el-row :gutter="10">
+  
+   <div style="height: 800px;">
+   
+  <el-tabs :tab-position="tabPosition" style="height: 800px">
+    <el-tab-pane label="基础信息">
+
+      <el-row :gutter="12">
       <el-col :xs="24" :sm="24">
-        <div class="img-wrapper">
-          <img :src="tenant.logo">
+        <div class="view-item">
+          <i class="el-icon-user" />
+          <span>节点名称</span>
+          <h3>{{ tenant.nodeNo }}</h3>
         </div>
-      </el-col>
+      </el-col>      
     </el-row>
-    <el-row :gutter="10">
+    <el-row :gutter="12">
       <el-col :xs="24" :sm="12">
         <div class="view-item">
-          <i class="el-icon-user" />
-          <span>{{ $t('table.tenant.code') +':' }}</span>
-          {{ tenant.code }}
+          <i class="el-icon-trophy" />
+          <span>执行设备</span>
+          <h3>{{tenant.category == '1' ? tenant.resourceName :(tenant.category== '2'? 'AGV': (tenant.category== '3'? tenant.zoneName+'机器人':'其它设备'))}}
+          </h3>
         </div>
       </el-col>
       <el-col :xs="24" :sm="12">
         <div class="view-item">
           <i class="el-icon-suitcase" />
-          <span>{{ $t('table.tenant.name') +':' }}</span>
-          {{ tenant.name }}
+          <span>目标设备</span>
+          <h3>{{ tenant.resourceName }}</h3>
         </div>
-      </el-col>
+      </el-col>     
     </el-row>
-    <el-row :gutter="10">
+    <el-row  :gutter="12">
       <el-col :xs="24" :sm="12">
         <div class="view-item">
-          <i class="el-icon-trophy" />
-          <span>{{ $t('table.tenant.type') +':' }}</span>
-          {{ tenant.type.desc }}
+          <i class="el-icon-phone-outline" />
+          <span>操作状态</span>
+          <h3>指令{{tenant.exeStatus=='1'? "已发送":( tenant.exeStatus=='2'?'进行中':'已完成')}}</h3>
         </div>
       </el-col>
       <el-col :xs="24" :sm="12">
         <div class="view-item">
           <i class="el-icon-phone-outline" />
-          <span>{{ $t('table.tenant.status') +':' }}</span>
-          {{ tenant.status.desc }}
+          <span>结果状态</span>
+          <h3>结果执行{{ tenant.exeResult=='1'?'成功':(tenant.exeResult=='0'?'失败':'响应超时') }}</h3>
         </div>
       </el-col>
     </el-row>
-    <el-row :gutter="10">
+    <el-row :gutter="12">
       <el-col :xs="24" :sm="12">
         <div class="view-item">
           <i class="el-icon-star-off" />
-          <span>{{ $t('table.tenant.duty') +':' }}</span>
-          {{ tenant.duty }}
+          <span>异常反馈</span>
+          <h3>{{ tenant.feedback }}</h3>
         </div>
       </el-col>
       <el-col :xs="24" :sm="12">
         <div class="view-item">
           <i class="el-icon-bangzhu" />
-          <span>{{ $t('table.tenant.expirationTime') +':' }}</span>
-          {{ tenant.expirationTime ? tenant.expirationTime : '永久' }}
+          <span>当前工序</span>
+          <h3>{{ tenant.procedureName }}</h3>          
+        </div>
+      </el-col>
+    </el-row>
+    <el-row :gutter="12">
+      <el-col :xs="24" :sm="12">
+        <div class="view-item">
+          <i class="el-icon-time" />
+          <span>计划时间</span>
+          <h3>{{ dataList[1].planTime||'无' }}</h3>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="12">
+        <div class="view-item">
+          <i class="el-icon-brush" />
+          <span>执行时间</span>
+          <h3>{{ dataList[1].actualTime || '无' }}</h3>
         </div>
       </el-col>
     </el-row>
-    <el-row :gutter="10">
+    <el-row :gutter="12">
       <el-col :xs="24" :sm="12">
         <div class="view-item">
           <i class="el-icon-time" />
-          <span>{{ $t('table.createTime') +':' }}</span>
-          {{ tenant.createTime }}
+          <span>执行设备状态</span>
+          <h3>{{ dataList[1].resourceStatus=="1"? "设备可用": "设备不可用" }}</h3>
         </div>
       </el-col>
       <el-col :xs="24" :sm="12">
         <div class="view-item">
           <i class="el-icon-brush" />
-          <span>{{ $t('table.updateTime') +':' }}</span>
-          {{ tenant.updateTime }}
+          <span>执行设备工作状态</span>
+          <h3>{{ dataList[1].onlineStatus=="1"? "设备在线":(dataList[1].onlineStatus=='0'?'离线':(dataList[1].onlineStatus=='2')?'加工中':'报警') }}</h3>
         </div>
       </el-col>
     </el-row>
-    <!--    <el-row :gutter='10'>-->
-    <!--      <el-col :xs='24' :sm='12'>-->
-    <!--        <div class='view-item'>-->
-    <!--          <i class='el-icon-date' />-->
-    <!--          <span>{{ $t('table.tenant.isMultipleLogin') +':' }}</span>-->
-    <!--          {{ tenant.isMultipleLogin ? '是' : '否'}}-->
-    <!--        </div>-->
-    <!--      </el-col>-->
-    <!--      <el-col :xs='24' :sm='12'>-->
-    <!--        <div class='view-item'>-->
-    <!--          <i class='el-icon-document' />-->
-    <!--          <span>{{ $t('table.tenant.passwordExpire') +':' }}</span>-->
-    <!--          {{ tenant.passwordExpire == '0' ? '永久有效' :tenant.passwordExpire}}-->
-    <!--        </div>-->
-    <!--      </el-col>-->
-    <!--    </el-row>-->
-    <!--    <el-row :gutter='10'>-->
-    <!--      <el-col :xs='24' :sm='12'>-->
-    <!--        <div class='view-item'>-->
-    <!--          <i class='el-icon-document' />-->
-    <!--          <span>{{ $t('table.tenant.passwordErrorNum') +':' }}</span>-->
-    <!--          {{ tenant.passwordErrorNum}}-->
-    <!--        </div>-->
-    <!--      </el-col>-->
-    <!--      <el-col :xs='24' :sm='12'>-->
-    <!--        <div class='view-item'>-->
-    <!--          <i class='el-icon-date' />-->
-    <!--          <span>{{ $t('table.tenant.passwordErrorLockTime') +':' }}</span>-->
-    <!--          {{ tenant.passwordErrorLockTime | passwordErrorLockTimeFilter }}-->
-    <!--        </div>-->
-    <!--      </el-col>-->
-    <!--    </el-row>-->
-    <el-row :gutter="10">
+    <el-row :gutter="18">
       <el-col :xs="24" :sm="24">
         <div class="view-item">
           <i class="el-icon-date" />
-          <span>{{ $t('table.tenant.describe') +':' }}</span>
-          {{ tenant.describe }}
+          <span>情况分析</span>         
         </div>
-      </el-col>
+        <div class="view-item">
+          <el-alert v-if="tenant.exeResult=='0' && tenant.exeStatus=='1'" title="请求指令发送成功,执行设备操作未完成" type="error" :closable="false" effect="dark"> </el-alert>
+          <el-alert v-if="tenant.exeResult=='0' && tenant.exeStatus=='3'" title="执行设备操作已完成,但返回信号未确认成功" type="error" :closable="false" effect="dark"> </el-alert>
+          <el-alert v-if="tenant.exeResult==null" title="设备操作执行中返回信号中断或者丢弃" type="error" :closable="false" effect="dark"> </el-alert>
+          <el-alert v-if="dataList[1].resourceStatus=='0'|| dataList[1].onlineStatus=='3'" title="执行设备状态异常,请检查设备是否故障" type="error" :closable="false" effect="dark"> </el-alert>
+
+          <el-alert v-if="dataList[1].onlineStatus=='0'" title="执行设备工作状态异常,请检查设备是否在线" type="error" :closable="false" effect="dark"> </el-alert>
+
+          <el-alert v-if="dataList[1].onlineStatus=='2'" title="执行设备正在工作中,请耐心等待资源释放" type="warning" :closable="false" effect="dark"> </el-alert>
+
+        </div>
+      </el-col>      
     </el-row>
+
+    </el-tab-pane>
+    <el-tab-pane label="关联信息">      
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+            <span>前序节点</span>
+            <el-button style="float: right; padding: 3px 0" type="text"></el-button>
+        </div>
+        <div class="text item">
+          <el-row :gutter="12" >
+              <el-col :xs="24" :sm="8"  v-for="(key, index) in keys" :key="index">
+                <div class="view-item">
+                   <span>{{ key.value }}</span>  
+                   <h3>{{ dataList[0][key.name]|| '无' }}</h3>
+                </div>                   
+              </el-col>
+              <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-phone-outline" />
+          <span>操作状态</span>
+          <h3>指令{{dataList[0].exeStatus=='1'? "已发送":( dataList[0].exeStatus=='2'?'进行中':'已完成')}}</h3>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-phone-outline" />
+          <span>结果状态</span>
+          <h3>结果执行{{ dataList[0].exeResult=='1'?'成功':(dataList[0].exeResult=='0'?'失败':'响应超时') }}</h3>
+        </div>
+      </el-col>
+                
+          </el-row>
+       </div>
+      </el-card>      
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+            <span>后序节点</span>
+            <el-button style="float: right; padding: 3px 0" type="text"></el-button>
+        </div>
+        <div class="text item">
+          <el-row :gutter="12" >
+              <el-col :xs="24" :sm="8"  v-for="(key, index) in keys" :key="index">
+                <div class="view-item">
+                   <span>{{ key.value }}</span>  
+                   <h3>{{ dataList[2][key.name] || '无' }}</h3>
+                </div>                   
+              </el-col>
+              <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-phone-outline" />
+          <span>操作状态</span>
+          <h3>指令{{dataList[2].exeStatus=='1'? "已发送":( dataList[2].exeStatus=='2'?'进行中':'已完成')}}</h3>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-phone-outline" />
+          <span>结果状态</span>
+          <h3>结果执行{{ dataList[2].exeResult=='1'?'成功':(dataList[2].exeResult=='0'?'失败':'响应超时') }}</h3>
+        </div>
+      </el-col>  
+          </el-row>
+       </div>
+      </el-card>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+            <span>资源占用</span>
+            <el-button style="float: right; padding: 3px 0" type="text"></el-button>
+        </div>
+        <div class="text item" v-if="storageNodeList.data">
+          <el-row :gutter="12" >
+               <el-col :xs="24" :sm="8"  v-for="(taskNode, index) in storageNodeList.data" :key="index">
+                <div class="view-item">
+                   <span>占位节点及设备名</span>  
+                   <h3>{{ taskNode.nodeName }}/ {{ taskNode.resourceName }}</h3>
+                </div>                   
+              </el-col>
+          </el-row>
+        </div>
+        <div class="text item" v-else><h3>执行设备未处于锁定状态中</h3></div>
+      </el-card>
+    </el-tab-pane>
+    <el-tab-pane label="解决策略">
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+            <span>解决步骤</span>
+            <el-button style="float: right; padding: 3px 0" type="text"></el-button>
+        </div>
+        <div class="text item">
+          <el-steps :active="active" direction="vertical">
+            <el-step class="offset" title="准备工作" @click.native="clickStep(1)" description="查看节点以及前序节点状态,检查硬件是否正常工作"></el-step>
+            <el-step class="offset" title="切换手动"  @click.native="clickStep(2)" description="切换到手动模式(防止其它干扰因素的影响)"></el-step>
+            <el-step class="offset" title="命令处理" @click.native="clickStep(3)" description="依据指令的状态来考虑是否重发指令或是手动验证设备反馈"></el-step>
+            <el-step class="offset" title="切换自动" @click.native="clickStep(4)" description="节点异常问题解决,重新切换回自动状态"></el-step>
+          </el-steps>
+        </div>
+      </el-card>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+            <span>数据接口</span>
+            <el-button style="float: right; padding: 3px 0" type="text"></el-button>
+        </div>
+        <div class="text item">
+          <el-row :gutter="12" >
+            <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-time" />
+          <span>日志ID</span>
+          <el-input v-model="logId" :placeholder="tenant.id"></el-input>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-brush" />
+          <span>回调ID</span>
+          <el-input v-model="callbackId"  :placeholder="dataList[1].taskNodeId"></el-input>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-brush" />
+          <span>设备ID</span>
+          <el-input v-model="deviceId" :placeholder="dataList[1].deviceId"></el-input>
+        </div>
+      </el-col>      
+       <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-time" />
+          <span>指令重发</span>
+          <div class="btn">
+            <el-button type="primary" icon="el-icon-edit" :disabled="confirmDisabled" @click="resend(this.logId)">重发指令</el-button>
+          </div>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-brush" />
+          <span>校验回调</span>
+          <div class="btn">
+            <el-button type="primary" icon="el-icon-edit" :disabled="confirmDisabled" @click="nodeCallback(this.callbackId)">检验回调</el-button>
+          </div>  
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="8">
+        <div class="view-item">
+          <i class="el-icon-brush" />
+          <span>释放锁定设备</span>
+          <div class="btn">
+            <el-button type="primary" icon="el-icon-edit" :disabled="confirmDisabled" @click="freeLock(this.deviceId)">释放设备</el-button>
+          </div>
+        </div>
+      </el-col>
+      </el-row>
+    </div>
+  </el-card>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+            <span>求助</span>
+            <el-button style="float: right; padding: 3px 0" type="text"></el-button>
+        </div>
+        <div class="text item">
+             问题仍未解决,求助专业人员处理 
+        </div>
+      </el-card>  
+    </el-tab-pane>
+  </el-tabs>
+
+
+  </div>
   </el-dialog>
 </template>
 <script>
+import warnLogApi from "@/api/lineSideLibrary/warnLog"
 export default {
   name: 'TenantView',
   filters: {
@@ -135,19 +308,28 @@ export default {
     dialogVisible: {
       type: Boolean,
       default: false
+    },
+    width: {
+      type: String,
+      default: '70%'
     }
   },
   data () {
-    return {
-      screenWidth: 0,
-      width: this.initWidth(),
+    return {      
+      screenWidth: 0,      
+      active: 1,
+      dataList: [], 
+      storageNodeList:[],
+      confirmDisabled: false,
+      taskNodeId: '',
+      deviceId: '',
+      logId:'',
+      callbackId: '',
+      keys: [{name:'nodeName', value:'节点名称'},{name:'resourceDesc', value:'执行设备'},{name:'overtimeStatus', value:'是否超时'},{name:'procedureDesc', value:'工序名称'},{name:'targetResourceDesc', value:'目标设备'},{name:'planTime', value:'计划时间'},{name:'actualTime', value:'执行时间'}],
+      //robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}], 
+      tabPosition: 'left',
       tenant: {
-        type: {
-          desc: ''
-        },
-        status: {
-          desc: ''
-        }
+       
       }
     }
   },
@@ -183,15 +365,74 @@ export default {
     },
     setTenant (val) {
       this.tenant = { ...val }
+      console.log(this.tenant)
+      this.taskNodeId = this.tenant.taskNodeId
+      this.callbackId = this.tenant.taskNodeId 
+      this.logId = this.tenant.id      
+      this.fetch()
+    },
+    fetch(){      
+        warnLogApi.connected({id: this.tenant.taskNodeId}).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.dataList = res.data
+            this.deviceId = this.dataList[1].deviceId
+            console.log(this.dataList[1])
+            warnLogApi.getStorageNode({resourceId: this.dataList[1].deviceId}).then(response => {
+	              const res = response.data
+	            if (res.isSuccess) {
+	                this.storageNodeList = res.data
+                  console.log(this.storageNodeList)
+	             }	        
+	          })
+	        }	        
+	      }).finally(() => this.loading = false)       
+       
     },
     close () {
       this.$emit('close')
+    },
+    clickStep(e){
+      if(e != '' || e != null){ this.active = e }
+    },
+    resend(logId){
+      this.confirmDisabled = true
+      warnLogApi.resend({id: logId}).then(response => {
+			const res = response.data
+			if (res.isSuccess) {
+				this.$message({
+					message: '重发成功',
+					type: "success"
+				})
+				this.fetch()
+			}
+     }).finally(()=>{
+       this.confirmDisabled = false
+     }) 
+    },
+    nodeCallback(callbackId){
+      this.confirmDisabled = true
+      warnLogApi.nodeCallback({id: callbackId}).then(response => {
+			const res = response.data
+			if (res.isSuccess) {
+				this.$message({
+					message: '回调验证成功',
+					type: "success"
+				})
+				this.fetch()
+			}
+     }).finally(()=>{
+       this.confirmDisabled = false
+     })
+    },
+    freeLog(deviceId){
+      
     }
   }
 }
 </script>
 <style lang="scss" scoped>
-.tenant-view {
+.tenant-view {  
   .img-wrapper {
     text-align: center;
     margin-top: -1.5rem;
@@ -210,5 +451,12 @@ export default {
       margin-left: 5px;
     }
   }
+  .offset{
+    margin:5px 0; 
+  } 
+  .btn {
+    text-align: center;
+    margin-top: 10px;
+  }
 }
 </style>

+ 3 - 1
imcs-ui/src/views/zuihou/lineSideLibrary/lineSideMgr/components/EditList.vue

@@ -328,7 +328,8 @@ export default {
 		manualId: '',
 		startpointId: '',
 		endpointId: '',
-		startResourceId: '',		
+		startResourceId: '',
+		endResourceId: '',		
         robotResourceId: '',
 		manualIdType:'general',
 		deviceUnit: ''
@@ -355,6 +356,7 @@ export default {
         return i.id === val
       })
 	  this.tenant.endpointId = option.no
+	  this.tenant.endResourceId = option.resourceId
 	},
     setTenant (val) {		
     	if(val){

+ 11 - 8
imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue

@@ -115,18 +115,21 @@
                     fit="fill"
                   >
                   </el-image>
-                  <span>{{ item.taskName }}</span>
-                  <div class="itemNo">任务编号: {{ item.no }}</div>
+                  <span style="text-align: center;"><h2>{{ item.name }}_{{ item.taskName }}</h2></span>
+                  <div class="itemNo" style="margin-top: 10px" >任务编号: {{ item.no }}</div>
                 </div>
                 <el-form style="margin-top: 10px">
                   <el-form-item label="零件名称:">
                     <span>{{ item.name }}</span>
                   </el-form-item>
+                  <el-form-item label="零件系统码:" v-if="item.completeBatchNo">
+                    <span>{{ item.completeBatchNo }}</span>
+                  </el-form-item>
                   <el-form-item label="工序号:">
                     <span>{{ item.taskNo }}</span>
                   </el-form-item>
                   <el-form-item label="托盘编号:">
-                    <span>{{ item.trayNo }}</span>
+                    <span>{{ item.clampNo }}</span>
                   </el-form-item>
                   <el-form-item label="额定时间:">
                     <span>{{ item.time }}分钟</span>
@@ -205,8 +208,8 @@
               <el-table-column prop="endTime" label="结束时间" width="150" align="center">
               </el-table-column>
               <el-table-column prop="overTime" label="是否超时" width="100" align="center">
-				          <template slot-scope="scope">
-                      {{ scope.overTime ? "是" : "否" }}
+				          <template slot-scope="{ row }">                      
+                      {{ row.overTime>0 ? "是" : "否" }}
                   </template>
               </el-table-column>
             </el-table>
@@ -395,7 +398,7 @@ export default {
        let that = this
        that.timer = setInterval(()=>{
           this.getStation();
-       }, 60000)
+       }, 10000)
     },
     clearTimer(){
        if(this.timer){
@@ -487,7 +490,7 @@ export default {
                 this.$refs.view2.setTenant(item)
                 this.view2Visible = true
             }else if(item.taskName.indexOf('下料')>-1){
-                if(item.taskName.indexOf('工序')>-1){
+                if(item.taskName.indexOf('OP')>-1){
                   //工序下料
                   item.uniqueCode = this.uniqueCode
                   this.$refs.view6.setTenant(item)
@@ -511,7 +514,7 @@ export default {
                 this.view7Visible = true
             }  
             //this.$refs.view4.setTenant(item)
-            //this.view4Visible = true         
+            //this.view4Visible = true
         }         
 	  },
     viewClose() {

+ 451 - 514
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View.vue

@@ -1,518 +1,455 @@
 <template>
-  <el-dialog
-    :title="$t(&quot;common.view&quot;)"
-    width="80%"
-    :append-to-body="true"
-    :visible.sync="isVisible"
-    class="tenant-view"
-  >
-    <div class="boxDiv">
-    	<!-- 任务信息 -->
-        <el-steps :active="1" finish-status="success" simple style="margin-top: 20px">
-  				<el-step title="夹具安装" >1111</el-step>
-  				<el-step title="物料装夹" >2222</el-step>
-		</el-steps>
-
-
-    	<el-row>
-    		<p class="titleP" style="margin-top: 0;">{{$t("runCenter.form.viewSched.name")+":"}}</p>
-    		<table class="comtable" border="0" cellspacing="0" cellpadding="6">
-    			<tr>
-    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
-    				<td width="200">{{tenant.procedureDesc}}</td>
-    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.content")+":"}}</td>
-    				<td width="300">{{tenant.content}}</td>
-    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.status")+":"}}</td>
-    				<td width="200">
-		          <el-tag v-if="tenant.status == '1'" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
-							<el-tag v-if="tenant.status == '2'" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
-							<el-tag v-if="tenant.status == '3'" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
-    				</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureNo")+":"}}</td>
-    				<td>{{tenant.procedureNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
-    				<td>{{tenant.prepareWorkHours}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.overtimeStatus")+":"}}</td>
-    				<td>{{tenant.overtimeStatus}}</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomDesc")+":"}}</td>
-    				<td>{{tenant.bomDesc}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.ratedWorkHours")+":"}}</td>
-    				<td>{{tenant.ratedWorkHours}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.resourceDesc")+":"}}</td>
-    				<td>{{tenant.resourceDesc}}</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomNo")+":"}}</td>
-    				<td>{{tenant.bomNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planTime")+":"}}</td>
-    				<td>{{tenant.planTime}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.executorName")+":"}}</td>
-    				<td>{{tenant.executorName}}</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planNo")+":"}}</td>
-    				<td>{{tenant.planNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.actualTime")+":"}}</td>
-    				<td>{{tenant.actualTime}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.taskResour")+":"}}</td>
-    				<td>查看任务资源</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.orderNo")+":"}}</td>
-    				<td>{{tenant.orderNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.jindu")+":"}}</td>
-    				<td><el-progress :text-inside="true" :stroke-width="24" :percentage="tenant.process"></el-progress></td>
-    				<td class="blodTd" align="center"></td>
-    				<td></td>
-    			</tr>
-    		</table>
-    	</el-row>
-
-    	<!-- 自动化执行流程 -->
-    	<el-row>
-    		<p class="titleP">{{$t("runCenter.form.viewSched.autoLiuc")}}</p>
-    		<el-table
-	      	:key="tableKey"
-	      	ref="table"
-	      	v-loading="loading"
-	      	:data="tableData.records"
-	      	border
-	      	fit
-	      	row-key="id"
-	      	style="width: 100%;"
-	      	highlight-current-row
-    			@current-change="handleCurrentChange"
-		    >
-		    	<!-- 序号 -->
-		    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-			      <template slot-scope="scope">
-			        <div>
-			          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-			        </div>
-			      </template>
-		      	</el-table-column>
-		      	<!-- 权重 -->
-		      	<el-table-column prop="prority" :label='$t("runCenter.table.aotoProcess.prority")' :show-overflow-tooltip="true" width="120px"></el-table-column>
-				    <!-- 设备 -->
-				    <el-table-column prop="resourceName" :label='$t("runCenter.table.aotoProcess.resourceName")' :show-overflow-tooltip="true" width="120px"></el-table-column>
-				    <!-- 动作包指令(报文) -->
-				    <el-table-column prop="code" :label='$t("runCenter.table.aotoProcess.code")' :show-overflow-tooltip="true" width="160px"></el-table-column>
-				    <!-- 执行动作 -->
-				    <el-table-column prop="instructionName" :label='$t("runCenter.table.aotoProcess.instructionName")' :show-overflow-tooltip="true"></el-table-column>
-				    <!-- 操作说明 -->
-				    <el-table-column prop="remark" :label='$t("runCenter.table.aotoProcess.remark")' :show-overflow-tooltip="true" width="180px"></el-table-column>
-			     	<!-- 执行状态 -->
-			     	<el-table-column prop="exeStatus" :label='$t("runCenter.table.aotoProcess.exeStatus")' width="150px">
-			     		<template slot-scope="{ row }">
-				      	<el-tag v-if="row.exeStatus == '1'" type="info">{{$t("runCenter.common.exeStatus.noStart")}}</el-tag>
-								<el-tag v-if="row.exeStatus == '2'" type="">{{$t("runCenter.common.exeStatus.run")}}</el-tag>
-								<el-tag v-if="row.exeStatus == '3'" type="success">{{$t("runCenter.common.exeStatus.finished")}}</el-tag>
-							</template>
-			     	</el-table-column>
-			      <!-- 执行结果 -->
-			      <el-table-column prop="exeResult" :label='$t("runCenter.table.aotoProcess.exeResult")' width="150px">
-			      	<template slot-scope="{ row }">
-			      		<el-tag v-if="row.exeResult == '1'" type="success">{{$t("runCenter.common.exeResult.success")}}</el-tag>
-								<el-tag v-if="row.exeResult == '0'">{{$t("runCenter.common.exeResult.fail")}}</el-tag>
-							</template>
-			      </el-table-column>
-			      <!-- 开始时间 -->
-			      <el-table-column prop="startTime" :label='$t("runCenter.table.aotoProcess.startTime")' width="150px"></el-table-column>
-			      <!-- 结束时间 -->
-			      <el-table-column prop="endTime" :label='$t("runCenter.table.aotoProcess.endTime")' width="150px"></el-table-column>
-			      <!-- 反馈信息 -->
-			      <el-table-column prop="feedback" :label='$t("runCenter.table.aotoProcess.feedback")' width="150px"></el-table-column>
-			      <!-- 反馈附件 -->
-			      <el-table-column prop="feedbackFile" :label='$t("runCenter.table.aotoProcess.feedbackFile")' width="150px"></el-table-column>
-		    </el-table>
-		    <!-- 【分页】组件 -->
-		  	<pagination
-		      v-show="tableData.total > 0"
-		      :limit.sync="queryParams.size"
-		      :page.sync="queryParams.current"
-		      :total="Number(tableData.total)"
-		      @pagination="fetch"
-		    />
-    	</el-row>
-    	<!-- 所需原材料 -->
-    	<el-row>
-    		<p class="titleP">{{$t("prepare.common.meterial")}}</p>
-    		<!-- Table数据 -->
-				<el-table
-		      ref="table"
-		      v-loading="loading"
-		      :data="tableData1"
-		      border
-		      fit
-		      style="width: 100%;"
-		    >
-		    	<!-- 编号 -->
-		      <el-table-column prop="no" :label='$t("prepare.table.tools.no")' align="center" width="120px"></el-table-column>
-		      <!-- 名称 -->
-		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" width="150px"></el-table-column>
-		     	<!-- 规格 -->
-		     	<el-table-column prop="specification" :label='$t("prepare.table.tools.specification")' :show-overflow-tooltip="true" width="180px"></el-table-column>
-		      <!-- 品牌 -->
-		      <el-table-column prop="brand.data" :label='$t("prepare.table.tools.brand")' width="120px"></el-table-column>
-		      <!-- 备注 -->
-		      <el-table-column prop="remark" :label='$t("common.remark")'></el-table-column>
-		      <!-- 入产线编码 -->
-		      <el-table-column prop="uniqueCode" label='入产线编码'>
-		      	<template slot-scope="{ row }">
-		      		<el-input size="small" v-model="row.uniqueCode" :placeholder='$t("common.pleaseEnter")'></el-input>
-		      	</template>
-		      </el-table-column>
-		    </el-table>
-    	</el-row>
-    	<!-- 托盘夹具组 -->
-    	<el-row>
-    		<p class="titleP">{{$t("prepare.common.tpJgroup")}}</p>
-    		<!-- Table数据 :span-method="objectSpanMethod"  -->
-				<el-table
-		      ref="table"
-		      v-loading="loading"
-		      :data="tableData2"
-		      border
-		      fit
-		      highlight-current-row
-	    		@current-change="handleCurrentChange"
-		      style="width: 100%;"
-		      :span-method="objectSpanMethod"
-		    >
-		    	<!-- 组序 -->
-		    	<el-table-column prop="groupSort" :label='$t("prepare.table.toolGroup.groupSort")' align="center" width="70px"></el-table-column>
-		    	<!-- 优先级 -->
-		    	<el-table-column prop="groupPrority" :label='$t("prepare.table.toolGroup.groupPrority")' align="center" width="80px"></el-table-column>
-		    	<!-- 类型 -->
-		    	<el-table-column prop="category.data" :label='$t("prepare.table.toolGroup.category")' align="center" width="100px">
-		    		<template slot-scope="{ row }">
-		    			<span>{{row.category.data}}</span>
-		    			<!--<el-button v-if="row.category.key == '02'" type="text" @click="editTools(row)">{{row.category.data}}</el-button>
-		    			<el-button v-else type="text" @click="addRow(row)">{{row.category.data}}</el-button>-->
-		    		</template>
-		    	</el-table-column>
-		    	<!-- 名称 -->
-		    	<el-table-column prop="name" :label='$t("prepare.table.toolGroup.name")' align="center" width="120px" :show-overflow-tooltip="true"></el-table-column>
-		      <!-- 编号 -->
-		      <el-table-column prop="no" :label='$t("prepare.table.toolGroup.no")' align="center" width="120px" :show-overflow-tooltip="true"></el-table-column>
-		      <!-- 规格 -->
-		      <el-table-column prop="specification" :label='$t("prepare.table.toolGroup.specification")' width="180px" :show-overflow-tooltip="true"></el-table-column>
-		      <!-- 品牌 -->
-		      <el-table-column prop="brand.data" :label='$t("prepare.table.toolGroup.brand")' width="180px"></el-table-column>
-		      <!-- 使用加紧位置 -->
-		      <el-table-column prop="positions" :label='$t("prepare.table.toolGroup.positions")' align="center" width="180px"></el-table-column>
-		      <!-- 装甲方式 -->
-		      <el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
-		      	<template slot-scope="{ row }" v-if="row.category.key == '02'">
-		      		<div v-if="row.jjImgList && row.jjImgList.length > 0" class="demo-image__preview">
-							  <el-image
-							    style="width: 100px; height: 60px"
-							    :src="row.jjImgList[0]"
-							    :preview-src-list="row.jjImgList">
-							  </el-image>
-							</div>
-		          <!--<el-button v-else type="text" @click="handleClick(row)">{{$t("common.uploadImg")}}</el-button>-->
-						</template>
-		      </el-table-column>
-		      <!-- 备注 -->
-		      <el-table-column prop="remark" :label='$t("common.remark")' width="180px"></el-table-column>
-		      <!-- 入产线编码 -->
-		      <el-table-column prop="uniqueCode" label='入产线编码' width="150px">
-		      	<template slot-scope="{ row }">
-		      		<el-input size="small" v-model="row.uniqueCode" :placeholder='$t("common.pleaseEnter")'></el-input>
-		      	</template>
-		      </el-table-column>
-		    </el-table>
-    	</el-row>
-
-    	<div slot="footer" class="dialog-footer">
-	      <el-button plain type="info" @click="isVisible = false">{{ $t('machining.buttons.noFinished') }}</el-button>
-	      <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
-	    </div>
-    </div>
-  </el-dialog>
-</template>
-<script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【自动化程序管理】-API
-	import automatedProcessesApi from "@/api/prepareProductMgr/automatedProcesses"
-	// 【产品工艺版本管理】-API
-	import technologyVersionApi from "@/api/prepareProductMgr/technologyVersion"
-	// 【机加工人端】-API
+	<el-dialog
+	  :title='$t("common.view")'
+	  width="80%"
+	  :append-to-body="true"
+	  :visible.sync="isVisible"
+	  class="tenant-view"
+	>
+	  <div class="boxDiv">
+		  <!-- 任务信息 -->
+		  <el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
+					<el-step title="工装安装" ></el-step>
+					<el-step title="物料装夹" ></el-step>
+		  </el-steps>
+  
+		  <el-row v-show="this.active==1">
+			  <p style="margin-top:0;text-align:center;font-size:18px;">{{$t("runCenter.form.viewSched.name")}}
+				  <span style="float:right;margin-right:20px;font-size:14px;">{{$t("runCenter.form.viewSched.bomNo")+":"}}{{tenant.no}}</span>
+			  </p>
+			  <table class="comtable" border="0" cellspacing="0" cellpadding="6">
+				  <tr>
+					  <td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.procedureNo")+":"}}</td>
+					  <td width="200">{{tenant.taskNo}}</td>
+					  <td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.status")+":"}}</td>
+					  <td width="120">
+						   <el-tag v-if="tenant.status == 0" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
+							  <el-tag v-if="tenant.status == 1" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
+							  <el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
+					  </td>
+				  </tr>
+				  <tr>
+					  <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
+					  <td>{{tenant.taskName}}</td>
+					  <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.content")+":"}}</td>
+					  <td width="200">{{tenant.content}}</td>
+				  </tr>
+				  <tr>
+					  <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
+					  <td>{{tenant.time}}分钟</td>
+					  <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedurePosition")+":"}}</td>
+					  <td>{{tenant.currentStationName}}</td>
+				  </tr>
+				  <tr>
+					  <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.startTime")+":"}}</td>
+					  <td>{{tenant.startTime}}</td>
+					  <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.endTime")+":"}}</td>
+					  <td>{{tenant.endTime}}</td>
+				  </tr>
+			  </table>
+		  </el-row>
+  
+		  <!-- 安装夹具 -->
+		  <el-row v-show="this.active==1">
+			  <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请安装夹具 <span style="color:red;margin-left:5px;font-size:14px;"></span></p>
+			  <!-- Table数据 -->
+			  <el-table
+				ref="table"
+				v-loading="loading"
+				:data="tableData.records"
+				border
+				fit
+				style="width: 100%;"
+			  >
+				<!-- 编号 -->
+				<el-table-column prop="no" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
+				 <!-- 编号 -->
+				<el-table-column prop="type" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
+				<!-- 名称 -->
+				<el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
+  
+			  </el-table>
+		  </el-row>
+  
+		  <!-- 装夹物料 -->
+		  <el-row v-show="this.active>1">
+			  <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹物料</p>
+			  <!-- Table数据 -->
+			  <el-table
+				ref="table1"
+				v-loading="loading"
+				:data="tableData1.records"
+				border
+				fit
+				style="width: 100%;"
+			  >
+				<!-- 材料编码 -->
+				<el-table-column prop="meterialCode" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
+				 <!-- 材料牌号 -->
+				<el-table-column prop="tradeMark" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
+				<!-- 材料名称 -->
+				<el-table-column prop="equipmentName" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
+				<!-- 装夹方式 -->
+				<el-table-column prop="clampImg" :label='$t("prepare.table.tools.clampImg")' align="center">
+					  <template slot-scope="{ row }">
+						   <div class="block">
+							   <el-image
+									style="width: 60px; height: 60px"
+									:src="row.armorPic"
+									fit="fill"></el-image>
+						   </div>
+					  </template>
+				</el-table-column>
+			  </el-table>
+		  </el-row>
+  
+		  <!-- 输入唯一码 -->
+		  <el-row v-show="this.active>1">
+			<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入零件编码    <el-button v-if="this.isReload==0" size="small" type="primary" @click.native="generate" round>系统生成</el-button>
+			<el-button v-if="this.isReload>0" size="small" type="primary" @click.native="confirmCode" round>扫码确认</el-button> </p>
+			<el-input v-model="uniqueCode" placeholder="输入零件编码"></el-input>
+  
+		  </el-row>
+  
+		  <div slot="footer" class="dialog-footer">
+			<el-button plain type="info" @click.native="prev" v-show="this.active>1"  >返回上一步</el-button>
+			<el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1">已完成,下一步</el-button>
+			<el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>
+		  </div>
+	  </div>
+	</el-dialog>
+  </template>
+  <script>
+	  // 【分页】组件
+	import taskMgrApi from "@/api/runManageCenter/taskMgr";
 	import machiningClientApi from "@/api/machiningClient/machiningClient"
-	// 列表查询的共通参数
-	import { initQueryParams } from '@/utils/commons'
-export default {
-  name: 'TaskView',
-  components: { Pagination },
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data () {
-    return {
-      screenWidth: 0,
-      confirmDisabled: false,
-      width: this.initWidth(),
-      tenant: {},
-      queryParams: initQueryParams({}),
-      loading: false,
-    	tenantViewVisible: false,
-    	tableKey: 0,
-	  	tableData: {
-	    	total: 0
-	  	},
-	  	tableData1: [],
-	  	tableData2: [],
-	  	currentRow: null, // 当前选择的行
-
-	  	spanArr: [],  // 【组序】合并单元格
-	    spanArr2: [],  // 【优先级】合并单元格
-    }
-  },
-  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-  created() {
-  	// 加载列表数据
-  	// this.fetch()
+	  // 列表查询的共通参数
+	  import { initQueryParams } from '@/utils/commons'
+  export default {
+	name: 'TaskView',
+	components: { },
+	props: {
+	  dialogVisible: {
+		type: Boolean,
+		default: false
+	  }
 	},
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-      }
-    }
-  },
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-  	submitForm(){
-  		let obj ={
-  			taskNode: this.tenant,
-  			meterialList: this.tableData1,
-  			procedureTrayList: this.tableData2
-  		}
-  		console.log("表单数据:", obj)
-  		// return false
-  		machiningClientApi.finishTaskNode(obj).then((response) => {
-	      const res = response.data
-	      if (res.isSuccess) {
-	        this.isVisible = false
-	        this.$message({
-	          message: this.$t('tips.updateSuccess'),
-	          type: 'success'
-	        })
-	        // 通知列表
-	        this.$emit("success");
-	      }
-	    }).finally(() => {
-	      this.confirmDisabled = false
-	      return true
-	    })
-  	},
-  	// table的当前行值变化后
-  	handleCurrentChange(val) {
-			// 设置当前行
-    	this.currentRow = val;
-  	},
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 550) {
-        return '95%'
-      } else if (this.screenWidth < 990) {
-        return '580px'
-      } else if (this.screenWidth < 1400) {
-        return '600px'
-      } else {
-        return '650px'
-      }
-    },
-    setTenant (val) {
-      this.tenant = { ...val }
-      // 加载上部门2个数据
-  		this.fetch()
-  		// 加载下部分2个数据
-  		this.getDetail(val)
-    },
-    close () {
-      this.$emit('close')
-    },
-    fetch (params = {}) {
-      this.loading = true
-      /*// 日期区间-参数
-      if (this.queryParams.timeRange) {
-        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-      }
-			// 分页-参数
-      this.queryParams.current = params.current ? params.current : this.queryParams.current
-      this.queryParams.size = params.size ? params.size : this.queryParams.size
-      // 条件-参数*/
-      console.log("列表的row数据:", this.tenant)
-      automatedProcessesApi.taskAutoNodeList({taskId: this.tenant.taskId, procedureId: this.tenant.procedureId, orderId: this.tenant.orderId}).then(response => {
-        const res = response.data
-        if (res.isSuccess) {
-          this.tableData.records = res.data
-        }
-        // eslint-disable-next-line no-return-assign
-      }).finally(() => this.loading = false)
-
-    },
-    //获得数据相同的行数
- 		rowspanFiled(data, filed) {
- 			let spanArr5 = [];
-	    data.forEach((item,index) => {
-        if( index === 0){
-            spanArr5.push(1);
-            this.position = 0;
-        }else{
-            if(data[index].groupSort === data[index-1].groupSort && data[index][filed] === data[index-1][filed]){
-                spanArr5[this.position] += 1;
-                spanArr5.push(0);
-            }else{
-                spanArr5.push(1);
-                this.position = index;
-            }
-        }
-	    })
-	    return spanArr5;
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    // 根据【工艺id】查询详情信息
-    getDetail(obj){
-    	machiningClientApi.getTaskNodeProcessAnalysis(obj).then(res => {
-    		res = res.data
-    		if(res.isSuccess){
-    			console.log("详情信息:", res.data)
-    			// 给各个组件赋值
-		    	// 把【设备】的数据,给【程序】使用
-		    	// this.setProgram(eqList)
-		    	// 获取【所需原材料】数据
-		    	this.tableData1 = this.setKeyList(res.data.meterialList)
-		    	// 获取【托盘夹具组】数据
-		    	this.tableData2 = this.setKeyList(res.data.procedureTrayList, 'tray')
-		    	// 要合并列的准备数据
-		    	if(this.tableData2.length > 0){
-		    		this.spanArr = this.rowspanFiled(this.tableData2, "groupSort")
-				  	this.spanArr2 = this.rowspanFiled(this.tableData2, "groupPrority")
-		    	}
-    		}
-    	})
-    },
-    // 赋值前处理-添加key数据健
-    setKeyList(list, flag){
-    	if(list.length > 0){
-    		let arr = []
-    		list.forEach(item => {
-    			// 添加唯一键
-	    		item.key = ''+ Math.random()
-	    		// 如果是托盘夹具的时候,组装分类
-	    		if(flag == 'tray'){
-	    			// 把【组序】和【优先级】改成字符串
-	    			//item.groupSort = ''+ item.groupSort
-	    			//item.groupPrority = ''+ item.groupPrority
-	    			// 给图片一个列表数据,jjImgList
-	    			item.jjImgList = []
-	    			if(!!item.armorPic){
-	    				item.jjImgList.push(item.armorPic)
-	    			}
-	    			// 添加类型
-	    			if(item.bizType == '1'){
-	    				item.category = {key: '03',data: '托盘'}
-	    			}else{
-	    				item.category = {key: '02',data: '夹具'}
-	    			}
-	    		}
-	    		arr.push(item)
-	    	})
-    		list = arr
-    	}
-    	return list
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-	.dialog-footer{
-		text-align: center;
-		padding: 30px;
-	}
-	.titleP{
-		position: relative;
-		font-size: 16px;
-		padding-left: 15px;
-	}
-	.titleP:before{
-		content: '';
-		position: absolute;
-		left: 0;
-		top: 3px;
-		width: 5px;
-		height: 80%;
-		background: #0F79DC;
-	}
-	.comtable{
-		width: 100%;
-		border-left: 1px solid #CCCCCC;
-		border-top: 1px solid #CCCCCC;
-	}
-	.comtable td{
-		border-right: 1px solid #CCCCCC;
-		border-bottom: 1px solid #CCCCCC;
-	}
-	.blodTd{
-		background: #EEEEEE;
-		color: #333333;
+	data () {
+	  return {
+		active: 1,
+		screenWidth: 0,
+		confirmDisabled: false,	  
+		width: this.initWidth(),
+		tenant: {},
+		queryParams: initQueryParams({}),
+		RFIDParams: {
+		  url: "192.168.11.130",
+		  port: "102",
+		  taskId: "",
+			taskNodeId: "",
+			data: {
+			  content: "",
+			  positionIndex: ""
+			}
+		},
+		loading: false,
+		  uniqueCode: '',
+		  isReload: 0,
+		  tenantViewVisible: false,
+		  unFeedingCount: 0,  //未上料零件数
+			existed: 0,
+		  matched: false,  //工装是否匹配
+		  count: 0,   //工序未零件数
+		  tableKey: 0,
+			tableData: {
+			  total: 0
+			},
+			tableData1: {
+			 total: 0
+		  },
+			tableData2: [],
+			currentRow: null, // 当前选择的行
+		  currentIndex: 0,  //上下料站默认序号
+			spanArr: [],  // 【组序】合并单元格
+		  spanArr2: [],  // 【优先级】合并单元格
+	  }
+	},
+	// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	created() {
+	  },
+	computed: {
+	  isVisible: {
+		get () {
+		  return this.dialogVisible
+		},
+		set () {
+		  this.close()
+		}
+	  }
+	},
+	mounted () {
+	  window.onresize = () => {
+		return (() => {
+		  this.width = this.initWidth()
+		})()
+	  }
+	},
+	methods: {
+	  confirmProcedure(){
+		  let valid = this.tenant.taskNodeId!=''? true: false;
+		  if(!valid){
+			this.$message({
+				message: "任务ID" + this.$t("rules.require"),
+				type: "warning"
+			})		  
+			return false
+		  }
+		console.log(this.tenant)
+		taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId}).then((res) => {
+			res = res.data         
+			if (res.isSuccess) {          
+			  this.count = res.data.count
+			  this.unFeedingCount = res.data.unFeedingCount
+			  this.existed = res.data.existed
+			  this.matched = res.data.matched
+			  this.confirmDisabled = false
+			}
+		  });        
+		},
+		callRobot(){
+			this.callRobotFlag = true
+			machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
+		  res = res.data;
+		  if (res.isSuccess) {
+			// 通知列表
+			this.$emit("success");
+			// 通知列表-并关闭弹出框
+			this.$emit("close");
+		  }
+		}).finally(()=>{
+		  this.callRobotFlag = false
+		});
+	  },
+	  prev(){
+		if (this.active-- < 0) this.active = 0;
+	  },
+	  next(){
+		  // TODO 写入rfid内容(子盘信息和夹具信息)
+		taskMgrApi.procesRfid({ "id" : this.tenant.id, "clampId" : this.tenant.clampId,rfidType: "write" }).then((res) => {
+		  res = res.data;        
+		});
+		if (this.active++ > 1) this.active = 0;
+  
+		taskMgrApi.getReloadStatus({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
+			res = res.data;
+			if (res.isSuccess) {            
+			  this.isReload = res.data.isReload
+			}
+	   });
+  
+	  },
+	  confirmCode(){
+		  let valid = this.uniqueCode!=''? true: false;
+		  if(!valid){
+			this.$message({
+				message: "零件编码" + this.$t("rules.require"),
+				type: "warning"
+			})
+			this.confirmDisabled = false
+			return false
+		  }
+		  taskMgrApi.confirmCode({ "uniqueCode" : this.uniqueCode, "orderId":this.tenant.orderId}).then((res) => {
+			res = res.data;
+			if (res.isSuccess) {            
+			  this.confirmDisabled = false
+			}
+		  });       
+		  this.confirmDisabled = true
+		},
+		submitForm(){
+		// 更新改任务的开始时间
+		// TODO 写入rfid内容,工件信息、原材料R
+		  this.confirmDisabled = true
+		let valid = this.uniqueCode!=''? true: false;
+		  if(!valid){
+			this.$message({
+				message: "零件编码" + this.$t("rules.require"),
+				type: "warning"
+			})
+			this.confirmDisabled = false
+			return false
+		  }
+		  //this.$confirm('确认?')		
+		  let that = this
+		  this.$confirm(
+		  '确定上料已完成并且舱门已关闭?',
+		  this.$t("common.tips"),
+		  {
+			distinguishCancelAndClose: true,
+			confirmButtonText: this.$t("common.confirm"),
+			cancelButtonText: this.$t("common.cancel"),
+			type: "warning",
+		  }).then(() => {
+			  //上料处理
+			  this.addMaterial(that)
+		  }).catch(()=>{})
+		},
+	  addMaterial(that){		
+		  taskMgrApi.updateTaskStatus({ "id" : that.tenant.id,"meterialId":that.tenant.meterialId, "uniqueCode":that.uniqueCode, "taskNodeId": that.tenant.taskNodeId, "updateType" : "end", "processType" : "1", "updateUser" : that.$store.state.account.user.id, "positionIndex": that.currentIndex}).then((res) => {
+			res = res.data;
+			if (res.isSuccess) {
+				//写入RFID
+				that.RFIDParams.taskId = that.tenant.id
+				that.RFIDParams.taskNodeId = that.tenant.taskNodeId
+				that.RFIDParams.data.positionIndex = that.currentIndex
+				//写入空值
+				machiningClientApi.write(that.RFIDParams).then(res2 => {				 
+				   if(res2.data.result){
+					  console.log("空值写入成功")	
+				   }
+				});
+				that.RFIDParams.data.content = that.uniqueCode
+				//写入新值
+				machiningClientApi.write(that.RFIDParams).then(res2 => {
+				  if(res2.data.result){
+					  console.log("rfid写入成功")		
+				  }
+				});
+				setTimeout(function(){
+						//通知列表
+				   that.$emit("success");
+					  //通知列表-并关闭弹出框
+				   that.$emit("close");
+				}, 1000);
+			}
+		}).finally(()=>{
+			that.confirmDisabled = false
+		});
+	  },
+		// table的当前行值变化后
+		handleCurrentChange(val) {
+			  // 设置当前行
+		  this.currentRow = val;
+		},
+	  initWidth () {
+		this.screenWidth = document.body.clientWidth
+		if (this.screenWidth < 550) {
+		  return '95%'
+		} else if (this.screenWidth < 990) {
+		  return '580px'
+		} else if (this.screenWidth < 1400) {
+		  return '600px'
+		} else {
+		  return '650px'
+		}
+	  },
+	  setTenant (val) {
+		this.tenant = { ...val }
+		console.log(this.tenant)
+		this.currentIndex = this.tenant.currentStationName.substr(-1)
+		// 添加数据
+		this.tableData.records = []
+		// 添加数据
+		this.tableData.records.push({
+			no: this.tenant.clampNo,
+			name: this.tenant.clampName
+		})
+  
+		this.tableData1.records = []
+		// 添加数据
+		this.tableData1.records.push({
+			meterialCode: this.tenant.meterialCode,
+			equipmentName: this.tenant.equipmentName,
+			tradeMark: this.tenant.tradeMark,
+			armorPic: this.tenant.armorPic,
+		})	  
+  
+		// 更新改任务的开始时间
+		taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,  "updateType" : "begin", "taskNodeId": this.tenant.taskNodeId, "positionIndex": this.currentIndex}).then((res) => {
+		  res = res.data;
+		  if (res.isSuccess) {
+			console.log("update task startTime success");
+		  }
+		});
+  
+		this.confirmProcedure()
+  
+	  },
+	  close () {
+		this.$emit('close')
+	  },
+  
+	  generate(){
+		taskMgrApi.generateMarkCode({ "id" : this.tenant.id}).then((res) => {
+		  res = res.data;
+		  if (res.isSuccess) {
+			this.uniqueCode = res.data.uniqueCode
+		  }
+		});
+		// this.uniqueCode = this.uuid(32,16)
+	  },
+  
+	  uuid(len, radix) {
+		var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
+		var uuid = [], i;
+		radix = radix || chars.length;
+		if (len) {
+			// Compact form
+			for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random()*radix];
+		} else {
+			// rfc4122, version 4 form
+			var r;
+  
+			// rfc4122 requires these characters
+			uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
+			uuid[14] = '4';
+  
+			// Fill in random data.  At i==19 set the high bits of clock sequence as
+			// per rfc4122, sec. 4.1.5
+			for (i = 0; i < 36; i++) {
+				if (!uuid[i]) {
+					r = 0 | Math.random()*16;
+					uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
+				}
+			}
+		}
+  
+		return uuid.join('').toLowerCase();
+	  }
 	}
-</style>
+  }
+  </script>
+  <style lang="scss" scoped>
+	  .dialog-footer{
+		  text-align: center;
+		  padding: 30px;
+	  }
+	  .titleP{
+		  position: relative;
+		  font-size: 16px;
+		  padding-left: 15px;
+	  }
+	  .titleP:before{
+		  content: '';
+		  position: absolute;
+		  left: 0;
+		  top: 3px;
+		  width: 5px;
+		  height: 80%;
+		  background: #0F79DC;
+	  }
+	  .comtable{
+		  width: 100%;
+		  border-left: 1px solid #CCCCCC;
+		  border-top: 1px solid #CCCCCC;
+	  }
+	  .comtable td{
+		  border-right: 1px solid #CCCCCC;
+		  border-bottom: 1px solid #CCCCCC;
+	  }
+	  .blodTd{
+		  background: #EEEEEE;
+		  color: #333333;
+	  }
+  </style>
+  

+ 91 - 7
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue

@@ -50,7 +50,7 @@
     	</el-row>
 
     	<!-- 安装夹具 -->
-    	<el-row v-show="this.active==1">
+    	<el-row v-show="this.active==1 && this.existed==2 && this.matched">
     		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请安装夹具 <span style="color:red;margin-left:5px;font-size:14px;"></span></p>
     		<!-- Table数据 -->
 			<el-table
@@ -71,8 +71,24 @@
 		    </el-table>
     	</el-row>
 
+		<el-row v-show="this.active==1">
+			<p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				ST1: 请申请托盘工装
+			</p>
+			<p v-if="this.existed==3" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				零件下料未完成,请耐心等待
+			</p>
+			<!--<p v-if="this.existed==2 && tenant.step != 1" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				请优先执行1号上料任务
+			</p>-->
+			<p v-if="this.existed==2 && !this.matched" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				当前工装与零件不匹配
+			</p>
+		</el-row>
+		
+
 		<!-- 装夹物料 -->
-    	<el-row v-show="this.active>1">
+    	<el-row v-show="this.active>1 && this.existed==2 && this.matched">
     		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹物料</p>
     		<!-- Table数据 -->
 			<el-table
@@ -96,6 +112,7 @@
                              <el-image
       							style="width: 60px; height: 60px"
       							:src="row.armorPic"
+								:preview-src-list="[row.armorPic]"
       							fit="fill"></el-image>
 						 </div>
 					</template>
@@ -104,16 +121,16 @@
     	</el-row>
 
 		<!-- 输入唯一码 -->
-    	<el-row v-show="this.active>1">
+    	<el-row v-show="this.active>1 && this.existed==2">
           <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入零件编码    <el-button v-if="this.isReload==0" size="small" type="primary" @click.native="generate" round>系统生成</el-button>
-		  <el-button v-if="this.isReload>0" size="small" type="primary" @click.native="confirmCode" round>扫码确认</el-button> </p>
+		  </p>
           <el-input v-model="uniqueCode" placeholder="输入零件编码"></el-input>
-
 	    </el-row>
 
     	<div slot="footer" class="dialog-footer">
+		  <el-button v-show="this.active==1 && this.existed==0" size="medium" type="primary" :disabled="callRobotFlag" @click="callRobot" round>呼叫托盘工装</el-button>	
 		  <el-button plain type="info" @click.native="prev" v-show="this.active>1"  >返回上一步</el-button>
-	      <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1">已完成,下一步</el-button>
+	      <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==2 && this.matched ">已完成,下一步</el-button>
 		  <el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>
 	    </div>
     </div>
@@ -138,7 +155,8 @@ export default {
     return {
       active: 1,
       screenWidth: 0,
-      confirmDisabled: false,	  
+      confirmDisabled: false,
+	  callRobotFlag: false,	  
       width: this.initWidth(),
       tenant: {},
       queryParams: initQueryParams({}),
@@ -156,6 +174,10 @@ export default {
 	    uniqueCode: '',
 		isReload: 0,
     	tenantViewVisible: false,
+		unFeedingCount: 0,  //未上料零件数
+      	existed: 0,
+        matched: false,  //工装是否匹配
+        count: 0,   //工序未零件数
     	tableKey: 0,
 	  	tableData: {
 	    	total: 0
@@ -191,6 +213,54 @@ export default {
     }
   },
   methods: {
+	confirmProcedure(){
+		let valid = this.tenant.taskNodeId!=''? true: false;
+	    if(!valid){
+          this.$message({
+	          message: "任务ID" + this.$t("rules.require"),
+	          type: "warning"
+	      })		  
+		  return false
+	    }
+      console.log(this.tenant)
+      taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}).then((res) => {
+          res = res.data         
+          if (res.isSuccess) {          
+            this.count = res.data.count
+            this.unFeedingCount = res.data.unFeedingCount
+            this.existed = res.data.existed
+			this.matched = res.data.matched
+            this.confirmDisabled = false
+          }
+        });        
+      },
+	  callRobot(){
+        machiningClientApi.getValidTrayCount({"clampNo": this.tenant.clampNo}).then((res) => {
+        	res = res.data
+        	if (!res.isSuccess || res.data.length==0) {                
+				let msg = res.data.length==0? "没有可用的工装,请耐心等待": res.msg
+				this.$message({
+	         		 message: msg ,
+	          		 type: "warning"
+	      		})
+		 		return false	
+			}else{
+                this.callRobotFlag = false     	
+      			machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId, "callType":"1"}).then((res) => {
+        			res = res.data
+        			if (res.isSuccess) {
+         				 // 通知列表
+          				this.$emit("success");
+          				// 通知列表-并关闭弹出框
+          				this.$emit("close");
+       				 }
+      			}).finally(()=>{
+        			this.callRobotFlag = true
+      			});
+			}
+	    });		 
+		
+    },
 	prev(){
       if (this.active-- < 0) this.active = 0;
 	},
@@ -333,6 +403,8 @@ export default {
         }
       });
 
+	  this.confirmProcedure()
+
     },
     close () {
       this.$emit('close')
@@ -379,6 +451,11 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+    .el-image-viewer__wrapper {
+        /deep/  .el-image-viewer__canvas {        
+          transform: scale(5) rotate(0deg);
+        }
+    }
 	.dialog-footer{
 		text-align: center;
 		padding: 30px;
@@ -410,4 +487,11 @@ export default {
 		background: #EEEEEE;
 		color: #333333;
 	}
+	.el-image-viewer__img {
+		transform: scale(5) rotate(0deg); 
+		margin-left: 0px; 
+		margin-top: 0px; 
+		max-height: 100%; 
+		max-width: 100%;
+	}
 </style>

+ 53 - 3
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View4.vue

@@ -111,8 +111,8 @@
           </el-row>
   
           <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click.native="apply" v-show="this.confirmDisabled"  >申请上料</el-button>
-            <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1">已完成,下一步</el-button>
+            <el-button type="primary" @click.native="callRobot" v-show="!this.matched || this.existed==0"  >申请上料</el-button>
+            <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==2">已完成,下一步</el-button>
             <el-button type="primary" :disabled="confirmDisabled2" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>
           </div>
       </div>
@@ -139,6 +139,11 @@
         screenWidth: 0,
         confirmDisabled: true,
         confirmDisabled2: true,
+        callRobotFlag: false,
+        unFeedingCount: 0,  //未上料零件数
+      	existed: 0,
+        matched: false,  //工装是否匹配
+        count: 0,   //工序未零件数
         width: this.initWidth(),
         tenant: {},
         queryParams: initQueryParams({}),        
@@ -180,6 +185,7 @@
       }
     },
     methods: {
+      /*
       apply(){
         let that = this
         this.loading = true
@@ -199,7 +205,50 @@
              that.$emit("close");
         }, 2000);    
         
+      }, */
+      confirmProcedure(){
+		  let valid = this.tenant.taskNodeId!=''? true: false;
+	    if(!valid){
+          this.$message({
+	          message: "任务ID" + this.$t("rules.require"),
+	          type: "warning"
+	      })		  
+		  return false
+	    }
+      console.log(this.tenant)
+      taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}).then((res) => {
+          res = res.data         
+          if (res.isSuccess) {          
+            this.count = res.data.count
+            this.unFeedingCount = res.data.unFeedingCount
+            this.existed = res.data.existed
+			      this.matched = res.data.matched
+            this.confirmDisabled = false
+          }
+        });        
       },
+      callRobot(){
+      	this.callRobotFlag = true
+        let callType = this.existed==0? "1" : "3"
+        if(this.matched && this.existed==2){
+          this.$message({
+	          message: "工装匹配,无需申请",
+	          type: "warning"
+	       })         
+         return false
+        }
+      	machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId, "callType": callType}).then((res) => {
+        res = res.data
+        if (res.isSuccess) {
+          // 通知列表
+          this.$emit("success");
+          // 通知列表-并关闭弹出框
+          this.$emit("close");
+        }
+      }).finally(()=>{
+        this.callRobotFlag = false
+      });
+     },
       next(){
           // TODO 写入rfid内容(子盘信息和夹具信息)
         taskMgrApi.procesRfid({ "id" : this.tenant.id, "clampId" : this.tenant.clampId,rfidType: "write" }).then((res) => {
@@ -275,7 +324,8 @@
             equipmentName: this.tenant.equipmentName,
             tradeMark: this.tenant.tradeMark,
             armorPic: this.tenant.armorPic,
-        })       
+        })     
+        this.confirmProcedure()  
   
       },
       close () {

+ 81 - 19
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View5.vue

@@ -50,7 +50,7 @@
           </el-row>
   
           <!-- 安装夹具 -->
-          <el-row v-show="this.active==1">
+          <el-row v-show="this.active==1 && this.existed==2 && this.matched">
               <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请安装夹具 <span style="color:red;margin-left:5px;font-size:14px;"></span></p>
               <p v-if="!tableData.records"  class="titleP"    style="margin-top:15px;color:#000;font-size:14px;white-space:pre;" >呼叫托盘工装   <el-button size="medium" type="primary" :disabled="confirmDisabled" @click="callRobot" round>呼叫托盘工装</el-button></p>
               <!-- Table数据 -->
@@ -71,6 +71,20 @@
   
               </el-table>
           </el-row>
+
+          <el-row v-show="this.active==1 && this.existed==0">
+			      <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				      ST1: 请申请托盘工装
+			      </p>            
+		     </el-row>
+         <el-row v-show="this.active==1 && this.existed==2 ">
+			      <p v-if="!this.matched && this.tenant.trayConf==='3' && this.tenant.step==1" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				      ST1: 请申请替换托盘工装
+			      </p>
+            <p v-if="!this.matched && this.tenant.trayConf!='3'" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				      当前工装与零件不匹配,请先执行1号任务
+			      </p>    
+		     </el-row>
   
           <!-- 装夹物料 -->
           <el-row v-show="this.active>1">
@@ -95,8 +109,9 @@
                       <template slot-scope="{ row }">
                            <div class="block">
                                <el-image
-                                    style="width: 60px; height: 60px"
+                                    style="min-width: 60px; min-height: 60px;"
                                     :src="row.armorPic"
+                                    :preview-src-list="[row.armorPic]"
                                     fit="fill"></el-image>
                            </div>
                       </template>
@@ -113,8 +128,10 @@
           </el-row>
   
           <div slot="footer" class="dialog-footer">
+            <el-button v-show="this.active==1 && this.existed==0" size="medium" type="primary" :disabled="callRobotFlag" @click="callRobot" round>呼叫托盘工装</el-button>
+            <el-button v-show="this.active==1 && this.existed==2 && !this.matched" size="medium" type="primary" :disabled="confirmDisabled" @click="callRobot" round>替换托盘工装</el-button>	
             <el-button plain type="info" @click.native="prev" v-show="this.active>1"  >返回上一步</el-button>
-            <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1">已完成,下一步</el-button>
+            <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==2 && this.matched">已完成,下一步</el-button>
             <el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>
           </div>
       </div>
@@ -158,6 +175,10 @@
           isReload: 0,
           tenantViewVisible: false,
           callRobotFlag:false,
+          unFeedingCount: 0,  //未上料零件数
+      	  existed: 0,
+          matched: false,  //工装是否匹配
+          count: 0,   //工序未零件数
           tableKey: 0,
             tableData: {
               total: 0
@@ -173,7 +194,7 @@
       }
     },
     // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-    created() {
+    created() {        
       },
     computed: {
       isVisible: {
@@ -193,6 +214,28 @@
       }
     },
     methods: {
+      confirmProcedure(){        
+		  let valid = this.tenant.taskNodeId!=''? true: false;
+	    if(!valid){
+          this.$message({
+	          message: "任务ID" + this.$t("rules.require"),
+	          type: "warning"
+	      })		  
+		  return false
+	    }
+      console.log(this.tenant)
+      let params = { "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}      
+      taskMgrApi.confirmProcedure(params).then((res) => {
+          res = res.data         
+          if (res.isSuccess) {          
+            this.count = res.data.count
+            this.unFeedingCount = res.data.unFeedingCount
+            this.existed = res.data.existed
+			      this.matched = res.data.matched
+            this.confirmDisabled = false
+          }
+        });        
+      },
       prev(){
         if (this.active-- < 0) this.active = 0;
       },
@@ -204,19 +247,32 @@
         if (this.active++ > 1) this.active = 0; 
         
       },
-      callRobot(){
-        this.callRobotFlag = true
-        machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
-        res = res.data;
-        if (res.isSuccess) {
-          // 通知列表
-          this.$emit("success");
-          // // 通知列表-并关闭弹出框
-          // this.$emit("close");
-        }
-      }).finally(()=>{
-        this.callRobotFlag = false
-      });
+      callRobot(){        
+        machiningClientApi.getValidTrayCount({"clampNo": this.tenant.clampNo}).then((res) => {
+        	res = res.data
+        	if (!res.isSuccess || res.data.length==0) {                
+				    let msg = res.data.length==0? "没有可替换的工装,请耐心等待": res.msg
+				    this.$message({
+	         		 message: msg ,
+	          	 type: "warning"
+	      		})
+		 		    return false	
+			    }else{
+            this.callRobotFlag = false
+            let callType = this.existed==0 ? "1": "3"
+            machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId, "callType": callType}).then((res) => {
+                res = res.data;
+                if (res.isSuccess) {
+                  // 通知列表
+                    this.$emit("success");
+                  // 通知列表-并关闭弹出框
+                    this.$emit("close");
+                }
+              }).finally(()=>{
+                  this.callRobotFlag = true
+              });
+          }
+	    });       
     },
       confirmCode(){
           let valid = this.uniqueCode!=''? true: false;
@@ -240,7 +296,7 @@
         // 更新改任务的开始时间
         // TODO 写入rfid内容,工件信息、原材料R
           this.confirmDisabled = true
-        let valid = this.uniqueCode!=''? true: false;
+          let valid = this.uniqueCode!=''? true: false;
           if(!valid){
             this.$message({
                 message: "零件编码" + this.$t("rules.require"),
@@ -342,7 +398,7 @@
             console.log("update task startTime success");
           }
         });
-  
+        this.confirmProcedure()
       },
       close () {
         this.$emit('close')
@@ -351,6 +407,12 @@
   }
   </script>
   <style lang="scss" scoped>
+      .el-image-viewer__wrapper {
+        /deep/  .el-image-viewer__canvas .el-image-viewer__img {        
+          transform: scale(5) rotate(0deg);
+        }
+      }
+      
       .dialog-footer{
           text-align: center;
           padding: 30px;

+ 24 - 12
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View7.vue

@@ -108,7 +108,7 @@
        
 
         <!-- 输入唯一码 -->
-        <el-row v-show="this.active>1 && this.tenant.trayConf!='3'">
+        <el-row v-show="this.active>1 && this.existed==2">
           <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入零件编码    
             <el-button v-if="this.unFeedingCount==0" size="small" type="primary" @click.native="confirmCode" round>扫码确认</el-button>
             <el-button v-if="this.unFeedingCount>0" size="small" type="primary" @click.native="generate" round>系统生成</el-button>
@@ -116,16 +116,21 @@
           <el-input v-model="uniqueCode" placeholder="输入零件编码"></el-input>
         </el-row> 
         <el-row v-show="this.active>1 && this.tenant.trayConf==='3'">
-           <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >更换托盘工装 
+           <p v-if="!this.existed" class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >呼叫托盘工装 
               <el-button v-if="this.tenant.trayConf==='3'" size="medium" type="primary" :disabled="confirmDisabled" @click="callRobot" round>呼叫托盘工装</el-button>
            </p>
+           <!--
+           <p v-if="this.existed" class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >更换托盘工装 
+              <el-button v-if="this.tenant.trayConf==='3'" size="medium" type="primary" :disabled="confirmDisabled" @click="callRobot" round>呼叫托盘工装</el-button>
+           </p> -->          
         </el-row>     
 
         <div slot="footer" class="dialog-footer"> 
           <el-button v-if="this.unFeedingCount>0" type="primary" @click.native="next" v-show="this.active==1">已完成,下一步进行加工零件上料</el-button>                 
           <el-button v-if="this.count>0 && this.unFeedingCount==0" type="primary" @click.native="next" v-show="this.active==1">已完成,下一步安装本序未加工零件</el-button>
           <el-button v-if="this.count==0 && this.unFeedingCount==0 " type="primary" @click.native="next" v-show="this.active==1">已完成,下一步安装本序已加工零件</el-button>
-          <el-button v-if="this.tenant.trayConf!='3'" type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>          
+          <el-button v-if="this.existed==2" type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>
+          <el-button v-if="this.existed==3" type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">下料完成</el-button>                    
         </div>
     </div>
   </el-dialog>
@@ -153,6 +158,8 @@ export default {
       confirmDisabled2: true,
       width: this.initWidth(),
       unFeedingCount: 0,  //未上料零件数
+      existed: 0,
+      matched: false,  //工装是否匹配
       count: 0,   //工序未零件数
       tenant: {},
       queryParams: initQueryParams({}),        
@@ -203,11 +210,13 @@ export default {
 	      })		  
 		  return false
 	    }
+      console.log(this.tenant)
       taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId}).then((res) => {
           res = res.data;          
           if (res.isSuccess) {          
             this.count = res.data.count
             this.unFeedingCount = res.data.unFeedingCount
+            this.existed = res.data.existed
             this.confirmDisabled = false
           }
         });
@@ -219,8 +228,11 @@ export default {
     submitForm(){
       // 更新改任务的开始时间
       // TODO 写入rfid内容,工件信息、原材料R
-	    this.confirmDisabled = true
-      let valid = this.uniqueCode!=''? true: false;
+	    this.confirmDisabled = true      
+      let valid = this.uniqueCode!=''? true: false
+      /**if(this.existed==3){
+        valid = true
+      } **/
 	    if(!valid){
           this.$message({
 	          message: "零件编码" + this.$t("rules.require"),
@@ -242,6 +254,12 @@ export default {
         }).then(() => {
 			//上料处理
 			this.addMaterial(that)
+      setTimeout(function(){
+              //通知列表
+          that.$emit("success");
+              //通知列表-并关闭弹出框
+          that.$emit("close");
+      }, 1000);
 		}).catch(()=>{})
   	},
 	addMaterial(that){		
@@ -264,13 +282,7 @@ export default {
 				if(res2.data.result){
 				    console.log("rfid写入成功")		
 				}
-			  });
-              setTimeout(function(){
-                      //通知列表
-                 that.$emit("success");
-                    //通知列表-并关闭弹出框
-                 that.$emit("close");
-              }, 500);
+			  });              
           }
       }).finally(()=>{
 		  that.confirmDisabled = false

+ 5 - 3
imcs-ui/src/views/zuihou/prepareProductMgr/bomMgr/components/Edit.vue

@@ -197,14 +197,16 @@ export default {
     },
     setTenant (val, dicts) {
     	if(val){
-    		// console.log("dddd == ", val);
-    		this.tenant = { ...val }
+    		// console.log("dddd == ", val);			
+    		this.tenant = { ...val }			
     	}
       // 字典表
       this.dicts = dicts
 	  this.zoneEdit = this.type=='edit' ? false: true
+	  console.log(this.zoneEdit)
+	  console.log(this.$store.state.account.user.roles.indexOf('舱体') < 0)
     },
-	getShow(item){
+	getShow(item){		
          if(item.identifier == "zone_id"){
             return (this.$store.state.account.user.roles.indexOf('舱体') < 0 && this.$store.state.account.user.roles.indexOf('框体') < 0)
 		}else if(item.identifier == "product_module_id"){

+ 26 - 8
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/Index.vue

@@ -234,7 +234,11 @@
         align="center"
       >
         <template slot-scope="{ row }">
-          <div
+          <div v-if="row.status=='0'"
+            class="statusDiv"
+            style="background: rgb(128, 128, 128);" 
+          >  掉线</div>
+          <div v-else 
             class="statusDiv"
             :style="{background:row.productionStatus.background!=''? row.productionStatus.background :''}" 
           >
@@ -247,16 +251,16 @@
         fixed="right"
         align="center"
         column-key="operation"
-        width="180px"
+        width="240px"
       >
         <template slot-scope="{ row }">
-          <!--<el-tooltip class="item" content="查看详情" effect="dark" placement="top-start">
+          <el-tooltip v-if="row.ip && row.status=='1'" class="item"  :content="row.onlineStatus=='0'?'上线':'下线' " effect="dark" placement="top-start">
 	          <i
-	            class="el-icon-view table-operation"
+	            :class="row.onlineStatus=='0'? 'el-icon-open table-operation':'el-icon-turn-off table-operation'"
 	            style="color: #87d068;"
-	            @click="view(row)"
+	            @click="updateOnline(row)"
 	          />
-          </el-tooltip>-->
+          </el-tooltip>
           <el-tooltip
             class="item"
             :content="$t('resource.buttons.work')"
@@ -438,8 +442,7 @@ export default {
     Hardware,
     AutoCode,
     TenantView,
-    DetailConf,
-    equipmentMgrApi,
+    DetailConf,   
     equipmentPosition,
   },
   props: {},
@@ -587,6 +590,21 @@ export default {
       // 如果是多选删除API
       // this.batchDelete()
     },
+    updateOnline(row){
+      let bool = row.onlineStatus=='0'? true : false
+      let msg = bool? '上线处理成功,请确认是否自动模式状态':'下线处理成功'
+      equipmentMgrApi.updateOnline({"ip":row.ip, "useState":bool}).then((response)=>{
+        const res = response.data;
+        if (res.isSuccess) {
+          this.$message({
+            message: msg,
+            type: "success",
+          });
+          // 查询列表
+          this.search();        
+        }
+      });     
+    },
     batchDelete() {
       /*if (!this.selection.length) {
 	        this.$message({

+ 198 - 0
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/dyPriority.vue

@@ -0,0 +1,198 @@
+<template>
+  <el-dialog
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    :title="title"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    width="60%"
+    top="50px"
+  >
+    <div class="main">
+      <!-- 上-统计 -->
+      <el-row :gutter="20" class="rowCls">
+        <el-col :xs="12" :sm="16" :lg="14">
+          <div class="chart-wrapper">
+            <!-- 各个工序零件数统计 -->
+            <h3>工序零件数动态统计</h3>
+            <table
+              border="0"
+              cellspacing="0"
+              cellpadding="9"
+              style="width: 100%; table-layout: fixed"
+            >
+              <tr v-for="(item, index) in procedureTable" :key="index">
+                <td>
+                  <span v-if="index < 3" class="indexSpan activeIndex">{{
+                    index + 1
+                  }}</span>
+                  <span v-else class="indexSpan">{{ index + 1 }}</span>
+                </td>
+                <td width="15%">
+                  <div class="indexTd" :title="item.name">{{item.procedure_no }}</div>
+                </td>
+                <td width="50%">
+                  <div class="indexTd" :title="item.name">{{ item.procedure_name }}</div>
+                </td>
+                <td width="10%">
+                  <countTo
+                    :duration="4000"
+                    :end-val="parseInt(item.cnt)"
+                    :start-val="0"
+                  />
+                </td>
+                <td width="10%">
+                  <i v-if="index!=0" class="el-icon-top" @click="riseUp(item,index)"></i>
+                </td>
+              </tr>
+            </table>
+          </div>
+        </el-col>
+
+        <el-col :xs="12" :sm="16" :lg="10">
+          <div class="chart-wrapper">
+            <!-- 各个工序零件数统计 -->
+            <h3>设备零件数动态统计</h3>
+            <table
+              border="0"
+              cellspacing="0"
+              cellpadding="9"
+              style="width: 100%; table-layout: fixed"
+            >
+              <tr v-for="(item, index) in indexTable" :key="index">
+                <td>
+                  <span v-if="index < 3" class="indexSpan activeIndex">{{
+                    index + 1
+                  }}</span>
+                  <span v-else class="indexSpan">{{ index + 1 }}</span>
+                </td>
+                <td width="60%">
+                  <div class="indexTd" :title="item.name">{{ item.name }}</div>
+                </td>
+                <td width="30%">
+                  <countTo
+                    :duration="4000"
+                    :end-val="parseInt(item.cnt)"
+                    :start-val="0"
+                  />
+                </td>
+              </tr>
+            </table>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import countTo from "vue-count-to";
+import indexApi from "@/api/index/index";
+
+export default {
+  components: { countTo },
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    title: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      indexTable: [],
+      procedureTable:[],
+      tenant: {},
+    };
+  },
+  computed: {
+    isVisible: {
+      get() {
+        return this.dialogVisible;
+      },
+      set() {
+        this.close();
+      },
+    },
+  },
+  created() {
+   
+  },
+  mounted() {},
+  methods: {
+    setTenant (val) {
+      this.tenant = { ...val };
+      // 查询列表详情数据
+      this.getRunningResourceData()
+      this.getRunningProcedureData()
+    },
+    getRunningResourceData() {
+      indexApi.getRunningResourceData({'orderId': this.tenant.orderId}).then((res) => {
+        res = res.data;
+        this.indexTable = res.data;
+      });
+    },
+    getRunningProcedureData() {
+      indexApi.getRunningProcedureData({'orderId': this.tenant.orderId}).then((res) => {
+        res = res.data;
+        this.procedureTable = res.data;
+      });
+    },
+    close() {
+      this.$emit("close");
+    },
+    riseUp(item, index){      
+      let preId = this.procedureTable[index-1]["id"]      
+      indexApi.riseUp({'preId': preId, 'currentId': item.id,'orderId':this.tenant.orderId}).then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.getRunningProcedureData()                      
+          }
+        }).finally(() => {          
+          return true
+        })
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.main {
+  padding: 10px 10px 50px 10px;
+}
+
+.rowCls {
+  width: 100%;
+  padding: 20px;
+  background: white;
+  margin-bottom: 20px;
+  box-sizing: border-box;
+}
+.colCls {
+  background: white;
+}
+.indexSpan {
+  display: inline-block;
+  background: #efefef;
+  width: 25px;
+  padding: 1px 2px;
+  text-align: center;
+  -moz-border-radius: 47%;
+  -webkit-border-radius: 47%;
+  border-radius: 47%;
+}
+.activeIndex {
+  background: #363651;
+  color: white;
+}
+.down-arrow {
+  color: #47da2a;
+}
+.up-arrow {
+  color: #d64e18;
+  transform: rotate(180deg);
+}
+</style>  

+ 36 - 18
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/index.vue

@@ -80,7 +80,7 @@
 				    {{$t("table.more")}}<i class="el-icon-arrow-down el-icon--right"></i>
 				  </el-button>
 				  <el-dropdown-menu slot="dropdown">
-				    <el-dropdown-item command="priority" v-has-permission="['order:priority']">{{$t("runCenter.buttons.priority")}}</el-dropdown-item>
+				    <el-dropdown-item command="prority" v-has-permission="['order:priority']">{{$t("runCenter.buttons.priority")}}</el-dropdown-item>
 				    <el-dropdown-item command="production" v-has-permission="['order:production']">{{$t("runCenter.buttons.production")}}</el-dropdown-item>
 				    <el-dropdown-item command="stop" v-has-permission="['order:pause']">{{$t("common.status.stop")}}</el-dropdown-item>
 				    <el-dropdown-item command="start" v-has-permission="['order:enable']">{{$t("common.status.valid")}}</el-dropdown-item>
@@ -229,13 +229,14 @@
 	            @click="checkCuttingToolRow(row)"
 	          />
           </el-tooltip>
-          <!--<el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
+		  <!-- 工序优先级调整-->
+          <el-tooltip v-if="row.produceStatus == '2'" class="item" content='调整工序优先级' effect="dark" placement="top-start">
 	          <i
-	            class="el-icon-delete table-operation"
-	            style="color: #f50;"
-	            @click="singleDelete(row)"
+	            class="el-icon-sort table-operation"
+	            style="color: #2db7f5;"
+	            @click="dyPriority(row)"
 	          />
-          </el-tooltip>-->
+          </el-tooltip>          
         </template>
       </el-table-column>
     </el-table>
@@ -309,7 +310,7 @@
 		  :width="moreTitle=='lineCell'? '650px' : '550px'"
 		>
 			<el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
-				<el-form-item v-if="moreTitle=='priority'" :label='$t("runCenter.buttons.priority")+":"' prop="prority">
+				<el-form-item v-if="moreTitle=='prority'" :label='$t("runCenter.buttons.priority")+":"' prop="prority">
           <el-input-number v-model="tenant.prority" :min="1" :max="999999999" ></el-input-number>
 					<p class="waningP">{{$t("runCenter.tips.numstips")}}</p>
       	</el-form-item>
@@ -355,6 +356,12 @@
       />
     </el-dialog>
 
+	<dy-priority
+      ref="dyPriority"
+      :dialog-visible.sync="dyPriorityVisible"	  
+      @close="dyClose"
+	  @success="editSuccess"
+    />
   </div>
 </template>
 
@@ -375,10 +382,12 @@
 	import planMgrApi from "@/api/runManageCenter/planMgr"
 	import elDragDialog from '@/directive/el-drag-dialog'
 	import { initQueryParams } from '@/utils/commons'
+    import DyPriority from './components/dyPriority.vue'
+
 	export default {
 	  name: "DraftOrder",
 	  directives: { elDragDialog },
-	  components: { Pagination, TenantEdit, TenantView, ProductionProgramme, checkCuttingTools},
+	  components: { Pagination, TenantEdit, TenantView, ProductionProgramme, checkCuttingTools, DyPriority},
 	  props: {
 	  },
 	  data () {
@@ -389,7 +398,7 @@
         	isIndeterminate: false,
 	    		checkAll: false,
         	zoneList: [],
-          prority:'',
+			prority: 50,
 	    	},
 	    	areaList: [], // 生产单元
 	    	rules: {
@@ -411,6 +420,7 @@
         // 刀具检验对话框是否展示标志
         planId:"",
         checkCuttingToolsVisible: false,
+		dyPriorityVisible: false,
 	    	dialogPP: {
 	        isVisible: false,
 	        title: ""
@@ -478,7 +488,7 @@
 	  	},
 	  	setTitle(){
 	    	let title = ''
-	    	if(this.moreTitle == "priority"){
+	    	if(this.moreTitle == "prority"){
 	    		title = this.$t("runCenter.buttons.priority")
 	    	}
 	    	if(this.moreTitle== "production"){
@@ -527,9 +537,9 @@
 	  	handleCommand(command) {
         // console.log('你点击了:', command);
         // 如果是:【优先级】
-        if(command == "priority"){
-        	this.moreTitle = "priority"
-        	this.priorityBtn()
+        if(command == "prority"){
+        	this.moreTitle = "prority"
+        	this.prorityBtn()
         }
         // 如果是:【生产单元】
         if(command == "production"){
@@ -575,7 +585,10 @@
         	this.orderDelete()
         }
       },
-
+	  dyPriority(row){
+		this.$refs.dyPriority.setTenant(row)		
+		 this.dyPriorityVisible = true	
+	  },
       orderOperateBtn(row,command){
         // 如果是:【暂停】
         if(command == "stop"){
@@ -606,7 +619,7 @@
       },
 
       // 【优先级】按钮-事件
-      priorityBtn(){
+      prorityBtn(){
       	if(this.checkData()){
       		this.dialogMoreVisible = true
       	}
@@ -651,7 +664,7 @@
       },
       // 【删除】按钮-事件
       orderDelete(){
-      	if(this.checkData()){
+      	if(this.checkData()){			
       		this.$confirm(this.$t("runCenter.tips.orderTips"), this.$t("common.tips"), {
 		      	distinguishCancelAndClose: true,
 		        confirmButtonText: this.$t("common.confirm"),
@@ -684,7 +697,7 @@
 	          this.confirmDisabled = true
 	          console.log("Form数据:", this.tenant)
 	          // 如果是【优先级】
-	          if(this.moreTitle == 'priority'){
+	          if(this.moreTitle == 'prority'){
 	          	this.updateData()
 	          }
 	          // 如果是【生产单元】
@@ -759,7 +772,9 @@
 	        })
 	        flag = false
 	      }
-	    	this.tenant.prority = this.selection[0].prority
+		   if(this.selection.length == 1){
+			 this.tenant.prority = this.selection[0].prority
+		   } 
 	    	return flag
 	    },
 	  	// 【提交审核】按钮-事件
@@ -825,6 +840,9 @@
 	    	// 更新统计数据
 	    	this.$emit("audioStatus", val)
 	    },
+		dyClose(){
+          this.dyPriorityVisible = false  
+		},
 	    viewClose () {
 	      this.tenantViewVisible = false
 	    },

+ 6 - 5
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/Index.vue

@@ -46,13 +46,14 @@
 		  </el-tab-pane>
 		  <el-tab-pane name="task" :label='$t("runCenter.common.prodTab1")'>
 		  	<!-- 【任务】 -->
-		  	<sched-task v-if="isShow" ref="task" @success="setChange"></sched-task>
+		  	<sched-task v-if="isShow" ref="task" @success="setChange" @switchOff="clearTimer" @switchOn="timerTask"></sched-task>
 		  	<!-- 【时间甘特图】 -->
 		  	<sched-time v-else ref="time" @success="setChange"></sched-time>
 		  </el-tab-pane>
-		</el-tabs>
-		
+		</el-tabs>		
   </div>
+
+  
 </template>
 
 <script>
@@ -137,8 +138,8 @@
 			   	that.reload()
       	 	}, 60000)				
     	},
-    	clearTimer(){			
-       		if(this.timer){
+    	clearTimer(){						
+       		if(this.timer){				
           		clearInterval(this.timer)				
           		this.timer = null
        		}

+ 24 - 3
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/SchedTask.vue

@@ -55,6 +55,16 @@
 		        {{ $t("table.reset") }}
 		      </el-button>
 	      	</span>
+			<span style="margin-right: 25px; float:right;">
+				<span>自动刷新:</span>
+				<el-switch v-model="switchOn"
+  					active-color="#13ce66"
+  					inactive-color="#ff4949"
+					@change="switchClick"
+					>
+				</el-switch>
+
+			</span>
 	    </div>
 
 	    <!-- 功能按钮 -->
@@ -101,6 +111,7 @@
 					<el-tag v-if="row.status == '3'" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
 		        </template>
 		    </el-table-column>
+			<el-table-column prop="orderNo" label='订单编号' :show-overflow-tooltip="true" width="120px"></el-table-column>
 		    <!-- 执行位置 -->
 		    <el-table-column prop="resourceDesc" label='执行位置' :show-overflow-tooltip="true"></el-table-column>
 		   	<!-- 执行者 -->
@@ -108,7 +119,7 @@
 		   	<!-- 计划时间 -->
 	      	<el-table-column prop="expectStartTime" :label='$t("runCenter.table.schedul.planTime")' :show-overflow-tooltip="true" width="150px"></el-table-column>
 		   	<!-- 额定工时 -->
-		   	<el-table-column prop="procedureName" label='额定工时' :show-overflow-tooltip="true" width="120px"></el-table-column>
+		   	<el-table-column prop="ratedWorkHours" label='额定工时(分钟)' :show-overflow-tooltip="true" width="120px" align="center"></el-table-column>
 	     	<!-- 开始时间 -->
 	      	<el-table-column prop="startTime" :label='$t("runCenter.table.schedul.actualTime")' width="150px"></el-table-column>
 	     	<!-- 订单名称 -->
@@ -197,6 +208,7 @@ export default {
         	total: 0,
         	records: []
       	},
+		switchOn: true,
       	currentRow: null, // 当前选择的行
       	pickerOptions: {
           shortcuts: [{
@@ -231,6 +243,7 @@ export default {
   	created() {
 	  	// 加载列表数据
 	  	this.fetch()
+		this.switchOn = true
 	},
 	// 每次进入,都加载
 	activated(){
@@ -242,6 +255,14 @@ export default {
   mounted () {
   },
   methods: {
+	switchClick(value){	   
+	   if(!value){		 
+		 this.$emit('switchOff')
+	   }else{		
+		 this.$emit('switchOn')
+	   }   
+	   this.switchOn = value     
+	},
   	view (row) {
       	this.$refs.view.setTenant(row)
       	this.tenantViewVisible = true
@@ -369,8 +390,8 @@ export default {
   	},
     setTenant (val) {
     	if(val){
-    		this.tenant = { ...val }
-    	}
+    		this.tenant = { ...val }			
+    	}		
     },
     search () {
       	this.fetch({

+ 1 - 1
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/View.vue

@@ -41,7 +41,7 @@
     			</tr>
     			<tr>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomNo")+":"}}</td>
-    				<td>{{tenant.bomNo}}</td>
+    				<td>{{tenant.bomBatchNo}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planTime")+":"}}</td>
     				<td>{{tenant.planTime}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.executorName")+":"}}</td>

+ 25 - 4
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/ViewNode.vue

@@ -41,7 +41,7 @@
     			</tr>
     			<tr>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomNo")+":"}}</td>
-    				<td>{{tenant.bomNo}}</td>
+    				<td>{{tenant.bomBatchNo}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planTime")+":"}}</td>
     				<td>{{tenant.planTime}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.executorName")+":"}}</td>
@@ -118,12 +118,26 @@
 			      <el-table-column prop="startTime" :label='$t("runCenter.table.aotoProcess.startTime")' width="150px"></el-table-column>
 			      <!-- 结束时间 -->
 			      <el-table-column prop="endTime" :label='$t("runCenter.table.aotoProcess.endTime")' width="150px"></el-table-column>
-			      <!-- 反馈信息 -->
-			      <el-table-column prop="feedback" :label='$t("runCenter.table.aotoProcess.feedback")' width="150px"></el-table-column>
+			      <!--当前点位--> 
+				  <el-table-column prop="storgeName" label='当前点位' width="120px"></el-table-column>
+				  <!-- 反馈信息 -->
+			      <el-table-column prop="logback" :label='$t("runCenter.table.aotoProcess.feedback")' width="150px"></el-table-column>
 			      <!-- 反馈附件 -->
 			      <el-table-column prop="feedbackFile" :label='$t("runCenter.table.aotoProcess.feedbackFile")' width="150px"></el-table-column>
+                  <!-- 异常处理 -->
+				  <el-table-column  prop="logback" label='异常查看' width="150px">
+					<template slot-scope="{ row }">
+						<el-tooltip  v-if="row.logback" class="item" :content='$t("runCenter.common.viewTask")' effect="dark" placement="top-start">
+			          		<i
+			            		class="el-icon-view table-operation"
+			            		style="color: #CC0000;"
+			            		@click="toRouter(row.id)"
+			          		/>
+		          		</el-tooltip>
+					</template>
+				 </el-table-column>
 		    </el-table>
-		    <!-- 【分页】组件 -->
+		    <!-- 【分页】组件 -->	
 		  	<pagination
 		      v-show="tableData.total > 0"
 		      :limit.sync="queryParams.size"
@@ -215,6 +229,13 @@ export default {
     close () {
       this.$emit('close')
     },
+	toRouter(logId){
+	  		// 调用全局挂载的方法
+		let paths = "/developer/warnLong"	
+		this.$store.dispatch('tagsView/delView', this.$route).then(res => {
+			this.$router.push({ path: paths, query: {id: logId}}) //带参跳转
+		})
+	},
     fetch (params = {}) {
       this.loading = true
       /*// 日期区间-参数