Commit a347dc0d authored by 邓超's avatar 邓超

fix: 数据库初始化日志可以动态渲染html,初始化调用清除日志接口

parent 54b1ec53
Pipeline #33875 skipped with stages
......@@ -145,9 +145,10 @@ const InitDataBase = props => {
setInitLoading(false);
let arr = [];
arr.push(
res.data.content
.split(/(\r\n)|(\n)/)
.map((item, index) => <p key={index}>{item}</p>),
res.data.content.split(/(\r\n)|(\n)/).map((item, index) => (
// eslint-disable-next-line react/no-danger
<p key={index} dangerouslySetInnerHTML={{ __html: item }} />
)),
);
console.log(arr);
setInitContent(arr);
......@@ -735,40 +736,15 @@ const InitDataBase = props => {
</Button>
</Space>
<Space>
{/* <Popconfirm
title="是否执行数据库初始化"
okText="确认"
cancelText="取消"
onConfirm={() => {
initClick();
<Button
type="primary"
onClick={() => {
getInitList();
deleteInitDBLogNew();
}}
> */}
<Button type="primary" onClick={() => getInitList()}>
>
数据库初始化
</Button>
{/* </Popconfirm> */}
{/* {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>
</div>
......
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