Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
95a58f58
Commit
95a58f58
authored
Oct 26, 2022
by
邓超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/ReactWeb5/maintenance
parents
68d377b7
d3b653ad
Pipeline
#62478
canceled with stages
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
929 additions
and
167 deletions
+929
-167
时间.svg
src/assets/images/icons/时间.svg
+2
-0
incident.jsx
src/pages/bsmanager/workOrder/incident/incident.jsx
+59
-0
incident.less
src/pages/bsmanager/workOrder/incident/incident.less
+16
-0
ManagementDataBase.jsx
src/pages/database/ManagementDataBase/ManagementDataBase.jsx
+215
-64
DatabaseInitialization.jsx
...atabase/databaseInitialization/DatabaseInitialization.jsx
+1
-1
AddModal.jsx
src/pages/platformCenter/hostmanager/gateWay/AddModal.jsx
+16
-1
CheckModal.jsx
src/pages/platformCenter/hostmanager/gateWay/CheckModal.jsx
+314
-0
gateWay.jsx
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
+131
-96
index.jsx
src/pages/productCenter/webConfig/index.jsx
+47
-2
sortModal.jsx
src/pages/productCenter/webConfig/sortModal.jsx
+97
-0
sortModal.less
src/pages/productCenter/webConfig/sortModal.less
+20
-0
hostmanager.js
src/services/hostmanager/hostmanager.js
+3
-3
api.js
src/services/standingBook/api.js
+4
-0
api.js
src/services/webConfig/api.js
+4
-0
No files found.
src/assets/images/icons/时间.svg
0 → 100644
View file @
95a58f58
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1666692888056"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"4237"
data-spm-anchor-id=
"a313x.7781069.0.i7"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><path
d=
"M512 85.33C276.36 85.33 85.33 276.36 85.33 512S276.36 938.67 512 938.67 938.67 747.64 938.67 512 747.64 85.33 512 85.33z m0 768c-188.21 0-341.33-153.12-341.33-341.33S323.79 170.67 512 170.67 853.33 323.79 853.33 512 700.21 853.33 512 853.33z"
p-id=
"4238"
fill=
"#1890FF"
></path><path
d=
"M512 256h-85.33v341.33h298.66V512H512z"
p-id=
"4239"
fill=
"#1890FF"
></path></svg>
\ No newline at end of file
src/pages/bsmanager/workOrder/incident/incident.jsx
View file @
95a58f58
...
@@ -20,6 +20,9 @@ import {
...
@@ -20,6 +20,9 @@ import {
notification
,
notification
,
Tree
,
Tree
,
Button
,
Button
,
Modal
,
Input
,
message
,
}
from
'antd'
;
}
from
'antd'
;
import
{
import
{
...
@@ -32,12 +35,14 @@ import {
...
@@ -32,12 +35,14 @@ import {
OrderedListOutlined
,
OrderedListOutlined
,
ApartmentOutlined
,
ApartmentOutlined
,
DesktopOutlined
,
DesktopOutlined
,
FormOutlined
,
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
import
{
GetCM_Event_LoadEventTable
,
GetCM_Event_LoadEventTable
,
CM_Event_RemoveEventTable
,
CM_Event_RemoveEventTable
,
CM_Event_ReOrder
,
CM_Event_ReOrder
,
GetCM_Event_LoadEventTypeTable
,
GetCM_Event_LoadEventTypeTable
,
CM_Event_EditBusinessType
}
from
'@/services/standingBook/api'
;
}
from
'@/services/standingBook/api'
;
import
classnames
from
'classnames'
;
import
classnames
from
'classnames'
;
import
styles
from
'./incident.less'
;
import
styles
from
'./incident.less'
;
...
@@ -71,6 +76,8 @@ const incident = () => {
...
@@ -71,6 +76,8 @@ const incident = () => {
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
hoverItemIndex
,
setHoverItemIndex
]
=
useState
(
0
);
// hover流程索引
const
[
hoverItemIndex
,
setHoverItemIndex
]
=
useState
(
0
);
// hover流程索引
const
[
keepIdValue
,
setKeepIdValue
]
=
useState
([]);
const
[
keepIdValue
,
setKeepIdValue
]
=
useState
([]);
const
[
editBusinessVisible
,
setEditBusinessVisible
]
=
useState
(
false
);
const
[
addForm
]
=
Form
.
useForm
();
const
columns
=
[
const
columns
=
[
{
{
...
@@ -469,7 +476,42 @@ const incident = () => {
...
@@ -469,7 +476,42 @@ const incident = () => {
});
});
}
}
});
});
};
};
const
editBusiness
=
()
=>
{
setEditBusinessVisible
(
true
)
addForm
.
setFieldsValue
({
newBusinessType
:
pickItem
})
}
const
editOk
=
()
=>
{
let
aa
=
addForm
.
getFieldsValue
().
newBusinessType
;
console
.
log
(
aa
);
CM_Event_EditBusinessType
({
oldBusinessType
:
pickItem
,
newBusinessType
:
aa
}).
then
(
res
=>
{
if
(
res
.
code
===
0
){
setEditBusinessVisible
(
false
);
setFlag
(
flag
+
1
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'编辑成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'编辑失败'
,
});
}
}).
catch
(
err
=>
{
message
.
error
(
err
);
});
}
return
(
return
(
<
div
className=
{
styles
.
incidentContainer
}
>
<
div
className=
{
styles
.
incidentContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
<
div
className=
{
styles
.
contentContainers
}
>
...
@@ -569,6 +611,8 @@ const incident = () => {
...
@@ -569,6 +611,8 @@ const incident = () => {
})
}
})
}
>
>
<
div
style=
{
{
height
:
'50px'
}
}
>
<
div
style=
{
{
height
:
'50px'
}
}
>
<
span
className=
{
styles
.
titleName
}
>
【
{
pickItem
}
】
</
span
>
<
span
><
Tooltip
title=
"编辑业务类型名称"
><
FormOutlined
className=
{
styles
.
iconSize
}
onClick=
{
editBusiness
}
/></
Tooltip
></
span
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
Button
<
Button
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
...
@@ -629,6 +673,21 @@ const incident = () => {
...
@@ -629,6 +673,21 @@ const incident = () => {
callBackSubmit=
{
onOK
}
callBackSubmit=
{
onOK
}
keepIdValue=
{
keepIdValue
}
keepIdValue=
{
keepIdValue
}
/>
/>
<
Modal
title=
'编辑业务类型名称'
visible=
{
editBusinessVisible
}
onCancel=
{
()
=>
setEditBusinessVisible
(
false
)
}
onOk=
{
()
=>
editOk
()
}
>
<
Form
form=
{
addForm
}
labelCol=
{
{
span
:
3
}
}
>
<
Form
.
Item
name=
"newBusinessType"
label=
"名称"
rules=
{
[{
required
:
true
,
message
:
'不能为空'
}]
}
>
<
Input
placeholder=
"请输入名称"
style=
{
{
width
:
'95%'
}
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"newBusinessType"
label=
"名称"
style=
{
{
display
:
'none'
}
}
>
<
Input
placeholder=
"请输入名称"
style=
{
{
width
:
'95%'
}
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
src/pages/bsmanager/workOrder/incident/incident.less
View file @
95a58f58
...
@@ -404,6 +404,22 @@
...
@@ -404,6 +404,22 @@
color: rgba(0, 0, 0, 0.85);
color: rgba(0, 0, 0, 0.85);
}
}
}
}
.iconSize{
font-size: 18px;
color: #1890FF;
svg{
margin-top:-7px;
}
}
.titleName{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
display: inline-block;
margin-left: 10px;
line-height: 50px;
}
// .panda-pro-pages-platform-center-bsmanager-work-order-incident-filed_listItem {
// .panda-pro-pages-platform-center-bsmanager-work-order-incident-filed_listItem {
// display: flex;
// display: flex;
...
...
src/pages/database/ManagementDataBase/ManagementDataBase.jsx
View file @
95a58f58
...
@@ -45,6 +45,11 @@ const ManagementDataBase = () => {
...
@@ -45,6 +45,11 @@ const ManagementDataBase = () => {
const
[
list
,
setlist
]
=
useState
([
'表'
,
'字段'
,
'主外键'
,
'主键'
,
'索引'
,
'复合索引'
]);
const
[
list
,
setlist
]
=
useState
([
'表'
,
'字段'
,
'主外键'
,
'主键'
,
'索引'
,
'复合索引'
]);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
// 保存已选自动升级表键值
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
// 保存已选自动升级表键值
const
[
keepCheckList
,
setKeepChecklist
]
=
useState
([]);
// 保存已选自动升级表值
const
[
keepCheckList
,
setKeepChecklist
]
=
useState
([]);
// 保存已选自动升级表值
const
[
keepData
,
setKeepData
]
=
useState
([]);
// 保存分类数组
const
[
allchecked
,
setAllChecked
]
=
useState
(
true
);
const
[
indeterminateAll
,
setIndeterminateAll
]
=
useState
(
false
);
const
[
typeFilters
,
setTypeFilters
]
=
useState
([]);
// type列筛选
const
[
filteredValue
,
setFilteredValue
]
=
useState
([]);
// 检查数据库表
// 检查数据库表
useEffect
(()
=>
{
useEffect
(()
=>
{
setCheckLoading
(
true
);
setCheckLoading
(
true
);
...
@@ -78,7 +83,6 @@ const ManagementDataBase = () => {
...
@@ -78,7 +83,6 @@ const ManagementDataBase = () => {
tableCheckNew
()
tableCheckNew
()
.
then
(
resnew
=>
{
.
then
(
resnew
=>
{
setCheckLoading
(
false
);
setCheckLoading
(
false
);
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
;
...
@@ -92,31 +96,57 @@ const ManagementDataBase = () => {
...
@@ -92,31 +96,57 @@ const ManagementDataBase = () => {
item
.
key
=
index
;
item
.
key
=
index
;
return
item
;
return
item
;
});
});
console
.
log
(
list
);
console
.
log
(
res
.
RepairTypeList
);
let
data
=
[];
let
data
=
[];
list
.
map
(
i
=>
{
list
.
map
(
i
=>
{
console
.
log
(
i
);
if
(
res
.
RepairTypeList
.
indexOf
(
i
)
!=
-
1
)
{
if
(
res
.
RepairTypeList
.
indexOf
(
i
)
!=
-
1
)
{
data
.
push
(
i
);
data
.
push
(
i
);
}
}
});
});
console
.
log
(
data
);
console
.
log
(
arr
);
// 所有数据
console
.
log
(
arr
);
let
qq
=
arr
.
map
(
item
=>
item
.
Type
);
qq
=
qq
.
filter
((
value
,
index
)
=>
qq
.
indexOf
(
value
)
===
index
);
console
.
log
(
qq
);
console
.
log
(
qq
.
map
(
item
=>
({
text
:
item
,
value
:
item
})));
setTypeFilters
(
qq
.
map
(
item
=>
({
text
:
item
,
value
:
item
})));
let
datalist
=
[];
let
datalist
=
[];
if
(
arr
.
length
>
0
)
{
if
(
arr
.
length
>
0
)
{
arr
.
map
(
i
=>
{
arr
.
map
(
i
=>
{
datalist
.
push
(
i
.
key
);
datalist
.
push
(
i
.
key
);
});
});
}
}
console
.
log
(
datalist
);
console
.
log
(
datalist
);
// 所有数据的key
setKeepData
(
data
);
setSelectedRowKeys
(
datalist
);
setSelectedRowKeys
(
datalist
);
setKeepChecklist
(
arr
);
setKeepChecklist
(
arr
);
setKeepValue
(
res
.
RepairTypeList
);
setKeepValue
(
res
.
RepairTypeList
);
setRepairTypeList
(
data
);
console
.
log
(
data
);
// 分类数组
let
aa
=
[];
if
(
data
.
length
>
0
)
{
data
.
map
(
i
=>
{
let
vv
=
[];
let
ff
=
[];
// key
arr
.
map
(
j
=>
{
if
(
j
.
Type
==
i
)
{
vv
.
push
(
j
);
ff
.
push
(
j
.
key
);
}
});
let
a
=
{};
a
.
name
=
i
;
a
.
checked
=
true
;
a
.
indeterminate
=
false
;
a
.
value
=
vv
;
a
.
key
=
ff
;
aa
.
push
(
a
);
});
}
console
.
log
(
aa
);
setRepairTypeList
(
aa
);
setAutoCheck
(
arr
);
setAutoCheck
(
arr
);
setAutoCheckList
(
arr
);
setAutoCheckList
(
arr
);
setCheckList
(
arr2
);
setCheckList
(
arr2
);
setAllChecked
(
true
);
setIndeterminateAll
(
false
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -167,13 +197,14 @@ const ManagementDataBase = () => {
...
@@ -167,13 +197,14 @@ const ManagementDataBase = () => {
// 检查功能
// 检查功能
const
handleCheck
=
()
=>
{
const
handleCheck
=
()
=>
{
setCheckFlag
(
checkFlag
+
1
);
setCheckFlag
(
checkFlag
+
1
);
setFilteredValue
([]);
};
};
// 升级功能
// 升级功能
const
handleUpdate
=
()
=>
{
const
handleUpdate
=
()
=>
{
console
.
log
(
keepCheckList
);
console
.
log
(
keepCheckList
);
console
.
log
(
selectedRowKeys
);
console
.
log
(
selectedRowKeys
);
if
(
repairTypeList
.
length
>
0
)
{
if
(
repairTypeList
.
length
>
0
)
{
if
(
keep
Value
.
length
>
0
&&
keep
CheckList
.
length
>
0
)
{
if
(
keepCheckList
.
length
>
0
)
{
setCheckLoading
(
true
);
setCheckLoading
(
true
);
newUpdateDateBase
(
keepCheckList
)
newUpdateDateBase
(
keepCheckList
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -181,6 +212,7 @@ const ManagementDataBase = () => {
...
@@ -181,6 +212,7 @@ const ManagementDataBase = () => {
setCheckFlag
(
checkFlag
+
1
);
setCheckFlag
(
checkFlag
+
1
);
setUpFlag
(
upFlag
+
1
);
setUpFlag
(
upFlag
+
1
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setFilteredValue
([]);
notification
.
success
({
notification
.
success
({
message
:
'通知'
,
message
:
'通知'
,
duration
:
3
,
duration
:
3
,
...
@@ -213,6 +245,7 @@ const ManagementDataBase = () => {
...
@@ -213,6 +245,7 @@ const ManagementDataBase = () => {
setCheckFlag
(
checkFlag
+
1
);
setCheckFlag
(
checkFlag
+
1
);
setUpFlag
(
upFlag
+
1
);
setUpFlag
(
upFlag
+
1
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setFilteredValue
([]);
notification
.
success
({
notification
.
success
({
message
:
'通知'
,
message
:
'通知'
,
duration
:
3
,
duration
:
3
,
...
@@ -282,6 +315,9 @@ const ManagementDataBase = () => {
...
@@ -282,6 +315,9 @@ const ManagementDataBase = () => {
key
:
'Type'
,
key
:
'Type'
,
width
:
180
,
width
:
180
,
ellipsis
:
true
,
ellipsis
:
true
,
filters
:
typeFilters
,
onFilter
:
(
value
,
record
)
=>
record
.
Type
===
value
,
filteredValue
,
},
},
{
{
title
:
'差异比较'
,
title
:
'差异比较'
,
...
@@ -427,62 +463,159 @@ const ManagementDataBase = () => {
...
@@ -427,62 +463,159 @@ const ManagementDataBase = () => {
setCheckSql
(
e
);
setCheckSql
(
e
);
};
};
const
onChange
=
e
=>
{
// 复选框
let
aa
=
[...
autoCheck
];
const
rowSelection
=
{
let
data
=
[];
selectedRowKeys
,
let
name
=
[];
columnTitle
:
' '
,
aa
.
map
(
i
=>
{
hideDefaultSelections
:
true
,
if
(
e
.
indexOf
(
i
.
Type
)
!=
-
1
)
{
onChange
:
(
RowKeys
,
Rows
)
=>
{
data
.
push
(
i
);
// 找到勾选/取消勾选项的Type
let
aa
=
[];
// 取消
if
(
keepCheckList
.
length
>
Rows
.
length
)
{
keepCheckList
.
map
(
i
=>
{
if
(
Rows
.
indexOf
(
i
)
==
-
1
)
{
aa
.
push
(
i
.
Type
);
}
});
}
}
});
// 勾选
setAutoCheckList
(
data
);
if
(
keepCheckList
.
length
<
Rows
.
length
)
{
Rows
.
map
(
i
=>
{
let
a
=
[...
keepCheckList
];
if
(
keepCheckList
.
indexOf
(
i
)
==
-
1
)
{
let
b
=
[...
selectedRowKeys
];
aa
.
push
(
i
.
Type
);
if
(
e
.
length
>
keepValue
.
length
)
{
}
e
.
map
(
k
=>
{
});
if
(
keepValue
.
indexOf
(
k
)
==
-
1
)
{
}
aa
.
map
(
j
=>
{
// 找到勾选/取消勾选项的下标
if
(
j
.
Type
==
k
)
{
let
index
=
[];
a
.
push
(
j
);
repairTypeList
.
map
((
j
,
k
)
=>
{
b
.
push
(
j
.
key
);
if
(
j
.
name
==
aa
[
0
])
{
}
index
.
push
(
k
);
});
}
}
});
});
setKeepChecklist
(
a
);
// 全部勾选数据按照type分类存储
setSelectedRowKeys
(
b
);
let
list11
=
[];
if
(
keepData
.
length
>
0
)
{
keepData
.
map
(
i
=>
{
let
vv
=
[];
Rows
.
map
(
j
=>
{
if
(
j
.
Type
==
i
)
{
vv
.
push
(
j
);
}
});
list11
.
push
(
vv
);
});
}
// 控制分组全选
if
(
list11
[
index
[
0
]].
length
<
repairTypeList
[
index
[
0
]].
value
.
length
&&
list11
[
index
[
0
]].
length
!==
0
)
{
repairTypeList
[
index
[
0
]].
indeterminate
=
true
;
repairTypeList
[
index
[
0
]].
checked
=
false
;
}
else
if
(
list11
[
index
[
0
]].
length
===
0
)
{
repairTypeList
[
index
[
0
]].
indeterminate
=
false
;
repairTypeList
[
index
[
0
]].
checked
=
false
;
}
else
if
(
list11
[
index
[
0
]].
length
===
repairTypeList
[
index
[
0
]].
value
.
length
)
{
repairTypeList
[
index
[
0
]].
indeterminate
=
false
;
repairTypeList
[
index
[
0
]].
checked
=
true
;
}
// 控制全选
if
(
RowKeys
.
length
<
autoCheckList
.
length
&&
RowKeys
.
length
!==
0
)
{
setAllChecked
(
false
);
setIndeterminateAll
(
true
);
}
else
if
(
RowKeys
.
length
===
0
)
{
setAllChecked
(
false
);
setIndeterminateAll
(
false
);
}
else
if
(
RowKeys
.
length
===
autoCheckList
.
length
)
{
setAllChecked
(
true
);
setIndeterminateAll
(
false
);
}
setSelectedRowKeys
(
RowKeys
);
setKeepChecklist
(
Rows
);
},
};
// 分类全选
const
onChangeAll
=
(
e
,
j
)
=>
{
let
data1
=
[...
repairTypeList
];
data1
[
j
].
checked
=
e
.
target
.
checked
;
data1
[
j
].
indeterminate
=
false
;
setRepairTypeList
(
data1
);
if
(
e
.
target
.
checked
)
{
let
aa
=
[...
keepCheckList
];
let
bb
=
[...
selectedRowKeys
];
let
data
=
[...
new
Set
(
aa
.
concat
(
data1
[
j
].
value
))];
let
data2
=
[...
new
Set
(
bb
.
concat
(
data1
[
j
].
key
))];
// 控制全选
if
(
data
.
length
<
autoCheckList
.
length
&&
data
.
length
!==
0
)
{
setAllChecked
(
false
);
setIndeterminateAll
(
true
);
}
else
if
(
data
.
length
===
0
)
{
setAllChecked
(
false
);
setIndeterminateAll
(
false
);
}
else
if
(
data
.
length
===
autoCheckList
.
length
)
{
setAllChecked
(
true
);
setIndeterminateAll
(
false
);
}
setKeepChecklist
(
data
);
setSelectedRowKeys
(
data2
);
}
else
{
}
else
{
let
listaa
=
[];
let
aa
=
[];
// 全部已选数据
let
listbb
=
[];
let
bb
=
[];
// 全部已选数据key
a
.
map
(
i
=>
{
keepCheckList
.
map
(
i
=>
{
if
(
data
.
indexOf
(
i
)
!
=
-
1
)
{
if
(
data
1
[
j
].
value
.
indexOf
(
i
)
=
=
-
1
)
{
list
aa
.
push
(
i
);
aa
.
push
(
i
);
list
bb
.
push
(
i
.
key
);
bb
.
push
(
i
.
key
);
}
}
});
});
setKeepChecklist
(
listaa
);
// 控制全选
setSelectedRowKeys
(
listbb
);
if
(
aa
.
length
<
autoCheckList
.
length
&&
aa
.
length
!==
0
)
{
setAllChecked
(
false
);
setIndeterminateAll
(
true
);
}
else
if
(
aa
.
length
===
0
)
{
setAllChecked
(
false
);
setIndeterminateAll
(
false
);
}
else
if
(
aa
.
length
===
autoCheckList
.
length
)
{
setAllChecked
(
true
);
setIndeterminateAll
(
false
);
}
setKeepChecklist
(
aa
);
setSelectedRowKeys
(
bb
);
}
}
setKeepValue
(
e
);
};
};
// 复选框
// 全选
const
rowSelection
=
{
const
onChange1
=
e
=>
{
selectedRowKeys
,
setAllChecked
(
e
.
target
.
checked
);
onChange
:
(
RowKeys
,
Rows
)
=>
{
setIndeterminateAll
(
false
);
console
.
log
(
RowKeys
);
if
(
e
.
target
.
checked
)
{
console
.
log
(
Rows
);
let
aa
=
[...
repairTypeList
];
setSelectedRowKeys
(
RowKeys
);
aa
.
map
(
i
=>
{
setKeepChecklist
(
Rows
);
i
.
checked
=
true
;
let
aa
=
[];
i
.
indeterminate
=
false
;
Rows
.
map
(
i
=>
{
aa
.
push
(
i
.
Type
);
});
});
let
data
=
[...
new
Set
(
aa
)];
setKeepChecklist
(
autoCheckList
);
// setKeepValue(data);
let
bb
=
[];
},
autoCheckList
.
map
(
i
=>
{
bb
.
push
(
i
.
key
);
});
setSelectedRowKeys
(
bb
);
}
else
{
let
aa
=
[...
repairTypeList
];
aa
.
map
(
i
=>
{
i
.
checked
=
false
;
i
.
indeterminate
=
false
;
});
setKeepChecklist
([]);
setSelectedRowKeys
([]);
}
};
const
onChangeInput
=
filters
=>
{
console
.
log
(
'filters'
,
filters
);
setFilteredValue
(
filters
.
Type
);
};
};
return
(
return
(
...
@@ -494,13 +627,23 @@ const ManagementDataBase = () => {
...
@@ -494,13 +627,23 @@ const ManagementDataBase = () => {
<
span
style=
{
{
marginRight
:
'100px'
}
}
>
升级详情
</
span
>
<
span
style=
{
{
marginRight
:
'100px'
}
}
>
升级详情
</
span
>
{
repairTypeList
.
length
>
0
&&
(
{
repairTypeList
.
length
>
0
&&
(
<>
<>
<
span
>
类型筛选:
</
span
>
<
Checkbox
<
div
style=
{
{
display
:
'inline-block'
}
}
>
checked=
{
allchecked
}
<
Checkbox
.
Group
onChange=
{
onChange1
}
options=
{
repairTypeList
}
indeterminate=
{
indeterminateAll
}
value=
{
keepValue
}
>
onChange=
{
onChange
}
全选
/>
</
Checkbox
>
<
div
style=
{
{
display
:
'inline-block'
,
marginLeft
:
'10px'
}
}
>
{
repairTypeList
.
map
((
i
,
j
)
=>
(
<
Checkbox
checked=
{
i
.
checked
}
onChange=
{
e
=>
onChangeAll
(
e
,
j
)
}
indeterminate=
{
i
.
indeterminate
}
>
{
i
.
name
}
</
Checkbox
>
))
}
</
div
>
</
div
>
</>
</>
)
}
)
}
...
@@ -521,6 +664,7 @@ const ManagementDataBase = () => {
...
@@ -521,6 +664,7 @@ const ManagementDataBase = () => {
}
}
}
}
className=
{
styles
.
mgTop20
}
className=
{
styles
.
mgTop20
}
columns=
{
autoCheckColumns
}
columns=
{
autoCheckColumns
}
hideSelectAll
dataSource=
{
autoCheckList
}
dataSource=
{
autoCheckList
}
bordered
bordered
size=
"small"
size=
"small"
...
@@ -534,6 +678,7 @@ const ManagementDataBase = () => {
...
@@ -534,6 +678,7 @@ const ManagementDataBase = () => {
showQuickJumper
:
true
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
showSizeChanger
:
true
,
}
}
}
}
onChange=
{
onChangeInput
}
/>
/>
<
div
className=
{
styles
.
btnBox
}
>
<
div
className=
{
styles
.
btnBox
}
>
<
Space
>
<
Space
>
...
@@ -541,8 +686,14 @@ const ManagementDataBase = () => {
...
@@ -541,8 +686,14 @@ const ManagementDataBase = () => {
检查
检查
</
Button
>
</
Button
>
<
Popconfirm
<
Popconfirm
title=
"
title=
{
是否根据已选数据,升级当前连接数据库?"
<
span
>
已选
<
span
style=
{
{
color
:
'rgb(24, 144, 255)'
}
}
>
{
keepCheckList
.
length
}
</
span
>
/
{
autoCheckList
.
length
}
条数据,是否根据已选数据,升级当前连接数据库?
</
span
>
}
okText=
"确认"
okText=
"确认"
cancelText=
"取消"
cancelText=
"取消"
onConfirm=
{
()
=>
{
onConfirm=
{
()
=>
{
...
...
src/pages/database/databaseInitialization/DatabaseInitialization.jsx
View file @
95a58f58
...
@@ -1729,7 +1729,7 @@ const DatabaseInitialization = props => {
...
@@ -1729,7 +1729,7 @@ const DatabaseInitialization = props => {
<
div
<
div
ref=
{
scroll
}
ref=
{
scroll
}
style=
{
{
style=
{
{
maxHeight
:
'
56
0px'
,
maxHeight
:
'
47
0px'
,
overflowY
:
'auto'
,
overflowY
:
'auto'
,
marginRight
:
' -24px'
,
marginRight
:
' -24px'
,
}
}
}
}
...
...
src/pages/platformCenter/hostmanager/gateWay/AddModal.jsx
View file @
95a58f58
...
@@ -18,7 +18,7 @@ import { InfoCircleOutlined } from '@ant-design/icons';
...
@@ -18,7 +18,7 @@ import { InfoCircleOutlined } from '@ant-design/icons';
const
{
Item
}
=
Form
;
const
{
Item
}
=
Form
;
const
AddModal
=
props
=>
{
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
type
,
pickItem
,
visible
,
onCancel
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
type
,
pickItem
,
visible
,
onCancel
,
keepData
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
current
,
setCurrent
]
=
useState
(
false
);
const
[
current
,
setCurrent
]
=
useState
(
false
);
const
[
advanced
,
setAdvanced
]
=
useState
(
0
);
const
[
advanced
,
setAdvanced
]
=
useState
(
0
);
...
@@ -26,6 +26,7 @@ const AddModal = props => {
...
@@ -26,6 +26,7 @@ const AddModal = props => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
visible
)
{
if
(
visible
)
{
console
.
log
(
keepData
);
if
(
type
===
'edit'
)
{
if
(
type
===
'edit'
)
{
let
aa
=
pickItem
.
methods
.
replace
(
/
\s
/g
,
''
);
let
aa
=
pickItem
.
methods
.
replace
(
/
\s
/g
,
''
);
form
.
setFieldsValue
({
form
.
setFieldsValue
({
...
@@ -298,6 +299,20 @@ const AddModal = props => {
...
@@ -298,6 +299,20 @@ const AddModal = props => {
required
:
true
,
required
:
true
,
message
:
'请输入关键字'
,
message
:
'请输入关键字'
,
},
},
{
validator
:
(
rule
,
value
)
=>
{
let
aa
=
form
.
getFieldValue
().
Key
;
if
(
type
===
'edit'
)
{
if
(
keepData
.
indexOf
(
aa
)
!==
-
1
&&
pickItem
.
key
!==
aa
)
{
return
Promise
.
reject
(
'关键字已存在'
);
}
}
else
if
(
keepData
.
indexOf
(
aa
)
!==
-
1
)
{
return
Promise
.
reject
(
'关键字已存在'
);
}
return
Promise
.
resolve
();
},
},
]
}
]
}
>
>
<
Input
allowClear
/>
<
Input
allowClear
/>
...
...
src/pages/platformCenter/hostmanager/gateWay/CheckModal.jsx
0 → 100644
View file @
95a58f58
/* eslint-disable react/jsx-boolean-value */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Radio
,
InputNumber
,
Checkbox
,
Switch
,
Tooltip
,
Row
,
Col
,
}
from
'antd'
;
import
{
SaveRoutes
}
from
'@/services/hostmanager/hostmanager'
;
import
{
InfoCircleOutlined
}
from
'@ant-design/icons'
;
const
{
Item
}
=
Form
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
pickItem
,
visible
,
onCancel
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
current
,
setCurrent
]
=
useState
(
false
);
const
[
advanced
,
setAdvanced
]
=
useState
(
0
);
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
let
aa
=
pickItem
.
methods
.
replace
(
/
\s
/g
,
''
);
form
.
setFieldsValue
({
UpstreamPathTemplate
:
pickItem
.
upstreamPathTemplate
,
DownstreamPathTemplate
:
pickItem
.
downstreamPathTemplate
,
Methods
:
aa
.
split
(
','
),
Url
:
pickItem
.
url
,
IsAuthentication
:
pickItem
.
isAuthentication
,
Key
:
pickItem
.
key
,
Priority
:
pickItem
.
priority
,
UpstreamHost
:
pickItem
.
upstreamHost
,
AddHeasersToRequest
:
pickItem
.
addHeasersToRequest
,
UpstreamHeaderTransform
:
pickItem
.
upstreamHeaderTransform
,
DownstreamHeaderTransform
:
pickItem
.
downstreamHeaderTransform
,
Timeout
:
pickItem
.
timeout
,
QoSOptions
:
pickItem
.
qoSOptions
,
RateLimitOptions
:
pickItem
.
rateLimitOptions
,
CacheOptions
:
pickItem
.
cacheOptions
,
LoadBalancerOptions
:
pickItem
.
loadBalancerOptions
,
SecurityOptions
:
pickItem
.
securityOptions
,
RequestIdKey
:
pickItem
.
requestIdKey
,
ServiceName
:
pickItem
.
serviceName
,
ServiceNamespace
:
pickItem
.
serviceNamespace
,
DelegatingHandlers
:
pickItem
.
delegatingHandlers
,
ReRouteIsCaseSensitive
:
pickItem
.
reRouteIsCaseSensitive
,
DownstreamHttpMethod
:
pickItem
.
downstreamHttpMethod
,
});
if
(
pickItem
.
upstreamHost
||
pickItem
.
addHeasersToRequest
||
pickItem
.
upstreamHeaderTransform
||
pickItem
.
downstreamHeaderTransform
||
pickItem
.
timeout
||
pickItem
.
qoSOptions
||
pickItem
.
rateLimitOptions
||
pickItem
.
cacheOptions
||
pickItem
.
loadBalancerOptions
||
pickItem
.
securityOptions
||
pickItem
.
requestIdKey
||
pickItem
.
serviceName
||
pickItem
.
serviceNamespace
||
pickItem
.
delegatingHandlers
||
pickItem
.
reRouteIsCaseSensitive
||
pickItem
.
downstreamHttpMethod
)
{
setAdvanced
(
1
);
setCurrent
(
true
);
}
}
else
{
form
.
resetFields
();
setAdvanced
(
0
);
setCurrent
(
false
);
}
},
[
visible
]);
// 提交
const
onSubmit
=
()
=>
{
onCancel
();
};
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
18
},
};
const
plainOptions
=
[
'GET'
,
'POST'
,
'PUT'
,
'DELETE'
];
const
change
=
(
e
,
event
)
=>
{
if
(
e
)
{
setAdvanced
(
1
);
setCurrent
(
true
);
}
else
{
setAdvanced
(
0
);
setCurrent
(
false
);
}
};
return
(
<
Modal
title=
"查看网关配置"
bodyStyle=
{
{
width
:
'100%'
,
maxHeight
:
'600px'
,
overflow
:
'scroll'
,
minHeight
:
'360px'
}
}
width=
"700px"
destroyOnClose
maskClosable=
{
false
}
okText=
"关闭"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
confirmLoading=
{
loading
}
forceRender=
{
true
}
getContainer=
{
false
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Item
label=
"上游路由模板"
name=
"UpstreamPathTemplate"
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
let
aa
=
form
.
getFieldValue
().
UpstreamPathTemplate
;
console
.
log
(
aa
.
startsWith
(
'/'
));
if
(
!
aa
.
startsWith
(
'/'
))
{
return
Promise
.
reject
(
'必须以/开头'
);
}
return
Promise
.
resolve
();
},
},
{
required
:
true
,
message
:
'请输入上游路由模板'
,
},
]
}
>
<
Input
allowClear
style=
{
{
width
:
'100%'
}
}
placeholder=
"示例:/PandaOMS/PandaOMS/{url}"
disabled
/>
</
Item
>
<
Item
label=
"下游路由模板"
name=
"DownstreamPathTemplate"
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
let
aa
=
form
.
getFieldValue
().
DownstreamPathTemplate
;
console
.
log
(
aa
.
startsWith
(
'/'
));
if
(
!
aa
.
startsWith
(
'/'
))
{
return
Promise
.
reject
(
'必须以/开头'
);
}
return
Promise
.
resolve
();
},
},
{
required
:
true
,
message
:
'请输入下游路由模板'
,
},
]
}
>
<
Input
allowClear
placeholder=
"示例:/{url}"
disabled
/>
</
Item
>
<
Item
label=
"上游请求方式"
name=
"Methods"
rules=
{
[
{
required
:
true
,
message
:
'请选择上游请求方式'
,
},
]
}
>
<
Checkbox
.
Group
options=
{
plainOptions
}
style=
{
{
display
:
'flex'
}
}
disabled
/>
</
Item
>
<
Item
label=
"下游服务地址"
name=
"Url"
rules=
{
[
{
required
:
true
,
message
:
'请输入下游服务地址'
,
},
]
}
>
<
Input
allowClear
placeholder=
"示例:http://localhost:8050"
disabled
/>
</
Item
>
<
Item
label=
"身份认证"
name=
"IsAuthentication"
>
<
Radio
.
Group
>
<
Radio
value=
{
true
}
disabled
>
开启
</
Radio
>
<
Radio
value=
{
false
}
disabled
>
关闭
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
label=
"关键字"
name=
"Key"
rules=
{
[
{
required
:
true
,
message
:
'请输入关键字'
,
},
]
}
>
<
Input
allowClear
disabled
/>
</
Item
>
<
Row
>
<
Col
span=
{
8
}
>
<
Item
// label={
// <div>
// <Tooltip title="0默认级别最低,10最高,优先级越高越先匹配">
// <InfoCircleOutlined
// style={{
// color: 'rgb(24, 144, 255)',
// marginLeft: '0px',
// marginRight: '5px',
// }}
// />
// </Tooltip>
// <span>优先级</span>
// </div>
// }
label=
"优先级"
name=
"Priority"
labelCol=
{
{
span
:
12
}
}
>
<
InputNumber
min=
{
0
}
max=
{
10
}
defaultValue=
{
0
}
disabled
/>
</
Item
>
</
Col
>
<
Col
span=
{
16
}
>
<
Item
>
<
span
style=
{
{
color
:
'red'
}
}
>
0默认级别最低,10最高,优先级越高越先匹配
</
span
>
</
Item
>
</
Col
>
</
Row
>
{
/* <Switch
checkedChildren="高级设置"
unCheckedChildren="高级设置"
onChange={change}
checked={current}
style={{ marginLeft: '40px', marginBottom: '15px' }}
/>
{advanced === 1 ? (
<>
<Item label="上游host" name="UpstreamHost">
<Input allowClear />
</Item>
<Item label="头部信息" name="AddHeasersToRequest">
<Input allowClear />
</Item>
<Item label="上游头信息转发" name="UpstreamHeaderTransform">
<Input allowClear />
</Item>
<Item label="下游头信息转发" name="DownstreamHeaderTransform">
<Input allowClear />
</Item>
<Item label="超时设置" name="Timeout">
<Input allowClear />
</Item>
<Item label="服务质量与熔断" name="QoSOptions">
<Input allowClear />
</Item>
<Item label="限流配置" name="RateLimitOptions">
<Input allowClear />
</Item>
<Item label="缓存" name="CacheOptions">
<Input allowClear />
</Item>
<Item label="负载均衡" name="LoadBalancerOptions">
<Input allowClear />
</Item>
<Item label="安全配置" name="SecurityOptions">
<Input allowClear />
</Item>
<Item label="请求Id Key" name="RequestIdKey">
<Input allowClear />
</Item>
<Item label="服务名" name="ServiceName">
<Input allowClear />
</Item>
<Item label="服务空间" name="ServiceNamespace">
<Input allowClear />
</Item>
<Item label="委托配置" name="DelegatingHandlers">
<Input allowClear />
</Item>
<Item label="路由大小写敏感" name="ReRouteIsCaseSensitive">
<Radio.Group>
<Radio value={0}>否</Radio>
<Radio value={1}>是</Radio>
</Radio.Group>
</Item>
<Item label="下游请求方式" name="DownstreamHttpMethod">
<Checkbox.Group options={plainOptions} />
</Item>
</>
) : (
''
)} */
}
</
Form
>
</
Modal
>
);
};
export
default
AddModal
;
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
View file @
95a58f58
...
@@ -17,6 +17,7 @@ import {
...
@@ -17,6 +17,7 @@ import {
Popconfirm
,
Popconfirm
,
Table
,
Table
,
notification
,
notification
,
Tag
,
}
from
'antd'
;
}
from
'antd'
;
import
{
import
{
EditTwoTone
,
EditTwoTone
,
...
@@ -37,6 +38,7 @@ import { get, PUBLISH_SERVICE } from '@/services/index';
...
@@ -37,6 +38,7 @@ import { get, PUBLISH_SERVICE } from '@/services/index';
import
configuration
from
'../../../../assets/images/icons/消息.svg'
;
import
configuration
from
'../../../../assets/images/icons/消息.svg'
;
import
AddModal
from
'./AddModal'
;
import
AddModal
from
'./AddModal'
;
import
CheckModal
from
'./CheckModal'
;
const
GateConfig
=
()
=>
{
const
GateConfig
=
()
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
...
@@ -49,8 +51,10 @@ const GateConfig = () => {
...
@@ -49,8 +51,10 @@ const GateConfig = () => {
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
[
searchWord1
,
setSearchWord1
]
=
useState
(
''
);
// 关键字
const
[
searchWord1
,
setSearchWord1
]
=
useState
(
''
);
// 关键字
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
checkVisible
,
setCheckVisible
]
=
useState
(
false
);
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
type
,
setType
]
=
useState
(
''
);
const
[
type
,
setType
]
=
useState
(
''
);
const
[
keepData
,
setKeepData
]
=
useState
([]);
// 保存关键字
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
const
OperateNginx
=
checked
=>
{
const
OperateNginx
=
checked
=>
{
...
@@ -112,17 +116,6 @@ const GateConfig = () => {
...
@@ -112,17 +116,6 @@ const GateConfig = () => {
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setCurrentConfig
(
res
.
data
);
setCurrentConfig
(
res
.
data
);
console
.
log
(
currentConfig
);
console
.
log
(
currentConfig
);
if
(
res
.
data
)
{
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
resdata
=>
{
setLoading
(
false
);
if
(
resdata
.
code
===
0
)
{
setTableData
(
resdata
.
data
);
}
});
}
}
}
});
});
// .catch(err => {
// .catch(err => {
...
@@ -140,9 +133,52 @@ const GateConfig = () => {
...
@@ -140,9 +133,52 @@ const GateConfig = () => {
// }
// }
// });
// });
// });
// });
// if (res.data) {
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
resdata
=>
{
setLoading
(
false
);
if
(
resdata
.
code
===
0
)
{
console
.
log
(
resdata
.
data
);
let
data
=
[];
resdata
.
data
.
map
(
i
=>
{
data
.
push
(
i
.
key
);
});
setKeepData
(
data
);
setTableData
(
resdata
.
data
);
}
});
// }
},
[
flag
]);
},
[
flag
]);
const
columns
=
[
const
columns
=
[
{
title
:
'关键字'
,
dataIndex
:
'key'
,
key
:
'key'
,
align
:
'center'
,
width
:
150
,
render
:
(
text
,
record
)
=>
{
if
(
record
.
key
===
'CityServer'
)
{
return
(
<
Tooltip
placement=
"top"
title=
{
text
}
>
<
span
>
{
searchStyle1
(
text
)
}
<
Tag
color=
"cyan"
>
万能模板
</
Tag
>
</
span
>
</
Tooltip
>
);
}
else
{
return
(
<
span
>
<
Tooltip
placement=
"top"
title=
{
text
}
>
{
searchStyle1
(
text
)
}
</
Tooltip
>
</
span
>
);
}
},
},
{
{
title
:
'上游路由模板'
,
title
:
'上游路由模板'
,
dataIndex
:
'upstreamPathTemplate'
,
dataIndex
:
'upstreamPathTemplate'
,
...
@@ -178,7 +214,7 @@ const GateConfig = () => {
...
@@ -178,7 +214,7 @@ const GateConfig = () => {
key
:
'url'
,
key
:
'url'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
width
:
2
5
0
,
width
:
2
0
0
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
span
>
<
span
>
<
Tooltip
placement=
"top"
title=
{
text
}
>
<
Tooltip
placement=
"top"
title=
{
text
}
>
...
@@ -201,20 +237,6 @@ const GateConfig = () => {
...
@@ -201,20 +237,6 @@ const GateConfig = () => {
</
span
>
</
span
>
),
),
},
},
{
title
:
'关键字'
,
dataIndex
:
'key'
,
key
:
'key'
,
align
:
'center'
,
width
:
100
,
render
:
(
text
,
record
)
=>
(
<
span
>
<
Tooltip
placement=
"top"
title=
{
text
}
>
{
searchStyle1
(
text
)
}
</
Tooltip
>
</
span
>
),
},
{
{
title
:
'开启身份认证'
,
title
:
'开启身份认证'
,
dataIndex
:
'isAuthentication'
,
dataIndex
:
'isAuthentication'
,
...
@@ -223,9 +245,9 @@ const GateConfig = () => {
...
@@ -223,9 +245,9 @@ const GateConfig = () => {
width
:
120
,
width
:
120
,
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
if
(
text
==
true
)
{
if
(
text
==
true
)
{
return
<
span
>
是
</
span
>;
return
<
Tag
color=
"#87d068"
>
是
</
Tag
>;
}
else
{
}
else
{
return
<
span
>
否
</
span
>;
return
<
Tag
color=
"#2db7f5"
>
否
</
Tag
>;
}
}
},
},
},
},
...
@@ -352,6 +374,11 @@ const GateConfig = () => {
...
@@ -352,6 +374,11 @@ const GateConfig = () => {
setAddVisible
(
true
);
setAddVisible
(
true
);
};
};
const
look
=
e
=>
{
setPickItem
(
e
);
setCheckVisible
(
true
);
};
const
dele
=
e
=>
{
const
dele
=
e
=>
{
setPickItem
(
e
);
setPickItem
(
e
);
let
data
=
[];
let
data
=
[];
...
@@ -417,7 +444,7 @@ const GateConfig = () => {
...
@@ -417,7 +444,7 @@ const GateConfig = () => {
marginLeft
:
'35px'
,
marginLeft
:
'35px'
,
}
}
}
}
>
>
网关
开启
网关
状态
<
Switch
<
Switch
checkedChildren=
"开启"
checkedChildren=
"开启"
unCheckedChildren=
"关闭"
unCheckedChildren=
"关闭"
...
@@ -428,86 +455,94 @@ const GateConfig = () => {
...
@@ -428,86 +455,94 @@ const GateConfig = () => {
</
div
>
</
div
>
{
console
.
log
(
currentConfig
)
}
{
console
.
log
(
currentConfig
)
}
</
div
>
</
div
>
{
currentConfig
?
(
{
/* {currentConfig ? (
<
div
className=
{
styles
.
head1
}
>
<
span
>
快速搜索上游路由模板:
</
span
>
<
Input
value=
{
searchWord
}
placeholder=
"请输入上游路由模板"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch
}
/>
<
span
style=
{
{
marginLeft
:
'20px'
}
}
>
快速搜索关键字:
</
span
>
<
Input
value=
{
searchWord1
}
placeholder=
"请输入键值"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch1
}
/>
<
Button
type=
"primary"
icon=
{
<
SearchOutlined
/>
}
onClick=
{
submitSearch
}
style=
{
{
marginLeft
:
'20px'
}
}
>
搜索
</
Button
>
<
Button
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
style=
{
{
marginLeft
:
'20px'
}
}
>
重置
</
Button
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
style=
{
{
verticalAlign
:
'middle'
,
marginTop
:
'-3px'
,
marginLeft
:
'20px'
,
}
}
>
新增
</
Button
>
</
div
>
) : (
) : (
<></>
<></>
)
}
)} */
}
<
div
className=
{
styles
.
head1
}
>
<
span
>
快速搜索上游路由模板:
</
span
>
<
Input
value=
{
searchWord
}
placeholder=
"请输入上游路由模板"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch
}
/>
<
span
style=
{
{
marginLeft
:
'20px'
}
}
>
快速搜索关键字:
</
span
>
<
Input
value=
{
searchWord1
}
placeholder=
"请输入键值"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch1
}
/>
<
Button
type=
"primary"
icon=
{
<
SearchOutlined
/>
}
onClick=
{
submitSearch
}
style=
{
{
marginLeft
:
'20px'
}
}
>
搜索
</
Button
>
<
Button
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
style=
{
{
marginLeft
:
'20px'
}
}
>
重置
</
Button
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
style=
{
{
verticalAlign
:
'middle'
,
marginTop
:
'-3px'
,
marginLeft
:
'20px'
,
}
}
>
新增
</
Button
>
</
div
>
</
div
>
</
div
>
{
currentConfig
?
(
{
/* {currentConfig ? (
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
div
className=
{
styles
.
table
}
>
<
Table
size=
"small"
bordered
rowKey=
{
record
=>
record
.
Id
}
columns=
{
columns
}
dataSource=
{
tableData
}
scroll=
{
{
y
:
'calc(100vh - 380px)'
,
x
:
'max-content'
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
edit
(
record
);
},
// 双击
})
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
div
>
</
Spin
>
) : (
) : (
<></>
<></>
)
}
)} */
}
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
div
className=
{
styles
.
table
}
>
<
Table
size=
"small"
bordered
rowKey=
{
record
=>
record
.
Id
}
columns=
{
columns
}
dataSource=
{
tableData
}
scroll=
{
{
y
:
'calc(100vh - 380px)'
,
x
:
'max-content'
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
edit
(
record
);
},
// 双击
})
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
div
>
</
Spin
>
<
AddModal
<
AddModal
visible=
{
addVisible
}
visible=
{
addVisible
}
pickItem=
{
pickItem
}
pickItem=
{
pickItem
}
keepData=
{
keepData
}
onCancel=
{
()
=>
setAddVisible
(
false
)
}
onCancel=
{
()
=>
setAddVisible
(
false
)
}
type=
{
type
}
type=
{
type
}
callBackSubmit=
{
onSubmit
}
callBackSubmit=
{
onSubmit
}
/>
/>
<
CheckModal
visible=
{
checkVisible
}
pickItem=
{
pickItem
}
onCancel=
{
()
=>
setCheckVisible
(
false
)
}
/>
</
Card
>
</
Card
>
</
div
>
</
div
>
);
);
...
...
src/pages/productCenter/webConfig/index.jsx
View file @
95a58f58
...
@@ -14,6 +14,7 @@ import {
...
@@ -14,6 +14,7 @@ import {
editWebsite
,
editWebsite
,
omsDeleteWebsite
,
omsDeleteWebsite
,
SyncMapComponent
,
SyncMapComponent
,
BatchDragSingleWebsite
,
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
{
EditTwoTone
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
EditTwoTone
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
Modal
from
'antd/lib/modal/Modal'
;
import
Modal
from
'antd/lib/modal/Modal'
;
...
@@ -23,6 +24,7 @@ import SiteConfig from './components/siteConfigDrawer';
...
@@ -23,6 +24,7 @@ import SiteConfig from './components/siteConfigDrawer';
import
{
appConnector
}
from
'@/containers/App/store'
;
import
{
appConnector
}
from
'@/containers/App/store'
;
import
{
defaultWebConfigObj
,
webMode
}
from
'./utils'
;
import
{
defaultWebConfigObj
,
webMode
}
from
'./utils'
;
import
MenuConfig
from
'./menuconfig/MenuConfig'
;
import
MenuConfig
from
'./menuconfig/MenuConfig'
;
import
SortModal
from
'./sortModal'
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
...
@@ -38,6 +40,7 @@ const WebConfigPage = props => {
...
@@ -38,6 +40,7 @@ const WebConfigPage = props => {
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
configFiles
,
setConfigFiles
]
=
useState
([]);
const
[
configFiles
,
setConfigFiles
]
=
useState
([]);
const
[
productList
,
setProductList
]
=
useState
([]);
// 产品列表
const
[
productList
,
setProductList
]
=
useState
([]);
// 产品列表
const
[
sortVisible
,
setSortVisible
]
=
useState
(
false
);
const
hasIntegerate
=
()
=>
webs
.
some
(
w
=>
w
.
id
.
startsWith
(
webMode
.
integration
));
const
hasIntegerate
=
()
=>
webs
.
some
(
w
=>
w
.
id
.
startsWith
(
webMode
.
integration
));
...
@@ -316,6 +319,11 @@ const WebConfigPage = props => {
...
@@ -316,6 +319,11 @@ const WebConfigPage = props => {
});
});
};
};
const
sort
=
()
=>
{
console
.
log
(
webs
);
setSortVisible
(
true
);
};
const
renderTabPane
=
tabPaneItem
=>
(
const
renderTabPane
=
tabPaneItem
=>
(
<
TabPane
key=
{
tabPaneItem
.
id
}
tab=
{
tabPaneItem
.
text
}
>
<
TabPane
key=
{
tabPaneItem
.
id
}
tab=
{
tabPaneItem
.
text
}
>
<>
<>
...
@@ -330,6 +338,7 @@ const WebConfigPage = props => {
...
@@ -330,6 +338,7 @@ const WebConfigPage = props => {
>
>
<
EditTwoTone
/>
查看/编辑网站配置
<
EditTwoTone
/>
查看/编辑网站配置
</
span
>
</
span
>
<
div
style=
{
{
display
:
'inline-block'
,
float
:
'right'
,
marginTop
:
'-15px'
}
}
>
<
div
style=
{
{
display
:
'inline-block'
,
float
:
'right'
,
marginTop
:
'-15px'
}
}
>
<
strong
style=
{
{
marginRight
:
'15px'
}
}
>
<
strong
style=
{
{
marginRight
:
'15px'
}
}
>
地图组件数量
地图组件数量
...
@@ -340,13 +349,22 @@ const WebConfigPage = props => {
...
@@ -340,13 +349,22 @@ const WebConfigPage = props => {
)
}
)
}
</
strong
>
</
strong
>
{
tabPaneItem
.
existMapComponent
<
9
&&
(
{
tabPaneItem
.
existMapComponent
<
9
&&
(
<
Button
type=
"primary"
onClick=
{
()
=>
SyncMap
(
tabPaneItem
)
}
>
<
Button
type=
"primary"
style=
{
{
marginRight
:
'20px'
}
}
onClick=
{
()
=>
SyncMap
(
tabPaneItem
)
}
>
一键修复
一键修复
</
Button
>
</
Button
>
)
}
)
}
<
Button
type=
"primary"
onClick=
{
sort
}
>
网站调序
</
Button
>
</
div
>
</
div
>
<
MenuConfig
<
MenuConfig
menu=
{
tabPaneItem
?.
children
.
find
(
w
=>
w
.
menuType
===
'Web4MenuRoot'
)
}
menu=
{
tabPaneItem
.
children
&&
tabPaneItem
.
children
.
find
(
w
=>
w
.
menuType
===
'Web4MenuRoot'
)
}
onUpdate=
{
handleUpdateOnMenuChange
}
onUpdate=
{
handleUpdateOnMenuChange
}
configFiles=
{
configFiles
}
configFiles=
{
configFiles
}
updateMenuTree=
{
updateMenuTree
}
updateMenuTree=
{
updateMenuTree
}
...
@@ -360,6 +378,27 @@ const WebConfigPage = props => {
...
@@ -360,6 +378,27 @@ const WebConfigPage = props => {
</
TabPane
>
</
TabPane
>
);
);
const
onOK
=
e
=>
{
setSortVisible
(
false
);
console
.
log
(
e
.
str
);
BatchDragSingleWebsite
(
e
.
str
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
updateModuleTree
(
userMode
||
'super'
);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'调序成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
});
};
return
(
return
(
<
PageContainer
>
<
PageContainer
>
<
div
className=
{
styles
.
webConfigContainer
}
>
<
div
className=
{
styles
.
webConfigContainer
}
>
...
@@ -387,6 +426,12 @@ const WebConfigPage = props => {
...
@@ -387,6 +426,12 @@ const WebConfigPage = props => {
submitting=
{
submitting
}
submitting=
{
submitting
}
hasIntegerate=
{
hasIntegerate
()
}
hasIntegerate=
{
hasIntegerate
()
}
/>
/>
<
SortModal
visible=
{
sortVisible
}
onCancel=
{
()
=>
setSortVisible
(
false
)
}
webs=
{
webs
}
callBackSubmit=
{
onOK
}
/>
</
Spin
>
</
Spin
>
</
div
>
</
div
>
</
PageContainer
>
</
PageContainer
>
...
...
src/pages/productCenter/webConfig/sortModal.jsx
0 → 100644
View file @
95a58f58
/*
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-03-31 17:37:04
* @LastEditors: leizhe
*/
/* eslint-disable array-callback-return */
/* eslint-disable no-plusplus */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Tooltip
}
from
'antd'
;
import
styles
from
'./sortModal.less'
;
import
DragTable
from
'@/components/DragTable/DragTable'
;
const
SortModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
visible
,
onCancel
,
webs
}
=
props
;
const
[
orderTable
,
setOrderTable
]
=
useState
([]);
const
[
flowIDs
,
setFlowIDs
]
=
useState
([]);
const
onSumbit
=
()
=>
{
callBackSubmit
({
str
:
flowIDs
});
};
// 根据orderTable值改变flowIDs
useEffect
(()
=>
{
let
ids
=
[];
orderTable
.
map
(
item
=>
{
ids
.
push
(
item
.
subSystemValue
);
});
console
.
log
(
ids
);
setFlowIDs
(
ids
);
},
[
orderTable
]);
useEffect
(()
=>
{
if
(
visible
)
{
console
.
log
(
webs
);
let
aa
=
[...
webs
];
aa
.
map
(
i
=>
{
delete
i
.
children
;
});
setOrderTable
(
aa
);
}
},
[
visible
]);
// 拖拽回调函数
const
dragCallBack
=
data
=>
{
if
(
data
)
{
setOrderTable
(
data
);
}
};
const
columns
=
[
{
title
:
'网站名'
,
dataIndex
:
'text'
,
width
:
50
,
key
:
'text'
,
render
:
record
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
record
}
>
{
record
}
</
Tooltip
>
),
},
];
return
(
<
Modal
width=
"600px"
visible=
{
visible
}
onCancel=
{
onCancel
}
onOk=
{
onSumbit
}
okText=
"确认"
cancelText=
"取消"
>
<
div
className=
{
styles
.
cardContent
}
style=
{
{
width
:
'90%'
,
marginLeft
:
'24px'
}
}
>
<
div
style=
{
{
minHeight
:
'200px'
}
}
>
<
DragTable
bordered
style=
{
{
marginBottom
:
'10px'
}
}
rowKey=
{
record
=>
record
.
extendID
}
columns=
{
columns
}
dataSource=
{
orderTable
}
// showHeader={false}
pagination=
{
false
}
size=
"small"
dragCallBack=
{
dragCallBack
}
ItemTypes=
"flowOrder"
scroll=
{
{
y
:
500
,
}
}
/>
</
div
>
</
div
>
</
Modal
>
);
};
export
default
SortModal
;
src/pages/productCenter/webConfig/sortModal.less
0 → 100644
View file @
95a58f58
.cardContent {
height: 30rem;
overflow-y: scroll;
overflow-x: scroll;
width: 100%;
.ant-checkbox-group {
.ant-checkbox-wrapper {
width: 100%;
}
}
.ant-table-cell {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
\ No newline at end of file
src/services/hostmanager/hostmanager.js
View file @
95a58f58
...
@@ -54,9 +54,9 @@ export const GetGateWay = param => get(`${PUBLISH_SERVICE}/HostManager/GetGateWa
...
@@ -54,9 +54,9 @@ export const GetGateWay = param => get(`${PUBLISH_SERVICE}/HostManager/GetGateWa
export
const
UpdateGeteWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/UpdateGeteWay`
,
param
);
export
const
UpdateGeteWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/UpdateGeteWay`
,
param
);
// 网关配置
// 网关配置
// export const GetReRoutesFirst = param => get(`/OcelotSettings/GetReRoutes`, param);
// export const GetReRoutesFirst = param => get(`/OcelotSettings/GetReRoutes`, param);
export
const
GetReRoutes
=
param
=>
get
(
`/OcelotSettings/GetReRoutes`
,
param
);
export
const
GetReRoutes
=
param
=>
get
(
`/
PandaCore/GateWay/
OcelotSettings/GetReRoutes`
,
param
);
export
const
SaveRoutes
=
param
=>
post
(
`/OcelotSettings/SaveRoutes`
,
param
);
export
const
SaveRoutes
=
param
=>
post
(
`/
PandaCore/GateWay/
OcelotSettings/SaveRoutes`
,
param
);
export
const
DelRoutes
=
param
=>
get
(
`/OcelotSettings/DelRoutes`
,
param
);
export
const
DelRoutes
=
param
=>
get
(
`/
PandaCore/GateWay/
OcelotSettings/DelRoutes`
,
param
);
// 代理服务老接口
// 代理服务老接口
export
const
GetNginxConfigInfoOLD
=
param
=>
export
const
GetNginxConfigInfoOLD
=
param
=>
...
...
src/services/standingBook/api.js
View file @
95a58f58
...
@@ -47,6 +47,10 @@ export const CM_Event_LoadDepartmentAndRoles = query =>
...
@@ -47,6 +47,10 @@ export const CM_Event_LoadDepartmentAndRoles = query =>
export
const
CM_Event_EditEventTable
=
data
=>
export
const
CM_Event_EditEventTable
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_Event_EditEventTable`
,
data
);
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_Event_EditEventTable`
,
data
);
// 修改事件业务类型
export
const
CM_Event_EditBusinessType
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_Event_EditBusinessType`
,
data
);
// 加载事件权限部门角色
// 加载事件权限部门角色
export
const
GetCM_Event_QueryEventType
=
query
=>
export
const
GetCM_Event_QueryEventType
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/GetCM_Event_QueryEventType`
,
query
);
get
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/GetCM_Event_QueryEventType`
,
query
);
...
...
src/services/webConfig/api.js
View file @
95a58f58
...
@@ -313,3 +313,7 @@ export const GetSpriteSheet = param => get(`${PANDA_GIS}/MultiMedia/GetSpriteShe
...
@@ -313,3 +313,7 @@ export const GetSpriteSheet = param => get(`${PANDA_GIS}/MultiMedia/GetSpriteShe
// 同步地图组件
// 同步地图组件
export
const
SyncMapComponent
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/SyncMapComponent`
,
query
);
export
const
SyncMapComponent
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/SyncMapComponent`
,
query
);
// 批量调整网站顺序
export
const
BatchDragSingleWebsite
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/BatchDragSingleWebsite`
,
data
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment