From 03df7542cd456dc3e63a33cdd1f4cced5364f867 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 27 二月 2024 13:27:17 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/system/userLogin/index.jsx |   57 +++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/zy-asrs-flow/src/pages/system/userLogin/index.jsx b/zy-asrs-flow/src/pages/system/userLogin/index.jsx
index 39266d0..456f171 100644
--- a/zy-asrs-flow/src/pages/system/userLogin/index.jsx
+++ b/zy-asrs-flow/src/pages/system/userLogin/index.jsx
@@ -1,6 +1,6 @@
 
 import React, { useState, useRef, useEffect } from 'react';
-import { Button, message, Modal } from 'antd';
+import { Button, message, Modal, Tag } from 'antd';
 import {
     FooterToolbar,
     PageContainer,
@@ -11,6 +11,28 @@
 import Http from '@/utils/http';
 import Edit from './components/edit'
 import { TextFilter, SelectFilter, DatetimeRangeFilter, LinkFilter } from '@/components/TableSearch'
+import { repairBug } from '@/utils/common-util';
+
+const TABLE_KEY = "pro-table-userLogin";
+
+const typeMap = {
+    0: {
+        color: '#87d068',
+        text: '鐧诲綍鎴愬姛',
+    },
+    1: {
+        color: '#f50',
+        text: '鐧诲綍澶辫触',
+    },
+    2: {
+        color: '',
+        text: '閫�鍑虹櫥褰�',
+    },
+    3: {
+        color: '#3b5999',
+        text: '缁token',
+    },
+};
 
 const handleSave = async (val) => {
     const hide = message.loading('姝e湪娣诲姞');
@@ -125,6 +147,7 @@
             dataIndex: 'token',
             valueType: 'text',
             hidden: false,
+            ellipsis: true,
             width: 140,
             copyable: true,
             filterDropdown: (props) => <TextFilter
@@ -153,12 +176,22 @@
             valueType: 'text',
             hidden: false,
             width: 140,
-            filterDropdown: (props) => <TextFilter
+            filterDropdown: (props) => <SelectFilter
                 name='type'
                 {...props}
                 actionRef={actionRef}
                 setSearchParam={setSearchParam}
+                data={[
+                    { label: '鐧诲綍鎴愬姛', value: 0 },
+                    { label: '鐧诲綍澶辫触', value: 1 },
+                    { label: '閫�鍑虹櫥褰�', value: 2 },
+                    { label: '缁token', value: 3 },
+                ]}
             />,
+            render: (_, record) => {
+                const type = typeMap[record.type]
+                return <Tag color={type.color}>{type.text}</Tag>
+            },
         },
         {
             title: '娣诲姞鏃堕棿',
@@ -204,11 +237,13 @@
             title: '鎿嶄綔',
             dataIndex: 'option',
             width: 140,
+            hidden: true,
             valueType: 'option',
             render: (_, record) => [
                 <Button
                     type="link"
                     key="edit"
+                    hidden="true"
                     onClick={() => {
                         setModalVisible(true);
                         setCurrentRow(record);
@@ -219,6 +254,7 @@
                 <Button
                     type="link"
                     danger
+                    hidden="true"
                     key="batchRemove"
                     onClick={async () => {
                         Modal.confirm({
@@ -257,8 +293,11 @@
                     cardBordered
                     scroll={{ x: 1300 }}
                     dateFormatter="string"
-                    pagination={{ pageSize: 20 }}
+                    pagination={{ pageSize: 16 }}
                     search={false}
+                    style={{
+                        marginBottom: '20px'
+                    }}
                     toolbar={{
                         search: {
                             onSearch: (value) => {
@@ -280,6 +319,7 @@
                             <Button
                                 type="primary"
                                 key="save"
+                                hidden="true"
                                 onClick={async () => {
                                     setModalVisible(true)
                                 }}
@@ -307,15 +347,12 @@
                             }
                         })
                     }
-                    rowSelection={{
-                        onChange: (ids, rows) => {
-                            setSelectedRows(rows);
-                        }
-                    }}
+                    rowSelection={undefined}
                     columnsState={{
-                        persistenceKey: 'pro-table-userLogin',
+                        persistenceKey: TABLE_KEY,
                         persistenceType: 'localStorage',
                         defaultValue: {
+                            system: { show: repairBug(TABLE_KEY, 'system', false) },
                             option: { fixed: 'right', disable: true },
                         },
                         onChange(value) {
@@ -324,7 +361,7 @@
                 />
             </div>
 
-            {selectedRows?.length > 0 && (
+            {selectedRows?.length > 0 && false && (
                 <FooterToolbar
                     extra={
                         <div>

--
Gitblit v1.9.1