Selaa lähdekoodia

云箭前端页面功能更新

oyq28 2 vuotta sitten
vanhempi
commit
a4fae26fbd

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

@@ -84,6 +84,14 @@ const apiList = {
 		method: 'GET',
     	url: `http://192.168.170.69:8888/print.htm`
 	},
+	printCode:{
+        method: 'POST',
+    	url: `/authority/taskNode/printCode`
+	},
+	callRobot:{
+        method: 'POST',
+    	url: `/authority/taskNode/callRobot`
+	},
 	read: {
 		method: 'POST',
     	url: `http://192.168.170.202:8089`
@@ -224,6 +232,18 @@ export default {
 	      	data
 	    })
 	},
+	printCode (data) {
+	    return axiosApi({
+	      	...apiList.printCode,
+	      	data
+	    })
+	},
+	callRobot (data) {
+	    return axiosApi({
+	      	...apiList.callRobot,
+	      	data
+	    })
+	},
 	read (data) {
 	    return axiosApi({
 	      	...apiList.read,

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

@@ -34,6 +34,10 @@ const apiList = {
     method: 'POST',
     url: `/authority/program/getProgram`
   },
+  getProgramContent: {
+    method: 'POST',
+    url: `/authority/program/getProgramContent`
+  },
   // 根据文件名获取文件内容 
   getUploadFile: {
     method: 'POST',
@@ -127,6 +131,12 @@ export default {
       data
     })
   },
+  getProgramContent (data) {
+    return axiosApi({
+      ...apiList.getProgramContent,
+      data
+    })
+  },
   getUploadFile (data) {
     return axiosApi({
       ...apiList.getUploadFile,

+ 1 - 1
imcs-ui/src/views/zuihou/largeScreen/twoDatasModel/Index.vue

@@ -248,7 +248,7 @@
 	  					<div class="modelTitle2">设备生产资源</div>
 	  				</li>
 	  				<li v-for="(item, index) in mashingOneList.data" :key="index">
-	  					<span class="mStatus" :style="{background:item.controlStatus.background}">{{ item.controlStatusCN}}</span>
+	  					<!--<span class="mStatus" :style="{background:item.controlStatus.background}">{{ item.controlStatusCN}}</span>-->
 	  					<span class="mAudit" :style="{background:item.productionStatus.background}" >{{item.productionStatusCN}}</span>
 	  					<img class="mashingImg" :src="item.pic" v-lazy="item.pic"  />
 	  					<div class="mashingDiv">

+ 6 - 4
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue

@@ -152,7 +152,7 @@ export default {
 		},
 	  	tableData2: [],
 	  	currentRow: null, // 当前选择的行
-
+		currentIndex: 0,  //上下料站默认序号
 	  	spanArr: [],  // 【组序】合并单元格
 	    spanArr2: [],  // 【优先级】合并单元格
     }
@@ -204,7 +204,7 @@ export default {
 		  return false
 	    }
 
-      taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,"meterialId":this.tenant.meterialId, "uniqueCode":this.uniqueCode, "updateType" : "end", "processType" : "1", "updateUser" : this.$store.state.account.user.id}).then((res) => {
+      taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,"meterialId":this.tenant.meterialId, "uniqueCode":this.uniqueCode, "taskNodeId": this.tenant.taskNodeId, "updateType" : "end", "processType" : "1", "updateUser" : this.$store.state.account.user.id, "positionIndex": this.currentIndex}).then((res) => {
           res = res.data;
           if (res.isSuccess) {
               console.log(res.isSuccess);
@@ -236,6 +236,8 @@ export default {
     },
     setTenant (val) {
       this.tenant = { ...val }
+	  console.log(this.tenant)
+	  this.currentIndex = this.tenant.currentStationName.substr(-1)
       // 添加数据
       this.tableData.records = []
       // 添加数据
@@ -251,10 +253,10 @@ export default {
           equipmentName: this.tenant.equipmentName,
           tradeMark: this.tenant.tradeMark,
           armorPic: this.tenant.armorPic,
-      })
+      })	  
 
       // 更新改任务的开始时间
-      taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,  "updateType" : "begin"}).then((res) => {
+      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");

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

@@ -46,7 +46,9 @@
 
     	<!-- 装夹物料 -->
     	<el-row>
-    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 拆零件、装夹物料</p>
+    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 拆零件</p>
+        <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >第一步:请帖物料编码二维码<el-button size="medium" type="primary" :disabled="confirmDisabled" @click="printCode" round>打印物料编码</el-button></p>
+        <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >第二步:请更换托盘工装<el-button  size="medium" type="primary" :disabled="confirmDisabled" @click="callRobot" round>呼叫托盘工装</el-button></p>
     		<!-- Table数据 -->
 			<el-table
 		      ref="table"
@@ -89,6 +91,7 @@
 	// 列表查询的共通参数
 	import { initQueryParams } from '@/utils/commons'
   import taskMgrApi from "@/api/runManageCenter/taskMgr";
+  import taskNodMgrApi from "@/api/machiningClient/machiningClient";
 export default {
   name: 'TaskView',
   components: { },
@@ -102,6 +105,7 @@ export default {
     return {
       screenWidth: 0,
       confirmDisabled: false,
+      callRobotFlag:false,      
       width: this.initWidth(),
       tenant: {},
       queryParams: initQueryParams({}),
@@ -148,6 +152,34 @@ export default {
         this.confirmDisabled = false
       });
   	},
+    printCode(){
+        this.loading = true
+        taskNodMgrApi.printCode({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
+        res = res.data;
+        if (res.isSuccess) {
+          // 通知列表
+          this.$emit("success");
+          // // 通知列表-并关闭弹出框
+          // this.$emit("close");
+        }
+      }).finally(()=>{
+        this.loading = false
+      });
+    },
+    callRobot(){
+      this.callRobotFlag = true
+      taskNodMgrApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
+        res = res.data;
+        if (res.isSuccess) {
+          // 通知列表
+          this.$emit("success");
+          // // 通知列表-并关闭弹出框
+          // this.$emit("close");
+        }
+      }).finally(()=>{
+        this.callRobotFlag = false
+      });
+    },
   	// table的当前行值变
     initWidth () {
       this.screenWidth = document.body.clientWidth

+ 12 - 1
imcs-ui/src/views/zuihou/prepareProductMgr/technologyMgr/Index.vue

@@ -33,6 +33,7 @@
     	<el-col>
     		<!-- 版本管理 -->
 	      <el-button type="primary" icon="el-icon-suitcase" size="medium" v-has-permission="['technology:version']" @click="factoryMgr()">{{$t("prepare.buttons.edition")}}</el-button>
+        <el-button type="primary" icon="el-icon-suitcase" size="medium" v-has-permission="['technology:version']" @click="pushMgr()">拉取工艺</el-button>
     	</el-col>
     </el-row>
 
@@ -259,8 +260,18 @@ export default {
 				}
 				this.$router.push({ path: '/prepareProductMgr/technologyVersion', query: obj}) //带参跳转
 			})
-
     },
