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
9342b445
Commit
9342b445
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
1890b26c
ca331f73
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
44 deletions
+49
-44
index.jsx
src/components/TagSelect/index.jsx
+16
-20
ServiceProvider.ts
src/models/ServiceProvider.ts
+6
-0
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+3
-0
Services.tsx
...ges/UserManagement/ServiceProviderManagement/Services.tsx
+24
-24
No files found.
src/components/TagSelect/index.jsx
View file @
9342b445
...
...
@@ -57,9 +57,6 @@ class TagSelect extends React.Component {
handleInputConfirm
=
()
=>
{
const
{
inputValue
}
=
this
.
state
;
let
{
value
}
=
this
.
state
;
console
.
log
(
value
);
console
.
log
(
inputValue
);
if
(
!
inputValue
.
trim
())
{
message
.
error
(
'Not Null!!!'
);
return
;
...
...
@@ -78,6 +75,7 @@ class TagSelect extends React.Component {
};
handleEditInputChange
=
(
e
)
=>
{
console
.
log
(
e
.
target
.
value
);
this
.
setState
({
editInputValue
:
e
.
target
.
value
});
};
...
...
@@ -85,6 +83,7 @@ class TagSelect extends React.Component {
this
.
setState
(({
value
,
editInputIndex
,
editInputValue
})
=>
{
const
newTags
=
[...
value
];
newTags
[
editInputIndex
]
=
editInputValue
;
this
.
props
.
onAdd
(
editInputValue
,
editInputIndex
);
this
.
props
.
onChange
(
newTags
);
return
{
value
:
newTags
,
...
...
@@ -104,19 +103,14 @@ class TagSelect extends React.Component {
render
()
{
const
{
value
,
inputVisible
,
inputValue
,
editInputIndex
,
editInputValue
,
visible
}
=
this
.
state
;
return
(
<>
<
Tag
className=
"editTag"
key=
"Accountant"
>
Accountant
</
Tag
>
{
value
.
map
((
tag
,
index
)
=>
{
if
(
editInputIndex
===
index
)
{
return
(
<
Input
ref=
{
this
.
saveEditInputRef
}
key=
{
tag
.
serviceName
}
key=
{
tag
}
size=
"small"
className=
{
styles
.
tagInput
}
value=
{
editInputValue
}
...
...
@@ -132,25 +126,27 @@ class TagSelect extends React.Component {
const
tagElem
=
(
<
Tag
className=
"editTag"
key=
{
tag
.
serviceName
}
closable=
{
index
!==
-
1
}
key=
{
tag
}
closable=
{
index
!==
0
&&
index
!==
1
}
onClose=
{
(
e
)
=>
this
.
handleClose
(
tag
,
e
)
}
visible=
{
true
}
>
{
/*
<span
<
span
onDoubleClick=
{
(
e
)
=>
{
this.setState({ editInputIndex: index, editInputValue: tag.serviceName }, () => {
this.editInput.focus();
});
e.preventDefault();
if
(
index
!==
0
&&
index
!==
1
)
{
this
.
setState
({
editInputIndex
:
index
,
editInputValue
:
tag
},
()
=>
{
this
.
editInput
.
focus
();
});
e
.
preventDefault
();
}
}
}
>
*/
}
{
isLongTag
?
`${value.slice(0, 20)}
...
`
:
tag
.
serviceName
}
{
/* </span> */
}
>
{
isLongTag
?
`${value.slice(0, 20)}
...
`
:
tag
}
</
span
>
</
Tag
>
);
return
isLongTag
?
(
<
Tooltip
title=
{
tag
.
serviceName
}
key=
{
tag
.
serviceName
}
>
<
Tooltip
title=
{
tag
}
key=
{
tag
}
>
{
tagElem
}
</
Tooltip
>
)
:
(
...
...
src/models/ServiceProvider.ts
View file @
9342b445
...
...
@@ -111,6 +111,12 @@ export default {
console
.
log
(
playload
);
const
res
=
yield
call
(
service
.
TosGuarderDel
,
playload
);
console
.
log
(
res
);
if
(
res
.
error_code
===
'0000'
)
{
message
.
success
(
res
.
error_msg
);
history
.
go
(
-
1
);
}
else
{
message
.
error
(
'Deletion failed,Please try again'
);
}
},
},
};
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
9342b445
...
...
@@ -111,6 +111,9 @@ const UsersDetail = (props: any) => {
id
:
DataSave
.
id
,
owerName
:
DataSave
.
owerName
,
enable
:
DataSave
.
enable
,
buildingNumber
:
DataSave
.
buildingNumber
,
floorNumber
:
DataSave
.
floorNumber
,
roomNumber
:
DataSave
.
roomNumber
,
});
}
else
{
history
.
go
(
-
1
);
...
...
src/pages/UserManagement/ServiceProviderManagement/Services.tsx
View file @
9342b445
...
...
@@ -9,10 +9,14 @@ import { RA, ClearResult } from '@/utils/method';
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
const
module
=
'User'
;
interface
DataType
{
serviceName
:
string
;
id
:
string
;
}
const
Services
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataServices
,
Result
}
=
props
;
const
formRef
=
useRef
(
null
as
any
);
const
[
DataList
,
setDataList
]
=
useState
(
Object
);
useEffect
(()
=>
{
RA
(
43
,
{},
module
,
dispatch
);
...
...
@@ -21,17 +25,10 @@ const Services = (props: any) => {
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
console
.
log
(
DataServices
);
// let tmp = DataServices.data.rows.map((v: object, i: number) => {
// return v['serviceName'];
// });
// console.log(tmp);
// tmp = tmp.filter((v: string) => {
// return v !== 'Accountant';
// });
let
tmp
=
DataServices
.
data
.
rows
.
filter
(
setDataList
(
DataServices
.
data
.
rows
);
let
tmp
=
DataServices
.
data
.
rows
.
map
(
(
v
:
{
serviceName
:
string
;
deleted
:
number
},
i
:
number
)
=>
{
return
v
.
serviceName
!==
'Accountant'
&&
v
.
deleted
!==
1
&&
v
;
return
v
.
deleted
!==
1
&&
v
.
serviceName
;
},
);
console
.
log
(
tmp
);
...
...
@@ -40,12 +37,12 @@ const Services = (props: any) => {
},
[
DataServices
]);
// 添加服务范围
const
Add
=
(
values
:
string
)
=>
{
console
.
log
(
values
);
const
Add
=
(
values
:
string
,
index
?:
number
)
=>
{
RA
(
44
,
{
serviceName
:
values
,
id
:
index
?
DataList
[
index
].
id
:
null
,
},
module
,
dispatch
,
...
...
@@ -53,16 +50,19 @@ const Services = (props: any) => {
};
// 删除服务范围
const
Remove
=
(
values
:
{
id
:
string
})
=>
{
console
.
log
(
values
);
RA
(
53
,
{
id
:
values
.
id
,
},
module
,
dispatch
,
);
const
Remove
=
(
values
:
string
)
=>
{
DataList
.
forEach
((
obj
:
DataType
)
=>
{
if
(
obj
.
serviceName
===
values
)
{
RA
(
53
,
{
id
:
obj
.
id
,
},
module
,
dispatch
,
);
}
});
};
useEffect
(()
=>
{
...
...
@@ -71,7 +71,7 @@ const Services = (props: any) => {
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
'Failed: binding service provider!!!'
);
}
else
{
message
.
success
(
Result
.
error_msg
);
message
.
success
(
'Operate Success!!!'
);
}
ClearResult
(
'User'
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
...
...
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