|
@@ -29,16 +29,16 @@ const toEditStaff = (userId) => () => {
|
29
|
29
|
*/
|
30
|
30
|
const CartBody = (props) => {
|
31
|
31
|
const { data } = props
|
32
|
|
-
|
|
32
|
+
|
33
|
33
|
const confirm = () => {
|
34
|
34
|
Modal.confirm({
|
35
|
35
|
title: '确认停用该角色?',
|
36
|
36
|
okText: '确认',
|
37
|
37
|
cancelText: '取消',
|
38
|
|
- onOk () {
|
|
38
|
+ onOk() {
|
39
|
39
|
console.log('OK');
|
40
|
40
|
},
|
41
|
|
- onCancel () {
|
|
41
|
+ onCancel() {
|
42
|
42
|
console.log('Cancel');
|
43
|
43
|
},
|
44
|
44
|
});
|
|
@@ -49,14 +49,18 @@ const CartBody = (props) => {
|
49
|
49
|
<div>
|
50
|
50
|
|
51
|
51
|
<Avatar src={data.avatar} style={{ width: 94, height: 94 }} />
|
52
|
|
- <span className={Styles.ediText} style={{ marginLeft: '20px' }} onClick={toEditStaff(data.userId)}>
|
|
52
|
+ <Button type="link" style={{ marginLeft: '10px', color: '#FF925C', fontSize: '18px' }} onClick={toEditStaff(data.userId)}>
|
53
|
53
|
编辑
|
54
|
|
- <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
|
55
|
|
- </span>
|
56
|
|
- <span className={Styles.ediText} style={{ marginLeft: '50px' }} onClick={confirm}>
|
|
54
|
+ <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
|
|
55
|
+ </Button>
|
|
56
|
+ <Button type="link" style={{ fontSize: '18px', color: '#cacaca', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
|
57
|
57
|
停用
|
58
|
|
- <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
|
59
|
|
- </span>
|
|
58
|
+ <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
|
|
59
|
+ </Button>
|
|
60
|
+ <Button type="link" style={{ fontSize: '18px', color: '#FF925C', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
|
|
61
|
+ 启用
|
|
62
|
+ <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
|
|
63
|
+ </Button>
|
60
|
64
|
|
61
|
65
|
</div>
|
62
|
66
|
<div>
|
|
@@ -69,14 +73,11 @@ const CartBody = (props) => {
|
69
|
73
|
}
|
70
|
74
|
</span>
|
71
|
75
|
|
72
|
|
- <p className={Styles.cardText} style={{ width: '300px' }}>
|
73
|
|
- <span>姓名:{data.userName}</span>
|
74
|
|
-
|
75
|
|
- <span style={{ float: "right" }}>状态:{data.status === '1' ? '启用' : '停用'}</span>
|
76
|
|
-
|
|
76
|
+ <p className={Styles.cardText} >姓名 : {data.userName}
|
77
|
77
|
</p>
|
78
|
|
- <p className={Styles.cardText} style={{ width: '300px' }}>
|
79
|
|
- <span>电话:{data.phone}</span>
|
|
78
|
+ <p className={Styles.statusText} > 状态 : {data.status === '1' ? '启用' : '停用'} </p>
|
|
79
|
+ <p className={Styles.phoneText} >
|
|
80
|
+ 电话 : {data.phone}
|
80
|
81
|
</p>
|
81
|
82
|
</div>
|
82
|
83
|
|
|
@@ -86,10 +87,10 @@ const CartBody = (props) => {
|
86
|
87
|
|
87
|
88
|
|
88
|
89
|
const header = (props) => {
|
89
|
|
- const [tempData,setTempData] = useState([])
|
|
90
|
+ const [tempData, setTempData] = useState([])
|
90
|
91
|
useEffect(() => {
|
91
|
92
|
getList({ pageNum: 1, pageSize: 10 });
|
92
|
|
- },[])
|
|
93
|
+ }, [])
|
93
|
94
|
|
94
|
95
|
const getList = (params) => {
|
95
|
96
|
request({
|
|
@@ -97,8 +98,8 @@ const header = (props) => {
|
97
|
98
|
method: 'GET',
|
98
|
99
|
params: { ...params },
|
99
|
100
|
}).then((data) => {
|
100
|
|
- console.log(data,"listData")
|
101
|
|
- setTempData(data.records)
|
|
101
|
+ console.log(data, "listData")
|
|
102
|
+ setTempData(data.records)
|
102
|
103
|
})
|
103
|
104
|
}
|
104
|
105
|
|
|
@@ -108,15 +109,15 @@ const header = (props) => {
|
108
|
109
|
}
|
109
|
110
|
|
110
|
111
|
// 提交事件
|
111
|
|
-const handleSubmit = (e, props) => {
|
112
|
|
- e.preventDefault();
|
113
|
|
- props.form.validateFields((err, values) => {
|
114
|
|
- if (!err) {
|
115
|
|
- console.log('提交数据: ', values)
|
116
|
|
- getList({ pageNum: 1, pageSize: 10, ...values })
|
117
|
|
- }
|
118
|
|
- });
|
119
|
|
-}
|
|
112
|
+ const handleSubmit = (e, props) => {
|
|
113
|
+ e.preventDefault();
|
|
114
|
+ props.form.validateFields((err, values) => {
|
|
115
|
+ if (!err) {
|
|
116
|
+ console.log('提交数据: ', values)
|
|
117
|
+ getList({ pageNum: 1, pageSize: 10, ...values })
|
|
118
|
+ }
|
|
119
|
+ });
|
|
120
|
+ }
|
120
|
121
|
|
121
|
122
|
const { getFieldDecorator } = props.form
|
122
|
123
|
return (
|
|
@@ -156,8 +157,7 @@ const handleSubmit = (e, props) => {
|
156
|
157
|
</Button>
|
157
|
158
|
</Form.Item>
|
158
|
159
|
</Form>
|
159
|
|
- <Button type="danger" className={styles.addBtn} onClick={toEditStaff()}>新增</Button>
|
160
|
|
-
|
|
160
|
+ <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>
|
161
|
161
|
<Row style={{ padding: ' 0 10px' }}>
|
162
|
162
|
{
|
163
|
163
|
tempData.map((item, index) => (
|