Jelajahi Sumber

feat 修改用户列表查询

Young 4 bulan lalu
induk
melakukan
b9b5157923
1 mengubah file dengan 51 tambahan dan 0 penghapusan
  1. 51 0
      src/pages/User/Users.tsx

+ 51 - 0
src/pages/User/Users.tsx

@@ -134,6 +134,14 @@ const Edit: React.FC<{ bundle: EditBundle; onSuccess?: () => void }> = (props) =
   );
 };
 
+
+const MockData = [
+  {id: 1, select: '一'},
+  {id: 2, select: '二'},
+  {id: 3, select: '三'}
+];
+
+
 const Staff: React.FC = () => {
   const bundle = useEdit();
   const ref = useRef<ActionType>();
@@ -179,14 +187,57 @@ const Staff: React.FC = () => {
             {
               title: '所属峰',
               dataIndex: 'peakName',
+              search: false
+            },
+            {
+              title: '所属峰',
+              dataIndex: 'peakId',
+              valueType: 'select',
+              hideInTable: true,
+              request: async () => {
+                const res = await getPeakListApi();
+
+                return res.data.map(item => ({
+                  label: item.name,
+                  value: item.id,
+                }));
+              }
             },
             {
               title: '会员等级',
               dataIndex: 'userLevelName',
+              search: false,
+            },
+            {
+              title: '会员等级',
+              dataIndex: 'userLevelId',
+              valueType: 'select',
+              request: async () => {
+                const res = await getUserLevelListApi();
+
+                return res.data.map(item => ({
+                  label: item.name,
+                  value: item.id,
+                }));
+              }
             },
             {
               title: '宗门等级',
               dataIndex: 'factionLevelName',
+              search: false
+            },
+            {
+              title: '宗门等级',
+              dataIndex: 'factionLevelId',
+              valueType: 'select',
+              request: async () => {
+                const res = await getFactionLevelListApi();
+
+                return res.data.map(item => ({
+                  label: item.name,
+                  value: item.id,
+                }));
+              }
             },
             {
               title: '创建时间',