Browse Source

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager

魏熙美 5 years ago
parent
commit
3146fd6f77

+ 36
- 1
config/config.js View File

201
                   name: '商品核销',
201
                   name: '商品核销',
202
                   component: './integralMall/writeOff',
202
                   component: './integralMall/writeOff',
203
                 },
203
                 },
204
+                {
205
+                  path: '/integralMall/verifyList',
206
+                  name: '',
207
+                  component: './integralMall/verifyList',
208
+                },
204
               ],
209
               ],
205
             },
210
             },
206
             {
211
             {
284
                 },
289
                 },
285
               ],
290
               ],
286
             },
291
             },
292
+
293
+            {
294
+              path: '/staff',
295
+              name: '员工管理',
296
+              component: '../layouts/BlankLayout',
297
+              routes: [
298
+                {
299
+                  path: '/staff/StaffList',
300
+                  name: '员工列表',
301
+                  component: './staff/list/StaffList',
302
+                },
303
+                {
304
+                  path: '/staff/editStaff',
305
+                  name: '',
306
+                  component: './staff/list/editStaff',
307
+                },
308
+             
309
+                {
310
+                  path: '/staff/RoleList',
311
+                  name: '角色管理',
312
+                  component: './staff/list/RoleList',
313
+                },
314
+                {
315
+                  path: '/staff/editRole',
316
+                  name: '',
317
+                  component: './staff/list/editRole',
318
+                },
319
+             
320
+              ],
321
+            },
287
             {
322
             {
288
               component: './404',
323
               component: './404',
289
             },
324
             },
347
 
382
 
