| 
					
				 | 
			
			
				@@ -23,6 +23,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-collapse-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-collapse> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div v-show="isFlow"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <approve-component ref="approve" @approveFinished="approveFinished"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <e-desc title="基本信息" column="3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <e-desc-item label="工艺名称">{{dataForm.techName}}</e-desc-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <e-desc-item label="工艺版本">{{dataForm.techVersion}}</e-desc-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,14 +49,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { dealStepData, dealStepLogs } from '@/api/util' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import uploadComponent from '../common/upload-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { getInfo } from '@/api/crafts' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import ApproveComponent from '../common/approve-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'crafts-detail', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     components: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      EDesc, EDescItem, uploadComponent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      EDesc, EDescItem, uploadComponent, ApproveComponent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         visible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        isFlow: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataForm: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         stepList: [], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -62,16 +67,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      async init (id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      async init (id, businessType) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.visible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.isFlow = !!(businessType && businessType !== '') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.id = id || 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataForm = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.stepList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.logList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.fileList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.getDetails() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getDetails(businessType) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      getDetails () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getDetails (businessType) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         getInfo(this.id).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (data && data.code === '200') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.dataForm = data.data 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -90,8 +96,23 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 初始化审批Form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.showApproveForm(businessType, this.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 初始化审批Form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      showApproveForm (businessType, businessId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (this.isFlow) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$refs.approve.init(businessType, businessId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 审批完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      approveFinished () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.visible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$emit('approveFinished') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |