소스 검색

feat 修改用户列表查询

Young 4 달 전
부모
커밋
b9b5157923
1개의 변경된 파일51개의 추가작업 그리고 0개의 파일을 삭제
  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: '创建时间',