lxb пре 1 година
родитељ
комит
566730011d

+ 9 - 0
imcs-ui/src/api/Dispatch.js

@@ -24,6 +24,10 @@ const apiList = {
   preview: {
     method: 'POST',
     url: `/authority/dispatch/preview`
+  },
+  selectLogs: {
+    method: 'GET',
+    url: `/authority/dispatchRecord/selectLogs`
   }
 }
 
@@ -57,5 +61,10 @@ export default {
       ...apiList.delete,
       data
     })
+  },
+  selectLogs(){
+    return axiosApi({
+      ...apiList.selectLogs
+    })
   }
 }

+ 17 - 17
imcs-ui/src/api/machiningClient/machiningClient.js

@@ -18,13 +18,13 @@ const apiList = {
 	    method: 'POST',
 	    url: `/authority/taskNode`
 	},
-  	// 确认同意 
-  	finishTaskNode: {  
+  	// 确认同意
+  	finishTaskNode: {
     	method: 'POST',
     	url: `/authority/taskNode/finishTaskNode`
   	},
   	// 质检确认同意
-  	finishTestTaskNode: {  
+  	finishTestTaskNode: {
     	method: 'POST',
     	url: `/authority/taskNode/finishTestTaskNode`
   	},
@@ -47,31 +47,31 @@ const apiList = {
     	method: 'POST',
     	url: `/authority/taskNode/getTaskTest`
   	},
-  	
+
   	// 获取【原料唯一码校验结果】信息
   	checkMeterialResult: {
     	method: 'POST',
     	url: `/authority/taskNode/checkMeterialResult`
   	},
-  	
+
   	// 获取【节点库存信息】信息
   	getTaskNodeStockList: {
     	method: 'POST',
     	url: `/authority/taskNode/getTaskNodeStockList`
   	},
-  	
+
   	// 获取【新料入库】信息
   	taskNodeStockIn: {
     	method: 'POST',
     	url: `/authority/taskNode/taskNodeStockIn`
   	},
-  	
+
   	// 获取【移库】信息
   	taskNodeStockTran: {
     	method: 'POST',
     	url: `/authority/taskNode/taskNodeStockTran`
   	},
-  	
+
   	export: {
     	method: 'POST',
     	url: `/authority/taskNode/export`
@@ -102,11 +102,11 @@ const apiList = {
 	},
 	read: {
 		method: 'POST',
-    	url: `http://192.168.11.240:8089/api/ReadRFID`
+    	url: `http://localhost:8089/api/ReadRFID`
 	},
 	write: {
 		method: 'POST',
-    	url: `http://192.168.11.240:8089/api/WriteRFID`
+    	url: `http://localhost:8089/api/WriteRFID`
 	},
 }
 
@@ -174,21 +174,21 @@ export default {
 	      	url: `/authority/taskNode/check/${code}`
 	    })
 	},
-	
+
 	getTaskNodeProcessAnalysis (data) {
 	    return axiosApi({
 	      	...apiList.getTaskNodeProcessAnalysis,
 	      	data
 	    })
   	},
-  	
+
   	getTaskTest (data) {
 	    return axiosApi({
 	      	...apiList.getTaskTest,
 	      	data
 	    })
   	},
