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
9ec4b3bf
Commit
9ec4b3bf
authored
Nov 27, 2020
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
78b37d55
30079d9b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
101 additions
and
27 deletions
+101
-27
index.jsx
src/components/TagSelect/index.jsx
+13
-10
User.ts
src/models/CommunityManagement/User.ts
+15
-0
ServiceProvider.ts
src/models/ServiceProvider.ts
+7
-0
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+2
-2
Detail.tsx
...pages/UserManagement/ServiceProviderManagement/Detail.tsx
+26
-4
Guard.tsx
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
+9
-4
Services.tsx
...ges/UserManagement/ServiceProviderManagement/Services.tsx
+17
-7
tos.ts
src/services/tos.ts
+8
-0
method.ts
src/utils/method.ts
+4
-0
No files found.
src/components/TagSelect/index.jsx
View file @
9ec4b3bf
import
{
Tag
,
Input
,
Tooltip
,
Modal
}
from
'antd'
;
import
{
Tag
,
Input
,
Tooltip
,
Modal
,
message
}
from
'antd'
;
import
{
PlusOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
const
{
confirm
}
=
Modal
;
import
styles
from
'./index.less'
;
...
...
@@ -35,10 +35,7 @@ class TagSelect extends React.Component {
icon
:
<
ExclamationCircleOutlined
/>,
content
:
'Some descriptions'
,
onOk
()
{
// console.log('OK');
// console.log(removedTag);
const
value
=
that
.
state
.
value
.
filter
((
tag
)
=>
tag
!==
removedTag
);
// console.log(value);
that
.
props
.
onRemove
(
removedTag
);
that
.
setState
({
value
});
that
.
props
.
onChange
(
value
);
...
...
@@ -61,11 +58,17 @@ class TagSelect extends React.Component {
const
{
inputValue
}
=
this
.
state
;
let
{
value
}
=
this
.
state
;
console
.
log
(
value
);
console
.
log
(
inputValue
);
if
(
!
inputValue
.
trim
())
{
message
.
error
(
'Not Null!!!'
);
return
;
}
if
(
inputValue
&&
value
.
indexOf
(
inputValue
)
===
-
1
)
{
this
.
props
.
onAdd
(
inputValue
);
value
=
[...
value
,
inputValue
];
//
value = [...value, inputValue];
}
// console.log(value);
this
.
props
.
onChange
(
value
);
this
.
setState
({
value
,
...
...
@@ -134,16 +137,16 @@ class TagSelect extends React.Component {
onClose=
{
(
e
)
=>
this
.
handleClose
(
tag
,
e
)
}
visible=
{
true
}
>
<
span
{
/*
<span
onDoubleClick={(e) => {
this.setState({ editInputIndex: index, editInputValue: tag.serviceName }, () => {
this.editInput.focus();
});
e.preventDefault();
}}
>
{
isLongTag
?
`${value.slice(0, 20)}
...
`
:
tag
.
serviceName
}
</
span
>
>
*/
}
{
isLongTag
?
`${value.slice(0, 20)}
...
`
:
tag
.
serviceName
}
{
/* </span> */
}
</
Tag
>
);
return
isLongTag
?
(
...
...
src/models/CommunityManagement/User.ts
View file @
9ec4b3bf
...
...
@@ -133,6 +133,12 @@ export default {
}
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
break
;
case
53
:
{
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
}
}
else
{
switch
(
playload
.
index
)
{
...
...
@@ -182,6 +188,10 @@ export default {
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
break
;
case
44
:
{
let
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
});
}
}
}
},
...
...
@@ -234,5 +244,10 @@ export default {
let
Data4Error
=
null
;
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
},
*
ClearResult
({},
{
put
})
{
let
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
};
src/models/ServiceProvider.ts
View file @
9ec4b3bf
...
...
@@ -105,5 +105,12 @@ export default {
let
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
},
*
DelGuarder
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
'删除保安'
);
console
.
log
(
playload
);
const
res
=
yield
call
(
service
.
TosGuarderDel
,
playload
);
console
.
log
(
res
);
},
},
};
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
9ec4b3bf
...
...
@@ -293,12 +293,12 @@ const UsersDetail = (props: any) => {
<>
<
div
>
<
TitleBack
title=
{
'
Member Detail
'
}
title=
{
'
Family/Tenant Details
'
}
url=
"none"
titleBack=
{
titleBackCallBack
}
></
TitleBack
>
<
Row
>
<
Col
span=
{
4
}
>
Custom
er Type
</
Col
>
<
Col
span=
{
4
}
>
Us
er Type
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_relationship
!=
null
?
user_status
[
memberData
.
owner_relationship
-
1
][
1
]
...
...
src/pages/UserManagement/ServiceProviderManagement/Detail.tsx
View file @
9ec4b3bf
...
...
@@ -13,6 +13,8 @@ const { confirm } = Modal;
const
Detail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
CurDataFollow
,
location
,
SaveChooseData
,
Result
}
=
props
;
const
status
=
[
'Normal'
,
'Cancelled'
];
const
[
loading
,
setLoding
]
=
useState
(
false
);
const
TosSecurityGuarderGet
=
(
values
:
any
)
=>
{
...
...
@@ -32,31 +34,48 @@ const Detail = (props: any) => {
}
},
[]);
// 监听保安数据
// useEffect(() => {
// if (CurDataFollow) {
// // 处理数据
// }
// }, [CurDataFollow]);
// 保安详情页
const
goToGuard
=
(
values
:
any
,
e
:
any
)
=>
{
GuarderById
(
values
);
history
.
push
(
location
.
pathname
+
'/Guard?saferName='
+
values
.
saferName
);
};
// 分页配置
const
pagination
=
{
current
:
1
,
total
:
CurDataFollow
!=
null
?
CurDataFollow
.
length
:
CurDataFollow
,
};
// 列表数据
const
columns
=
[
{
title
:
'User Name'
,
dataIndex
:
'saferName'
},
{
title
:
'Service Community'
,
dataIndex
:
'projectName'
},
{
title
:
'Job Title'
,
dataIndex
:
'cdkCode'
},
{
title
:
'User Status'
,
dataIndex
:
'cdkStatus'
},
{
title
:
'Job Title'
,
dataIndex
:
'jobTitle'
},
{
title
:
'User Status'
,
dataIndex
:
'cdkStatus'
,
render
:
(
text
:
number
,
record
:
any
)
=>
<
div
>
{
status
[
text
]
}
</
div
>,
},
{
title
:
'Actions'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
' '
}
<
a
onClick=
{
goToGuard
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>
),
},
];
// 注销
const
handleClick
=
(
id
:
string
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'9'
)
<
0
)
{
...
...
@@ -77,6 +96,7 @@ const Detail = (props: any) => {
});
};
// 监听注销结果
useEffect
(()
=>
{
console
.
log
(
Result
);
if
(
Result
!==
null
)
{
...
...
@@ -162,7 +182,9 @@ const Detail = (props: any) => {
<
Table
rowKey=
{
'id'
}
style=
{
{
marginTop
:
16
}
}
dataSource=
{
CurDataFollow
}
dataSource=
{
CurDataFollow
&&
CurDataFollow
.
filter
((
v
:
{
deleted
:
number
})
=>
v
.
deleted
!==
1
)
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
...
...
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
View file @
9ec4b3bf
...
...
@@ -7,15 +7,20 @@ import { Link, useIntl, connect, Dispatch } from 'umi';
import
Line
from
'../../../components/Line/Line'
;
import
BackButton
from
'../../../components/BackButton/BackButton'
;
import
TitleGet
from
'../../../components/TitleGet/TitleGet'
;
import
{
timestampToTime
}
from
'../../../utils/time'
;
const
Guard
=
(
props
:
any
)
=>
{
const
{
CurDataFollowDetail
}
=
props
;
const
{
CurDataFollowDetail
,
dispatch
}
=
props
;
console
.
log
(
CurDataFollowDetail
);
const
handleClickBtn
=
()
=>
{};
// 删除保安
const
handleClickBtn
=
(
id
:
string
)
=>
{
dispatch
({
type
:
'ServiceProvider/DelGuarder'
,
playload
:
{
id
},
});
};
return
(
<
div
className=
{
styles
.
base
}
>
...
...
@@ -50,7 +55,7 @@ const Guard = (props: any) => {
<
Line
/>
<
Button
onClick=
{
handleClickBtn
}
>
Cancellation
</
Button
>
<
Button
onClick=
{
handleClickBtn
.
bind
(
this
,
CurDataFollowDetail
.
id
)
}
>
Cancellation
</
Button
>
</
div
>
);
};
...
...
src/pages/UserManagement/ServiceProviderManagement/Services.tsx
View file @
9ec4b3bf
...
...
@@ -5,13 +5,13 @@ import { connect } from 'umi';
import
Line
from
'../../../components/Line/Line'
;
import
TagSelect
from
'../../../components/TagSelect/index'
;
import
{
RA
}
from
'@/utils/method'
;
import
{
RA
,
ClearResult
}
from
'@/utils/method'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
const
module
=
'User'
;
const
Services
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataServices
}
=
props
;
const
{
dispatch
,
DataServices
,
Result
}
=
props
;
const
formRef
=
useRef
(
null
as
any
);
useEffect
(()
=>
{
...
...
@@ -42,10 +42,6 @@ const Services = (props: any) => {
// 添加服务范围
const
Add
=
(
values
:
string
)
=>
{
console
.
log
(
values
);
if
(
!
values
.
trim
())
{
message
.
error
(
'Not Null!!!'
);
return
;
}
RA
(
44
,
{
...
...
@@ -69,6 +65,19 @@ const Services = (props: any) => {
);
};
useEffect
(()
=>
{
console
.
log
(
Result
);
if
(
Result
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
'Failed: binding service provider!!!'
);
}
else
{
message
.
success
(
Result
.
error_msg
);
}
ClearResult
(
'User'
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
}
},
[
Result
]);
return
(
<
div
className=
{
styles
.
base
}
>
<
TitleBack
title=
{
'Services Available Management'
}
></
TitleBack
>
...
...
@@ -86,9 +95,10 @@ const Services = (props: any) => {
};
function
mapStateToProps
(
state
:
any
)
{
const
{
DataServices
}
=
state
.
User
;
const
{
DataServices
,
Result
}
=
state
.
User
;
return
{
DataServices
,
Result
,
};
}
export
default
connect
(
mapStateToProps
)(
Services
);
src/services/tos.ts
View file @
9ec4b3bf
...
...
@@ -77,6 +77,14 @@ export function TosTosServiceProviderDel(values: any) {
headers
:
{
'Content-Type'
:
'application/json'
},
});
}
export
function
TosGuarderDel
(
values
:
any
)
{
return
request
(
'/tos/securityGuarder/Cancel'
,
{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:
{
'Content-Type'
:
'application/json'
},
});
}
// /tos/community/facilities/fuzzy/query
//配置文件
// const yellowcolor ="\033[40;33m"
...
...
src/utils/method.ts
View file @
9ec4b3bf
...
...
@@ -88,6 +88,10 @@ export const DataSaveClear = (module: string, dispatch: any) => {
export
const
Data4ErrorClear
=
(
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/Data4ErrorClear'
});
};
export
const
ClearResult
=
(
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/ClearResult'
});
};
// const reg = [["url", "categoriesImageUrl"], ["name", "categoriesName"]]
// const values = [{ categoriesImageUrl: "http://url", categoriesName: "A9" },{ categoriesImageUrl: "http://url...", categoriesName: "A8" }]
export
const
Fromate
=
(
values
:
any
,
reg
:
any
)
=>
{
...
...
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