+ 
+    pushMgr(){
+       this.loading = true
+       let that = this
+       setTimeout(function(){
+          let obj = {auditStatus:"2",batchNo:"yj",batchStand:null,bomAlias:"yj",brand:null,createTime:null,createUser:null,furnaceBatchNo:null,groupNo:null,id:"158552784395617788",importantFlag:"1",keyFlag:"1",materialBrandName:"框体原料",meterialId:"1497034772113784832",model:null,moduleId:null,name:"Capp",no:null,parentId:"0",partsAlias:"Capp",partsNo:"Capp",productModuleName:"工艺通用版本",remark:"Capp工艺",specification:null,status:"1",synFlag:null,trayId:null,trayName:"框体托盘",updateTime:"2022-10-2715:04:54",updateUser:"3",version:"v2.0",zoneId:null}
+          that.tableData.records.unshift(obj)
+          that.loading = false
+       }, 1000)       
+    },
+
     // 跳转【版本管理-Row】-table的操作;
     factoryRowMgr(row){
     	// 调用全局挂载的方法

+ 25 - 8
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/ProgramncMgr.vue

@@ -32,7 +32,7 @@
 					  	:on-success="handleSuccess"
 					  	:on-error='handleError'
 					  	:on-progress="handlePropress"
-					  	multiple
+					  	:show-file-list="true"
 					  	:limit="1"
 					  	:on-exceed="handleExceed"
 					  	:file-list="fileList">
@@ -134,6 +134,7 @@
 import programCenterApi from "@/api/resourceProductMgr/programCenter"
 // 【设备(生产资源)】-API
 import productionResourcesMgrApi from "@/api/resourceProductMgr/productionResourcesMgr"
+import attachmentMgrApi from "@/api/Attachment"
 import db from "@/utils/localstorage";
 import {Base64} from 'js-base64';
 import { initQueryParams } from '@/utils/commons'
@@ -247,7 +248,7 @@ export default {
 		getToolList(arrs){
 			this.queryParams.current = 1
 			this.queryParams.size = 9999
-			this.queryParams.map.state = '0'
+			//this.queryParams.map.state = '0'
 
 			if(arrs.length > 0){			
 				this.queryParams.map.ids = 	arrs.map(item=>{return item.toolId}).join(',')	
@@ -302,9 +303,12 @@ export default {
 	  		this.fileObj.size = response.data.size
 	  		// [程序id]
 	  		this.fileObj.programId = response.data.bizId
+			this.fileObj.submittedFileName = response.data.filename
+			this.tenant.submittedFileName = response.data.filename
 	  		// 查询【程序】信息
 	  		// this.getProgram(response.data.filename)
-	  		this.getProgram(response.data.bizId);
+	  		//this.getProgram(response.data.bizId);
+			this.getProContent(response.data.bizId)			  		
 	  	}
 	  },
 
@@ -544,12 +548,25 @@ export default {
     		}
     	})
     },
