Commit d05c0fc8 authored by 邓超's avatar 邓超

fix: 数据库连接模块保存连接下面记录不刷新修复 数据库标准化管理,数据库连接配置报错修复 web配置显示修复 台账管理保存显示修复 产品配置不能保存修复

parent d05d6c72
Pipeline #33184 passed with stages
in 43 minutes 36 seconds
This diff is collapsed.
...@@ -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
......
...@@ -161,7 +161,8 @@ const standingBook = props => { ...@@ -161,7 +161,8 @@ const standingBook = props => {
newArr.push(item) newArr.push(item)
}) })
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);
} }
......
...@@ -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 &&
......
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