Commit 97f01955 authored by 邓超's avatar 邓超

Merge branch 'master' of https://g.civnet.cn:8443/ReactWeb5/maintenance

# Conflicts: # src/pages/userCenter/userManage/AddUserModal.jsx
parents 26e56baa a355b655
Pipeline #45358 passed with stages
in 7 minutes 36 seconds
import React, { useEffect, useState, useRef } from 'react';
import SiteModal from '@/components/Modal/SiteModa';
import { Input, Cascader, Button } from 'antd';
import {
gcj_decrypt,
exetent2AmapPoint,
lngLat2WebMercator,
} from '@/utils/transformUtil';
import { gcj_decrypt, exetent2AmapPoint, lngLat2WebMercator } from '@/utils/transformUtil';
import { GetAllConfig, GetMetaData } from '@/services/gis/gis';
const { Search } = Input;
import styles from './index.less';
......@@ -54,10 +50,7 @@ const MapScope = props => {
const layers = res2.layers || [];
const workspace = res2.mapName.split('_')[0];
const subLayers = layers
.filter(
layer =>
layer.subLayerIds && layer.subLayerIds.length === 0,
)
.filter(layer => layer.subLayerIds && layer.subLayerIds.length === 0)
.map(layer => layer.name);
const paramLayers = `${workspace}:${subLayers.join(',')}`;
const params = {
......@@ -68,9 +61,7 @@ const MapScope = props => {
console.log('params', params);
const wmsOption = {
tileSize: 512,
url: `${
location.origin
}/Cityinterface/rest/services/MapServer.svc/${
url: `${location.origin}/Cityinterface/rest/services/MapServer.svc/${
pipenetCofig.servicename
}/GeoServerProxy/wms`,
blend: false,
......@@ -200,17 +191,16 @@ const MapScope = props => {
});
};
const filter = (inputValue, path) => {
return path.some(
option =>
option.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1,
);
return path.some(option => option.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
};
return (
<SiteModal
{...props}
title={
<span>
<span style={{ marginRight: '20px' }}>{title}的范围选择</span>
<span style={{ marginRight: '20px' }}>
<span style={{ fontWeight: 'blod', color: 'red' }}>{title}</span>的范围选择
</span>
<span style={{ color: 'red' }}>提示:必须框选范围</span>
</span>
}
......@@ -224,10 +214,7 @@ const MapScope = props => {
okText="确认"
onOk={() => onSubmit()}
>
<div
style={{ width: '750px', height: '500px' }}
className={styles.indexContainer}
>
<div style={{ width: '750px', height: '500px' }} className={styles.indexContainer}>
<div style={{ width: '750px', height: '500px', position: 'absolute' }}>
<div id={mapId} style={{ width: '750px', height: '500px' }} />
......
......@@ -79,7 +79,7 @@
padding: 10px 24px 0px 24px;
}
.ant-modal-footer {
padding: 0px 48px 10px 40px;
padding: 10px 48px 10px 40px;
}
.ant-table-pagination.ant-pagination {
margin: 5px 0;
......
......@@ -117,6 +117,8 @@ const MobileConfigPage = props => {
};
// 删除
const delMini = (val, closeModal) => {
console.log(clientName);
console.log(val);
setLoading(true);
closeModal();
console.log(val);
......@@ -128,7 +130,9 @@ const MobileConfigPage = props => {
.then(res => {
setLoading(false);
if (res.code === 0) {
setMiniTitle('');
if (clientName === val) {
setMiniTitle(singleList[0].text);
}
setTimeout(() => {
setFlag(flag + 1);
}, 500);
......
......@@ -11,6 +11,7 @@ const AddForm = props => {
submitCallback,
nodeType,
nodeObj,
keepType,
addType,
submitLoading,
valueCallback,
......@@ -27,11 +28,11 @@ const AddForm = props => {
const submit = () => {
if (addType === 1 || addType === 2) {
let obj = form.getFieldsValue();
submitCallback(obj, nodeObj);
submitCallback(obj, nodeObj, keepType);
}
if (addType === 3 || addType === 4) {
let obj = otherForm.getFieldsValue();
submitCallback(obj, nodeObj);
submitCallback(obj, nodeObj, keepType);
}
};
const finish = () => {
......
......@@ -28,12 +28,17 @@ const EditForm = props => {
},
];
useEffect(() => {
console.log(productObj.ProductName);
console.log(productObj.IsUsed, 'productObj.IsUsed');
form.setFieldsValue({ ...productObj });
let aa = userProductsList.find(i => i.ProductName == productObj.ProductName);
console.log(aa);
if (!productObj.IsUsed) {
setBut(true);
form.setFieldsValue({ ...productObj });
} else {
setBut(false);
form.setFieldsValue({ ...aa });
}
}, [productObj]);
// 提交选择
......@@ -109,35 +114,42 @@ const EditForm = props => {
))}
</Select>
</Item>
<Item
label="访问路由"
name="RouteUrl"
rules={[
{
required: true,
message: '请输入访问路由,ip加端口号,示例//localhost:3001',
},
]}
>
{/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */}
<Input placeholder="请输入访问路由,ip加端口号,示例//localhost:3001" allowClear />
</Item>
{but ? (
<></>
) : (
<>
<Item
label="访问路由"
name="RouteUrl"
rules={[
{
required: true,
message: '请输入访问路由,ip加端口号,示例//localhost:3001',
},
]}
>
{/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */}
<Input placeholder="请输入访问路由,ip加端口号,示例//localhost:3001" allowClear />
</Item>
<Item
label="默认配置"
name="DefaultSetting"
rules={[
{
required: false,
message: '请输入默认配置',
},
]}
>
<TextArea
placeholder='请输入json对象,示例{"name":"张三","age":"18"}'
autoSize={{ minRows: 3, maxRows: 5 }}
/>
</Item>
</>
)}
<Item
label="默认配置"
name="DefaultSetting"
rules={[
{
required: false,
message: '请输入默认配置',
},
]}
>
<TextArea
placeholder='请输入json对象,示例{"name":"张三","age":"18"}'
autoSize={{ minRows: 3, maxRows: 5 }}
/>
</Item>
<div style={{ display: 'flex', marginLeft: '35%' }}>
<Item wrapperCol={{ span: 8, offset: 8 }} style={{ marginRight: '30px' }}>
<Button type="primary" htmlType="submit" disabled={but}>
......
import React, { useState, useEffect } from 'react';
import { Card, List, Drawer, Button, Empty, Spin, notification, Switch, message } from 'antd';
import { Card, List, Empty, Spin, notification, Switch } from 'antd';
import { modifyProduct, getProductList, delProductList } from '@/services/webConfig/api';
import classnames from 'classnames';
import EditForm from './components/editForm';
import styles from './productConfig.less';
const ProductConfig = props => {
const [addVisible, setAddVisible] = useState(false);
const [productList, setProductList] = useState([]);
const [userProductsList, setUserProductsList] = useState([]);
const [productObj, setProductObj] = useState('');
......@@ -14,42 +13,42 @@ const ProductConfig = props => {
const [flag, setFlag] = useState(1);
const [list, setList] = useState(new Set());
// 默认展示第一项
useEffect(() => {
setLoading(true);
getProductList()
.then(res => {
const { code } = res;
if (code === 0) {
const {
data: { AllProducts, UserProducts },
} = res;
// setProductList(AllProducts);
setUserProductsList(UserProducts);
setProductObj(AllProducts[0]);
AllProducts.map(i => {
list.add(i.ProductType);
});
let a = [];
list.map(i => {
a.push(i);
});
let aa = [];
a.map((i, j) => {
let ad = [];
AllProducts.map(k => {
if (k.ProductType == i) {
ad.push(k);
}
});
aa.push(ad);
});
setProductList(aa);
}
})
.finally(() => {
setLoading(false);
});
}, []);
// useEffect(() => {
// setLoading(true);
// getProductList()
// .then(res => {
// const { code } = res;
// if (code === 0) {
// const {
// data: { AllProducts, UserProducts },
// } = res;
// // setProductList(AllProducts);
// setUserProductsList(UserProducts);
// setProductObj(AllProducts[0]);
// AllProducts.map(i => {
// list.add(i.ProductType);
// });
// let a = [];
// list.map(i => {
// a.push(i);
// });
// let aa = [];
// a.map((i, j) => {
// let ad = [];
// AllProducts.map(k => {
// if (k.ProductType == i) {
// ad.push(k);
// }
// });
// aa.push(ad);
// });
// setProductList(aa);
// }
// })
// .finally(() => {
// setLoading(false);
// });
// }, []);
useEffect(() => {
setLoading(true);
......@@ -62,9 +61,9 @@ const ProductConfig = props => {
} = res;
// setProductList(AllProducts);
setUserProductsList(UserProducts);
// if (!productObj && data.length > 0) {
// setProductObj(data[0]);
// }
if (!productObj && AllProducts.length > 0) {
setProductObj(AllProducts[0]);
}
// setProductList(data);
AllProducts.map(i => {
list.add(i.ProductType);
......@@ -91,10 +90,6 @@ const ProductConfig = props => {
});
}, [flag]);
// 展示新增抽屉
const handleAdd = () => {
setAddVisible(true);
};
// 删除
const handleDel = item => {
setLoading(true);
......@@ -123,11 +118,7 @@ const ProductConfig = props => {
console.error(err);
});
};
// 新增提交回调
const addCallback = val => {
setAddVisible(false);
setFlag(flag + 1);
};
// 编辑的回调
const editCallback = val => {
setLoading(true);
......@@ -167,8 +158,6 @@ const ProductConfig = props => {
duration: 3,
});
item.IsUsed = true;
console.log(item, 'item');
console.log(productObj, 'productObj33333');
setProductObj({ ...item });
setFlag(flag + 1);
} else {
......@@ -190,34 +179,8 @@ const ProductConfig = props => {
}
};
const handleClickItem = value => {
// console.log(productList);
// console.log(value);
// let obj = productList.find(i => i.PackageName === value.PackageName);
setProductObj({ ...value });
// if (userProductsList.length > 0) {
// let obj = userProductsList.find(i => i.PackageName === value.PackageName);
// console.log(value);
// console.log(obj);
// if (obj) {
// setProductObj(obj);
// } else {
// message.warning({
// content: '请先启用产品',
// duration: 3,
// });
// }
// } else {
// message.warning({
// content: '请先启用产品',
// duration: 3,
// });
// }
};
// const changeBut = value => {
// let obj = userProductsList.find(i => i.PackageName === value.PackageName);
// setProductObj(obj);
// };
const renderListItem = arr => (
<div style={{ marginBottom: '25px', borderBottom: '1px solid #ccc', paddingBottom: '25px' }}>
{arr.map(item => (
......@@ -231,20 +194,14 @@ const ProductConfig = props => {
>
<div onClick={e => e.stopPropagation()}>
<Switch
// size="small"
// defaultChecked={item.IsUsed}
checked={item.IsUsed}
checkedChildren="启用"
unCheckedChildren="关闭"
onClick={e => {
handleSwitchClick(e, item, userProductsList);
}}
// onChange={changeBut(item)}
/>
</div>
{/* <span className={classnames({ [styles.itemspan]: true })}>{`${item.ProductName}【${
item.ProductType
}】`}</span> */}
<span className={classnames({ [styles.itemspan]: true })}>
{item.ProductType ? `${item.ProductName}【${item.ProductType}】` : item.ProductName}
</span>
......@@ -256,15 +213,7 @@ const ProductConfig = props => {
<Spin spinning={loading} tip="loading...">
<div className={styles.box}>
<Card className={classnames(`${styles.leftList}`)}>
<div className={styles.listTop}>
产品选择:
{/* <Button type="primary" onClick={handleAdd}>
新增
</Button> */}
{/* <Button type="primary" danger onClick={handleDel}>
删除
</Button> */}
</div>
<div className={styles.listTop}>产品选择:</div>
{productList && productList.length > 0 ? (
productList.map(item => renderListItem(item))
) : (
......@@ -278,33 +227,6 @@ const ProductConfig = props => {
handleDel={handleDel}
userProductsList={userProductsList}
/>
{/* {productList && productList.length > 0 && productObj ? (
<EditForm
productObj={productObj}
editCallback={editCallback}
handleDel={handleDel}
userProductsList={userProductsList}
/>
) : (
<Empty
style={{ marginTop: '60px' }}
image={Empty.PRESENTED_IMAGE_SIMPLE}
description="当前未选中产品类型"
/>
)} */}
{/* <Drawer
title="新增产品"
destroyOnClose
maskClosable={false}
width={600}
onClose={() => {
setAddVisible(false);
}}
visible={addVisible}
>
<AddForm addCallback={addCallback} />
</Drawer> */}
</Card>
</div>
</Spin>
......
......@@ -82,6 +82,7 @@ const WebConfigPage = props => {
const updateModuleTree = (userModePrama, canceled = { cancel: false }) => {
setLoading(true);
console.log(userModePrama);
return getWebModuleTree(userModePrama)
.then(res => {
const websArr = [
......@@ -151,7 +152,9 @@ const WebConfigPage = props => {
duration: 3,
});
// updateModuleTree(userMode || 'super');
if (webToOperate.id === curWeb.id) {
setCurWeb(webs[0].id);
}
setTimeout(() => {
updateModuleTree(userMode || 'super');
}, 500);
......
/* eslint-disable array-callback-return */
/* eslint-disable no-plusplus */
/* eslint-disable consistent-return */
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import { notification, Tooltip, Modal, Spin, Empty } from 'antd';
import Tree from '@/components/ExpendableTree';
import {
......@@ -52,9 +52,11 @@ const MiniMenu = props => {
const [expendKey, setExpendKey] = useState(''); // 保存默认展开项
const [menuList, setMenuList] = useState([]); // 菜单树
const [keepId, setKeepId] = useState('');
const [mapDataList, setMapDataList] = useState(new Set());
/* ***************************************************** */
const [curMenuType, setCurMenuType] = useState('');
const parentRef = useRef();
// 获取菜单信息
useEffect(() => {
......@@ -62,6 +64,7 @@ const MiniMenu = props => {
if (flag === 1) {
setExpendKey(menuID);
}
console.log(expendKey);
getInfo();
}, [menuID, webid]);
useEffect(() => {
......@@ -114,14 +117,23 @@ const MiniMenu = props => {
children: hasChild ? obj.children.map(i => mapTree(i)) : [],
};
};
const mapData = (val, e) => {
const obj = { ...val };
const hasChild = obj.children.length > 0;
if (hasChild) {
obj.children.map(i => mapData(i));
}
mapDataList.add(obj);
};
// 树的点击事件
const handleSelect = (prop, treeNode) => {
console.log(prop);
console.log(treeNode);
if (treeNode) {
const {
node: { menuType },
} = treeNode;
console.log(menuType);
setCurMenuType(menuType);
switch (menuType) {
case 'Web4MenuGroup':
setNodeType(2);
......@@ -174,7 +186,7 @@ const MiniMenu = props => {
notification.error({
message: '提示',
duration: 10,
description: res.message || '获取失败',
description: res.msg || '获取失败',
});
}
})
......@@ -220,7 +232,7 @@ const MiniMenu = props => {
notification.error({
message: '提示',
duration: 10,
description: res.message || '删除失败',
description: res.msg || '删除失败',
});
}
})
......@@ -291,10 +303,12 @@ const MiniMenu = props => {
.then(res => {
setSubmitLoading(false);
if (res.code === 0) {
console.log(res.data);
setAddVisible(false);
setAddTwoVisible(false);
// setFlag(flag + 1);
getTree();
console.log(prop);
getTree(res.data);
// updateMenuTree('add', item);
notification.success({
message: '提示',
......@@ -304,7 +318,7 @@ const MiniMenu = props => {
} else {
notification.error({
message: '提示',
description: res.message || '新增失败',
description: res.msg || '新增失败',
duration: 10,
});
}
......@@ -314,6 +328,11 @@ const MiniMenu = props => {
console.error(err);
});
};
const treeCallback = value => {
if (value) {
console.log(value);
}
};
// 编辑的回调
const editSubmitCallback = prop => {
setLoading(true);
......@@ -343,7 +362,7 @@ const MiniMenu = props => {
notification.error({
message: '提示',
duration: 3,
description: res.message || '编辑失败',
description: res.mes || '编辑失败',
});
}
})
......@@ -411,7 +430,7 @@ const MiniMenu = props => {
}
}
};
const getTree = () => {
const getTree = e => {
getWebModuleTree(userMode || 'super')
.then(res => {
setLoading(false);
......@@ -422,14 +441,32 @@ const MiniMenu = props => {
.map(r => r.children.filter(i => i.id === webid))
.flat(2);
let arr2 = arr[0].children.find(item => item.text === '菜单管理').children || [];
console.log(arr2[0]);
setKeepId(arr2[0]);
setMenuList(arr2 || []);
if (e) {
arr2.map(item => mapData(item, e));
console.log([...mapDataList]);
let aa = [...mapDataList].find(i => i.menuID == e);
console.log(aa);
setMenuID(aa.menuID);
setExpendKey(aa.menuID);
console.log(expendKey);
switch (aa.menuType) {
case 'Web4MenuGroup':
setNodeType(2);
setAddType(2);
break;
default:
setNodeType(1);
setAddType(1);
break;
}
}
setKeepId(arr2[0]);
// 进页面后默认展示第一条数据
if (arr2.length > 0) {
if (flag === 1) {
setMenuID(arr2[0].menuID);
setCurMenuType(arr2[0].menuType);
switch (arr2[0].menuType) {
case 'Web4MenuGroup':
setNodeType(2);
......@@ -524,14 +561,13 @@ const MiniMenu = props => {
}).then(res => {
if (res.code === 0) {
// updateMenuTree();
console.log(11111111);
getTree();
// setFlag(flag + 1);
} else {
notification.error({
message: '提示',
duration: 3,
description: res.message || '操作失败',
description: res.msg || '操作失败',
});
}
});
......
......@@ -60,6 +60,7 @@ const SiteManage = () => {
const [saveTreeId, setSaveTreeId] = useState(''); // 保存点击回调的roleid
const [modalVisible, setModalVisible] = useState(false); // 新增弹窗
const [flag, setFlag] = useState(1);
const [flagSearch, setFlagSearch] = useState(0);
const [itemObj, setItemObj] = useState(''); // 选择的角色item
const [delVisible, setDelVisible] = useState(false); // 删除弹窗
const [editVisible, setEditVisible] = useState(false); // 修改弹窗
......@@ -77,21 +78,35 @@ const SiteManage = () => {
const [mulu, setMulu] = useState(true); // 展示目录
const [siteList, setSiteList] = useState([]);
const [disFlag, setDisFlag] = useState(false);
const [chileID, setChildID] = useState([]);
const [descrip, setDescrip] = useState('当前未选中角色');
// const [childData, setChildData] = useState({visibleValue:''})
// 点击树的回调
const handleTreeSelect = (e, treenode) => {
console.log(e);
console.log(treenode);
if (treenode) {
const { node } = treenode;
const { roleID: id } = node;
setItemObj(node);
let aa = chileID.find(i => i.roleID === id);
if (id) {
setSaveTreeId(id);
setRoleID(id);
setValueList([...valueList]);
if (aa) {
setRoleID('');
setDescrip('系统分组下的角色不可配置菜单权限也不能被关联');
setFlagSearch(0);
} else {
setRoleID(id);
setFlagSearch(1);
}
} else {
// setRoleID(saveTreeId);
setRoleID('');
setDescrip('当前未选中角色');
setFlagSearch(0);
}
}
......@@ -147,10 +162,27 @@ const SiteManage = () => {
}
}
});
console.log(res.data.roleList);
const { roleList } = res.data;
let arr = transTree(roleList);
setTreeData(arr);
console.log(arr);
let dataA = [];
arr.map(i => {
console.log(i.child);
dataA.push(i.child.find(j => j.visibleTitle === '系统分组'));
// if (i.child.find(j => j.visibleTitle === '系统分组')) {
// data.push(j);
// }
});
console.log(dataA);
let Arr = [];
dataA.map(i => {
i.children.map(j => {
Arr.push(j);
});
});
console.log(Arr);
setChildID(Arr);
}
});
};
......@@ -795,13 +827,17 @@ const SiteManage = () => {
>
<Row align="middle">
<Col span={8}>
<Search
allowClear
placeholder={placeholder}
// onSearch={handleSearch}
onChange={handleChange}
enterButton
/>
{flagSearch == 1 ? (
<Search
allowClear
placeholder={placeholder}
// onSearch={handleSearch}
onChange={handleChange}
enterButton
/>
) : (
<span />
)}
</Col>
<Col span={3} />
</Row>
......@@ -823,7 +859,7 @@ const SiteManage = () => {
hasData={hasData}
/>
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="当前未选中角色" />
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={descrip} />
)}
</Card>
</div>
......
......@@ -3,17 +3,17 @@ import { Modal, Form, Input, notification, message } from 'antd';
import { addOrg } from '@/services/userManage/api';
const AddUserModal = props => {
const { title, visible, orgID, onCancel, updateTrees, onSelect } = props;
const { visible, orgID, onCancel, updateTrees, onSelect, orgTitle1 } = props;
const [addOrgForm] = Form.useForm(); // 添加用户
useEffect(() => {
console.log(orgID)
console.log(orgID);
addOrgForm.resetFields();
}, [orgID]);
// 提交-添加下级机构
const submitAddOrg = () => {
if(orgID == -1){
if (orgID == -1) {
addOrg(
orgID,
addOrgForm.getFieldValue('OUName'),
......@@ -21,7 +21,7 @@ const AddUserModal = props => {
'',
)
.then(res => {
if (res.msg==="Ok") {
if (res.msg === 'Ok') {
onCancel();
notification.success({
message: '提交成功',
......@@ -40,8 +40,7 @@ const AddUserModal = props => {
.catch(err => {
message.error(err);
});
}else{
} else {
addOrg(
orgID.id,
addOrgForm.getFieldValue('OUName'),
......@@ -49,7 +48,7 @@ const AddUserModal = props => {
'',
)
.then(res => {
if (res.msg==="Ok") {
if (res.msg === 'Ok') {
onCancel();
notification.success({
message: '提交成功',
......@@ -70,9 +69,14 @@ const AddUserModal = props => {
});
}
};
const title = (
<span>
<span style={{ fontWeight: 'bold', color: 'red' }}>{orgTitle1}</span>下添加机构
</span>
);
return (
<Modal
title={title}
title={orgID === '-1' ? '添加顶级机构' : title}
visible={visible}
onCancel={onCancel}
onOk={submitAddOrg}
......@@ -80,11 +84,7 @@ const AddUserModal = props => {
cancelText="取消"
>
<Form form={addOrgForm} labelCol={{ span: 4 }}>
<Form.Item
name="OUName"
label="机构名称"
rules={[{ required: true, message: '不能为空' }]}
>
<Form.Item name="OUName" label="机构名称" rules={[{ required: true, message: '不能为空' }]}>
<Input placeholder="请输入机构名称" />
</Form.Item>
<Form.Item name="description" label="描述">
......
......@@ -4,7 +4,7 @@ import { addUser } from '@/services/userManage/api';
import { ok } from '../../../assets/images/icons/ok.svg';
const AddUserModal = props => {
const { title, visible, orgID, onCancel, onSelect } = props;
const { visible, orgID, onCancel, onSelect, orgTitle1 } = props;
const [addUserForm] = Form.useForm(); // 添加用户
/** ***正则验证**** */
const noChinese = new RegExp(/^[^\u4e00-\u9fa5]+$/); // 不能包含中文
......@@ -93,6 +93,12 @@ const AddUserModal = props => {
});
}
};
const title = (
<span>
<span style={{ fontWeight: 'bold', color: 'red' }}>{orgTitle1}</span>下添加用户
</span>
);
return (
<Modal
title={title}
......
/*
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-03-07 18:50:03
* @LastEditors: leizhe
*/
import React, { useEffect } from 'react';
import { Modal, Form, Input, notification, message } from 'antd';
import { editOrgInfo } from '@/services/userManage/api';
const EditOrgModal = props => {
const {
title,
visible,
orgID,
orgTitle,
......@@ -12,6 +18,7 @@ const EditOrgModal = props => {
onCancel,
updateTrees,
onSelect,
orgTitle1,
} = props;
const [editOrgForm] = Form.useForm(); // 添加用户
......@@ -51,6 +58,11 @@ const EditOrgModal = props => {
.catch(err => {
message.error(err);
});
const title = (
<span>
编辑<span style={{ fontWeight: 'bold', color: 'red' }}>{orgTitle1}</span>
</span>
);
return (
<Modal
title={title}
......@@ -61,11 +73,7 @@ const EditOrgModal = props => {
cancelText="取消"
>
<Form form={editOrgForm} labelCol={{ span: 4 }}>
<Form.Item
name="OUName"
label="机构名称"
rules={[{ required: true, message: '不能为空' }]}
>
<Form.Item name="OUName" label="机构名称" rules={[{ required: true, message: '不能为空' }]}>
<Input placeholder="请输入机构名称" />
</Form.Item>
<Form.Item name="description" label="描述">
......
import React, { useState, useCallback, useEffect } from 'react';
import { Modal, Spin, Tabs, notification, message, Checkbox, Divider } from 'antd';
import {
SetUserRelationList,
setUserRelation,
setUserRelations,
} from '@/services/userManage/api';
import { SetUserRelationList, setUserRelation, setUserRelations } from '@/services/userManage/api';
import ListCardItem from './components/listCardItem';
const CheckboxGroup = Checkbox.Group;
......@@ -45,6 +41,7 @@ const RelateRoleModal = props => {
}, []);
useEffect(() => {
console.log(currentUser);
console.log(multiRoleList);
console.log(multistationList);
}, [visible]);
......@@ -129,7 +126,9 @@ const RelateRoleModal = props => {
);
const title1 = (
<span>
<span>关联角色{currentUser.loginName}</span>
<span>
关联角色<span style={{ fontWeight: 'bold', color: 'red' }}>{currentUser.userName}</span>
</span>
</span>
);
if (mult == 'Yes') {
......
......@@ -151,6 +151,7 @@ const UserManage = () => {
const [keep1, setKeep1] = useState([4]); // 存储树选择
const [id, setId] = useState('');
const { Search } = Input;
const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引
const setRowClassName = record =>
record.userID === selectColor.userID ? styles.clickRowStyle : '';
// 用户表列名
......@@ -389,7 +390,18 @@ const UserManage = () => {
title: (
<div className={styles.title1}>
<span className={styles.titleText}>{org.text}</span>
<span className={styles.tip1}>
<span
className={classnames({
[styles.tip1]: true,
[styles.listHover]: org === hoverItemIndex,
})}
onMouseEnter={() => {
setHoverItemIndex(org);
}}
onMouseLeave={() => {
setHoverItemIndex('');
}}
>
<Tooltip title="" className={styles.fs1}>
<Dropdown overlay={orgButtonMenu}>
<PlusOutlined
......@@ -403,7 +415,6 @@ const UserManage = () => {
/>
</Dropdown>
</Tooltip>
<Dropdown overlay={orgButtonMenu1}>
<EllipsisOutlined
style={{ marginLeft: 10, fontSize: '20px' }}
......@@ -1316,6 +1327,7 @@ const UserManage = () => {
const addChange = e => {
e.domEvent.stopPropagation();
};
/** ***操作按钮**** */
// 机构操作
const orgButtonMenu = (
......@@ -1487,16 +1499,16 @@ const UserManage = () => {
{/* Modal弹框 */}
{/* 添加用户 */}
<AddUserModal
title={`在${orgTitle1}下添加用户`}
visible={userVisible}
orgID={orgID}
orgTitle1={orgTitle1}
onCancel={kee}
onSelect={() => onSelect([orgID])}
/>
{/* 添加下级机构 */}
<AddSubOrgModal
title={orgID === '-1' ? '添加顶级机构' : `在${orgTitle1}下添加机构`}
visible={addOrgVisible}
orgTitle1={orgTitle1}
orgID={orgID}
onCancel={() => setAddOrgVisible(false)}
// onSelect={onSelect}
......@@ -1504,10 +1516,9 @@ const UserManage = () => {
/>
{/* 编辑机构 */}
<EditOrgModal
title={`编辑${orgTitle1}`}
visible={editOrgVisible}
orgID={orgID}
orgTitle={orgTitle1}
orgTitle1={orgTitle1}
description={description}
onCancel={() => setEditOrgVisible(false)}
// onSelect={onSelect}
......
......@@ -196,6 +196,12 @@
font-size: 18px;
margin-left: 10px;
}
.listHover {
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
}
.title1:hover {
.tip1 {
display: flex;
......
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