348
   proxy: {
383
   proxy: {
349
     '/api/': {
384
     '/api/': {
350
-      target: 'http://localhost:8080/',
385
+      target: 'http://192.168.0.11:8080/',
351
       changeOrigin: true,
386
       changeOrigin: true,
352
       // pathRewrite: { '^/server': '' },
387
       // pathRewrite: { '^/server': '' },
353
     },
388
     },

+ 1
- 0
package.json View File

46
     "antd": "^3.20.0",
46
     "antd": "^3.20.0",
47
     "classnames": "^2.2.6",
47
     "classnames": "^2.2.6",
48
     "dva": "^2.4.1",
48
     "dva": "^2.4.1",
49
+    "echarts": "^4.3.0",
49
     "lodash": "^4.17.11",
50
     "lodash": "^4.17.11",
50
     "md5": "^2.2.1",
51
     "md5": "^2.2.1",
51
     "moment": "^2.24.0",
52
     "moment": "^2.24.0",

+ 49
- 0
src/components/EchartsTest/EChart.jsx View File

1
+import React, { Component } from 'react';
2
+
3
+// 引入 ECharts 主模块
4
+import echarts from 'echarts/lib/echarts';
5
+// 引入柱状图
6
+import  'echarts/lib/chart/bar';
7
+// 引入提示框和标题组件
8
+import 'echarts/lib/component/tooltip';
9
+import 'echarts/lib/component/title';
10
+
11
+class EchartsTest extends Component {
12
+    chartRef = undefined
13
+    chart = undefined
14
+    defaultChartOption = {}
15
+
16
+    componentDidMount() {
17
+        this.chart = echarts.init(this.chartRef.current)
18
+
19
+        // 绘制图表
20
+        this.chart.setOption({
21
+            ...this.defaultChartOption,
22
+            ...this.props.options || {},
23
+        });
24
+    }
25
+
26
+    componentDidUpdate(preProps) {
27
+        if (preProps.options != this.props.options) {
28
+            this.chart.setOption({
29
+                ...this.defaultChartOption,
30
+                ...this.props.options || {},
31
+            });
32
+        }
33
+    }
34
+
35
+    handleDom = ref => this.chartRef = ref
36
+
37
+    render() {
38
+        const style = {
39
+            width: '600px',
40
+            ...this.props.style || {}
41
+        }
42
+
43
+        return (
44
+            <div ref={this.handleDom} style={style}></div>
45
+        );
46
+    }
47
+}
48
+
49
+export default EchartsTest;

+ 37
- 0
src/components/EchartsTest/Line.jsx View File

1
+import React, { useEffect } from 'react';
2
+import EChart from './EChart';
3
+
4
+
5
+const Line = (props) => {
6
+
7
+  const {person_realty_consultant, person_estate_agent, person_null} = xxx
8
+
9
+  const options = {
10
+    xAxis: {},
11
+    legend: {
12
+      left: '70%',
13
+      data: ['来源置业顾问', '来源全民经纪人', '自主进入'],
14
+    },
15
+    series: [
16
+      {
17
+        type: 'pie',
18
+        datasetIndex: 1,
19
+        center: ['75%', '50%'],
20
+        radius: [0, '50%'],
21
+      },
22
+    ],
23
+    dataset: {
24
+      id: 'pie',
25
+      source: [
26
+        { form: '来源置业顾问', value: person_realty_consultant },
27
+        { form: '来源全民经纪人', value: person_estate_agent },
28
+        { form: '自主进入', value: person_null },
29
+      ]
30
+    },
31
+  }
32
+
33
+  return (
34
+    <EChart options={options} />
35
+  )
36
+
37
+}

+ 17
- 0
src/components/EchartsTest/index.jsx View File

1
+import React, { Component } from 'react';
2
+
3
+// 引入 ECharts 主模块
4
+import echarts from 'echarts/lib/echarts';
5
+// 引入柱状图
6
+import  'echarts/lib/chart/bar';
7
+// 引入提示框和标题组件
8
+import 'echarts/lib/component/tooltip';
9
+import 'echarts/lib/component/title';
10
+class Chart extends Component {
11
+
12
+  render() { 
13
+    return ( <div></div> );
14
+  }
15
+}
16
+ 
17
+export default Chart;

+ 17
- 16
src/pages/Welcome.jsx View File

1
 import React from 'react';
1
 import React from 'react';
2
 import { Card, Typography, Alert, Row, Col } from 'antd';
2
 import { Card, Typography, Alert, Row, Col } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
-
5
-// const CodePreview = ({ children }) => (
6
-//   <pre
7
-//     style={{
8
-//       background: '#f2f4f5',
9
-//       padding: '12px 20px',
10
-//       margin: '12px 0',
11
-//     }}
12
-//   >
13
-//     <code>
14
-//       <Typography.Text copyable>{children}</Typography.Text>
15
-//     </code>
16
-//   </pre>
17
-// );
18
-
4
+import EchartsTest from '../components/EchartsTest'
5
+const option = {
6
+  xAxis: {
7
+    type: 'category',
8
+    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
9
+  },
10
+  yAxis: {
11
+    type: 'value'
12
+  },
13
+  series: [{
14
+    data: [820, 932, 901, 934, 1290, 1330, 1320],
15
+    type: 'line'
16
+  }]
17
+};
19
 export default () => (
18
 export default () => (
20
   <>
19
   <>
21
     <div style={{ display: 'flex' }}>
20
     <div style={{ display: 'flex' }}>
44
         <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>91</span>
43
         <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>91</span>
45
       </div>
44
       </div>
46
     </div>
45
     </div>
47
-    <div>11111111111111</div>
46
+    <EchartsTest style={{width: 500, height:500}}></EchartsTest>
47
+
48
   </>
48
   </>
49
 );
49
 );
50
+

+ 17
- 17
src/pages/channel/addChannel.jsx View File

17
   //   addChannel({ pageNum: 1, pageSize: 10 })
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
     }).then(data => {
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
     e.preventDefault();
35
     e.preventDefault();
36
     props.form.validateFields((err, values) => {
36
     props.form.validateFields((err, values) => {
37
       if (!err) {
37
       if (!err) {
48
   const { getFieldDecorator } = props.form;
48
   const { getFieldDecorator } = props.form;
49
 
49
 
50
   return (
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
         <Form.Item label="渠道名称">
53
         <Form.Item label="渠道名称">
54
           {getFieldDecorator('channelName', {
54
           {getFieldDecorator('channelName', {
55
             rules: [{ required: true, message: '请输入渠道名称' }],
55
             rules: [{ required: true, message: '请输入渠道名称' }],
56
-          })(<Input className={channels.inpuit} / >)}
56
+          })(<Input className={channels.inpuit} />)}
57
         </Form.Item>
57
         </Form.Item>
58
         <Form.Item label="联系人">
58
         <Form.Item label="联系人">
59
           {getFieldDecorator('channelContact', {
59
           {getFieldDecorator('channelContact', {
73
           <Button type="primary" htmlType="submit">
73
           <Button type="primary" htmlType="submit">
74
             保存
74
             保存
75
           </Button>
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
           </Button>
78
           </Button>
79
         </Form.Item>
79
         </Form.Item>
80
       </Form>
80
       </Form>
81
-  </>
82
-)
81
+    </>
82
+  )
83
 }
83
 }
84
 
84
 
85
 const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
85
 const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);

+ 0
- 1
src/pages/customer/report/index.jsx View File

159
           </Button>
159
           </Button>
160
         </Form.Item>
160
         </Form.Item>
161
       </Form>
161
       </Form>
162
-
163
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
162
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
164
     </>
163
     </>
165
   );
164
   );

+ 115
- 67
src/pages/integralMall/achieve.jsx View File

1
-import React from 'react';
2
-import { Form, Input, Button, Icon, Tabs, Row, Col, Table } from 'antd';
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Tabs, Row, Col, Table, Pagination, Alert, message } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
-
6
+import moment from 'moment';
7
+import BuildSelect from '../../components/SelectButton/BuildSelect'
8
+import request from '../../utils/request'
7
 
9
 
8
 const { TabPane } = Tabs;
10
 const { TabPane } = Tabs;
9
-function callback(key) {
10
-  console.log(key);
11
+
12
+
13
+
14
+
15
+function header(props) {
16
+  const [ carType, setCarType ] = useState({})
17
+  const callback = (key) => {
18
+    setCarType(key)
19
+    getList({ pageNum: 1, pageSize: 10 , type: key});
20
+  }
21
+  
22
+// 获取初始化数据
23
+const [ data, setData ] = useState({})
24
+
25
+useEffect(() => {
26
+  getList({ pageNum: 1, pageSize: 10 , type: 'platform'});
27
+},[])
28
+
29
+// 查询列表
30
+const getList = (params) => {
31
+  request({
32
+      url: '/api/admin/tdPointsRules',
33
+      method: 'GET',
34
+      params: { ...params },
35
+  }).then((data) => {
36
+      console.log(data)
37
+      setData(data)
38
+  })
11
 }
39
 }
12
 
40
 
13
-/**
14
- *
15
- *
16
- * @param {*} props
17
- * @returns
18
- */
19
-const dataSource = [
20
-  {
21
-    key: '1',
22
-    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
23
-    name: '华为P30 Pro',
24
-  },
25
-  {
26
-    key: '2',
27
-    img: '',
28
-    name: '大米',
29
-  },
30
-];
41
+const changePageNum = (pageNumber) => {
42
+  getList({ pageNum: pageNumber, pageSize: 10, type: carType })
43
+}
31
 
44
 
32
-const columns = [
33
-  {
34
-    title: '类型',
35
-    dataIndex: 'type',
36
-    key: 'type',
37
-    align: 'center',
38
-  },
39
-  {
40
-    title: '获取积分',
41
-    dataIndex: 'intergral',
42
-    key: 'intergral',
43
-    align: 'center',
44
-  },
45
-  {
46
-    title: '状态',
47
-    dataIndex: 'state',
48
-    key: 'state',
49
-    align: 'center',
50
-  },
51
-  {
52
-    title: '说明',
53
-    dataIndex: 'desc',
54
-    key: 'desc',
55
-    align: 'center',
56
-  },
57
-  {
58
-    title: '操作时间',
59
-    dataIndex: 'time',
60
-    key: 'time',
61
-    align: 'center',
62
-  },
63
-  {
64
-    title: '操作',
65
-    dataIndex: 'handle',
66
-    key: 'handle',
67
-    align: 'center',
68
-    render: () => <><span style={{ color: '#EF273A', marginRight: '20px' }} >停用<Icon type="stop" className={styles.shoppingCart} /></span><span style={{ color: '#EF273A', marginRight: '20px' }} >启用<Icon type="check-circle" className={styles.shoppingCart} /></span><span style={{ color: '#FF925C' }}>编辑<Icon type="form" className={styles.edit} /></span></>,
69
-  },
70
 
45
 
71
-];
46
+  // 提交事件
47
+  const handleSubmit = (e, props) => {
48
+    e.preventDefault();
49
+    props.form.validateFields((err, values) => {
50
+      if (!err) {
51
+        getList({ pageNum: 1, pageSize: 10, ...values, type: carType})
52
+      }
53
+    });
54
+  }
72
 
55
 
56
+  const changeStatus = (row) => () => {
57
+    request({
58
+      url: '/api/admin/tdPointsRules/change',
59
+      method: 'PUT',
60
+      data: { ...row },
61
+    }).then((data) => {
62
+      message.info('操作成功!')
63
+      getList({ pageNum: 1, pageSize: 10, type: carType})
64
+    })
65
+  }
66
+
67
+const columns = [
68
+    {
69
+      title: '类型',
70
+      dataIndex: 'ruleName',
71
+      key: 'ruleName',
72
+      align: 'center',
73
+    },
74
+    {
75
+      title: '获取积分',
76
+      dataIndex: 'pointsAmount',
77
+      key: 'pointsAmount',
78
+      align: 'center',
79
+    },
80
+    {
81
+      title: '状态',
82
+      dataIndex: 'status',
83
+      key: 'status',
84
+      align: 'center',
85
+      render: (status) => <span>{status == 1 ? '启用' : '停用'}</span>
86
+    },
87
+    {
88
+      title: '操作时间',
89
+      dataIndex: 'updateDate',
90
+      key: 'updateDate',
91
+      align: 'center',
92
+      render: (updateDate) => <><span>{updateDate != null ? moment(updateDate).format('YYYY-MM-DD') : ''}</span></>
93
+    },
94
+    {
95
+      title: '操作',
96
+      dataIndex: 'handle',
97
+      key: 'handle',
98
+      align: 'center',
99
+      render: (x,row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeStatus(row)}>{row.status == 1?'停用':'启用'}<Icon type="stop" className={styles.shoppingCart} /></span>
100
+                      <span style={{ color: '#FF925C' }}>{row.buildingId != null ? '编辑'`${<Icon type="form" className={styles.edit} />}` : ''}</span></>,
101
+    },
102
+  ];
73
 
103
 
74
-function header(props) {
75
   const { getFieldDecorator } = props.form
104
   const { getFieldDecorator } = props.form
76
   return (
105
   return (
77
     <>
106
     <>
78
       <Tabs onChange={callback} type="card">
107
       <Tabs onChange={callback} type="card">
79
-        <TabPane tab="平台积分" key="1">
80
-          <Table style={{ marginTop: '40px' }} dataSource={dataSource} columns={columns} />
108
+        <TabPane tab="平台积分" key="platform">
109
+          <Table style={{ marginTop: '40px' }} dataSource={data.records} columns={columns} pagination={false}/>
110
+          <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
111
+            <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
112
+          </div>
81
         </TabPane>
113
         </TabPane>
82
-        <TabPane tab="项目积分" key="2">
83
-          <Table style={{ marginTop: '40px' }} dataSource={dataSource} columns={columns} />
114
+        <TabPane tab="项目积分" key="project">
115
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
116
+            <Form.Item>
117
+              {getFieldDecorator('buildingId')(
118
+                <BuildSelect />,
119
+              )}
120
+            </Form.Item>
121
+             
122
+            <Form.Item>
123
+              <Button type="primary" htmlType="submit" className={styles.searchBtn}>
124
+                搜索
125
+              </Button>
126
+            </Form.Item>
127
+          </Form>
128
+          <Table style={{ marginTop: '40px' }} dataSource={data.records} columns={columns} pagination={false}/>
129
+          <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
130
+            <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
131
+          </div>
84
         </TabPane>
132
         </TabPane>
85
       </Tabs>,
133
       </Tabs>,
86
     </>
134
     </>

+ 128
- 0
src/pages/integralMall/verifyList.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../style/GoodsList.less';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+
8
+import request from '../../utils/request'
9
+
10
+const { Option } = Select;
11
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
12
+
13
+const header = (props) => {
14
+  const [ data, setData ] = useState({})
15
+
16
+  useEffect(() => {
17
+    getVerifyList({pageNum: 1,pageSize: 10, phone: props.location.query.telValue });
18
+  },[])
19
+
20
+  // 查询列表
21
+  const getVerifyList = (params) => {
22
+    request({
23
+      url: '/api/admin/taPointsExchange',
24
+      method: 'GET',
25
+      params: { ...params },
26
+    }).then((data) => {
27
+        setData(data)
28
+    })
29
+  }
30
+
31
+  const changePageNum = (pageNumber) => {
32
+    getVerifyList({ pageNum: 1, pageSize: 10, phone: props.location.query.telValue })
33
+  }
34
+
35
+  const toBack = () => {
36
+    router.push({
37
+      pathname: '/integralMall/writeOff',
38
+    });
39
+  }
40
+
41
+  const changeStatus = (row) => () => {
42
+    request({
43
+      url: '/api/admin/taPointsExchange/change',
44
+      method: 'PUT',
45
+      data: row
46
+    }).then((data) => {
47
+        message.info("操作成功")
48
+        getVerifyList({ pageNum: pageNumber, pageSize: 10, phone: props.location.query.telValue })
49
+    })
50
+  }
51
+  
52
+  const columns = [
53
+    {
54
+      title: '用户姓名',
55
+      dataIndex: 'personName',
56
+      key: 'personName',
57
+      align: 'center',
58
+    },
59
+    {
60
+      title: '用户类型',
61
+      dataIndex: 'personType',
62
+      key: 'personType',
63
+      align: 'center',
64
+      render: (personType)=> <><span>{personType === 'Realty Consultant' ? '置业顾问' : personType === 'Sales Executive' ? '销售主管' : personType === 'estate agent' ? '经纪人' : ''}</span></>
65
+    },
66
+    {
67
+      title: '手机号',
68
+      dataIndex: 'phone',
69
+      key: 'phone',
70
+      align: 'center',
71
+    },
72
+    {
73
+      title: '商品图片',
74
+      dataIndex: 'image',
75
+      key: 'image',
76
+      align: 'center',
77
+      render: (text, record) => <img src={record.image} className={styles.touxiang} />,
78
+    },
79
+    {
80
+      title: '商品名称',
81
+      dataIndex: 'targetName',
82
+      key: 'targetName',
83
+      align: 'center',
84
+    },
85
+    {
86
+      title: '兑换时间',
87
+      dataIndex: 'createDate',
88
+      key: 'createDate',
89
+      align: 'center',
90
+      render: (createDate) => <><span>{moment(createDate).format('YYYY-MM-DD HH:mm')}</span></>
91
+    },
92
+    {
93
+      title: '领取时间',
94
+      dataIndex: 'verifyDate',
95
+      key: 'verifyDate',
96
+      align: 'center',
97
+      render: (verifyDate) => <><span>{verifyDate != null ? moment(verifyDate).format('YYYY-MM-DD HH:mm') : ''}</span></>
98
+    },
99
+    {
100
+      title: '状态',
101
+      dataIndex: 'status',
102
+      key: 'status',
103
+      align: 'center',
104
+      render: (status)=> <><span>{status == 1 ? '已领取' : '未领取'}</span></>
105
+    },
106
+    {
107
+      title: '操作',
108
+      dataIndex: 'handle',
109
+      key: 'handle',
110
+      align: 'center',
111
+      render: (x,row) => <span style={{ color: '#1990FF' }} onClick={changeStatus(row)}>{ row.status == 1?'':'核销' }</span>
112
+           
113
+    },
114
+  ];
115
+
116
+  return (
117
+    <>
118
+      <Button type="primary" className={styles.addBtn} onClick={toBack}>返回</Button>
119
+      <Table dataSource={data.records} columns={columns} pagination={false} />
120
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
121
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} />
122
+      </div>
123
+    </>
124
+  )
125
+}
126
+const WrappedHeader = Form.create({ name: 'header' })(header);
127
+
128
+export default WrappedHeader

+ 22
- 4
src/pages/integralMall/writeOff.jsx View File

1
-import React from 'react';
2
-import { Form, Input, Button, Icon, Tabs, Row, Col } from 'antd';
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Tabs, Row, Col, message } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
20
  */
20
  */
21
 
21
 
22
 function header(props) {
22
 function header(props) {
23
+  const [telValue, setTelValue] = useState('')
24
+  const changeTel = (e) => {
25
+    setTelValue(e.target.value)
26
+  }
27
+
28
+  const verifyTel = () =>{
29
+    if(telValue === ""){
30
+      message.error("请输入手机号");
31
+      return;
32
+    }
33
+    router.push({
34
+      pathname: '/integralMall/verifyList',
35
+      query: {
36
+        telValue
37
+      },
38
+    });
39
+  }
40
+
23
   const { getFieldDecorator } = props.form
41
   const { getFieldDecorator } = props.form
24
   return (
42
   return (
25
     <>
43
     <>
60
             </Col>
78
             </Col>
61
           </Row>
79
           </Row>
62
           <div style={{ margin: '110px auto', display: 'block',textAlign:'center' }}>
80
           <div style={{ margin: '110px auto', display: 'block',textAlign:'center' }}>
63
-            <Input placeholder="请输入手机号" style={{width:'200px'}} />
64
-            <Button type="primary" style={{marginLeft:'10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }}>立即核销</Button>
81
+            <Input placeholder="请输入手机号" style={{width:'200px'}} onChange={changeTel}/>
82
+            <Button type="primary" style={{marginLeft:'10px', padding: '6px 46px', backgroundColor: '#EA2323', border: 'none' }} onClick={verifyTel}>立即核销</Button>
65
           </div>
83
           </div>
66
         </TabPane>
84
         </TabPane>
67
       </Tabs>,
85
       </Tabs>,

+ 4
- 4
src/pages/news/type/NewsType.jsx View File

56
   }
56
   }
57
 
57
 
58
   
58
   
59
-  const changeNewsStatus = (row) => () => {
59
+  const changeNewsStatus = (row, newsId) => () => {
60
     Modal.confirm({
60
     Modal.confirm({
61
       title: '确认删除该商品?',
61
       title: '确认删除该商品?',
62
       okText: '确认',
62
       okText: '确认',
63
       cancelText: '取消',
63
       cancelText: '取消',
64
       onOk() {
64
       onOk() {
65
         request({
65
         request({
66
-          url: '/api/admin/taNewsType',
67
-          method: 'PUT',
66
+          url: '/api/admin/taNewsType/' + newsId,
67
+          method: 'DELETE',
68
           data: { ...row },
68
           data: { ...row },
69
         }).then((data) => {
69
         }).then((data) => {
70
           message.info('操作成功!')
70
           message.info('操作成功!')
99
       dataIndex: 'handle',
99
       dataIndex: 'handle',
100
       key: 'handle',
100
       key: 'handle',
101
       align: 'center',
101
       align: 'center',
102
-      render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeNewsStatus(row)}>{row.status == 1 ? '下架' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
102
+      render: (x, row) => <><span style={{ color: '#EF273A', marginRight: '20px' }} onClick={changeNewsStatus(row, row.newsTypeId)}>{row.status == 1 ? '删除' : '上架'}<Icon type="shopping-cart" className={styles.shoppingCart} />
103
                             </span><span style={{ color: '#FF925C' }} onClick={toEditNews(row.newsTypeId)}>编辑<Icon type="form" className={styles.edit} /></span></>,
103
                             </span><span style={{ color: '#FF925C' }} onClick={toEditNews(row.newsTypeId)}>编辑<Icon type="form" className={styles.edit} /></span></>,
104
     },
104
     },
105
   ];
105
   ];

+ 83
- 0
src/pages/staff/components/Tagss.jsx View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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 View File

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
+}