From 81e925794be1ad8c7bc423cc53247bdf90222389 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Tue, 4 Apr 2023 14:32:01 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=BA=BA=E5=91=98=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=E4=BB=A5=E5=8F=8A?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E6=9D=83=E9=99=90=E5=BC=B9=E7=AA=97=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/compenents/tree-adminroles/index.tsx | 1 +
src/index.less | 6 ++
src/pages/system/administrator/index.tsx | 86 +++++++++++++------
.../system/adminroles/compenents/create.tsx | 2 +
.../system/adminroles/compenents/update.tsx | 2 +
5 files changed, 72 insertions(+), 25 deletions(-)
diff --git a/src/compenents/tree-adminroles/index.tsx b/src/compenents/tree-adminroles/index.tsx
index 237790b..67d0b90 100644
--- a/src/compenents/tree-adminroles/index.tsx
+++ b/src/compenents/tree-adminroles/index.tsx
@@ -34,6 +34,7 @@ export const TreeAdminroles = (props: PropInterface) => {
}
setTreeData(new_arr);
}
+ onSelect([], "");
});
}, [props.refresh]);
const onSelect = (selectedKeys: any, info: any) => {
diff --git a/src/index.less b/src/index.less
index 6d96318..ea65551 100644
--- a/src/index.less
+++ b/src/index.less
@@ -450,6 +450,12 @@ textarea.ant-input {
background-color: #fff2f0 !important;
border-radius: 6px !important;
overflow: hidden;
+ .ant-tree-node-content-wrapper {
+ background-color: transparent !important;
+ }
+ .ant-tree-node-content-wrapper-normal {
+ background-color: transparent !important;
+ }
}
.ant-tree-node-content-wrapper {
width: 100% !important;
diff --git a/src/pages/system/administrator/index.tsx b/src/pages/system/administrator/index.tsx
index d89b012..d84573a 100644
--- a/src/pages/system/administrator/index.tsx
+++ b/src/pages/system/administrator/index.tsx
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react";
import { Typography, Input, Button, Space, Table, Modal, message } from "antd";
import type { ColumnsType } from "antd/es/table";
import { PlusOutlined, ExclamationCircleFilled } from "@ant-design/icons";
-import { adminUser } from "../../../api/index";
+import { adminUser, adminRole } from "../../../api/index";
import { dateFormat } from "../../../utils/index";
import { useNavigate } from "react-router-dom";
import { TreeAdminroles, PerButton } from "../../../compenents";
@@ -180,6 +180,29 @@ const SystemAdministratorPage = () => {
});
};
+ const delAdminRole = () => {
+ if (role_ids.length === 0) {
+ return;
+ }
+ confirm({
+ title: "操作确认",
+ icon: