| 
					
				 | 
			
			
				@@ -14,9 +14,10 @@ import { ModalForm, ProFormText } from '@ant-design/pro-form' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 type RoleMenuProps = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   menuId: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   onSelect?: (id: string) => void 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  itemCount?: number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const RoleMenu: React.FC<RoleMenuProps> = ({ menuId, onSelect }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const RoleMenu: React.FC<RoleMenuProps> = ({ menuId, onSelect, itemCount }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const [state, setState] = useState({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     value: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -141,7 +142,12 @@ const RoleMenu: React.FC<RoleMenuProps> = ({ menuId, onSelect }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         title="确认删除吗?" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         okText="确认" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         cancelText="取消" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        onConfirm={() => tryDeleteRole(item.id)}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        onConfirm={() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                          if (itemCount && itemCount !== 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            return message.warning('请先移除已经关联的员工') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                          return tryDeleteRole(item.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        }}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <li className="text-red-500">删除</li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       </Popconfirm> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     </ul> 
			 |