| 
					
				 | 
			
			
				@@ -5,6 +5,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       width="70%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :close-on-click-modal="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :visible.sync="visible" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      @close="handleClose" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :model="dataForm" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -51,7 +52,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ref="workFlow" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             :nodeData="workFlowData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             :selectOperator="true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            @saveWorkFlow="saveWorkFlow" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           ></work-flow> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,22 +118,34 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 初始化表单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    async init (id, disable) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    async init (id, disable, productionId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.visible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.display = disable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.mouldId = id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (!disable) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        await this.initProductList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      await this.initProductList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      await getMouldDetail(id).then(async ({ data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.dataForm = data.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(id > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        await getMouldDetail(id).then(async ({ data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.dataForm = data.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 流程图展示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.workFlowData = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              nodeList: data.data.nodeList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              lineList: data.data.lineList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(productionId && productionId > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.productChange(productionId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 根据产品ID查询步骤详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async productChange (productId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // this.visible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // this.$emit('reload', 0, false, productId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       getMouldDetailByProductId(productId).then(async ({ data }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.dataForm = { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -144,8 +156,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             nodeList: data.data.nodeList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             lineList: data.data.lineList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            type: 'error', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            message: data.msg 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 按工种ID查询操作人列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getOperatorList (workTypeId) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -237,10 +255,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 保存流程图 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    saveWorkFlow (workFlowData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.clickFlowSave = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.workFlowData = workFlowData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleClose () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$emit('close') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |