Commit 6c535f73 authored by 皮倩雯's avatar 皮倩雯

fix: '集成登录界面交互优化'

parent 83c120ad
Pipeline #54862 waiting for manual action with stages
...@@ -90,9 +90,10 @@ ...@@ -90,9 +90,10 @@
"@babel/preset-typescript": "^7.12.1", "@babel/preset-typescript": "^7.12.1",
"@babel/runtime": "^7.10.5", "@babel/runtime": "^7.10.5",
"@esri/calcite-colors": "6.0.3", "@esri/calcite-colors": "6.0.3",
"@react-pdf/renderer": "^2.3.0",
"@wisdom-cesium/cesium": "^1.0.78", "@wisdom-cesium/cesium": "^1.0.78",
"@wisdom-map/amap": "1.1.0-beta.34", "@wisdom-map/amap": "1.1.0-beta.34",
"@wisdom-map/arcgismap": "1.4.0-13", "@wisdom-map/arcgismap": "1.4.0-6",
"@wisdom-map/basemap": "1.1.0-2", "@wisdom-map/basemap": "1.1.0-2",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
"antd-img-crop": "^3.13.2", "antd-img-crop": "^3.13.2",
...@@ -120,6 +121,7 @@ ...@@ -120,6 +121,7 @@
"rc-tween-one": "^3.0.6", "rc-tween-one": "^3.0.6",
"react": "16.14.0", "react": "16.14.0",
"react-ace": "^9.2.0", "react-ace": "^9.2.0",
"react-color": "^2.19.3",
"react-copy-to-clipboard": "^5.0.4", "react-copy-to-clipboard": "^5.0.4",
"react-dnd": "latest", "react-dnd": "latest",
"react-dnd-html5-backend": "latest", "react-dnd-html5-backend": "latest",
...@@ -130,6 +132,7 @@ ...@@ -130,6 +132,7 @@
"react-intl": "2.8.0", "react-intl": "2.8.0",
"react-json-view": "^1.21.3", "react-json-view": "^1.21.3",
"react-loader": "^2.4.7", "react-loader": "^2.4.7",
"react-pdf": "^5.7.2",
"react-redux": "7.0.2", "react-redux": "7.0.2",
"react-resizable": "^1.11.0", "react-resizable": "^1.11.0",
"react-router-dom": "5.1.0", "react-router-dom": "5.1.0",
...@@ -141,7 +144,6 @@ ...@@ -141,7 +144,6 @@
"sortablejs": "^1.13.0", "sortablejs": "^1.13.0",
"styled-components": "4.2.0", "styled-components": "4.2.0",
"use-merge-value": "^1.0.2", "use-merge-value": "^1.0.2",
"react-color": "^2.19.3",
"voca": "^1.4.0" "voca": "^1.4.0"
}, },
"devDependencies": { "devDependencies": {
......
This diff was suppressed by a .gitattributes entry.
...@@ -15,12 +15,20 @@ import { ...@@ -15,12 +15,20 @@ import {
Image, Image,
} from 'antd'; } from 'antd';
import { GetIntegratedLogin, DelIntegratedLogin } from '@/services/integratedLogin/api'; import { GetIntegratedLogin, DelIntegratedLogin } from '@/services/integratedLogin/api';
import { EditTwoTone, DeleteOutlined, PlusOutlined, SyncOutlined } from '@ant-design/icons'; import {
EditTwoTone,
DeleteOutlined,
PlusOutlined,
SyncOutlined,
FilePdfOutlined,
} from '@ant-design/icons';
import styles from './integrate.less'; import styles from './integrate.less';
import AddModal from './AddModal'; import AddModal from './AddModal';
import Master from './Master'; import Master from './Master';
// import Pdf from './Pdf'; // import Pdf from './Pdf';
const path = require('path');
const Integrate = () => { const Integrate = () => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
...@@ -66,58 +74,64 @@ const Integrate = () => { ...@@ -66,58 +74,64 @@ const Integrate = () => {
</span> </span>
), ),
}, },
{
title: '标识',
dataIndex: 'SystemClient',
key: 'SystemClient',
align: 'center',
ellipsis: true,
render: (text, record) => (
<span>
<Tooltip placement="top" title={text}>
{searchStyle(text)}
</Tooltip>
</span>
),
},
// { // {
// title: '内网地址', // title: '标识',
// dataIndex: 'IntranetAddress', // dataIndex: 'SystemClient',
// key: 'IntranetAddress', // key: 'SystemClient',
// align: 'center', // align: 'center',
// width: 400,
// ellipsis: true, // ellipsis: true,
// render: (text, record) => ( // render: (text, record) => (
// <span> // <span>
// <Tooltip placement="top" title={text}> // <Tooltip placement="top" title={text}>
// {text} // {searchStyle(text)}
// </Tooltip> // </Tooltip>
// </span> // </span>
// ), // ),
// }, // },
{
title: '内网地址',
dataIndex: 'IntranetAddress',
key: 'IntranetAddress',
align: 'center',
// width: 400,
// ellipsis: true,
render: record => {
if (record) {
return (
<Tooltip title={record}>
<span style={{ color: '#50aefc', cursor: 'pointer' }}>已配置</span>
</Tooltip>
);
}
return <span>未配置</span>;
},
},
{ {
title: '外网地址', title: '外网地址',
dataIndex: 'InternetAddress', dataIndex: 'InternetAddress',
key: 'InternetAddress', key: 'InternetAddress',
ellipsis: true, // ellipsis: true,
align: 'center', align: 'center',
maxWidth: 600, // maxWidth: 600,
onCell: () => ({ // onCell: () => ({
style: { // style: {
maxWidth: 600, // maxWidth: 600,
overflow: 'hidden', // overflow: 'hidden',
whiteSpace: 'nowrap', // whiteSpace: 'nowrap',
textOverflow: 'ellipsis', // textOverflow: 'ellipsis',
cursor: 'pointer', // cursor: 'pointer',
}, // },
}), // }),
render: (text, record) => ( render: record => {
<span> if (record) {
<Tooltip placement="top" title={text}> return (
{text} <Tooltip title={record}>
</Tooltip> <span style={{ color: '#50aefc', cursor: 'pointer' }}>已配置</span>
</span> </Tooltip>
), );
}
return <span>未配置</span>;
},
}, },
{ {
title: '图标', title: '图标',
...@@ -135,13 +149,13 @@ const Integrate = () => { ...@@ -135,13 +149,13 @@ const Integrate = () => {
} }
}, },
}, },
{ // {
title: '参数', // title: '参数',
dataIndex: 'AccountParam', // dataIndex: 'AccountParam',
key: 'AccountParam', // key: 'AccountParam',
align: 'center', // align: 'center',
width: 200, // width: 200,
}, // },
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
...@@ -215,7 +229,7 @@ const Integrate = () => { ...@@ -215,7 +229,7 @@ const Integrate = () => {
setPickItem(e); setPickItem(e);
setLoading(true); setLoading(true);
DelIntegratedLogin({ DelIntegratedLogin({
client: e.SystemClient, client: e.SystemName,
}).then(res => { }).then(res => {
console.log('11111111111ss'); console.log('11111111111ss');
if (res.code === 0) { if (res.code === 0) {
...@@ -276,6 +290,7 @@ const Integrate = () => { ...@@ -276,6 +290,7 @@ const Integrate = () => {
}; };
const masterStation = () => { const masterStation = () => {
setType('');
setMasterVisible(true); setMasterVisible(true);
}; };
...@@ -290,7 +305,7 @@ const Integrate = () => { ...@@ -290,7 +305,7 @@ const Integrate = () => {
<span>快速搜索:</span> <span>快速搜索:</span>
<Search <Search
style={{ width: 260 }} style={{ width: 260 }}
placeholder="请输入名称,标识" placeholder="请输入名称"
onSearch={submitSearch} onSearch={submitSearch}
onChange={e => handleSearch(e)} onChange={e => handleSearch(e)}
enterButton enterButton
...@@ -304,12 +319,13 @@ const Integrate = () => { ...@@ -304,12 +319,13 @@ const Integrate = () => {
onClick={add} onClick={add}
style={{ style={{
verticalAlign: 'middle', verticalAlign: 'middle',
marginLeft: '40px', marginLeft: '20px',
}} }}
> >
新增 网站
</Button> </Button>
</div> </div>
{/* <Button {/* <Button
onClick={openPdf} onClick={openPdf}
style={{ style={{
...@@ -319,16 +335,21 @@ const Integrate = () => { ...@@ -319,16 +335,21 @@ const Integrate = () => {
> >
查看说明文档 查看说明文档
</Button> */} </Button> */}
<Button <div>
type="primary" <Tooltip title="点击查看说明文档">
onClick={masterStation} <a
style={{ style={{ display: 'inline-block', marginTop: '5px', marginRight: '20px' }}
float: 'right', target="_blank"
verticalAlign: 'middle', href={path.join(__dirname, '/civmanage/熊猫智慧水务第三方系统接入说明文档.pdf')}
}} rel="noopener noreferer"
> >
集成登录网站配置 <FilePdfOutlined style={{ fontSize: '24px' }} />
</Button> </a>
</Tooltip>
<Button type="primary" onClick={masterStation}>
配置集成网站
</Button>
</div>
</div> </div>
<Spin spinning={loading} tip="loading"> <Spin spinning={loading} tip="loading">
<div className={styles.table}> <div className={styles.table}>
...@@ -356,7 +377,7 @@ const Integrate = () => { ...@@ -356,7 +377,7 @@ const Integrate = () => {
type={type} type={type}
callBackSubmit={onSubmit} callBackSubmit={onSubmit}
/> />
<Master visible={masterVisible} onCancel={() => setMasterVisible(false)} /> <Master visible={masterVisible} onCancel={() => setMasterVisible(false)} type={type} />
{/* <Pdf visible={pdfVisible} onCancel={() => setPdfVisible(false)} /> */} {/* <Pdf visible={pdfVisible} onCancel={() => setPdfVisible(false)} /> */}
</div> </div>
); );
......
...@@ -22,15 +22,10 @@ const colorList = [ ...@@ -22,15 +22,10 @@ const colorList = [
color: '#00B496', color: '#00B496',
headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)', headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)',
}, },
// {
// key: '清澈蓝',
// color: '#1890FF',
// headerColor: '#1890FF',
// },
]; ];
const Master = props => { const Master = props => {
const { callBackSubmit = () => {}, visible, onCancel } = props; const { callBackSubmit = () => {}, visible, onCancel, type } = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [form] = Form.useForm(); const [form] = Form.useForm();
const [imgBed, setImgBed] = useState(); const [imgBed, setImgBed] = useState();
...@@ -49,7 +44,7 @@ const Master = props => { ...@@ -49,7 +44,7 @@ const Master = props => {
setIm(res.data.logo); setIm(res.data.logo);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
primaryColor: '#0087F7', primaryColor: '#1890FF',
}); });
} }
}); });
...@@ -169,7 +164,7 @@ const Master = props => { ...@@ -169,7 +164,7 @@ const Master = props => {
return ( return (
<Modal <Modal
title="集成登录网站配置" title="配置集成网站"
style={{ top: '150px' }} style={{ top: '150px' }}
width="700px" width="700px"
destroyOnClose destroyOnClose
...@@ -279,6 +274,7 @@ const Master = props => { ...@@ -279,6 +274,7 @@ const Master = props => {
imageUrl={im} imageUrl={im}
keepImgeUrl={keepImgeUrl} keepImgeUrl={keepImgeUrl}
callBackSubmit={onOk} callBackSubmit={onOk}
type={type}
/> />
</Modal> </Modal>
); );
......
...@@ -12,13 +12,14 @@ const { Panel } = Collapse; ...@@ -12,13 +12,14 @@ const { Panel } = Collapse;
import { isDev } from '@/utils/tools'; import { isDev } from '@/utils/tools';
const PreviewModal = props => { const PreviewModal = props => {
const { callBackSubmit = () => {}, visible, onCancel, imageUrl, keepImgeUrl } = props; const { callBackSubmit = () => {}, visible, onCancel, imageUrl, keepImgeUrl, type } = props;
const [imgData, setImgData] = useState([]); const [imgData, setImgData] = useState([]);
const [pickItem, setPickItem] = useState(''); const [pickItem, setPickItem] = useState('');
const [keepItem, setKeepItem] = useState(''); const [keepItem, setKeepItem] = useState('');
const [keepGroupName, setKeepGroupName] = useState([]); const [keepGroupName, setKeepGroupName] = useState([]);
useEffect(() => { useEffect(() => {
console.log(type);
console.log(process.env, 'process.env.PROXY'); console.log(process.env, 'process.env.PROXY');
setPickItem(''); setPickItem('');
setKeepItem(''); setKeepItem('');
...@@ -36,7 +37,11 @@ const PreviewModal = props => { ...@@ -36,7 +37,11 @@ const PreviewModal = props => {
let bb = []; let bb = [];
let aa = []; let aa = [];
res.data.map((i, a) => { res.data.map((i, a) => {
if (i.files.length > 0) { if (i.files.length > 0 && type !== '' && i.groupName !== '网站图标') {
bb.push(i);
aa.push(i.groupName);
}
if (i.files.length > 0 && type === '' && i.groupName !== '图标') {
bb.push(i); bb.push(i);
aa.push(i.groupName); aa.push(i.groupName);
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
display: inline-block; display: inline-block;
margin-left: 30px; margin-left: 30px;
margin-bottom: 30px; margin-bottom: 30px;
// width: 80px;
} }
.imgItem { .imgItem {
border: 3px solid rgb(24, 144, 255); border: 3px solid rgb(24, 144, 255);
...@@ -37,8 +38,10 @@ ...@@ -37,8 +38,10 @@
} }
.iconItem { .iconItem {
// position: absolute; // position: relative;
// margin-left: 70px; // left: 70px;
// top: 10px;
// font-size: 17px;
margin-top: -3px; margin-top: -3px;
font-size: 17px; font-size: 17px;
float: right; float: right;
...@@ -48,6 +51,10 @@ ...@@ -48,6 +51,10 @@
display: none; display: none;
} }
.iconHidden:hover { .iconHidden:hover {
// position: relative;
// left: 70px;
// top: 10px;
// font-size: 17px;
margin-top: -3px; margin-top: -3px;
font-size: 17px; font-size: 17px;
float: right; float: right;
......
...@@ -161,6 +161,7 @@ const AddUserModal = props => { ...@@ -161,6 +161,7 @@ const AddUserModal = props => {
name="phone" name="phone"
label="手机号码" label="手机号码"
rules={[ rules={[
{ required: true },
{ {
pattern: new RegExp(/^1[0-9]{10}$/), pattern: new RegExp(/^1[0-9]{10}$/),
message: '手机号码以1开头11位', message: '手机号码以1开头11位',
......
...@@ -156,6 +156,7 @@ const EditUserModal = props => { ...@@ -156,6 +156,7 @@ const EditUserModal = props => {
name="phone" name="phone"
label="手机号码" label="手机号码"
rules={[ rules={[
{ required: true },
{ {
pattern: new RegExp(/^1[0-9]{10}$/), pattern: new RegExp(/^1[0-9]{10}$/),
message: '手机号码以1开头11位', message: '手机号码以1开头11位',
......
...@@ -161,11 +161,14 @@ const UserManage = () => { ...@@ -161,11 +161,14 @@ const UserManage = () => {
const [keepTree, setKeepTree] = useState([]); // 保存所有一级id用于控制只展开一项一级菜单 const [keepTree, setKeepTree] = useState([]); // 保存所有一级id用于控制只展开一项一级菜单
const [expendKey, setExpendKey] = useState(''); // 保存默认展开项 const [expendKey, setExpendKey] = useState(''); // 保存默认展开项
const [expendKeyOrg, setExpendKeyOrg] = useState(''); // 保存默认展开项
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 userContainer = useRef();
const flagRef = useRef(1); const flagRef = useRef(1);
const [searchWordOrg, setSearchWordOrg] = useState('');
const setRowClassName = record => const setRowClassName = record =>
record.userID === selectColor.userID ? styles.clickRowStyle : ''; record.userID === selectColor.userID ? styles.clickRowStyle : '';
// 用户表列名 // 用户表列名
...@@ -387,6 +390,24 @@ const UserManage = () => { ...@@ -387,6 +390,24 @@ const UserManage = () => {
} }
}); });
}, [saveExtentFlag]); }, [saveExtentFlag]);
useEffect(() => {
if (!changeOrgVisible) {
setExpendKeyOrg('');
setSearchWordOrg('');
GetOUTreeNew({ keyword: '' })
.then(newres => {
if (newres.code === 0) {
let res = newres.data;
setTreeDataCopy(res);
}
})
.catch(err => {
setTreeLoading(false);
message.error(err);
});
}
}, [changeOrgVisible]);
const resizeListener = () => { const resizeListener = () => {
flagRef.current += 1; flagRef.current += 1;
setFlag(flagRef.current); setFlag(flagRef.current);
...@@ -408,6 +429,41 @@ const UserManage = () => { ...@@ -408,6 +429,41 @@ const UserManage = () => {
const handleSearch = e => { const handleSearch = e => {
setSearchWord(e.target.value); setSearchWord(e.target.value);
}; };
// 获取搜索框的值
const handleSearchOrg = e => {
setSearchWordOrg(e.target.value);
};
const submitSearch = () => {
GetOUTreeNew({ keyword: searchWordOrg })
.then(newres => {
if (newres.code === 0) {
let res = newres.data;
setTreeDataCopy(res);
console.log(res);
let aa = [];
res.map(i => {
if (i.children.length > 0) {
aa.push(i.id);
}
console.log(i.id);
aa = i.id;
});
setExpendKeyOrg(aa.toString());
} else {
notification.error({
message: '获取失败',
// eslint-disable-next-line no-undef
description: res.message,
});
}
})
.catch(err => {
setTreeLoading(false);
message.error(err);
});
};
// 复选框 // 复选框
const rowSelection = { const rowSelection = {
selectedRowKeys, selectedRowKeys,
...@@ -477,7 +533,7 @@ const UserManage = () => { ...@@ -477,7 +533,7 @@ const UserManage = () => {
setOrgID(org); setOrgID(org);
setOrgTitle1(org.text); setOrgTitle1(org.text);
getDescription(org.id); getDescription(org.id);
getMapSetByGroupID(org.id); // getMapSetByGroupID(org.id);
setCurrentSelectOrg1(org.id); setCurrentSelectOrg1(org.id);
setId(org.text); setId(org.text);
console.log(org); console.log(org);
...@@ -1413,7 +1469,7 @@ const UserManage = () => { ...@@ -1413,7 +1469,7 @@ 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}>
...@@ -1619,7 +1675,16 @@ const UserManage = () => { ...@@ -1619,7 +1675,16 @@ const UserManage = () => {
cancelText="取消" cancelText="取消"
width="500px" width="500px"
> >
<span>请选择要更改的目标机构:</span> {/* <span>请选择要更改的目标机构:</span> */}
<Search
style={{ width: 260, marginBottom: '10px' }}
placeholder="请输入机构名称"
onSearch={submitSearch}
onChange={e => handleSearchOrg(e)}
enterButton
value={searchWordOrg}
/>
{changeOrgVisible && treeDataCopy.length > 0 && ( {changeOrgVisible && treeDataCopy.length > 0 && (
<Tree <Tree
showIcon="true" showIcon="true"
...@@ -1632,6 +1697,7 @@ const UserManage = () => { ...@@ -1632,6 +1697,7 @@ const UserManage = () => {
// 切换后选中的节点 // 切换后选中的节点
setCurrentSelectOldOrg(value[0]); setCurrentSelectOldOrg(value[0]);
}} }}
expandedKeys={expendKeyOrg}
treeData={treeDataCopy.map(t => mapTree1(t))} treeData={treeDataCopy.map(t => mapTree1(t))}
/> />
)} )}
...@@ -1687,7 +1753,7 @@ const UserManage = () => { ...@@ -1687,7 +1753,7 @@ const UserManage = () => {
> >
<p>将删除多个用户, 是否确认删除?</p> <p>将删除多个用户, 是否确认删除?</p>
</Modal> </Modal>
<MapScopeEditModal {/* <MapScopeEditModal
title={id} title={id}
mapId={createGuid()} mapId={createGuid()}
visible={editOrgExtentVisible} visible={editOrgExtentVisible}
...@@ -1696,7 +1762,7 @@ const UserManage = () => { ...@@ -1696,7 +1762,7 @@ const UserManage = () => {
confirmModal={submitExtent} confirmModal={submitExtent}
distinct={currentOrgDistinct} distinct={currentOrgDistinct}
extent={currentOrgArea} extent={currentOrgArea}
/> /> */}
{/* <AuthModal {/* <AuthModal
visible={authUserVisible} visible={authUserVisible}
currentUser={currentUser} currentUser={currentUser}
......
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