Commit 798fe789 authored by 张烨's avatar 张烨
parents d7064e43 f93fa131
......@@ -44,7 +44,7 @@ const ListCard = props => {
useEffect(() => {
setValueList(checkList);
}, [dataList, loading]);
}, [dataList, loading, checkList]);
const updateValueList = (checkedKeys, childrenKeys, sourceItem) => {
// eslint-disable-next-line no-console
......
......@@ -139,7 +139,7 @@ const MongDBTable = props => {
title: '类型',
dataIndex: 'type',
key: 'type',
width: 100,
// width: 200,
ellipsis: true,
},
{
......
......@@ -2,16 +2,18 @@ import React, { useState, useEffect } from 'react';
import { Card, Tabs } from 'antd';
import ProCard from '@ant-design/pro-card';
import PageContainer from '@/components/BasePageContainer';
import { miniAppSiteTree } from '@/services/mobileConfig/api';
import {
miniAppSiteTree,
getMiniAppModuleTree,
} from '@/services/mobileConfig/api';
import SiteConfig from './SiteConfig';
import MenuConfig from './menuconfig/MenuConfig';
const { TabPane } = Tabs;
const MobileConfigPage = props => {
const [activeKey, setActiveKey] = useState('0'); // tabs活动页
const [activeKey, setActiveKey] = useState('1'); // tabs活动页
const [miniTitle, setMiniTitle] = useState('');
const [flag, setFlag] = useState(1);
useEffect(() => {
console.log(33, '33');
miniAppSiteTree({
userMode: 'admin',
select: '',
......@@ -26,6 +28,13 @@ const MobileConfigPage = props => {
console.log(res);
});
}, [flag]);
useEffect(() => {
getMiniAppModuleTree({
userMode: 'super',
}).then(res => {
console.log(res);
});
}, []);
// 修改选中的tab
const handleChange = key => {
setActiveKey(key);
......
......@@ -143,7 +143,7 @@ const UserManage = () => {
dataIndex: 'loginName',
key: 'loginName',
fixed: 'left',
width: 100,
// width: 100,
render: item => (
<div
ref={r => {
......@@ -158,7 +158,7 @@ const UserManage = () => {
title: '用户姓名',
dataIndex: 'userName',
key: 'userName',
width: 100,
// width: 100,
render: item => (
<div
ref={r => {
......@@ -173,7 +173,7 @@ const UserManage = () => {
title: '所在机构',
dataIndex: 'OUName',
key: 'OUName',
width: 150,
width: 230,
filters: orgFilters,
onFilter: (value, record) => record.OUName === value,
},
......@@ -181,14 +181,14 @@ const UserManage = () => {
title: '手机号码',
dataIndex: 'phone',
key: 'phone',
width: 120,
width: 150,
ellipsis: true,
},
{
title: '钉钉账户',
dataIndex: 'ddid',
key: 'ddid',
width: 100,
width: 150,
render: record => {
if (record) {
return (
......@@ -206,7 +206,7 @@ const UserManage = () => {
title: '微信账户',
dataIndex: 'wxid',
key: 'wxid',
width: 100,
width: 140,
render: record => {
if (record) {
return (
......@@ -224,7 +224,7 @@ const UserManage = () => {
title: '操作',
key: 'action',
fixed: 'right',
width: 210,
width: 250,
align: 'center',
render: record => (
<Space size="middle">
......
......@@ -27,7 +27,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// display: block;
display: block;
}
}
.ant-pagination-prev,.ant-pagination-next{
......
......@@ -15,7 +15,8 @@ import PageContainer from '@/components/BasePageContainer';
import {
DoubleLeftOutlined,
DoubleRightOutlined,
UnorderedListOutlined,
TeamOutlined,
UserOutlined,
} from '@ant-design/icons';
import {
setMenuToRole,
......@@ -69,6 +70,7 @@ const SiteManage = () => {
if (id) {
setSaveTreeId(id);
setRoleID(id);
setValueList([...valueList]);
} else {
setRoleID(saveTreeId);
}
......@@ -197,18 +199,20 @@ const SiteManage = () => {
let arr3 = arr2.map(item => {
item.title = item.visibleTitle || '';
item.key = item.visibleValue || '';
item.icon = <TeamOutlined />;
if (item.roleList && item.roleList.length > 0) {
item.roleList.map((itemRole, index) => {
if (itemRole.roleList) {
itemRole.title = itemRole.visibleTitle || '';
itemRole.key = itemRole.visibleTitle + itemRole.visibleValue || '';
itemRole.groupflag = itemRole.visibleTitle;
itemRole.icon = mulu ? <UnorderedListOutlined /> : '';
itemRole.icon = <TeamOutlined />;
itemRole.roleList.map(i => {
i.title = i.roleName;
i.key = i.roleID;
i.subSystemValue = item.visibleValue;
i.group = itemRole.visibleTitle;
i.icon = <UserOutlined />;
if (roleID && roleID === i.roleID) {
setItemObj(i);
}
......@@ -219,6 +223,7 @@ const SiteManage = () => {
itemRole.title = itemRole.roleName;
itemRole.key = itemRole.roleID;
itemRole.subSystemValue = item.visibleValue;
itemRole.icon = <UserOutlined />;
if (roleID && roleID === itemRole.roleID) {
setItemObj(itemRole);
}
......@@ -271,12 +276,12 @@ const SiteManage = () => {
const handleHide = () => {
setMulu(!mulu);
};
const handleCommit = rusults => {
const handleCommit = results => {
setBtnLoading(true);
setMenuToRole(
qs.stringify({
roleID,
menuNameList: String(rusults.flat()),
menuNameList: String(results.flat()),
}),
{
headers: {
......@@ -287,6 +292,7 @@ const SiteManage = () => {
.then(res => {
setBtnLoading(false);
if (res.success) {
setValueList([...results.flat()]);
notification.success({
message: '提示',
duration: 3,
......@@ -308,7 +314,7 @@ const SiteManage = () => {
return (
<PageContainer>
<Row gutter={0}>
<Col span={mulu ? 5 : 0}>
<Col span={mulu ? 4 : 0}>
<Card className={styles.cardBox}>
<Spin
tip="loading...."
......@@ -320,7 +326,7 @@ const SiteManage = () => {
</div>
{treeData && treeData.length > 0 && (
<Tree
showLine={{ showLeafIcon: false }}
// showLine={{ showLeafIcon: false }}
showIcon
onSelect={handleTreeSelect}
autoExpandParent
......@@ -356,27 +362,27 @@ const SiteManage = () => {
confirmModal={groupModal}
/>
</Card>
<div>
{/* <div>
{mulu && (
<Tooltip title="隐藏角色栏" className={styles.hide}>
<DoubleLeftOutlined onClick={() => handleHide()} />
</Tooltip>
)}
</div>
</div> */}
</Col>
<Col span={mulu ? 0 : 1}>
{/* {mulu && (
{/* <Col span={mulu ? 0 : 1}>
{mulu && (
<Tooltip title="隐藏角色栏" className={styles.hide}>
<DoubleLeftOutlined onClick={() => handleHide()} />
</Tooltip>
)} */}
)}
{!mulu && (
<Tooltip title="显示角色栏" className={styles.hide}>
<DoubleRightOutlined onClick={() => handleHide()} />
</Tooltip>
)}
</Col>
<Col span={mulu ? 19 : 23}>
</Col> */}
<Col span={mulu ? 20 : 23}>
<Card style={{ marginBottom: '10px', minWidth: '870px' }}>
<Row align="middle">
<Col span={1}>搜索</Col>
......
.cardBox{
min-height: calc(100vh - 80px);
max-height: calc(100vh - 80px);
min-height: calc(100vh - 74px);
max-height: calc(100vh - 74px);
overflow-y: scroll;
margin-right: 20px;
.ant-tree-node-content-wrapper{
display: flex;
align-items: center;
.ant-tree-iconEle{
display: flex;
align-items: center;
}
}
}
.ant-tree-node-content-wrapper-open{
display: flex;
......@@ -28,8 +36,8 @@
}
.cardBoxR{
min-width: 870px;
min-height: calc(100vh - 172px);
max-height: calc(100vh - 172px);
min-height: calc(100vh - 158px);
max-height: calc(100vh - 158px);
overflow-y: scroll;
}
:global{
......@@ -58,3 +66,6 @@
vertical-align: 0.125em;
color:#1890FF;
}
.ant-card-body {
padding: 20px 10px;
}
......@@ -237,7 +237,7 @@ const SiteManage = () => {
return (
<PageContainer>
<Row>
<Col span={mulu ? 5 : 0}>
<Col span={mulu ? 4 : 0}>
<Card
className={classnames({
[styles.cardBox]: true,
......@@ -271,33 +271,32 @@ const SiteManage = () => {
confirmModal={editModal}
/>
</Card>
<div>
{/* <div>
{mulu && (
<Tooltip title="隐藏站点" className={styles.hide}>
<DoubleLeftOutlined onClick={() => handleHide()} />
</Tooltip>
)}
{/* {!mulu && (
{!mulu && (
<Tooltip title="显示站点" className={styles.hide}>
<DoubleRightOutlined onClick={() => handleHide()} />
</Tooltip>
)} */}
</div>
)}
</div> */}
</Col>
<Col span={mulu ? 0 : 1}>
{/* {mulu && (
{/* <Col span={mulu ? 0 : 1}>
{mulu && (
<Tooltip title="隐藏站点" className={styles.hide}>
<DoubleLeftOutlined onClick={() => handleHide()} />
</Tooltip>
)} */}
)}
{!mulu && (
<Tooltip title="显示站点" className={styles.hide}>
<DoubleRightOutlined onClick={() => handleHide()} />
</Tooltip>
)}
</Col>
<Col span={mulu ? 19 : 23}>
</Col> */}
<Col span={mulu ? 20 : 23}>
<Card style={{ marginBottom: '10px', minWidth: '600px' }}>
<Row align="middle">
<Col span={1}>搜索</Col>
......
.cardBox{
min-height: calc(100vh - 80px);
max-height: calc(100vh - 80px);
min-height: calc(100vh - 74px);
max-height: calc(100vh - 74px);
overflow: auto;
margin-right: 20px;
margin-right: 10px;
}
.siteTitle{
font-size: 16px;
......@@ -12,8 +12,8 @@
border-bottom: 1px solid #ccc;
}
.cardBoxR{
min-height: calc(100vh - 172px);
max-height: calc(100vh - 172px);
min-height: calc(100vh - 158px);
max-height: calc(100vh - 158px);
min-width: 600px;
overflow-y: scroll;
}
......
import { get, post } from '@/services/index';
import { get, post, PUBLISH_SERVICE } from '@/services/index';
import qs from 'qs';
/**
......@@ -40,4 +40,9 @@ export const editWebsite = (params, options) => {
/**
* @获取菜单配置
* {
* userMode:''
* } 必填 super 或 admin 或common
*/
export const getMiniAppModuleTree = params =>
get(`${PUBLISH_SERVICE}/PlatformCenter/MiniAppModuleTree`, 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