Merge remote-tracking branch 'origin/master'

pull/81/MERGE
xiuchen 2024-07-23 17:53:34 +08:00
commit 2cb2fd3a52
11 changed files with 81 additions and 86 deletions

View File

@ -1,6 +1,6 @@
# #
# eiam-common - Employee Identity and Access Management # eiam-common - Employee Identity and Access Management
# Copyright \u00A9 2022-Present Jinan Yuanchuang Network Technology Co., Ltd. (support@topiam.cn) # Copyright © 2022-Present Jinan Yuanchuang Network Technology Co., Ltd. (support@topiam.cn)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by

View File

@ -147,6 +147,7 @@
</goals> </goals>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<configuration> <configuration>
<nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot>
<nodeVersion>v20.10.0</nodeVersion> <nodeVersion>v20.10.0</nodeVersion>
<pnpmVersion>v9.1.0</pnpmVersion> <pnpmVersion>v9.1.0</pnpmVersion>
</configuration> </configuration>
@ -199,6 +200,7 @@
</goals> </goals>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<configuration> <configuration>
<nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot>
<nodeVersion>v20.10.0</nodeVersion> <nodeVersion>v20.10.0</nodeVersion>
<pnpmVersion>v9.1.0</pnpmVersion> <pnpmVersion>v9.1.0</pnpmVersion>
</configuration> </configuration>
@ -251,6 +253,7 @@
</goals> </goals>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<configuration> <configuration>
<nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot>
<nodeVersion>v20.10.0</nodeVersion> <nodeVersion>v20.10.0</nodeVersion>
<pnpmVersion>v9.1.0</pnpmVersion> <pnpmVersion>v9.1.0</pnpmVersion>
</configuration> </configuration>

View File

@ -48,22 +48,22 @@
"@ant-design/charts": "^1.4.3", "@ant-design/charts": "^1.4.3",
"@ant-design/icons": "^5.3.7", "@ant-design/icons": "^5.3.7",
"@ant-design/maps": "^1.0.8", "@ant-design/maps": "^1.0.8",
"@ant-design/pro-components": "^2.7.1", "@ant-design/pro-components": "^2.7.14",
"@ant-design/pro-editor": "^1.2.1", "@ant-design/pro-editor": "^1.2.1",
"ahooks": "^3.7.11", "ahooks": "^3.8.0",
"antd": "^5.17.0", "antd": "^5.19.2",
"antd-img-crop": "^4.21.0", "antd-img-crop": "^4.22.0",
"antd-style": "^3.6.2", "antd-style": "^3.6.2",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"codemirror": "^5.65.5", "codemirror": "^5.65.5",
"content-security-policy-parser": "^0.6.0", "content-security-policy-parser": "^0.6.0",
"copy-to-clipboard": "^3.3.3", "copy-to-clipboard": "^3.3.3",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dayjs": "^1.11.11", "dayjs": "^1.11.12",
"echarts": "^5.5.0", "echarts": "^5.5.1",
"fetch-jsonp": "^1.3.0", "fetch-jsonp": "^1.3.0",
"form-render": "^2.4.4", "form-render": "^2.4.5",
"google-libphonenumber": "^3.2.34", "google-libphonenumber": "^3.2.37",
"js-base64": "^3.7.7", "js-base64": "^3.7.7",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",
@ -71,15 +71,15 @@
"moment": "^2.30.1", "moment": "^2.30.1",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"omit.js": "^2.0.2", "omit.js": "^2.0.2",
"qs": "^6.12.1", "qs": "^6.12.3",
"query-string": "^9.0.0", "query-string": "^9.0.0",
"react": "18.2.0", "react": "18.3.1",
"react-codemirror2": "^8.0.0", "react-codemirror2": "^8.0.0",
"react-dom": "18.2.0", "react-dom": "18.3.1",
"react-fast-marquee": "^1.6.4", "react-fast-marquee": "^1.6.5",
"react-helmet-async": "^2.0.5", "react-helmet-async": "^2.0.5",
"react-sortable-hoc": "^2.0.0", "react-sortable-hoc": "^2.0.0",
"yaml": "^2.4.2" "yaml": "^2.4.5"
}, },
"devDependencies": { "devDependencies": {
"@ant-design/antd-theme-variable": "^1.0.0", "@ant-design/antd-theme-variable": "^1.0.0",
@ -88,20 +88,20 @@
"@types/google-libphonenumber": "^7.4.30", "@types/google-libphonenumber": "^7.4.30",
"@types/history": "^4.7.11", "@types/history": "^4.7.11",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.1", "@types/lodash": "^4.17.7",
"@types/numeral": "^2.0.5", "@types/numeral": "^2.0.5",
"@types/qs": "^6.9.15", "@types/qs": "^6.9.15",
"@types/react": "^18.3.1", "@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11", "@types/react-helmet": "^6.1.11",
"@umijs/lint": "^4.2.0", "@umijs/lint": "^4.3.6",
"@umijs/max": "^4.2.0", "@umijs/max": "^4.3.6",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cross-port-killer": "^1.4.0", "cross-port-killer": "^1.4.0",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"husky": "^9.0.11", "husky": "^9.1.1",
"lint-staged": "^15.2.2", "lint-staged": "^15.2.7",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"typescript": "*", "typescript": "*",
"umi-presets-pro": "^2.0.3" "umi-presets-pro": "^2.0.3"
}, },

