mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-11 10:22:13 +08:00
feat: 系统管理列表增加手动刷新功能
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
|||||||
AppContainer,
|
AppContainer,
|
||||||
Utils,
|
Utils,
|
||||||
} from 'knowdesign';
|
} from 'knowdesign';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// 引入代码编辑器
|
// 引入代码编辑器
|
||||||
@@ -431,22 +432,28 @@ export default () => {
|
|||||||
<TypicalListCard title="配置管理">
|
<TypicalListCard title="配置管理">
|
||||||
<div className="config-manage-page">
|
<div className="config-manage-page">
|
||||||
<div className="operate-bar">
|
<div className="operate-bar">
|
||||||
<Form form={form} layout="inline" onFinish={() => getConfigList({ page: 1 })}>
|
<div className="left">
|
||||||
<Form.Item name="valueGroup">
|
<div className="refresh-icon" onClick={() => getConfigList()}>
|
||||||
<Select style={{ width: 180 }} placeholder="请选择模块" options={configGroupList} />
|
<IconFont className="icon" type="icon-shuaxin1" />
|
||||||
</Form.Item>
|
</div>
|
||||||
<Form.Item name="valueName">
|
<Divider type="vertical" style={{ height: 20, top: 0 }} />
|
||||||
<Input style={{ width: 180 }} placeholder="请输入配置键" />
|
<Form form={form} layout="inline" onFinish={() => getConfigList({ page: 1 })}>
|
||||||
</Form.Item>
|
<Form.Item name="valueGroup">
|
||||||
<Form.Item name="memo">
|
<Select style={{ width: 180 }} placeholder="请选择模块" options={configGroupList} />
|
||||||
<Input style={{ width: 180 }} placeholder="请输入描述" />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item name="valueName">
|
||||||
<Form.Item>
|
<Input style={{ width: 180 }} placeholder="请输入配置键" />
|
||||||
<Button type="primary" ghost htmlType="submit">
|
</Form.Item>
|
||||||
查询
|
<Form.Item name="memo">
|
||||||
</Button>
|
<Input style={{ width: 180 }} placeholder="请输入描述" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
<Form.Item>
|
||||||
|
<Button type="primary" ghost htmlType="submit">
|
||||||
|
查询
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
{global.hasPermission && global.hasPermission(ConfigPermissionMap.CONFIG_ADD) ? (
|
{global.hasPermission && global.hasPermission(ConfigPermissionMap.CONFIG_ADD) ? (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Button, Form, Input, Select, ProTable, DatePicker, Utils, Tooltip } from 'knowdesign';
|
import { Button, Form, Input, Select, ProTable, DatePicker, Utils, Tooltip, Divider } from 'knowdesign';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import api from 'api';
|
import api from 'api';
|
||||||
import { defaultPagination } from 'constants/common';
|
import { defaultPagination } from 'constants/common';
|
||||||
import TypicalListCard from '../../components/TypicalListCard';
|
import TypicalListCard from '../../components/TypicalListCard';
|
||||||
@@ -119,25 +120,32 @@ export default () => {
|
|||||||
<>
|
<>
|
||||||
<TypicalListCard title="操作记录">
|
<TypicalListCard title="操作记录">
|
||||||
<div className="operate-bar">
|
<div className="operate-bar">
|
||||||
<Form form={form} layout="inline" onFinish={() => getData({ page: 1 })}>
|
<div className="left">
|
||||||
<Form.Item name="targetType">
|
<div className="refresh-icon" onClick={() => getData()}>
|
||||||
<Select placeholder="请选择模块" options={configGroupList} style={{ width: 160 }} />
|
<IconFont className="icon" type="icon-shuaxin1" />
|
||||||
</Form.Item>
|
</div>
|
||||||
<Form.Item name="target">
|
<Divider type="vertical" style={{ height: 20, top: 0 }} />
|
||||||
<Input placeholder="请输入操作对象" />
|
|
||||||
</Form.Item>
|
<Form form={form} layout="inline" onFinish={() => getData({ page: 1 })}>
|
||||||
<Form.Item name="detail">
|
<Form.Item name="targetType">
|
||||||
<Input placeholder="请输入操作内容" />
|
<Select placeholder="请选择模块" options={configGroupList} style={{ width: 160 }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="time">
|
<Form.Item name="target">
|
||||||
<RangePicker showTime />
|
<Input placeholder="请输入操作对象" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item name="detail">
|
||||||
<Button type="primary" ghost htmlType="submit">
|
<Input placeholder="请输入操作内容" />
|
||||||
查询
|
</Form.Item>
|
||||||
</Button>
|
<Form.Item name="time">
|
||||||
</Form.Item>
|
<RangePicker showTime />
|
||||||
</Form>
|
</Form.Item>
|
||||||
|
<Form.Item>
|
||||||
|
<Button type="primary" ghost htmlType="submit">
|
||||||
|
查询
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
|
|||||||
@@ -611,38 +611,45 @@ export default (props: { curTabKey: string }): JSX.Element => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="operate-bar-right">
|
<div className="operate-bar">
|
||||||
<Input
|
<div className="left">
|
||||||
className="search-input"
|
<div className="refresh-icon" onClick={() => getRoleList()}>
|
||||||
suffix={
|
<IconFont className="icon" type="icon-shuaxin1" />
|
||||||
<IconFont
|
</div>
|
||||||
type="icon-fangdajing"
|
</div>
|
||||||
onClick={(_) => {
|
<div className="right">
|
||||||
setSearchKeywords(searchKeywordsInput);
|
<Input
|
||||||
}}
|
className="search-input"
|
||||||
style={{ fontSize: '16px' }}
|
suffix={
|
||||||
/>
|
<IconFont
|
||||||
}
|
type="icon-fangdajing"
|
||||||
placeholder="请输入角色名称"
|
onClick={(_) => {
|
||||||
value={searchKeywordsInput}
|
setSearchKeywords(searchKeywordsInput);
|
||||||
onPressEnter={(_) => {
|
}}
|
||||||
setSearchKeywords(searchKeywordsInput);
|
style={{ fontSize: '16px' }}
|
||||||
}}
|
/>
|
||||||
onChange={(e) => {
|
}
|
||||||
setSearchKeywordsInput(e.target.value);
|
placeholder="请输入角色名称"
|
||||||
}}
|
value={searchKeywordsInput}
|
||||||
/>
|
onPressEnter={(_) => {
|
||||||
{global.hasPermission && global.hasPermission(ConfigPermissionMap.ROLE_ADD) ? (
|
setSearchKeywords(searchKeywordsInput);
|
||||||
<Button
|
}}
|
||||||
type="primary"
|
onChange={(e) => {
|
||||||
icon={<PlusOutlined />}
|
setSearchKeywordsInput(e.target.value);
|
||||||
onClick={() => detailRef.current.onOpen(true, RoleOperate.Add, getRoleList, undefined)}
|
}}
|
||||||
>
|
/>
|
||||||
新增角色
|
{global.hasPermission && global.hasPermission(ConfigPermissionMap.ROLE_ADD) ? (
|
||||||
</Button>
|
<Button
|
||||||
) : (
|
type="primary"
|
||||||
<></>
|
icon={<PlusOutlined />}
|
||||||
)}
|
onClick={() => detailRef.current.onOpen(true, RoleOperate.Add, getRoleList, undefined)}
|
||||||
|
>
|
||||||
|
新增角色
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||||
import { Form, ProTable, Select, Button, Input, Modal, message, Drawer, Space, Divider, AppContainer, Utils } from 'knowdesign';
|
import { Form, ProTable, Select, Button, Input, Modal, message, Drawer, Space, Divider, AppContainer, Utils } from 'knowdesign';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { defaultPagination } from 'constants/common';
|
import { defaultPagination } from 'constants/common';
|
||||||
@@ -341,22 +342,29 @@ export default (props: { curTabKey: string }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="operate-bar">
|
<div className="operate-bar">
|
||||||
<Form form={form} layout="inline" onFinish={() => getUserList({ page: 1 })}>
|
<div className="left">
|
||||||
<Form.Item name="userName">
|
<div className="refresh-icon" onClick={() => getUserList()}>
|
||||||
<Input placeholder="请输入用户账号" />
|
<IconFont className="icon" type="icon-shuaxin1" />
|
||||||
</Form.Item>
|
</div>
|
||||||
<Form.Item name="realName">
|
<Divider type="vertical" style={{ height: 20, top: 0 }} />
|
||||||
<Input placeholder="请输入用户实名" />
|
|
||||||
</Form.Item>
|
<Form form={form} layout="inline" onFinish={() => getUserList({ page: 1 })}>
|
||||||
<Form.Item name="roleId">
|
<Form.Item name="userName">
|
||||||
<Select style={{ width: 190 }} placeholder="选择平台已创建的角色名" options={simpleRoleList} />
|
<Input placeholder="请输入用户账号" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item name="realName">
|
||||||
<Button type="primary" ghost htmlType="submit">
|
<Input placeholder="请输入用户实名" />
|
||||||
查询
|
</Form.Item>
|
||||||
</Button>
|
<Form.Item name="roleId">
|
||||||
</Form.Item>
|
<Select style={{ width: 190 }} placeholder="选择平台已创建的角色名" options={simpleRoleList} />
|
||||||
</Form>
|
</Form.Item>
|
||||||
|
<Form.Item>
|
||||||
|
<Button type="primary" ghost htmlType="submit">
|
||||||
|
查询
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
{global.hasPermission && global.hasPermission(ConfigPermissionMap.USER_ADD) ? (
|
{global.hasPermission && global.hasPermission(ConfigPermissionMap.USER_ADD) ? (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -44,13 +44,3 @@
|
|||||||
.role-tab-assign-user .desc-row {
|
.role-tab-assign-user .desc-row {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.operate-bar-right {
|
|
||||||
display: flex;
|
|
||||||
justify-content: right;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
.search-input {
|
|
||||||
width: 248px;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user