mirror of https://gitee.com/topiam/eiam
Merge remote-tracking branch 'origin/master'
commit
09f188b6f2
|
@ -119,7 +119,7 @@ public class AppRepositoryCustomizedImpl implements AppRepositoryCustomized {
|
||||||
*/
|
*/
|
||||||
public Page<AppEntity> getAppList(AppQuery appQuery, Pageable pageable) {
|
public Page<AppEntity> getAppList(AppQuery appQuery, Pageable pageable) {
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
StringBuilder builder = new StringBuilder("SELECT * FROM( SELECT app.* FROM app LEFT JOIN app_group_association `group` ON app.id_ = `group`.app_id) app WHERE app.is_deleted = 0");
|
StringBuilder builder = new StringBuilder("SELECT DISTINCT app.* FROM app LEFT JOIN app_group_association `group` ON app.id_ = `group`.app_id WHERE app.is_deleted =0");
|
||||||
|
|
||||||
//应用名称
|
//应用名称
|
||||||
if (StringUtils.isNoneBlank(appQuery.getName())) {
|
if (StringUtils.isNoneBlank(appQuery.getName())) {
|
||||||
|
|
|
@ -139,39 +139,28 @@ export default [
|
||||||
name: 'app',
|
name: 'app',
|
||||||
icon: 'AppstoreOutlined',
|
icon: 'AppstoreOutlined',
|
||||||
path: '/app',
|
path: '/app',
|
||||||
routes: [
|
component: './app/AppList',
|
||||||
// 应用列表
|
},
|
||||||
{
|
//创建应用
|
||||||
path: '/app',
|
{
|
||||||
redirect: '/app/list',
|
name: 'app.create',
|
||||||
},
|
path: '/app/create',
|
||||||
// 应用列表
|
hideInMenu: true,
|
||||||
{
|
component: './app/AppCreate',
|
||||||
name: 'list',
|
},
|
||||||
path: '/app/list',
|
//应用配置
|
||||||
component: './app/AppList',
|
{
|
||||||
},
|
name: 'app.config',
|
||||||
//创建应用
|
path: '/app/config',
|
||||||
{
|
hideInMenu: true,
|
||||||
name: 'create',
|
component: './app/AppConfig',
|
||||||
path: '/app/list/create',
|
},
|
||||||
hideInMenu: true,
|
//应用分组
|
||||||
component: './app/AppCreate',
|
{
|
||||||
},
|
name: 'app.group',
|
||||||
//应用配置
|
path: '/app/group',
|
||||||
{
|
hideInMenu: true,
|
||||||
name: 'config',
|
component: './app/AppGroup',
|
||||||
path: '/app/list/config',
|
|
||||||
hideInMenu: true,
|
|
||||||
component: './app/AppConfig',
|
|
||||||
},
|
|
||||||
// 应用分组
|
|
||||||
{
|
|
||||||
name: 'group',
|
|
||||||
path: '/app/group',
|
|
||||||
component: './app/AppGroup',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
//行为审计
|
//行为审计
|
||||||
{
|
{
|
||||||
|
|
|
@ -98,6 +98,7 @@ export default {
|
||||||
'custom.selected.item': '项',
|
'custom.selected.item': '项',
|
||||||
'custom.unchecked': '暂未选中',
|
'custom.unchecked': '暂未选中',
|
||||||
'custom.search_button': '搜索',
|
'custom.search_button': '搜索',
|
||||||
|
'custom.upload': '上传',
|
||||||
...menu,
|
...menu,
|
||||||
...component,
|
...component,
|
||||||
...pages,
|
...pages,
|
||||||
|
|
|
@ -108,6 +108,9 @@ export default () => {
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
id: 'pages.account.user_group_detail.pro_descriptions.name',
|
id: 'pages.account.user_group_detail.pro_descriptions.name',
|
||||||
})}
|
})}
|
||||||
|
fieldProps={{
|
||||||
|
maxLength: 8,
|
||||||
|
}}
|
||||||
copyable
|
copyable
|
||||||
/>
|
/>
|
||||||
<ProDescriptions.Item
|
<ProDescriptions.Item
|
||||||
|
|
|
@ -72,6 +72,9 @@ export default (props: {
|
||||||
placeholder={intl.formatMessage({
|
placeholder={intl.formatMessage({
|
||||||
id: 'pages.account.user_group_list.form.name.placeholder',
|
id: 'pages.account.user_group_list.form.name.placeholder',
|
||||||
})}
|
})}
|
||||||
|
fieldProps={{
|
||||||
|
maxLength: 8,
|
||||||
|
}}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* 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 { updateApp } from '@/services/app';
|
import { getAllAppGroupList, updateApp } from '@/services/app';
|
||||||
|
|
||||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
import { useAsyncEffect } from 'ahooks';
|
import { useAsyncEffect } from 'ahooks';
|
||||||
|
@ -67,10 +67,11 @@ const AppBasic = (props: { appId: string }) => {
|
||||||
*/
|
*/
|
||||||
const onSave = async (key: React.Key | React.Key[], record: GetApp): Promise<any | void> => {
|
const onSave = async (key: React.Key | React.Key[], record: GetApp): Promise<any | void> => {
|
||||||
//调用接口修改
|
//调用接口修改
|
||||||
let params: Record<string, string> = {
|
let params: Record<string, any> = {
|
||||||
id: record.id,
|
id: record.id,
|
||||||
name: record.name,
|
name: record.name,
|
||||||
remark: record.remark,
|
remark: record.remark,
|
||||||
|
groupIds: record.groupIds,
|
||||||
};
|
};
|
||||||
if (uploadIconUrl) {
|
if (uploadIconUrl) {
|
||||||
params = { ...params, icon: uploadIconUrl };
|
params = { ...params, icon: uploadIconUrl };
|
||||||
|
@ -208,6 +209,22 @@ const AppBasic = (props: { appId: string }) => {
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<ProDescriptions.Item
|
||||||
|
dataIndex="groupIds"
|
||||||
|
label={intl.formatMessage({ id: 'pages.app.config.basic.group' })}
|
||||||
|
valueType={'select'}
|
||||||
|
request={async () => {
|
||||||
|
const { success, data } = await getAllAppGroupList({}, {}, {});
|
||||||
|
if (success && data) {
|
||||||
|
return data.map((i) => {
|
||||||
|
return { label: i.name, value: i.id };
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}}
|
||||||
|
fieldProps={{ rows: 2, maxLength: 20, maxTagCount: 'responsive', mode: 'multiple' }}
|
||||||
|
copyable={false}
|
||||||
|
/>
|
||||||
<ProDescriptions.Item
|
<ProDescriptions.Item
|
||||||
dataIndex="enabled"
|
dataIndex="enabled"
|
||||||
label={intl.formatMessage({ id: 'pages.app.config.basic.enabled' })}
|
label={intl.formatMessage({ id: 'pages.app.config.basic.enabled' })}
|
||||||
|
@ -240,28 +257,20 @@ const AppBasic = (props: { appId: string }) => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<ProDescriptions.Item
|
<ProDescriptions.Item
|
||||||
dataIndex="protocolName"
|
dataIndex="clientId"
|
||||||
label={intl.formatMessage({ id: 'pages.app.config.basic.protocol_name' })}
|
ellipsis
|
||||||
|
label={intl.formatMessage({ id: 'pages.app.config.basic.client_id' })}
|
||||||
|
valueType={'text'}
|
||||||
editable={false}
|
editable={false}
|
||||||
|
copyable={true}
|
||||||
|
/>
|
||||||
|
<ProDescriptions.Item
|
||||||
|
dataIndex="clientSecret"
|
||||||
|
label={intl.formatMessage({ id: 'pages.app.config.basic.client_secret' })}
|
||||||
|
valueType={'password'}
|
||||||
|
editable={false}
|
||||||
|
copyable={true}
|
||||||
/>
|
/>
|
||||||
{app?.clientId && (
|
|
||||||
<>
|
|
||||||
<ProDescriptions.Item
|
|
||||||
dataIndex="clientId"
|
|
||||||
label={intl.formatMessage({ id: 'pages.app.config.basic.client_id' })}
|
|
||||||
valueType={'text'}
|
|
||||||
editable={false}
|
|
||||||
copyable={true}
|
|
||||||
/>
|
|
||||||
<ProDescriptions.Item
|
|
||||||
dataIndex="clientSecret"
|
|
||||||
label={intl.formatMessage({ id: 'pages.app.config.basic.client_secret' })}
|
|
||||||
valueType={'password'}
|
|
||||||
editable={false}
|
|
||||||
copyable={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<ProDescriptions.Item
|
<ProDescriptions.Item
|
||||||
dataIndex="createTime"
|
dataIndex="createTime"
|
||||||
label={intl.formatMessage({ id: 'pages.app.config.basic.create_time' })}
|
label={intl.formatMessage({ id: 'pages.app.config.basic.create_time' })}
|
||||||
|
@ -273,7 +282,7 @@ const AppBasic = (props: { appId: string }) => {
|
||||||
dataIndex="remark"
|
dataIndex="remark"
|
||||||
label={intl.formatMessage({ id: 'pages.app.config.basic.remark' })}
|
label={intl.formatMessage({ id: 'pages.app.config.basic.remark' })}
|
||||||
valueType={'textarea'}
|
valueType={'textarea'}
|
||||||
fieldProps={{ rows: 2, maxLength: 20 }}
|
fieldProps={{ rows: 2, maxLength: 200 }}
|
||||||
copyable={false}
|
copyable={false}
|
||||||
/>
|
/>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
|
|
|
@ -37,6 +37,7 @@ export type GetApp = {
|
||||||
authorizationType: string;
|
authorizationType: string;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
remark: string;
|
remark: string;
|
||||||
|
groupIds: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,10 +16,12 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
'pages.app.config.basic': '基本配置',
|
'pages.app.config.basic': '基本信息',
|
||||||
'pages.app.config.basic.name': '应用名称',
|
'pages.app.config.basic.name': '应用名称',
|
||||||
'pages.app.config.basic.name.rule.0.message': '应用名称为必填项',
|
'pages.app.config.basic.name.rule.0.message': '应用名称为必填项',
|
||||||
'pages.app.config.basic.icon': '应用图标',
|
'pages.app.config.basic.icon': '应用图标',
|
||||||
|
'pages.app.config.basic.icon.rule.0.message': '应用图标为必填项',
|
||||||
|
'pages.app.config.basic.icon.rule.1.message': '应用图标上传失败',
|
||||||
'pages.app.config.basic.icon.desc.1': '必须为 PNG/JPG 格式',
|
'pages.app.config.basic.icon.desc.1': '必须为 PNG/JPG 格式',
|
||||||
'pages.app.config.basic.icon.desc.2': '建议使用 256 * 256 像素方形图标',
|
'pages.app.config.basic.icon.desc.2': '建议使用 256 * 256 像素方形图标',
|
||||||
'pages.app.config.basic.enabled': '应用状态',
|
'pages.app.config.basic.enabled': '应用状态',
|
||||||
|
|
|
@ -108,7 +108,7 @@ const CreateApp = (props: {
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
successModal.destroy();
|
successModal.destroy();
|
||||||
history.push(
|
history.push(
|
||||||
`/app/list/config?id=${result.id}&name=${values.name}&protocol=${protocol}`,
|
`/app/config?id=${result.id}&name=${values.name}&protocol=${protocol}`,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -131,9 +131,12 @@ const CreateApp = (props: {
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="groups"
|
name="groupIds"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
label={'归属分组'}
|
fieldProps={{
|
||||||
|
maxTagCount: 'responsive',
|
||||||
|
}}
|
||||||
|
label={intl.formatMessage({ id: 'pages.app.create.modal_form.group' })}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const { success, data } = await getAllAppGroupList({}, {}, {}).finally(() => {
|
const { success, data } = await getAllAppGroupList({}, {}, {}).finally(() => {
|
||||||
|
|
|
@ -24,6 +24,7 @@ export default {
|
||||||
'pages.app.create.header_title': '标准协议',
|
'pages.app.create.header_title': '标准协议',
|
||||||
'pages.app.create.modal_form.title': '添加应用',
|
'pages.app.create.modal_form.title': '添加应用',
|
||||||
'pages.app.create.modal_form.name': '应用名称',
|
'pages.app.create.modal_form.name': '应用名称',
|
||||||
|
'pages.app.create.modal_form.group': '应用分组',
|
||||||
'pages.app.create.modal_form.name.placeholder': '请输入应用名称',
|
'pages.app.create.modal_form.name.placeholder': '请输入应用名称',
|
||||||
'pages.app.create.modal_form.name.message': '应用名称为必填项',
|
'pages.app.create.modal_form.name.message': '应用名称为必填项',
|
||||||
'pages.app.create.modal_form.name.rule.0': '应用名称为必填项',
|
'pages.app.create.modal_form.name.rule.0': '应用名称为必填项',
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { useRef, useState } from 'react';
|
||||||
import CreateModal from './components/CreateModal';
|
import CreateModal from './components/CreateModal';
|
||||||
import UpdateModal from './components/UpdateModal';
|
import UpdateModal from './components/UpdateModal';
|
||||||
import { createAppGroup, removeAppGroup, updateAppGroup } from './service';
|
import { createAppGroup, removeAppGroup, updateAppGroup } from './service';
|
||||||
import { useIntl } from '@@/exports';
|
import { history, useIntl } from '@@/exports';
|
||||||
import { getAppGroupList } from '@/services/app';
|
import { getAppGroupList } from '@/services/app';
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
@ -73,7 +73,7 @@ export default () => {
|
||||||
</Tag>
|
</Tag>
|
||||||
)}
|
)}
|
||||||
{record.type === 'default' && (
|
{record.type === 'default' && (
|
||||||
<Tag color={'#2db7f5'} key={'default'}>
|
<Tag color={'#4fc2fa'} key={'default'}>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: 'pages.app_group.list.column.type.default',
|
id: 'pages.app_group.list.column.type.default',
|
||||||
})}
|
})}
|
||||||
|
@ -108,10 +108,15 @@ export default () => {
|
||||||
setId(record.id);
|
setId(record.id);
|
||||||
setUpdateModalOpen(true);
|
setUpdateModalOpen(true);
|
||||||
}}
|
}}
|
||||||
|
style={{
|
||||||
|
pointerEvents: record.type === 'default' ? 'none' : 'auto',
|
||||||
|
...(record.type === 'default' ? { opacity: 0.2 } : {}),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{intl.formatMessage({ id: 'app.update' })}
|
{intl.formatMessage({ id: 'app.update' })}
|
||||||
</a>,
|
</a>,
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
|
disabled={record.type === 'default'}
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
id: 'pages.app_group.list.actions.popconfirm.delete',
|
id: 'pages.app_group.list.actions.popconfirm.delete',
|
||||||
})}
|
})}
|
||||||
|
@ -135,7 +140,15 @@ export default () => {
|
||||||
cancelText={intl.formatMessage({ id: 'app.no' })}
|
cancelText={intl.formatMessage({ id: 'app.no' })}
|
||||||
key="delete"
|
key="delete"
|
||||||
>
|
>
|
||||||
<a target="_blank" key="remove" style={{ color: 'red' }}>
|
<a
|
||||||
|
target="_blank"
|
||||||
|
key="remove"
|
||||||
|
style={{
|
||||||
|
color: 'red',
|
||||||
|
pointerEvents: record.type === 'default' ? 'none' : 'auto',
|
||||||
|
...(record.type === 'default' ? { opacity: 0.2 } : {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{intl.formatMessage({ id: 'app.delete' })}
|
{intl.formatMessage({ id: 'app.delete' })}
|
||||||
</a>
|
</a>
|
||||||
</Popconfirm>,
|
</Popconfirm>,
|
||||||
|
@ -144,7 +157,12 @@ export default () => {
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContainer>
|
<PageContainer
|
||||||
|
content={intl.formatMessage({ id: 'pages.app_group.list.desc' })}
|
||||||
|
onBack={() => {
|
||||||
|
history.push('/app');
|
||||||
|
}}
|
||||||
|
>
|
||||||
<ProTable<AppAPI.AppGroupList>
|
<ProTable<AppAPI.AppGroupList>
|
||||||
columns={columns}
|
columns={columns}
|
||||||
actionRef={actionRef}
|
actionRef={actionRef}
|
||||||
|
|
|
@ -17,13 +17,15 @@
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
'pages.app_group.list.create': '创建分组',
|
'pages.app_group.list.create': '创建分组',
|
||||||
|
'pages.app_group.list.desc':
|
||||||
|
'应用分组管理是一种将多个应用程序或功能按照一定的逻辑或相关性进行组织和管理的方法。通过应用分组,可以更有效地管理大量应用程序,提供更好的用户体验。',
|
||||||
'pages.app_group.list.column.name': '分组名称',
|
'pages.app_group.list.column.name': '分组名称',
|
||||||
'pages.app_group.list.column.code': '分组编码',
|
'pages.app_group.list.column.code': '分组编码',
|
||||||
'pages.app_group.list.column.create_time': '创建时间',
|
'pages.app_group.list.column.create_time': '创建时间',
|
||||||
'pages.app_group.list.column.remark': '备注',
|
'pages.app_group.list.column.remark': '备注',
|
||||||
'pages.app_group.list.column.app_count': '应用数量',
|
'pages.app_group.list.column.app_count': '应用数量',
|
||||||
'pages.app_group.list.column.type': '分组类型',
|
'pages.app_group.list.column.type': '分组类型',
|
||||||
'pages.app_group.list.column.type.default': '系统默认',
|
'pages.app_group.list.column.type.default': '内置',
|
||||||
'pages.app_group.list.column.type.custom': '自定义',
|
'pages.app_group.list.column.type.custom': '自定义',
|
||||||
'pages.app_group.list.column.option': '操作',
|
'pages.app_group.list.column.option': '操作',
|
||||||
'pages.app_group.list.actions.popconfirm.delete': '您确定要删除此应用分组?',
|
'pages.app_group.list.actions.popconfirm.delete': '您确定要删除此应用分组?',
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* 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 { getAllAppGroupList, getAppList } from '@/services/app';
|
import { getAllAppGroupList, getAppList } from '@/services/app';
|
||||||
import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
import { PlusOutlined, QuestionCircleOutlined, GroupOutlined } from '@ant-design/icons';
|
||||||
import type { ActionType } from '@ant-design/pro-components';
|
import type { ActionType } from '@ant-design/pro-components';
|
||||||
import { PageContainer, ProList } from '@ant-design/pro-components';
|
import { PageContainer, ProList } from '@ant-design/pro-components';
|
||||||
import { App, Avatar, Button, Popconfirm, Space, Tag } from 'antd';
|
import { App, Avatar, Button, Popconfirm, Space, Tag } from 'antd';
|
||||||
|
@ -86,12 +86,21 @@ export default () => {
|
||||||
key={'create'}
|
key={'create'}
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push('/app/list/create');
|
history.push('/app/create');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PlusOutlined />
|
<PlusOutlined />
|
||||||
{intl.formatMessage({ id: 'pages.app.list.tool_bar_render.add_app' })}
|
{intl.formatMessage({ id: 'pages.app.list.tool_bar_render.add_app' })}
|
||||||
</Button>,
|
</Button>,
|
||||||
|
<Button
|
||||||
|
key="app-group"
|
||||||
|
icon={<GroupOutlined />}
|
||||||
|
onClick={() => {
|
||||||
|
history.push('/app/group');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
分组管理
|
||||||
|
</Button>,
|
||||||
]}
|
]}
|
||||||
metas={{
|
metas={{
|
||||||
title: {
|
title: {
|
||||||
|
@ -102,7 +111,7 @@ export default () => {
|
||||||
<span
|
<span
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(
|
history.push(
|
||||||
`/app/list/config?id=${row.id}&protocol=${row.protocol}&name=${row.name}`,
|
`/app/config?id=${row.id}&protocol=${row.protocol}&name=${row.name}`,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -177,7 +186,7 @@ export default () => {
|
||||||
key="config"
|
key="config"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(
|
history.push(
|
||||||
`/app/list/config?id=${row.id}&protocol=${row.protocol}&name=${row.name}`,
|
`/app/config?id=${row.id}&protocol=${row.protocol}&name=${row.name}`,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -213,15 +222,12 @@ export default () => {
|
||||||
</Popconfirm>,
|
</Popconfirm>,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
status: {
|
groupId: {
|
||||||
// 自己扩展的字段,主要用于筛选,不在列表中显示
|
// 自己扩展的字段,主要用于筛选,不在列表中显示
|
||||||
title: intl.formatMessage({
|
title: intl.formatMessage({
|
||||||
id: 'pages.app.list.metas.group',
|
id: 'pages.app.list.metas.group',
|
||||||
}),
|
}),
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
fieldProps: {
|
|
||||||
mode: 'multiple',
|
|
||||||
},
|
|
||||||
request: async () => {
|
request: async () => {
|
||||||
const { success, data } = await getAllAppGroupList({}, {}, {});
|
const { success, data } = await getAllAppGroupList({}, {}, {});
|
||||||
if (success && data) {
|
if (success && data) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default (props: { visible: boolean }) => {
|
||||||
async function getList() {
|
async function getList() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
// 加载列表
|
// 加载列表
|
||||||
const { success, result } = await getMailTemplateList();
|
const { success, result } = await getMailTemplateList({});
|
||||||
if (success) {
|
if (success) {
|
||||||
setDataSource(result);
|
setDataSource(result);
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ export default (props: { visible: boolean }) => {
|
||||||
* 浏览
|
* 浏览
|
||||||
*
|
*
|
||||||
* @param browseTitle
|
* @param browseTitle
|
||||||
|
* @param browseContent
|
||||||
*/
|
*/
|
||||||
const browseOnClick = (browseTitle: string, browseContent: string) => {
|
const browseOnClick = (browseTitle: string, browseContent: string) => {
|
||||||
setTitle(<span>{`${browseTitle}`}</span>);
|
setTitle(<span>{`${browseTitle}`}</span>);
|
||||||
|
|
|
@ -22,14 +22,16 @@ import { request } from '@umijs/max';
|
||||||
* 上传文件
|
* 上传文件
|
||||||
* @param file
|
* @param file
|
||||||
* @param fileName
|
* @param fileName
|
||||||
|
* @param onUploadProgress
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function uploadFile(
|
export async function uploadFile(
|
||||||
file: string | RcFile | Blob,
|
file: string | RcFile | Blob,
|
||||||
fileName?: string,
|
fileName?: string,
|
||||||
|
onUploadProgress?: (progressEvent: ProgressEvent) => void,
|
||||||
): Promise<API.ApiResult<string>> {
|
): Promise<API.ApiResult<string>> {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (fileName) formData.append('fileName', fileName);
|
if (fileName) formData.append('fileName', fileName);
|
||||||
return request('/api/v1/storage/upload', { method: 'POST', data: formData });
|
return request('/api/v1/storage/upload', { method: 'POST', data: formData, onUploadProgress });
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,25 +40,25 @@ public class AppUpdateParam implements Serializable {
|
||||||
*/
|
*/
|
||||||
@Schema(description = "应用id")
|
@Schema(description = "应用id")
|
||||||
@NotNull(message = "ID不能为空")
|
@NotNull(message = "ID不能为空")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用名称
|
* 应用名称
|
||||||
*/
|
*/
|
||||||
@Schema(description = "应用名称")
|
@Schema(description = "应用名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用图标
|
* 应用图标
|
||||||
*/
|
*/
|
||||||
@Schema(description = "应用图标")
|
@Schema(description = "应用图标")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用分组id
|
* 应用分组id
|
||||||
|
|
|
@ -19,11 +19,10 @@ package cn.topiam.employee.console.service.app.impl;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import cn.topiam.employee.common.entity.app.AppGroupAssociationEntity;
|
|
||||||
import cn.topiam.employee.common.repository.app.AppGroupAssociationRepository;
|
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import cn.topiam.employee.application.ApplicationService;
|
import cn.topiam.employee.application.ApplicationService;
|
||||||
import cn.topiam.employee.application.ApplicationServiceLoader;
|
import cn.topiam.employee.application.ApplicationServiceLoader;
|
||||||
|
@ -32,7 +31,9 @@ import cn.topiam.employee.audit.context.AuditContext;
|
||||||
import cn.topiam.employee.audit.entity.Target;
|
import cn.topiam.employee.audit.entity.Target;
|
||||||
import cn.topiam.employee.audit.enums.TargetType;
|
import cn.topiam.employee.audit.enums.TargetType;
|
||||||
import cn.topiam.employee.common.entity.app.AppEntity;
|
import cn.topiam.employee.common.entity.app.AppEntity;
|
||||||
|
import cn.topiam.employee.common.entity.app.AppGroupAssociationEntity;
|
||||||
import cn.topiam.employee.common.entity.app.query.AppQuery;
|
import cn.topiam.employee.common.entity.app.query.AppQuery;
|
||||||
|
import cn.topiam.employee.common.repository.app.AppGroupAssociationRepository;
|
||||||
import cn.topiam.employee.common.repository.app.AppRepository;
|
import cn.topiam.employee.common.repository.app.AppRepository;
|
||||||
import cn.topiam.employee.console.converter.app.AppConverter;
|
import cn.topiam.employee.console.converter.app.AppConverter;
|
||||||
import cn.topiam.employee.console.pojo.result.app.AppCreateResult;
|
import cn.topiam.employee.console.pojo.result.app.AppCreateResult;
|
||||||
|
@ -49,8 +50,6 @@ import cn.topiam.employee.support.util.BeanUtils;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
|
|
||||||
import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY;
|
import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_BY;
|
||||||
import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME;
|
import static cn.topiam.employee.support.repository.domain.BaseEntity.LAST_MODIFIED_TIME;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class AppGroupListResult implements Serializable {
|
||||||
* 应用分组ID
|
* 应用分组ID
|
||||||
*/
|
*/
|
||||||
@Schema(description = "应用分组ID")
|
@Schema(description = "应用分组ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用分组名称
|
* 应用分组名称
|
||||||
|
|
Loading…
Reference in New Issue