Ver código fonte

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

魏熙美 5 anos atrás
pai
commit
55628bbeb5
3 arquivos alterados com 179 adições e 0 exclusões
  1. 12
    0
      config/config.js
  2. 121
    0
      src/pages/channel/channelList.jsx
  3. 46
    0
      src/pages/channel/channelList.less

+ 12
- 0
config/config.js Ver arquivo

@@ -148,6 +148,18 @@ export default {
148 148
                 },
149 149
               ],
150 150
             },
151
+            {
152
+              path: '/channel',
153
+              name: '渠道管理',
154
+              component: '../layouts/BlankLayout',
155
+              routes: [
156
+                {
157
+                  path: '/channel/channelList',
158
+                  name: '渠道管理',
159
+                  component: './channel/channelList',
160
+                },
161
+              ],
162
+            },
151 163
             {
152 164
               component: './404',
153 165
             },

+ 121
- 0
src/pages/channel/channelList.jsx Ver arquivo

@@ -0,0 +1,121 @@
1
+import React from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import channels from './channelList.less';
5
+
6
+const { Option } = Select;
7
+function handleChange(value) {
8
+  console.log(`selected ${value}`);
9
+}
10
+const menu = (
11
+  <Menu onClick={handleMenuClick}>
12
+    <Menu.Item key="1">
13
+      <Icon type="user" />
14
+      1st menu item
15
+    </Menu.Item>
16
+    <Menu.Item key="2">
17
+      <Icon type="user" />
18
+      2nd menu item
19
+    </Menu.Item>
20
+    <Menu.Item key="3">
21
+      <Icon type="user" />
22
+      3rd item
23
+    </Menu.Item>
24
+  </Menu>
25
+);
26
+const dataSource = [
27
+  {
28
+    key: '1',
29
+    img: 'http://img0.imgtn.bdimg.com/it/u=4246326797,2657995307&fm=26&gp=0.jpg',
30
+    name: '123',
31
+    age: 32,
32
+    address: '西湖区湖底公园1号',
33
+  },
34
+  {
35
+    key: '2',
36
+    img: '',
37
+    age: 42,
38
+    address: '西湖区湖底公园1号',
39
+  },
40
+];
41
+
42
+const columns = [
43
+  // {
44
+  //   title: '商品图片',
45
+  //   dataIndex: 'img',
46
+  //   key: 'img',
47
+  //   align: 'center',
48
+
49
+  //   render: (text, record) => <img src={record.img} className={channels.touxiang} />,
50
+  // },
51
+  {
52
+    title: '渠道代码',
53
+    dataIndex: 'name',
54
+    key: 'name',
55
+    align: 'center',
56
+    render: text => <a>{text}</a>,
57
+  },
58
+  {
59
+    title: '渠道名称',
60
+    dataIndex: 'integral',
61
+    key: 'integral',
62
+    align: 'center',
63
+  },
64
+  {
65
+    title: '联系人',
66
+    dataIndex: 'total',
67
+    key: 'total',
68
+    align: 'center',
69
+  },
70
+  {
71
+    title: '联系电话',
72
+    dataIndex: 'exchanged',
73
+    key: 'exchanged',
74
+    align: 'center',
75
+  },
76
+  {
77
+    title: '经纪人',
78
+    dataIndex: 'rest',
79
+    key: 'rest',
80
+    align: 'center',
81
+  },
82
+  {
83
+    title: '推荐客户有效',
84
+    dataIndex: 'state',
85
+    key: 'state',
86
+    align: 'center',
87
+  },
88
+  {
89
+    title: '邀请经济人',
90
+    dataIndex: 'handle',
91
+    key: 'handle',
92
+    align: 'center',
93
+    render: () => <a>Delete</a>,
94
+  },
95
+];
96
+
97
+export default () => (
98
+  <>
99
+    <div className={channels.searchBox}>
100
+      <dvi>
101
+        <span className={channels.selectName}>渠道名称</span>
102
+        <Select defaultValue="lucy" style={{ width: 180 }} onChange={handleChange}>
103
+          <Option value="jack">Jack</Option>
104
+          <Option value="lucy">Lucy</Option>
105
+          <Option value="disabled" disabled>
106
+            Disabled
107
+          </Option>
108
+          <Option value="Yiminghe">yiminghe</Option>
109
+        </Select>
110
+      </dvi>
111
+      <Button className={channels.about}>查询</Button>
112
+    </div>
113
+    <Button className={channels.addBtn}>新增</Button>
114
+    <Table dataSource={dataSource} columns={columns} />
115
+  </>
116
+);
117
+
118
+function handleMenuClick(e) {
119
+  message.info('Click on menu item.');
120
+  console.log('click', e);
121
+}

+ 46
- 0
src/pages/channel/channelList.less Ver arquivo

@@ -0,0 +1,46 @@
1
+.searchBox {
2
+  font-size: 30px;
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
+}