View File

@ -92,13 +92,9 @@ const DingTalkConfig = (props: DingTalkConfigProps) => {
} }
}, [formRef, onConfigValidator]); }, [formRef, onConfigValidator]);
useImperativeHandle( useImperativeHandle(basicConfigRef, () => {
basicConfigRef, return { configValidator: configValidator };
() => { }, [configValidator]);
return { configValidator: configValidator };
},
[configValidator],
);
return ( return (
<> <>
<ProFormText <ProFormText

View File

@ -81,13 +81,9 @@ const FeiShuConfig = (props: {
} }
}, [formRef, onConfigValidator]); }, [formRef, onConfigValidator]);
useImperativeHandle( useImperativeHandle(basicConfigRef, () => {
basicConfigRef, return { configValidator: configValidator };
() => { }, [configValidator]);
return { configValidator: configValidator };
},
[configValidator],
);
return ( return (
<> <>

View File

@ -15,10 +15,8 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import { DraggablePanel } from '@ant-design/pro-editor';
import { PageContainer } from '@ant-design/pro-components'; import { PageContainer } from '@ant-design/pro-components';
import { Col, Flex, Row } from 'antd'; import { Col, Row } from 'antd';
import { useState } from 'react'; import { useState } from 'react';
import OrgTree from './components/Organization'; import OrgTree from './components/Organization';
import UserList from './components/User'; import UserList from './components/User';
@ -50,19 +48,16 @@ export const User = () => {
return ( return (
<PageContainer content={intl.formatMessage({ id: 'pages.account.user_list.desc' })}> <PageContainer content={intl.formatMessage({ id: 'pages.account.user_list.desc' })}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <Row gutter={[16, 16]}>
{/* 左侧 */} {/* 左侧 */}
<DraggablePanel <Col {...leftLayout} style={{ minHeight: '100%', overflow: 'auto' }}>
placement="left"
maxWidth={800}
style={{ flex: 1, padding: 0, borderRadius: 12 }}
>
<OrgTree onSelect={treeOnSelect} /> <OrgTree onSelect={treeOnSelect} />
</DraggablePanel> </Col>
<div style={{ width: 'auto', flex: 1, padding: '0px 6px' }}></div>
{/* 表格 */} {/* 表格 */}
<UserList organization={organization} /> <Col {...rightLayout} style={{ minHeight: '100%', overflow: 'auto' }}>
</div> <UserList organization={organization} />
</Col>
</Row>
</PageContainer> </PageContainer>
); );
}; };

View File

@ -39,7 +39,6 @@ import {
updateOrganization, updateOrganization,
} from '@/services/account'; } from '@/services/account';
import { useMount } from 'ahooks'; import { useMount } from 'ahooks';
import type { ItemType } from 'antd/es/menu/hooks/useItems';
import CreateOrganization from '../CreateOrganization'; import CreateOrganization from '../CreateOrganization';
import MoveOrganization from './MoveDrawer'; import MoveOrganization from './MoveDrawer';
import SearchTree from './SearchTree'; import SearchTree from './SearchTree';
@ -47,6 +46,7 @@ import UpdateOrganization from '../UpdateOrganization';
import type { DataNode } from '@/utils/tree'; import type { DataNode } from '@/utils/tree';
import { updateTreeData } from '@/utils/tree'; import { updateTreeData } from '@/utils/tree';
import { useIntl } from '@umijs/max'; import { useIntl } from '@umijs/max';
import { ItemType } from 'antd/es/menu/interface';
const prefixCls = 'account-organization'; const prefixCls = 'account-organization';
@ -318,7 +318,7 @@ export const OrganizationTree = (props: {
return ( return (
<div className={styles}> <div className={styles}>
<Card <Card
style={{ height: 'calc(100vh - 220px)', overflow: 'auto' }} style={{ height: 'calc(100vh - 200px)', overflow: 'auto' }}
bordered={false} bordered={false}
className={classnames(`${prefixCls}`)} className={classnames(`${prefixCls}`)}
> >

View File

@ -387,7 +387,7 @@ export default (props: UserListProps) => {
return ( return (
<> <>
{!organization ? ( {!organization ? (
<Card style={{ height: 'calc(100vh - 220px)' }} bordered={false}> <Card style={{ height: 'calc(100vh - 200px)' }} bordered={false}>
<Skeleton paragraph={{ rows: 10 }} active={true} /> <Skeleton paragraph={{ rows: 10 }} active={true} />
</Card> </Card>
) : ( ) : (
@ -396,10 +396,10 @@ export default (props: UserListProps) => {
scroll={{ x: 1200 }} scroll={{ x: 1200 }}
params={{ organizationId: organization?.id, inclSubOrganization }} params={{ organizationId: organization?.id, inclSubOrganization }}
style={{ style={{
height: 'calc(100vh - 220px)', height: 'calc(100vh - 200px)',
overflow: 'auto', overflow: 'auto',
}} }}
cardProps={{ style: { minHeight: 'calc(100vh - 220px)' } }} cardProps={{ style: { minHeight: 'calc(100vh - 200px)' } }}
search={{ search={{
defaultCollapsed: true, defaultCollapsed: true,
}} }}

View File

@ -290,16 +290,16 @@ export default (props: { app: GetApp | Record<string, any> }) => {
> >
{(fields, { add, remove }, { errors }) => ( {(fields, { add, remove }, { errors }) => (
<> <>
{fields.map((field, index) => ( {fields.map(({ key, name, ...restField }, index) => (
<Form.Item <Form.Item
{...(index === 0 ? layout : formItemLayoutWithOutLabel)} {...(index === 0 ? layout : formItemLayoutWithOutLabel)}
required={true} required={true}
key={field.key} key={key}
label={ label={
index === 0 index === 0
? intl.formatMessage({ ? intl.formatMessage({
id: 'pages.app.config.detail.protocol_config.oidc.redirect_uris', id: 'pages.app.config.detail.protocol_config.oidc.redirect_uris',
}) })
: '' : ''
} }
> >
@ -311,7 +311,8 @@ export default (props: { app: GetApp | Record<string, any> }) => {
}} }}
> >
<Form.Item <Form.Item
{...field} {...restField}
name={[name]}
validateTrigger={['onChange', 'onBlur']} validateTrigger={['onChange', 'onBlur']}
rules={[ rules={[
{ {
@ -335,7 +336,7 @@ export default (props: { app: GetApp | Record<string, any> }) => {
})} })}
/> />
</Form.Item> </Form.Item>
<DeleteOutlined onClick={() => remove(field.name)} /> <DeleteOutlined onClick={() => remove(name)} />
</div> </div>
</Form.Item> </Form.Item>
))} ))}
@ -345,8 +346,8 @@ export default (props: { app: GetApp | Record<string, any> }) => {
label={ label={
fields.length === 0 fields.length === 0
? intl.formatMessage({ ? intl.formatMessage({
id: 'pages.app.config.detail.protocol_config.oidc.redirect_uris', id: 'pages.app.config.detail.protocol_config.oidc.redirect_uris',
}) })
: '' : ''
} }
extra={intl.formatMessage({ extra={intl.formatMessage({
@ -369,16 +370,16 @@ export default (props: { app: GetApp | Record<string, any> }) => {
<Form.List name="postLogoutRedirectUris"> <Form.List name="postLogoutRedirectUris">
{(fields, { add, remove }, {}) => ( {(fields, { add, remove }, {}) => (
<> <>
{fields.map((field, index) => { {fields.map(({ key, name, ...restField }, index) => {
return ( return (
<Form.Item <Form.Item
{...(index === 0 ? layout : formItemLayoutWithOutLabel)} {...(index === 0 ? layout : formItemLayoutWithOutLabel)}
key={field.key} key={key}
label={ label={
index === 0 index === 0
? intl.formatMessage({ ? intl.formatMessage({
id: 'pages.app.config.detail.protocol_config.oidc.post_logout_redirect_uris', id: 'pages.app.config.detail.protocol_config.oidc.post_logout_redirect_uris',
}) })
: '' : ''
} }
> >
@ -390,7 +391,8 @@ export default (props: { app: GetApp | Record<string, any> }) => {
}} }}
> >
<Form.Item <Form.Item
{...field} {...restField}
name={[name]}
validateTrigger={['onChange', 'onBlur']} validateTrigger={['onChange', 'onBlur']}
rules={[ rules={[
{ {
@ -414,7 +416,7 @@ export default (props: { app: GetApp | Record<string, any> }) => {
})} })}
/> />
</Form.Item> </Form.Item>
<DeleteOutlined onClick={() => remove(field.name)} /> <DeleteOutlined onClick={() => remove(name)} />
</div> </div>
</Form.Item> </Form.Item>
); );
@ -424,8 +426,8 @@ export default (props: { app: GetApp | Record<string, any> }) => {
label={ label={
fields.length === 0 fields.length === 0
? intl.formatMessage({ ? intl.formatMessage({
id: 'pages.app.config.detail.protocol_config.oidc.post_logout_redirect_uris', id: 'pages.app.config.detail.protocol_config.oidc.post_logout_redirect_uris',
}) })
: '' : ''
} }
extra={intl.formatMessage({ extra={intl.formatMessage({

View File

@ -130,6 +130,7 @@
</goals> </goals>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<configuration> <configuration>
<nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot>
<nodeVersion>v20.10.0</nodeVersion> <nodeVersion>v20.10.0</nodeVersion>
<pnpmVersion>v9.1.0</pnpmVersion> <pnpmVersion>v9.1.0</pnpmVersion>
</configuration> </configuration>
@ -182,6 +183,7 @@
</goals> </goals>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<configuration> <configuration>
<nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot>
<nodeVersion>v20.10.0</nodeVersion> <nodeVersion>v20.10.0</nodeVersion>
<pnpmVersion>v9.1.0</pnpmVersion> <pnpmVersion>v9.1.0</pnpmVersion>
</configuration> </configuration>
@ -234,6 +236,7 @@
</goals> </goals>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<configuration> <configuration>
<nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot>
<nodeVersion>v20.10.0</nodeVersion> <nodeVersion>v20.10.0</nodeVersion>
<pnpmVersion>v9.1.0</pnpmVersion> <pnpmVersion>v9.1.0</pnpmVersion>
</configuration> </configuration>

View File

@ -48,17 +48,17 @@
"@ahooksjs/use-url-state": "^3.5.1", "@ahooksjs/use-url-state": "^3.5.1",
"@ant-design/icons": "^5.3.7", "@ant-design/icons": "^5.3.7",
"@ant-design/maps": "^1.0.8", "@ant-design/maps": "^1.0.8",
"@ant-design/pro-components": "^2.7.1", "@ant-design/pro-components": "^2.7.14",
"ahooks": "^3.7.11", "ahooks": "^3.8.0",
"antd": "^5.17.0", "antd": "^5.19.2",
"antd-img-crop": "^4.21.0", "antd-img-crop": "^4.22.0",
"antd-style": "^3.6.2", "antd-style": "^3.6.2",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dayjs": "^1.11.11", "dayjs": "^1.11.12",
"fetch-jsonp": "^1.3.0", "fetch-jsonp": "^1.3.0",
"form-render": "^2.4.4", "form-render": "^2.4.5",
"google-libphonenumber": "^3.2.34", "google-libphonenumber": "^3.2.37",
"js-base64": "^3.7.7", "js-base64": "^3.7.7",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",
@ -67,13 +67,13 @@
"nanoid": "^5.0.7", "nanoid": "^5.0.7",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"omit.js": "^2.0.2", "omit.js": "^2.0.2",
"qs": "^6.12.1", "qs": "^6.12.3",
"query-string": "^9.0.0", "query-string": "^9.0.0",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"react-fast-marquee": "^1.6.4", "react-fast-marquee": "^1.6.5",
"react-helmet-async": "^2.0.5", "react-helmet-async": "^2.0.5",
"yaml": "^2.4.2" "yaml": "^2.4.5"
}, },
"devDependencies": { "devDependencies": {
"@ant-design/antd-theme-variable": "^1.0.0", "@ant-design/antd-theme-variable": "^1.0.0",
@ -82,20 +82,20 @@
"@types/google-libphonenumber": "^7.4.30", "@types/google-libphonenumber": "^7.4.30",
"@types/history": "^4.7.11", "@types/history": "^4.7.11",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.1", "@types/lodash": "^4.17.7",
"@types/numeral": "^2.0.5", "@types/numeral": "^2.0.5",
"@types/qs": "^6.9.15", "@types/qs": "^6.9.15",
"@types/react": "^18.3.1", "@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11", "@types/react-helmet": "^6.1.11",
"@umijs/lint": "^4.2.0", "@umijs/lint": "^4.3.6",
"@umijs/max": "^4.2.0", "@umijs/max": "^4.3.6",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cross-port-killer": "^1.4.0", "cross-port-killer": "^1.4.0",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"husky": "^9.0.11", "husky": "^9.1.1",
"lint-staged": "^15.2.2", "lint-staged": "^15.2.7",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"typescript": "*", "typescript": "*",
"umi-presets-pro": "^2.0.3" "umi-presets-pro": "^2.0.3"
}, },