Commit 32ec6209 authored by mayongxin's avatar mayongxin

数据库管理接口替换

parent faa1c9e6
Pipeline #26926 skipped with stages
This diff is collapsed.
...@@ -13,8 +13,10 @@ import PageContainer from '@/components/BasePageContainer'; ...@@ -13,8 +13,10 @@ import PageContainer from '@/components/BasePageContainer';
import styles from './ManagementDataBase.less'; import styles from './ManagementDataBase.less';
import { import {
tableCheck, tableCheck,
tableCheckNew,
updateDateBase, updateDateBase,
databaseStandardGetLog, databaseStandardGetLog,
databaseStandardGetLogNew
} from '@/services/database/api'; } from '@/services/database/api';
const ManagementDataBase = () => { const ManagementDataBase = () => {
...@@ -31,22 +33,47 @@ const ManagementDataBase = () => { ...@@ -31,22 +33,47 @@ const ManagementDataBase = () => {
// 检查数据库表 // 检查数据库表
useEffect(() => { useEffect(() => {
setCheckLoading(true); setCheckLoading(true);
tableCheck({ // tableCheck({
_version: 9999, // _version: 9999,
_dc: new Date().getTime(), // _dc: new Date().getTime(),
}) // })
.then(res => { // .then(res => {
// setCheckLoading(false);
// console.log(res);
// if (res.sucess) {
// const { list, messageList } = res;
// // 自动检测列表
// let arr = list.map((item, index) => {
// item.key = index;
// return item;
// });
// // 手动检查列表
// let arr2 = messageList.map((item, index) => {
// item.key = index;
// return item;
// });
// setAutoCheckList(arr);
// setCheckList(arr2);
// }
// })
// .catch(err => {
// setCheckLoading(false);
// console.error(err);
// });
tableCheckNew()
.then(resnew => {
setCheckLoading(false); setCheckLoading(false);
console.log(res); console.log(resnew);
if (res.sucess) { if (resnew.code == 0) {
const { list, messageList } = res; let res = resnew.data
const { Autolist, ManualList } = res;
// 自动检测列表 // 自动检测列表
let arr = list.map((item, index) => { let arr = Autolist.map((item, index) => {
item.key = index; item.key = index;
return item; return item;
}); });
// 手动检查列表 // 手动检查列表
let arr2 = messageList.map((item, index) => { let arr2 = ManualList.map((item, index) => {
item.key = index; item.key = index;
return item; return item;
}); });
...@@ -62,13 +89,30 @@ const ManagementDataBase = () => { ...@@ -62,13 +89,30 @@ const ManagementDataBase = () => {
// 获取数据库升级记录 // 获取数据库升级记录
useEffect(() => { useEffect(() => {
setLogLoading(true); setLogLoading(true);
databaseStandardGetLog({ // databaseStandardGetLog({
_version: 9999, // _version: 9999,
_dc: new Date().getTime(), // _dc: new Date().getTime(),
}) // })
.then(res => { // .then(res => {
// setLogLoading(false);
// if (res) {
// let arr = [];
// res.map((item, index) => {
// item.key = index;
// arr.push(item);
// });
// setLogList(res);
// }
// })
// .catch(err => {
// setLogLoading(false);
// console.error(err);
// });
databaseStandardGetLogNew()
.then(resnew => {
setLogLoading(false); setLogLoading(false);
if (res) { if (resnew.code == 0) {
let res = resnew.data.list
let arr = []; let arr = [];
res.map((item, index) => { res.map((item, index) => {
item.key = index; item.key = index;
...@@ -116,6 +160,16 @@ const ManagementDataBase = () => { ...@@ -116,6 +160,16 @@ const ManagementDataBase = () => {
console.error(err); console.error(err);
}); });
}; };
const handleErrLog = (text, val) => {
setModalTitle(val);
let arr = [];
arr.push(
text.split(/(\r\n)|(\n)/).map((item, index) => <p key={index}>{item}</p>),
);
setModalVisible(true);
// setContent(text);
setContent(arr);
}
const handleLog = (text, val) => { const handleLog = (text, val) => {
setModalTitle(val); setModalTitle(val);
let arr = []; let arr = [];
...@@ -150,74 +204,74 @@ const ManagementDataBase = () => { ...@@ -150,74 +204,74 @@ const ManagementDataBase = () => {
const checkColumns = [ const checkColumns = [
{ {
title: '表名称', title: '表名称',
dataIndex: 'tableName', dataIndex: 'TableName',
key: 'tableName', key: 'TableName',
width: 200, width: 200,
ellipsis: true, ellipsis: true,
}, },
{ {
title: '差异比较', title: '差异比较',
dataIndex: 'message', dataIndex: 'Message',
key: 'message', key: 'Message',
ellipsis: true, ellipsis: true,
}, },
]; ];
const logColumns = [ const logColumns = [
{ {
title: '登录名', title: '登录名',
dataIndex: 'updateBy', dataIndex: 'UpdateBy',
key: 'updateBy', key: 'UpdateBy',
width: 200, width: 200,
ellipsis: true, ellipsis: true,
}, },
{ {
title: '数据库名称', title: '数据库名称',
dataIndex: 'name', dataIndex: 'Name',
key: 'name', key: 'Name',
width: 200, width: 200,
ellipsis: true, ellipsis: true,
}, },
{ {
title: '解决方案', title: '解决方案',
dataIndex: 'solutionName', dataIndex: 'DbProductName',
key: 'solutionName', key: 'DbProductName',
width: 200,
ellipsis: true,
},
{
title: '数据库版本',
dataIndex: 'version',
key: 'version',
width: 200, width: 200,
ellipsis: true, ellipsis: true,
}, },
// {
// title: '数据库版本',
// dataIndex: 'Version',
// key: 'Version',
// width: 200,
// ellipsis: true,
// },
{ {
title: '升级时间', title: '升级时间',
dataIndex: 'updateTime', dataIndex: 'UpdateTime',
key: 'updateTime', key: 'UpdateTime',
width: 200, width: 200,
ellipsis: true, ellipsis: true,
}, },
// {
// title: '版本日志',
// dataIndex: 'Oklog',
// key: 'Oklog',
// render: text => (
// <Button
// size="small"
// disabled={!text}
// onClick={() => {
// handleLog(text, '版本日志');
// }}
// >
// 日志
// </Button>
// ),
// },
{ {
title: '版本日志', title: '成功日志',
dataIndex: 'despersion', dataIndex: 'Oklog',
key: 'despersion', key: 'Oklog',
render: text => (
<Button
size="small"
disabled={!text}
onClick={() => {
handleLog(text, '版本日志');
}}
>
日志
</Button>
),
},
{
title: '升级内容',
dataIndex: 'content',
key: 'content',
ellipsis: true, ellipsis: true,
render: text => ( render: text => (
<Button <Button
...@@ -231,6 +285,28 @@ const ManagementDataBase = () => { ...@@ -231,6 +285,28 @@ const ManagementDataBase = () => {
</Button> </Button>
), ),
}, },
{
title: '错误日志',
dataIndex: 'Errlog',
key: 'Errlog',
ellipsis: true,
render: text => {
if (text.length > 0) {
return (
<Button
size="small"
type="primary"
onClick={() => {
handleLog(text, '详细信息');
}}
style={{ backgroundColor: "red" }}
>
错误内容
</Button>
)
}
},
},
]; ];
return ( return (
...@@ -268,17 +344,6 @@ const ManagementDataBase = () => { ...@@ -268,17 +344,6 @@ const ManagementDataBase = () => {
</div> </div>
</Spin> </Spin>
</Card> </Card>
<Card className={styles.mgTop20}>
<div className={styles.tableTitle}>数据库版本记录</div>
<Table
className={styles.mgTop20}
columns={logColumns}
dataSource={logList}
bordered
loading={logLoading}
size="small"
/>
</Card>
<Card className={styles.mgTop20}> <Card className={styles.mgTop20}>
<div className={styles.tableTitle}> <div className={styles.tableTitle}>
手动修复 手动修复
...@@ -293,6 +358,18 @@ const ManagementDataBase = () => { ...@@ -293,6 +358,18 @@ const ManagementDataBase = () => {
size="small" size="small"
/> />
</Card> </Card>
<Card className={styles.mgTop20}>
<div className={styles.tableTitle}>数据库版本记录</div>
<Table
className={styles.mgTop20}
columns={logColumns}
dataSource={logList}
bordered
loading={logLoading}
size="small"
/>
</Card>
</PageContainer> </PageContainer>
<Modal <Modal
......
...@@ -5,6 +5,9 @@ import { ...@@ -5,6 +5,9 @@ import {
getMongoDBConnString, getMongoDBConnString,
deleteConnString, deleteConnString,
getMongoDBConnectionTest, getMongoDBConnectionTest,
GetConnString,
DeleteConnString,
GetConnTest
} from '@/services/database/api'; } from '@/services/database/api';
import AddModal from './AddModal'; import AddModal from './AddModal';
const MongDBTable = props => { const MongDBTable = props => {
...@@ -17,19 +20,31 @@ const MongDBTable = props => { ...@@ -17,19 +20,31 @@ const MongDBTable = props => {
useEffect(() => { useEffect(() => {
setTableLoading(true); setTableLoading(true);
getMongoDBConnString({ // getMongoDBConnString({
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
// })
// .then(res => {
// setTableLoading(false);
// if (res) {
// setDataList(res);
// }
// })
// .catch(err => {
// setTableLoading(false);
// });
GetConnString({
Type:"MongoDB"
}).then(resnew => {
setTableLoading(false);
if (resnew.code == 0) {
let res = resnew.data
setDataList(res);
}
}) })
.then(res => { .catch(err => {
setTableLoading(false); setTableLoading(false);
if (res) { });
setDataList(res);
}
})
.catch(err => {
setTableLoading(false);
});
}, [flag]); }, [flag]);
// 新增 // 新增
const handleAdd = (val, item) => { const handleAdd = (val, item) => {
...@@ -39,57 +54,99 @@ const MongDBTable = props => { ...@@ -39,57 +54,99 @@ const MongDBTable = props => {
// 测试连接 // 测试连接
const handleCon = (val, item) => { const handleCon = (val, item) => {
setTableLoading(true); setTableLoading(true);
getMongoDBConnectionTest({ // getMongoDBConnectionTest({
name: item.name, // name: item.name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
// })
// .then(res => {
// setTableLoading(false);
// if (res.success) {
// notification.success({
// message: '提示',
// description: '连接成功',
// duration: 3,
// });
// } else {
// notification.error({
// message: '提示',
// description: res.message || '连接失败',
// duration: 3,
// });
// }
// })
// .catch(err => {
// setTableLoading(false);
// console.error(err);
// });
GetConnTest({
Type:"MongoDB",
name:item.name
}).then(res => {
setTableLoading(false);
if (res.code == 0) {
notification.success({
message: '提示',
description: '连接成功',
duration: 3,
});
} else {
notification.error({
message: '提示',
description: res.msg || '连接失败',
duration: 3,
});
}
}) })
.then(res => { .catch(err => {
setTableLoading(false); setTableLoading(false);
if (res.success) { console.error(err);
notification.success({ });
message: '提示',
description: '连接成功',
duration: 3,
});
} else {
notification.error({
message: '提示',
description: res.message || '连接失败',
duration: 3,
});
}
})
.catch(err => {
setTableLoading(false);
console.error(err);
});
}; };
// 删除 // 删除
const handleDel = (val, item) => { const handleDel = (val, item) => {
const { name = '' } = item; const { name = '' } = item;
deleteConnString({ // deleteConnString({
name, // name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setFlag(flag + 1);
// if (res.success) {
// notification.success({
// message: '提示',
// duration: 3,
// description: res.message || '删除成功',
// });
// } else {
// notification.error({
// message: '提示',
// duration: 3,
// description: res.message || '删除失败',
// });
// }
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
}).then(res => {
setFlag(flag + 1); setFlag(flag + 1);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除成功', description: res.msg || '删除成功',
}); });
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除失败', description: res.msg || '删除失败',
}); });
} }
}) })
.catch(err => console.error(err));
}; };
// 编辑 // 编辑
const handleEdit = (val, item) => { const handleEdit = (val, item) => {
......
...@@ -5,6 +5,9 @@ import { ...@@ -5,6 +5,9 @@ import {
getMySQLConnString, getMySQLConnString,
getMySQLConnectionTest, getMySQLConnectionTest,
deleteConnString, deleteConnString,
GetConnString,
DeleteConnString,
GetConnTest
} from '@/services/database/api'; } from '@/services/database/api';
import AddModal from './AddModal'; import AddModal from './AddModal';
const MySQLTable = props => { const MySQLTable = props => {
...@@ -17,13 +20,25 @@ const MySQLTable = props => { ...@@ -17,13 +20,25 @@ const MySQLTable = props => {
useEffect(() => { useEffect(() => {
setTableLoading(true); setTableLoading(true);
getMySQLConnString({ // getMySQLConnString({
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setTableLoading(false);
// if (res) {
// setDataList(res);
// }
// })
// .catch(err => {
// setTableLoading(false);
// });
GetConnString({
Type:"MySQL"
}).then(resnew => {
setTableLoading(false); setTableLoading(false);
if (res) { if (resnew.code == 0) {
let res = resnew.data
setDataList(res); setDataList(res);
} }
}) })
...@@ -39,14 +54,37 @@ const MySQLTable = props => { ...@@ -39,14 +54,37 @@ const MySQLTable = props => {
// 测试连接 // 测试连接
const handleCon = (val, item) => { const handleCon = (val, item) => {
setTableLoading(true); setTableLoading(true);
getMySQLConnectionTest({ // getMySQLConnectionTest({
name: item.name, // name: item.name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setTableLoading(false);
// if (res.success) {
// notification.success({
// message: '提示',
// description: '连接成功',
// duration: 3,
// });
// } else {
// notification.error({
// message: '提示',
// description: res.message || '连接失败',
// duration: 15,
// });
// }
// })
// .catch(err => {
// setTableLoading(false);
// console.error(err);
// });
GetConnTest({
Type:"MySQL",
name:item.name
}).then(res => {
setTableLoading(false); setTableLoading(false);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
description: '连接成功', description: '连接成功',
...@@ -55,8 +93,8 @@ const MySQLTable = props => { ...@@ -55,8 +93,8 @@ const MySQLTable = props => {
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
description: res.message || '连接失败', description: res.msg || '连接失败',
duration: 15, duration: 3,
}); });
} }
}) })
...@@ -68,28 +106,46 @@ const MySQLTable = props => { ...@@ -68,28 +106,46 @@ const MySQLTable = props => {
// 删除 // 删除
const handleDel = (val, item) => { const handleDel = (val, item) => {
const { name = '' } = item; const { name = '' } = item;
deleteConnString({ // deleteConnString({
name, // name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setFlag(flag + 1);
// if (res.success) {
// notification.success({
// message: '提示',
// duration: 3,
// description: res.message || '删除成功',
// });
// } else {
// notification.error({
// message: '提示',
// duration: 3,
// description: res.message || '删除失败',
// });
// }
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
}).then(res => {
setFlag(flag + 1); setFlag(flag + 1);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除成功', description: res.msg || '删除成功',
}); });
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除失败', description: res.msg || '删除失败',
}); });
} }
}) })
.catch(err => console.error(err));
}; };
// 编辑 // 编辑
const handleEdit = (val, item) => { const handleEdit = (val, item) => {
......
...@@ -5,6 +5,9 @@ import { ...@@ -5,6 +5,9 @@ import {
getOracleConnString, getOracleConnString,
getOracleConnectionTest, getOracleConnectionTest,
deleteConnString, deleteConnString,
GetConnString,
DeleteConnString,
GetConnTest
} from '@/services/database/api'; } from '@/services/database/api';
import AddModal from './AddModal'; import AddModal from './AddModal';
const OracleTable = props => { const OracleTable = props => {
...@@ -17,13 +20,25 @@ const OracleTable = props => { ...@@ -17,13 +20,25 @@ const OracleTable = props => {
useEffect(() => { useEffect(() => {
setTableLoading(true); setTableLoading(true);
getOracleConnString({ // getOracleConnString({
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setTableLoading(false);
// if (res) {
// setDataList(res);
// }
// })
// .catch(err => {
// setTableLoading(false);
// });
GetConnString({
Type:"Oracle"
}).then(resnew => {
setTableLoading(false); setTableLoading(false);
if (res) { if (resnew.code == 0) {
let res = resnew.data
setDataList(res); setDataList(res);
} }
}) })
...@@ -39,14 +54,37 @@ const OracleTable = props => { ...@@ -39,14 +54,37 @@ const OracleTable = props => {
// 测试连接 // 测试连接
const handleCon = (val, item) => { const handleCon = (val, item) => {
setTableLoading(true); setTableLoading(true);
getOracleConnectionTest({ // getOracleConnectionTest({
name: item.name, // name: item.name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setTableLoading(false);
// if (res.success) {
// notification.success({
// message: '提示',
// description: '连接成功',
// duration: 3,
// });
// } else {
// notification.error({
// message: '提示',
// description: res.message || '连接失败',
// duration: 3,
// });
// }
// })
// .catch(err => {
// setTableLoading(false);
// console.error(err);
// });
GetConnTest({
Type:"Oracle",
name:item.name
}).then(res => {
setTableLoading(false); setTableLoading(false);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
description: '连接成功', description: '连接成功',
...@@ -55,7 +93,7 @@ const OracleTable = props => { ...@@ -55,7 +93,7 @@ const OracleTable = props => {
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
description: res.message || '连接失败', description: res.msg || '连接失败',
duration: 3, duration: 3,
}); });
} }
...@@ -68,28 +106,46 @@ const OracleTable = props => { ...@@ -68,28 +106,46 @@ const OracleTable = props => {
// 删除 // 删除
const handleDel = (val, item) => { const handleDel = (val, item) => {
const { name = '' } = item; const { name = '' } = item;
deleteConnString({ // deleteConnString({
name, // name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setFlag(flag + 1);
// if (res.success) {
// notification.success({
// message: '提示',
// duration: 3,
// description: res.message || '删除成功',
// });
// } else {
// notification.error({
// message: '提示',
// duration: 3,
// description: res.message || '删除失败',
// });
// }
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
}).then(res => {
setFlag(flag + 1); setFlag(flag + 1);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除成功', description: res.msg || '删除成功',
}); });
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除失败', description: res.msg || '删除失败',
}); });
} }
}) })
.catch(err => console.error(err));
}; };
// 编辑 // 编辑
const handleEdit = (val, item) => { const handleEdit = (val, item) => {
......
...@@ -5,6 +5,9 @@ import { ...@@ -5,6 +5,9 @@ import {
getSQLServerConnString, getSQLServerConnString,
deleteConnString, deleteConnString,
getSQLServerConnectionTest, getSQLServerConnectionTest,
GetConnString,
DeleteConnString,
GetConnTest
} from '@/services/database/api'; } from '@/services/database/api';
import AddModal from './AddModal'; import AddModal from './AddModal';
const SQLServerTable = props => { const SQLServerTable = props => {
...@@ -17,13 +20,25 @@ const SQLServerTable = props => { ...@@ -17,13 +20,25 @@ const SQLServerTable = props => {
useEffect(() => { useEffect(() => {
setTableLoading(true); setTableLoading(true);
getSQLServerConnString({ // getSQLServerConnString({
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setTableLoading(false);
// if (res) {
// setDataList(res);
// }
// })
// .catch(err => {
// setTableLoading(false);
// });
GetConnString({
Type:"SQLServer"
}).then(resnew => {
setTableLoading(false); setTableLoading(false);
if (res) { if (resnew.code == 0) {
let res = resnew.data
setDataList(res); setDataList(res);
} }
}) })
...@@ -39,14 +54,37 @@ const SQLServerTable = props => { ...@@ -39,14 +54,37 @@ const SQLServerTable = props => {
// 测试连接 // 测试连接
const handleCon = (val, item) => { const handleCon = (val, item) => {
setTableLoading(true); setTableLoading(true);
getSQLServerConnectionTest({ // getSQLServerConnectionTest({
name: item.name, // name: item.name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setTableLoading(false);
// if (res.success) {
// notification.success({
// message: '提示',
// description: '连接成功',
// duration: 3,
// });
// } else {
// notification.error({
// message: '提示',
// description: res.message || '连接失败',
// duration: 3,
// });
// }
// })
// .catch(err => {
// setTableLoading(false);
// console.error(err);
// });
GetConnTest({
Type:"SQLServer",
name:item.name
}).then(res => {
setTableLoading(false); setTableLoading(false);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
description: '连接成功', description: '连接成功',
...@@ -55,7 +93,7 @@ const SQLServerTable = props => { ...@@ -55,7 +93,7 @@ const SQLServerTable = props => {
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
description: res.message || '连接失败', description: res.msg || '连接失败',
duration: 3, duration: 3,
}); });
} }
...@@ -68,28 +106,46 @@ const SQLServerTable = props => { ...@@ -68,28 +106,46 @@ const SQLServerTable = props => {
// 删除 // 删除
const handleDel = (val, item) => { const handleDel = (val, item) => {
const { name = '' } = item; const { name = '' } = item;
deleteConnString({ // deleteConnString({
name, // name,
_version: 9999, // _version: 9999,
_dc: Date.now(), // _dc: Date.now(),
}) // })
.then(res => { // .then(res => {
// setFlag(flag + 1);
// if (res.success) {
// notification.success({
// message: '提示',
// duration: 3,
// description: res.message || '删除成功',
// });
// } else {
// notification.error({
// message: '提示',
// duration: 3,
// description: res.message || '删除失败',
// });
// }
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
}).then(res => {
setFlag(flag + 1); setFlag(flag + 1);
if (res.success) { if (res.code == 0) {
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除成功', description: res.msg || '删除成功',
}); });
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.message || '删除失败', description: res.msg || '删除失败',
}); });
} }
}) })
.catch(err => console.error(err));
}; };
// 编辑 // 编辑
const handleEdit = (val, item) => { const handleEdit = (val, item) => {
......
...@@ -20,10 +20,14 @@ export const connectionTest = params => ...@@ -20,10 +20,14 @@ export const connectionTest = params =>
// 获取数据库配置信息 // 获取数据库配置信息
export const getDataBaseConfig = params => export const getDataBaseConfig = params =>
get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseConfig`, params); get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseConfig`, params);
export const getDataBaseConfigNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetDataBaseConfig`, params)
// 获取数据库连接记录 // 获取数据库连接记录
export const getConnRecord = params => export const getConnRecord = params =>
get(`${CITY_SERVICE}/OMS.svc/S_GetConnRecord`, params); get(`${CITY_SERVICE}/OMS.svc/S_GetConnRecord`, params);
export const getConnRecordNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetConnRecord`, params);
// 测试连接 // 测试连接
export const getConnectionTest = params => export const getConnectionTest = params =>
...@@ -32,6 +36,8 @@ export const getConnectionTest = params => ...@@ -32,6 +36,8 @@ export const getConnectionTest = params =>
// 保存数据库连接 // 保存数据库连接
export const saveConnection = params => export const saveConnection = params =>
get(`${CITY_SERVICE}/OMS.svc/S_SaveConnection`, params); get(`${CITY_SERVICE}/OMS.svc/S_SaveConnection`, params);
export const saveConnectionNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/SaveConnection`, params);
// 获取数据库列表 // 获取数据库列表
...@@ -41,18 +47,26 @@ export const getDataBaseList = params => ...@@ -41,18 +47,26 @@ export const getDataBaseList = params =>
// 数据库初始化 // 数据库初始化
export const initDBv4 = params => export const initDBv4 = params =>
get(`${CITY_SERVICE}/OMS.svc/S_InitDBv4`, params); get(`${CITY_SERVICE}/OMS.svc/S_InitDBv4`, params);
export const initDBv4new = params =>
get(`${PUBLISH_SERVICE}/DBManager/InitDB`, params);
// 更新描述 // 更新描述
export const updateConnDesc = params => export const updateConnDesc = params =>
get(`${CITY_SERVICE}/OMS.svc/S_UpdateConnDesc`, params); get(`${CITY_SERVICE}/OMS.svc/S_UpdateConnDesc`, params);
export const updateConnDescNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/UpdateConnDesc`, params);
// 获取日志 // 获取日志
export const getInitDBLog = params => export const getInitDBLog = params =>
get(`${CITY_SERVICE}/OMS.svc/S_GetInitDBLog`, params); get(`${CITY_SERVICE}/OMS.svc/S_GetInitDBLog`, params);
export const getInitDBLogNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetInitDBLog`, params);
// 删除初始化日志 // 删除初始化日志
export const deleteInitDBLog = params => export const deleteInitDBLog = params =>
get(`${CITY_SERVICE}/OMS.svc/S_DeleteInitDBLog`, params); get(`${CITY_SERVICE}/OMS.svc/S_DeleteInitDBLog`, params);
export const deleteInitDBLogNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/DeleteInitDBLog`, params);
// 修改产品解决方案 // 修改产品解决方案
export const setTableSQLDirName = params => export const setTableSQLDirName = params =>
...@@ -61,6 +75,8 @@ export const setTableSQLDirName = params => ...@@ -61,6 +75,8 @@ export const setTableSQLDirName = params =>
// 删除数据库连接记录 // 删除数据库连接记录
export const deleteConn = params => export const deleteConn = params =>
get(`${CITY_SERVICE}/OMS.svc/S_DeleteConn`, params); get(`${CITY_SERVICE}/OMS.svc/S_DeleteConn`, params);
export const deleteConnNew = params =>
get(`${PUBLISH_SERVICE}/DBManage/DeleteConnection`, params);
/** /**
* *
...@@ -83,10 +99,14 @@ export const changeSolution = params => ...@@ -83,10 +99,14 @@ export const changeSolution = params =>
// 检查数据库表 // 检查数据库表
export const tableCheck = params => export const tableCheck = params =>
get(`${CITY_SERVICE}/OMS.svc/TableCheck`, params); get(`${CITY_SERVICE}/OMS.svc/TableCheck`, params);
export const tableCheckNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/TableCheck`, params);
// 获取数据库升级记录 // 获取数据库升级记录
export const databaseStandardGetLog = params => export const databaseStandardGetLog = params =>
get(`${CITY_SERVICE}/OMS.svc/DatabaseStandard_GetLog`, params); get(`${CITY_SERVICE}/OMS.svc/DatabaseStandard_GetLog`, params);
export const databaseStandardGetLogNew = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetUpdateDBLog`, params);
// 更新 // 更新
export const updateDateBase = params => export const updateDateBase = params =>
...@@ -164,3 +184,17 @@ export const editMySQLConnString = params => ...@@ -164,3 +184,17 @@ export const editMySQLConnString = params =>
get(`${CITY_SERVICE}/OMS.svc/S_EditMySQLConnString`, params, { get(`${CITY_SERVICE}/OMS.svc/S_EditMySQLConnString`, params, {
timeout: 300000, timeout: 300000,
}); });
export const GetConnString = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetConnString`, params);
export const AddConnString = params =>
get(`${PUBLISH_SERVICE}/DBManager/AddConnString`, params);
export const EditConnString = params =>
get(`${PUBLISH_SERVICE}/DBManager/EditConnString`, params);
export const DeleteConnString = params =>
get(`${PUBLISH_SERVICE}/DBManager/DeleteConnString`, params);
export const GetConnTest = params =>
get(`${PUBLISH_SERVICE}/DBManager/GetConnectionTest`, 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