Procházet zdrojové kódy

修改表格操作列按钮显示样式

wyn před 5 měsíci
rodič
revize
5480838cfd

+ 2 - 0
src/components/DepartmentManagement.tsx

@@ -186,6 +186,7 @@ export default function DepartmentManagement() {
                     className="h-8 px-2"
                   >
                     <Edit2 className="w-4 h-4" />
+                    <span className="ml-1">编辑</span>
                   </Button>
                 </PermissionWrapper>
                 <PermissionWrapper permission="system:dept:delete">
@@ -196,6 +197,7 @@ export default function DepartmentManagement() {
                     className="h-8 px-2 text-red-600 hover:text-red-700"
                   >
                     <Trash2 className="w-4 h-4"/>
+                    <span className="ml-1">删除</span>
                   </Button>
                 </PermissionWrapper>
               </div>

+ 17 - 14
src/components/DictDataManagement.tsx

@@ -4,7 +4,7 @@ import { dictDataApi, DictDataVO } from '../api/DictData';
 import { toast } from 'sonner';
 import { formatDateTimeFull } from '../utils/formatTime';
 import { getIntDictOptions, DICT_TYPE, getDictLabel } from '../utils/dict';
-import { Modal, Card, Tag, Space, Table, Button as AntButton } from 'antd';
+import { Modal, Card, Tag, Space, Table } from 'antd';
 import { ExclamationCircleOutlined } from '@ant-design/icons';
 import { Button } from './ui/button';
 import DictDataForm, { DictDataFormRef } from './DictDataForm';
@@ -156,23 +156,26 @@ export default function DictDataManagement({ dictType, dictDataList, onRefresh }
       width: 150,
       fixed: 'right',
       render: (_: any, record: DictDataVO) => (
-        <Space>
-          <AntButton
-            type="link"
-            size="small"
+        <div className="flex items-center gap-2 justify-center">
+          <Button
+            variant="ghost"
+            size="sm"
             onClick={() => openForm('update', record.id)}
+            className="h-8 px-2"
           >
-            修改
-          </AntButton>
-          <AntButton
-            type="link"
-            size="small"
-            danger
+            <Edit2 className="w-4 h-4" />
+            <span className="ml-1">编辑</span>
+          </Button>
+          <Button
+            variant="ghost"
+            size="sm"
             onClick={() => handleDelete(record.id!, record.label)}
+            className="h-8 px-2 text-red-600 hover:text-red-700"
           >
-            删除
-          </AntButton>
-        </Space>
+            <Trash2 className="w-4 h-4" />
+            <span className="ml-1">删除</span>
+          </Button>
+        </div>
       ),
     },
   ];

+ 22 - 19
src/components/DictTypeManagement.tsx

@@ -295,23 +295,26 @@ export default function DictTypeManagement() {
       width: 150,
       fixed: 'right',
       render: (_: any, record: DictDataVO) => (
-        <Space>
-          <AntButton
-            type="link"
-            size="small"
+        <div className="flex items-center gap-2 justify-center">
+          <UIButton
+            variant="ghost"
+            size="sm"
             onClick={() => openDictDataForm('update', record.id)}
+            className="h-8 px-2"
           >
-            修改
-          </AntButton>
-          <AntButton
-            type="link"
-            size="small"
-            danger
+            <Edit2 className="w-4 h-4" />
+            <span className="ml-1">编辑</span>
+          </UIButton>
+          <UIButton
+            variant="ghost"
+            size="sm"
             onClick={() => handleDeleteDictData(record.id!, record.label)}
+            className="h-8 px-2 text-red-600 hover:text-red-700"
           >
-            删除
-          </AntButton>
-        </Space>
+            <Trash2 className="w-4 h-4" />
+            <span className="ml-1">删除</span>
+          </UIButton>
+        </div>
       ),
     },
   ];
