Commit 9de83766 authored by tianfen's avatar tianfen

perf: 修改数据初始化的滚动条

parents 0064e792 91eb8cd1
Pipeline #21930 skipped with stages
...@@ -31,15 +31,9 @@ const PictureWallProvider = props => { ...@@ -31,15 +31,9 @@ const PictureWallProvider = props => {
const updateDicName = () => { const updateDicName = () => {
getSysConfigurate().then(res => { getSysConfigurate().then(res => {
if (res.getMe && (res.getMe[0] === 1 || res.getMe[0] === '1')) { if (res.getMe && (res.getMe[0] === 1 || res.getMe[0] === '1')) {
window.DicNameSERVICE = { window.DicNameSERVICE = 'publish';
CITY_SERVICE: '/Publish/GateWay/OMS',
PUBLISH_SERVICE: '/Publish/GateWay/CityServer',
};
} else { } else {
window.DicNameSERVICE = { window.DicNameSERVICE = '';
CITY_SERVICE: '/Cityinterface/rest/services',
PUBLISH_SERVICE: '/Publish/OMS',
};
} }
}); });
}; };
......
...@@ -32,7 +32,7 @@ const OmsLog = () => { ...@@ -32,7 +32,7 @@ const OmsLog = () => {
dataIndex: 'logTime', dataIndex: 'logTime',
key: 'logTime', key: 'logTime',
width: 200, width: 200,
// defaultSortOrder: 'descend', defaultSortOrder: 'descend',
sortDirections: ['descend', 'ascend'], sortDirections: ['descend', 'ascend'],
sorter: (a, b) => sorter: (a, b) =>
new Date(a.logTime).getTime() - new Date(b.logTime).getTime(), new Date(a.logTime).getTime() - new Date(b.logTime).getTime(),
...@@ -41,7 +41,7 @@ const OmsLog = () => { ...@@ -41,7 +41,7 @@ const OmsLog = () => {
title: '接口名称', title: '接口名称',
dataIndex: 'functionName', dataIndex: 'functionName',
key: 'functionName', key: 'functionName',
width: 300, width: 200,
// filters: functionNameFilters, // filters: functionNameFilters,
// onFilter: (value, record) => record.functionName === value, // onFilter: (value, record) => record.functionName === value,
}, },
...@@ -49,7 +49,7 @@ const OmsLog = () => { ...@@ -49,7 +49,7 @@ const OmsLog = () => {
title: '标签', title: '标签',
dataIndex: 'label', dataIndex: 'label',
key: 'label', key: 'label',
width: 300, width: 360,
}, },
{ {
title: '优先级', title: '优先级',
...@@ -58,6 +58,18 @@ const OmsLog = () => { ...@@ -58,6 +58,18 @@ const OmsLog = () => {
width: 100, width: 100,
filters: levelFilters, filters: levelFilters,
onFilter: (value, record) => record.level === value, onFilter: (value, record) => record.level === value,
render: record => {
if (record === '高') {
return <span style={{ color: '#ff7875' }}></span>;
}
if (record === '中') {
return <span style={{ color: '#faad14' }}></span>;
}
if (record === '低') {
return <span style={{ color: '#52c41a' }}></span>;
}
return record;
},
}, },
{ {
title: '详情', title: '详情',
......
...@@ -49,19 +49,19 @@ const AddForm = props => { ...@@ -49,19 +49,19 @@ const AddForm = props => {
onFinish={finish} onFinish={finish}
> >
<Item <Item
label="组名称" label="菜单组名称"
name="menuName" name="menuName"
rules={[ rules={[
{ {
required: true, required: true,
message: '请输入组名称', message: '请输入菜单组名称',
}, },
]} ]}
> >
<Input /> <Input placeholder="请输入菜单组名称" />
</Item> </Item>
<Item label="组别名" name="shortName"> <Item label="菜单组别名" name="shortName">
<Input /> <Input placeholder="请输入菜单组别名" />
</Item> </Item>
{addType === 1 && ( {addType === 1 && (
<Item <Item
...@@ -94,12 +94,12 @@ const AddForm = props => { ...@@ -94,12 +94,12 @@ const AddForm = props => {
{addType === 2 && ( {addType === 2 && (
<Item <Item
label="组图标" label="菜单组图标"
name="imageUrl" name="imageUrl"
rules={[ rules={[
{ {
required: true, required: true,
message: '请选择组图标', message: '请选择菜单组图标',
}, },
]} ]}
> >
......
.formStyle{ .formStyle{
margin-bottom: 20px; margin-bottom: 40px;
// height: 100%; // height: 100%;
// overflow-y: scroll; // overflow-y: scroll;
} }
......
...@@ -43,6 +43,10 @@ const CheckList = props => { ...@@ -43,6 +43,10 @@ const CheckList = props => {
return ( return (
<div> <div>
{nodeType === 3 || nodeType === 4 ? ( {nodeType === 3 || nodeType === 4 ? (
<>
<div className={styles.boxtitle}>
<span className={styles.boxspan}>关联角色</span>
</div>
<div className={styles.box}> <div className={styles.box}>
{/* <Checkbox>全选/反选</Checkbox> */} {/* <Checkbox>全选/反选</Checkbox> */}
...@@ -65,6 +69,7 @@ const CheckList = props => { ...@@ -65,6 +69,7 @@ const CheckList = props => {
</div> </div>
))} ))}
</div> </div>
</>
) : ( ) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)} )}
......
.box{ .box{
display: flex; display: flex;
padding: 20px; padding: 20px;
margin: 20px;
flex-wrap: wrap; flex-wrap: wrap;
border: 1px solid #bfbfbf; border: 1px solid #d9d9d9;
width: 93%;
margin-left: 3%;
margin-bottom: 20px;
}
.boxtitle{
position: relative;
top: 10px;
margin-left: 5%;
}
.boxspan{
font-weight: bold;
background-color: #fff;
padding: 0 5px;
} }
.check{ .check{
flex-shrink: 0; flex-shrink: 0;
......
...@@ -65,19 +65,19 @@ const EditForm = props => { ...@@ -65,19 +65,19 @@ const EditForm = props => {
onFinish={onFinish} onFinish={onFinish}
> >
<Item <Item
label="组名称" label="菜单组名称"
name="menuName" name="menuName"
rules={[ rules={[
{ {
required: true, required: true,
message: '请输入组名称', message: '请输入菜单组名称',
}, },
]} ]}
> >
<Input /> <Input placeholder="请输入菜单组名称" />
</Item> </Item>
<Item label="组别名" name="shortName"> <Item label="菜单组别名" name="shortName">
<Input /> <Input placeholder="请输入菜单组别名" />
</Item> </Item>
{nodeType === 1 && ( {nodeType === 1 && (
<Item <Item
...@@ -110,12 +110,12 @@ const EditForm = props => { ...@@ -110,12 +110,12 @@ const EditForm = props => {
{nodeType === 2 && ( {nodeType === 2 && (
<Item <Item
label="组图标" label="菜单组图标"
name="imageUrl" name="imageUrl"
rules={[ rules={[
{ {
required: true, required: true,
message: '请选择组图标', message: '请选择菜单组图标',
}, },
]} ]}
> >
......
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
EditOutlined, EditOutlined,
EditTwoTone, EditTwoTone,
DeleteOutlined, DeleteOutlined,
ShareAltOutlined, IdcardOutlined,
UnlockOutlined, UnlockOutlined,
ApartmentOutlined, ApartmentOutlined,
StopOutlined, StopOutlined,
...@@ -207,9 +207,9 @@ const UserManage = () => { ...@@ -207,9 +207,9 @@ const UserManage = () => {
render: record => ( render: record => (
<Space size="middle"> <Space size="middle">
<Tooltip title="关联角色"> <Tooltip title="关联角色">
<ShareAltOutlined <IdcardOutlined
onClick={() => relateRole(record)} onClick={() => relateRole(record)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '20px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip>
<Tooltip title="更改机构"> <Tooltip title="更改机构">
...@@ -706,7 +706,7 @@ const UserManage = () => { ...@@ -706,7 +706,7 @@ const UserManage = () => {
// 用户批量操作 // 用户批量操作
const userButtonMenu = ( const userButtonMenu = (
<Menu> <Menu>
<Menu.Item key="1" onClick={relateRoles} icon={<ShareAltOutlined />}> <Menu.Item key="1" onClick={relateRoles} icon={<IdcardOutlined />}>
批量关联角色 批量关联角色
</Menu.Item> </Menu.Item>
<Menu.Item key="2" onClick={changeOrgs} icon={<ApartmentOutlined />}> <Menu.Item key="2" onClick={changeOrgs} icon={<ApartmentOutlined />}>
......
...@@ -50,14 +50,14 @@ const AddForm = props => { ...@@ -50,14 +50,14 @@ const AddForm = props => {
rules={[ rules={[
{ {
required: true, required: true,
message: '请输入分组名称', message: '请输入菜单名称',
}, },
]} ]}
> >
<Input /> <Input placeholder="请输入菜单名称" />
</Item> </Item>
<Item label="菜单别名" name="shortName"> <Item label="菜单别名" name="shortName">
<Input /> <Input placeholder="请输入菜单别名" />
</Item> </Item>
<Item <Item
label="菜单图标" label="菜单图标"
...@@ -65,14 +65,23 @@ const AddForm = props => { ...@@ -65,14 +65,23 @@ const AddForm = props => {
rules={[ rules={[
{ {
required: true, required: true,
message: '请选择在线图标', message: '请选择菜单图标',
}, },
]} ]}
> >
<PicturesWall /> <PicturesWall />
</Item> </Item>
<Item label="功能路径" name="pageUrl"> <Item
<Input /> label="功能路径"
name="pageUrl"
rules={[
{
required: true,
message: '请输入功能路径',
},
]}
>
<Input placeholder="请输入功能路径" />
</Item> </Item>
<Item label="配置文件" name="config"> <Item label="配置文件" name="config">
<EditeConfigWrapper> <EditeConfigWrapper>
...@@ -109,27 +118,27 @@ const AddForm = props => { ...@@ -109,27 +118,27 @@ const AddForm = props => {
className={styles.formStyle} className={styles.formStyle}
> >
<Item <Item
label="菜单名称" label="菜单名称"
name="menuName" name="menuName"
rules={[ rules={[
{ {
required: true, required: true,
message: '请输入菜单名称', message: '请输入菜单名称',
}, },
]} ]}
> >
<Input /> <Input placeholder="请输入菜单组名称" />
</Item> </Item>
<Item label="菜单别名" name="shortName"> <Item label="菜单别名" name="shortName">
<Input /> <Input placeholder="请输入菜单组别名" />
</Item> </Item>
<Item <Item
label="菜单图标" label="菜单图标"
name="imageUrl" name="imageUrl"
rules={[ rules={[
{ {
required: true, required: true,
message: '请选择菜单图标', message: '请选择菜单图标',
}, },
]} ]}
> >
......
.formStyle{ .formStyle{
margin-bottom: 40px; margin-bottom: 40px;
} }
.rolebox{
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
}
\ No newline at end of file
...@@ -5,7 +5,6 @@ const CheckList = props => { ...@@ -5,7 +5,6 @@ const CheckList = props => {
const { info, valueCallback, nodeType } = props; const { info, valueCallback, nodeType } = props;
const [list, setList] = useState([]); const [list, setList] = useState([]);
const [flag, setFlag] = useState(false); const [flag, setFlag] = useState(false);
console.log(info, 'info');
useEffect(() => { useEffect(() => {
if (info.pageUrl) { if (info.pageUrl) {
let arr = [...info.relatedRoleList]; let arr = [...info.relatedRoleList];
...@@ -36,9 +35,11 @@ const CheckList = props => { ...@@ -36,9 +35,11 @@ const CheckList = props => {
return ( return (
<div> <div>
{nodeType === 1 ? ( {nodeType === 1 ? (
<>
<div className={styles.boxtitle}>
<span className={styles.boxspan}>关联角色</span>
</div>
<div className={styles.box}> <div className={styles.box}>
{/* <Checkbox>全选/反选</Checkbox> */}
{list && {list &&
list.length > 0 && list.length > 0 &&
list.map(item => ( list.map(item => (
...@@ -58,6 +59,7 @@ const CheckList = props => { ...@@ -58,6 +59,7 @@ const CheckList = props => {
</div> </div>
))} ))}
</div> </div>
</>
) : ( ) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)} )}
......
.box{ .box{
display: flex; display: flex;
padding: 20px; padding: 20px;
margin: 20px;
flex-wrap: wrap; flex-wrap: wrap;
border: 1px solid #bfbfbf; border: 1px solid #d9d9d9;
width: 93%;
margin-left: 3%;
}
.boxtitle{
position: relative;
top: 10px;
margin-left: 5%;
}
.boxspan{
font-weight: bold;
background-color: #fff;
padding: 0 5px;
} }
.check{ .check{
flex-shrink: 0; flex-shrink: 0;
......
...@@ -19,7 +19,7 @@ const EditForm = props => { ...@@ -19,7 +19,7 @@ const EditForm = props => {
const layout = { const layout = {
layout: 'horizontal', layout: 'horizontal',
labelCol: { span: 2 }, labelCol: { span: 2 },
wrapperCol: { span: 20, offset: 0 }, wrapperCol: { span: 21, offset: 0 },
}; };
// 回显表单 // 回显表单
useEffect(() => { useEffect(() => {
...@@ -65,10 +65,10 @@ const EditForm = props => { ...@@ -65,10 +65,10 @@ const EditForm = props => {
}, },
]} ]}
> >
<Input /> <Input placeholder="请输入菜单名称" />
</Item> </Item>
<Item label="菜单别名" name="shortName"> <Item label="菜单别名" name="shortName">
<Input /> <Input placeholder="请输入菜单别名" />
</Item> </Item>
<Item <Item
label="菜单图标" label="菜单图标"
...@@ -82,8 +82,17 @@ const EditForm = props => { ...@@ -82,8 +82,17 @@ const EditForm = props => {
> >
<PicturesWall /> <PicturesWall />
</Item> </Item>
<Item label="功能路径" name="pageUrl"> <Item
<Input /> label="功能路径"
name="pageUrl"
rules={[
{
required: true,
message: '请输入功能路径',
},
]}
>
<Input placeholder="请输入功能路径" />
</Item> </Item>
<Item label="配置文件" name="config"> <Item label="配置文件" name="config">
<EditeConfigWrapper> <EditeConfigWrapper>
...@@ -108,7 +117,7 @@ const EditForm = props => { ...@@ -108,7 +117,7 @@ const EditForm = props => {
nodeType={nodeType} nodeType={nodeType}
valueCallback={valueCallback} valueCallback={valueCallback}
/> />
<Item wrapperCol={{ offset: 10 }} style={{ marginTop: '40px' }}> <Item wrapperCol={{ offset: 10 }} style={{ marginTop: '20px' }}>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
提交 提交
</Button> </Button>
...@@ -125,27 +134,27 @@ const EditForm = props => { ...@@ -125,27 +134,27 @@ const EditForm = props => {
className={styles.formStyle} className={styles.formStyle}
> >
<Item <Item
label="菜单名称" label="菜单名称"
name="menuName" name="menuName"
rules={[ rules={[
{ {
required: true, required: true,
message: '请输入菜单名称', message: '请输入菜单名称',
}, },
]} ]}
> >
<Input /> <Input />
</Item> </Item>
<Item label="菜单别名" name="shortName"> <Item label="菜单别名" name="shortName">
<Input /> <Input placeholder="请输入菜单组别名" />
</Item> </Item>
<Item <Item
label="菜单图标" label="菜单图标"
name="imageUrl" name="imageUrl"
rules={[ rules={[
{ {
required: true, required: true,
message: '请选择菜单图标', message: '请选择菜单图标',
}, },
]} ]}
> >
......
import { request } from '../utils/request'; import { request } from '../utils/request';
console.log(window, 'window');
// export const CITY_SERVICE =
// window.DicNameSERVICE !== 'publish'
// ? '/Publish/GateWay/CityServer'
// : '/Cityinterface/rest/services';
export const CITY_SERVICE = '/Cityinterface/rest/services'; export const CITY_SERVICE = '/Cityinterface/rest/services';
export const PUBLISH_SERVICE = '/Publish/OMS'; export const PUBLISH_SERVICE = '/Publish/OMS';
// export const PUBLISH_SERVICE = '/Publish/GateWay/OMS'; // export const PUBLISH_SERVICE = '/Publish/GateWay/OMS';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment