From f579ec9f3a980495298743075761e22ee44647d8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 23 二月 2024 10:38:42 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/system/controller/RoleController.java | 10 ++
zy-asrs-flow/src/pages/system/operationRecord/index.jsx | 4
zy-asrs-flow/src/pages/system/role/index.jsx | 47 ++++++++---
zy-asrs-flow/src/global.less | 36 +++++++-
zy-asrs-flow/src/pages/system/user/index.jsx | 92 ++++++++++++++--------
5 files changed, 131 insertions(+), 58 deletions(-)
diff --git a/zy-asrs-flow/src/global.less b/zy-asrs-flow/src/global.less
index a9a0c51..4a1ee18 100644
--- a/zy-asrs-flow/src/global.less
+++ b/zy-asrs-flow/src/global.less
@@ -1,3 +1,7 @@
+:root {
+ --scrollbar-thumb-color: rgba(128, 128, 128, .5);
+}
+
html,
body,
#root {
@@ -16,6 +20,7 @@
.ant-layout {
min-height: 100vh;
}
+
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
left: unset;
}
@@ -35,19 +40,38 @@
list-style: none;
}
+::-webkit-scrollbar {
+ width: 6px;
+ height: 7px;
+ background-color: transparent;
+}
+
+::-webkit-scrollbar-thumb {
+ background-color: var(--scrollbar-thumb-color);
+ border-radius: 5px;
+}
+
+::-webkit-scrollbar-track {
+ background-color: transparent;
+ border-radius: 5px;
+}
+
@media (max-width: 768px) {
.ant-table {
width: 100%;
overflow-x: auto;
- &-thead > tr,
- &-tbody > tr {
- > th,
- > td {
+
+ &-thead>tr,
+ &-tbody>tr {
+
+ >th,
+ >td {
white-space: pre;
- > span {
+
+ >span {
display: block;
}
}
}
}
-}
+}
\ No newline at end of file
diff --git a/zy-asrs-flow/src/pages/system/operationRecord/index.jsx b/zy-asrs-flow/src/pages/system/operationRecord/index.jsx
index 50537cc..f5c235c 100644
--- a/zy-asrs-flow/src/pages/system/operationRecord/index.jsx
+++ b/zy-asrs-flow/src/pages/system/operationRecord/index.jsx
@@ -175,7 +175,7 @@
{
title: '璇锋眰鍐呭',
dataIndex: 'request',
- valueType: 'text',
+ valueType: 'code',
hidden: false,
width: 140,
filterDropdown: (props) => <TextFilter
@@ -188,7 +188,7 @@
{
title: '鍝嶅簲鍐呭',
dataIndex: 'response',
- valueType: 'text',
+ valueType: 'code',
hidden: false,
width: 140,
filterDropdown: (props) => <TextFilter
diff --git a/zy-asrs-flow/src/pages/system/role/index.jsx b/zy-asrs-flow/src/pages/system/role/index.jsx
index 7c6e1c6..77c7957 100644
--- a/zy-asrs-flow/src/pages/system/role/index.jsx
+++ b/zy-asrs-flow/src/pages/system/role/index.jsx
@@ -139,6 +139,23 @@
actionRef={actionRef}
setSearchParam={setSearchParam}
/>,
+ render: (_, record) => {
+ return (
+ <a
+ onClick={() => {
+ Http.doGetPromise('/api/role/scope/list', { roleId: record.id }, (res) => {
+ if (res.data) {
+ setMenuIds(res.data);
+ }
+ setScopeModalVisible(true);
+ setCurrentRow(record);
+ });
+ }}
+ >
+ {_}
+ </a>
+ );
+ },
},
{
title: '鏍囪瘑',
@@ -210,21 +227,21 @@
>
缂栬緫
</Button>,
- <Button
- type="link"
- key="scope"
- onClick={() => {
- Http.doGetPromise('/api/role/scope/list', { roleId: record.id }, (res) => {
- if (res.data) {
- setMenuIds(res.data);
- }
- setScopeModalVisible(true);
- setCurrentRow(record);
- });
- }}
- >
- 鍒嗛厤鏉冮檺
- </Button>,
+ <Button
+ type="link"
+ key="scope"
+ onClick={() => {
+ Http.doGetPromise('/api/role/scope/list', { roleId: record.id }, (res) => {
+ if (res.data) {
+ setMenuIds(res.data);
+ }
+ setScopeModalVisible(true);
+ setCurrentRow(record);
+ });
+ }}
+ >
+ 鍒嗛厤鏉冮檺
+ </Button>,
<Button
type="link"
danger
diff --git a/zy-asrs-flow/src/pages/system/user/index.jsx b/zy-asrs-flow/src/pages/system/user/index.jsx
index 8f8df24..92bc37e 100644
--- a/zy-asrs-flow/src/pages/system/user/index.jsx
+++ b/zy-asrs-flow/src/pages/system/user/index.jsx
@@ -158,6 +158,44 @@
width: 30,
},
{
+ title: '閮ㄩ棬',
+ dataIndex: 'deptId$',
+ valueType: 'text',
+ hidden: false,
+ width: 100,
+ render: (_, record) => {
+ if (_ && _ !== '-') {
+ return <Tag color={""}>{_}</Tag>
+ } else {
+ return '-'
+ }
+ },
+ // filterDropdown: (props) => <LinkFilter
+ // name='deptId'
+ // major='dept'
+ // {...props}
+ // actionRef={actionRef}
+ // setSearchParam={setSearchParam}
+ // />,
+ },
+ {
+ title: '鐧诲綍璐﹀彿',
+ dataIndex: 'username',
+ valueType: 'text',
+ hidden: false,
+ copyable: true,
+ width: 100,
+ filterDropdown: (props) => <TextFilter
+ name='username'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ render: (_, record) => {
+ return <span style={{ fontWeight: "bold" }}>{_}</span>
+ }
+ },
+ {
title: '鍚嶇О',
dataIndex: 'nickname',
valueType: 'text',
@@ -169,19 +207,9 @@
actionRef={actionRef}
setSearchParam={setSearchParam}
/>,
- },
- {
- title: '鐧诲綍璐﹀彿',
- dataIndex: 'username',
- valueType: 'text',
- hidden: false,
- width: 100,
- filterDropdown: (props) => <TextFilter
- name='username'
- {...props}
- actionRef={actionRef}
- setSearchParam={setSearchParam}
- />,
+ render: (_, record) => {
+ return <span style={{ fontWeight: "bold" }}>{_}</span>
+ }
},
{
title: '瀵嗙爜',
@@ -244,7 +272,7 @@
title: '鎵嬫満鍙�',
dataIndex: 'phone',
valueType: 'text',
- hidden: false,
+ hidden: true,
width: 100,
filterDropdown: (props) => <TextFilter
name='phone'
@@ -283,27 +311,21 @@
]}
/>,
},
- {
- title: '鎵�灞為儴闂�',
- dataIndex: 'deptId$',
- valueType: 'text',
- hidden: false,
- width: 100,
- render: (_, record) => {
- if (_ && _ !== '-') {
- return <Tag color={""}>{_}</Tag>
- } else {
- return '-'
- }
- },
- // filterDropdown: (props) => <LinkFilter
- // name='deptId'
- // major='dept'
- // {...props}
- // actionRef={actionRef}
- // setSearchParam={setSearchParam}
- // />,
- },
+ // {
+ // title: '瑙掕壊',
+ // valueType: 'text',
+ // hidden: false,
+ // width: 100,
+ // render: (_, record) => {
+ // if (record.roleIds && record.roleIds.length > 0) {
+ // Http.doGetPromise('api/role/list/name/' + record.roleIds.join(','), null, (res) => {
+ // return '-'
+ // });
+ // } else {
+ // return '-'
+ // }
+ // },
+ // },
{
title: '鐪熷疄濮撳悕',
dataIndex: 'realName',
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/system/controller/RoleController.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/system/controller/RoleController.java
index 44b02fb..c96dc48 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/system/controller/RoleController.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/system/controller/RoleController.java
@@ -162,4 +162,14 @@
return R.ok("鍒嗛厤鎴愬姛");
}
+ @PreAuthorize("hasAuthority('system:role:list')")
+ @GetMapping("/role/list/name/{ids}")
+ public R listName(@PathVariable Long[] ids) {
+ List<String> nameList = new ArrayList<>();
+ for (Long id : ids) {
+ nameList.add(roleService.getById(id).getName());
+ }
+ return R.ok().add(nameList);
+ }
+
}
--
Gitblit v1.9.1