Commit 2e4a7dad authored by 邓超's avatar 邓超

fix: admin不开发数据库操作权限,修改用户管理样式,正常模式跟沙箱都可正常显示

parent f5fef0a2
Pipeline #51934 passed with stages
in 9 minutes 6 seconds
.ant-pro-basicLayout-content .ant-pro-page-container{ .ant-pro-basicLayout-content .ant-pro-page-container {
margin:0 margin: 0
} }
.ant-pro-page-container-children-content{
margin:0 .ant-pro-page-container-children-content {
margin: 0
} }
.ant-layout .ant-layout-content{
.ant-layout .ant-layout-content {
margin: 0px !important; margin: 0px !important;
}
.ant-pro-page-container {
height: 100%;
}
.ant-pro-grid-content {
height: 100%;
.ant-pro-grid-content-children {
height: 100%;
.ant-pro-page-container-children-content {
height: 100%;
}
}
} }
\ No newline at end of file
...@@ -48,13 +48,13 @@ ...@@ -48,13 +48,13 @@
} }
.btnBox { .btnBox {
position: sticky; position: sticky;
bottom: 0px; // bottom: 0px;
right: 0px; // right: 0px;
background-color: #fff; // background-color: #fff;
width: 100%; // width: 100%;
height: 40px; // height: 40px;
padding: 0 20px; // padding: 0 20px;
display: flex; // display: flex;
justify-content: flex-end; // justify-content: flex-end;
align-items: center; // align-items: center;
} }
...@@ -51,7 +51,7 @@ const Login = props => { ...@@ -51,7 +51,7 @@ const Login = props => {
if (userMode === USER_MODE.SUPER) { if (userMode === USER_MODE.SUPER) {
history.push(`/solution`); history.push(`/solution`);
} else { } else {
history.push(`/dbm/dbInit`); history.push(`/authority/user`);
} }
} }
if (userMode === USER_MODE.COMMON) { if (userMode === USER_MODE.COMMON) {
......
...@@ -782,7 +782,7 @@ const SiteManage = () => { ...@@ -782,7 +782,7 @@ const SiteManage = () => {
</div> </div>
<hr style={{ width: '95%', color: '#eeecec', marginLeft: '15px' }} /> <hr style={{ width: '95%', color: '#eeecec', marginLeft: '15px' }} />
{treeData && treeData.length > 0 && ( {treeData && treeData.length > 0 && (
<div style={{ height: 'calc(100vh - 130px)', overflowY: 'scroll' }}> <div style={{ height: 'calc(100% - 40px)', overflowY: 'scroll' }}>
<Tree <Tree
showIcon showIcon
onSelect={handleTreeSelect} onSelect={handleTreeSelect}
......
.ant-spin-container {
height: 100%;
}
.cardBox { .cardBox {
min-height: calc(100vh - 74px); // min-height: calc(100vh - 74px);
max-height: calc(100vh - 74px); // max-height: calc(100vh - 74px);
overflow-y: scroll; height: 100%;
// overflow-y: scroll;
// overflow: auto; // overflow: auto;
overflow: hidden; overflow: hidden;
width: 320px; width: 320px;
...@@ -13,15 +18,22 @@ ...@@ -13,15 +18,22 @@
transition-property: width, left; transition-property: width, left;
transition-duration: 0.5s; transition-duration: 0.5s;
white-space: nowrap; white-space: nowrap;
.ant-card-body {
height: 100%;
}
.ant-tree-node-content-wrapper { .ant-tree-node-content-wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
.ant-tree-iconEle { .ant-tree-iconEle {
display: flex; display: flex;
align-items: center; align-items: center;
width: 18px; width: 18px;
} }
} }
.switcher { .switcher {
display: block; display: block;
position: absolute; position: absolute;
...@@ -33,11 +45,13 @@ ...@@ -33,11 +45,13 @@
z-index: 1; z-index: 1;
} }
} }
.hideBox { .hideBox {
left: 0px; left: 0px;
top: 0; top: 0;
width: 26px; width: 26px;
} }
.hideH { .hideH {
width: 100%; width: 100%;
} }
...@@ -46,45 +60,57 @@ ...@@ -46,45 +60,57 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.treeTitle { .treeTitle {
display: flex; display: flex;
span { span {
display: none; display: none;
} }
} }
.treeTitle:hover { .treeTitle:hover {
span { span {
margin-left: 20px; margin-left: 20px;
display: block; display: block;
} }
} }
.titleBox { .titleBox {
display: flex; display: flex;
// flex-wrap: wrap; // flex-wrap: wrap;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
} }
.cardBoxR { .cardBoxR {
height: calc(100vh - 192px); height: calc(100% - 36px);
min-width: 870px; min-width: 870px;
overflow-y: scroll; overflow-y: scroll;
} }
.cardBoxRNew { .cardBoxRNew {
height: calc(100vh - 160px); // height: calc(100vh - 160px);
min-width: 870px; height: 100%;
overflow-y: scroll; // min-width: 870px;
// overflow-y: scroll;
} }
.cardBoxH { .cardBoxH {
height: calc(100vh - 151px); // height: calc(100vh - 151px);
height: 100%;
min-width: 870px; min-width: 870px;
overflow-y: scroll; overflow-y: scroll;
} }
:global { :global {
.ant-tree-switcher { .ant-tree-switcher {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: -8px; margin-right: -8px;
margin-left: 5px; margin-left: 5px;
// color:#1890FF; // color:#1890FF;
.ant-tree-switcher-line-icon { .ant-tree-switcher-line-icon {
// margin-left: 5px; // margin-left: 5px;
...@@ -105,27 +131,50 @@ ...@@ -105,27 +131,50 @@
.boxR { .boxR {
width: 100%; width: 100%;
height: 100%;
position: relative; position: relative;
transition: width 2s; transition: width 2s;
.ant-card {
height: 100%;
}
.ant-card-body {
height: 100%;
}
.ant-tabs {
height: 100%;
}
.ant-tabs-content {
height: 100%;
}
} }
// .anticon-unordered-list{ // .anticon-unordered-list{
// vertical-align: 0.125em; // vertical-align: 0.125em;
// color:#1890FF; // color:#1890FF;
// } // }
.content { .content {
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
position: relative; position: relative;
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
} }
.tip { .tip {
display: none; display: none;
} }
.title:hover { .title:hover {
.tip { .tip {
display: flex; display: flex;
...@@ -134,14 +183,16 @@ ...@@ -134,14 +183,16 @@
width: 60%; width: 60%;
} }
} }
.fs { .fs {
font-size: 18px; font-size: 18px;
margin-left: 10px; margin-left: 10px;
} }
.titleTop { .titleTop {
width: 20rem; width: 20rem;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
padding-left: 10px; padding-left: 10px;
} }
\ No newline at end of file
...@@ -259,33 +259,35 @@ const NewSelectUser = props => { ...@@ -259,33 +259,35 @@ const NewSelectUser = props => {
</Button> </Button>
</div> </div>
{/* 复选框模块 */} {/* 复选框模块 */}
<Spin spinning={loading}> <div className={styles.checkScrollBox}>
<div className={styles.checkContainer}> <Spin spinning={loading}>
{allList.map((item, index) => ( <div className={styles.checkContainer}>
<div className={styles.checkBoxContent} key={item.groupId}> {allList.map((item, index) => (
<CardCheck <div className={styles.checkBoxContent} key={item.groupId}>
cardMsg={item} <CardCheck
cardIndex={index} cardMsg={item}
callback={(val, newCheckList) => checkCallBack(val, newCheckList)} cardIndex={index}
checkList={checkList} callback={(val, newCheckList) => checkCallBack(val, newCheckList)}
deleKey={deleKey} checkList={checkList}
delFlag={delFlag} deleKey={deleKey}
/> delFlag={delFlag}
</div> />
))} </div>
</div> ))}
</Spin> </div>
</Spin>
</div>
</div> </div>
<div className={styles.tableRight}> <div className={styles.tableRight}>
<Table <Table
bordered bordered
style={{ width: '400px', overflowX: 'hidden' }} style={{ width: '400px', height: '100%', overflowX: 'hidden' }}
rowKey={record => record.value} rowKey={record => record.value}
columns={columns} columns={columns}
dataSource={checkList} dataSource={checkList}
pagination={false} pagination={false}
size="small" size="small"
scroll={{ y: 'cala(100vh - 257px)' }} scroll={{ y: 'calc(100% - 40px)' }}
/> />
</div> </div>
</div> </div>
......
.pushTestContent { .pushTestContent {
display: flex; display: flex;
height: calc(100% - 75px);
.searchHeader { .searchHeader {
display: flex; display: flex;
} }
.checkContainer {
height: calc(100vh - 300px); .checkScrollBox {
width: 100%;
overflow-y: scroll; overflow-y: scroll;
height: calc(100% - 82px);
margin: 20px 0; margin: 20px 0;
padding-right: 5px; padding-right: 5px;
.checkContent {
display: flex; .checkContainer {
width: 100%; width: 100%;
flex-direction: column;
border: 1px solid #c2cdfd; .checkContent {
border-radius: 5px; display: flex;
margin-top: 20px; width: 100%;
min-height: 50px; flex-direction: column;
padding: 0 10px 10px 20px; border: 1px solid #c2cdfd;
.ant-checkbox-wrapper { border-radius: 5px;
background-color: #fff; margin-top: 20px;
} min-height: 50px;
.topCheckbox { padding: 0 10px 10px 20px;
height: 20px;
margin: -10px 0 0 0px;
line-height: 20px;
}
.topCheckbox > label :hover {
font-weight: 600;
}
.bottomCheckbox {
margin-top: 10px;
.ant-checkbox-wrapper { .ant-checkbox-wrapper {
min-width: 150px; background-color: #fff;
margin-left: 0; }
.topCheckbox {
height: 20px;
margin: -10px 0 0 0px;
line-height: 20px;
}
.topCheckbox>label :hover {
font-weight: 600;
}
.bottomCheckbox {
margin-top: 10px;
.ant-checkbox-wrapper {
min-width: 150px;
margin-left: 0;
}
// .ant-checkbox-group-item {
// min-width: 150px !important;
// }
// .ant-checkbox-wrapper {
// min-width: 150px !important;
// }
}
.checkdiv {
display: flex;
flex-wrap: wrap;
} }
// .ant-checkbox-group-item {
// min-width: 150px !important;
// }
// .ant-checkbox-wrapper {
// min-width: 150px !important;
// }
}
.checkdiv {
display: flex;
flex-wrap: wrap;
} }
} }
} }
.leftContent { .leftContent {
width: 70%; width: 100%;
} }
.tableRight { .tableRight {
margin-left: 10px; margin-left: 10px;
height: 100%;
.ant-spin-nested-loading {
height: 100%;
.ant-table {
height: 100%;
.ant-table-container {
height: 100%;
}
}
}
} }
.ant-table-body { .ant-table-body {
height: calc(100vh - 290px); // height: calc(100vh - 290px);
} }
} }
\ No newline at end of file
...@@ -685,7 +685,7 @@ const SiteManageV2 = () => { ...@@ -685,7 +685,7 @@ const SiteManageV2 = () => {
/> />
</Tooltip> </Tooltip>
{treeData.length > 0 && ( {treeData.length > 0 && (
<div style={{ height: 'calc(100vh - 120px)', overflowY: 'scroll' }}> <div style={{ height: '100%', overflowY: 'scroll' }}>
<Tree <Tree
showIcon="true" showIcon="true"
showLine={{ showLeafIcon: false }} showLine={{ showLeafIcon: false }}
...@@ -770,7 +770,7 @@ const SiteManageV2 = () => { ...@@ -770,7 +770,7 @@ const SiteManageV2 = () => {
<Button onClick={restButton}>重置</Button> <Button onClick={restButton}>重置</Button>
</Card> </Card>
<div style={{ background: '#fff' }}> <div style={{ background: '#fff', height: 'calc(100% - 64px)', paddingBottom: '10px' }}>
<Spin spinning={checkLoading} tip="loading..."> <Spin spinning={checkLoading} tip="loading...">
<Card <Card
className={classnames({ className={classnames({
...@@ -782,7 +782,7 @@ const SiteManageV2 = () => { ...@@ -782,7 +782,7 @@ const SiteManageV2 = () => {
style={{ style={{
display: 'flex', display: 'flex',
flexDirection: 'column ', flexDirection: 'column ',
height: 'calc(100vh - 240px)', height: '100%',
}} }}
> >
{/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */} {/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */}
......
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
line-height: 1; line-height: 1;
} }
.ant-dropdown-menu-item > .anticon:first-child { .ant-dropdown-menu-item>.anticon:first-child {
vertical-align: 0.15em !important; vertical-align: 0.15em !important;
} }
.ant-table-tbody { .ant-table-tbody {
.ant-table-row:hover > td { .ant-table-row:hover>td {
background: #aed8fa !important; background: #aed8fa !important;
} }
} }
...@@ -90,10 +90,12 @@ ...@@ -90,10 +90,12 @@
.ant-card-body { .ant-card-body {
padding: 15px; padding: 15px;
} }
.ant-spin-container { .ant-spin-container {
// overflow-y: scroll; // overflow-y: scroll;
// height: calc(100vh - 410px); // height: calc(100vh - 410px);
} }
.ant-tree-treenode { .ant-tree-treenode {
width: 100% !important; width: 100% !important;
...@@ -112,7 +114,7 @@ ...@@ -112,7 +114,7 @@
} }
.ant-tree-treenode:hover { .ant-tree-treenode:hover {
.iconWraper1 > span { .iconWraper1>span {
margin-left: 12px; margin-left: 12px;
font-size: 18px; font-size: 18px;
display: inline-block; display: inline-block;
...@@ -123,9 +125,11 @@ ...@@ -123,9 +125,11 @@
display: flex; display: flex;
width: 100%; width: 100%;
position: relative; position: relative;
height: 100%;
.orgContainer { .orgContainer {
height: calc(100vh - 74px); // height: calc(100vh - 74px);
height: 100%;
width: 320px; width: 320px;
padding-right: 10px; padding-right: 10px;
left: 0; left: 0;
...@@ -136,6 +140,11 @@ ...@@ -136,6 +140,11 @@
transition-property: width, left; transition-property: width, left;
transition-duration: 0.5s; transition-duration: 0.5s;
white-space: nowrap; white-space: nowrap;
padding-bottom: 10px;
.ant-card-body {
height: 100%;
}
.ant-tree { .ant-tree {
padding-top: 6px; padding-top: 6px;
...@@ -171,7 +180,7 @@ ...@@ -171,7 +180,7 @@
} }
.userContainer { .userContainer {
height: calc(100vh - 74px) !important; height: 100%;
z-index: 999; z-index: 999;
min-width: 800px; min-width: 800px;
background: white; background: white;
...@@ -242,17 +251,27 @@ ...@@ -242,17 +251,27 @@
//机构编辑面板 //机构编辑面板
.boxR { .boxR {
width: 100%; width: 100%;
height: 100%;
position: relative; position: relative;
transition: width 2s; transition: width 2s;
.ant-spin-nested-loading {
height: calc(100% - 50px);
}
.ant-card-body {
height: 100%;
}
} }
.cardBoxR { .cardBoxR {
min-height: calc(100vh - 210px); // min-height: calc(100vh - 210px);
max-height: calc(100vh - 210px); // max-height: calc(100vh - 210px);
height: 100%;
min-width: 600px; min-width: 600px;
} }
.siteCheckbox .ant-collapse-content > .ant-collapse-content-box { .siteCheckbox .ant-collapse-content>.ant-collapse-content-box {
padding: 16px 16px 0; padding: 16px 16px 0;
} }
...@@ -264,6 +283,7 @@ ...@@ -264,6 +283,7 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.siteListTitle { .siteListTitle {
width: 199px; width: 199px;
// margin:0 0 15px 0; // margin:0 0 15px 0;
...@@ -272,6 +292,7 @@ ...@@ -272,6 +292,7 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.sitePanel { .sitePanel {
margin: 0 0 10px 0; margin: 0 0 10px 0;
} }
...@@ -299,7 +320,7 @@ ...@@ -299,7 +320,7 @@
overflow: auto; overflow: auto;
} }
.sitePanel .ant-checkbox-wrapper + .ant-checkbox-wrapper { .sitePanel .ant-checkbox-wrapper+.ant-checkbox-wrapper {
margin: 0; margin: 0;
} }
...@@ -324,6 +345,7 @@ ...@@ -324,6 +345,7 @@
border: 1px solid #f5f5f5; border: 1px solid #f5f5f5;
overflow: auto; overflow: auto;
.siteSelectUl { .siteSelectUl {
margin: 0; margin: 0;
padding: 15px; padding: 15px;
...@@ -334,8 +356,7 @@ ...@@ -334,8 +356,7 @@
li { li {
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat 170px;
170px;
background-size: 20px; background-size: 20px;
background-position: center right; background-position: center right;
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
...@@ -348,8 +369,7 @@ ...@@ -348,8 +369,7 @@
} }
} }
.siteline { .siteline {}
}
.siteBtn { .siteBtn {
width: 100%; width: 100%;
...@@ -383,14 +403,17 @@ ...@@ -383,14 +403,17 @@
height: 50vh; height: 50vh;
} }
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
} }
.tip { .tip {
display: none; display: none;
} }
.title:hover { .title:hover {
.tip { .tip {
display: flex; display: flex;
...@@ -399,19 +422,22 @@ ...@@ -399,19 +422,22 @@
width: 40%; width: 40%;
} }
} }
.titleText { .titleText {
width: 12rem; width: 12rem;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.fs { .fs {
font-size: 18px; font-size: 18px;
margin-left: 10px; margin-left: 10px;
} }
.titleTop { .titleTop {
width: 12rem; width: 12rem;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
\ No newline at end of file
/* eslint-disable eqeqeq */ /* eslint-disable eqeqeq */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { import {
// Tree, // Tree,
Table, Table,
...@@ -164,6 +164,8 @@ const UserManage = () => { ...@@ -164,6 +164,8 @@ const UserManage = () => {
const [menuID, setMenuID] = useState(''); // 选中的树IDs const [menuID, setMenuID] = useState(''); // 选中的树IDs
const [keepId, setKeepId] = useState(''); const [keepId, setKeepId] = useState('');
const [flag, setFlag] = useState(1); // 刷新标志 const [flag, setFlag] = useState(1); // 刷新标志
const userContainer = useRef();
const flagRef = useRef(1);
const setRowClassName = record => const setRowClassName = record =>
record.userID === selectColor.userID ? styles.clickRowStyle : ''; record.userID === selectColor.userID ? styles.clickRowStyle : '';
// 用户表列名 // 用户表列名
...@@ -367,6 +369,28 @@ const UserManage = () => { ...@@ -367,6 +369,28 @@ const UserManage = () => {
setExpendKey(menuID); setExpendKey(menuID);
console.log(expendKey); console.log(expendKey);
}, [menuID]); }, [menuID]);
// 获取用户机构树
useEffect(() => {
window.addEventListener('resize', resizeListener);
updateTrees();
return () => {
window.removeEventListener('resize', resizeListener);
};
}, []);
// 更新获取初始范围
useEffect(() => {
getOrgArea().then(res => {
if (res.msg === 'Ok') {
console.log(res);
setOrgAreas(res.Results);
}
});
}, [saveExtentFlag]);
const resizeListener = () => {
flagRef.current += 1;
setFlag(flagRef.current);
};
// 模糊查询匹配的样式 // 模糊查询匹配的样式
const searchStyle = val => { const searchStyle = val => {
let n; let n;
...@@ -570,20 +594,6 @@ const UserManage = () => { ...@@ -570,20 +594,6 @@ const UserManage = () => {
}); });
}; };
// 获取用户机构树
useEffect(() => {
updateTrees();
}, []);
// 更新获取初始范围
useEffect(() => {
getOrgArea().then(res => {
if (res.msg === 'Ok') {
console.log(res);
setOrgAreas(res.Results);
}
});
}, [saveExtentFlag]);
// 点击树节点,获取当前机构下所有用户 // 点击树节点,获取当前机构下所有用户
const onSelect = (props, e) => { const onSelect = (props, e) => {
console.log(props); console.log(props);
...@@ -1242,13 +1252,13 @@ const UserManage = () => { ...@@ -1242,13 +1252,13 @@ const UserManage = () => {
}; };
// 更改机构范围 // 更改机构范围
const submitExtent = (extent, areaName, flag) => { const submitExtent = (extent, areaName, flags) => {
setTreeLoading(true); setTreeLoading(true);
console.log(extent); console.log(extent);
console.log(areaName); console.log(areaName);
console.log(flag); console.log(flags);
console.log(currentSelectOrg1); console.log(currentSelectOrg1);
if (flag === 0) { if (flags === 0) {
setTreeLoading(false); setTreeLoading(false);
notification.warn({ notification.warn({
message: '提交失败', message: '提交失败',
...@@ -1400,42 +1410,45 @@ const UserManage = () => { ...@@ -1400,42 +1410,45 @@ const UserManage = () => {
const kee = () => { const kee = () => {
setUserVisible(false); setUserVisible(false);
}; };
console.log(userContainer.current?.clientHeight, 'userContainer.current.clientHeight');
return ( return (
<PageContainer className={styles.userManageContainer}> <PageContainer className={styles.userManageContainer}>
<div className={styles.contentContainer}> <div className={styles.contentContainer}>
{/* 左侧机构树 */} {/* 左侧机构树 */}
<Spin spinning={treeLoading} tip="loading..."> <Spin spinning={treeLoading} tip="loading...">
<Card <Card
style={{ overflowY: 'hidden' }} style={{ overflowY: 'hidden', height: '100%' }}
className={classnames({ className={classnames({
[styles.orgContainer]: true, [styles.orgContainer]: true,
[styles.orgContainerHide]: !treeVisible, [styles.orgContainerHide]: !treeVisible,
})} })}
> >
<div> <div style={{ display: 'flex', flexDirection: 'column', height: '100%' }}>
<span <div style={{ display: 'flex' }}>
style={{ <span
fontSize: '15px ',
fontWeight: 'bold',
marginLeft: '15px',
}}
>
机构列表
</span>
<Tooltip title="添加顶级机构">
<PlusSquareFilled
onClick={() => addOrg()}
style={{ style={{
color: '#1890FF', fontSize: '15px ',
fontSize: '25px', fontWeight: 'bold',
verticalAlign: 'middle', marginLeft: '15px',
marginLeft: '64%',
}} }}
/> >
</Tooltip> 机构列表
</span>
<Tooltip title="添加顶级机构">
<PlusSquareFilled
onClick={() => addOrg()}
style={{
color: '#1890FF',
fontSize: '25px',
verticalAlign: 'middle',
marginLeft: '64%',
}}
/>
</Tooltip>
</div>
<hr style={{ width: '95%', color: '#eeecec', marginLeft: '15px' }} /> <hr style={{ width: '95%', color: '#eeecec', marginLeft: '15px' }} />
{treeData.length > 0 && ( {treeData.length > 0 && (
<div style={{ height: 'calc(100vh - 130px)', overflowY: 'scroll' }}> <div style={{ height: '100%', overflowY: 'scroll' }}>
<Tree <Tree
showIcon="true" showIcon="true"
blockNode blockNode
...@@ -1468,6 +1481,7 @@ const UserManage = () => { ...@@ -1468,6 +1481,7 @@ const UserManage = () => {
{/* 右侧用户表 */} {/* 右侧用户表 */}
<div <div
ref={userContainer}
className={classnames({ className={classnames({
[styles.userContainer]: true, [styles.userContainer]: true,
})} })}
...@@ -1500,45 +1514,36 @@ const UserManage = () => { ...@@ -1500,45 +1514,36 @@ const UserManage = () => {
</Dropdown> </Dropdown>
</span> </span>
</div> </div>
{/* <div {userContainer.current && (
className={classnames({ <Table
[styles.boxR]: true, // style={{ height: 'calc(100% -50px)' }}
[styles.boxH]: treeVisible, rowSelection={{
})} type: 'checkbox',
> ...rowSelection,
<div }}
className={classnames({ rowClassName={setRowClassName}
[styles.cardBoxR]: true, size="small"
[styles.boxH]: treeVisible, rowKey={record => record.userID}
})} locale={zhCN}
> */} bordered
<Table columns={columns}
// style={{ width: treeVisible ? '81%' : '100%' }} dataSource={tableData}
rowSelection={{ loading={tableLoading}
type: 'checkbox', scroll={{
...rowSelection, x: 'max-content',
}} y: `calc(${userContainer.current.clientHeight}px - 150px)`,
rowClassName={setRowClassName} }}
size="small" // scroll={{ x: 'max-content' }}
rowKey={record => record.userID} pagination={{
locale={zhCN} showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
bordered pageSizeOptions: [10, 20, 50, 100],
columns={columns} defaultPageSize: 20,
dataSource={tableData} showQuickJumper: true,
loading={tableLoading} showSizeChanger: true,
scroll={{ x: 'max-content', y: 'calc(100vh - 210px)' }} }}
// scroll={{ x: 'max-content' }} onChange={onChangeInput}
pagination={{ />
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`, )}
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: 20,
showQuickJumper: true,
showSizeChanger: true,
}}
onChange={onChangeInput}
/>
{/* </div>
</div> */}
</div> </div>
{/* Modal弹框 */} {/* Modal弹框 */}
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
background: rgba(74, 74, 75, 0.3); background: rgba(74, 74, 75, 0.3);
margin-bottom: 10px; margin-bottom: 10px;
} }
//滚动条的轨道(里面装有thumb)滚动槽 //滚动条的轨道(里面装有thumb)滚动槽
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
box-shadow: 0; box-shadow: 0;
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
.ant-tree-node-content-wrapper { .ant-tree-node-content-wrapper {
width: 100%; width: 100%;
// overflow: hidden !important; // overflow: hidden !important;
.ant-tree-title { .ant-tree-title {
overflow: hidden; overflow: hidden;
...@@ -31,50 +33,63 @@ ...@@ -31,50 +33,63 @@
justify-content: space-between; justify-content: space-between;
} }
} }
.ant-pagination-prev, .ant-pagination-prev,
.ant-pagination-next { .ant-pagination-next {
line-height: 8px !important; line-height: 8px !important;
} }
.ant-input-search-button { .ant-input-search-button {
line-height: 1; line-height: 1;
} }
.ant-dropdown-menu-item > .anticon:first-child {
.ant-dropdown-menu-item>.anticon:first-child {
vertical-align: 0.15em !important; vertical-align: 0.15em !important;
} }
.ant-table-tbody { .ant-table-tbody {
.ant-table-row:hover > td { .ant-table-row:hover>td {
background: #aed8fa !important; background: #aed8fa !important;
} }
} }
.ant-modal-close-icon { .ant-modal-close-icon {
vertical-align: 0.3em; vertical-align: 0.3em;
} }
.ant-notification-close-icon { .ant-notification-close-icon {
vertical-align: 0.2em; vertical-align: 0.2em;
} }
.ant-tree-switcher-icon svg { .ant-tree-switcher-icon svg {
font-size: 14px; font-size: 14px;
color: #767777 !important; color: #767777 !important;
} }
.ant-card-body { .ant-card-body {
padding: 12px 24px 24px 10px; padding: 12px 24px 24px 10px;
} }
} }
.redText { .redText {
color: red; color: red;
cursor: pointer; cursor: pointer;
} }
.ant-layout { .ant-layout {
overflow: auto; overflow: auto;
.ant-layout-content { .ant-layout-content {
margin: 12px !important; margin: 12px !important;
} }
} }
.ant-btn > .anticon + span,
.ant-btn > span + .anticon { .ant-btn>.anticon+span,
.ant-btn>span+.anticon {
margin-left: 8px; margin-left: 8px;
vertical-align: middle; vertical-align: middle;
} }
.siteTitle { .siteTitle {
font-size: 16px; font-size: 16px;
margin: 0 0 6px 0; margin: 0 0 6px 0;
...@@ -82,25 +97,33 @@ ...@@ -82,25 +97,33 @@
padding: 3px; padding: 3px;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
.userManageContainer { .userManageContainer {
height: 100%;
.ant-modal-footer { .ant-modal-footer {
border: none; border: none;
padding: 28px 40px; padding: 28px 40px;
height: 100%;
} }
.ant-form-item { .ant-form-item {
vertical-align: top; vertical-align: top;
} }
.ant-form-item-label > label {
.ant-form-item-label>label {
align-items: middle; align-items: middle;
} }
.ant-modal-body { .ant-modal-body {
padding-bottom: 0px; padding-bottom: 0px;
padding-right: 40px; padding-right: 40px;
padding-left: 40px; padding-left: 40px;
.ant-form { .ant-form {
width: 90%; width: 90%;
} }
} }
// .anticon svg { // .anticon svg {
// margin-top: -3px; // margin-top: -3px;
// } // }
...@@ -110,8 +133,10 @@ ...@@ -110,8 +133,10 @@
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-size: 14px; font-size: 14px;
} }
.ant-tree-treenode { .ant-tree-treenode {
width: 100% !important; width: 100% !important;
.ant-tree-node-content-wrapper { .ant-tree-node-content-wrapper {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
...@@ -119,33 +144,45 @@ ...@@ -119,33 +144,45 @@
.iconWraper1 { .iconWraper1 {
float: right; float: right;
span { span {
display: none; display: none;
} }
} }
} }
.ant-tree-treenode:hover { .ant-tree-treenode:hover {
.iconWraper1 > span { .iconWraper1>span {
margin-left: 12px; margin-left: 12px;
font-size: 18px; font-size: 18px;
display: inline-block; display: inline-block;
} }
} }
.ant-radio-group { .ant-radio-group {
margin: 0px !important; margin: 0px !important;
} }
.contentContainer { .contentContainer {
display: flex; display: flex;
width: 100%; width: 100%;
height: 100%;
position: relative; position: relative;
// .ant-table.ant-table-bordered > .ant-table-container { // .ant-table.ant-table-bordered > .ant-table-container {
// min-width: 81%; // min-width: 81%;
// } // }
.ant-tree-switcher_close .ant-tree-switcher-icon svg { .ant-tree-switcher_close .ant-tree-switcher-icon svg {
margin: auto; margin: auto;
} }
.ant-spin-container {
height: 100%;
}
.orgContainer { .orgContainer {
height: calc(100vh - 74px); // height: calc(100vh - 74px);
height: 100%;
width: 320px; width: 320px;
padding-right: 10px; padding-right: 10px;
left: 0; left: 0;
...@@ -156,17 +193,23 @@ ...@@ -156,17 +193,23 @@
transition-property: width; transition-property: width;
transition-duration: 0.5s; transition-duration: 0.5s;
white-space: nowrap; white-space: nowrap;
.ant-card-body {
height: 100%;
}
.ant-tree { .ant-tree {
padding-top: 6px; padding-top: 6px;
.ant-tree-switcher { .ant-tree-switcher {
line-height: 1; line-height: 1;
margin-right: 0px !important; margin-right: 0px !important;
color: #1890ff; color: #1890ff;
.ant-tree-switcher-line-icon { .ant-tree-switcher-line-icon {
margin-left: 5px; margin-left: 5px;
} }
} }
} }
.switcher { .switcher {
display: block; display: block;
position: absolute; position: absolute;
...@@ -183,27 +226,33 @@ ...@@ -183,27 +226,33 @@
// transform: translateX(-230px); // transform: translateX(-230px);
width: 26px; width: 26px;
} }
.ant-popover-message-title { .ant-popover-message-title {
padding-left: 20px; padding-left: 20px;
} }
.title1 { .title1 {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
} }
.tip1 { .tip1 {
display: none; display: none;
} }
.fs1 { .fs1 {
font-size: 18px; font-size: 18px;
margin-left: 10px; margin-left: 10px;
} }
.listHover { .listHover {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
width: 25%; width: 25%;
} }
.title1:hover { .title1:hover {
.tip1 { .tip1 {
display: flex; display: flex;
...@@ -212,23 +261,28 @@ ...@@ -212,23 +261,28 @@
width: 25%; width: 25%;
} }
} }
.titleText { .titleText {
width: 20rem; width: 20rem;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.userContainerHide { .userContainerHide {
width: 100%; width: 100%;
} }
.userContainer { .userContainer {
height: calc(100vh - 74px) !important; // height: calc(100vh - 74px) !important;
height: 100%;
z-index: 999; z-index: 999;
background: white; background: white;
min-width: 800px; min-width: 800px;
width: 100%; width: 100%;
position: relative; position: relative;
transition: width 0.5s; transition: width 0.5s;
.title { .title {
margin: 16px 0 10px 16px; margin: 16px 0 10px 16px;
display: inline-block; display: inline-block;
...@@ -238,6 +292,7 @@ ...@@ -238,6 +292,7 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.ant-table-pagination { .ant-table-pagination {
padding-right: 12px; padding-right: 12px;
background: white; background: white;
...@@ -245,61 +300,76 @@ ...@@ -245,61 +300,76 @@
padding: 8px; padding: 8px;
padding-right: 20px; padding-right: 20px;
} }
.ant-btn { .ant-btn {
margin: 0px 10px; margin: 0px 10px;
.ant-btn-primary { .ant-btn-primary {
background: #50aefc; background: #50aefc;
} }
} }
.ant-input-search-button { .ant-input-search-button {
margin-left: 0px !important; margin-left: 0px !important;
} }
.ant-table-thead tr th { .ant-table-thead tr th {
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
.ant-table-cell { .ant-table-cell {
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
// text-overflow:ellipsis; // text-overflow:ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.ant-table-body { .ant-table-body {
height: calc(100vh - 210px); // height: calc(100vh - 210px);
// height: 100%;
border-right: white; border-right: white;
overflow: auto !important; // overflow: auto !important;
} }
.clickRowStyle { .clickRowStyle {
background: #cfe7fd; background: #cfe7fd;
} }
.ant-pagination { .ant-pagination {
z-index: 999; z-index: 999;
border-top: 1px solid #f0eded; border-top: 1px solid #f0eded;
} }
} }
} }
.boxR { .boxR {
width: 100%; width: 100%;
position: relative; position: relative;
transition: width 2s; transition: width 2s;
} }
.cardBoxR { .cardBoxR {
min-width: 800px; min-width: 800px;
} }
.ant-modal-root { .ant-modal-root {
.ant-tree-switcher { .ant-tree-switcher {
line-height: 1; line-height: 1;
color: #1890ff; color: #1890ff;
} }
.ant-checkbox-group .ant-checkbox-group-item { .ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important; margin-right: 0px !important;
min-width: 200px !important; min-width: 200px !important;
} }
.ant-tree-list-holder { .ant-tree-list-holder {
overflow: auto; overflow: auto;
overflow-x: hidden; overflow-x: hidden;
height: 40vh; height: 40vh;
} }
.ant-tabs-content-holder { .ant-tabs-content-holder {
overflow: auto; overflow: auto;
height: 50vh; height: 50vh;
...@@ -310,19 +380,22 @@ ...@@ -310,19 +380,22 @@
.ant-modal-content { .ant-modal-content {
border-radius: 5px; border-radius: 5px;
} }
.ant-modal-header { .ant-modal-header {
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
padding: 28px 40px; padding: 28px 40px;
} }
.ant-modal-close { .ant-modal-close {
top: 14px; top: 14px;
right: 20px; right: 20px;
} }
.ant-modal-footer .ant-btn + .ant-btn:not(.ant-dropdown-trigger) { .ant-modal-footer .ant-btn+.ant-btn:not(.ant-dropdown-trigger) {
margin-bottom: 0; margin-bottom: 0;
margin-left: 15px; margin-left: 15px;
} }
// .ant-form-horizontal .ant-form-item-control { // .ant-form-horizontal .ant-form-item-control {
// margin-left: 10px; // margin-left: 10px;
// } // }
...@@ -331,14 +404,16 @@ ...@@ -331,14 +404,16 @@
border-radius: 10px; border-radius: 10px;
background-color: rgba(255, 255, 255, 0.788); background-color: rgba(255, 255, 255, 0.788);
} }
.ant-popover-inner-content { .ant-popover-inner-content {
padding: 10px 10px; padding: 10px 10px;
} }
.ant-popover-message > .anticon { .ant-popover-message>.anticon {
top: 7.0005px; top: 7.0005px;
} }
// .ant-tree { // .ant-tree {
// overflow-y: scroll; // overflow-y: scroll;
// height: calc(100vh - 150px); // height: calc(100vh - 150px);
// } // }
\ No newline at end of file
...@@ -97,24 +97,24 @@ export default { ...@@ -97,24 +97,24 @@ export default {
name: '数据库', name: '数据库',
icon: <DatabaseOutlined style={iconStyle} />, icon: <DatabaseOutlined style={iconStyle} />,
component: BlankLayout, component: BlankLayout,
authority: adminAuthority, authority: superAuthority,
routes: [ routes: [
{ {
path: '/dbm/dbInit', path: '/dbm/dbInit',
name: '数据库连接', name: '数据库连接',
authority: adminAuthority, authority: superAuthority,
component: InitDataBase, component: InitDataBase,
}, },
{ {
path: '/dbm/dbUpdate', path: '/dbm/dbUpdate',
name: '数据库升级', name: '数据库升级',
authority: adminAuthority, authority: superAuthority,
component: ManagementDataBase, component: ManagementDataBase,
}, },
{ {
path: '/dbm/dbSource', path: '/dbm/dbSource',
name: '多数据源', name: '多数据源',
authority: adminAuthority, authority: superAuthority,
component: DatabaseConnectConfig, component: DatabaseConnectConfig,
}, },
], ],
......
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