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 | 52 +++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/zy-asrs-flow/src/pages/system/userLogin/index.jsx b/zy-asrs-flow/src/pages/system/userLogin/index.jsx
index 5f796a0..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,
@@ -14,6 +14,25 @@
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湪娣诲姞');
@@ -128,6 +147,7 @@
dataIndex: 'token',
valueType: 'text',
hidden: false,
+ ellipsis: true,
width: 140,
copyable: true,
filterDropdown: (props) => <TextFilter
@@ -156,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: '娣诲姞鏃堕棿',
@@ -207,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);
@@ -222,6 +254,7 @@
<Button
type="link"
danger
+ hidden="true"
key="batchRemove"
onClick={async () => {
Modal.confirm({
@@ -260,8 +293,11 @@
cardBordered
scroll={{ x: 1300 }}
dateFormatter="string"
- pagination={{ pageSize: 20 }}
+ pagination={{ pageSize: 16 }}
search={false}
+ style={{
+ marginBottom: '20px'
+ }}
toolbar={{
search: {
onSearch: (value) => {
@@ -283,6 +319,7 @@
<Button
type="primary"
key="save"
+ hidden="true"
onClick={async () => {
setModalVisible(true)
}}
@@ -310,15 +347,12 @@
}
})
}
- rowSelection={{
- onChange: (ids, rows) => {
- setSelectedRows(rows);
- }
- }}
+ rowSelection={undefined}
columnsState={{
persistenceKey: TABLE_KEY,
persistenceType: 'localStorage',
defaultValue: {
+ system: { show: repairBug(TABLE_KEY, 'system', false) },
option: { fixed: 'right', disable: true },
},
onChange(value) {
@@ -327,7 +361,7 @@
/>
</div>
- {selectedRows?.length > 0 && (
+ {selectedRows?.length > 0 && false && (
<FooterToolbar
extra={
<div>
--
Gitblit v1.9.1