Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
37a02ed2
Commit
37a02ed2
authored
Jan 29, 2021
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文案
parent
e52152da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
26 deletions
+29
-26
.eslintrc.js
.eslintrc.js
+3
-0
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+15
-10
Guard.tsx
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
+11
-16
No files found.
.eslintrc.js
View file @
37a02ed2
...
...
@@ -5,4 +5,7 @@ module.exports = {
page
:
true
,
REACT_APP_ENV
:
true
,
},
rules
:
{
}
};
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
37a02ed2
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./Edit.less'
;
import
{
Input
,
Button
,
Form
,
Spin
,
Radio
,
message
,
Checkbox
}
from
'antd'
;
import
{
Input
,
Button
,
Form
,
Spin
,
message
,
Checkbox
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
}
from
'@/utils/method'
;
import
{
CheckboxValueType
}
from
'antd/lib/checkbox/Group'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
{
RA
}
from
'@/utils/method
'
;
import
styles
from
'./Edit.less
'
;
const
module
=
'User'
;
let
options
:
Array
<
{
label
:
string
;
value
:
number
}
>
=
[];
...
...
@@ -30,6 +31,11 @@ const Edit = (props: any) => {
};
const
formRef
=
useRef
(
null
as
any
);
// 选择服务商事件
const
onSelectCheckBox
=
(
checkedValue
:
CheckboxValueType
[])
=>
{
console
.
log
(
checkedValue
);
};
// 拿取服务范围数据
useEffect
(()
=>
{
RA
(
43
,
{},
module
,
dispatch
);
...
...
@@ -57,7 +63,6 @@ const Edit = (props: any) => {
},
[]);
useEffect
(()
=>
{
console
.
log
(
CurData
);
if
(
CurData
!=
null
)
{
setload
(
false
);
dispatch
({
type
:
'ServiceProvider/CurDataClear'
,
playload
:
{}
});
...
...
@@ -69,7 +74,7 @@ const Edit = (props: any) => {
setCList
(
SaveChooseData
.
serviceCommunityList
);
if
(
SaveChooseData
.
serviceScopeList
.
length
<=
1
)
{
// 处理服务范围数据
optionsList
.
forEach
((
v
,
index
)
=>
{
optionsList
.
forEach
((
v
)
=>
{
if
(
v
.
serviceName
===
SaveChooseData
.
serviceScope
)
{
SaveChooseData
.
serviceScopeList
[
0
]
=
v
.
serviceCode
;
}
...
...
@@ -92,10 +97,10 @@ const Edit = (props: any) => {
// 提交按钮
const
onFinish
=
(
values
:
any
)
=>
{
if
(
CList
.
length
===
0
)
{
message
.
warning
(
'Please select at least one service Community!'
,
3
);
//
message.warning('Please select at least one service Community!', 3);
return
;
}
var
val
=
values
;
const
val
=
values
;
val
.
serviceCommunityList
=
CList
;
val
.
creator
=
'admin'
;
val
.
updater
=
'admin'
;
...
...
@@ -147,7 +152,7 @@ const Edit = (props: any) => {
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
{
styles
.
line
}
/
>
<
SelectOptions
list=
{
CommunityList
?
CommunityList
.
sort
()
:
[]
}
...
...
@@ -167,7 +172,7 @@ const Edit = (props: any) => {
},
]
}
>
<
Checkbox
.
Group
options=
{
options
as
any
}
/>
<
Checkbox
.
Group
options=
{
options
as
any
}
onChange=
{
onSelectCheckBox
}
/>
{
/* <Radio.Group options={options as any} /> */
}
</
Form
.
Item
>
</
div
>
...
...
@@ -227,7 +232,7 @@ const Edit = (props: any) => {
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
{
styles
.
line
}
/
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
...
...
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
View file @
37a02ed2
import
React
,
{
useEffect
}
from
'react'
;
import
styles
from
'./Guard.less'
;
import
{
Modal
,
Button
,
message
}
from
'antd'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
const
{
confirm
}
=
Modal
;
import
{
connect
}
from
'umi'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./Guard.less'
;
import
{
timestampToTime
}
from
'../../../utils/time'
;
import
Line
from
'../../../components/Line/Line'
;
import
BackButton
from
'../../../components/BackButton/BackButton'
;
import
TitleGet
from
'../../../components/TitleGet/TitleGet'
;
import
{
timestampToTime
}
from
'../../../utils/time'
;
const
{
confirm
}
=
Modal
;
const
Guard
=
(
props
:
any
)
=>
{
const
{
CurDataFollowDetail
,
dispatch
,
history
}
=
props
;
console
.
log
(
CurDataFollowDetail
);
useEffect
(()
=>
{
if
(
!
CurDataFollowDetail
)
{
history
.
goBack
();
...
...
@@ -25,7 +23,7 @@ const Guard = (props: any) => {
const
handleClickBtn
=
(
id
:
string
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'14'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
//
message.error('No Permissions!!!', 3);
return
;
}
confirm
({
...
...
@@ -38,16 +36,13 @@ const Guard = (props: any) => {
playload
:
{
id
},
});
},
onCancel
()
{
console
.
log
(
'Cancel'
);
},
});
};
return
CurDataFollowDetail
?
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
item0
}
>
<
TitleGet
title=
{
'Edit Security Guard Account'
}
/>
<
TitleGet
title=
"Security Guard Account Details"
/>
</
div
>
<
div
className=
{
styles
.
item0_1
}
>
Status:Normal
</
div
>
<
div
className=
{
styles
.
item0_1
}
>
...
...
@@ -59,23 +54,23 @@ const Guard = (props: any) => {
<
div
className=
{
styles
.
item2
}
>
<
BackButton
/>
</
div
>
<
div
className=
{
styles
.
clear0
}
></
div
>
<
div
className=
{
styles
.
clear0
}
/
>
<
div
className=
{
styles
.
item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
companyName
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
clear1
}
/
>
<
div
className=
{
styles
.
item1
}
>
User Name
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferName
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
clear1
}
/
>
<
div
className=
{
styles
.
item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferPhone
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
clear1
}
/
>
<
div
className=
{
styles
.
item1
}
>
Email
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferEmail
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
clear1
}
/
>
<
Line
/>
...
...
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