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