周立森 5 anos atrás
pai
commit
9d22432023

+ 31
- 1
config/config.js Ver arquivo

@@ -284,6 +284,36 @@ export default {
284 284
                 },
285 285
               ],
286 286
             },
287
+
288
+            {
289
+              path: '/staff',
290
+              name: '员工管理',
291
+              component: '../layouts/BlankLayout',
292
+              routes: [
293
+                {
294
+                  path: '/staff/StaffList',
295
+                  name: '员工列表',
296
+                  component: './staff/list/StaffList',
297
+                },
298
+                {
299
+                  path: '/staff/editStaff',
300
+                  name: '',
301
+                  component: './staff/list/editStaff',
302
+                },
303
+             
304
+                {
305
+                  path: '/staff/RoleList',
306
+                  name: '角色管理',
307
+                  component: './staff/list/RoleList',
308
+                },
309
+                {
310
+                  path: '/staff/editRole',
311
+                  name: '',
312
+                  component: './staff/list/editRole',
313
+                },
314
+             
315
+              ],
316
+            },
287 317
             {
288 318
               component: './404',
289 319
             },
@@ -347,7 +377,7 @@ export default {
347 377
 
348 378
   proxy: {
349 379
     '/api/': {
350
-      target: 'http://192.168.0.84:8080/',
380
+      target: 'http://192.168.0.11:8080/',
351 381
       changeOrigin: true,
352 382
       // pathRewrite: { '^/server': '' },
353 383
     },

+ 17
- 17
src/pages/channel/addChannel.jsx Ver arquivo

@@ -17,21 +17,21 @@ const header = props => {
17 17
   //   addChannel({ pageNum: 1, pageSize: 10 })
18 18
   // }, [])
19 19
 
20
-  function addChannel(params) {
21
-      request({
22
-        url: '/api/admin/channel',
23
-        method: 'POST',
24
-        data: { ...params },
25
-    // eslint-disable-next-line no-shadow
20
+  function addChannel (params) {
21
+    request({
22
+      url: '/api/admin/channel',
23
+      method: 'POST',
24
+      data: { ...params },
25
+      // eslint-disable-next-line no-shadow
26 26
     }).then(data => {
27
-        console.log(data)
28
-        setData(data)
29
-         // eslint-disable-next-line no-unused-expressions
30
-         router.go(-1)
27
+      console.log(data)
28
+      setData(data)
29
+      // eslint-disable-next-line no-unused-expressions
30
+      router.go(-1)
31 31
     })
32 32
   }
33 33
 
34
-  function handleSubmit(e) {
34
+  function handleSubmit (e) {
35 35
     e.preventDefault();
36 36
     props.form.validateFields((err, values) => {
37 37
       if (!err) {
@@ -48,12 +48,12 @@ const header = props => {
48 48
   const { getFieldDecorator } = props.form;
49 49
 
50 50
   return (
51
-  <>
52
-        <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
51
+    <>
52
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
53 53
         <Form.Item label="渠道名称">
54 54
           {getFieldDecorator('channelName', {
55 55
             rules: [{ required: true, message: '请输入渠道名称' }],
56
-          })(<Input className={channels.inpuit} / >)}
56
+          })(<Input className={channels.inpuit} />)}
57 57
         </Form.Item>
58 58
         <Form.Item label="联系人">
59 59
           {getFieldDecorator('channelContact', {
@@ -73,13 +73,13 @@ const header = props => {
73 73
           <Button type="primary" htmlType="submit">
74 74
             保存
75 75
           </Button>
76
-          <Button className={channels.formButton} onClick = {() => router.go(-1)} type="primary" htmlType="submit">
76
+          <Button className={channels.formButton} onClick={() => router.go(-1)} type="primary" htmlType="submit">
77 77
             取消
78 78
           </Button>
79 79
         </Form.Item>
80 80
       </Form>
81
-  </>
82
-)
81
+    </>
82
+  )
83 83
 }
84 84
 
85 85
 const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);

+ 83
- 0
src/pages/staff/components/Tagss.jsx Ver arquivo

@@ -0,0 +1,83 @@
1
+import React from 'react';
2
+import { Tag, Input, Tooltip, Icon } from 'antd';
3
+import Styles from './style.less';
4
+
5
+ class Tagss extends React.Component {
6
+  state = {
7
+    tags: [ 'Tag 2', 'Tag 3'],
8
+    inputVisible: false,
9
+    inputValue: '',
10
+  };
11
+
12
+  handleClose = removedTag => {
13
+    const tags = this.state.tags.filter(tag => tag !== removedTag);
14
+    console.log(tags);
15
+    this.setState({ tags });
16
+  };
17
+
18
+  showInput = () => {
19
+    this.setState({ inputVisible: true }, () => this.input.focus());
20
+  };
21
+
22
+  handleInputChange = e => {
23
+    this.setState({ inputValue: e.target.value });
24
+  };
25
+
26
+  handleInputConfirm = () => {
27
+    const { inputValue } = this.state;
28
+    let { tags } = this.state;
29
+    if (inputValue && tags.indexOf(inputValue) === -1) {
30
+      tags = [...tags, inputValue];
31
+    }
32
+    console.log(tags);
33
+    this.setState({
34
+      tags,
35
+      inputVisible: false,
36
+      inputValue: '',
37
+    });
38
+  };
39
+
40
+  saveInputRef = input => (this.input = input);
41
+
42
+  render() {
43
+    const { tags, inputVisible, inputValue } = this.state;
44
+    return (
45
+      <div>
46
+        {tags.map((tag, index) => {
47
+          const isLongTag = tag.length > 20;
48
+          const tagElem = (
49
+            <Tag className = {Styles.tagss} key={tag} closable = {true} onClose={() => this.handleClose(tag)}>
50
+              {isLongTag ? `${tag.slice(0, 20)}...` : tag}
51
+            </Tag>
52
+          );
53
+          return isLongTag ? (
54
+            <Tooltip title={tag} key={tag}>
55
+              {tagElem}
56
+            </Tooltip>
57
+          ) : (
58
+            tagElem
59
+          );
60
+        })}
61
+        {inputVisible && (
62
+          <Input className = {Styles.tagss}
63
+            ref={this.saveInputRef}
64
+            // type="text"
65
+            // size="small"
66
+            // style={{ width: 78 }}
67
+            value={inputValue}
68
+            onChange={this.handleInputChange}
69
+            onBlur={this.handleInputConfirm}
70
+            onPressEnter={this.handleInputConfirm}
71
+          />
72
+        )}
73
+        {!inputVisible && (
74
+          <Tag className = {Styles.tagss} onClick={this.showInput} >
75
+            <Icon type="plus" /> 新建
76
+          </Tag>
77
+        )}
78
+      </div>
79
+    );
80
+  }
81
+}
82
+
83
+export default Tagss;

+ 24
- 0
src/pages/staff/components/style.less Ver arquivo

@@ -0,0 +1,24 @@
1
+.tagss{
2
+  width: 150px;
3
+  height: 32px;
4
+  
5
+font-size:14px;
6
+
7
+font-weight:400;
8
+color:rgba(153,153,153,1);
9
+
10
+
11
+padding: 4px 11px;
12
+
13
+color: rgba(0, 0, 0, 0.65);
14
+
15
+
16
+
17
+line-height: 1.5;
18
+
19
+background-color: #fff;
20
+
21
+
22
+
23
+border: 1px solid #d9d9d9;
24
+}

+ 101
- 0
src/pages/staff/list/RoleList.jsx Ver arquivo

@@ -0,0 +1,101 @@
1
+
2
+import React, { useState, useEffect } from 'react';
3
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Row, Col, Tag, Pagination, Modal, DatePicker } from 'antd';
4
+import { FormattedMessage } from 'umi-plugin-react/locale';
5
+import styles from '../../style/GoodsList.less';
6
+import router from 'umi/router';
7
+import { Card, Avatar } from 'antd';
8
+import request from '../../../utils/request'
9
+import Styles from './style.less';
10
+
11
+
12
+function confirm() {
13
+  Modal.confirm({
14
+    title: '确认停用该角色?',
15
+    okText: '确认',
16
+    cancelText: '取消',
17
+    onOk() {
18
+      console.log('OK');
19
+    },
20
+    onCancel() {
21
+      console.log('Cancel');
22
+    },
23
+  });
24
+
25
+}
26
+function toEditRole() {
27
+  router.push({
28
+    pathname: '/staff/editRole',
29
+    query: {
30
+      a: 'b',
31
+    },
32
+  });
33
+}
34
+
35
+
36
+const dataSource = [
37
+  {
38
+    name: '置业顾问',
39
+    status: '1',//显示停用
40
+  },
41
+  {
42
+    name: '置业经理',
43
+    status: '1',//停用
44
+  },
45
+];
46
+
47
+const columns = [
48
+  // {
49
+  //   title: '商品图片',
50
+  //   dataIndex: 'img',
51
+  //   key: 'img',
52
+  //   align: 'center',
53
+
54
+  //   render: (text, record) => <img src={record.img} className={channels.touxiang} />,
55
+  // },
56
+  {
57
+    title: '角色名称',
58
+    dataIndex: 'name',
59
+    key: 'name',
60
+    align: 'center',
61
+    render: text => <a>{text}</a>,
62
+  },
63
+
64
+  {
65
+    title: '操作  ',
66
+    dataIndex: 'status',
67
+    key: 'status',
68
+    align: 'center',
69
+
70
+    render: () => <>
71
+      <span style={{ color: '#1990FF', marginRight: '20px' }} onClick={confirm}>停用
72
+      <Icon type="stop" className={styles.shoppingCart} style={{fontSize:14}}/>
73
+      </span>
74
+      <span style={{ color: '#FF925C' }} onClick={toEditRole}>编辑
75
+      <Icon type="form" className={styles.edit} />
76
+      </span>
77
+    </>,
78
+
79
+  },
80
+];
81
+
82
+
83
+const header = (props) => {
84
+
85
+
86
+
87
+
88
+  return (
89
+    <>
90
+      <Button type="danger" className={styles.addBtn} onClick={toEditRole}>新增</Button>
91
+      <div className={Styles.roletext}>
92
+
93
+        <Table dataSource={dataSource} columns={columns} />
94
+      </div>
95
+    </>
96
+
97
+  )
98
+}
99
+const WrappedHeader = Form.create({ name: 'header' })(header);
100
+
101
+export default WrappedHeader

+ 279
- 0
src/pages/staff/list/StaffList.jsx Ver arquivo

@@ -0,0 +1,279 @@
1
+
2
+import React, { useState, useEffect } from 'react';
3
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Row, Col, Tag, Pagination, Modal, DatePicker } from 'antd';
4
+import { FormattedMessage } from 'umi-plugin-react/locale';
5
+import styles from '../../style/GoodsList.less';
6
+import router from 'umi/router';
7
+import { Card, Avatar } from 'antd';
8
+import request from '../../../utils/request'
9
+import Styles from './style.less';
10
+
11
+const { Meta } = Card;
12
+const { Option } = Select;
13
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
+//标签颜色
15
+const colors = {
16
+  金牌顾问: '#E34B59',
17
+  销售冠军: '#E8747E',
18
+  优选顾问: '#EEC37E',
19
+  人气顾问: '#FDDA9F',
20
+}
21
+// 提交事件
22
+function handleSubmit (e, props) {
23
+  e.preventDefault();
24
+  props.form.validateFields((err, values) => {
25
+    if (!err) {
26
+      console.log('提交数据: ', values)
27
+    }
28
+  });
29
+}
30
+// Change 事件
31
+function handleSelectChange (props) {
32
+  console.log(props)
33
+}
34
+
35
+// 分页
36
+function onChange (pageNumber) {
37
+  console.log('Page: ', pageNumber);
38
+}
39
+// 跳转到编辑商品
40
+function toEditStaff () {
41
+  router.push({
42
+    pathname: '/staff/editStaff',
43
+    // query: {
44
+    //   a: 'b',
45
+    // },
46
+  });
47
+}
48
+function confirm () {
49
+  Modal.confirm({
50
+    title: '确认停用该角色?',
51
+    okText: '确认',
52
+    cancelText: '取消',
53
+    onOk () {
54
+      console.log('OK');
55
+    },
56
+    onCancel () {
57
+      console.log('Cancel');
58
+    },
59
+  });
60
+
61
+}
62
+/**
63
+ *
64
+ *
65
+ * 
66
+ */
67
+
68
+// 假数据
69
+const tempData = [
70
+  {
71
+    name: '吴媛',
72
+    status: '1',// 启用
73
+    tel: '133 333 222',
74
+    avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
75
+    labels: ['金牌顾问', '销售冠军'],
76
+  },
77
+  {
78
+    name: '吴媛',
79
+    status: '1',// 启用
80
+    tel: '133 333 333',
81
+    avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
82
+    labels: ['金牌顾问', '销售冠军'],
83
+  },
84
+  {
85
+    name: '吴媛',
86
+    status: '1',// 启用
87
+    tel: '133 333 444',
88
+    avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
89
+    labels: ['金牌顾问', '销售冠军'],
90
+  },
91
+  {
92
+    name: '吴媛',
93
+    status: '1',// 启用
94
+    tel: '133 333 555',
95
+    avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
96
+    labels: ['金牌顾问', '销售冠军'],
97
+  },
98
+  {
99
+    name: '吴媛',
100
+    status: '0',
101
+    tel: '133 333 555',
102
+    avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
103
+    labels: ['金牌顾问', '销售冠军'],
104
+  },
105
+  {
106
+    name: '吴媛',
107
+    status: '1',// 启用
108
+    tel: '133 333 555',
109
+    avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
110
+    labels: ['金牌顾问'],
111
+  },
112
+
113
+
114
+
115
+]
116
+
117
+
118
+/**
119
+ *卡片
120
+ *
121
+ * @returns
122
+ */
123
+function CartBody (props) {
124
+  const { data } = props
125
+
126
+  return (
127
+
128
+    <Card className={Styles.card}>
129
+      <div>
130
+
131
+        <Avatar src={data.avatar} style={{ width: 94, height: 94 }} />
132
+        <span className={Styles.ediText} style={{ marginLeft: '20px' }} onClick={toEditStaff}>
133
+          编辑
134
+                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
135
+        </span>
136
+        <span className={Styles.ediText} style={{ marginLeft: '50px' }} onClick={confirm}>
137
+          停用
138
+                <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
139
+        </span>
140
+
141
+      </div>
142
+      <div>
143
+
144
+        <span>
145
+          {
146
+            data.labels.map((item, index) => {
147
+              const color = colors[item];
148
+              console.log(color, '------');
149
+              return <Tag className={Styles.cardTag}  color = {color}>{item}</Tag>
150
+            })
151
+          }
152
+        </span>
153
+        {/* {
154
+           data.label.map((item, index) => (
155
+              
156
+                <Tag className={Styles.cardTag}>{item}</Tag>
157
+          
158
+            ))
159
+            } */}
160
+
161
+        <p className={Styles.cardText} style={{ width: '300px' }}>
162
+          <span>姓名:{data.name}</span>
163
+
164
+          <span style={{ float: "right" }}>状态:{data.status === '1' ? '启用' : '停用'}</span>
165
+
166
+        </p>
167
+        <p className={Styles.cardText} style={{ width: '300px' }}>
168
+          <span>电话:{data.tel}</span>
169
+        </p>
170
+      </div>
171
+
172
+    </Card>
173
+  )
174
+}
175
+
176
+
177
+const header = (props) => {
178
+  const [data, setData] = useState({})
179
+  //   const [page, changePage] = useState({})
180
+
181
+  // useEffect(() => {
182
+  //   request({
183
+  //       url: '/api/admin/iBuildingDynamicList',
184
+  //       method: 'GET',
185
+  //       params: {pageNum: 1,pageSize: 10},
186
+  //   }).then((data) => {
187
+  //       console.log(data)
188
+  //       setData(data)
189
+  //   })
190
+  // })
191
+
192
+  // const getList = (e) => {
193
+  //   request({
194
+  //       url: '/api/xxx',
195
+  //       method: 'GET',
196
+  //       params: {},
197
+  //   }).then((data) => {
198
+  //       setData(data)
199
+  //   })
200
+  // }
201
+
202
+  const { getFieldDecorator } = props.form
203
+  return (
204
+
205
+    <>
206
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
207
+        <Form.Item>
208
+          {getFieldDecorator('name')(
209
+            <Input
210
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
211
+              placeholder="姓名"
212
+            />,
213
+          )}
214
+        </Form.Item>
215
+        <Form.Item>
216
+          {getFieldDecorator('tel')(
217
+            <Input
218
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
219
+              placeholder="电话"
220
+            />,
221
+          )}
222
+        </Form.Item>
223
+
224
+        <Form.Item>
225
+
226
+          {getFieldDecorator('goodState')(
227
+            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
228
+              <Option value="1">启用</Option>
229
+              <Option value="0">停用</Option>
230
+            </Select>,
231
+          )}
232
+        </Form.Item>
233
+        <Form.Item>
234
+          {getFieldDecorator('isMain')(
235
+            <Select style={{ width: '180px' }} placeholder="请选择" onChange={handleSelectChange}>
236
+              <Option value="1">职业顾问</Option>
237
+              <Option value="0">其他</Option>
238
+            </Select>,
239
+          )}
240
+        </Form.Item>
241
+        <Form.Item>
242
+          {getFieldDecorator('name')(
243
+            <Input
244
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
245
+              placeholder="标签"
246
+            />,
247
+          )}
248
+        </Form.Item>
249
+
250
+
251
+        <Form.Item>
252
+          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
253
+            搜索
254
+          </Button>
255
+        </Form.Item>
256
+      </Form>
257
+      <Button type="danger" className={styles.addBtn} onClick={toEditStaff}>新增</Button>
258
+
259
+      <Row style={{ padding: ' 0 10px' }}>
260
+        {
261
+          tempData.map((item, index) => (
262
+            <Col span={6}>
263
+              <CartBody data={item} />
264
+            </Col>
265
+          ))
266
+        }
267
+      </Row>
268
+
269
+      {/* <Table dataSource={data.records} columns={columns} /> */}
270
+      {/* 分页  */}
271
+      <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
272
+        <Pagination showQuickJumper defaultCurrent={1} total={500} onChange={onChange} />
273
+      </div>
274
+    </>
275
+  )
276
+}
277
+const WrappedHeader = Form.create({ name: 'header' })(header);
278
+
279
+export default WrappedHeader

+ 64
- 0
src/pages/staff/list/channelList.less Ver arquivo

@@ -0,0 +1,64 @@
1
+.searchBox {
2
+  font-size: 20px;
3
+  color: red;
4
+  display: flex;
5
+  display: flex;
6
+  align-items: center;
7
+  justify-content: space-between;
8
+  .searchItem {
9
+    min-width: 20px;
10
+    margin-right: 20px;
11
+    text-align: left;
12
+    .anticon-down {
13
+      float: right !important;
14
+    }
15
+  }
16
+}
17
+.addBtn {
18
+  padding: 0 30px;
19
+  height: 36px;
20
+  background-color: #50be00;
21
+  color: #fff;
22
+  margin: 30px 0;
23
+}
24
+.touxiang {
25
+  width: 93px;
26
+  height: 93px;
27
+}
28
+.ant-table-column-title {
29
+  font-weight: 600;
30
+}
31
+
32
+.about {
33
+  padding: 0 30px;
34
+  height: 36px;
35
+  background-color: #00bfff;
36
+  color: #fff;
37
+  margin: 30px 0;
38
+}
39
+
40
+.selectName {
41
+  font-size: 17px;
42
+  padding: 0 10px;
43
+  height: 36px;
44
+  color: rgb(10, 10, 10);
45
+  margin: 30px 0;
46
+}
47
+
48
+.inpuit {
49
+  width:50%;
50
+}
51
+
52
+.inpuitTxt {
53
+  width:70%;
54
+}
55
+
56
+
57
+.formButton{
58
+  margin-left: 12% 
59
+}
60
+
61
+.divInput{
62
+  float: 'left'; 
63
+  width: 500
64
+}

+ 27
- 0
src/pages/staff/list/editRole.jsx Ver arquivo

@@ -0,0 +1,27 @@
1
+import React from 'react';
2
+import { Form, Input, Button, Icon, Select } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../../style/GoodsList.less';
5
+
6
+
7
+
8
+/**
9
+ *
10
+ *
11
+ * @param {*} props
12
+ * @returns
13
+ */
14
+
15
+
16
+function header(props) {
17
+  const { getFieldDecorator } = props.form
18
+  return (
19
+
20
+    <>
21
+     <div>编辑角色</div>
22
+    </>
23
+  )
24
+}
25
+const WrappedHeader = Form.create({ name: 'header' })(header);
26
+
27
+export default WrappedHeader

+ 135
- 0
src/pages/staff/list/editStaff.jsx Ver arquivo

@@ -0,0 +1,135 @@
1
+import React, { useState } from 'react';
2
+
3
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Tooltip, Tabs, Radio, Divider, Tag, Select, Form, Alert } from 'antd';
4
+import { FormattedMessage } from 'umi-plugin-react/locale';
5
+import styles from '../../style/GoodsList.less';
6
+import XForm, { FieldTypes } from '../../../components/XForm';
7
+import Wangedit from '../../../components/Wangedit/Wangedit'
8
+import channels from './channelList.less';
9
+
10
+import Tagss from '../components/Tagss.jsx';
11
+
12
+const { TextArea } = Input;
13
+
14
+
15
+/**
16
+ *
17
+ *
18
+ * @param {*} props
19
+ * @returns
20
+ */
21
+const Edit = (props) => {
22
+
23
+  const fields = [
24
+    {
25
+      label: '公司',
26
+      name: 'staffCompany',
27
+      type: FieldTypes.Text,
28
+      placeholder: '请输入公司名称',
29
+      value: ''
30
+    },
31
+    {
32
+      label: '部门',
33
+      name: 'staffDepartment',
34
+      type: FieldTypes.Text,
35
+      placeholder: '请输入部门',
36
+      value: ''
37
+    },
38
+    {
39
+      label: '职位',
40
+      name: 'staffPosition',
41
+      type: FieldTypes.Text,
42
+      placeholder: '请输入职位',
43
+      value: ''
44
+    },
45
+    {
46
+      label: '电话',
47
+      name: 'staffTel',
48
+      type: FieldTypes.Text,
49
+      placeholder: '请输入电话号码',
50
+      value: ''
51
+      // rules: [
52
+      //   { message: '请输入电话号码'}
53
+      // ]
54
+    },
55
+    {
56
+      label: '标签',
57
+      name: 'staffTag',
58
+      render: 
59
+      <Tagss/>
60
+     
61
+   
62
+    },
63
+    {
64
+      label: '地址',
65
+      name: 'staffAddress',
66
+      type: FieldTypes.Text,
67
+      placeholder: '请输入地址',
68
+      value: ''
69
+
70
+    },
71
+    {
72
+      label: '授权项目',
73
+      name: 'staffProject',
74
+      type: FieldTypes.Select,
75
+      placeholder: '请选择',
76
+      value: ''
77
+    },
78
+
79
+    // {
80
+    //   label: '授权项目',
81
+    //   name: 'staffProject',
82
+    //   type: FieldTypes.Text,
83
+    //   placeholder: '请选择'
84
+    // },
85
+
86
+    {
87
+      label: '图片',
88
+      name: 'staffImage',
89
+      type: FieldTypes.ImageUploader,
90
+      extra: '建议图片大小 640 * 640',
91
+      value: ''
92
+    },
93
+
94
+
95
+    {
96
+      label: '简介',
97
+      name: 'staffIntroduction',
98
+      render: <TextArea className={channels.inpuitTxt} ></TextArea>,
99
+      value: ''
100
+
101
+    },
102
+    {
103
+      label: '状态',
104
+      name: 'staffstate',
105
+      render: <Radio.Group>
106
+        <Radio.Button style={{background:'#f0f0f0'}} value="a">禁用</Radio.Button>
107
+        <Radio.Button style={{background:'#f0f0f0',color:'#ff7e48'}} value="b">启用</Radio.Button>
108
+      </Radio.Group>,
109
+      value: 'b'
110
+    },
111
+
112
+  ]
113
+
114
+  const handleSubmit = val => {
115
+    window.console.log('submit data --->', val)
116
+  }
117
+  return <XForm onSubmit={handleSubmit} fields={fields} offset={8}></XForm>
118
+
119
+
120
+
121
+
122
+}
123
+
124
+
125
+
126
+export default Edit
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+

+ 90
- 0
src/pages/staff/list/style.less Ver arquivo

@@ -0,0 +1,90 @@
1
+.SubmitButton {
2
+  background: #3a91d5;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+
7
+.SelectFrom {
8
+  width: 180px;
9
+  background: #ffffff;
10
+  border-radius: 7px;
11
+  border: 1px solid #dbdbdb;
12
+}
13
+
14
+.addButton {
15
+  // background: #50be00;
16
+  border-radius: 4px;
17
+  border: 0px;
18
+  margin: 10px 0px;
19
+}
20
+
21
+.card {
22
+  width: 348px;
23
+  height: 244px;
24
+  background: rgba(255, 255, 255, 1);
25
+  box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
26
+  border-radius: 12px;
27
+  margin-bottom: 40px;
28
+
29
+}
30
+
31
+.cardText {
32
+
33
+  height: 28px;
34
+  font-size: 20px;
35
+  font-weight: 400;
36
+  color: rgba(102, 102, 102, 1);
37
+  line-height: 28px;
38
+  margin-top: 10px;
39
+  margin-bottom: 0;
40
+
41
+}
42
+
43
+.cardItem {
44
+  font-size: 18px;
45
+  font-weight: 400;
46
+  color: #666;
47
+  line-height: 24px;
48
+  display: flex;
49
+  align-items: center;
50
+}
51
+
52
+.ediText {
53
+  width: 36px;
54
+  height: 25px;
55
+  font-size: 18px;
56
+
57
+  font-weight: 400;
58
+  color: rgba(255, 146, 92, 1);
59
+  line-height: 25px;
60
+
61
+}
62
+
63
+.cardTag {
64
+  width: 48px;
65
+  height: 18px;
66
+  font-size: 10px;
67
+  // background: #fdce22;
68
+  border-radius: 4px;
69
+  color: #ffffff;
70
+  line-height: 14px;
71
+  margin-top: 10px;
72
+  padding: 1px 3px;
73
+}
74
+
75
+.title {
76
+  display: inline-block;
77
+  width: 84px;
78
+  justify-content: space-between;
79
+  text-align: justify;
80
+  text-align-last: justify
81
+}
82
+
83
+
84
+.roletext {
85
+  font-size: 20px;
86
+
87
+  font-weight: 400;
88
+  color: rgba(51, 51, 51, 1);
89
+  line-height: 28px;
90
+}