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
078005dd
Commit
078005dd
authored
Mar 01, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 宿主管理添加生成编号功能
parent
5c72167c
Pipeline
#68227
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
BaseConfig.jsx
...ages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
+28
-3
hostmanager.js
src/services/hostmanager/hostmanager.js
+3
-1
No files found.
src/pages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
View file @
078005dd
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Descriptions
,
Input
,
Card
,
Divider
,
Row
,
Col
}
from
'antd'
;
import
{
Button
,
Descriptions
,
Input
,
Card
,
Divider
,
Row
,
Col
,
message
}
from
'antd'
;
import
CryptoJS
from
'crypto-js'
;
import
CryptoJS
from
'crypto-js'
;
import
styles
from
'./BaseConfig.less'
;
import
styles
from
'./BaseConfig.less'
;
import
{
GetDataBaseConfig
,
GetBasicInfo
}
from
'@/services/hostmanager/hostmanager'
;
import
{
GetDataBaseConfig
,
GetBasicInfo
,
CreateSiteCode
,
}
from
'@/services/hostmanager/hostmanager'
;
import
servie
from
'../../../../assets/images/icons/服务器管理.svg'
;
import
servie
from
'../../../../assets/images/icons/服务器管理.svg'
;
import
configuration
from
'../../../../assets/images/icons/站点配置.svg'
;
import
configuration
from
'../../../../assets/images/icons/站点配置.svg'
;
...
@@ -14,6 +18,7 @@ const BaseConfig = () => {
...
@@ -14,6 +18,7 @@ const BaseConfig = () => {
ip
:
''
,
ip
:
''
,
});
});
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
(
''
);
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
(
''
);
const
[
isLoading
,
setLoading
]
=
useState
(
false
);
const
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'
);
// 十六位十六进制数作为密钥
const
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'
);
// 十六位十六进制数作为密钥
const
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1234567890000000'
);
const
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1234567890000000'
);
...
@@ -56,6 +61,7 @@ const BaseConfig = () => {
...
@@ -56,6 +61,7 @@ const BaseConfig = () => {
};
};
const
getSiteCode
=
()
=>
{
const
getSiteCode
=
()
=>
{
GetBasicInfo
().
then
(
res
=>
{
GetBasicInfo
().
then
(
res
=>
{
setLoading
(
true
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setcurrentSiteInfo
(
res
.
data
);
setcurrentSiteInfo
(
res
.
data
);
}
}
...
@@ -70,7 +76,16 @@ const BaseConfig = () => {
...
@@ -70,7 +76,16 @@ const BaseConfig = () => {
}
}
return
encryptStr
;
return
encryptStr
;
};
};
const
createCode
=
()
=>
{
CreateSiteCode
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
getSiteCode
();
message
.
success
(
'生成成功'
);
}
else
{
message
.
error
(
res
.
msg
);
}
});
};
return
(
return
(
<
div
className=
{
styles
.
base_container
}
>
<
div
className=
{
styles
.
base_container
}
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
...
@@ -85,6 +100,16 @@ const BaseConfig = () => {
...
@@ -85,6 +100,16 @@ const BaseConfig = () => {
站点编号:
站点编号:
</
span
>
</
span
>
<
Input
value=
{
currentSiteInfo
}
disabled
style=
{
{
width
:
'300px'
}
}
/>
<
Input
value=
{
currentSiteInfo
}
disabled
style=
{
{
width
:
'300px'
}
}
/>
<
Button
style=
{
{
marginLeft
:
'10px'
,
display
:
`${!currentSiteInfo && isLoading ? 'inline-block' : 'none'}`
,
}
}
type=
"primary"
onClick=
{
createCode
}
>
生成编号
</
Button
>
<
br
/>
<
br
/>
<
div
style=
{
{
marginTop
:
'50px'
,
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
marginTop
:
'50px'
,
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
img
src=
{
servie
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
img
src=
{
servie
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
...
...
src/services/hostmanager/hostmanager.js
View file @
078005dd
...
@@ -2,10 +2,12 @@
...
@@ -2,10 +2,12 @@
* @Description:
* @Description:
* @Author: leizhe
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2023-0
1-30 17:52:29
* @LastEditTime: 2023-0
3-01 09:29:38
* @LastEditors: dengchao 754083046@qq.com
* @LastEditors: dengchao 754083046@qq.com
*/
*/
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
,
PandaCore
}
from
'@/services/index'
;
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
,
PandaCore
}
from
'@/services/index'
;
// 生成站点编号
export
const
CreateSiteCode
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/CreateSiteCode`
,
param
);
// ETL配置
// ETL配置
// 保存数据中台地址
// 保存数据中台地址
export
const
SaveETLConfig
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/SaveETLConfig`
,
param
);
export
const
SaveETLConfig
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/SaveETLConfig`
,
param
);
...
...
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