Bläddra i källkod

前端页面功能更新

oyq28 1 år sedan
förälder
incheckning
affd7f0755

+ 1 - 2
imcs-ui/package.json

@@ -39,7 +39,7 @@
     "driver.js": "0.9.5",
     "dropzone": "5.5.1",
     "echarts": "^5.2.2",
-    "element-ui": "2.15.6",
+    "element-ui": "2.15.14",
     "file-saver": "2.0.1",
     "fuse.js": "3.4.4",
     "gsap": "^3.10.2",
@@ -55,7 +55,6 @@
     "showdown": "^1.9.1",
     "sortablejs": "1.8.4",
     "spark-md5": "^3.0.1",
-    "tui-editor": "1.3.3",
     "vue": "^2.6.10",
     "vue-count-to": "^1.0.13",
     "vue-echarts": "^6.0.0-rc.5",

+ 10 - 0
imcs-ui/src/api/runManageCenter/mesNotice.js

@@ -53,6 +53,10 @@ const apiList = {
   import: {
     method: 'POST',
     url: `/authority/mesNotice/import`
+  },
+  download: {
+    method: 'GET',
+    url: `/authority/mesNotice/download`
   }
 }
 
@@ -148,5 +152,11 @@ export default {
       ...apiList.import,
       data
     })
+  },
+  download (data) {
+    return axiosApi({
+      ...apiList.download,
+      data
+    })
   }
 }

+ 53 - 0
imcs-ui/src/api/statisticalAnalysis/productlineAvailability.js

@@ -22,6 +22,22 @@ const apiList = {
     method: 'POST',
     url: `/authority/productLinePerformance/deviceResourceSum`
   },
+  robotTaskSum: {
+    method: 'POST',
+    url: `/authority/productLinePerformance/robotTaskSum`
+  },
+  overTimeTaskSum: {
+    method: 'POST',
+    url: `/authority/productLinePerformance/overTimeTaskSum`
+  },
+  taskStatusSum: {
+    method: 'POST',
+    url: `/authority/productLinePerformance/taskStatusSum`
+  },
+  taskAGVSum: {
+    method: 'POST',
+    url: `/authority/productLinePerformance/taskAGVSum`
+  },
   taskResourceSum: {
     method: 'POST',
     url: `/authority/productLinePerformance/taskResourceSum`
@@ -46,6 +62,10 @@ const apiList = {
     method: 'GET',
     url: `/authority/productLinePerformance/expectprocedureSum`
   },
+  exportTaskResourceSum:{
+    method: 'POST',
+    url: `/authority/productLinePerformance/exportTaskResourceSum`
+  }
 }
 
 export default {
@@ -142,12 +162,38 @@ export default {
       data:searchObj
     })
   },
+  robotTaskSum(page,limit,searchObj){
+    return axiosApi({
+      url: `/authority/productLinePerformance/robotTaskSum/${page}/${limit}`,
+      method: 'post',
+      data:searchObj
+    })
+  },
+  overTimeTaskSum(page,limit,searchObj){
+    return axiosApi({
+      url: `/authority/productLinePerformance/overTimeTaskSum/${page}/${limit}`,
+      method: 'post',
+      data:searchObj
+    }) 
+  },
+  taskStatusSum(data){
+    return axiosApi({
+      ...apiList.taskStatusSum,
+      data
+    })
+  },
   taskResourceSum(data){
     return axiosApi({
       ...apiList.taskResourceSum,
       data
   })
   },
+  taskAGVSum(data){
+    return axiosApi({
+      ...apiList.taskAGVSum,
+      data
+    })
+  },
   frockSearch(page,limit,searchObj){
     return axiosApi({
       url: `/authority/stockInfo/frockSearch/${page}/${limit}`,
@@ -196,5 +242,12 @@ export default {
       method: 'post',
       data:searchObj
     })
+  },
+  exportTaskResourceSum(data){
+    return axiosApi({
+      ...apiList.exportTaskResourceSum,
+      responseType: 'blob',
+      data
+    })
   }
 }

+ 30 - 0
imcs-ui/src/api/systemMgr/toolQuery.js