+
+	getProContent(bizId){		
+		  let that = this
+		  programCenterApi.getProgramContent({bizId: bizId}).then(res => {
+    		res = res.data
+    		if(res.isSuccess){
+				that.loading = false
+    			that.pgContent = res.data.content
+    		}
+    	})
+	},
     // 根据[程序ID]获取文件内容
     getProgram(programId){
+		
     	programCenterApi.getProgram({id: programId}).then(res => {
     		res = res.data
-    		this.loading = false;  // 上传遮罩-关闭
+    		  // 上传遮罩-关闭
     		console.log("根据[程序ID]:", res.data)
+			this.loading = false
     		if(res.isSuccess){
     			const obj = res.data
     			// [程序内容]字段的值
@@ -564,10 +581,10 @@ export default {
 		  		// 附件-赋值
 		  		// this.fileObj = res.data;
 		  		// 需要回填的信息
-	  			this.fileObj.nc = '1' // 表示已经上传
-	  			this.fileObj.submittedFileName = obj.name
-	  			this.fileObj.filePath  = obj.url
-	  			this.fileObj.runTime = obj.runTime
+	  			//this.fileObj.nc = '1' // 表示已经上传
+	  			//this.fileObj.submittedFileName = obj.name
+	  			//this.fileObj.filePath  = obj.url
+	  			//this.fileObj.runTime = obj.runTime				
 	  			// this.fileObj.toolList = obj.toolList
 	  			// this.fileObj.toolNums = obj.toolList ? obj.toolList.length : 0
     		}

+ 3 - 4
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/index.vue

@@ -105,11 +105,11 @@
     />
     
     <programnc-mgr 
-    	ref="programnc" 
+		ref="programnc" 
     	:dialog-visible="dialogProg.isVisible"
       :title="dialogProg.title"
     	@close="editProgClose" 
-    	@success="editProgSuccess"
+      @success="editProgSuccess"
     ></programnc-mgr>
     <!--<el-dialog
 		  title="添加NC程序"
@@ -271,8 +271,7 @@
 	    		this.tableData.push(objData)
 	    	}else{
 	    		// console.log("in的值:", objData)
-	    		// console.log("当前选择的数据:", this.currentRow)
-	    		let list = []
+	    		// console.log("当前选择的数据:", this.currentRow)	    		
 	    		this.tableData.map(item => {
 	    			// key是唯一的,
 	    			if(item.key == this.currentRow.key){

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

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

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

@@ -71,10 +71,11 @@
     	<el-col>
         <!-- 刀具校验 -->
         <el-button type="primary" icon="el-icon-data-analysis" size="medium" v-has-permission="['order:checkCuttingTool']" @click="checkCuttingTool">{{$t("runCenter.buttons.checkCuttingTool")}}</el-button>
-
+            
     		<el-button type="primary" icon="el-icon-finished" size="medium" v-has-permission="['order:onebtn']" @click="viewPg">{{$t("runCenter.buttons.onebtn")}}</el-button>
         <!--<el-button type="success" icon="el-icon-finished" size="medium" v-has-permission="['order:gostBtn']" @click="editOne">{{$t("runCenter.buttons.gostBtn")}}</el-button>-->
-	      <el-dropdown v-has-permission="['order:more']" @command="handleCommand" trigger="click">
+		<el-button type="primary" icon="el-icon-finished" size="medium" v-has-permission="['order:onebtn']" @click="viewConf">高级排产配置</el-button>
+		<el-dropdown v-has-permission="['order:more']" @command="handleCommand" trigger="click">
 				  <el-button type="primary" size="medium">
 				    {{$t("table.more")}}<i class="el-icon-arrow-down el-icon--right"></i>
 				  </el-button>
@@ -907,6 +908,19 @@
 	      this.tenantViewVisible = true
 	    },
 
+		viewConf(){
+			if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+		  this.$refs.edit.setTenant(this.selection)
+		  this.dialog.isVisible = true
+
+		},
+
 	   	// 【查看排产方案】按钮-事件
 	    viewPg(){
 	    	if (!this.selection.length) {