-  	
+
   	// 获取【原料唯一码校验结果】信息
   	checkMeterialResult (data) {
 	    return axiosApi({
@@ -196,7 +196,7 @@ export default {
 	      	data
 	    })
   	},
-  	
+
   	// 获取【节点库存信息】信息
   	getTaskNodeStockList (data) {
 	    return axiosApi({
@@ -204,7 +204,7 @@ export default {
 	      	data
 	    })
   	},
-  	
+
   	// 获取【新料入库】信息
   	taskNodeStockIn (data) {
 	    return axiosApi({
@@ -212,7 +212,7 @@ export default {
 	      	data
 	    })
   	},
-  	
+
   	// 获取【移库】信息
   	taskNodeStockTran (data) {
 	    return axiosApi({
@@ -277,4 +277,4 @@ export default {
 	      	data
 	    })
 	}
-}
+}

+ 100 - 0
imcs-ui/src/views/zuihou/dispatchMgr/productLineInfo/Index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="app-container space">
+    <el-row :gutter="12">
+      <el-col :span="12">
+        <el-card shadow="always">
+          <div slot="header" class="clearfix">产线运行记录</div>
+          <div v-for="(item, index) in list" :key="index" class="card_content">
+            <el-form>
+              <el-row :gutter="12">
+                <el-col :span="12">
+                  <el-form-item label="订单号:">
+                    <span>{{item.orderNo}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="任务名称:">
+                    <span>{{item.nodeName}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="12">
+                  <el-form-item label="开始库位:">
+                    <span>{{item.startStorge}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="结束库位:">
+                    <span>{{item.endStorge}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="12">
+                  <el-form-item label="执行状态:">
+                    <span>{{item.exeStatus}}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="执行结果:">
+                    <span>{{item.exeResult}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row :gutter="12">
+                <el-col :span="12">
+                  <el-form-item label="执行时间:">
+                    <span>{{item.executeTime}}</span>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+            <hr/>
+          </div>
+        </el-card>
+      </el-col>
+      <el-col :span="12">
+        <el-card shadow="hover">
+          <div slot="header" class="clearfix">产线PLC状态</div>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import dispatchMgrApi from "@/api/Dispatch";
+export default {
+  name: "productLineInfo",
+  data() {
+    return{
+      list: {}
+    }
+  },
+  created() {
+    this.fetch();
+  },
+  methods: {
+    fetch(){
+      dispatchMgrApi
+        .selectLogs()
+        .then((response) => {
+          const res = response.data;
+          if(res.isSuccess){
+            this.list = res.data
+          }
+        })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.card_content {
+  padding: 8px;
+  width: 100%;
+  text-align: left;
+}
+.el-form-item {
+  margin-bottom: 0;
+}
+</style>

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

@@ -219,8 +219,8 @@ export default {
         this.RFIDParams.taskId =  this.tenant.id
         this.RFIDParams.taskNodeId =  this.tenant.taskNodeId
         this.RFIDParams.data.positionIndex = this.tenant.currentStationName.substr(-1)
-        let that = this
-        machiningClientApi.read(this.RFIDParams).then(res => {
+        //let that = this
+        /*machiningClientApi.read(this.RFIDParams).then(res => {
          if(res.data.result){
            this.$message({
 		          	 message: "RFID: "+res.data.result,
@@ -228,7 +228,7 @@ export default {
 		      })
            that.tenant.uniqueCode = res.data.result
          }
-        });
+        });*/
       }
 
     },

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

@@ -103,7 +103,7 @@ export default {
     return {
       screenWidth: 0,
       confirmDisabled: false,
-      callRobotFlag: false,	
+      callRobotFlag: false,
       unBaitingCount: 0,
       unFeedingCount: 0,
       width: this.initWidth(),
@@ -162,18 +162,18 @@ export default {
           this.$message({
 	          message: "任务ID" + this.$t("rules.require"),
 	          type: "warning"
-	      })		  
+	      })
 		  return false
 	    }
       console.log(this.tenant)
       taskMgrApi.confirmBaiting({ "taskNodeId":this.tenant.taskNodeId}).then((res) => {
-          res = res.data         
-          if (res.isSuccess) {          
+          res = res.data
+          if (res.isSuccess) {
             this.unBaitingCount = res.data.unBaitingCount
-            this.unFeedingCount = res.data.unFeedingCount            
+            this.unFeedingCount = res.data.unFeedingCount
           }
-        });        
-      },  
+        });
+      },
 	release(){
 	    // 上下料站拆除夹具
       taskMgrApi.releaseClamp({ "id" : this.tenant.id}).then((res) => {
@@ -185,7 +185,7 @@ export default {
       });
 	},
 	printCode(row){
-        this.loading = true        
+        this.loading = true
         taskNodMgrApi.printCode({"uniqueCode" : this.tenant.uniqueCode, "taskNodeId" : row.taskNodeId }).then((res) => {
         res = res.data;
         if (res.isSuccess) {
@@ -201,9 +201,9 @@ export default {
     storageForm(){
       machiningClientApi.checkStockNode({"taskNodeId": this.tenant.taskNodeId}).then((res)=>{
             res = res.data;
-            if (res.isSuccess) {                   
+            if (res.isSuccess) {
               if(res.data){
-                  this.submitForm()   
+                  this.submitForm()
               }else{
                   this.callRobot()
               }
@@ -225,10 +225,10 @@ export default {
       });
   	},
     callRobot(){
-      this.callRobotFlag = false     	
+      this.callRobotFlag = false
       	machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId, "callType":"2"}).then((res) => {
         			res = res.data
-        			if (res.isSuccess) {                 
+        			if (res.isSuccess) {
          				 // 通知列表
           				this.$emit("success");
           				// 通知列表-并关闭弹出框
@@ -236,8 +236,8 @@ export default {
        				 }
       			}).finally(()=>{
         			this.callRobotFlag = true
-       });		 
-		
+       });
+
     },
     initWidth () {
       this.screenWidth = document.body.clientWidth
@@ -266,8 +266,8 @@ export default {
         this.RFIDParams.taskId =  this.tenant.id
         this.RFIDParams.taskNodeId =  this.tenant.taskNodeId
         this.RFIDParams.data.positionIndex = this.tenant.currentStationName.substr(-1)
-        let that = this
-        machiningClientApi.read(this.RFIDParams).then(res => {         
+        /*let that = this
+        machiningClientApi.read(this.RFIDParams).then(res => {
          if(res.data.result){
            this.$message({
 		          	 message: "RFID: "+res.data.result,
@@ -275,7 +275,7 @@ export default {
 		      })
            that.tenant.uniqueCode = res.data.result
          }
-        });
+        });*/
       }
 
       this.confirmBaiting()

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

@@ -162,18 +162,18 @@ export default {
           this.$message({
 	          message: "任务ID" + this.$t("rules.require"),
 	          type: "warning"
-	      })		  
+	      })
 		  return false
 	    }
       console.log(this.tenant)
       taskMgrApi.confirmBaiting({ "taskNodeId":this.tenant.taskNodeId}).then((res) => {
-          res = res.data         
-          if (res.isSuccess) {          
+          res = res.data
+          if (res.isSuccess) {
             this.unBaitingCount = res.data.unBaitingCount
-            this.unFeedingCount = res.data.unFeedingCount            
+            this.unFeedingCount = res.data.unFeedingCount
           }
-        });        
-      },  
+        });
+      },
 	release(){
 	    // 上下料站拆除夹具
       taskMgrApi.releaseClamp({ "id" : this.tenant.id}).then((res) => {
@@ -185,7 +185,7 @@ export default {
       });
 	},
 	printCode(row){
-        this.loading = true        
+        this.loading = true
         taskNodMgrApi.printCode({"uniqueCode" : this.tenant.uniqueCode, "taskNodeId" : row.taskNodeId }).then((res) => {
         res = res.data;
         if (res.isSuccess) {
@@ -199,7 +199,7 @@ export default {
       });
     },
   	submitForm(type){
-       // 6:工序下料 3:下料        
+       // 6:工序下料 3:下料
         this.confirmDisabled = true
         taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "end","processType" : type,"updateUser" : this.$store.state.account.user.id}).then((res) => {
             res = res.data;
@@ -217,9 +217,9 @@ export default {
       machiningClientApi.checkStockNode({"taskNodeId": this.tenant.taskNodeId}).then((res)=>{
             res = res.data;
             if (res.isSuccess) {
-              let bool = res.data;              
-              if(bool){                  
-                  this.submitForm("3")   
+              let bool = res.data;
+              if(bool){
+                  this.submitForm("3")
               }else{
                   this.callRobot()
               }
@@ -227,10 +227,10 @@ export default {
       })
     },
     callRobot(){
-      this.callRobotFlag = false     	
+      this.callRobotFlag = false
       machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId, "callType":"2"}).then((res) => {
         			res = res.data
-        			if (res.isSuccess) {                
+        			if (res.isSuccess) {
          				 // 通知列表
           				this.$emit("success");
           				// 通知列表-并关闭弹出框
@@ -238,8 +238,8 @@ export default {
        				 }
       			}).finally(()=>{
         			this.callRobotFlag = true
-       });		 
-		
+       });
+
     },
     initWidth () {
       this.screenWidth = document.body.clientWidth
@@ -268,8 +268,8 @@ export default {
         this.RFIDParams.taskId =  this.tenant.id
         this.RFIDParams.taskNodeId =  this.tenant.taskNodeId
         this.RFIDParams.data.positionIndex = this.tenant.currentStationName.substr(-1)
-        let that = this
-        machiningClientApi.read(this.RFIDParams).then(res => {         
+        //let that = this
+        /*machiningClientApi.read(this.RFIDParams).then(res => {
          if(res.data.result){
            this.$message({
 		          	 message: "RFID: "+res.data.result,
@@ -277,7 +277,7 @@ export default {
 		      })
            that.tenant.uniqueCode = res.data.result
          }
-        });
+        });*/
       }
       this.confirmBaiting()
     },

+ 2 - 2
imcs-ui/src/views/zuihou/machiningClient/waitingTasks/components/View.vue

@@ -688,7 +688,7 @@ export default {
 
 		//let url =  "http://192.168.170.202:8089"
 
-		machiningClientApi.read(JSON.stringify(params)).then(res => {
+		/*machiningClientApi.read(JSON.stringify(params)).then(res => {
 		      console.log(res)
 			  if(res.code == "1"){
 				  this.$message({
@@ -711,7 +711,7 @@ export default {
 				  this.isMsgVisible = false
 			  }
 		})
-
+*/
 	},
 	write(row){
          let params = {