Commit da29648e authored by 皮倩雯's avatar 皮倩雯

事件管理模块

parents fbc76097 a347dc0d
Pipeline #33878 skipped with stages
import React, { useState, useEffect } from 'react';
import { Radio } from 'antd';
import styles from './index.less';
const RadioBox = props => {
const {
radioTitle,
radioOptions,
currentVal,
currentIndex,
callBack,
} = props;
useEffect(() => {}, []);
// 选择时通过回调函数传回要改变数据的索引跟选中的值
const onChange = e => {
callBack(currentIndex, e.target.value);
};
return (
<div className={styles.radioBox}>
<div className={styles.radioTitle}>{radioTitle}:</div>
<div className={styles.radioContent}>
<Radio.Group value={currentVal}>
{radioOptions.map((item, num) => (
<Radio
disabled={item.disabled}
value={item.version}
key={num}
className={styles.radio}
onClick={onChange}
>
{item.functionName + item.version}
</Radio>
))}
</Radio.Group>
</div>
</div>
);
};
export default RadioBox;
.radioBox {
display: flex;
justify-content: flex-start;
margin-bottom: 20px;
.radioTitle {
width: 100px;
}
.radioContent {
width: 760px;
.radio {
margin-bottom: 10px;
}
}
}
...@@ -13,32 +13,32 @@ import { ...@@ -13,32 +13,32 @@ import {
Col, Col,
Popconfirm, Popconfirm,
Spin, Spin,
Tabs,
Radio,
} from 'antd'; } from 'antd';
import PageContainer from '@/components/BasePageContainer'; import PageContainer from '@/components/BasePageContainer';
import RadioBox from '@/components/RadioGroup';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { import {
setTableSQLDirName, setTableSQLDirName,
deleteConn,
deleteConnNew, deleteConnNew,
initDBv4,
initDBv4new, initDBv4new,
getInitDBLog,
getInitDBLogNew, getInitDBLogNew,
getConnRecord,
getConnRecordNew, getConnRecordNew,
getDataBaseConfig,
getDataBaseConfigNew, getDataBaseConfigNew,
saveConnection,
saveConnectionNew, saveConnectionNew,
getDataBaseList, getDataBaseList,
updateConnDesc,
updateConnDescNew, updateConnDescNew,
deleteInitDBLog,
deleteInitDBLogNew, deleteInitDBLogNew,
connectionTest, connectionTest,
GetProductList, // 获取产品列表
GetDbProduct, // 获取产品方案配置
InitAddDataBase, // 数据库初始化
InitEditDataBase, // 二次初始化
} from '@/services/database/api'; } from '@/services/database/api';
import styles from './InitDataBase.less'; import styles from './InitDataBase.less';
const { TabPane } = Tabs;
const { Option } = Select; const { Option } = Select;
const formLables = { const formLables = {
ip: '服务器名或IP地址', ip: '服务器名或IP地址',
...@@ -46,7 +46,7 @@ const formLables = { ...@@ -46,7 +46,7 @@ const formLables = {
password: '数据库用户密码', password: '数据库用户密码',
dbName: '数据库名称', dbName: '数据库名称',
}; };
let time = null let time = null;
const InitDataBase = props => { const InitDataBase = props => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [tableLoading, setTableLoading] = useState(false); // 连接记录 const [tableLoading, setTableLoading] = useState(false); // 连接记录
...@@ -63,131 +63,94 @@ const InitDataBase = props => { ...@@ -63,131 +63,94 @@ const InitDataBase = props => {
const [desc, setDesc] = useState(''); // 修改描述 const [desc, setDesc] = useState(''); // 修改描述
const [allSqlDir, setAllSqulDir] = useState([]); // 修改产品方案 const [allSqlDir, setAllSqulDir] = useState([]); // 修改产品方案
const [defaultSqlDir, setDefaultSqlDir] = useState(''); // 修改产品方案默认值 const [defaultSqlDir, setDefaultSqlDir] = useState(''); // 修改产品方案默认值
const [modalVisible, setModalVisible] = useState(false); // 修改秒速弹窗 const [modalVisible, setModalVisible] = useState({
describeVisible: false, // 描述弹窗
versionVisible: false, // 检查版本弹窗
initVisible: false, // 初始化选择产品弹窗
}); // 修改弹窗
const [initVisible, setInitVisible] = useState(false); // 数据库初始化弹窗 const [initVisible, setInitVisible] = useState(false); // 数据库初始化弹窗
const [initContent, setInitContent] = useState(''); // 数据库初始化内容 const [initContent, setInitContent] = useState(''); // 数据库初始化内容
const [cardLoading, setCardLoading] = useState(false); // 初始化card Loading const [cardLoading, setCardLoading] = useState(false); // 初始化card Loading
const [finish, setFinish] = useState(false); const [finish, setFinish] = useState(false);
const [initLoading, setInitLoading] = useState(false); const [initLoading, setInitLoading] = useState(false);
const [initList, setInitList] = useState([]); // 数据库初始化产品数据
const [dbExists, setDbExists] = useState(false); // 数据库是否存在
const scroll = useRef(null); const scroll = useRef(null);
// 获取数据库链接记录
useEffect(() => {
setTableLoading(true);
// getConnRecord({
// _version: 9999,
// dc: Date.now(),
// })
// .then(res => {
// setTableLoading(false);
// if (res.length > 0) {
// let arr = res.map((item, index) => {
// item.key = index;
// return item;
// });
// setData(arr);
// }
// })
// .catch(err => {
// setTableLoading(false);
// console.error(err);
// });
getConnRecordNew().then(resnew => {
setTableLoading(false);
if (resnew.code == 0) {
let res = resnew.data
let arr = res.map((item, index) => {
item.key = index;
return item;
});
setData(arr);
}
}).catch(err => {
setTableLoading(false);
console.error(err);
});
return () => {
if (time) {
clearTimeout(time)
time = null
}
}
}, [upData]);
// 获取数据库配置信息 // 获取数据库配置信息
useEffect(() => { useEffect(() => {
setCardLoading(true); setCardLoading(true);
// getDataBaseConfig({ // 数据库连接记录初始化
// _version: 9999, getConnRecordData();
// dc: Date.now(), getDataBaseConfigNew().then(resnew => {
// }) setCardLoading(false);
// .then(res => { let res = resnew.data;
// setCardLoading(false); if (resnew.code === 0) {
// if (res.success) { const { inUse } = res;
// const { inUse } = res;
// let obj = {};
// Object.keys(dbForm).forEach(k => {
// obj[k] = res[k];
// });
// form.setFieldsValue(obj);
// setDbForm(val => ({ ...val, ...obj }));
// setAllSqulDir(res.allSqlDir);
// if (res.allSqlDir.some(item => item === inUse)) {
// setDefaultSqlDir(res.tableSQLDirName);
// } else {
// // 默认切换到第一个产品方案
// handeleChangeSQLDirName(res.allSqlDir[0]);
// setDefaultSqlDir(res.allSqlDir[0]);
// }
// }
// })
// .catch(err => {
// setCardLoading(false);
// console.error(err);
// });
getDataBaseConfigNew().then(
resnew => {
setCardLoading(false);
let res = resnew.data
if (resnew.code == 0) {
const { inUse } = res;
let obj = {}; let obj = {};
Object.keys(dbForm).forEach(k => { Object.keys(dbForm).forEach(k => {
obj[k] = res[k]; obj[k] = res[k];
}); });
form.setFieldsValue(obj); form.setFieldsValue(obj);
setDbForm(val => ({ ...val, ...obj })); setDbForm(val => ({ ...val, ...obj }));
setAllSqulDir(res.allSqlDir); setAllSqulDir(res.allSqlDir);
if (res.allSqlDir.some(item => item === inUse)) { if (res.allSqlDir.some(item => item === inUse)) {
setDefaultSqlDir(res.tableSQLDirName); setDefaultSqlDir(res.tableSQLDirName);
} else { } else {
// 默认切换到第一个产品方案 // 默认切换到第一个产品方案
handeleChangeSQLDirName(res.allSqlDir[0]); handeleChangeSQLDirName(res.allSqlDir[0]);
setDefaultSqlDir(res.allSqlDir[0]); setDefaultSqlDir(res.allSqlDir[0]);
}
} }
} }
) });
return () => { return () => {
if (time) { if (time) {
clearTimeout(time) clearTimeout(time);
time = null time = null;
} }
} };
}, []); }, []);
// 弹出模态框
const handleShowModal = (key, value) => {
setModalVisible({ ...modalVisible, [key]: value });
};
// 获取数据库连接记录
const getConnRecordData = () => {
setTableLoading(true);
getConnRecordNew()
.then(resnew => {
setTableLoading(false);
if (resnew.code === 0) {
let res = resnew.data;
let arr = res.map((item, index) => {
item.key = index;
return item;
});
setData(arr);
}
})
.catch(err => {
setTableLoading(false);
console.error(err);
});
};
// 获取日志 // 获取日志
const doInitLog = () => { const doInitLog = () => {
setInitLoading(true) setInitLoading(true);
getInitDBLogNew() getInitDBLogNew()
.then(res => { .then(res => {
if (res.code == 0) { if (res.code === 0) {
if (res.data.content) { if (res.data.content) {
setInitLoading(false) setInitLoading(false);
let arr = []; let arr = [];
arr.push( arr.push(
res.data.content res.data.content.split(/(\r\n)|(\n)/).map((item, index) => (
.split(/(\r\n)|(\n)/) // eslint-disable-next-line react/no-danger
.map((item, index) => <p key={index}>{item}</p>), <p key={index} dangerouslySetInnerHTML={{ __html: item }} />
)),
); );
console.log(arr);
setInitContent(arr); setInitContent(arr);
scroll.current.scrollTop = scroll.current.scrollHeight; scroll.current.scrollTop = scroll.current.scrollHeight;
} }
...@@ -195,12 +158,11 @@ const InitDataBase = props => { ...@@ -195,12 +158,11 @@ const InitDataBase = props => {
time = setTimeout(() => { time = setTimeout(() => {
doInitLog(); doInitLog();
}, 600); }, 600);
} } else {
else { setInitLoading(false);
setInitLoading(false)
if (time) { if (time) {
clearTimeout(time) clearTimeout(time);
time = null time = null;
} }
} }
} }
...@@ -208,30 +170,6 @@ const InitDataBase = props => { ...@@ -208,30 +170,6 @@ const InitDataBase = props => {
.catch(err => { .catch(err => {
setFinish(true); setFinish(true);
}); });
// getInitDBLogNew().
// then(resnew => {
// if (resnew.code == 0) {
// let res = resnew.data
// if (res.content) {
// let arr = [];
// arr.push(
// res.content
// .split(/(\r\n)|(\n)/)
// .map((item, index) => <p key={index}>{item}</p>),
// );
// setInitContent(arr);
// scroll.current.scrollTop = scroll.current.scrollHeight;
// }
// if (!res.finish) {
// setTimeout(() => {
// doInitLog();
// }, 600);
// }
// }
// })
// .catch(err => {
// setFinish(true);
// });
}; };
// 数据库初始化 // 数据库初始化
const initClick = () => { const initClick = () => {
...@@ -240,41 +178,21 @@ const InitDataBase = props => { ...@@ -240,41 +178,21 @@ const InitDataBase = props => {
setInitVisible(true); setInitVisible(true);
let obj = form.getFieldsValue(); let obj = form.getFieldsValue();
doInitLog(); doInitLog();
// initDBv4({
// _version: 9999,
// _dc: Date.now(),
// ...obj,
// })
// .then(res => {
// setCardLoading(false);
// if (res.GetMe) {
// console.log(res);
// } else {
// notification.error({
// message: '提示',
// duration: 15,
// description: res.Say.Message || '初始化失败',
// });
// }
// })
// .catch(err => {
// setCardLoading(false);
// console.log(err);
// });
initDBv4new({ initDBv4new({
...obj ...obj,
}).then(res => {
setCardLoading(false);
if (res.code == 0) {
console.log(res);
} else {
notification.error({
message: '提示',
duration: 15,
description: res.msg || '初始化失败',
});
}
}) })
.then(res => {
setCardLoading(false);
if (res.code == 0) {
console.log(res);
} else {
notification.error({
message: '提示',
duration: 15,
description: res.msg || '初始化失败',
});
}
})
.catch(err => { .catch(err => {
setCardLoading(false); setCardLoading(false);
console.log(err); console.log(err);
...@@ -299,11 +217,12 @@ const InitDataBase = props => { ...@@ -299,11 +217,12 @@ const InitDataBase = props => {
dbName: obj.dbName, dbName: obj.dbName,
userName: obj.userName, userName: obj.userName,
password: obj.password, password: obj.password,
}).then( })
resnew => { .then(resnew => {
setCardLoading(false); setCardLoading(false);
if (resnew.code == 0) { if (resnew.code === 0) {
setUpData(upData + 1); // setUpData(upData + 1);
getConnRecordData();
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
...@@ -316,40 +235,11 @@ const InitDataBase = props => { ...@@ -316,40 +235,11 @@ const InitDataBase = props => {
description: resnew.msg, description: resnew.msg,
}); });
} }
} })
).catch(err => { .catch(err => {
setCardLoading(false); setCardLoading(false);
console.log(err); console.log(err);
}); });
// saveConnection({
// _version: 9999,
// _dc: new Date().getTime(),
// ip: obj.ip,
// dbName: obj.dbName,
// userName: obj.userName,
// password: obj.password,
// })
// .then(res => {
// setCardLoading(false);
// if (res.GetMe === true) {
// setUpData(upData + 1);
// notification.success({
// message: '提示',
// duration: 3,
// description: '保存成功',
// });
// } else {
// notification.error({
// message: '提示',
// duration: 15,
// description: res.Say.Message || '保存失败',
// });
// }
// })
// .catch(err => {
// setCardLoading(false);
// console.log(err);
// });
}; };
// 测试连接 // 测试连接
const onCheck = e => { const onCheck = e => {
...@@ -431,7 +321,7 @@ const InitDataBase = props => { ...@@ -431,7 +321,7 @@ const InitDataBase = props => {
dirName: val, dirName: val,
}) })
.then(res => { .then(res => {
if (res.code == 0) { if (res.code === 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
...@@ -452,7 +342,7 @@ const InitDataBase = props => { ...@@ -452,7 +342,7 @@ const InitDataBase = props => {
// 展示修改描述 // 展示修改描述
const changeDesc = val => { const changeDesc = val => {
setDesc(val); setDesc(val);
setModalVisible(true); handleShowModal('describeVisible', true);
}; };
const descChange = e => { const descChange = e => {
const { value } = e.target; const { value } = e.target;
...@@ -467,29 +357,12 @@ const InitDataBase = props => { ...@@ -467,29 +357,12 @@ const InitDataBase = props => {
// _version: 9999, // _version: 9999,
// _dc: Date.now(), // _dc: Date.now(),
// }); // });
deleteInitDBLogNew() deleteInitDBLogNew();
}; };
// 弹窗确认回调 // 弹窗确认回调
const modalOkCallback = () => { const modalOkCallback = () => {
const obj = form.getFieldsValue(); const obj = form.getFieldsValue();
// 更新描述 // 更新描述
// updateConnDesc({
// _version: 9999,
// _dc: new Date().getTime(),
// ip: obj.ip,
// dbName: obj.dbName,
// userName: obj.userName,
// password: obj.password,
// desc,
// })
// .then(res => {
// setModalVisible(false);
// setUpData(upData + 1);
// })
// .catch(err => {
// console.error(err);
// setModalVisible(false);
// });
updateConnDescNew({ updateConnDescNew({
ip: obj.ip, ip: obj.ip,
dbName: obj.dbName, dbName: obj.dbName,
...@@ -498,12 +371,13 @@ const InitDataBase = props => { ...@@ -498,12 +371,13 @@ const InitDataBase = props => {
desc, desc,
}) })
.then(res => { .then(res => {
setModalVisible(false); handleShowModal('describeVisible', false);
setUpData(upData + 1); // setUpData(upData + 1);
getConnRecordData();
}) })
.catch(err => { .catch(err => {
console.error(err); console.error(err);
setModalVisible(false); handleShowModal('describeVisible', false);
}); });
}; };
// 删除数据库连接记录 // 删除数据库连接记录
...@@ -516,7 +390,8 @@ const InitDataBase = props => { ...@@ -516,7 +390,8 @@ const InitDataBase = props => {
.then(res => { .then(res => {
setTableLoading(false); setTableLoading(false);
if (res.code === 0) { if (res.code === 0) {
setUpData(upData + 1); // setUpData(upData + 1);
getConnRecordData();
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
...@@ -534,25 +409,192 @@ const InitDataBase = props => { ...@@ -534,25 +409,192 @@ const InitDataBase = props => {
setTableLoading(false); setTableLoading(false);
console.error(err); console.error(err);
}); });
// deleteConnNew({ };
// rowIndex: key // 获取数据库初始化回显列表
// }).then(res => { const getInitList = () => {
// setTableLoading(false); setInitList([]);
// if (res.code == 0) { handleShowModal('initVisible', true);
// setUpData(upData + 1); setInitLoading(true);
// notification.success({ let obj = form.getFieldsValue();
// message: '提示', let req1 = GetProductList();
// duration: 3, let req2 = GetDbProduct({ ...obj });
// description: '操作成功', Promise.all([req1, req2])
// }); .then(res => {
// } else { if (res[1].code !== 0 || res[0].code !== 0) {
// notification.error({ setInitLoading(false);
// message: '提示', notification.error({
// duration: 15, message: '提示',
// description: res.msg, duration: 3,
// }); description: '连接失败',
// } });
// }) return;
}
setDbExists(res[1].data.DBExists);
let fileList = res[0].data ? res[0].data : [];
let dataList = res[1].data.Product ? res[1].data.Product : [];
// 没有库或者dataList为[]直接用fileList作为回显
if (!res[1].data.DBExists || dataList.length === 0) {
setInitList(fileList);
setInitLoading(false);
return;
}
let mapList = new Map();
// 通过map给数据库中中的节点中的key的值当作key,checkVersion当作value进行存储
dataList.forEach(element => {
// 存入一级目录是否有选中项的key
mapList.set(element.key, element.check);
element.modularSolutions.forEach(item => {
// 存入二级目录对应的选中的checkVersion跟check
mapList.set(item.key, {
checkVersion: item.checkVersion,
check: item.check,
});
item.functionrSolutions.forEach(val => {
// 存入三级目录对应的选中的checkVersion跟check
mapList.set(val.key, val.isCheck);
});
});
});
fileList.forEach(element => {
// 根据key来获取第一级目录tab的check
let tabKey = mapList.get(element.key);
element.check = tabKey === undefined ? null : tabKey;
element.modularSolutions.forEach(item => {
let mapCheckVersion = mapList.get(item.key);
// 根据key值去匹配对应的checkVersion
item.checkVersion =
mapCheckVersion.checkVersion === undefined
? null
: mapCheckVersion.checkVersion;
// 根据key值去匹配对应的二级目录的check
item.check =
mapCheckVersion.check === undefined
? null
: mapCheckVersion.check;
if (item.check) {
item.hasCheck = true;
}
item.functionrSolutions.forEach(val => {
// 根据三级目录对应的选中key匹配isCheck
let isCheck = mapList.get(val.key);
val.isCheck = isCheck === undefined ? null : isCheck;
// 版本号低于当前版本号禁止选用
if (item.checkVersion && val.version < item.checkVersion) {
val.disabled = true;
} else {
val.disabled = false;
}
});
});
});
setInitList(fileList);
setInitLoading(false);
})
.catch(() => {
notification.error({
message: '提示',
duration: 3,
description: '连接失败',
});
setInitLoading(false);
});
};
// 初始化产品列表渲染
const renderInitListItem = (tabItem, index) => (
<TabPane tab={tabItem.productName} key={index}>
<div className={styles.tabContainer}>
{tabItem.modularSolutions.map((item, num) => (
<React.Fragment key={item.key}>
{item.functionrSolutions.length > 0 ? (
<RadioBox
radioTitle={item.modularName}
radioOptions={item.functionrSolutions}
currentVal={item.checkVersion}
currentIndex={{ tabIndex: index, radioIndex: num }}
callBack={radioChange}
/>
) : null}
</React.Fragment>
))}
</div>
</TabPane>
);
// 单选选后的回调,改变数据
const radioChange = (index, value) => {
setInitList(val => {
const list = JSON.parse(JSON.stringify(val));
const secondList =
list[index.tabIndex].modularSolutions[index.radioIndex];
// 取消功能 一开始未选中的才能取消
if (value === secondList.checkVersion && !secondList.hasCheck) {
secondList.checkVersion = null;
value = null;
secondList.check = false;
} else {
// 修改选中的checkVersion值
secondList.checkVersion = value;
// 修改二级菜单的check字段
secondList.check = true;
}
// 修改一级菜单的check字段
list[index.tabIndex].check = !list[index.tabIndex].modularSolutions.every(
version => version.checkVersion === null,
);
// 修改单选isCheck字段
secondList.functionrSolutions.forEach(item => {
if (item.version === value) {
item.isCheck = true;
} else {
item.isCheck = false;
}
});
return list;
});
};
// 数据库初始化
const initDatabasePro = () => {
let productSetting = initList;
let obj = form.getFieldsValue();
// 数据库存在调用编辑接口否则调用新增接口
setInitLoading(true);
handleShowModal('initVisible', false);
setInitVisible(true);
doInitLog();
if (dbExists) {
InitEditDataBase({ ...obj, productSetting }).then(res => {
setInitLoading(false);
if (res.code === 0) {
notification.success({
message: '提示',
duration: 3,
description: '操作成功',
});
} else {
notification.error({
message: '提示',
duration: 15,
description: res.msg,
});
}
});
return;
}
InitAddDataBase({ ...obj, productSetting }).then(res => {
setInitLoading(false);
if (res.code === 0) {
notification.success({
message: '提示',
duration: 3,
description: '操作成功',
});
} else {
notification.error({
message: '提示',
duration: 15,
description: res.msg,
});
}
});
}; };
const columns = [ const columns = [
{ {
...@@ -694,38 +736,15 @@ const InitDataBase = props => { ...@@ -694,38 +736,15 @@ const InitDataBase = props => {
</Button> </Button>
</Space> </Space>
<Space> <Space>
<Popconfirm <Button
title="是否执行数据库初始化" type="primary"
okText="确认" onClick={() => {
cancelText="取消" getInitList();
onConfirm={() => { deleteInitDBLogNew();
initClick();
}} }}
> >
<Button type="primary">数据库初始化</Button> 数据库初始化
</Popconfirm> </Button>
{defaultSqlDir && (
<Select
placeholder="请选择解决方案"
style={{ width: '200px' }}
defaultValue={defaultSqlDir}
onChange={e => {
handleSelect(e);
}}
>
{allSqlDir &&
allSqlDir.map((item, index) => {
if (item === '产品方案 (GCK平台)') {
return null;
}
return (
<Option value={item} key={index}>
{item}
</Option>
);
})}
</Select>
)}
</Space> </Space>
</Space> </Space>
</div> </div>
...@@ -760,12 +779,12 @@ const InitDataBase = props => { ...@@ -760,12 +779,12 @@ const InitDataBase = props => {
// _version: 9999, // _version: 9999,
// _dc: Date.now(), // _dc: Date.now(),
// }); // });
deleteInitDBLogNew() deleteInitDBLogNew();
}} }}
width={800} width={800}
maskClosable={false} maskClosable={false}
bodyStyle={{ bodyStyle={{
height: '600px', height: '500px',
// overflowY: 'auto', // overflowY: 'auto',
}} }}
footer={[ footer={[
...@@ -773,6 +792,7 @@ const InitDataBase = props => { ...@@ -773,6 +792,7 @@ const InitDataBase = props => {
onClick={() => { onClick={() => {
handleClick(); handleClick();
}} }}
key="back"
type="primary" type="primary"
> >
关闭窗口 关闭窗口
...@@ -782,7 +802,7 @@ const InitDataBase = props => { ...@@ -782,7 +802,7 @@ const InitDataBase = props => {
<div <div
ref={scroll} ref={scroll}
style={{ style={{
maxHeight: '570px', maxHeight: '470px',
overflowY: 'auto', overflowY: 'auto',
marginRight: ' -24px', marginRight: ' -24px',
}} }}
...@@ -799,9 +819,9 @@ const InitDataBase = props => { ...@@ -799,9 +819,9 @@ const InitDataBase = props => {
<Modal <Modal
title="修改链接描述" title="修改链接描述"
visible={modalVisible} visible={modalVisible.describeVisible}
onOk={() => modalOkCallback()} onOk={() => modalOkCallback()}
onCancel={() => setModalVisible(false)} onCancel={() => handleShowModal('describeVisible', false)}
width="800px" width="800px"
bodyStyle={{ bodyStyle={{
minHeight: '100px', minHeight: '100px',
...@@ -827,6 +847,42 @@ const InitDataBase = props => { ...@@ -827,6 +847,42 @@ const InitDataBase = props => {
</Col> </Col>
</Row> </Row>
</Modal> </Modal>
{/* 初始化选择产品弹窗 */}
<Modal
title="初始化"
maskClosable={false}
visible={modalVisible.initVisible}
onCancel={() => handleShowModal('initVisible', false)}
footer={[
<Button
key="back"
onClick={() => handleShowModal('initVisible', false)}
>
取消
</Button>,
<Popconfirm
placement="topLeft"
title="是否确认初始化"
onConfirm={initDatabasePro}
okText="确认"
key="submit"
cancelText="取消"
>
<Button type="primary" loading={initLoading}>
确认
</Button>
</Popconfirm>,
]}
width={900}
>
<Spin spinning={initLoading}>
<div className={styles.cardContainer}>
<Tabs defaultActiveKey="1" type="card" tabBarGutter={-1}>
{initList.map((item, index) => renderInitListItem(item, index))}
</Tabs>
</div>
</Spin>
</Modal>
</PageContainer> </PageContainer>
</> </>
); );
......
.tableTitle{ .tableTitle {
font-size: 16px; font-size: 16px;
} }
.mgTop20{ .mgTop20 {
margin-top: 20px !important; margin-top: 20px !important;
} }
.tCenter{ .tCenter {
text-align: center; text-align: center;
} }
.decsBox{ .decsBox {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
} }
.btnBox { .btnBox {
display: flex !important; display: flex !important;
justify-content: space-between; justify-content: space-between;
} }
\ No newline at end of file .ant-modal-header {
height: 70px;
}
.cardContainer {
margin-top: 10px;
border: 1px solid #ecf0fa;
border-top: none;
.ant-tabs-nav {
background-color: #f4f6fc;
.ant-tabs-tab {
background-color: transparent;
border: none;
border-top: 2px solid transparent;
box-sizing: content-box;
}
.ant-tabs-tab-active {
border: none;
background-color: #fff;
border-top: 2px solid #1685ff;
}
}
.tabContainer {
padding-left: 20px;
box-sizing: border-box;
}
}
...@@ -16,7 +16,7 @@ import { ...@@ -16,7 +16,7 @@ import {
tableCheckNew, tableCheckNew,
updateDateBase, updateDateBase,
databaseStandardGetLog, databaseStandardGetLog,
databaseStandardGetLogNew databaseStandardGetLogNew,
} from '@/services/database/api'; } from '@/services/database/api';
const ManagementDataBase = () => { const ManagementDataBase = () => {
...@@ -65,7 +65,7 @@ const ManagementDataBase = () => { ...@@ -65,7 +65,7 @@ const ManagementDataBase = () => {
setCheckLoading(false); setCheckLoading(false);
console.log(resnew); console.log(resnew);
if (resnew.code == 0) { if (resnew.code == 0) {
let res = resnew.data let res = resnew.data;
const { Autolist, ManualList } = res; const { Autolist, ManualList } = res;
// 自动检测列表 // 自动检测列表
let arr = Autolist.map((item, index) => { let arr = Autolist.map((item, index) => {
...@@ -112,7 +112,7 @@ const ManagementDataBase = () => { ...@@ -112,7 +112,7 @@ const ManagementDataBase = () => {
.then(resnew => { .then(resnew => {
setLogLoading(false); setLogLoading(false);
if (resnew.code == 0) { if (resnew.code == 0) {
let res = resnew.data.list let res = resnew.data.list;
let arr = []; let arr = [];
res.map((item, index) => { res.map((item, index) => {
item.key = index; item.key = index;
...@@ -138,7 +138,7 @@ const ManagementDataBase = () => { ...@@ -138,7 +138,7 @@ const ManagementDataBase = () => {
setCheckLoading(false); setCheckLoading(false);
setCheckFlag(checkFlag + 1); setCheckFlag(checkFlag + 1);
setUpFlag(upFlag + 1); setUpFlag(upFlag + 1);
if (res.code===0) { if (res.code === 0) {
notification.success({ notification.success({
message: '通知', message: '通知',
duration: 3, duration: 3,
...@@ -166,7 +166,7 @@ const ManagementDataBase = () => { ...@@ -166,7 +166,7 @@ const ManagementDataBase = () => {
setModalVisible(true); setModalVisible(true);
// setContent(text); // setContent(text);
setContent(arr); setContent(arr);
} };
const handleLog = (text, val) => { const handleLog = (text, val) => {
setModalTitle(val); setModalTitle(val);
let arr = []; let arr = [];
...@@ -296,11 +296,11 @@ const ManagementDataBase = () => { ...@@ -296,11 +296,11 @@ const ManagementDataBase = () => {
onClick={() => { onClick={() => {
handleLog(text, '详细信息'); handleLog(text, '详细信息');
}} }}
style={{ backgroundColor: "red" }} style={{ backgroundColor: 'red' }}
> >
错误内容 错误内容
</Button> </Button>
) );
} }
}, },
}, },
...@@ -366,7 +366,6 @@ const ManagementDataBase = () => { ...@@ -366,7 +366,6 @@ const ManagementDataBase = () => {
size="small" size="small"
/> />
</Card> </Card>
</PageContainer> </PageContainer>
<Modal <Modal
...@@ -384,7 +383,11 @@ const ManagementDataBase = () => { ...@@ -384,7 +383,11 @@ const ManagementDataBase = () => {
}} }}
style={{ top: '40px' }} style={{ top: '40px' }}
footer={[ footer={[
<Button type="primary" onClick={() => setModalVisible(false)}> <Button
type="primary"
onClick={() => setModalVisible(false)}
key="back"
>
关闭窗口 关闭窗口
</Button>, </Button>,
]} ]}
......
...@@ -203,6 +203,7 @@ const SQLServerTable = props => { ...@@ -203,6 +203,7 @@ const SQLServerTable = props => {
size="small" size="small"
type="primary" type="primary"
onClick={() => handleCon(val, item)} onClick={() => handleCon(val, item)}
key="testLink"
> >
测试连接 测试连接
</Button>, </Button>,
...@@ -213,12 +214,14 @@ const SQLServerTable = props => { ...@@ -213,12 +214,14 @@ const SQLServerTable = props => {
color: '#faad14', color: '#faad14',
borderColor: '#ffe58f', borderColor: '#ffe58f',
}} }}
key="bntEdit"
size="small" size="small"
onClick={() => handleEdit(val, item)} onClick={() => handleEdit(val, item)}
> >
编辑 编辑
</Button>, </Button>,
<Popconfirm <Popconfirm
key="btnDelete"
title={`是否删除连接${item.name}`} title={`是否删除连接${item.name}`}
cancelText="取消" cancelText="取消"
okText="确认" okText="确认"
...@@ -236,7 +239,7 @@ const SQLServerTable = props => { ...@@ -236,7 +239,7 @@ const SQLServerTable = props => {
<> <>
<ProTable <ProTable
headerTitle="SQL数据库" headerTitle="SQL数据库"
rowKey="key" rowKey="name"
search={false} search={false}
columns={columns} columns={columns}
bordered bordered
......
...@@ -50,7 +50,7 @@ const SiteConfig = props => { ...@@ -50,7 +50,7 @@ const SiteConfig = props => {
let obj = {}; let obj = {};
let arr = Object.keys(form.getFieldsValue()); let arr = Object.keys(form.getFieldsValue());
arr.map(k => { arr.map(k => {
obj[k] = res[k]; obj[k] = res.data[k];
}); });
form.setFieldsValue(obj); form.setFieldsValue(obj);
}) })
...@@ -67,14 +67,10 @@ const SiteConfig = props => { ...@@ -67,14 +67,10 @@ const SiteConfig = props => {
setLoading(true); setLoading(true);
const obj = { ...form.getFieldsValue() }; const obj = { ...form.getFieldsValue() };
let params = { ...obj, mode: 'single', client: clientName }; let params = { ...obj, mode: 'single', client: clientName };
editWebsite(params, { editWebsite(params)
headers: {
'content-type': 'application/x-www-form-urlencggoded;charset=UTF-8',
},
})
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (res.success) { if (res.code === 0) {
submitCallback(obj.title); submitCallback(obj.title);
notification.success({ notification.success({
message: '提示', message: '提示',
......
...@@ -43,14 +43,10 @@ const AddConfig = props => { ...@@ -43,14 +43,10 @@ const AddConfig = props => {
setLoading(true); setLoading(true);
const obj = { ...form.getFieldsValue() }; const obj = { ...form.getFieldsValue() };
let params = { ...obj, mode: 'single' }; let params = { ...obj, mode: 'single' };
addWebsite(params, { addWebsite(params)
headers: {
'content-type': 'application/x-www-form-urlencggoded;charset=UTF-8',
},
})
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (res.code===0) { if (res.code === 0) {
addCallback(params.title); addCallback(params.title);
notification.success({ notification.success({
message: '提示', message: '提示',
......
...@@ -141,7 +141,7 @@ const MobileConfigPage = props => { ...@@ -141,7 +141,7 @@ const MobileConfigPage = props => {
}) })
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (res.success) { if (res.code === 0) {
setMiniTitle(''); setMiniTitle('');
setTimeout(() => { setTimeout(() => {
setFlag(flag + 1); setFlag(flag + 1);
......
...@@ -303,7 +303,7 @@ const MiniMenu = props => { ...@@ -303,7 +303,7 @@ const MiniMenu = props => {
}) })
.then(res => { .then(res => {
setSubmitLoading(false); setSubmitLoading(false);
if (res.success) { if (res.code === 0) {
setAddVisible(false); setAddVisible(false);
setAddTwoVisible(false); setAddTwoVisible(false);
setFlag(flag + 1); setFlag(flag + 1);
......
...@@ -34,39 +34,41 @@ const VisibleRoleModal = props => { ...@@ -34,39 +34,41 @@ const VisibleRoleModal = props => {
useEffect(() => { useEffect(() => {
let isUnmount = false let isUnmount = false
console.log('selectValue', selectValue);
if (selectValue) { if (selectValue) {
setSelectRole(selectValue) setSelectRole(selectValue)
RoleGroupList().then(async res => { }
let tree = [] RoleGroupList().then(async res => {
let leafs = [] let tree = []
res.data && res.data.roleList.map((item, index) => { let leafs = []
tree.push({ res.data && res.data.roleList.map((item, index) => {
name: item.visibleTitle, tree.push({
id: index, name: item.visibleTitle,
children: item.roleList.map((roleItem) => { id: index,
leafs.push({ children: item.roleList.map((roleItem) => {
name: roleItem.roleName, leafs.push({
id: roleItem.roleID, name: roleItem.roleName,
}) id: roleItem.roleID,
const leafNode = {
name: roleItem.roleName,
id: roleItem.roleID,
children: []
}
return leafNode
}) })
const leafNode = {
name: roleItem.roleName,
id: roleItem.roleID,
children: []
}
return leafNode
}) })
}) })
if (!isUnmount) { })
setDataTree(tree) if (!isUnmount) {
setDataLeafs(leafs) setDataTree(tree)
} setDataLeafs(leafs)
return () => isUnmount = true;
} }
)
} }
return () => isUnmount = true; )
}, [selectValue]) }, [selectValue])
......
...@@ -128,8 +128,6 @@ const AddModal = props => { ...@@ -128,8 +128,6 @@ const AddModal = props => {
pipeArr.push(item.ServiceName.split(".")[0]) pipeArr.push(item.ServiceName.split(".")[0])
}) })
} }
console.log('pipeArr', pipeArr);
console.log('baseMap', baseMap);
setPipeArr(pipeArr) setPipeArr(pipeArr)
setBaseMap(baseMap) setBaseMap(baseMap)
form.setFieldsValue({ form.setFieldsValue({
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
PlusOutlined PlusOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { import {
deleteConfig, setServiceType, SetServiceConfig,GetMaplayerByTerminalType deleteConfig, setServiceType, SetServiceConfig, GetMaplayerByTerminalType
} from '@/services/webConfig/api'; } from '@/services/webConfig/api';
import { import {
UserAddOutlined UserAddOutlined
...@@ -57,7 +57,7 @@ const VectorData = props => { ...@@ -57,7 +57,7 @@ const VectorData = props => {
<Space> <Space>
<Space> <Space>
<div onClick={() => pickRole(record)} style={{ cursor: 'pointer' }}> <div onClick={() => pickRole(record)} style={{ cursor: 'pointer' }}>
<VisibleRoleModal onSubmit={onPushSubmit} title={"关联角色"} initValues ={record.roles!=null?record.roles.split(","):[]} operate={<UserAddOutlined />} /> <VisibleRoleModal onSubmit={onPushSubmit} title={"关联角色"} initValues={record.roles != null ? record.roles.split(",") : []} operate={<UserAddOutlined />} />
</div> </div>
</Space> </Space>
</Space> </Space>
...@@ -117,7 +117,7 @@ const VectorData = props => { ...@@ -117,7 +117,7 @@ const VectorData = props => {
render: (text, record, index) => ( render: (text, record, index) => (
<Space> <Space>
<div onClick={() => pickRole(record)} style={{ cursor: 'pointer' }}> <div onClick={() => pickRole(record)} style={{ cursor: 'pointer' }}>
<VisibleRoleModal onSubmit={onPushSubmit} title={"关联角色"} initValues ={record.roles!=null?record.roles.split(","):[]} operate={<UserAddOutlined />} /> <VisibleRoleModal onSubmit={onPushSubmit} selectValue={[]} title={"关联角色"} initValues={record.roles != null ? record.roles.split(",") : []} operate={<UserAddOutlined />} />
</div> </div>
</Space> </Space>
), ),
...@@ -168,16 +168,17 @@ const VectorData = props => { ...@@ -168,16 +168,17 @@ const VectorData = props => {
else { else {
prompt('fail', '关联角色失败') prompt('fail', '关联角色失败')
} }
}).catch(err=>{ }).catch(err => {
prompt('fail', '网络请求失败') prompt('fail', '网络请求失败')
}) })
} }
} }
//获取角色 //获取角色
const pickRole = (record) => { const pickRole = (record) => {
console.log('recird', record);
setRecord(record) setRecord(record)
} }
//设置web方案 //设置web方案
...@@ -420,8 +421,8 @@ const VectorData = props => { ...@@ -420,8 +421,8 @@ const VectorData = props => {
isBaseMap: false isBaseMap: false
}) })
Promise.all([schemeConfigQueryRequest, webSchemeQueryRequest]).then(res => { Promise.all([schemeConfigQueryRequest, webSchemeQueryRequest]).then(res => {
console.log('res',res); console.log('res', res);
if (res[0].msg==="Ok" && res[0].data.phone) { if (res[0].msg === "Ok" && res[0].data.phone) {
let arr = [] let arr = []
res[0].data.phone.optionalLayer.layers.map((item, index) => { res[0].data.phone.optionalLayer.layers.map((item, index) => {
if (item.isDefault) { if (item.isDefault) {
...@@ -437,7 +438,7 @@ const VectorData = props => { ...@@ -437,7 +438,7 @@ const VectorData = props => {
setHandStatus(arr) setHandStatus(arr)
} }
if (res[1].msg==="Ok" && res[1].data.web) { if (res[1].msg === "Ok" && res[1].data.web) {
let arr = [] let arr = []
res[1].data.web.optionalLayer.layers.map((item, index) => { res[1].data.web.optionalLayer.layers.map((item, index) => {
if (item.type === "pipenet") { if (item.type === "pipenet") {
...@@ -452,7 +453,7 @@ const VectorData = props => { ...@@ -452,7 +453,7 @@ const VectorData = props => {
setWebStatus(arr) setWebStatus(arr)
} }
setCheckLoading(false) setCheckLoading(false)
}).catch(e=>{ }).catch(e => {
setCheckLoading(false) setCheckLoading(false)
}) })
......
...@@ -163,7 +163,8 @@ const standingBook = props => { ...@@ -163,7 +163,8 @@ const standingBook = props => {
}) })
console.log(arr) console.log(arr)
setAllData(arr); setAllData(arr);
setPickItem(newArr[0]) // 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
flag === 0 ? setPickItem(newArr[0]) : setPickItem(pickItem);
console.log(newArr, 'newArr'); console.log(newArr, 'newArr');
setTableData(newArr); setTableData(newArr);
} }
......
...@@ -25,7 +25,7 @@ import { ...@@ -25,7 +25,7 @@ import {
FormOutlined, FormOutlined,
EditOutlined, EditOutlined,
DeleteOutlined, DeleteOutlined,
UserAddOutlined UserAddOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { import {
setMenuToRole, setMenuToRole,
...@@ -47,7 +47,7 @@ import EditModal from './EditModal'; ...@@ -47,7 +47,7 @@ import EditModal from './EditModal';
import EditGroup from './EditGroup'; import EditGroup from './EditGroup';
import userStyles from '@/pages/userCenter/userManage/UserManage.less'; import userStyles from '@/pages/userCenter/userManage/UserManage.less';
import iconStyles from '@/assets/font/omsfont/iconfont.css'; import iconStyles from '@/assets/font/omsfont/iconfont.css';
import UserModal from './UserModal' import UserModal from './UserModal';
import { data } from '@/pages/platformCenter/messageManage/projectManage/components/Mock'; import { data } from '@/pages/platformCenter/messageManage/projectManage/components/Mock';
const { Search } = Input; const { Search } = Input;
...@@ -131,7 +131,9 @@ const SiteManage = () => { ...@@ -131,7 +131,9 @@ const SiteManage = () => {
}; };
useEffect(() => { useEffect(() => {
console.log('进入');
if (!roleID) return; if (!roleID) return;
console.log('选择后');
setLoading(true); setLoading(true);
const defaultConfig = { const defaultConfig = {
optionsList: [], optionsList: [],
...@@ -146,8 +148,8 @@ const SiteManage = () => { ...@@ -146,8 +148,8 @@ const SiteManage = () => {
.then(res => { .then(res => {
const list = []; const list = [];
// eslint-disable-next-line no-unused-expressions // eslint-disable-next-line no-unused-expressions
res.code===0 && res.code === 0 &&
res.root.forEach(item => { res.data.root.forEach(item => {
list.push({ ...defaultConfig, ...item }); list.push({ ...defaultConfig, ...item });
}); });
const finalList = buildMap(list); const finalList = buildMap(list);
...@@ -189,7 +191,6 @@ const SiteManage = () => { ...@@ -189,7 +191,6 @@ const SiteManage = () => {
}; };
// 树形数据转换; // 树形数据转换;
const transTree = val => { const transTree = val => {
let arr = val; let arr = val;
let newArr = []; let newArr = [];
// 提取child里面的数组 // 提取child里面的数组
...@@ -239,27 +240,44 @@ const SiteManage = () => { ...@@ -239,27 +240,44 @@ const SiteManage = () => {
{i.roleID && ( {i.roleID && (
<> <>
<Tooltip title="编辑角色" className={styles.fs}> <Tooltip title="编辑角色" className={styles.fs}>
<FormOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>editorUser(e,i)} /> <FormOutlined
</Tooltip><Tooltip title="删除角色" className={styles.fs}> style={{ fontSize: '16px', color: '#1890FF' }}
<DeleteOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>deletesUser(e,i)} /> onClick={e => editorUser(e, i)}
</Tooltip><Tooltip title="关联用户" className={styles.fs}> />
<UserAddOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>relevancyUser(e,i)} /> </Tooltip>
</Tooltip></> <Tooltip title="删除角色" className={styles.fs}>
<DeleteOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => deletesUser(e, i)}
/>
</Tooltip>
<Tooltip title="关联用户" className={styles.fs}>
<UserAddOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => relevancyUser(e, i)}
/>
</Tooltip>
</>
)} )}
{!i.roleID && ( {!i.roleID && (
<Tooltip title="新增角色" className={styles.fs}> <Tooltip title="新增角色" className={styles.fs}>
<PlusSquareOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>addsUser(e,i)} /> <PlusSquareOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => addsUser(e, i)}
/>
</Tooltip> </Tooltip>
)} )}
{i.groupflag && ( {i.groupflag && (
<Tooltip title="编辑分组" className={styles.fs}> <Tooltip title="编辑分组" className={styles.fs}>
<EditOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>editorGroup(e,i)} /> <EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => editorGroup(e, i)}
/>
</Tooltip> </Tooltip>
)} )}
</div> </div>
</div> </div>
) );
i.key = i.roleID; i.key = i.roleID;
i.subSystemValue = item.visibleValue; i.subSystemValue = item.visibleValue;
i.group = itemRole.visibleTitle; i.group = itemRole.visibleTitle;
...@@ -279,7 +297,6 @@ const SiteManage = () => { ...@@ -279,7 +297,6 @@ const SiteManage = () => {
setItemObj(itemRole); setItemObj(itemRole);
// setCurrentSelectId(roleID); // setCurrentSelectId(roleID);
} }
} }
itemRole.title = ( itemRole.title = (
<div className={styles.title}> <div className={styles.title}>
...@@ -288,27 +305,44 @@ const SiteManage = () => { ...@@ -288,27 +305,44 @@ const SiteManage = () => {
{itemRole.roleID && ( {itemRole.roleID && (
<> <>
<Tooltip title="编辑角色" className={styles.fs}> <Tooltip title="编辑角色" className={styles.fs}>
<FormOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>editorUser(e,itemRole)} /> <FormOutlined
</Tooltip><Tooltip title="删除角色" className={styles.fs}> style={{ fontSize: '16px', color: '#1890FF' }}
<DeleteOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>deletesUser(e,itemRole)} /> onClick={e => editorUser(e, itemRole)}
</Tooltip><Tooltip title="关联用户" className={styles.fs}> />
<UserAddOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>relevancyUser(e,itemRole)} /> </Tooltip>
</Tooltip></> <Tooltip title="删除角色" className={styles.fs}>
<DeleteOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => deletesUser(e, itemRole)}
/>
</Tooltip>
<Tooltip title="关联用户" className={styles.fs}>
<UserAddOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => relevancyUser(e, itemRole)}
/>
</Tooltip>
</>
)} )}
{!itemRole.roleID && ( {!itemRole.roleID && (
<Tooltip title="新增角色" className={styles.fs}> <Tooltip title="新增角色" className={styles.fs}>
<PlusSquareOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>addsUser(e,itemRole)} /> <PlusSquareOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => addsUser(e, itemRole)}
/>
</Tooltip> </Tooltip>
)} )}
{itemRole.groupflag && ( {itemRole.groupflag && (
<Tooltip title="编辑分组" className={styles.fs}> <Tooltip title="编辑分组" className={styles.fs}>
<EditOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>editorGroup(e,itemRole)} /> <EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => editorGroup(e, itemRole)}
/>
</Tooltip> </Tooltip>
)} )}
</div> </div>
</div> </div>
) );
return itemRole; return itemRole;
}); });
} }
...@@ -320,62 +354,80 @@ const SiteManage = () => { ...@@ -320,62 +354,80 @@ const SiteManage = () => {
{item.roleID && ( {item.roleID && (
<> <>
<Tooltip title="编辑角色" className={styles.fs}> <Tooltip title="编辑角色" className={styles.fs}>
<FormOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>editorUser(e,item)} /> <FormOutlined
</Tooltip><Tooltip title="删除角色" className={styles.fs}> style={{ fontSize: '16px', color: '#1890FF' }}
<DeleteOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>deletesUser(e,item)} /> onClick={e => editorUser(e, item)}
</Tooltip><Tooltip title="关联用户" className={styles.fs}> />
<UserAddOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>relevancyUser(e,item)} /> </Tooltip>
</Tooltip></> <Tooltip title="删除角色" className={styles.fs}>
<DeleteOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => deletesUser(e, item)}
/>
</Tooltip>
<Tooltip title="关联用户" className={styles.fs}>
<UserAddOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => relevancyUser(e, item)}
/>
</Tooltip>
</>
)} )}
{!item.roleID && ( {!item.roleID && (
<Tooltip title="新增角色" className={styles.fs}> <Tooltip title="新增角色" className={styles.fs}>
<PlusSquareOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>addsUser(e,item)} /> <PlusSquareOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => addsUser(e, item)}
/>
</Tooltip> </Tooltip>
)} )}
{item.groupflag && ( {item.groupflag && (
<Tooltip title="编辑分组" className={styles.fs}> <Tooltip title="编辑分组" className={styles.fs}>
<EditOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={e=>editorGroup(e,item)} /> <EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
onClick={e => editorGroup(e, item)}
/>
</Tooltip> </Tooltip>
)} )}
</div> </div>
</div> </div>
) );
return item; return item;
}); });
return arr3; return arr3;
}; };
//编辑角色 //编辑角色
const editorUser = (e,record) => { const editorUser = (e, record) => {
e.stopPropagation(); e.stopPropagation();
setItemObj(record); setItemObj(record);
setEditVisible(true); setEditVisible(true);
} };
//删除角色 //删除角色
const deletesUser = (e,record) => { const deletesUser = (e, record) => {
e.stopPropagation(); e.stopPropagation();
setItemObj(record); setItemObj(record);
setDelVisible(true); setDelVisible(true);
} };
//关联用户 //关联用户
const relevancyUser = (e,record) => { const relevancyUser = (e, record) => {
e.stopPropagation(); e.stopPropagation();
setItemObj(record); setItemObj(record);
setUserVisible(true) setUserVisible(true);
} };
//编辑分组 //编辑分组
const editorGroup = (e,record) => { const editorGroup = (e, record) => {
console.log(record,'1212') console.log(record, '1212');
e.stopPropagation(); e.stopPropagation();
setItemObj(record); setItemObj(record);
setGroupVisible(true); setGroupVisible(true);
} };
//新增角色 //新增角色
const addsUser = (e,record) => { const addsUser = (e, record) => {
e.stopPropagation(); e.stopPropagation();
setItemObj(record); setItemObj(record);
setModalVisible(true); setModalVisible(true);
} };
const handleChange = e => { const handleChange = e => {
const { value } = e.target; const { value } = e.target;
setSearchWord(value); setSearchWord(value);
...@@ -415,7 +467,7 @@ const SiteManage = () => { ...@@ -415,7 +467,7 @@ const SiteManage = () => {
setFlag(flag + 1); setFlag(flag + 1);
setItemObj(''); setItemObj('');
handleTreeSelect(saveCurId); handleTreeSelect(saveCurId);
} };
const valueCallback = valueObj => { const valueCallback = valueObj => {
setSubList(valueObj); setSubList(valueObj);
}; };
...@@ -424,20 +476,13 @@ const SiteManage = () => { ...@@ -424,20 +476,13 @@ const SiteManage = () => {
}; };
const handleCommit = results => { const handleCommit = results => {
setBtnLoading(true); setBtnLoading(true);
setMenuToRole( setMenuToRole({
qs.stringify({ roleID: Number(roleID),
roleID, menuIdList: String(results.flat()),
menuNameList: String(results.flat()), })
}),
{
headers: {
'content-type': 'application/x-www-form-urlencggoded;charset=UTF-8',
},
},
)
.then(res => { .then(res => {
setBtnLoading(false); setBtnLoading(false);
if (res.msg==='Ok') { if (res.code === 0) {
setValueList([...results.flat()]); setValueList([...results.flat()]);
notification.success({ notification.success({
message: '提示', message: '提示',
...@@ -457,8 +502,8 @@ const SiteManage = () => { ...@@ -457,8 +502,8 @@ const SiteManage = () => {
}); });
}; };
const handleUserAttach = () => { const handleUserAttach = () => {
setUserVisible(true) setUserVisible(true);
} };
return ( return (
<PageContainer> <PageContainer>
<div <div
......
...@@ -18,7 +18,7 @@ const EditModal = props => { ...@@ -18,7 +18,7 @@ const EditModal = props => {
editStation({ editStation({
stationName: res.stationName, stationName: res.stationName,
description: res.description, description: res.description,
stationID: stationObj, stationID: stationObj.id,
}) })
.then(res => { .then(res => {
setLoading(false); setLoading(false);
......
...@@ -70,6 +70,7 @@ const SiteManageV2 = () => { ...@@ -70,6 +70,7 @@ const SiteManageV2 = () => {
const [treeState, setTreeState] = useState(true); // 树第一次加载 const [treeState, setTreeState] = useState(true); // 树第一次加载
const [treeLoading, setTreeLoading] = useState(false); const [treeLoading, setTreeLoading] = useState(false);
const [currentStation, setCurrentStation] = useState(''); // 当前选中站点 const [currentStation, setCurrentStation] = useState(''); // 当前选中站点
const [currentStationMsg, setCurrentStationMsg] = useState({}); //当前编辑节点信息
const [currentStationOperate, setCurrentStationOperate] = useState(false) const [currentStationOperate, setCurrentStationOperate] = useState(false)
const [flag, setFlag] = useState(1);//操作标致触发界面刷新 const [flag, setFlag] = useState(1);//操作标致触发界面刷新
const [dataList, setdataList] = useState([]);//当前站点对应的分页用户列表 const [dataList, setdataList] = useState([]);//当前站点对应的分页用户列表
...@@ -131,7 +132,10 @@ const SiteManageV2 = () => { ...@@ -131,7 +132,10 @@ const SiteManageV2 = () => {
//编辑当前站点 //编辑当前站点
const editorSite = (e, recode) => { const editorSite = (e, recode) => {
e.stopPropagation(); e.stopPropagation();
setCurrentStation(recode.id); // console.log(recode);
// 保存编辑回显信息
setCurrentStationMsg(recode);
// setCurrentStation(recode.id);
handleShowModal('editVisible', true); handleShowModal('editVisible', true);
} }
// 重新渲染树 // 重新渲染树
...@@ -422,15 +426,10 @@ const SiteManageV2 = () => { ...@@ -422,15 +426,10 @@ const SiteManageV2 = () => {
description: '请至少选择选择一个用户!', description: '请至少选择选择一个用户!',
}); });
chooseUserToStation( chooseUserToStation(
qs.stringify({ {
userList: String(result.flat()), userList: String(result.flat()),
stationID: currentStation, stationID: currentStation,
}), }
{
headers: {
'content-type': 'application/x-www-form-urlencggoded;charset=UTF-8',
},
},
) )
.then(res => { .then(res => {
handleShowModal('btnLoading', false); handleShowModal('btnLoading', false);
...@@ -537,7 +536,7 @@ const SiteManageV2 = () => { ...@@ -537,7 +536,7 @@ const SiteManageV2 = () => {
/> />
<EditModal <EditModal
visible={visibleParams.editVisible} visible={visibleParams.editVisible}
stationObj={currentStation} stationObj={currentStationMsg}
onCancel={() => handleShowModal('editVisible', false)} onCancel={() => handleShowModal('editVisible', false)}
confirmModal={editModal} confirmModal={editModal}
/> />
......
...@@ -47,13 +47,13 @@ const EditForm = props => { ...@@ -47,13 +47,13 @@ const EditForm = props => {
<Item <Item
label="产品包名:" label="产品包名:"
name="PackageName" name="PackageName"
rules={[ // rules={[
{ // {
required: true, // required: true,
pattern: new RegExp(/^[a-z0-9A-Z]+$/), // pattern: new RegExp(/^[a-z0-9A-Z]+$/),
message: '产品包名必须是英文或者数字', // message: '产品包名必须是英文或者数字',
}, // },
]} // ]}
> >
<Input placeholder="请输入产品包名" allowClear disabled /> <Input placeholder="请输入产品包名" allowClear disabled />
</Item> </Item>
...@@ -86,12 +86,12 @@ const EditForm = props => { ...@@ -86,12 +86,12 @@ const EditForm = props => {
<Item <Item
label="发布状态:" label="发布状态:"
name="PublishState" name="PublishState"
rules={[ // rules={[
{ // {
required: true, // required: true,
message: '请选择发布状态', // message: '请选择发布状态',
}, // },
]} // ]}
> >
<Select placeholder="请选择发布状态" disabled> <Select placeholder="请选择发布状态" disabled>
{environmentList && {environmentList &&
......
...@@ -43,7 +43,7 @@ const WebConfigForm = props => { ...@@ -43,7 +43,7 @@ const WebConfigForm = props => {
const onGetLoginPages = () => { const onGetLoginPages = () => {
if (loginPages.length === 0) { if (loginPages.length === 0) {
getLoginPage().then(res => setLoginPages(res)); getLoginPage().then(res => setLoginPages(res.data));
} }
}; };
......
...@@ -44,7 +44,7 @@ const WebConfigPage = props => { ...@@ -44,7 +44,7 @@ const WebConfigPage = props => {
setLoading(true); setLoading(true);
updateModuleTree(userMode || 'super', canceled); updateModuleTree(userMode || 'super', canceled);
getAllConfigName().then(res => { getAllConfigName().then(res => {
if (!canceled.cancel) setConfigFiles(res); if (!canceled.cancel) setConfigFiles(res.data);
}); });
return () => { return () => {
canceled.cancel = true; canceled.cancel = true;
...@@ -105,7 +105,7 @@ const WebConfigPage = props => { ...@@ -105,7 +105,7 @@ const WebConfigPage = props => {
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (!canceled.cancel) { if (!canceled.cancel) {
setConfigObj(res); setConfigObj(res.data);
// setConfigObj(res.data); // setConfigObj(res.data);
if (webTitle === curWeb.text) { if (webTitle === curWeb.text) {
setToEdit(res); setToEdit(res);
......
...@@ -96,6 +96,7 @@ const AddForm = props => { ...@@ -96,6 +96,7 @@ const AddForm = props => {
rules={[ rules={[
{ {
required: true, required: true,
// pattern: /^[^\s]*$/,
message: '请输入功能路径', message: '请输入功能路径',
}, },
]} ]}
......
...@@ -167,8 +167,8 @@ const MiniMenu = props => { ...@@ -167,8 +167,8 @@ const MiniMenu = props => {
}) })
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (res.success) { if (res.code === 0) {
setInfo({ ...res }); setInfo({ ...res.data });
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
...@@ -197,7 +197,7 @@ const MiniMenu = props => { ...@@ -197,7 +197,7 @@ const MiniMenu = props => {
}) })
.then(res => { .then(res => {
setModalLoading(false); setModalLoading(false);
if (res.success) { if (res.code === 0) {
setDelVisible(false); setDelVisible(false);
setFlag(flag + 1); setFlag(flag + 1);
setNodeType(''); setNodeType('');
...@@ -263,10 +263,11 @@ const MiniMenu = props => { ...@@ -263,10 +263,11 @@ const MiniMenu = props => {
}; };
// 新增提交的回调 // 新增提交的回调
const submitCallback = (prop, item) => { const submitCallback = (prop, item) => {
console.log(subSystemValue, 'subSystemValue');
setSubmitLoading(true); setSubmitLoading(true);
let baseUrl = handleGeturl(prop.imageUrl); let baseUrl = handleGeturl(prop.imageUrl);
let obj = { ...prop, baseUrl }; let obj = { ...prop, baseUrl };
const parentID = item.menuID ? item.menuID : -1; const parentID = item.menuID ? Number(item.menuID) : -1;
addWebMenu({ addWebMenu({
_dc: Date.now(), _dc: Date.now(),
parentID, parentID,
...@@ -275,7 +276,7 @@ const MiniMenu = props => { ...@@ -275,7 +276,7 @@ const MiniMenu = props => {
}) })
.then(res => { .then(res => {
setSubmitLoading(false); setSubmitLoading(false);
if (res.success) { if (res.code === 0) {
setAddVisible(false); setAddVisible(false);
setAddTwoVisible(false); setAddTwoVisible(false);
setFlag(flag + 1); setFlag(flag + 1);
...@@ -307,14 +308,14 @@ const MiniMenu = props => { ...@@ -307,14 +308,14 @@ const MiniMenu = props => {
obj.relatedRoleList = String(roleList) || ''; obj.relatedRoleList = String(roleList) || '';
editWebMenu({ editWebMenu({
_dc: Date.now(), _dc: Date.now(),
menuID, menuID: Number(menuID),
// subSystemValue, // subSystemValue,
...obj, ...obj,
}) })
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (res.success) { if (res.code === 0) {
setFlag(flag + 1); setFlag(flag + 1);
// updateMenuTree('edit'); // updateMenuTree('edit');
notification.success({ notification.success({
...@@ -336,16 +337,20 @@ const MiniMenu = props => { ...@@ -336,16 +337,20 @@ const MiniMenu = props => {
setLoading(false); setLoading(false);
}); });
} else { } else {
pEditWebMenu({ // 新接口改为editWebMenu 原来为pEditWebMenu
editWebMenu({
_dc: Date.now(), _dc: Date.now(),
menuID, menuID: Number(menuID),
// subSystemValue, // subSystemValue,
...obj, ...obj,
product: null,
baseUrl: null,
hideInMenu: false,
}) })
.then(res => { .then(res => {
setLoading(false); setLoading(false);
if (res.success) { if (res.code === 0) {
setFlag(flag + 1); setFlag(flag + 1);
// updateMenuTree('edit'); // updateMenuTree('edit');
notification.success({ notification.success({
...@@ -357,7 +362,7 @@ const MiniMenu = props => { ...@@ -357,7 +362,7 @@ const MiniMenu = props => {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '编辑失败', description: res.msg || '编辑失败',
}); });
} }
}) })
...@@ -435,7 +440,7 @@ const MiniMenu = props => { ...@@ -435,7 +440,7 @@ const MiniMenu = props => {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
}).then(res => { }).then(res => {
if (res.success) { if (res.code === 0) {
// updateMenuTree(); // updateMenuTree();
setFlag(flag + 1); setFlag(flag + 1);
} else { } else {
......
...@@ -16,7 +16,7 @@ import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index'; ...@@ -16,7 +16,7 @@ import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
*/ */
// 测试数据库连接 // 测试数据库连接
export const connectionTest = params => export const connectionTest = params =>
get(`${PUBLISH_SERVICE}/DBManager/ConnectionTest`, params); post(`${PUBLISH_SERVICE}/DBManager/TestConnetions`, params);
// 获取数据库配置信息 // 获取数据库配置信息
export const getDataBaseConfigNew = params => export const getDataBaseConfigNew = params =>
...@@ -203,3 +203,16 @@ export const AddUserAuthSetting = params => ...@@ -203,3 +203,16 @@ export const AddUserAuthSetting = params =>
get(`${PUBLISH_SERVICE}/WebSite/AddUserAuthSetting`, params); get(`${PUBLISH_SERVICE}/WebSite/AddUserAuthSetting`, params);
export const GetUserAuthSet = params => export const GetUserAuthSet = params =>
get(`${PUBLISH_SERVICE}/WebSite/GetUserAuthSet`, params); get(`${PUBLISH_SERVICE}/WebSite/GetUserAuthSet`, params);
// 获取产品列表
export const GetProductList = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetProductList`, params);
// 获取产品方案配置
export const GetDbProduct = params =>
post(`${PUBLISH_SERVICE}/DBManager/GetDbProduct`, params);
// 数据库初始化
export const InitAddDataBase = params =>
post(`${PUBLISH_SERVICE}/DBManager/InitAddDataBase`, params);
// 二次初始化
export const InitEditDataBase = params =>
post(`${PUBLISH_SERVICE}/DBManager/InitEditDataBase`, params);
...@@ -3,11 +3,11 @@ import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index'; ...@@ -3,11 +3,11 @@ import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';
// 获取任务列表 // 获取任务列表
export const taskOptionsList = () => export const taskOptionsList = () =>
get(`/PandaCore/OMS/AIConfig/TaskOptionsList`); get(`${PUBLISH_SERVICE}/AIConfig/TaskOptionsList`);
// 获取设备类型 // 获取设备类型
export const getIotDeviceType = () => export const getIotDeviceType = () =>
get(`/PandaCore/OMS/AIConfig/GetIotDeviceType`); get(`${PUBLISH_SERVICE}/AIConfig/GetIotDeviceType`);
// 获取场景列表 // 获取场景列表
export const algorithmList = () => get(`/PandaCore/OMS/AIConfig/AlgorithmList`); export const algorithmList = () => get(`/PandaCore/OMS/AIConfig/AlgorithmList`);
...@@ -42,7 +42,7 @@ export const deleteTaskOptions = params => ...@@ -42,7 +42,7 @@ export const deleteTaskOptions = params =>
// 预测列表 // 预测列表
export const getPredictInfo = () => export const getPredictInfo = () =>
get(`/PandaCore/OMS/AIConfig/GetPredictInfo`); get(`${PUBLISH_SERVICE}/AIConfig/GetPredictInfo`);
// 预测新增 // 预测新增
export const addPredictOptions = params => export const addPredictOptions = params =>
......
...@@ -13,7 +13,7 @@ export const miniAppSiteTree = params => ...@@ -13,7 +13,7 @@ export const miniAppSiteTree = params =>
* title:'名称' * title:'名称'
*/ */
export const getWebsite = params => export const getWebsite = params =>
get(`${CITY_SERVICE}/OMS.svc/MiniApp_GetWebsite`, params); get(`${PUBLISH_SERVICE}/WebSite/MiniApp_GetWebsite`, params);
/** /**
* *
* @param {*} params * @param {*} params
...@@ -29,10 +29,10 @@ export const getWebsite = params => ...@@ -29,10 +29,10 @@ export const getWebsite = params =>
"cloudLogin":false "cloudLogin":false
*/ */
export const editWebsite = (params, options) => { export const editWebsite = (params, options) => {
let strParams = JSON.stringify(params); let strParams = params;
let qsParams = qs.stringify({ config: strParams }); let qsParams = strParams;
return post( return post(
`${CITY_SERVICE}/OMS.svc/MiniApp_EditWebsite?_version=9999`, `${PUBLISH_SERVICE}/WebSite/MiniApp_EditWebsite?_version=9999`,
qsParams, qsParams,
options, options,
); );
...@@ -65,7 +65,7 @@ export const getMiniAppModuleTree = params => ...@@ -65,7 +65,7 @@ export const getMiniAppModuleTree = params =>
} }
*/ */
export const addMenu = params => export const addMenu = params =>
get(`${CITY_SERVICE}/OMS.svc/MiniApp_AddMenu`, params); post(`${PUBLISH_SERVICE}/WebSite/MiniApp_AddMenu`, params);
// 获取菜单详情 // 获取菜单详情
/** /**
...@@ -90,14 +90,14 @@ export const getRoleListPlain = params => ...@@ -90,14 +90,14 @@ export const getRoleListPlain = params =>
// 删除小程序 // 删除小程序
export const deleteWebsite = params => export const deleteWebsite = params =>
get(`${CITY_SERVICE}/OMS.svc/MiniApp_DeleteWebsite`, params); get(`${PUBLISH_SERVICE}/WebSite/MiniApp_DeleteWebsite`, params);
// 新增小程序 // 新增小程序
export const addWebsite = (params, options) => { export const addWebsite = (params, options) => {
let strParams = JSON.stringify(params); // let strParams = JSON.stringify(params);
let qsParams = qs.stringify({ config: strParams }); // let qsParams = qs.stringify({ config: strParams });
return post( return post(
`${CITY_SERVICE}/OMS.svc/MiniApp_AddWebsite?_version=9999`, `${PUBLISH_SERVICE}/WebSite/MiniApp_AddWebsite?_version=9999`,
qsParams, params,
options, options,
); );
}; };
......
...@@ -22,7 +22,7 @@ export const getWebThemes = () => ...@@ -22,7 +22,7 @@ export const getWebThemes = () =>
* 获取登录模板下拉选项 * 获取登录模板下拉选项
*/ */
export const getLoginPage = () => export const getLoginPage = () =>
get(`${CITY_SERVICE}/OMS.svc/W4_GetLoginPage`, { query: '' }); get(`${PUBLISH_SERVICE}/WebSite/GetLoginPage`, { query: '' });
/** /**
* 获取地图配置下拉选项 * 获取地图配置下拉选项
...@@ -54,46 +54,44 @@ export const postEditWebConfig = (config, isAdd = false) => { ...@@ -54,46 +54,44 @@ export const postEditWebConfig = (config, isAdd = false) => {
}); });
return post( return post(
`${PUBLISH_SERVICE}/WebSite/${ `${PUBLISH_SERVICE}/WebSite/${
isAdd ? 'AddWebsite' : 'W4_EditWebsite' isAdd ? 'AddWebsite' : 'EditWebsite'
}?_version=9999`, }?_version=9999`,
qs.stringify({ config: JSON.stringify(obj) }), obj,
{
headers: {
'content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
},
},
); );
}; };
export const postAddWebSite = config => postEditWebConfig(config, true); export const postAddWebSite = config => postEditWebConfig(config, true);
export const deleteWebsite = client => export const deleteWebsite = client =>
get(`${CITY_SERVICE}/OMS.svc/W4_DeleteWebsite?_version=9999`, { client }); get(`${PUBLISH_SERVICE}/WebSite/DeleteWebsite?_version=9999`, { client });
/** /**
* 获取配置文件下拉选项 * 获取配置文件下拉选项
*/ */
export const getAllConfigName = () => export const getAllConfigName = () =>
get(`${CITY_SERVICE}/OMS.svc/W4_GetAllConfigName?_version=9999`); get(`${PUBLISH_SERVICE}/WebSite/GetAllConfigName?_version=9999`);
export const addWebMenu = param => { export const addWebMenu = param => {
const defaultConfig = { pageUrl: '' }; const defaultConfig = { pageUrl: '' };
// eslint-disable-next-line no-return-assign // eslint-disable-next-line no-return-assign
Object.keys(param).forEach(k => (defaultConfig[k] = param[k])); Object.keys(param).forEach(k => (defaultConfig[k] = param[k]));
return get(`${CITY_SERVICE}/OMS.svc/W4_AddMenu?_version=9999`, defaultConfig); return post(
`${PUBLISH_SERVICE}/WebSite/AddMenu?_version=9999`,
defaultConfig,
);
}; };
export const editWebMenu = param => export const editWebMenu = param =>
get(`${CITY_SERVICE}/OMS.svc/W4_EditMenu?_version=9999`, param); post(`${PUBLISH_SERVICE}/WebSite/EditMenu?_version=9999`, param);
export const pEditWebMenu = param => export const pEditWebMenu = param =>
get(`${CITY_SERVICE}/OMS.svc/P_EditMenu?_version=9999`, param); get(`${CITY_SERVICE}/OMS.svc/P_EditMenu?_version=9999`, param);
export const deleteWebMenu = param => export const deleteWebMenu = param =>
get(`${CITY_SERVICE}/OMS.svc/W4_DeleteMenu?_version=9999`, param); get(`${PUBLISH_SERVICE}/WebSite/DeleteMenu?_version=9999`, param);
export const getWebMenuInfo = param => export const getWebMenuInfo = param =>
get(`${CITY_SERVICE}/OMS.svc/P_GetMenuInfo?_version=9999`, param); get(`${PUBLISH_SERVICE}/PlatformCenter/GetMenuInfo?_version=9999`, param);
export const saveConfigContent = (fileName, content) => export const saveConfigContent = (fileName, content) =>
post( post(
...@@ -113,7 +111,7 @@ export const getConfigContent = name => ...@@ -113,7 +111,7 @@ export const getConfigContent = name =>
// 菜单拖拽 // 菜单拖拽
export const dragMenu = params => export const dragMenu = params =>
get(`${CITY_SERVICE}/OMS.svc/P_DragMenu`, params); get(`${PUBLISH_SERVICE}/PlatformCenter/DragMenu`, params);
// 获取产品列表 // 获取产品列表
export const getProductList = params => export const getProductList = 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