Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
28176584
Commit
28176584
authored
Dec 07, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:联调上传头像
parent
ee3c6e9d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
22 deletions
+27
-22
src/core/global.less
+6
-7
src/modules/store-manege/EmployeesManagePage.tsx
+19
-13
src/modules/store-manege/modal/SecondCatalogAddOrEditModal.tsx
+2
-2
No files found.
src/core/global.less
View file @
28176584
...
...
@@ -1381,13 +1381,6 @@ input:focus {
}
}
// a {
// color: #FF7519 !important;
// &:active{
// border: none;
// }
// }
.xm_alert {
padding: 5px 11px;
font-size: 14px;
...
...
@@ -1660,3 +1653,9 @@ input:focus {
.ant-table-tbody > tr.ant-table-row-selected td {
background: transparent !important;
}
.ant-table.ant-table-bordered > .ant-table-container {
border: none !important;
}
.ant-table-bordered .ant-table-content {
border: 1px solid #e8e8e8 !important;
}
src/modules/store-manege/EmployeesManagePage.tsx
View file @
28176584
...
...
@@ -64,7 +64,7 @@ function EmployeesManagePage() {
size
:
10
,
nickName
:
""
,
phone
:
""
,
roleCodes
:
[],
roleCodes
:
[
"StoreManager"
],
storeId
:
User
.
getStoreId
(),
});
...
...
@@ -84,6 +84,7 @@ function EmployeesManagePage() {
const
roleMap
=
{
CloudManager
:
"管理员"
,
CloudLecturer
:
"讲师"
,
StoreManager
:
"店铺管理员"
,
};
const
storeId
=
User
.
getStoreId
();
...
...
@@ -104,7 +105,6 @@ function EmployeesManagePage() {
let
_query
=
_
.
clone
(
query
);
_query
.
current
=
query
.
current
+
1
;
StoreService
.
getEmployeeList
(
_query
).
then
((
res
:
any
)
=>
{
console
.
log
(
res
.
result
.
records
);
setEmployeeList
(
res
.
result
.
records
);
setTotal
(
res
.
result
.
total
);
});
...
...
@@ -114,12 +114,18 @@ function EmployeesManagePage() {
StoreService
.
getStoreRole
({
storeId
}).
then
((
res
:
any
)
=>
{
const
data
=
[...
res
.
result
];
const
_query
=
{
...
query
};
const
_data
=
data
.
map
((
item
:
any
)
=>
{
let
_data
=
_
.
filter
(
data
,
_item
=>
{
return
_item
.
roleCode
!==
"StoreManager"
;
});
_data
=
_
.
map
(
_data
,
(
item
:
any
)
=>
{
item
.
isChecked
=
true
;
_query
.
roleCodes
.
push
(
item
.
roleCode
);
return
item
;
});
setQuery
(
_query
);
setRoleIds
(
_data
);
});
...
...
@@ -181,15 +187,17 @@ function EmployeesManagePage() {
}
function
handleEditEmployee
(
record
:
RecordTypes
)
{
const
{
nickName
,
phone
,
roleCodes
,
avatar
}
=
record
;
const
{
nickName
,
phone
,
roleCodes
,
avatar
,
id
}
=
record
;
const
_choosesItem
=
{
nickName
:
nickName
,
phone
:
phone
,
role
:
roleCodes
,
avatar
:
avatar
,
storeUserId
:
id
,
};
setChooseItem
(
_choosesItem
);
const
model
:
React
.
ReactNode
=
<
EmployeeAddOrEditModal
const
model
:
React
.
ReactNode
=
(
<
EmployeeAddOrEditModal
isOpen=
{
true
}
choosedItem=
{
_choosesItem
}
onClose=
{
()
=>
{
...
...
@@ -197,6 +205,7 @@ function EmployeesManagePage() {
getEmployeeList
();
}
}
/>
);
setModel
(
model
);
}
...
...
@@ -246,7 +255,7 @@ function EmployeesManagePage() {
}
}
>
<
div
style=
{
{
flex
:
1
}
}
>
{
/*
搜索员工:
搜索员工:
<
Search
style=
{
{
width
:
300
,
...
...
@@ -260,9 +269,8 @@ function EmployeesManagePage() {
setQuery
(
_query
);
}
}
onSearch=
{
()
=>
getEmployeeList
()
}
/> */
}
<
SearchBar
/>
{
/* <SearchBar
label="搜索用户"
placeholder="搜索用户姓名/手机号"
style={{
...
...
@@ -272,9 +280,7 @@ function EmployeesManagePage() {
value={valueLike}
onSearch={(value: any) => {
const _query = { ...query };
if
(
value
)
{
console
.
log
(
"value"
,
value
);
const
isPhone
=
(
value
||
""
).
match
(
/^
\d
+$/
);
if (valu const isPhone = (value || "").match(/^\d+$/);
const nameLike = isPhone ? "phone" : "nickName";
setValueLike(value);
_query[nameLike] = value;
...
...
@@ -284,7 +290,7 @@ function EmployeesManagePage() {
}
setQuery(_query);
}
}
/>
/
>
*/}
</
div
>
<
div
style=
{
{
flex
:
1
}
}
>
...
...
src/modules/store-manege/modal/SecondCatalogAddOrEditModal.tsx
View file @
28176584
/*
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-0
4 15:28:43
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-0
7 16:00:56
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
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