Commit fb805444 authored by Maofei94's avatar Maofei94

Merge branch 'master' of g.civnet.cn:test/maintenance

parents b65bbf94 ecdb2e32
{ {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll": true "source.fixAll": true
} },
"editor.tabSize": 2
} }
\ No newline at end of file
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
"baseUrl": "./", "baseUrl": "./",
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"]
} },
"spaces": 2
}, },
"exclude": [ "exclude": [
"node_modules" "node_modules"
......
import React from 'react';
import { Drawer, Form, Button } from 'antd';
import classnames from 'classnames';
import styles from './index.less';
export default props => {
const {
visible,
setVisible,
drawerProps,
previewContent,
drawerContent,
previewClass,
children,
} = props;
return (
<div className={classnames(styles.preViewContainer, previewClass)}>
<div className={styles.previewBox}>{previewContent}</div>
<Drawer
title="Multi-level drawer"
width={520}
closable
onClose={() => {
setVisible(false);
}}
visible={visible}
{...drawerProps}
>
{children || drawerContent}
</Drawer>
</div>
);
};
.preViewContainer{
width: 100%;
@minHeight: calc(100vh - 240px);
min-height: @minHeight;
padding: 6px 12px;
.previewBox{
width: 100%;
height: max(@minHeight, 720px);
background: #f5eebb;
}
}
\ No newline at end of file
import check from '@/components/Authorized/CheckPermissions'; import check from '@/components/Authorized/CheckPermissions';
import React from 'react'; import React from 'react';
import { renderRoutes } from 'react-router-config'; import { renderRoutes } from 'react-router-config';
import page403 from '@/pages/exception/403';
const Layout = ({ children, route }) => ( const Layout = ({ children, route }) => (
<> <>
{children || {children ||
renderRoutes( renderRoutes(
route.routes.filter( route.routes.map(r => {
r => !r.authority || check(r.authority, true, false), if (!r.authority) {
), return r;
}
r.component = check(r.authority, r.component, page403);
return r;
}),
)} )}
</> </>
); );
......
import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
const AppConfigPage = props => <PageContainer>appConfigPage</PageContainer>;
export default AppConfigPage;
import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
const MobileConfigPage = props => (
<PageContainer>mobileConfigPage</PageContainer>
);
export default MobileConfigPage;
...@@ -44,8 +44,9 @@ const UserManage = () => { ...@@ -44,8 +44,9 @@ const UserManage = () => {
const haveChildren = Array.isArray(org.children) && org.children.length > 0; const haveChildren = Array.isArray(org.children) && org.children.length > 0;
return { return {
title: ( title: (
<>
<span>{org.text}</span>
<div className={styles.iconWraper1}> <div className={styles.iconWraper1}>
{org.text}
<Tooltip title="添加用户"> <Tooltip title="添加用户">
<FileAddTwoTone onClick={e => addUser(e, org.text, org.id)} /> <FileAddTwoTone onClick={e => addUser(e, org.text, org.id)} />
</Tooltip> </Tooltip>
...@@ -59,6 +60,7 @@ const UserManage = () => { ...@@ -59,6 +60,7 @@ const UserManage = () => {
<DeleteTwoTone onClick={e => deleteOrg(e, org.text, org.id)} /> <DeleteTwoTone onClick={e => deleteOrg(e, org.text, org.id)} />
</Tooltip> </Tooltip>
</div> </div>
</>
), ),
key: org.id, key: org.id,
// icon: <CaretDownOutlined />, // icon: <CaretDownOutlined />,
...@@ -96,6 +98,7 @@ const UserManage = () => { ...@@ -96,6 +98,7 @@ const UserManage = () => {
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
align: 'center',
render: (text, record) => ( render: (text, record) => (
<Space size="middle"> <Space size="middle">
<a>关联角色 {record.name}</a> <a>关联角色 {record.name}</a>
...@@ -340,18 +343,10 @@ const UserManage = () => { ...@@ -340,18 +343,10 @@ const UserManage = () => {
}; };
return ( return (
<PageContainer> <PageContainer className={styles.userManageContainer}>
<div <div className={styles.contentContainer}>
style={{ <div className={styles.orgContainer}>
width: '20%', <span style={{ padding: '8px', fontSize: '16px' }}>
height: 'calc(100vh - 194px)',
background: 'white',
float: 'left',
padding: '10px',
minWidth: '330px',
}}
>
<span style={{ padding: '8px' }}>
机构列表 机构列表
<Tooltip title="添加下级机构"> <Tooltip title="添加下级机构">
<FolderAddTwoTone <FolderAddTwoTone
...@@ -369,15 +364,7 @@ const UserManage = () => { ...@@ -369,15 +364,7 @@ const UserManage = () => {
treeData={treeData} treeData={treeData}
/> />
</div> </div>
<div <div className={styles.userContainer}>
style={{
width: '79%',
height: 'calc(100vh - 194px)',
background: 'white',
float: 'right',
padding: '20px',
}}
>
<Table <Table
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
...@@ -507,6 +494,7 @@ const UserManage = () => { ...@@ -507,6 +494,7 @@ const UserManage = () => {
> >
<p>即将关联删除 主站点 用户关系,是否确认删除?</p> <p>即将关联删除 主站点 用户关系,是否确认删除?</p>
</Modal> </Modal>
</div>
</PageContainer> </PageContainer>
); );
}; };
......
.iconWraper1{ .userManageContainer{
.ant-tree-treenode{
width: 100%;
.ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-normal{
display: inline-block;
width: 100%;
}
.iconWraper1{
float: right;
span{ span{
display: none; display: none;
} }
} }
.iconWraper1:hover{ }
span{
.ant-tree-treenode:hover{
.iconWraper1>span{
margin-left: 12px; margin-left: 12px;
font-size: 16px; font-size: 16px;
display: inline-block; display: inline-block;
} }
// display: block; }
.contentContainer{
min-height: calc(100vh - 194px);
display: flex;
.orgContainer{
width: 20%;
height: calc(100vh - 194px);
float: left;
padding: 10px;
min-width: 330px;
background: white;
.ant-tree{
padding-top: 6px;
}
}
.userContainer{
margin-left: 12px;
flex: 1;
height: calc(100vh - 194px);
background: white;
.ant-table-pagination-right{
padding-right: 12px;
}
}
}
} }
import React from 'react';
import { Button } from 'antd';
import styles from './siteConfig.less';
import PreviewConfigDrawer from '@/components/PreviewConfigDrawer';
import BaseForm from '@/components/BaseForm';
export default props => {
const { visible, setVisible } = props;
return (
<div className={styles.siteConfigContainer}>
<PreviewConfigDrawer
visible={visible}
setVisible={setVisible}
drawerProps={
{
// maskStyle: { opacity: 0.6 },
}
}
previewContent={
<Button onClick={() => setVisible(true)}>打开配置</Button>
}
>
<BaseForm />
</PreviewConfigDrawer>
</div>
);
};
.siteConfigContainer{
width: 100%;
@minHeight: calc(100vh - 240px);
min-height: @minHeight;
padding: 6px 12px;
.previewBox{
width: 100%;
height: max(@minHeight, 720px);
background: #f5eebb;
}
}
\ No newline at end of file
import React, { useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Tabs } from 'antd';
import menuTree from '@/services/mocks/web4site';
import styles from './index.less';
import SiteConfig from './componets/siteConfig';
const { TabPane } = Tabs;
const WebConfigPage = props => {
const [configVisible, setConfigVisible] = useState(false);
const renderPage = () => {};
const renderTabPane = tabPaneItem => (
<TabPane key={tabPaneItem.id} tab={tabPaneItem.text}>
<SiteConfig visible={configVisible} setVisible={setConfigVisible} />
</TabPane>
);
const onEdit = (targetKey, action) => {
// console.log(targetKey, action); // action: add|remove
};
return (
<PageContainer>
<div className={styles.webConfigContainer}>
<Tabs type="editable-card" onEdit={onEdit}>
{menuTree.children.map(renderTabPane)}
</Tabs>
</div>
</PageContainer>
);
};
export default WebConfigPage;
.webConfigContainer{
}
.webConfigContainer > .ant-tabs-card .ant-tabs-content {
height: 100%;
margin-top: -16px;
}
.webConfigContainer > .ant-tabs-card .ant-tabs-content > .ant-tabs-tabpane {
background: #fff;
padding: 16px;
}
.webConfigContainer > .ant-tabs-card > .ant-tabs-nav::before {
display: none;
}
.webConfigContainer > .ant-tabs-card .ant-tabs-tab,
[data-theme='compact'] .webConfigContainer > .ant-tabs-card .ant-tabs-tab {
border-color: transparent;
background: transparent;
}
.webConfigContainer > .ant-tabs-card .ant-tabs-tab-active,
[data-theme='compact'] .webConfigContainer > .ant-tabs-card .ant-tabs-tab-active {
border-color: #fff;
background: #fff;
}
#components-tabs-demo-card-top .code-box-demo {
background: #f5f5f5;
overflow: hidden;
padding: 24px;
}
[data-theme='compact'] .webConfigContainer > .ant-tabs-card .ant-tabs-content {
height: 120px;
margin-top: -8px;
}
[data-theme='dark'] .webConfigContainer > .ant-tabs-card .ant-tabs-tab {
border-color: transparent;
background: transparent;
}
[data-theme='dark'] #components-tabs-demo-card-top .code-box-demo {
background: #000;
}
[data-theme='dark'] .webConfigContainer > .ant-tabs-card .ant-tabs-content > .ant-tabs-tabpane {
background: #141414;
}
[data-theme='dark'] .webConfigContainer > .ant-tabs-card .ant-tabs-tab-active {
border-color: #141414;
background: #141414;
}
\ No newline at end of file
import React from 'react'; import React from 'react';
import { omit } from 'lodash';
import { import {
DatabaseOutlined, DatabaseOutlined,
UsergroupAddOutlined, UsergroupAddOutlined,
...@@ -22,6 +21,9 @@ import RoleManage from '../pages/userCenter/RoleManage'; ...@@ -22,6 +21,9 @@ import RoleManage from '../pages/userCenter/RoleManage';
import SiteManage from '../pages/userCenter/siteManage/SiteManage'; import SiteManage from '../pages/userCenter/siteManage/SiteManage';
// import DefaultComponent from '../pages/orgnazation/DefaultComponent'; // import DefaultComponent from '../pages/orgnazation/DefaultComponent';
import TestTable from '../pages/orgnazation/TestTable'; import TestTable from '../pages/orgnazation/TestTable';
import WebConfigPage from '@/pages/webConfig';
import AppConfigPage from '@/pages/appConfig';
import MobileConfigPage from '@/pages/mobileConfig';
import { USER_MODE } from '@/utils/constants'; import { USER_MODE } from '@/utils/constants';
const iconStyle = { verticalAlign: '0.125em' }; const iconStyle = { verticalAlign: '0.125em' };
...@@ -62,11 +64,13 @@ export default { ...@@ -62,11 +64,13 @@ export default {
{ {
path: '/dbm/dbInit', path: '/dbm/dbInit',
name: '数据库初始化', name: '数据库初始化',
authority: adminAuthority,
component: InitDataBase, component: InitDataBase,
}, },
{ {
path: '/dbm/dbsm', path: '/dbm/dbsm',
name: '数据库标准化管理', name: '数据库标准化管理',
authority: superAuthority,
component: ManagementDataBase, component: ManagementDataBase,
}, },
], ],
...@@ -150,17 +154,17 @@ export default { ...@@ -150,17 +154,17 @@ export default {
{ {
path: '/productCenter/web', path: '/productCenter/web',
name: 'web配置', name: 'web配置',
component: Welcome, component: WebConfigPage,
}, },
{ {
path: '/productCenter/app', path: '/productCenter/app',
name: 'app配置', name: 'app配置',
component: Welcome, component: AppConfigPage,
}, },
{ {
path: '/productCenter/miniProgram', path: '/productCenter/miniProgram',
name: '小程序配置', name: '小程序配置',
component: Welcome, component: MobileConfigPage,
}, },
], ],
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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