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
5e30ca6c
Commit
5e30ca6c
authored
Dec 09, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:去掉无用代码
parent
ccb56123
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
39 deletions
+6
-39
src/modules/root/App.tsx
+2
-5
src/modules/store-manege/EmployeeAddOrEditModal.tsx
+1
-15
src/modules/store-manege/EmployeesManagePage.tsx
+2
-13
src/modules/store-manege/UserManagePage.tsx
+1
-6
No files found.
src/modules/root/App.tsx
View file @
5e30ca6c
/*
/*
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-07-10 10:30:49
* @Date: 2019-07-10 10:30:49
* @LastEditors:
zhangleyu
an
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-0
8 20:09:55
* @LastEditTime: 2020-12-0
9 10:57:57
* @Description:
* @Description:
*/
*/
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
...
@@ -11,10 +11,8 @@ import {ConfigProvider } from 'antd';
...
@@ -11,10 +11,8 @@ import {ConfigProvider } from 'antd';
import
Header
from
'./Header'
import
Header
from
'./Header'
import
Menu
from
'./Menu'
import
Menu
from
'./Menu'
import
Main
from
'./Main'
import
Main
from
'./Main'
import
{
Route
,
Switch
}
from
'react-router-dom'
import
zhCN
from
'antd/es/locale/zh_CN'
import
zhCN
from
'antd/es/locale/zh_CN'
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
axios
from
'axios'
;
import
BaseService
from
"@/domains/basic-domain/baseService"
;
import
BaseService
from
"@/domains/basic-domain/baseService"
;
import
{
XMContext
}
from
'@/store/context'
;
import
{
XMContext
}
from
'@/store/context'
;
import
{
setStoreGroupPermission
,
setStorePermission
,
setStoreGroupList
,
setStoreList
}
from
'@/store/actions/index'
;
import
{
setStoreGroupPermission
,
setStorePermission
,
setStoreGroupList
,
setStoreList
}
from
'@/store/actions/index'
;
...
@@ -23,7 +21,6 @@ declare var window: any;
...
@@ -23,7 +21,6 @@ declare var window: any;
const
App
:
React
.
FC
=
(
props
:
any
)
=>
{
const
App
:
React
.
FC
=
(
props
:
any
)
=>
{
const
ctx
:
any
=
useContext
(
XMContext
);
const
ctx
:
any
=
useContext
(
XMContext
);
const
userId
=
User
.
getUserId
();
const
userId
=
User
.
getUserId
();
const
[
menuType
,
setMenuType
]
=
useState
(
true
)
window
.
ctx
=
ctx
;
window
.
ctx
=
ctx
;
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
src/modules/store-manege/EmployeeAddOrEditModal.tsx
View file @
5e30ca6c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @Date: 2020-11-27 16:21:49
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2020-12-0
8 19:08:57
* @LastEditTime: 2020-12-0
9 10:56:50
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -80,14 +80,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
...
@@ -80,14 +80,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
wrapperCol
:
{
span
:
12
},
wrapperCol
:
{
span
:
12
},
};
};
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
"Success:"
,
values
);
};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
"Failed:"
,
errorInfo
);
};
function
handleChangeRole
(
value
:
string
)
{
function
handleChangeRole
(
value
:
string
)
{
setRole
(
value
);
setRole
(
value
);
}
}
...
@@ -118,7 +110,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
...
@@ -118,7 +110,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
function
handleOk
():
void
{
function
handleOk
():
void
{
const
values
=
form
.
getFieldsValue
();
const
values
=
form
.
getFieldsValue
();
console
.
log
(
"values"
,
values
);
if
(
!
values
.
nickName
.
trim
())
{
if
(
!
values
.
nickName
.
trim
())
{
setNameErrorMsg
(
"请输入员工姓名"
);
setNameErrorMsg
(
"请输入员工姓名"
);
setNameStatus
(
"error"
);
setNameStatus
(
"error"
);
...
@@ -217,8 +208,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
...
@@ -217,8 +208,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
form=
{
form
}
form=
{
form
}
name=
"basic"
name=
"basic"
initialValues=
{
{
nickName
:
nickName
,
phone
:
phone
,
role
:
role
}
}
initialValues=
{
{
nickName
:
nickName
,
phone
:
phone
,
role
:
role
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
>
<
Form
.
Item
<
Form
.
Item
label=
"员工姓名"
label=
"员工姓名"
...
@@ -229,7 +218,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
...
@@ -229,7 +218,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
>
>
<
Input
<
Input
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
// value={nickName}
placeholder=
"请输入员工名称"
placeholder=
"请输入员工名称"
maxLength=
{
15
}
maxLength=
{
15
}
onChange=
{
(
e
)
=>
handleChangeValues
(
"nickName"
,
e
.
target
.
value
)
}
onChange=
{
(
e
)
=>
handleChangeValues
(
"nickName"
,
e
.
target
.
value
)
}
...
@@ -245,7 +233,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
...
@@ -245,7 +233,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
>
>
<
InputNumber
<
InputNumber
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
// value={phone}
placeholder=
"请输入手机号"
placeholder=
"请输入手机号"
maxLength=
{
11
}
maxLength=
{
11
}
disabled=
{
!!
props
.
choosedItem
.
nickName
}
disabled=
{
!!
props
.
choosedItem
.
nickName
}
...
@@ -259,7 +246,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
...
@@ -259,7 +246,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
rules=
{
[{
required
:
false
}]
}
rules=
{
[{
required
:
false
}]
}
>
>
<
RadioGroup
<
RadioGroup
// value={role}
onChange=
{
(
e
)
=>
{
onChange=
{
(
e
)
=>
{
handleChangeValues
(
"role"
,
e
.
target
.
value
);
handleChangeValues
(
"role"
,
e
.
target
.
value
);
}
}
}
}
...
...
src/modules/store-manege/EmployeesManagePage.tsx
View file @
5e30ca6c
...
@@ -9,16 +9,14 @@ import React, { useEffect, useState } from "react";
...
@@ -9,16 +9,14 @@ import React, { useEffect, useState } from "react";
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
import
PageControl
from
"@/components/PageControl"
;
import
PageControl
from
"@/components/PageControl"
;
import
{
CheckBox
,
SearchBar
}
from
"@/components"
;
import
{
CheckBox
}
from
"@/components"
;
import
{
Button
,
Table
,
Tooltip
,
Modal
,
message
,
Row
,
Col
,
Input
}
from
"antd"
;
import
{
Button
,
Table
,
Modal
,
message
,
Input
}
from
"antd"
;
import
{
QuestionCircleOutlined
}
from
"@ant-design/icons"
;
import
{
QuestionCircleOutlined
}
from
"@ant-design/icons"
;
import
{
storeRoleEnum
}
from
"@/domains/store-domain/constants"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
EmployeeAddOrEditModal
from
"./EmployeeAddOrEditModal"
;
import
EmployeeAddOrEditModal
from
"./EmployeeAddOrEditModal"
;
import
User
from
"@/common/js/user"
;
import
User
from
"@/common/js/user"
;
import
"./EmployeesManagePage.less"
;
import
"./EmployeesManagePage.less"
;
import
{
string
}
from
"prop-types"
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
...
@@ -116,14 +114,6 @@ function EmployeesManagePage() {
...
@@ -116,14 +114,6 @@ function EmployeesManagePage() {
return
_item
.
roleCode
!==
"StoreManager"
;
return
_item
.
roleCode
!==
"StoreManager"
;
});
});
// _data = _.map(_data, (item: any) => {
// item.isChecked = true;
// _query.roleCodes.push(item.roleCode);
// return item;
// });
// setQuery(_query);
setRoleIds
(
_data
);
setRoleIds
(
_data
);
});
});
}
}
...
@@ -254,7 +244,6 @@ function EmployeesManagePage() {
...
@@ -254,7 +244,6 @@ function EmployeesManagePage() {
function
handleQuery
(
name
:
string
,
value
:
any
)
{
function
handleQuery
(
name
:
string
,
value
:
any
)
{
const
_query
=
_
.
clone
(
query
);
const
_query
=
_
.
clone
(
query
);
// _query[name] = value;
setQuery
(
_query
);
setQuery
(
_query
);
}
}
...
...
src/modules/store-manege/UserManagePage.tsx
View file @
5e30ca6c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2020-12-0
8 13:42:55
* @LastEditTime: 2020-12-0
9 10:57:18
* @Description: 用户管理页面
* @Description: 用户管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -78,11 +78,6 @@ function UserManagePage() {
...
@@ -78,11 +78,6 @@ function UserManagePage() {
];
];
}
}
function
handleQuery
(
name
:
string
,
value
:
any
)
{
const
_query
=
_
.
clone
(
query
);
// _query[name] = value;
setQuery
(
_query
);
}
return
(
return
(
<
div
className=
" page user-manage-page"
>
<
div
className=
" page user-manage-page"
>
...
...
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