Commit 98d8654a authored by 涂伟's avatar 涂伟
parents 3102d690 c868aebd
Pipeline #74148 passed with stages
...@@ -48,7 +48,15 @@ const modules = { ...@@ -48,7 +48,15 @@ const modules = {
}; };
const AddModal = props => { const AddModal = props => {
const { callBackSubmit = () => {}, type, pickItem, visible, onCancel, keepSystemName } = props; const {
callBackSubmit = () => {},
type,
pickItem,
visible,
onCancel,
keepSystemName,
groupList,
} = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [radio, setRadio] = useState(); const [radio, setRadio] = useState();
const [radio1, setRadio1] = useState(); const [radio1, setRadio1] = useState();
...@@ -87,6 +95,7 @@ const AddModal = props => { ...@@ -87,6 +95,7 @@ const AddModal = props => {
setIdentity(pickItem.siteType); setIdentity(pickItem.siteType);
setAccount(pickItem.accountType); setAccount(pickItem.accountType);
form.setFieldsValue({ form.setFieldsValue({
GroupName: pickItem.GroupName,
accountParamKey: pickItem.AccountParamKey, accountParamKey: pickItem.AccountParamKey,
accountParamValue: pickItem.AccountParamValue === 1 ? '熊猫ticket' : '熊猫token', accountParamValue: pickItem.AccountParamValue === 1 ? '熊猫ticket' : '熊猫token',
internetAddress: pickItem.InternetAddress, internetAddress: pickItem.InternetAddress,
...@@ -395,6 +404,7 @@ const AddModal = props => { ...@@ -395,6 +404,7 @@ const AddModal = props => {
} }
if (type === 'add') { if (type === 'add') {
AddIntegratedLogin({ AddIntegratedLogin({
GroupName: obj.GroupName,
systemName: obj.systemName, systemName: obj.systemName,
subtitle: obj.subtitle, subtitle: obj.subtitle,
internetAddress: obj.internetAddress, internetAddress: obj.internetAddress,
...@@ -439,6 +449,7 @@ const AddModal = props => { ...@@ -439,6 +449,7 @@ const AddModal = props => {
}); });
} else { } else {
EditIntegratedLogin({ EditIntegratedLogin({
GroupName: obj.GroupName,
systemName: obj.systemName, systemName: obj.systemName,
subtitle: obj.subtitle, subtitle: obj.subtitle,
internetAddress: obj.internetAddress, internetAddress: obj.internetAddress,
...@@ -731,6 +742,9 @@ const AddModal = props => { ...@@ -731,6 +742,9 @@ const AddModal = props => {
<Input allowClear style={{ width: '100%' }} placeholder="请输入名称" /> <Input allowClear style={{ width: '100%' }} placeholder="请输入名称" />
</Item> </Item>
)} )}
<Item label="分组" name="GroupName">
<AutoComplete placeholder="请输入分组名称" options={groupList} allowClear />
</Item>
<Item label="角色选择" name="roles"> <Item label="角色选择" name="roles">
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Item name="roles" style={{ marginBottom: 0, width: '100%' }}> <Item name="roles" style={{ marginBottom: 0, width: '100%' }}>
......
...@@ -33,6 +33,7 @@ import styles from './integrate.less'; ...@@ -33,6 +33,7 @@ import styles from './integrate.less';
import AddModal from './AddModal'; import AddModal from './AddModal';
import Master from './Master'; import Master from './Master';
import SortModal from './SortModal'; import SortModal from './SortModal';
import { set } from 'lodash';
const path = require('path'); const path = require('path');
...@@ -48,12 +49,13 @@ const Integrate = () => { ...@@ -48,12 +49,13 @@ const Integrate = () => {
const [masterVisible, setMasterVisible] = useState(false); const [masterVisible, setMasterVisible] = useState(false);
const [keepSystemName, setKeepSystemName] = useState([]); const [keepSystemName, setKeepSystemName] = useState([]);
const [sortVisible, setSortVisible] = useState(false); const [sortVisible, setSortVisible] = useState(false);
const [groupList, setGroupList] = useState([]); // 分组列表
const { Search } = Input; const { Search } = Input;
useEffect(() => { useEffect(() => {
getData(); getData();
console.log(tableData); console.log(tableData, 'tableData');
}, [flag]); }, [flag]);
const getImg = img => { const getImg = img => {
...@@ -328,9 +330,13 @@ const Integrate = () => { ...@@ -328,9 +330,13 @@ const Integrate = () => {
if (resnew.code === 0) { if (resnew.code === 0) {
console.log(resnew.data); console.log(resnew.data);
let aa = []; let aa = [];
let list = new Set([]);
if (resnew.data.length > 0) { if (resnew.data.length > 0) {
resnew.data.map((i, j) => { resnew.data.map((i, j) => {
aa.push(i.SystemName); aa.push(i.SystemName);
if (i.GroupName) {
list.add(i.GroupName);
}
resnew.data[j].AccountParamKey = i.AccountParam[0].key; resnew.data[j].AccountParamKey = i.AccountParam[0].key;
resnew.data[j].AccountParamValue = i.AccountParam[0].value; resnew.data[j].AccountParamValue = i.AccountParam[0].value;
...@@ -341,6 +347,8 @@ const Integrate = () => { ...@@ -341,6 +347,8 @@ const Integrate = () => {
} }
}); });
} }
console.log([...list], 'faaa');
setGroupList([...list].map(item => ({ value: item, label: item })));
console.log(aa); console.log(aa);
setKeepSystemName(aa); setKeepSystemName(aa);
console.log(resnew.data); console.log(resnew.data);
...@@ -578,6 +586,7 @@ const Integrate = () => { ...@@ -578,6 +586,7 @@ const Integrate = () => {
onCancel={() => setAddVisible(false)} onCancel={() => setAddVisible(false)}
type={type} type={type}
callBackSubmit={onSubmit} callBackSubmit={onSubmit}
groupList={groupList}
keepSystemName={keepSystemName} keepSystemName={keepSystemName}
/> />
<Master visible={masterVisible} onCancel={() => setMasterVisible(false)} type={type} /> <Master visible={masterVisible} onCancel={() => setMasterVisible(false)} type={type} />
......
...@@ -320,7 +320,12 @@ const Master = props => { ...@@ -320,7 +320,12 @@ const Master = props => {
}, },
{ {
label: renderTitle('项目'), label: renderTitle('项目'),
options: [renderItem('Water'), renderItem('蠡县'), renderItem('榆林全景')], options: [
renderItem('Water'),
renderItem('蠡县'),
renderItem('榆林全景'),
renderItem('张掖'),
],
}, },
]; ];
......
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