diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js
index 3791360..ed65497 100644
--- a/api/app/lib/controllers/member/index.js
+++ b/api/app/lib/controllers/member/index.js
@@ -10,7 +10,9 @@ function getUserList(opts) {
const Op = ctx.fs.dc.ORM.Op;
let errMsg = { message: '获取用户失败' }
try {
- let searchWhere = {}
+ let searchWhere = {
+ username: { $not: 'SuperAdmin' }
+ }
let option = {
where: searchWhere,
order: [["id", "desc"]],
diff --git a/web/client/src/layout/components/header/index.js b/web/client/src/layout/components/header/index.js
index 0d1e428..076e3b9 100644
--- a/web/client/src/layout/components/header/index.js
+++ b/web/client/src/layout/components/header/index.js
@@ -71,8 +71,8 @@ const Header = props => {
icon: ,
label: 重置密码}
- title="重置密码"
+ triggerRender={修改密码}
+ title="修改密码"
onFinish={onFinish}
key="resetPassword"
/>,
diff --git a/web/client/src/sections/memberManagement/containers/member.js b/web/client/src/sections/memberManagement/containers/member.js
index fb64dba..6ea741b 100644
--- a/web/client/src/sections/memberManagement/containers/member.js
+++ b/web/client/src/sections/memberManagement/containers/member.js
@@ -8,7 +8,7 @@ import ResetPasswordModal from '../components/resetPassword';
import { useFsRequest, ApiTable } from '$utils';
import './style.less';
function Member(props) {
- const { loading, clientHeight, actions, dispatch, member } = props;
+ const { loading, clientHeight, actions, dispatch, member, user } = props;
const [pageSize, setPageSize] = useState(10);
const [currentPage, setCurrentPage] = useState(1);
const [searchValue, setSearchValue] = useState('')
@@ -86,13 +86,21 @@ function Member(props) {
>
删除
)
- options.push(重置密码}
- title="重置密码"
- onFinish={onFinish}
- key="resetPassword"
- />)
+ user?.username == 'SuperAdmin' && options.push(
+ 是否确认重置该用户密码?
+ >}
+ onConfirm={() => {
+ dispatch(actions.memberManagement.modifyUser(record.id, { password: 'e10adc3949ba59abbe56e057f20f883e' }, '重置密码'))
+ }}
+ okText="是"
+ cancelText="否"
+ >
+ 重置密码
+ )
+
return options;
@@ -173,7 +181,6 @@ function Member(props) {
y: clientHeight - 260
}
}
- //1490 2256
pagination={{
size: 'large',
total: member?.count,
@@ -213,6 +220,7 @@ function mapStateToProps(state) {
clientHeight: global.clientHeight,
actions: global.actions,
member: member?.data || {},
+ user: auth.user
};
}