@@ -428,8 +431,8 @@ export default function DictTypeManagement() {
                         onClick={() => openForm('update', row.id)}
                         className="h-8 px-2"
                       >
-                        <Edit2 className="w-4 h-4 mr-1" />
-                        修改
+                        <Edit2 className="w-4 h-4" />
+                        <span className="ml-1">编辑</span>
                       </UIButton>
                       <UIButton
                         variant="ghost"
@@ -437,8 +440,8 @@ export default function DictTypeManagement() {
                         onClick={() => openDictDataModal(row)}
                         className="h-8 px-2"
                       >
-                        <Eye className="w-4 h-4 mr-1" />
-                        数据
+                        <Eye className="w-4 h-4" />
+                        <span className="ml-1">数据</span>
                       </UIButton>
                       <UIButton
                         variant="ghost"
@@ -446,8 +449,8 @@ export default function DictTypeManagement() {
                         onClick={() => handleDelete(row.id!, row.name)}
                         className="h-8 px-2 text-red-600 hover:text-red-700"
                       >
-                        <Trash2 className="w-4 h-4 mr-1" />
-                        删除
+                        <Trash2 className="w-4 h-4" />
+                        <span className="ml-1">删除</span>
                       </UIButton>
                     </div>
                   </TableCell>

+ 38 - 23
src/components/HardwareManagement.tsx

@@ -1,5 +1,7 @@
 import React, { useState } from 'react';
 import { Plus, Search, Edit2, Trash2, MoreVertical, Package, Key, Lock, Briefcase, QrCode, MapPin } from 'lucide-react';
+import { Button } from 'antd';
+import { Button as UIButton } from './ui/button';
 import PadLockManagement from './PadLockManagement';
 import HardwareLockCabinetManagement from './lockCabinet/HardwareLockCabinetManagement';
 
@@ -737,26 +739,32 @@ export default function HardwareManagement({ subMenu }: HardwareManagementProps)
                   ))}
                   <td className="px-6 py-4">
                     <div className="flex items-center justify-center gap-2">
-                      <button
+                      <UIButton
+                        variant="ghost"
+                        size="sm"
                         onClick={() => handleEdit(row)}
-                        className="p-2 text-blue-600 hover:bg-blue-100 rounded-lg transition-colors"
-                        title="编辑"
+                        className="h-8 px-2"
                       >
                         <Edit2 className="w-4 h-4" />
-                      </button>
-                      <button
+                        <span className="ml-1">编辑</span>
+                      </UIButton>
+                      <UIButton
+                        variant="ghost"
+                        size="sm"
                         onClick={() => handleDelete(row.id)}
-                        className="p-2 text-red-600 hover:bg-red-100 rounded-lg transition-colors"
-                        title="删除"
+                        className="h-8 px-2 text-red-600 hover:text-red-700"
                       >
                         <Trash2 className="w-4 h-4" />
-                      </button>
-                      <button
-                        className="p-2 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors"
-                        title="更多"
+                        <span className="ml-1">删除</span>
+                      </UIButton>
+                      <UIButton
+                        variant="ghost"
+                        size="sm"
+                        className="h-8 px-2"
                       >
                         <MoreVertical className="w-4 h-4" />
-                      </button>
+                        <span className="ml-1">更多</span>
+                      </UIButton>
                     </div>
                   </td>
                 </tr>
@@ -765,26 +773,33 @@ export default function HardwareManagement({ subMenu }: HardwareManagementProps)
           </table>
         </div>
 
-        {/* 分页 */}
-        <div className="px-6 py-4 bg-gray-50/50 border-t border-gray-200">
+      </div>
+
+      {/* 分页 */}
+      {filteredData.length > 0 && (
+        <div className="bg-white rounded-lg border border-gray-200 px-6 py-4">
           <div className="flex items-center justify-between">
             <div className="text-sm text-gray-600">
-              共 <span className="text-blue-600">{filteredData.length}</span> 条记录
+              共 <span className="text-blue-600 font-medium">{filteredData.length}</span> 条记录
             </div>
             <div className="flex gap-2">
-              <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
+              <Button
+                disabled={true}
+              >
                 上一页
-              </button>
-              <button className="px-4 py-2 text-sm text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors">
-                1
-              </button>
-              <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
+              </Button>
+              <span className="px-4 py-2 text-sm text-gray-600 flex items-center">
+                1 / 1
+              </span>
+              <Button
+                disabled={true}
+              >
                 下一页
-              </button>
+              </Button>
             </div>
           </div>
         </div>
-      </div>
+      )}
 
       {/* 新增/编辑弹窗 */}
       {showAddModal && (

+ 38 - 23
src/components/IsolationWork.tsx

@@ -1,5 +1,7 @@
 import React, { useState } from 'react';
 import { Plus, Search, Edit2, Trash2, MoreVertical, FileText, Eye, Play, CheckCircle } from 'lucide-react';
+import { Button } from 'antd';
+import { Button as UIButton } from './ui/button';
 
 interface TableRow {
   id: number;
@@ -662,26 +664,32 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
                   ))}
                   <td className="px-6 py-4">
                     <div className="flex items-center justify-center gap-2">
-                      <button
-                        className="p-2 text-green-600 hover:bg-green-100 rounded-lg transition-colors"
-                        title="查看"
+                      <Button
+                        variant="ghost"
+                        size="sm"
+                        className="h-8 px-2"
                       >
                         <Eye className="w-4 h-4" />
-                      </button>
-                      <button
+                        <span className="ml-1">查看</span>
+                      </Button>
+                      <Button
+                        variant="ghost"
+                        size="sm"
                         onClick={() => handleEdit(row)}
-                        className="p-2 text-blue-600 hover:bg-blue-100 rounded-lg transition-colors"
-                        title="编辑"
+                        className="h-8 px-2"
                       >
                         <Edit2 className="w-4 h-4" />
-                      </button>
-                      <button
+                        <span className="ml-1">编辑</span>
+                      </Button>
+                      <Button
+                        variant="ghost"
+                        size="sm"
                         onClick={() => handleDelete(row.id)}
-                        className="p-2 text-red-600 hover:bg-red-100 rounded-lg transition-colors"
-                        title="删除"
+                        className="h-8 px-2 text-red-600 hover:text-red-700"
                       >
                         <Trash2 className="w-4 h-4" />
-                      </button>
+                        <span className="ml-1">删除</span>
+                      </Button>
                     </div>
                   </td>
                 </tr>
@@ -690,26 +698,33 @@ export default function IsolationWork({ subMenu }: IsolationWorkProps) {
           </table>
         </div>
 
-        {/* 分页 */}
-        <div className="px-6 py-4 bg-gray-50/50 border-t border-gray-200">
+      </div>
+
+      {/* 分页 */}
+      {filteredData.length > 0 && (
+        <div className="bg-white rounded-lg border border-gray-200 px-6 py-4">
           <div className="flex items-center justify-between">
             <div className="text-sm text-gray-600">
-              共 <span className="text-blue-600">{filteredData.length}</span> 条记录
+              共 <span className="text-blue-600 font-medium">{filteredData.length}</span> 条记录
             </div>
             <div className="flex gap-2">
-              <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
+              <Button
+                disabled={true}
+              >
                 上一页
-              </button>
-              <button className="px-4 py-2 text-sm text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors">
-                1
-              </button>
-              <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
+              </Button>
+              <span className="px-4 py-2 text-sm text-gray-600 flex items-center">
+                1 / 1
+              </span>
+              <Button
+                disabled={true}
+              >
                 下一页
-              </button>
+              </Button>
             </div>
           </div>
         </div>
-      </div>
+      )}
 
       {/* 新增/编辑弹窗 */}
       {showAddModal && (

+ 43 - 24
src/components/LocationManagement.tsx

@@ -1,5 +1,7 @@
 import React, { useState } from 'react';
 import { Plus, Search, Edit2, Trash2, MoreVertical, MapPin, Eye } from 'lucide-react';
+import { Button } from 'antd';
+import { Button as UIButton } from './ui/button';
 
 interface TableRow {
   id: number;
@@ -273,27 +275,37 @@ export default function LocationManagement() {
                   <td className="px-6 py-4 text-sm text-gray-900">{row.checkCycle}</td>
                   <td className="px-6 py-4 text-sm text-gray-900">{row.lastCheck}</td>
                   <td className="px-6 py-4">
-                    <div className="flex items-center justify-center gap-2">
-                      <button
-                        className="p-2 text-green-600 hover:bg-green-100 rounded-lg transition-colors"
-                        title="查看"
+                    <div className="flex items-center gap-2 justify-center">
+                      <UIButton
+                        variant="ghost"
+                        size="sm"
+                        onClick={() => {
+                          // 查看详情功能
+                          console.log('查看点位详情:', row);
+                        }}
+                        className="h-8 px-2"
                       >
                         <Eye className="w-4 h-4" />
-                      </button>
-                      <button
+                        <span className="ml-1">查看</span>
+                      </UIButton>
+                      <UIButton
+                        variant="ghost"
+                        size="sm"
                         onClick={() => handleEdit(row)}
-                        className="p-2 text-blue-600 hover:bg-blue-100 rounded-lg transition-colors"
-                        title="编辑"
+                        className="h-8 px-2"
                       >
                         <Edit2 className="w-4 h-4" />
-                      </button>
-                      <button
+                        <span className="ml-1">编辑</span>
+                      </UIButton>
+                      <UIButton
+                        variant="ghost"
+                        size="sm"
                         onClick={() => handleDelete(row.id)}
-                        className="p-2 text-red-600 hover:bg-red-100 rounded-lg transition-colors"
-                        title="删除"
+                        className="h-8 px-2 text-red-600 hover:text-red-700"
                       >
                         <Trash2 className="w-4 h-4" />
-                      </button>
+                        <span className="ml-1">删除</span>
+                      </UIButton>
                     </div>
                   </td>
                 </tr>
@@ -302,26 +314,33 @@ export default function LocationManagement() {
           </table>
         </div>
 
-        {/* 分页 */}
-        <div className="px-6 py-4 bg-gray-50/50 border-t border-gray-200">
+      </div>
+
+      {/* 分页 */}
+      {filteredData.length > 0 && (
+        <div className="bg-white rounded-lg border border-gray-200 px-6 py-4">
           <div className="flex items-center justify-between">
             <div className="text-sm text-gray-600">
-              共 <span className="text-blue-600">{filteredData.length}</span> 条记录
+              共 <span className="text-blue-600 font-medium">{filteredData.length}</span> 条记录
             </div>
             <div className="flex gap-2">
-              <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
+              <Button
+                disabled={true}
+              >
                 上一页
-              </button>
-              <button className="px-4 py-2 text-sm text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors">
-                1
-              </button>
-              <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
+              </Button>
+              <span className="px-4 py-2 text-sm text-gray-600 flex items-center">
+                1 / 1
+              </span>
+              <Button
+                disabled={true}
+              >
                 下一页
-              </button>
+              </Button>
             </div>
           </div>
         </div>
-      </div>
+      )}
 
       {/* 新增/编辑弹窗 */}
       {showAddModal && (

+ 3 - 0
src/components/MenuManagement.tsx

@@ -378,6 +378,7 @@ export default function MenuManagement() {
                 className="h-8 px-2"
               >
                 <Edit2 className="w-4 h-4" />
+                <span className="ml-1">编辑</span>
               </UIButton>
               <UIButton
                 variant="ghost"
@@ -386,6 +387,7 @@ export default function MenuManagement() {
                 className="h-8 px-2"
               >
                 <Plus className="w-4 h-4" />
+                <span className="ml-1">新增</span>
               </UIButton>
               <UIButton
                 variant="ghost"
@@ -394,6 +396,7 @@ export default function MenuManagement() {
                 className="h-8 px-2 text-red-600 hover:text-red-700"
               >
                 <Trash2 className="w-4 h-4" />
+                <span className="ml-1">删除</span>
               </UIButton>
             </div>
           </TableCell>

+ 42 - 34
src/components/NotificationManagement.tsx

@@ -1,5 +1,7 @@
 import React, { useState } from 'react';
 import { Plus, Search, Edit2, Trash2, MoreVertical, Mail, Phone, MessageSquare, Smartphone } from 'lucide-react';
+import { Button } from 'antd';
+import { Button as UIButton } from './ui/button';
 
 interface TableRow {
   id: number;
@@ -186,26 +188,32 @@ export default function NotificationManagement() {
                 ))}
                 <td className="px-6 py-4">
                   <div className="flex items-center justify-center gap-2">
-                    <button
+                    <Button
+                      variant="ghost"
+                      size="sm"
                       onClick={() => handleEdit(row)}
-                      className="p-2 text-blue-600 hover:bg-blue-100 rounded-lg transition-colors"
-                      title="编辑"
+                      className="h-8 px-2"
                     >
                       <Edit2 className="w-4 h-4" />
-                    </button>
-                    <button
+                      <span className="ml-1">编辑</span>
+                    </Button>
+                    <Button
+                      variant="ghost"
+                      size="sm"
                       onClick={() => handleDelete(row.id)}
-                      className="p-2 text-red-600 hover:bg-red-100 rounded-lg transition-colors"
-                      title="删除"
+                      className="h-8 px-2 text-red-600 hover:text-red-700"
                     >
                       <Trash2 className="w-4 h-4" />
-                    </button>
-                    <button
-                      className="p-2 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors"
-                      title="更多"
+                      <span className="ml-1">删除</span>
+                    </Button>
+                    <Button
+                      variant="ghost"
+                      size="sm"
+                      className="h-8 px-2"
                     >
                       <MoreVertical className="w-4 h-4" />
-                    </button>
+                      <span className="ml-1">更多</span>
+                    </Button>
                   </div>
                 </td>
               </tr>
@@ -215,30 +223,30 @@ export default function NotificationManagement() {
       </div>
 
       {/* 分页 */}
-      <div className="px-6 py-4 bg-gray-50/50 border-t border-gray-200">
-        <div className="flex items-center justify-between">
-          <div className="text-sm text-gray-600">
-            共 <span className="text-blue-600">{filteredData.length}</span> 条记录
-          </div>
-          <div className="flex gap-2">
-            <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-              上一页
-            </button>
-            <button className="px-4 py-2 text-sm text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors">
-              1
-            </button>
-            <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-              2
-            </button>
-            <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-              3
-            </button>
-            <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-              下一页
-            </button>
+      {filteredData.length > 0 && (
+        <div className="bg-white rounded-lg border border-gray-200 px-6 py-4">
+          <div className="flex items-center justify-between">
+            <div className="text-sm text-gray-600">
+              共 <span className="text-blue-600 font-medium">{filteredData.length}</span> 条记录
+            </div>
+            <div className="flex gap-2">
+              <Button
+                disabled={true}
+              >
+                上一页
+              </Button>
+              <span className="px-4 py-2 text-sm text-gray-600 flex items-center">
+                1 / 1
+              </span>
+              <Button
+                disabled={true}
+              >
+                下一页
+              </Button>
+            </div>
           </div>
         </div>
-      </div>
+      )}
     </>
   );
 

+ 2 - 0
src/components/PostManagement.tsx

@@ -305,6 +305,7 @@ export default function PostManagement() {
                         className="h-8 px-2"
                       >
                         <Edit2 className="w-4 h-4" />
+                        <span className="ml-1">编辑</span>
                       </UIButton>
                       <UIButton
                         variant="ghost"
@@ -313,6 +314,7 @@ export default function PostManagement() {
                         className="h-8 px-2 text-red-600 hover:text-red-700"
                       >
                         <Trash2 className="w-4 h-4" />
+                        <span className="ml-1">删除</span>
                       </UIButton>
                     </div>
                   </TableCell>

+ 42 - 34
src/components/SystemConfig.tsx

@@ -1,5 +1,7 @@
 import React, { useState } from 'react';
 import { Plus, Search, Edit2, Trash2, MoreVertical, ChevronRight, ChevronDown } from 'lucide-react';
+import { Button } from 'antd';
+import { Button as UIButton } from './ui/button';
 import DepartmentManagement from './DepartmentManagement';
 import MenuManagement from './MenuManagement';
 import PostManagement from './PostManagement';
@@ -1001,26 +1003,32 @@ export default function SystemConfig({ subMenu }: SystemConfigProps) {
                     ))}
                     <td className="px-6 py-4">
                       <div className="flex items-center justify-center gap-2">
-                        <button
+                        <Button
+                          variant="ghost"
+                          size="sm"
                           onClick={() => handleEdit(row)}
-                          className="p-2 text-blue-600 hover:bg-blue-100 rounded-lg transition-colors"
-                          title="编辑"
+                          className="h-8 px-2"
                         >
                           <Edit2 className="w-4 h-4" />
-                        </button>
-                        <button
+                          <span className="ml-1">编辑</span>
+                        </Button>
+                        <Button
+                          variant="ghost"
+                          size="sm"
                           onClick={() => handleDelete(row.id)}
-                          className="p-2 text-red-600 hover:bg-red-100 rounded-lg transition-colors"
-                          title="删除"
+                          className="h-8 px-2 text-red-600 hover:text-red-700"
                         >
                           <Trash2 className="w-4 h-4" />
-                        </button>
-                        <button
-                          className="p-2 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors"
-                          title="更多"
+                          <span className="ml-1">删除</span>
+                        </Button>
+                        <Button
+                          variant="ghost"
+                          size="sm"
+                          className="h-8 px-2"
                         >
                           <MoreVertical className="w-4 h-4" />
-                        </button>
+                          <span className="ml-1">更多</span>
+                        </Button>
                       </div>
                     </td>
                   </tr>
@@ -1030,30 +1038,30 @@ export default function SystemConfig({ subMenu }: SystemConfigProps) {
           </div>
 
           {/* 分页 */}
-          <div className="px-6 py-4 bg-gray-50/50 border-t border-gray-200">
-            <div className="flex items-center justify-between">
-              <div className="text-sm text-gray-600">
-                共 <span className="text-blue-600">{filteredData.length}</span> 条记录
-              </div>
-              <div className="flex gap-2">
-                <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-                  上一页
-                </button>
-                <button className="px-4 py-2 text-sm text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors">
-                  1
-                </button>
-                <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-                  2
-                </button>
-                <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-                  3
-                </button>
-                <button className="px-4 py-2 text-sm text-gray-600 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
-                  下一页
-                </button>
+          {filteredData.length > 0 && (
+            <div className="bg-white rounded-lg border border-gray-200 px-6 py-4">
+              <div className="flex items-center justify-between">
+                <div className="text-sm text-gray-600">
+                  共 <span className="text-blue-600 font-medium">{filteredData.length}</span> 条记录
+                </div>
+                <div className="flex gap-2">
+                  <Button
+                    disabled={true}
+                  >
+                    上一页
+                  </Button>
+                  <span className="px-4 py-2 text-sm text-gray-600 flex items-center">
+                    1 / 1
+                  </span>
+                  <Button
+                    disabled={true}
+                  >
+                    下一页
+                  </Button>
+                </div>
               </div>
             </div>
-          </div>
+          )}
         </div>
       )}
 

+ 21 - 14
src/components/UserManagement.tsx

@@ -1,12 +1,13 @@
 import React, { useState, useEffect, useRef } from 'react';
-import { Plus, Search, Upload, Download, RefreshCw } from 'lucide-react';
+import { Plus, Search, Upload, Download, RefreshCw, Edit2, MoreVertical } from 'lucide-react';
 import { userApi } from '../api/user';
 import { userImportApi } from '../api/user/import';
 import { postApi, PostVO } from '../api/Post';
 import { UserVO, WorkstationNode } from '../types';
 import { toast } from 'sonner';
 import { Modal, Table, Input, Button, Switch, Dropdown, Space, Tooltip, Form } from 'antd';
-import { ExclamationCircleOutlined, EditOutlined, DeleteOutlined, KeyOutlined, UserSwitchOutlined, MoreOutlined } from '@ant-design/icons';
+import { ExclamationCircleOutlined, DeleteOutlined, KeyOutlined, UserSwitchOutlined } from '@ant-design/icons';
+import { Button as UIButton } from './ui/button';
 import type { ColumnsType } from 'antd/es/table';
 import DeptTree from './user/DeptTree';
 import UserForm, { UserFormRef } from './user/UserForm';
@@ -382,24 +383,30 @@ export default function UserManagement({ subMenu }: UserManagementProps) {
         ];
 
         return (
-          <Space>
-            <Button
-              type="link"
-              icon={<EditOutlined />}
+          <div className="flex items-center gap-2 justify-center">
+            <UIButton
+              variant="ghost"
+              size="sm"
               onClick={() => openForm('update', record.id)}
-              title="编辑"
-            />
+              className="h-8 px-2"
+            >
+              <Edit2 className="w-4 h-4" />
+              <span className="ml-1">编辑</span>
+            </UIButton>
             <Dropdown
               menu={{ items: menuItems }}
               trigger={['click']}
             >
-              <Button
-                type="link"
-                icon={<MoreOutlined />}
-                title="更多"
-              />
+              <UIButton
+                variant="ghost"
+                size="sm"
+                className="h-8 px-2"
+              >
+                <MoreVertical className="w-4 h-4" />
+                <span className="ml-1">更多</span>
+              </UIButton>
             </Dropdown>
-          </Space>
+          </div>
         );
       },
     },

+ 10 - 4
src/components/lockCabinet/HardwareLockCabinetManagement.tsx

@@ -4,7 +4,7 @@ import { lockCabinetApi, LockCabinetVO, PageParam } from '../../api/lockCabinet'
 import { toast } from 'sonner';
 import { dateFormatter } from '../../utils/formatTime';
 import { DICT_TYPE, getDictLabel } from '../../utils/dict';
-import { Table, Button as AntButton, Image } from 'antd';
+import { Table, Image } from 'antd';
 import type { ColumnsType } from 'antd/es/table';
 import { Button } from '../ui/button';
 import { Input } from '../ui/input';
@@ -307,9 +307,15 @@ export default function HardwareLockCabinetManagement() {
               width: 80,
               align: 'center',
               render: (_: any, record: LockCabinetVO) => (
-                <AntButton type="link" size="small" onClick={() => lookDetail(record)}>
-                  查看
-                </AntButton>
+                <Button 
+                  variant="ghost"
+                  size="sm"
+                  onClick={() => lookDetail(record)}
+                  className="h-8 px-2"
+                >
+                  <Eye className="w-4 h-4" />
+                  <span className="ml-1">查看</span>
+                </Button>
               ),
             },
           ]}

+ 17 - 12
src/components/lockCabinet/SlotsList.tsx

@@ -1,6 +1,8 @@
 import React, { useState, useEffect, useRef } from 'react';
-import { Table, Button as AntButton, Modal, Select, Space, message } from 'antd';
+import { Table, Modal, Select, Space, message, Button as AntButton } from 'antd';
 import { ExclamationCircleOutlined } from '@ant-design/icons';
+import { Edit2, Trash2 } from 'lucide-react';
+import { Button } from '../ui/button';
 import { slotApi, LockCabinetSlotVO, SlotPageParam } from '../../api/lockCabinet/slots';
 import { DICT_TYPE, getIntDictOptions, getDictLabel } from '../../utils/dict';
 import { dateFormatter } from '../../utils/formatTime';
@@ -169,21 +171,24 @@ export default function SlotsList({ cabinetId }: SlotsListProps) {
       align: 'center',
       render: (_: any, record: LockCabinetSlotVO) => (
         <div className="flex items-center gap-2 justify-center">
-          <AntButton
-            type="link"
-            size="small"
+          <Button
+            variant="ghost"
+            size="sm"
             onClick={() => openForm('update', (record as any).slotId || (record as any).id)}
+            className="h-8 px-2"
           >
-            编辑
-          </AntButton>
-          <AntButton
-            type="link"
-            danger
-            size="small"
+            <Edit2 className="w-4 h-4" />
+            <span className="ml-1">编辑</span>
+          </Button>
+          <Button
+            variant="ghost"
+            size="sm"
             onClick={() => handleDelete((record as any).slotId || (record as any).id)}
+            className="h-8 px-2 text-red-600 hover:text-red-700"
           >
-            删除
-          </AntButton>
+            <Trash2 className="w-4 h-4" />
+            <span className="ml-1">删除</span>
+          </Button>
         </div>
       ),
     },

+ 23 - 19
src/components/lockCabinet/SystemLockCabinetManagement.tsx

@@ -4,8 +4,9 @@ import { lockCabinetApi, LockCabinetVO, PageParam } from '../../api/lockCabinet'
 import { toast } from 'sonner';
 import { dateFormatter } from '../../utils/formatTime';
 import { DICT_TYPE, getDictLabel, getStrDictOptions } from '../../utils/dict';
-import { Modal, Table, Button as AntButton, Image, Input, Select, Space } from 'antd';
+import { Modal, Table, Image, Input, Select, Space, Button as AntButton } from 'antd';
 import { ExclamationCircleOutlined, SearchOutlined, ReloadOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons';
+import { Button } from '../ui/button';
 import type { ColumnsType } from 'antd/es/table';
 import LockCabinetForm, { LockCabinetFormRef } from './LockCabinetForm';
 import { ImageWithFallback } from '../figma/ImageWithFallback';
@@ -388,13 +389,15 @@ export default function SystemLockCabinetManagement() {
               width: 80,
               align: 'center',
               render: (_: any, record: LockCabinetVO) => (
-                <AntButton 
-                  type="link" 
-                  size="small" 
+                <Button 
+                  variant="ghost"
+                  size="sm"
                   onClick={() => lookDetail(record)}
+                  className="h-8 px-2"
                 >
-                  查看
-                </AntButton>
+                  <Eye className="w-4 h-4" />
+                  <span className="ml-1">查看</span>
+                </Button>
               ),
             },
             {
@@ -404,23 +407,24 @@ export default function SystemLockCabinetManagement() {
               align: 'center',
               render: (_: any, record: LockCabinetVO) => (
                 <div className="flex items-center gap-2 justify-center">
-                  <AntButton
-                    type="link"
-                    size="small"
-                    icon={<Edit2 className="w-4 h-4" />}
+                  <Button
+                    variant="ghost"
+                    size="sm"
                     onClick={() => openForm('update', record.cabinetId || (record as any).id)}
+                    className="h-8 px-2"
                   >
-                    编辑
-                  </AntButton>
-                  <AntButton
-                    type="link"
-                    size="small"
-                    danger
-                    icon={<Trash2 className="w-4 h-4" />}
+                    <Edit2 className="w-4 h-4" />
+                    <span className="ml-1">编辑</span>
+                  </Button>
+                  <Button
+                    variant="ghost"
+                    size="sm"
                     onClick={() => handleDelete(record.cabinetId || (record as any).id)}
+                    className="h-8 px-2 text-red-600 hover:text-red-700"
                   >
-                    删除
-                  </AntButton>
+                    <Trash2 className="w-4 h-4" />
+                    <span className="ml-1">删除</span>
+                  </Button>
                 </div>
               ),
             },