@@ -1,6 +1,18 @@
 import axiosApi from '../AxiosApi.js'
 
 const apiList = {
+  getZoneRateList:{
+    method:'POST',
+    url: `/authority/toolQuery/getZoneRateList`
+  },
+  getWorkflowList:{
+    method:'POST',
+    url: `/authority/toolQuery/getWorkflowList`
+  },
+  getWorkflowDetail:{
+    method:'POST',
+    url: `/authority/toolQuery/getWorkflowDetail`
+  },
 	getBizStatusList: {
     method: 'POST',
     url: `/authority/toolQuery/getBizStatusList`
@@ -40,6 +52,24 @@ const apiList = {
 }
 
 export default {
+  getZoneRateList (data) {
+    return axiosApi({
+      ...apiList.getZoneRateList,
+      data
+    })
+  },
+  getWorkflowList (data){
+    return axiosApi({
+      ...apiList.getWorkflowList,
+      data
+    })
+  },
+  getWorkflowDetail (data){
+    return axiosApi({
+      ...apiList.getWorkflowDetail,
+      data
+    })
+  },
 	getBizStatusList (data) {
     return axiosApi({
       ...apiList.getBizStatusList,

+ 11 - 1
imcs-ui/src/api/systemMgr/toolbar.js

@@ -84,7 +84,11 @@ const apiList = {
   addCallbackCache: {
     method: 'POST',
     url: `/authority/toolbar/addCallbackCache`
-  }, 
+  },
+  reStationSchedule:{
+    method: 'POST',
+    url: `/authority/toolbar/reStationSchedule`
+  } 
 }
 
 export default {
@@ -214,4 +218,10 @@ export default {
       data
     })
   },
+  reStationSchedule (data) {
+    return axiosApi({
+      ...apiList.reStationSchedule,
+      data  
+    })
+  }
 }

+ 6 - 1
imcs-ui/src/lang/zh/statisticalAnalysis.js

@@ -91,8 +91,13 @@ export default {
       deviceResource:{
         zoneName:'产线',
         resourceName: '分配设备',
-        totalNum:'总数量',
+        updateUser: '操作用户',
+        totalNum:'总数',
         time:'日期',
+        totalExpectTime:'理论周期(分钟)',
+        totalRealTime:'实际周期(分钟)',
+        avgExpectTime:'理论平均周期(分钟)',
+        avgRealTime:'实际平均周期(分钟)',
       },
       //设备资源生产明细
       deviceResourceDetail:{

+ 157 - 11
imcs-ui/src/views/zuihou/dispatchMgr/toolQuery/Index.vue

@@ -1,12 +1,37 @@
 <template>
   <div class="app-container space">
 
+	<el-card class="box-card">
+        <div slot="header" class="clearfix">查询产线设备在线率</div>
+		<el-form ref="form" :model="form" label-width="100px">
+			<el-row :gutter="12" >
+				<el-col :xs="6" :sm="5">
+					<el-form-item label="产线类型:" prop="zoneCode">
+                    	<el-select v-model="form.zoneCode" placeholder="选择产线类型">
+							 <el-option v-for="zoneCode in lineList" :label="zoneCode.name" :value="zoneCode.value" :key="zoneCode.value" ></el-option>		
+			  			</el-select>
+					</el-form-item>
+				</el-col>											
+			</el-row>
+			<el-form-item>
+    			<el-button type="primary" @click="getZoneRateList" >发送</el-button>    		
+  			</el-form-item>	
+			  <el-row :gutter="12" >			  
+				<el-col :span="4" v-for="(item, index) in zoneRateList" :key="item.id">
+					<el-form-item :label="index==0? '加工设备数':(index==1? '设备联网率':'设备上线率')">
+					  {{zoneRateList[index].rate}}{{index!=0?'%':''}}
+					</el-form-item>	
+				</el-col>
+			  </el-row>	
+	  </el-form>
+	</el-card>
+
 	<el-card class="box-card">		
         <div slot="header" class="clearfix">查询业务节点状态</div>
-		<el-form ref="form" :model="form" label-width="80px">
+		<el-form ref="form2" :model="form2" label-width="80px">
 			<el-row :gutter="12" >
 				<el-form-item label="超时天数:" prop="timeSpan">
-                	<el-input-number v-model="form.timeSpan" :min="0" :max="30"></el-input-number>
+                	<el-input-number v-model="form2.timeSpan" :min="0" :max="30"></el-input-number>
 				</el-form-item>
 			</el-row>
 			<el-form-item>
@@ -217,6 +242,11 @@
 					 {{ task.orderName}}
 					</el-form-item>	
 				</el-col>
+				<el-col :span="4">
+					<el-form-item label="任务ID">
+					 {{ task.id}}
+					</el-form-item>	
+				</el-col>
 				<el-col :span="4">
 					<el-form-item label="产品" label-width="100px">
 						{{task.bomDesc}}
@@ -264,6 +294,58 @@
 		</el-form>	  
 	</el-card>
 
+	<el-card class="box-card">
+        <div slot="header" class="clearfix">查询零件流程</div>
+		<el-form ref="form3" :model="form3" label-width="120px">		
+		<el-row :gutter="12" >
+			<el-col :span="8">
+				<el-form-item label="零件批次号:" prop="completeBatchNo">
+                	<el-input v-model="form3.completeBatchNo" placeholder="零件批次号"></el-input>
+				</el-form-item>
+			</el-col>	
+			<el-col :span="8">
+				<el-form-item>
+    				<el-button type="primary" @click="getWorkflowList" >发送</el-button>    		
+  				</el-form-item>	
+			</el-col> 
+		</el-row>			 
+		
+		<el-row :gutter="10"  v-if="workflowList.task">	
+			<el-col :span="4">
+				<el-form-item label="零件名称" label-width="100px">
+					 {{workflowList.task? workflowList.task.bomDesc:'任务已结束'}}
+				</el-form-item>	
+		   </el-col>			
+		   <el-col :span="5">
+				<el-form-item label="任务名称" label-width="100px">
+					 {{workflowList.task? workflowList.task.procedureName:'任务已结束'}}
+				</el-form-item>	
+		 </el-col>
+		 <el-col :span="5">
+			  <el-form-item label="任务开始" label-width="100px">
+					 {{workflowList.task? workflowList.task.startTime:'任务已结束'}}
+			  </el-form-item>	
+		  </el-col>
+		  <el-col :span="7">
+			  <el-form-item label="节点名称" label-width="100px">
+					 {{workflowList.taskNode? workflowList.taskNode.nodeName:'节点已结束'}}
+			  </el-form-item>	
+		  </el-col>
+		  <el-col :span="5">
+			  <el-form-item label="节点开始" label-width="100px">
+					 {{workflowList.taskNode? workflowList.taskNode.startTime:'节点已结束'}}
+			  </el-form-item>	
+		  </el-col>		
+		  <el-col :span="6">
+			  <el-form-item>
+    				<el-button type="primary" @click="getWorkflowDetail" >查看详情</el-button>    		
+  			  </el-form-item>	
+		  </el-col>	
+		</el-row>
+
+      </el-form>		
+	</el-card>	
+
 	<el-card class="box-card">
         <div slot="header" class="clearfix">查询缓存关键字</div>		
 		<el-form label-width="80px">
@@ -281,6 +363,12 @@
 		   </el-row>
 		</el-form>	  
 	</el-card>
+
+	<tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
 	
   </div>
 </template>
@@ -288,20 +376,29 @@
 <script>	
 	// 【锁定记录、出入库记录】-API
 	import toolQueryApi from "@/api/systemMgr/toolQuery"
-	import warnLogApi from "@/api/lineSideLibrary/warnLog"
-	import areaMgrApi from "@/api/resourceProductMgr/areaMgr"	
+	import elDragDialog from '@/directive/el-drag-dialog'
+	// 【查看】组件
+	import TenantView from "./components/View"	
 	import { convertEnum, initDicts, initQueryParams } from '@/utils/commons'
 	export default {
 	  name: "ToolQuery",
-	  directives: { },
-	  components: { },
+	  directives: {elDragDialog},
+	  components: {TenantView},
 	  props: {
 	  },
 	  data () {
 	    return {
-		  form:{
-			timeSpan: "2"
-		  },	
+		  form:{			
+			zoneCode: "KT"
+		  },
+		  form2:{
+            timeSpan: "2",
+		  },
+		  form3:{
+            completeBatchNo: "",
+		  },		  
+		  workflowList:[],
+		  zoneRateList:[],
 		  orderTaskList: [],	     		  
 		  bizStatuList: [],
 		  agvLockList: [],
@@ -340,9 +437,57 @@
 	  mounted () {
 	   
 	  },
-	  methods: {        
+	  methods: {  
+		getWorkflowList(){
+		  let completeBatchNo = this.form3.completeBatchNo? {"completeBatchNo" : this.form3.completeBatchNo.toString()}: null;
+		  if(completeBatchNo==null){
+			this.$message({
+              	message: '输入数据不能为空',
+              	type: 'warning'
+            });
+			return false	
+		  }		
+          toolQueryApi.getWorkflowList(completeBatchNo).then(response=>{
+						const res = response.data
+						if(res.isSuccess){
+							this.workflowList = res.data
+							console.log(this.workflowList)
+						}else{
+							this.$message({
+              					message: res.msg,
+              					type: 'warning'
+            				})
+						}
+				}).finally(()=>{
+					return true		
+			})
+		},
+		getWorkflowDetail(){
+			this.$refs.view.setTenant({"completeBatchNo":this.form3.completeBatchNo.toString()})
+        	this.tenantViewVisible = true	
+		},
+		viewClose() {
+        	this.tenantViewVisible = false
+        },
+		getZoneRateList(){
+			let query = this.form.zoneCode ? {"zoneCode" : this.form.zoneCode.toString()} : {}	
+			toolQueryApi.getZoneRateList(query).then(response=>{
+						const res = response.data
+						if(res.isSuccess){
+							this.zoneRateList = res.data.data
+							console.log(this.zoneRateList)
+						}else{
+							this.$message({
+              					message: res.msg,
+              					type: 'warning'
+            				})
+						}
+				}).finally(()=>{
+					return true		
+			})
+		},   
 	    getBizStatusList () {
-			let query = this.form.timeSpan ? {"timeSpan" : this.form.timeSpan.toString()} : {}		
+			let query = this.form2.timeSpan ? {"timeSpan" : this.form2.timeSpan.toString()} : {}		
 			toolQueryApi.getBizStatusList(query).then(response=>{
 						const res = response.data
 						if(res.isSuccess){
@@ -482,6 +627,7 @@
 			})
 		},
 	    fetch () {
+			this.getZoneRateList()
 	      	this.getBizStatusList()
 			this.getAgvLockList()
 			this.getCacheCallbackList()

+ 53 - 5
imcs-ui/src/views/zuihou/dispatchMgr/tools/Index.vue

@@ -276,7 +276,7 @@
 				</el-col>
 				<el-col :xs="6" :sm="5">
 					<el-form-item label="次序号:" prop="count">
-                    	<el-input-number v-model="form12.count" :min="0" :max="2"></el-input-number>
+                    	<el-input-number v-model="form12.count" :min="0" :max="form12.msgType=='1'?3:5"></el-input-number>
 					</el-form-item>
 				</el-col>											
 			</el-row>
@@ -440,8 +440,9 @@
 							 <el-option label="框体机器人节点回调" value="2"></el-option>
 							 <el-option label="舱体机器人节点回调" value="3"></el-option>
 							 <el-option label="伺服舵机节点回调" value="4"></el-option>
-							 <el-option label="线边库Flag" value="5"></el-option>
-							 <el-option label="缓存位线边库Flag" value="6"></el-option>
+							 <el-option label="线边库不可取回调" value="5"></el-option>
+							 <el-option label="缓存位线边库回调" value="6"></el-option>
+							 <el-option label="线边库允许取回调" value="7"></el-option>
 						</el-select>
 					</el-form-item>
 				</el-col>
@@ -466,6 +467,22 @@
   			</el-form-item>
 	  </el-form>
 	</el-card>
+
+	<el-card class="box-card">
+        <div slot="header" class="clearfix">手动触发上下料站重排产</div>
+		<el-form ref="form21" :model="form21" :rules="rules15" label-width="80px">
+			<el-row :gutter="12" >
+				<el-col :xs="6" :sm="6">
+					<el-form-item label="订单名称:" prop="orderName">
+                    	<el-input  v-model="form21.orderName" placeholder="订单名称"></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>			
+			<el-form-item>				
+    			<el-button type="primary" @click="reStationSchedule" >发送</el-button>    		
+  			</el-form-item>
+	  </el-form>
+	</el-card>
   </div>
 </template>
 
@@ -567,6 +584,9 @@
 			callbackType:"1",
 			count:0
 		  },
+		  form21:{
+			orderName:""	
+		  },
 		  lineList: [{"name":"框体","value":"KT"},{"name":"舱体","value":"CT"},{"name":"保障中心","value":"BZ"}],
 		  typeList: [{"name":"全部","value":"0"},{"name":"FANUC","value":"1"},{"name":"HEIDENHAIN","value":"2"},{"name":"DMG","value":"3"},{"name":"HELLER","value":"4"}],
 	      tenantViewVisible: false,
@@ -690,7 +710,11 @@
         		{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
         	],
 		  },
-
+		  rules15: {
+			orderId:  [
+        		{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        	],
+		  }
 		}
 	  },
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
@@ -1055,7 +1079,7 @@
 			});
 		},
 		callbackTypeChange(val){
-          if(val=="2"||val=="3"||val=="4"){
+          if(val=="2"||val=="3"||val=="4"||val=="5"||val=="6"||val=="7"){
 			this.show = true
 		  }else{
 			this.show = false			
@@ -1237,6 +1261,30 @@
 				}				
 			}); 
 		},
+		reStationSchedule(){
+			this.$refs.form21.validate((valid) => {
+				if(valid){					
+					toolbarApi.reStationSchedule(this.form21).then(response=>{
+						const res = response.data
+						if(res.isSuccess){
+							this.$message({
+              					message: this.$t('tips.updateSuccess'),
+              					type: 'success'
+            				})
+						}else{
+							this.$message({
+              					message: res.msg,
+              					type: 'warning'
+            				})
+						}
+					}).finally(()=>{
+					   return true		
+					})					
+				}else{
+					return false
+				}				
+			});
+		},
 		cleanCache(){			
 			this.$refs.form18.validate((valid) => {
 				if(valid){					

+ 2 - 1
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue

@@ -310,6 +310,7 @@ export default {
 		  this.confirmDisabled = false
 		  return false
 	    }
+		/*
 		if(!this.xbkValid){
           this.$message({
 	          message: "产线线边库资源不够,请等待资源释放后再上料",
@@ -317,7 +318,7 @@ export default {
 	      })		  
 		  this.confirmDisabled = false
 		  return false
-	    }
+	    } */
 		//this.$confirm('确认?')
 		let that = this
 		this.$confirm(

+ 2 - 1
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View3.vue

@@ -80,7 +80,8 @@
     	<div slot="footer" class="dialog-footer">
         <!--<el-button v-if="xbkValid && unFeedingCount>0 || (unFeedingCount==0 && unBaitingCount==1 && xbkValid)"  type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
 	      <el-button v-if="(unFeedingCount==0 && unBaitingCount>0) || !xbkValid" type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>-->
-        <el-button v-if="xbkValid"  type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
+        <!--<el-button v-if="xbkValid"  type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>-->
+        <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
         <el-button type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
 
       </div>

+ 2 - 1
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View6.vue

@@ -81,7 +81,8 @@
         <!--
 	      <el-button v-if="xbkValid && unFeedingCount>0 || (unFeedingCount==0 && unBaitingCount==1 && xbkValid)" type="primary" :disabled="confirmDisabled" @click="submitForm(6)">{{ $t('machining.buttons.finished') }}</el-button>
         <el-button v-if="(unFeedingCount==0 && unBaitingCount>0) || !xbkValid" type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button> -->
-        <el-button v-if="xbkValid"  type="primary" :disabled="confirmDisabled" @click="submitForm(6)">{{ $t('machining.buttons.finished') }}</el-button>
+        <!--<el-button v-if="xbkValid"  type="primary" :disabled="confirmDisabled" @click="submitForm(6)">{{ $t('machining.buttons.finished') }}</el-button>-->
+        <el-button type="primary" :disabled="confirmDisabled" @click="submitForm(6)">{{ $t('machining.buttons.finished') }}</el-button>
         <el-button type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
       </div>
     </div>

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

@@ -240,9 +240,9 @@
           >  掉线</div>
           <div v-else 
             class="statusDiv"
-            :style="{background:row.productionStatus.background!=''? row.productionStatus.background :''}" 
+            :style="{background: row.productionStatus && row.productionStatus.background? row.productionStatus.background :''}" 
           >
-            {{ row.productionStatus.text || '离线'}}
+            {{ row.productionStatus && row.productionStatus.text? row.productionStatus.text : '离线'}}
           </div>
         </template>
       </el-table-column>

+ 42 - 16
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/Index.vue

@@ -47,7 +47,7 @@
     		<el-button v-has-permission="['mesNotice:delete']" type="danger" icon="el-icon-delete" size="medium" @click="batchDelete">
 	        {{ $t("table.delete") }}
 	      </el-button>
-    		<el-button type="primary" icon="el-icon-plus" size="medium" @click="marking">{{ $t("developer.buttons.marking") }}</el-button>
+    		<el-button v-show="false" type="primary" icon="el-icon-plus" size="medium" @click="marking">{{ $t("developer.buttons.marking") }}</el-button>
 	      <!--<el-button type="success" icon="el-icon-edit" size="medium" @click="editOne">
 	        {{ $t("common.edit") }}
 	      </el-button>-->
@@ -125,9 +125,10 @@
 			<template slot-scope="{ row }">		        	
 				  <el-tooltip class="item" content='执行处理' effect="dark" placement="top-start" v-if="row.status=='1'">
 			          <i
+					    v-if="row.children"
 			            class="el-icon-bell table-operation"
 			            style="color: #87d068;"
-			            @click="marking(row)"
+			            @click="updateStatus(row)"
 			          />
 		          </el-tooltip>
 				  <el-tooltip class="item" content='页面跳转' effect="dark" placement="top-start" v-if="row.status=='0'">
@@ -136,6 +137,14 @@
 			            style="color: #87d068;"
 			            @click="redirect(row)"
 			          />
+		          </el-tooltip>
+				  <el-tooltip class="item" content='文件下载' effect="dark" placement="top-start" v-if="row.status=='2'">
+			          <i
+					    v-if="row.children"
+			            class="el-icon-download table-operation"
+			            style="color: #87d068;"
+			            @click="download(row)"
+			          />
 		          </el-tooltip>
 		    </template>	
 	  </el-table-column>
@@ -156,7 +165,7 @@
     />
     <tenant-view
       ref="view"
-      :dialog-visible="tenantViewVisible"
+      :dialog-visible="tenantViewVisible"	  
       @close="viewClose"
     />
     <el-dialog
@@ -176,7 +185,7 @@
   </div>
 </template>
 
-<script>
+<script>    
 	import Pagination from "@/components/Pagination"
 	import TenantEdit from "./components/Edit"
 	import TenantView from "./components/View"
@@ -185,7 +194,7 @@
 	import mesNoticeApi from "@/api/runManageCenter/mesNotice"
 	import elDragDialog from '@/directive/el-drag-dialog'
 	import { convertEnum } from '@/utils/utils'
-	import { initDicts, initQueryParams } from '@/utils/commons'
+	import { downloadFile, initDicts, initQueryParams } from '@/utils/commons'
 	export default {
 	  name: "InOutRecord",
 	  directives: { elDragDialog },
@@ -194,7 +203,7 @@
 	  },
 	  data () {
 	    return {
-	    	audioStatus: [],
+	      audioStatus: [],
 	      dialog: {
 	        isVisible: false,
 	        title: ""
@@ -203,7 +212,7 @@
 	        isVisible: false,
 	        context: ''
 	      },
-	      tenantViewVisible: false,
+	      tenantViewVisible: false,		  
 	      tableKey: 0,
 	      queryParams: initQueryParams({}),
 	      selection: [],
@@ -332,10 +341,24 @@
 	    },
 		view(row){
 			this.$refs.view.setTenant(row)
-			this.tenantViewVisible = true
+			this.tenantViewVisible = true			
 		},
 		redirect(){
 
+		},
+		download(row){
+			//this.queryParams.model.orderNo = row.orderNo
+			mesNoticeApi.download({id:row.id}).then(response => {			
+			const res = response.data
+			if (res.isSuccess) {
+				this.$message({
+					message: '处理成功',
+					type: "success"
+				})				
+			} 
+			this.search()
+			//downloadFile(response);
+         })		
 		},
 		marking(){
 		   if (!this.selection.length) {
@@ -345,14 +368,17 @@
 	        })
 	        return false
 	      }
-		    const ids = []
-		    this.selection.forEach(item => {
-		        ids.push(item.id)
-		    })
-		    this.updateStatus(ids)	      		
+		  if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+			return
+		   }		    
+		   this.updateStatus(this.selection[0].id)	      		
 		},
-		updateStatus(ids){		   
-			mesNoticeApi.updateStatus({ids: ids}).then(response => {
+		updateStatus(row){	      
+			mesNoticeApi.updateStatus({id:row.id}).then(response => {
 			const res = response.data
 			if (res.isSuccess) {
 				this.$message({
@@ -415,7 +441,7 @@
 	      this.queryParams.current = params.current ? params.current : this.queryParams.current
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size
 	      // 固定参数:dataStatus = 1-入库/出库,2-解锁/锁定
-	      this.queryParams.model.status = '1'
+	      //this.queryParams.model.status = '1'		  
 	      mesNoticeApi.page(this.queryParams).then(response => {
 	        const res = response.data
 	        if (res.isSuccess) {

+ 2 - 5
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/components/View.vue

@@ -308,16 +308,13 @@ export default {
     dialogVisible: {
       type: Boolean,
       default: false
-    },
-    width: {
-      type: String,
-      default: '70%'
     }
   },
   data () {
-    return {      
+    return {     
       screenWidth: 0,      
       active: 1,
+      width: this.initWidth(),
       dataList: [], 
       storageNodeList:[],
       confirmDisabled: false,

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

@@ -152,7 +152,7 @@
       <!-- 排产 -->
       <el-table-column prop="schedulingStatus" :label='$t("runCenter.table.plan.schedulingStatus")' :show-overflow-tooltip="true" style="width: 12%;" align="center">
       	<template slot-scope="{ row }">
-      		<el-tag v-if="row.schedulingStatus == '0'" type="info">待排产</el-tag>
+      		<el-tag v-if="row.schedulingStatus == '0' && row.singleTaskFlag == '0'" type="info">待排产</el-tag>
       		<el-tag v-if="row.schedulingStatus == '1'" type="success">已排产</el-tag>
 	      	<!--<el-tag v-if="row.schedulingStatus == '1'" type="info">{{$t("runCenter.common.schedulingStatus.noStart")}}</el-tag>
 					<el-tag v-if="row.schedulingStatus == '2'">{{$t("runCenter.common.schedulingStatus.run")}}</el-tag>

+ 40 - 5
imcs-ui/src/views/zuihou/statisticalAnalysis/deviceResource/Index.vue

@@ -57,6 +57,8 @@
           >查询</el-button
         >
         <el-button type="default" @click="resetData()">清空</el-button>
+
+        <el-button type="primary" icon="el-icon-download" @click="exportData()">导出</el-button>
       </el-form>
     </el-card>
     <!-- 列表数据 -->
@@ -67,8 +69,7 @@
       border
       fit
       style="width: 100%"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
+      @selection-change="onSelectChange"      
     >
       <el-table-column
         :label="$t('common.serialNo')"
@@ -109,8 +110,42 @@
         >
         </el-table-column>
 
+        <!--理论加工周期-->
+        <el-table-column
+          prop="totalExpectTime"
+          :label="$t('statisticalAnalysis.table.deviceResource.totalExpectTime')"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+
+        <!--实际加工周期-->
+        <el-table-column
+          prop="totalRealTime"          
+          :label="$t('statisticalAnalysis.table.deviceResource.totalRealTime')"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+
+        <!--平均理论加工周期-->
+        <el-table-column
+          prop="avgExpectTime"
+          width="150px"          
+          :label="$t('statisticalAnalysis.table.deviceResource.avgExpectTime')"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+
+        <!--平均实际加工周期-->
+        <el-table-column
+          prop="avgRealTime"
+          width="150px"
+          :label="$t('statisticalAnalysis.table.deviceResource.avgRealTime')"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+
         <!--操作-->
-        <el-table-column label="操作" width="210" align="center">
+        <el-table-column label="操作" width="100" align="center">
           <template slot-scope="scope">
             <el-button type="text" @click="fetchDataById(scope.row)"
               >查看详情</el-button
@@ -377,7 +412,7 @@ export default {
     },
     //导出
     exportData() {
-      productlineAvailabilityApi.expectprocedureSum().then((res) => {
+      productlineAvailabilityApi.exportTaskResourceSum(this.searchObj).then((res) => {
         if (!res) return;
         const blob = new Blob([res.data], {
           type: "application/vnd.ms-excel;",
@@ -387,7 +422,7 @@ export default {
         let href = window.URL.createObjectURL(blob);
         a.href = href;
         // 文件名中有中文 则对文件名进行转码
-        a.download = decodeURIComponent("产品加工汇总");
+        a.download = decodeURIComponent("任务资源汇总导出");
         // 利用a标签做下载
         document.body.appendChild(a);
         a.click();

+ 20 - 7
imcs-ui/src/views/zuihou/statisticalAnalysis/taskAnalysis/Index.vue

@@ -3,7 +3,7 @@
     <!--查询表单-->
     <el-card class="operate-container" shadow="never">
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item label="任务类型">
+        <el-form-item label="排序类型">
           <el-select
             v-model="searchObj.taskType"
             clearable
@@ -54,6 +54,8 @@
           >查询</el-button
         >
         <el-button type="default" @click="resetData()">清空</el-button>
+
+        <el-button type="primary" icon="el-icon-download" @click="exportData()">导出</el-button>
       </el-form>
     </el-card>
     <!-- 列表数据 -->
@@ -90,7 +92,16 @@
         <el-table-column
           prop="resourceName"
           :label="$t('statisticalAnalysis.table.deviceResource.resourceName')"
-          :show-overflow-tooltip="true"
+          :show-overflow-tooltip="true"  
+          v-if="searchObj.taskType==''"                  
+        >
+        </el-table-column>
+        <!--加工用户-->
+        <el-table-column
+          prop="userName"
+          :label="$t('statisticalAnalysis.table.deviceResource.updateUser')"
+          :show-overflow-tooltip="true"    
+          v-if="searchObj.taskType=='1'" 
         >
         </el-table-column>
         <!--总数量-->
@@ -243,9 +254,11 @@ export default {
       page2: 1, // 当前页码
       limit2: 10, // 每页记录数
       total2: 0, // 总记录数
-      searchObj: {}, // 查询条件
+      searchObj: {
+        taskType:''
+      }, // 查询条件
       dialogVisible: false, //是否弹框
-      taskType: [{id:"1",name:"上下料站",key:"2,6"},{id:"2",name:"加工设备",key:"0"},{id:"3",name:"其他设备",key:"1"}],
+      taskType: [{id:"1",name:"上下料站",key:""},{id:"2",name:"上料用户",key:"1"}],
       resourceIds: [],
       row2: {},
       totalNum: 0
@@ -313,7 +326,7 @@ export default {
       this.row2 = row
       this.dialogVisible = true;
       const obj = {
-        resourceId: row.resourceId,        
+        resourceId: this.searchObj.taskType=="" ? row.resourceId : row.updateUser,        
         taskType: this.searchObj.taskType,
         startDate: this.searchObj.startDate,        
         endDate: this.searchObj.endDate,      
@@ -383,7 +396,7 @@ export default {
     },
     //导出
     exportData() {
-      productlineAvailabilityApi.expectprocedureSum().then((res) => {
+      productlineAvailabilityApi.exportTaskResourceSum(this.searchObj).then((res) => {
         if (!res) return;
         const blob = new Blob([res.data], {
           type: "application/vnd.ms-excel;",
@@ -393,7 +406,7 @@ export default {
         let href = window.URL.createObjectURL(blob);
         a.href = href;
         // 文件名中有中文 则对文件名进行转码
-        a.download = decodeURIComponent("产品加工汇总");
+        a.download = decodeURIComponent("任务资源汇总导出");
         // 利用a标签做下载
         document.body.appendChild(a);
         a.click();