Commit 146f216e authored by mayongxin's avatar mayongxin

perf:新增角色关联用户

parent c1f93cf8
Pipeline #25602 passed with stages
in 23 minutes 4 seconds
......@@ -41,6 +41,7 @@ import EditModal from './EditModal';
import EditGroup from './EditGroup';
import userStyles from '@/pages/userCenter/userManage/UserManage.less';
import iconStyles from '@/assets/font/omsfont/iconfont.css';
import UserModal from './UserModal'
const { Search } = Input;
const placeholder = '请输入功能名称';
......@@ -60,6 +61,7 @@ const SiteManage = () => {
const [currentSelectId, setCurrentSelectId] = useState([]); // 选中的树节点
const [saveCurId, setSaveCurId] = useState([]); // 树节点ID
const [groupVisible, setGroupVisible] = useState(false); // 分组编辑弹窗
const [userVisible, setUserVisible] = useState(false); // 用户关联弹窗
const [hasData, setHasData] = useState(false);
const [valueList, setValueList] = useState([]);
const [dataList, setdataList] = useState([]);
......@@ -289,6 +291,12 @@ const SiteManage = () => {
setItemObj('');
handleTreeSelect(saveCurId);
};
const userModal = () => {
setUserVisible(false);
setFlag(flag + 1);
setItemObj('');
handleTreeSelect(saveCurId);
}
const valueCallback = valueObj => {
setSubList(valueObj);
};
......@@ -330,6 +338,9 @@ const SiteManage = () => {
console.log(err);
});
};
const handleUserAttach = () => {
setUserVisible(true)
}
return (
<PageContainer>
<div
......@@ -389,6 +400,12 @@ const SiteManage = () => {
onCancel={() => setGroupVisible(false)}
confirmModal={groupModal}
/>
<UserModal
visible={userVisible}
itemObj={itemObj}
onCancel={() => setUserVisible(false)}
confirmModal={userModal}
/>
<div>
{mulu && (
<Tooltip title="隐藏角色栏" className={styles.hide}>
......@@ -465,6 +482,16 @@ const SiteManage = () => {
>
删除角色
</Button>
<Button
type="primary"
danger
onClick={() => {
handleUserAttach();
}}
disabled={!itemObj.roleID}
>
关联用户
</Button>
</Space>
</Col>
</Row>
......
This diff is collapsed.
.cardBoxR {
min-height: calc(100vh - 210px);
max-height: calc(100vh - 210px);
min-width: 600px;
overflow-y: scroll;
}
.siteList {
width: 199px;
// margin:0 0 15px 0;
padding: 0 0 15px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.siteline {
border-top: 1px solid #eee;
padding-top: 15px;
margin-top: 20px;
}
.siteSelectList {
border: 1px solid #f5f5f5;
height: 200px;
overflow: auto;
margin-bottom: 50px;
.siteSelectUl {
margin: 0;
padding: 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
li {
width: 200px;
height: 35px;
line-height: 35px;
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat 175px;
background-size: 20px;
margin: 0 10px 10px 0;
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 20px 0 10px;
}
}
}
.siteCheckbox .ant-collapse-content>.ant-collapse-content-box {
padding: 16px 16px 0;
}
.siteList {
width: 199px;
// margin:0 0 15px 0;
padding: 0 0 15px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.sitePanel {
margin: 0 0 10px 0;
}
.sitePanelHead {
background-color: #f5f5f5;
padding: 8px 10px;
cursor: pointer;
display: flex;
flex-direction: row;
}
.sitePanelHead p {
margin: 0;
}
.sitePanel .ant-checkbox-wrapper+.ant-checkbox-wrapper {
margin: 0
}
.siteIcon {
color: #ccc;
margin: 4px 10px 0 0;
}
.siteAll {
margin: 0 0 10px 0;
}
\ No newline at end of file
......@@ -247,92 +247,107 @@
}
.siteCheckbox .ant-collapse-content > .ant-collapse-content-box{
padding: 16px 16px 0;
}
.siteList{
width:199px;
// margin:0 0 15px 0;
padding:0 0 15px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.sitePanel{
margin: 0 0 10px 0;
}
.sitePanelHead{
background-color: #f5f5f5;
padding:8px 10px;
cursor: pointer;
display: flex;
flex-direction: row;
}
.sitePanelHead p{
.siteCheckbox .ant-collapse-content>.ant-collapse-content-box {
padding: 16px 16px 0;
}
.siteList {
width: 199px;
// margin:0 0 15px 0;
padding: 0 0 15px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.sitePanel {
margin: 0 0 10px 0;
}
.sitePanelHead {
background-color: #f5f5f5;
padding: 8px 10px;
cursor: pointer;
display: flex;
flex-direction: row;
}
.sitePanelHead p {
margin: 0;
}
.sitePanelCon {
border: 1px solid #f5f5f5;
padding: 20px;
padding-bottom: 0;
border-top: 0;
max-height: 200px;
overflow: auto;
}
.sitePanel .ant-checkbox-wrapper+.ant-checkbox-wrapper {
margin: 0
}
.siteIcon {
color: #ccc;
margin: 4px 10px 0 0;
}
.siteAll {
margin: 0 0 10px 0;
}
.siteColor {
color: #f00
}
.siteCommit {
margin: 10px 0;
}
.siteSelectList {
border: 1px solid #f5f5f5;
height: 200px;
overflow: auto;
margin-bottom: 50px;
.siteSelectUl {
margin: 0;
}
.sitePanelCon{
border:1px solid #f5f5f5;
padding:20px;
padding-bottom: 0;
border-top:0;
max-height: 200px;
overflow: auto;
}
.sitePanel .ant-checkbox-wrapper + .ant-checkbox-wrapper{
margin:0
}
.siteIcon{
color:#ccc;
margin:4px 10px 0 0;
}
.siteAll{
margin:0 0 10px 0;
}
.siteColor{
color:#f00
}
.siteCommit{
margin: 10px 0;
}
.siteSelectList{
border:1px solid #f5f5f5;
height: 200px;
overflow: auto;
margin-bottom: 50px;
.siteSelectUl{
margin: 0;
padding: 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
li{
width:200px;
height: 35px;
line-height: 35px;
background: rgba(24, 144, 255,0.16) url('../../../assets/images/icons/close.png') no-repeat 175px;
background-size: 20px;
margin: 0 10px 10px 0;
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 20px 0 10px;
}
}
}
.siteline{
border-top: 1px solid #eee;
padding-top: 15px;
margin-top: 20px;
}
.siteBtn{
width:98%;
padding: 15px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
li {
width: 200px;
height: 35px;
line-height: 35px;
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat 175px;
background-size: 20px;
margin: 0 10px 10px 0;
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 20px 0 10px;
}
}
}
.siteline {
border-top: 1px solid #eee;
padding-top: 15px;
margin-top: 20px;
}
.siteBtn {
width: 98%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.ant-modal-root {
.ant-tree-switcher {
......@@ -355,4 +370,4 @@
overflow: auto;
height: 50vh;
}
}
}
\ No newline at end of file
......@@ -8,4 +8,4 @@ export const getSysConfigurate = params =>
`/CityInterface/rest/services/Common.svc/Tool/GetSysConfigurate?dicName=网关启停`,
);
export const gateWayConfig = params =>
get(`/Publish/OMS/GateWayConfig`, params);
get(`${PUBLISH_SERVICE}/GateWayConfig`, params);
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