| 
					
				 | 
			
			
				@@ -1,6 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <el-form ref="form" inline :model="form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <el-form ref="form" inline :model="form" v-if="!isEmpty"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template v-for="(item, key) in form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <select-user 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           v-if="item.length > 0" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -12,6 +12,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <empty v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <p>无需交接,点击确定继续操作离职</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </empty> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <span slot="footer" class="dialog-footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button @click="$listeners.close">取 消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button @click="submit" type="primary">确 定</el-button> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,6 +42,18 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   computed: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    isEmpty() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let empty = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      for (const key in this.form) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (Object.hasOwnProperty.call(this.form, key)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const item = this.form[key]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (item.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            empty = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return empty 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     branchsyId() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return array2object(this.selects.branchs, 'id') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,6 +75,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async submit() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!this.$refs.form) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          await employeeLevel([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$message.success('提交成功') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$listeners.submited() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } catch (error) {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.form.validate(async valid => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           let list = [] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -69,9 +92,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               list = list.concat(item.map(row => ({...row, roleName: key}))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          await employeeLevel(list) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$message.success('提交成功') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$listeners.submited() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            await employeeLevel(list) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$message.success('提交成功') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$listeners.submited() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } catch (error) {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,5 +129,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   text-align: right; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   display: block; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   padding-bottom: 20px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  margin-top: 20px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </style> 
			 |