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
cb260aac
Commit
cb260aac
authored
2 years ago
by
涂伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/ReactWeb5/maintenance
parents
90e79010
a395b5c7
master
dev-database
dev-达梦
No related merge requests found
Pipeline
#68615
passed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
191 additions
and
185 deletions
+191
-185
WorkflowHomePage.jsx
...ges/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
+6
-5
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+9
-7
AddUserModal.jsx
src/pages/userCenter/userManage/AddUserModal.jsx
+80
-79
EditUserModal.jsx
src/pages/userCenter/userManage/EditUserModal.jsx
+96
-94
No files found.
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
View file @
cb260aac
...
...
@@ -444,11 +444,12 @@ const WorkflowHomePage = () => {
</
div
>
</
div
>
{
ele
.
PreviewImage
?
(
<
img
src=
{
`${
window.location.origin
}/PandaOMS/OMS/FileCenter/DownLoadFiles?filePath=${ele.PreviewImage}`
}
/>
// <img
// src=
{
`${
// window.location.origin
// }/PandaOMS/OMS/FileCenter/DownLoadFiles?filePath=${ele.PreviewImage}`
}
// />
<
img
src=
{
`${window.location.origin}/${ele.PreviewImage}`
}
/>
)
:
(
<
img
className=
{
styles
.
noDataImg
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
cb260aac
...
...
@@ -506,13 +506,15 @@ const IotConfig = props => {
测试连接
</
Button
>
{
upgrade
&&
(
<
Button
type=
"primary"
onClick=
{
()
=>
PingIotUpdata
()
}
style=
{
{
marginLeft
:
'25px'
}
}
>
新增物联子站
</
Button
>
<
Tooltip
title=
"添加物联统一接入平台的子网站,并导入网页菜单数据"
>
<
Button
type=
"primary"
onClick=
{
()
=>
PingIotUpdata
()
}
style=
{
{
marginLeft
:
'25px'
}
}
>
平台升级
</
Button
>
</
Tooltip
>
)
}
<
span
style=
{
{
display
:
show1
}
}
>
<
img
...
...
This diff is collapsed.
Click to expand it.
src/pages/userCenter/userManage/AddUserModal.jsx
View file @
cb260aac
...
...
@@ -76,86 +76,87 @@ const AddUserModal = props => {
const
password
=
addUserForm
.
getFieldValue
(
'password'
)
||
''
;
const
phone
=
addUserForm
.
getFieldValue
(
'phone'
)
||
''
;
const
email
=
addUserForm
.
getFieldValue
(
'email'
)
||
''
;
// 正则验证
if
(
loginName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名不能为空!'
,
});
}
else
if
(
!
noChinese
.
test
(
loginName
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名不支持中文!'
,
});
}
else
if
(
password
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码不能为空!'
,
});
}
else
if
(
password
.
length
<
6
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位,且包含数字和字母!'
,
});
}
else
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户名称不能为空!'
,
});
}
else
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'请输入11位手机号!'
,
});
}
else
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'邮箱格式不正确!'
,
});
}
// 所有验证通过才可以提交,phone/email为空时不验证
else
if
(
noChinese
.
test
(
loginName
)
&&
password
.
length
>=
6
&&
userName
&&
(
phone
===
''
||
isPhone
.
test
(
phone
))
&&
(
email
===
''
||
isEmail
.
test
(
email
))
)
{
console
.
log
(
addUserForm
.
getFieldValue
(
'GroupId'
),
'afasdf'
);
console
.
log
(
orgID
);
addUser
({
GroupId
:
addUserForm
.
getFieldValue
(
'GroupId'
)
||
''
,
OUID
:
orgID
.
id
,
loginName
,
userName
,
password
:
sha1
(
password
).
toUpperCase
(),
phone
,
email
,
})
.
then
(
res
=>
{
console
.
log
(
'fasdkljgiodsaujgioasdgi'
);
if
(
res
.
code
===
0
)
{
addUserForm
.
resetFields
();
onCancel
();
// 设置Modal不可见
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
});
updateTrees1
(
orgID
.
id
);
onSelect
([
`
${
orgID
.
id
}
`
]);
// 重新获取用户表
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
msg
,
});
}
})
.
catch
(
err
=>
{
message
.
error
(
err
);
addUserForm
.
validateFields
().
then
(
validate
=>
{
// 正则验证
if
(
loginName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名不能为空!'
,
});
}
}
else
if
(
!
noChinese
.
test
(
loginName
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名不支持中文!'
,
});
}
else
if
(
password
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码不能为空!'
,
});
}
else
if
(
password
.
length
<
6
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位,且包含数字和字母!'
,
});
}
else
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户名称不能为空!'
,
});
}
else
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'请输入11位手机号!'
,
});
}
else
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'邮箱格式不正确!'
,
});
}
// 所有验证通过才可以提交,phone/email为空时不验证
else
if
(
noChinese
.
test
(
loginName
)
&&
password
.
length
>=
6
&&
userName
&&
(
phone
===
''
||
isPhone
.
test
(
phone
))
&&
(
email
===
''
||
isEmail
.
test
(
email
))
)
{
console
.
log
(
addUserForm
.
getFieldValue
(
'GroupId'
),
'afasdf'
);
console
.
log
(
orgID
);
addUser
({
GroupId
:
addUserForm
.
getFieldValue
(
'GroupId'
)
||
''
,
OUID
:
orgID
.
id
,
loginName
,
userName
,
password
:
sha1
(
password
).
toUpperCase
(),
phone
,
email
,
})
.
then
(
res
=>
{
console
.
log
(
'fasdkljgiodsaujgioasdgi'
);
if
(
res
.
code
===
0
)
{
addUserForm
.
resetFields
();
onCancel
();
// 设置Modal不可见
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
});
updateTrees1
(
orgID
.
id
);
onSelect
([
`
${
orgID
.
id
}
`
]);
// 重新获取用户表
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
msg
,
});
}
})
.
catch
(
err
=>
{
message
.
error
(
err
);
});
}
});
};
// 密码强度验证
const
changeValue
=
changedFields
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/userCenter/userManage/EditUserModal.jsx
View file @
cb260aac
...
...
@@ -50,103 +50,105 @@ const EditUserModal = props => {
const
oldPassword
=
passwordForm
.
getFieldValue
(
'oldPassword'
);
const
newPassword
=
passwordForm
.
getFieldValue
(
'newPassword'
);
const
passwordConfirm
=
passwordForm
.
getFieldValue
(
'passwordConfirm'
);
// 正则验证
if
(
loginName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名称不能为空!'
,
});
return
;
}
if
(
!
noChinese
.
test
(
loginName
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名不支持中文!'
,
});
return
;
}
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户姓名不能为空!'
,
});
return
;
}
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'请输入11位手机号!'
,
});
return
;
}
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'邮箱格式不正确!'
,
});
return
;
}
// if ((newPassword && passwordConfirm === '') || (passwordConfirm && newPassword === '')) {
// notification.error({
// message: '提交失败',
// description: '请填写密码',
// });
// return;
// }
if
((
newPassword
&&
newPassword
.
length
<
6
)
||
(
passwordConfirm
&&
passwordConfirm
<
6
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位!'
,
});
return
;
}
if
(
newPassword
!==
passwordConfirm
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'确认密码不一致!'
,
});
return
;
}
// 所有验证通过才可以提交,phone/email为空时不验证
if
(
loginName
&&
noChinese
.
test
(
loginName
)
&&
userName
&&
(
phone
===
''
||
isPhone
.
test
(
phone
))
&&
(
email
===
''
||
isEmail
.
test
(
email
))
)
{
editUser
(
currentUser
.
userId
,
loginName
,
userName
,
phone
,
email
)
.
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
onCancel
();
// 重新获取用户表
if
(
!
newPassword
)
{
// eslint-disable-next-line no-unused-expressions
currentSelectOrg
===
'-1'
?
submitSearchUser
()
:
onSelect
([
currentSelectOrg
]);
}
editUserForm
.
validateFields
().
then
(
validate
=>
{
// 正则验证
if
(
loginName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名称不能为空!'
,
});
return
;
}
if
(
!
noChinese
.
test
(
loginName
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'登录名不支持中文!'
,
});
return
;
}
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户姓名不能为空!'
,
});
return
;
}
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'请输入11位手机号!'
,
});
return
;
}
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'邮箱格式不正确!'
,
});
return
;
}
// if ((newPassword && passwordConfirm === '') || (passwordConfirm && newPassword === '')) {
// notification.error({
// message: '提交失败',
// description: '请填写密码',
// });
// return;
// }
if
((
newPassword
&&
newPassword
.
length
<
6
)
||
(
passwordConfirm
&&
passwordConfirm
<
6
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位!'
,
});
return
;
}
if
(
newPassword
!==
passwordConfirm
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'确认密码不一致!'
,
});
return
;
}
// 所有验证通过才可以提交,phone/email为空时不验证
if
(
loginName
&&
noChinese
.
test
(
loginName
)
&&
userName
&&
(
phone
===
''
||
isPhone
.
test
(
phone
))
&&
(
email
===
''
||
isEmail
.
test
(
email
))
)
{
editUser
(
currentUser
.
userId
,
loginName
,
userName
,
phone
,
email
)
.
then
(
res
=>
{
if
(
res
.
msg
===
''
)
{
onCancel
();
// 重新获取用户表
if
(
!
newPassword
)
{
// eslint-disable-next-line no-unused-expressions
currentSelectOrg
===
'-1'
?
submitSearchUser
()
:
onSelect
([
currentSelectOrg
]);
}
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
});
submitChangePassword
();
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
message
,
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
});
submitChangePassword
();
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
message
,
});
}
editUserForm
.
setFieldsValue
({
loginName
:
voca
.
stripTags
(
currentUser
.
loginName
),
userName
:
voca
.
stripTags
(
currentUser
.
userName
),
phone
:
voca
.
stripTags
(
currentUser
.
phone
)
||
''
,
email
:
currentUser
.
email
||
''
,
});
}
editUserForm
.
setFieldsValue
({
loginName
:
voca
.
stripTags
(
currentUser
.
loginName
),
userName
:
voca
.
stripTags
(
currentUser
.
userName
),
phone
:
voca
.
stripTags
(
currentUser
.
phone
)
||
''
,
email
:
currentUser
.
email
||
''
,
})
.
catch
(
err
=>
{
message
.
error
(
err
);
});
})
.
catch
(
err
=>
{
message
.
error
(
err
);
});
}
}
});
};
const
title
=
(
<
span
>
...
...
This diff is collapsed.
Click to expand it.
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