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
d038ac70
Commit
d038ac70
authored
Oct 24, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改所有密码不用明文传入
parent
3774a9e3
Pipeline
#62320
passed with stages
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
71 additions
and
55 deletions
+71
-55
InitDataBase.jsx
src/pages/database/InitDataBase/InitDataBase.jsx
+24
-22
AddModal.jsx
src/pages/database/databaseConfig/mysqltable/AddModal.jsx
+2
-0
AddModal.jsx
src/pages/database/databaseConfig/oracle/AddModal.jsx
+2
-0
AddModal.jsx
src/pages/database/databaseConfig/sqlServer/AddModal.jsx
+2
-0
AppendModal.jsx
src/pages/database/databaseInitialization/AppendModal.jsx
+1
-1
DatabaseInitialization.jsx
...atabase/databaseInitialization/DatabaseInitialization.jsx
+11
-11
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+5
-6
messageConfig.jsx
...latformCenter/hostmanager/messageConfig/messageConfig.jsx
+2
-2
index.jsx
src/pages/user/login/index.jsx
+1
-1
AddUserModal.jsx
src/pages/userCenter/userManage/AddUserModal.jsx
+9
-1
ChangePasswordModal.jsx
src/pages/userCenter/userManage/ChangePasswordModal.jsx
+2
-1
api.js
src/services/database/api.js
+5
-5
hostmanager.js
src/services/hostmanager/hostmanager.js
+3
-3
api.js
src/services/userManage/api.js
+2
-2
No files found.
src/pages/database/InitDataBase/InitDataBase.jsx
View file @
d038ac70
...
@@ -225,7 +225,7 @@ const InitDataBase = props => {
...
@@ -225,7 +225,7 @@ const InitDataBase = props => {
ip
:
obj
.
ip
,
ip
:
obj
.
ip
,
dbName
:
obj
.
dbName
,
dbName
:
obj
.
dbName
,
userName
:
obj
.
userName
,
userName
:
obj
.
userName
,
password
:
obj
.
password
,
password
:
btoa
(
obj
.
password
)
,
})
})
.
then
(
resnew
=>
{
.
then
(
resnew
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
...
@@ -268,7 +268,7 @@ const InitDataBase = props => {
...
@@ -268,7 +268,7 @@ const InitDataBase = props => {
ip
:
obj
.
ip
,
ip
:
obj
.
ip
,
dbName
:
obj
.
dbName
,
dbName
:
obj
.
dbName
,
userName
:
obj
.
userName
,
userName
:
obj
.
userName
,
password
:
obj
.
password
,
password
:
btoa
(
obj
.
password
)
,
// Type:"SQLServer",
// Type:"SQLServer",
// name:obj.dbName,
// name:obj.dbName,
})
})
...
@@ -301,7 +301,7 @@ const InitDataBase = props => {
...
@@ -301,7 +301,7 @@ const InitDataBase = props => {
// _version: 9999,
// _version: 9999,
// _dc: Date.now(),
// _dc: Date.now(),
userName
:
params
.
userName
||
''
,
userName
:
params
.
userName
||
''
,
password
:
params
.
password
||
''
,
password
:
btoa
(
params
.
password
)
||
''
,
ip
:
params
.
ip
||
''
,
ip
:
params
.
ip
||
''
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -384,7 +384,7 @@ const InitDataBase = props => {
...
@@ -384,7 +384,7 @@ const InitDataBase = props => {
ip
:
obj
.
ip
,
ip
:
obj
.
ip
,
dbName
:
obj
.
dbName
,
dbName
:
obj
.
dbName
,
userName
:
obj
.
userName
,
userName
:
obj
.
userName
,
password
:
obj
.
password
,
password
:
btoa
(
obj
.
password
)
,
desc
,
desc
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -430,7 +430,7 @@ const InitDataBase = props => {
...
@@ -430,7 +430,7 @@ const InitDataBase = props => {
const
GetDb
=
()
=>
{
const
GetDb
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
GetDbProduct
({
...
obj
}).
then
(
res
=>
{
GetDbProduct
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
if
(
res
.
data
.
Product
)
{
if
(
res
.
data
.
Product
)
{
...
@@ -472,7 +472,7 @@ const InitDataBase = props => {
...
@@ -472,7 +472,7 @@ const InitDataBase = props => {
setInitLoading
(
true
);
setInitLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
let
req1
=
GetProductList
();
let
req1
=
GetProductList
();
let
req2
=
GetDbProduct
({
...
obj
});
let
req2
=
GetDbProduct
({
...
obj
,
password
:
btoa
(
obj
.
password
)
});
Promise
.
all
([
req1
,
req2
])
Promise
.
all
([
req1
,
req2
])
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
[
1
].
code
!==
0
||
res
[
0
].
code
!==
0
)
{
if
(
res
[
1
].
code
!==
0
||
res
[
0
].
code
!==
0
)
{
...
@@ -619,22 +619,24 @@ const InitDataBase = props => {
...
@@ -619,22 +619,24 @@ const InitDataBase = props => {
setInitVisible
(
true
);
setInitVisible
(
true
);
doInitLog
();
doInitLog
();
if
(
dbExists
)
{
if
(
dbExists
)
{
InitEditDataBase
({
...
obj
,
productSetting
,
license
:
j
}).
then
(
res
=>
{
InitEditDataBase
({
...
obj
,
productSetting
,
license
:
j
,
password
:
btoa
(
obj
.
password
)
}).
then
(
setInitLoading
(
false
);
res
=>
{
if
(
res
.
code
===
0
)
{
setInitLoading
(
false
);
notification
.
success
({
if
(
res
.
code
===
0
)
{
message
:
'提示'
,
notification
.
success
({
duration
:
3
,
message
:
'提示'
,
description
:
'数据库初始化成功'
,
duration
:
3
,
});
description
:
'数据库初始化成功'
,
}
else
{
});
notification
.
error
({
}
else
{
message
:
'提示'
,
notification
.
error
({
duration
:
5
,
message
:
'提示'
,
description
:
res
.
msg
,
duration
:
5
,
});
description
:
res
.
msg
,
}
});
});
}
},
);
return
;
return
;
}
}
InitAddDataBase
({
...
obj
,
productSetting
,
license
:
j
}).
then
(
res
=>
{
InitAddDataBase
({
...
obj
,
productSetting
,
license
:
j
}).
then
(
res
=>
{
...
...
src/pages/database/databaseConfig/mysqltable/AddModal.jsx
View file @
d038ac70
...
@@ -18,6 +18,7 @@ const AddModal = props => {
...
@@ -18,6 +18,7 @@ const AddModal = props => {
AddConnString
({
AddConnString
({
type
:
'mysql'
,
type
:
'mysql'
,
...
obj
,
...
obj
,
password
:
btoa
(
obj
.
password
),
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
...
@@ -53,6 +54,7 @@ const AddModal = props => {
...
@@ -53,6 +54,7 @@ const AddModal = props => {
type
:
'mysql'
,
type
:
'mysql'
,
...
obj
,
...
obj
,
oldName
:
formObj
.
name
,
oldName
:
formObj
.
name
,
password
:
btoa
(
obj
.
password
),
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
...
...
src/pages/database/databaseConfig/oracle/AddModal.jsx
View file @
d038ac70
...
@@ -18,6 +18,7 @@ const AddModal = props => {
...
@@ -18,6 +18,7 @@ const AddModal = props => {
AddConnString
({
AddConnString
({
...
obj
,
...
obj
,
type
:
'oracle'
,
type
:
'oracle'
,
password
:
btoa
(
obj
.
password
),
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
...
@@ -53,6 +54,7 @@ const AddModal = props => {
...
@@ -53,6 +54,7 @@ const AddModal = props => {
type
:
'oracle'
,
type
:
'oracle'
,
...
obj
,
...
obj
,
oldName
:
formObj
.
name
,
oldName
:
formObj
.
name
,
password
:
btoa
(
obj
.
password
),
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
...
...
src/pages/database/databaseConfig/sqlServer/AddModal.jsx
View file @
d038ac70
...
@@ -18,6 +18,7 @@ const AddModal = props => {
...
@@ -18,6 +18,7 @@ const AddModal = props => {
AddConnString
({
AddConnString
({
...
obj
,
...
obj
,
type
:
'sqlserver'
,
type
:
'sqlserver'
,
password
:
btoa
(
obj
.
password
),
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
...
@@ -53,6 +54,7 @@ const AddModal = props => {
...
@@ -53,6 +54,7 @@ const AddModal = props => {
...
obj
,
...
obj
,
oldName
:
formObj
.
name
,
oldName
:
formObj
.
name
,
type
:
'sqlserver'
,
type
:
'sqlserver'
,
password
:
btoa
(
obj
.
password
),
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
...
...
src/pages/database/databaseInitialization/AppendModal.jsx
View file @
d038ac70
...
@@ -67,7 +67,7 @@ const AppendModal = props => {
...
@@ -67,7 +67,7 @@ const AppendModal = props => {
const
getProduct
=
()
=>
{
const
getProduct
=
()
=>
{
setLoading
(
true
);
setLoading
(
true
);
GetLicenseDifference
(
value
).
then
(
res
=>
{
GetLicenseDifference
(
{
...
value
,
password
:
btoa
(
value
.
password
)
}
).
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
let
aab
=
[];
let
aab
=
[];
...
...
src/pages/database/databaseInitialization/DatabaseInitialization.jsx
View file @
d038ac70
...
@@ -308,7 +308,7 @@ const DatabaseInitialization = props => {
...
@@ -308,7 +308,7 @@ const DatabaseInitialization = props => {
ip
:
resdata
.
data
.
ip
,
ip
:
resdata
.
data
.
ip
,
dbName
:
resdata
.
data
.
dbName
,
dbName
:
resdata
.
data
.
dbName
,
userName
:
resdata
.
data
.
userName
,
userName
:
resdata
.
data
.
userName
,
password
:
resdata
.
data
.
password
,
password
:
btoa
(
resdata
.
data
.
password
)
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
DbInfo
.
ip
==
'127.0.0.1'
||
!
res
.
data
.
DbInfo
.
ip
)
{
if
(
res
.
data
.
DbInfo
.
ip
==
'127.0.0.1'
||
!
res
.
data
.
DbInfo
.
ip
)
{
...
@@ -411,7 +411,7 @@ const DatabaseInitialization = props => {
...
@@ -411,7 +411,7 @@ const DatabaseInitialization = props => {
const
GetDbChangeFirst
=
kk
=>
{
const
GetDbChangeFirst
=
kk
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
GetDbProduct
({
...
obj
}).
then
(
res
=>
{
GetDbProduct
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
IsAuthorize
)
{
if
(
res
.
data
.
IsAuthorize
)
{
...
@@ -461,7 +461,7 @@ const DatabaseInitialization = props => {
...
@@ -461,7 +461,7 @@ const DatabaseInitialization = props => {
const
GetDbChange
=
e
=>
{
const
GetDbChange
=
e
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
GetDbProduct
({
...
obj
}).
then
(
res
=>
{
GetDbProduct
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
IsAuthorize
)
{
if
(
res
.
data
.
IsAuthorize
)
{
...
@@ -563,7 +563,7 @@ const DatabaseInitialization = props => {
...
@@ -563,7 +563,7 @@ const DatabaseInitialization = props => {
const
GetDbChangeAppend
=
()
=>
{
const
GetDbChangeAppend
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
GetDbProduct
({
...
obj
}).
then
(
res
=>
{
GetDbProduct
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
Product
)
{
if
(
res
.
data
.
Product
)
{
...
@@ -643,7 +643,7 @@ const DatabaseInitialization = props => {
...
@@ -643,7 +643,7 @@ const DatabaseInitialization = props => {
handleShowModal
(
'initVisible'
,
false
);
handleShowModal
(
'initVisible'
,
false
);
setInitVisible
(
true
);
setInitVisible
(
true
);
doInitLog
();
doInitLog
();
NewInitAddDataBase
({
...
obj
,
productSetting
}).
then
(
res
=>
{
NewInitAddDataBase
({
...
obj
,
productSetting
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
GetDbChangeAppend
();
GetDbChangeAppend
();
setMsg
(
'未检测到可用License'
);
setMsg
(
'未检测到可用License'
);
...
@@ -697,7 +697,7 @@ const DatabaseInitialization = props => {
...
@@ -697,7 +697,7 @@ const DatabaseInitialization = props => {
setInitVisible
(
true
);
setInitVisible
(
true
);
doInitLog
();
doInitLog
();
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
InitEditDataBase
(
obj
).
then
(
res
=>
{
InitEditDataBase
(
{
...
obj
,
password
:
btoa
(
obj
.
password
)
}
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
GetDbChangeAppend
();
GetDbChangeAppend
();
setMsg
(
'未检测到可用License'
);
setMsg
(
'未检测到可用License'
);
...
@@ -798,7 +798,7 @@ const DatabaseInitialization = props => {
...
@@ -798,7 +798,7 @@ const DatabaseInitialization = props => {
// setKeepValue([]);
// setKeepValue([]);
setProduct
([]);
setProduct
([]);
setCardLoading
(
true
);
setCardLoading
(
true
);
GetProductList
({
...
obj
}).
then
(
res
=>
{
GetProductList
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
GetDbChange
();
GetDbChange
();
...
@@ -830,7 +830,7 @@ const DatabaseInitialization = props => {
...
@@ -830,7 +830,7 @@ const DatabaseInitialization = props => {
const
onCheckLaster
=
aa
=>
{
const
onCheckLaster
=
aa
=>
{
// 此时有授权码才能进入
// 此时有授权码才能进入
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
CheckDatabaseIsExist
({
...
obj
}).
then
(
res
=>
{
CheckDatabaseIsExist
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
setDataValue
(
form
.
getFieldsValue
());
setDataValue
(
form
.
getFieldsValue
());
...
@@ -870,7 +870,7 @@ const DatabaseInitialization = props => {
...
@@ -870,7 +870,7 @@ const DatabaseInitialization = props => {
const
Submit
=
()
=>
{
const
Submit
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
if
(
obj
.
ip
&&
obj
.
userName
&&
obj
.
password
&&
obj
.
dbName
)
{
if
(
obj
.
ip
&&
obj
.
userName
&&
obj
.
password
&&
obj
.
dbName
)
{
GetProductList
({
...
obj
}).
then
(
res
=>
{
GetProductList
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
GetDbChange
(
1
);
GetDbChange
(
1
);
...
@@ -900,7 +900,7 @@ const DatabaseInitialization = props => {
...
@@ -900,7 +900,7 @@ const DatabaseInitialization = props => {
const
findCheck
=
aa
=>
{
const
findCheck
=
aa
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
CheckDatabaseIsExist
({
...
obj
}).
then
(
res
=>
{
CheckDatabaseIsExist
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setDataValue
(
form
.
getFieldsValue
());
setDataValue
(
form
.
getFieldsValue
());
...
@@ -947,7 +947,7 @@ const DatabaseInitialization = props => {
...
@@ -947,7 +947,7 @@ const DatabaseInitialization = props => {
const
findCheck1
=
aa
=>
{
const
findCheck1
=
aa
=>
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
CheckDatabaseIsExist
({
...
obj
}).
then
(
res
=>
{
CheckDatabaseIsExist
({
...
obj
,
password
:
btoa
(
obj
.
password
)
}).
then
(
res
=>
{
setCardLoading
(
false
);
setCardLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setDataValue
(
form
.
getFieldsValue
());
setDataValue
(
form
.
getFieldsValue
());
...
...
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
d038ac70
...
@@ -74,7 +74,7 @@ const IotConfig = () => {
...
@@ -74,7 +74,7 @@ const IotConfig = () => {
const
[
switchStatus
,
setSwitchStatus
]
=
useState
(
true
);
const
[
switchStatus
,
setSwitchStatus
]
=
useState
(
true
);
const
[
dbStatus
,
setDbStatus
]
=
useState
(
''
);
// 数据库状态
const
[
dbStatus
,
setDbStatus
]
=
useState
(
''
);
// 数据库状态
const
[
buStatus
,
setBuStatus
]
=
useState
(
''
);
// 按钮状态
const
[
buStatus
,
setBuStatus
]
=
useState
(
''
);
// 按钮状态
const
[
keep
,
setKeep
]
=
useState
(
''
)
const
[
keep
,
setKeep
]
=
useState
(
''
)
;
useEffect
(()
=>
{
useEffect
(()
=>
{
HealthCheck
().
then
(
res
=>
{
HealthCheck
().
then
(
res
=>
{
...
@@ -100,11 +100,11 @@ const IotConfig = () => {
...
@@ -100,11 +100,11 @@ const IotConfig = () => {
const
getCurrentConfig
=
()
=>
{
const
getCurrentConfig
=
()
=>
{
GetDataBaseConfig
().
then
(
res
=>
{
GetDataBaseConfig
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
GetDbProduct
(
res
.
data
).
then
(
ress
=>
{
GetDbProduct
(
{
...
res
.
data
,
password
:
btoa
(
res
.
data
.
password
)
}
).
then
(
ress
=>
{
console
.
log
(
ress
.
data
.
Project
);
console
.
log
(
ress
.
data
.
Project
);
if
(
ress
.
data
.
Project
.
length
>
0
)
{
if
(
ress
.
data
.
Project
.
length
>
0
)
{
console
.
log
(
ress
.
data
.
Project
[
ress
.
data
.
Project
.
length
-
1
].
projectName
);
console
.
log
(
ress
.
data
.
Project
[
ress
.
data
.
Project
.
length
-
1
].
projectName
);
setKeep
(
ress
.
data
.
Project
[
ress
.
data
.
Project
.
length
-
1
].
projectName
)
setKeep
(
ress
.
data
.
Project
[
ress
.
data
.
Project
.
length
-
1
].
projectName
)
;
}
}
});
});
setCurrentDataBase
(
res
.
data
);
setCurrentDataBase
(
res
.
data
);
...
@@ -285,7 +285,7 @@ const IotConfig = () => {
...
@@ -285,7 +285,7 @@ const IotConfig = () => {
pwd
:
currentDataBase
.
password
,
pwd
:
currentDataBase
.
password
,
dataBaseName
:
currentDataBase
.
dbName
,
dataBaseName
:
currentDataBase
.
dbName
,
siteCode
:
currentSiteInfo
,
siteCode
:
currentSiteInfo
,
name
:
keep
,
name
:
keep
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
.
success
)
{
if
(
res
.
success
)
{
...
@@ -463,8 +463,7 @@ const IotConfig = () => {
...
@@ -463,8 +463,7 @@ const IotConfig = () => {
<
span
style=
{
{
marginLeft
:
'14px'
}
}
>
{
`${currentDataBase.ip}/${
<
span
style=
{
{
marginLeft
:
'14px'
}
}
>
{
`${currentDataBase.ip}/${
currentDataBase.dbName
currentDataBase.dbName
}`
}
</
span
>
}`
}
</
span
>
{
show3
===
'none'
?<></>:
<
span
>
(
{
dbStatus
}
)
</
span
>
}
{
show3
===
'none'
?
<></>
:
<
span
>
(
{
dbStatus
}
)
</
span
>
}
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"加载进度"
style=
{
{
marginLeft
:
'65px'
}
}
>
<
Form
.
Item
label=
"加载进度"
style=
{
{
marginLeft
:
'65px'
}
}
>
<
div
style=
{
{
width
:
200
,
marginBottom
:
'30px'
}
}
>
<
div
style=
{
{
width
:
200
,
marginBottom
:
'30px'
}
}
>
...
...
src/pages/platformCenter/hostmanager/messageConfig/messageConfig.jsx
View file @
d038ac70
...
@@ -39,7 +39,7 @@ const MessageConfig = () => {
...
@@ -39,7 +39,7 @@ const MessageConfig = () => {
messAddress
:
values
.
messageAddress
,
messAddress
:
values
.
messageAddress
,
sqlServerIP
:
currentDataBase
.
ip
,
sqlServerIP
:
currentDataBase
.
ip
,
loginName
:
currentDataBase
.
userName
,
loginName
:
currentDataBase
.
userName
,
password
:
currentDataBase
.
password
,
password
:
btoa
(
currentDataBase
.
password
)
,
sqlName
:
currentDataBase
.
dbName
,
sqlName
:
currentDataBase
.
dbName
,
siteCode
:
currentSiteInfo
,
siteCode
:
currentSiteInfo
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
...
@@ -72,7 +72,7 @@ const MessageConfig = () => {
...
@@ -72,7 +72,7 @@ const MessageConfig = () => {
messAddress
:
CurrentAddress
,
messAddress
:
CurrentAddress
,
sqlServerIP
:
CurrentDataBase
.
ip
,
sqlServerIP
:
CurrentDataBase
.
ip
,
loginName
:
CurrentDataBase
.
userName
,
loginName
:
CurrentDataBase
.
userName
,
password
:
CurrentDataBase
.
password
,
password
:
btoa
(
CurrentDataBase
.
password
)
,
sqlName
:
CurrentDataBase
.
dbName
,
sqlName
:
CurrentDataBase
.
dbName
,
siteCode
:
currentSiteInfo
,
siteCode
:
currentSiteInfo
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
...
...
src/pages/user/login/index.jsx
View file @
d038ac70
...
@@ -34,7 +34,7 @@ const Login = props => {
...
@@ -34,7 +34,7 @@ const Login = props => {
console
.
log
(
values
);
// eg:{userName: "123", password: "123"}
console
.
log
(
values
);
// eg:{userName: "123", password: "123"}
const
{
userName
:
loginName
,
password
}
=
values
;
const
{
userName
:
loginName
,
password
}
=
values
;
setLoading
(
true
);
setLoading
(
true
);
OMSLogin
(
loginName
,
password
,
'CivManage'
)
OMSLogin
(
loginName
,
sha1
(
password
).
toUpperCase
()
,
'CivManage'
)
.
then
(
result
=>
{
.
then
(
result
=>
{
const
{
msg
}
=
result
;
const
{
msg
}
=
result
;
...
...
src/pages/userCenter/userManage/AddUserModal.jsx
View file @
d038ac70
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import
{
Modal
,
Form
,
Input
,
notification
,
message
,
TreeSelect
}
from
'antd'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
,
TreeSelect
}
from
'antd'
;
import
{
addUser
,
GetUserRelationListNew
}
from
'@/services/userManage/api'
;
import
{
addUser
,
GetUserRelationListNew
}
from
'@/services/userManage/api'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
sha1
from
'sha1'
;
import
{
ok
}
from
'../../../assets/images/icons/ok.svg'
;
import
{
ok
}
from
'../../../assets/images/icons/ok.svg'
;
import
styles
from
'./AddUserModal.less'
;
import
styles
from
'./AddUserModal.less'
;
const
{
SHOW_CHILD
}
=
TreeSelect
;
const
{
SHOW_CHILD
}
=
TreeSelect
;
...
@@ -120,7 +121,14 @@ const AddUserModal = props => {
...
@@ -120,7 +121,14 @@ const AddUserModal = props => {
(
phone
===
''
||
isPhone
.
test
(
phone
))
&&
(
phone
===
''
||
isPhone
.
test
(
phone
))
&&
(
email
===
''
||
isEmail
.
test
(
email
))
(
email
===
''
||
isEmail
.
test
(
email
))
)
{
)
{
addUser
({
OUID
:
orgID
.
id
,
loginName
,
userName
,
password
,
phone
,
email
})
addUser
({
OUID
:
orgID
.
id
,
loginName
,
userName
,
password
:
sha1
(
password
).
toUpperCase
(),
phone
,
email
,
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
addUserForm
.
resetFields
();
addUserForm
.
resetFields
();
...
...
src/pages/userCenter/userManage/ChangePasswordModal.jsx
View file @
d038ac70
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
}
from
'antd'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
}
from
'antd'
;
import
{
updateUserPassword
}
from
'@/services/userManage/api'
;
import
{
updateUserPassword
}
from
'@/services/userManage/api'
;
import
sha1
from
'sha1'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
styles
from
'./AddUserModal.less'
;
import
styles
from
'./AddUserModal.less'
;
...
@@ -40,7 +41,7 @@ const ChangePasswordModal = props => {
...
@@ -40,7 +41,7 @@ const ChangePasswordModal = props => {
updateUserPassword
({
updateUserPassword
({
UserId
:
+
currentUser
.
userID
,
UserId
:
+
currentUser
.
userID
,
OldPassWord
:
oldPassword
,
OldPassWord
:
oldPassword
,
NewPassWord
:
newPassword
,
NewPassWord
:
sha1
(
newPassword
).
toUpperCase
()
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
src/services/database/api.js
View file @
d038ac70
...
@@ -29,14 +29,14 @@ export const getConnRecordNew = params => get(`${PUBLISH_SERVICE}/DBManager/GetC
...
@@ -29,14 +29,14 @@ export const getConnRecordNew = params => get(`${PUBLISH_SERVICE}/DBManager/GetC
// 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
=>
export
const
saveConnectionNew
=
params
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/SaveConnection`
,
params
);
pos
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/SaveConnection`
,
params
);
// 获取数据库列表
// 获取数据库列表
// export const getDataBaseList = params =>
// export const getDataBaseList = params =>
// get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseList`, params);
// get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseList`, params);
export
const
getDataBaseList
=
params
=>
export
const
getDataBaseList
=
params
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/getDataBaseList`
,
params
);
pos
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/getDataBaseList`
,
params
);
// 数据库初始化
// 数据库初始化
// export const initDBv4 = params =>
// export const initDBv4 = params =>
...
@@ -47,7 +47,7 @@ export const initDBv4new = params => get(`${PUBLISH_SERVICE}/DBManager/InitDB`,
...
@@ -47,7 +47,7 @@ export const initDBv4new = params => get(`${PUBLISH_SERVICE}/DBManager/InitDB`,
// 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
=>
export
const
updateConnDescNew
=
params
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/UpdateConnDesc`
,
params
);
pos
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/UpdateConnDesc`
,
params
);
// 获取日志
// 获取日志
// export const getInitDBLog = params =>
// export const getInitDBLog = params =>
...
@@ -178,9 +178,9 @@ export const editMySQLConnString = params =>
...
@@ -178,9 +178,9 @@ export const editMySQLConnString = params =>
// 获取数据库链接字符串
// 获取数据库链接字符串
export
const
GetConnString
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/GetConnString`
,
params
);
export
const
GetConnString
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/GetConnString`
,
params
);
// 添加数据库链接字符串
// 添加数据库链接字符串
export
const
AddConnString
=
params
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/AddConnString`
,
params
);
export
const
AddConnString
=
params
=>
pos
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/AddConnString`
,
params
);
// 编辑数据库链接字符串
// 编辑数据库链接字符串
export
const
EditConnString
=
params
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/EditConnString`
,
params
);
export
const
EditConnString
=
params
=>
pos
t
(
`
${
PUBLISH_SERVICE
}
/DBManager/EditConnString`
,
params
);
// 删除数据库连接
// 删除数据库连接
export
const
DeleteConnString
=
params
=>
export
const
DeleteConnString
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/DeleteConnString`
,
params
);
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/DeleteConnString`
,
params
);
...
...
src/services/hostmanager/hostmanager.js
View file @
d038ac70
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* @Description:
* @Description:
* @Author: leizhe
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-
07-08 17:45:40
* @LastEditTime: 2022-
10-24 14:41:23
* @LastEditors:
leizhe
* @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'
;
...
@@ -36,7 +36,7 @@ export const DepositServiceEnable = param => post(`/api/DB/DepositServiceEnable`
...
@@ -36,7 +36,7 @@ export const DepositServiceEnable = param => post(`/api/DB/DepositServiceEnable`
export
const
GetMessageConfigInfo
=
param
=>
export
const
GetMessageConfigInfo
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/GetMessageConfigInfo`
,
param
);
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/GetMessageConfigInfo`
,
param
);
export
const
ConnectMessPlatform
=
param
=>
export
const
ConnectMessPlatform
=
param
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/HostManager/ConnectMessagePlatform`
,
param
);
pos
t
(
`
${
PUBLISH_SERVICE
}
/HostManager/ConnectMessagePlatform`
,
param
);
export
const
SaveSystemInfo
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/SaveSystemInfo`
,
param
);
export
const
SaveSystemInfo
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/SaveSystemInfo`
,
param
);
// 代理服务器接口
// 代理服务器接口
...
...
src/services/userManage/api.js
View file @
d038ac70
...
@@ -38,7 +38,7 @@ export const GetUserByKeyNew = params => get(`${PUBLISH_SERVICE}/UserCenter/GetU
...
@@ -38,7 +38,7 @@ export const GetUserByKeyNew = params => get(`${PUBLISH_SERVICE}/UserCenter/GetU
* @param {*} param0
* @param {*} param0
*/
*/
export
const
addUser
=
({
OUID
,
loginName
,
userName
,
password
,
phone
,
email
})
=>
export
const
addUser
=
({
OUID
,
loginName
,
userName
,
password
,
phone
,
email
})
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/UserCenter/AddUser`
,
{
pos
t
(
`
${
PUBLISH_SERVICE
}
/UserCenter/AddUser`
,
{
_version
:
9999
,
_version
:
9999
,
_dc
:
Date
.
now
(),
_dc
:
Date
.
now
(),
OUID
,
OUID
,
...
@@ -160,7 +160,7 @@ export const GetOUTreeNew = params => get(`${PUBLISH_SERVICE}/UserCenter/GetOUTr
...
@@ -160,7 +160,7 @@ export const GetOUTreeNew = params => get(`${PUBLISH_SERVICE}/UserCenter/GetOUTr
export
const
GetUserRelationListNew
=
params
=>
export
const
GetUserRelationListNew
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetUserRelationList`
,
params
);
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetUserRelationList`
,
params
);
export
const
AddUserNew
=
params
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/UserCenter/AddUser`
,
params
);
export
const
AddUserNew
=
params
=>
pos
t
(
`
${
PUBLISH_SERVICE
}
/UserCenter/AddUser`
,
params
);
export
const
AddOUNew
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/AddOUNew`
,
params
);
export
const
AddOUNew
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/AddOUNew`
,
params
);
...
...
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