From 31f90e250dec95afe97ddbe4939750f5711b60ad Mon Sep 17 00:00:00 2001
From: yj <1336058017@qq.com>
Date: Wed, 13 Nov 2024 15:12:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AD=BE=E5=88=B0=E7=BB=91?=
=?UTF-8?q?=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/Home/User/index.ts | 28 ++++-
src/page/Home/User/index.module.scss | 15 +++
src/page/Home/User/index.tsx | 182 +++++++++++++++++++++++++--
src/utils/styles/App.scss | 14 +++
4 files changed, 225 insertions(+), 14 deletions(-)
diff --git a/src/api/Home/User/index.ts b/src/api/Home/User/index.ts
index 0a3b33c..579ed76 100644
--- a/src/api/Home/User/index.ts
+++ b/src/api/Home/User/index.ts
@@ -57,4 +57,30 @@ export const PostUserImport = (data: any) =>
url: `/user/import`,
method: 'post',
data
- })
\ No newline at end of file
+ })
+
+export const GetSigninList = () =>
+ request({
+ url: `/user/signin-list`,
+ method: 'get',
+ })
+
+export const PostUserImportSigninList = (data: any) =>
+ request({
+ url: `/user/import/signin-list`,
+ method: 'post',
+ data
+ })
+
+export const GetSigns = (uid: string) =>
+ request({
+ url: `/user/signs?uid=${uid}`,
+ method: 'get',
+ })
+
+export const PutSigns = (uid: string, data: any) =>
+ request({
+ url: `/user/signs?uid=${uid}`,
+ method: 'put',
+ data,
+ })
diff --git a/src/page/Home/User/index.module.scss b/src/page/Home/User/index.module.scss
index e0d7e8a..68a02b2 100644
--- a/src/page/Home/User/index.module.scss
+++ b/src/page/Home/User/index.module.scss
@@ -98,4 +98,19 @@
text-align: right;
}
}
+}
+
+.signInUserModal {
+ max-height: 60vh;
+ display: flex;
+ flex-direction: column;
+
+ >div:nth-child(1) {
+ flex-grow: 1;
+ overflow-y: auto;
+ }
+
+ >div:nth-child(2) {
+ flex-shrink: 0;
+ }
}
\ No newline at end of file
diff --git a/src/page/Home/User/index.tsx b/src/page/Home/User/index.tsx
index 4a1ad55..34812c9 100644
--- a/src/page/Home/User/index.tsx
+++ b/src/page/Home/User/index.tsx
@@ -3,7 +3,7 @@ import { useEffect, useState, useRef } from "react";
import Operation from '@/components/Operation';
import { Button, Input, Table, Pagination, Modal, message, Select } from "antd";
import { ExclamationCircleFilled, SearchOutlined } from '@ant-design/icons';
-import { GetUserList, PostUser, PutUser, DeleteUser, PutUserPwd, GetRoleDpList, PostUserImport, GetSubDpList, PutUserBth } from '@/api/Home/User';
+import { GetUserList, PostUser, PutUser, DeleteUser, PutUserPwd, GetRoleDpList, PostUserImport, GetSubDpList, PutUserBth, GetSigninList, PostUserImportSigninList, GetSigns, PutSigns } from '@/api/Home/User';
import * as CryptoJS from 'crypto-js';
import ImageUrl from '@/utils/package/imageUrl';
import { storage } from '@/utils';
@@ -35,8 +35,14 @@ const User: React.FC = () => {
year: '0',
})
const [changeUserPawModal, setChangeUserPawModal] = useState(false)
+ const [signInModal, setSignInModal] = useState(false)
+ const [signInUserModal, setSignInUserModal] = useState(false)
+ const [signInUserForm, setSignInUserForm] = useState({
+ currentUserList: [],
+ uid: ''
+ })
const [changeImportModal, setChangeImportModal] = useState(false)
- const [changeUserPawFrom, setChangeUserPawFrom] = useState({
+ const [changeUserPawForm, setChangeUserPawForm] = useState({
Pwd: "",
newPwd: '',
})
@@ -94,6 +100,7 @@ const User: React.FC = () => {
const buffer = Buffer.from(arrayBuffer);
await fs.writeFile(`${setting.shareFilesPath}\\${data.fileName}`, buffer, {});
setChangeImportModal(false)
+ setSignInModal(false)
confirm({
title: '提示',
icon: ,
@@ -207,6 +214,13 @@ const User: React.FC = () => {
>
删除用户
+
{
{subjectList.find((subject: any) => subject.value === item.subject)?.label}
>
)} />
-
(
+ (
<>
+
>
)} />
@@ -478,10 +511,10 @@ const User: React.FC = () => {
{
- setChangeUserPawFrom({
- ...changeUserPawFrom,
+ setChangeUserPawForm({
+ ...changeUserPawForm,
Pwd: e.target.value,
});
}}
@@ -492,10 +525,10 @@ const User: React.FC = () => {
{
- setChangeUserPawFrom({
- ...changeUserPawFrom,
+ setChangeUserPawForm({
+ ...changeUserPawForm,
newPwd: e.target.value,
});
}}
@@ -507,14 +540,14 @@ const User: React.FC = () => {
}}>
+ setSignInModal(false)} footer={null} centered width={'300px'}>
+
+
+
+
+
+
+
+
+
+ setSignInUserModal(false)} footer={null} centered width={'300px'}>
+
+
+ {signInUserForm.currentUserList.map((item: any, index: number) => {
+ return (
+
+
{
+ let currentUserListTemp: any = [...signInUserForm.currentUserList]
+ currentUserListTemp[index].signInName = e.target.value
+ setSignInUserForm({
+ ...signInUserForm,
+ currentUserList: currentUserListTemp,
+ })
+ }}
+ />
+

{
+ let currentUserListTemp: any = [...signInUserForm.currentUserList]
+ currentUserListTemp.splice(index, 1)
+ setSignInUserForm({
+ ...signInUserForm,
+ currentUserList: currentUserListTemp,
+ })
+ }} />
+
+ )
+ })
+ }
+
+
+
+
+
+
+
+
>
)
diff --git a/src/utils/styles/App.scss b/src/utils/styles/App.scss
index ab2bc9a..e82a365 100644
--- a/src/utils/styles/App.scss
+++ b/src/utils/styles/App.scss
@@ -26,6 +26,20 @@ $pagination-hover-background-color: #5575F2;
.ant-select-suffix {
color: white !important;
}
+
+ .ant-select-selection-overflow-item {
+ .ant-select-selection-item {
+ background-color: rgba(0, 0, 0, 0.6);
+ }
+
+ .ant-select-selection-item-remove {
+ color: white !important;
+ }
+ }
+
+ .ant-select-selection-search-input {
+ color: white !important;
+ }
}
// input