Browse Source

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

傅行帆 5 years ago
parent
commit
f93a99aa53

+ 1
- 1
config/config.js View File

455
 
455
 
456
   proxy: {
456
   proxy: {
457
     '/api/': {
457
     '/api/': {
458
-      target: 'http://127.0.0.1:8080/',
458
+      target: 'http://192.168.0.84:8080/',
459
       changeOrigin: true,
459
       changeOrigin: true,
460
       // pathRewrite: { '^/server': '' },
460
       // pathRewrite: { '^/server': '' },
461
     },
461
     },

+ 1
- 1
src/components/SelectButton/NewTypeSelect.jsx View File

29
   }
29
   }
30
 
30
 
31
   return (
31
   return (
32
-      <Select value={props.value} style={{ width: '180px' }} placeholder="请选择咨询类型" onChange={props.onChange}>
32
+      <Select value={props.value} style={{ width: '180px' }} placeholder="请选择类型" onChange={props.onChange}>
33
           {data.map(type => (
33
           {data.map(type => (
34
             <Option key={type.newsTypeId}>{type.newsTypeName}</Option>
34
             <Option key={type.newsTypeId}>{type.newsTypeName}</Option>
35
           ))}
35
           ))}

+ 1
- 0
src/pages/channel/InviteClients.jsx View File

37
     dataIndex: 'sex',
37
     dataIndex: 'sex',
38
     key: 'sex',
38
     key: 'sex',
39
     align: 'center',
39
     align: 'center',
40
+    render: (text, record) => <a style={ { color: '#66B3FF' } } >{ record.sex === 1 ? '男' : '女' }</a>,
40
   },
41
   },
41
 ];
42
 ];
42
 const header = props => {
43
 const header = props => {

+ 2
- 2
src/pages/channel/brokerList.jsx View File

155
 return (
155
 return (
156
   <>
156
   <>
157
     <div className={ channels.searchBox }>
157
     <div className={ channels.searchBox }>
158
-      <div>
158
+      <div style = {{ marginLeft: '-5px' }}>
159
         <span className={ channels.selectName }>姓名</span>
159
         <span className={ channels.selectName }>姓名</span>
160
         <Input onChange = { onInputChangePhone } style ={{ width: 150 }} />
160
         <Input onChange = { onInputChangePhone } style ={{ width: 150 }} />
161
         <span className={ channels.selectName }>电话</span>
161
         <span className={ channels.selectName }>电话</span>
163
       </div>
163
       </div>
164
       <div>
164
       <div>
165
       <Button type="primary" onClick={() => queryList() }>查询</Button>
165
       <Button type="primary" onClick={() => queryList() }>查询</Button>
166
-      <Button onClick={() => refurbishList() }>重置</Button>
166
+      {/* <Button onClick={() => refurbishList() }>重置</Button> */}
167
     </div>
167
     </div>
168
     </div>
168
     </div>
169
     <Table dataSource={data.list} columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
169
     <Table dataSource={data.list} columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />

+ 2
- 2
src/pages/channel/channelList.jsx View File

168
         </dvi>
168
         </dvi>
169
         <div >
169
         <div >
170
         <Button type="primary" onClick={() => queryList() }>查询</Button>
170
         <Button type="primary" onClick={() => queryList() }>查询</Button>
171
-        <Button onClick={() => reset() }>重置</Button>
171
+        {/* <Button onClick={() => reset() }>重置</Button> */}
172
         </div>
172
         </div>
173
       </div>
173
       </div>
174
-      <Button type="danger" onClick={toAdd}>新增</Button>
174
+      <Button type="danger" onClick={toAdd} className={channels.about} >新增</Button>
175
       <Table dataSource={data.result.records} columns={columns} pagination={{ pageSize: 10, total: data.result.total, onChange }} />
175
       <Table dataSource={data.result.records} columns={columns} pagination={{ pageSize: 10, total: data.result.total, onChange }} />
176
   </>
176
   </>
177
   )
177
   )

+ 7
- 3
src/pages/channel/channelList.less View File

32
 .about {
32
 .about {
33
   padding: 0 30px;
33
   padding: 0 30px;
34
   height: 36px;
34
   height: 36px;
35
-  background-color:rgba(255,255,255,1);
36
-  color: #fff;
37
   margin: 30px 0;
35
   margin: 30px 0;
36
+  margin-left:8px;
38
 }
37
 }
39
 
38
 
40
 .selectName {
39
 .selectName {
41
-  font-size: 17px;
40
+  font-size: 14px;
42
   padding: 0 10px;
41
   padding: 0 10px;
43
   height: 36px;
42
   height: 36px;
44
   color: rgb(10, 10, 10);
43
   color: rgb(10, 10, 10);
62
   float: 'left'; 
61
   float: 'left'; 
63
   width: 500
62
   width: 500
64
 }
63
 }
64
+.brokerTable{
65
+  padding: 0 30px;
66
+  height: 36px;
67
+  margin: 30px 0;
68
+}

+ 1
- 0
src/pages/channel/recommendClients.jsx View File

70
     dataIndex: 'sex',
70
     dataIndex: 'sex',
71
     key: 'sex',
71
     key: 'sex',
72
     align: 'center',
72
     align: 'center',
73
+    render: (text, record) => <a style={ { color: '#66B3FF' } } >{ record.sex === 1 ? '男' : '女' }</a>,
73
   },
74
   },
74
   {
75
   {
75
     title: '意向项目',
76
     title: '意向项目',

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

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, notification } from 'antd';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, notification, Modal } from 'antd';
3
 import moment from 'moment';
3
 import moment from 'moment';
4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';

+ 135
- 143
src/pages/news/list/NewsList.jsx View File

63
   }
63
   }
64
 
64
 
65
   // 跳转到编辑资讯列表
65
   // 跳转到编辑资讯列表
66
-  const toEditList = (id) => ()  => {
66
+  const toEditList = (id) => () => {
67
     router.push({
67
     router.push({
68
       pathname: '/news/list/editNewsList',
68
       pathname: '/news/list/editNewsList',
69
       query: {
69
       query: {
74
 
74
 
75
 
75
 
76
 
76
 
77
-/**
78
- *卡片
79
- *
80
- * @returns
81
- */
82
-function CartBody(props) {
83
-  const { data } = props
84
-  console.log(data);
85
-  const cancelPage = () =>{
86
-    router.push({
87
-      pathname: '/news/list/NewsList',
88
-    });
89
-  }
90
-
91
-  //删除资讯
92
-  const changeNewsListStatus = (newsId) => () => {
93
-    Modal.confirm({
94
-      title: '确认删除该资讯?',
95
-      okText: '确认',
96
-      cancelText: '取消',
97
-      onOk() {
98
-        request({
99
-          url: '/api/admin/taNews/' + newsId,
100
-          method: 'DELETE',
101
-          // data: { ...row },
102
-        }).then((data) => {
103
-          message.info('操作成功!')
104
-          getList({ pageNum: 1, pageSize: 10 });
105
-        })
106
-      }
107
-    });
108
-  }
109
-
110
-  // 跳转到编辑资讯列表
111
-  const toEditList = (newsId) => ()  => {
112
-    router.push({
113
-      pathname: '/news/list/editNewsList',
114
-      query: {
115
-        newsId
116
-      },
117
-    });
118
-  } 
77
+  /**
78
+   *卡片
79
+   *
80
+   * @returns
81
+   */
82
+  function CartBody(props) {
83
+    const { data } = props
84
+    console.log(data);
85
+    const cancelPage = () => {
86
+      router.push({
87
+        pathname: '/news/list/NewsList',
88
+      });
89
+    }
119
 
90
 
120
-  function cancelRelease (newsId, newsStatus, buildingId,newsTypeId) {
121
-    console.log("newsId" + newsId + "status" + newsStatus);
122
-    if (newsStatus === 1){
91
+    //删除资讯
92
+    const changeNewsListStatus = (newsId) => () => {
123
       Modal.confirm({
93
       Modal.confirm({
124
-        title: '确认取消该资讯?',
94
+        title: '确认删除该资讯?',
125
         okText: '确认',
95
         okText: '确认',
126
         cancelText: '取消',
96
         cancelText: '取消',
127
-        onOk () {
97
+        onOk() {
128
           request({
98
           request({
129
             url: '/api/admin/taNews/' + newsId,
99
             url: '/api/admin/taNews/' + newsId,
130
-            method: 'PUT',
131
-            data: { "newsStatus": newsStatus, "buildingId":buildingId, "newsTypeId":newsTypeId },
100
+            method: 'DELETE',
101
+            // data: { ...row },
132
           }).then((data) => {
102
           }).then((data) => {
133
             message.info('操作成功!')
103
             message.info('操作成功!')
134
             getList({ pageNum: 1, pageSize: 10 });
104
             getList({ pageNum: 1, pageSize: 10 });
135
           })
105
           })
136
-        },
137
-        onCancel () {
138
-          console.log('Cancel');
139
-        },
106
+        }
140
       });
107
       });
141
-    }else if (newsStatus === 0){
142
-      Modal.confirm({
143
-        title: '确认发布该资讯?',
144
-        okText: '确认',
145
-        cancelText: '取消',
146
-        onOk () {
147
-          request({
148
-            url: '/api/admin/taNews/' + newsId,
149
-            method: 'PUT',
150
-            data: { "newsStatus": newsStatus, "buildingId":buildingId, "newsTypeId":newsTypeId },
151
-          }).then((data) => {
152
-            message.info('操作成功!')
153
-            getList({ pageNum: 1, pageSize: 10 });
154
-          })
155
-        },
156
-        onCancel () {
157
-          console.log('Cancel');
108
+    }
109
+
110
+    // 跳转到编辑资讯列表
111
+    const toEditList = (newsId) => () => {
112
+      router.push({
113
+        pathname: '/news/list/editNewsList',
114
+        query: {
115
+          newsId
158
         },
116
         },
159
       });
117
       });
160
-    }  
161
-  }
118
+    }
162
 
119
 
163
-  return (
164
-          <Card
165
-            hoverable
166
-            style={{ minWidth: '400px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
167
-            cover={<img alt="example" src={ data.newsImg } style={{ borderRadius: '12px 12px 0 0', width: '100%', height: '14vw' }}></img>}
168
-            bodyStyle={{ padding: '10px 20px' }}
169
-          >
170
-            <p className={Styles.cardText}>
171
-              <span className={Styles.title}>资讯类型</span>
172
-              <span >:{ data.newsType.newsTypeName }</span>
173
-              <span className={Styles.ediText} onClick={toEditList(data.newsId)}>
174
-                编辑
120
+    function cancelRelease(newsId, newsStatus, buildingId, newsTypeId) {
121
+      console.log("newsId" + newsId + "status" + newsStatus);
122
+      if (newsStatus === 1) {
123
+        Modal.confirm({
124
+          title: '确认取消该资讯?',
125
+          okText: '确认',
126
+          cancelText: '取消',
127
+          onOk() {
128
+            request({
129
+              url: '/api/admin/taNews/' + newsId,
130
+              method: 'PUT',
131
+              data: { "newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId },
132
+            }).then((data) => {
133
+              message.info('操作成功!')
134
+              getList({ pageNum: 1, pageSize: 10 });
135
+            })
136
+          },
137
+          onCancel() {
138
+            console.log('Cancel');
139
+          },
140
+        });
141
+      } else if (newsStatus === 0) {
142
+        Modal.confirm({
143
+          title: '确认发布该资讯?',
144
+          okText: '确认',
145
+          cancelText: '取消',
146
+          onOk() {
147
+            request({
148
+              url: '/api/admin/taNews/' + newsId,
149
+              method: 'PUT',
150
+              data: { "newsStatus": newsStatus, "buildingId": buildingId, "newsTypeId": newsTypeId },
151
+            }).then((data) => {
152
+              message.info('操作成功!')
153
+              getList({ pageNum: 1, pageSize: 10 });
154
+            })
155
+          },
156
+          onCancel() {
157
+            console.log('Cancel');
158
+          },
159
+        });
160
+      }
161
+    }
162
+
163
+    return (
164
+      <Card
165
+        hoverable
166
+        style={{ height: '255px', minWidth: '640px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)', position: 'relative' }}
167
+        cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '260px', height: '253px' }}></img>}
168
+        bodyStyle={{ padding: '10px 20px' }}
169
+      >
170
+        <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: '18px', color: '#FF7E48' }} onClick={toEditList(data.newsId)}>
171
+          编辑
175
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
172
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
176
-              </span>
177
-            </p>
178
-            <p className={Styles.cardText}>
179
-              <span className={Styles.title}>状态</span>
180
-              <span >:{ data.newsStatus == 0 ? "已发布" : "未发布" }</span>
181
-            </p>
182
-            <p className={Styles.cardItem}>
183
-              <span className={Styles.title}>阅读数量</span>
184
-              <span > :{ data.pvNum }</span>
185
-            </p>
186
-            <p className={Styles.cardItem}>
187
-              <span className={Styles.title}>转发数量</span>
188
-              <span>:{ data.shareNum }</span>
189
-            </p>
190
-            <p className={Styles.cardItem}>
191
-              <span className={Styles.title}>点赞数量</span>     
192
-              <span >:{ data.favorNum }</span>         
193
-            </p>
194
-            <p className={Styles.cardItem}>
195
-              <span className={Styles.title}>收藏数量</span>
196
-              <span >:{ data.saveNum }</span>
197
-            </p>
198
-            <p className={Styles.cardItem}>
199
-              <span className={Styles.title}>录入时间</span>
200
-              <span >:{ data.createDate }</span>
201
-            </p>
202
-            <p style={{ margin: '15px 0', position: 'relative', fontSize: '18px' }}>
203
-              {data.newsStatus === 0 ? 
204
-              <span style={{ color: '#1990FF' }} onClick={cancelRelease.bind(this,data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
205
-              取消发布
173
+        </span>
174
+        {data.newsStatus === 0 ?
175
+          <span style={{ position: 'absolute', left: '280px', bottom: '18px', fontSize: '18px', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 1, data.buildingId, data.newsType.newsTypeId)}>
176
+            取消发布
206
               <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
177
               <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
207
-              </span>:
208
-              <span style={{ color: '#1990FF' }} onClick={cancelRelease.bind(this,data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
209
-              发布
178
+          </span> :
179
+          <span style={{ position: 'absolute', left: '280px', bottom: '18px', fontSize: '18px', color: '#FF7E48' }} onClick={cancelRelease.bind(this, data.newsId, 0, data.buildingId, data.newsType.newsTypeId)}>
180
+            发布
210
               <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
181
               <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
211
-              </span>
212
-              }
213
-              
214
-              <span style={{
215
-                color: '#FF4A4A', position: 'absolute', right: '0',
216
-              }} onClick={changeNewsListStatus(data.newsId)}>
217
-                删除
182
+          </span>
183
+        }
184
+
185
+        <span style={{ position: 'absolute', right: '20px', bottom: '18px', fontSize: '18px', color: '#FF7E48' }} onClick={changeNewsListStatus(data.newsId)}>
186
+          删除
218
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
187
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
219
-              </span>
220
-            </p>
221
-          </Card>
222
-  )
223
-}
188
+        </span>
189
+        <div style={{ position: 'absolute', left: '260px', top: '0px', padding: '20px' }}>
190
+          <p style={{
191
+            fontSize: '18px', color: '#333', fontWeight: '600', marginBottom: '10px', overflow: 'hidden',
192
+            textOverflow: 'ellipsis',
193
+            whiteSpace: 'nowrap',
194
+            width: '300px',
195
+          }}>{data.newsName}</p>
196
+          <p style={{ fontSize: '18px', color: '#555', marginBottom: '10px' }}>
197
+            <span style={{ display: 'inline-block', width: '190px' }}>咨询类型:{data.newsType.newsTypeName}</span>
198
+            <span>状态:{data.newsStatus == 0 ? "已发布" : "未发布"}</span>
199
+          </p>
200
+
201
+          <p style={{ fontSize: '18px', color: '#555', marginBottom: '10px' }}>
202
+            <span style={{ display: 'inline-block', width: '190px' }}>阅读数量:{data.pvNum}</span>
203
+            <span>转发数量:{data.shareNum}</span>
204
+          </p>
205
+
206
+          <p style={{ fontSize: '18px', color: '#555', marginBottom: '10px' }}>
207
+            <span style={{ display: 'inline-block', width: '190px' }}>点赞数量:{data.favorNum}</span>
208
+            <span>收藏数量:{data.saveNum}</span>
209
+          </p>
210
+
211
+          <p style={{ fontSize: '18px', color: '#999', marginBottom: '10px' }}>发布时间:{data.createDate}</p>
212
+        </div>
213
+      </Card>
214
+    )
215
+  }
224
 
216
 
225
 
217
 
226
   // Change 事件
218
   // Change 事件
232
   // 分页
224
   // 分页
233
   function onChange(pageNumber) {
225
   function onChange(pageNumber) {
234
     // eslint-disable-next-line react-hooks/rules-of-hooks
226
     // eslint-disable-next-line react-hooks/rules-of-hooks
235
-      getList({ pageNum: pageNumber, pageSize: 6 })
227
+    getList({ pageNum: pageNumber, pageSize: 6 })
236
   }
228
   }
237
 
229
 
238
   function getDate(value, dateString) {
230
   function getDate(value, dateString) {
246
 
238
 
247
         <Form.Item>
239
         <Form.Item>
248
           {getFieldDecorator('cityId')(
240
           {getFieldDecorator('cityId')(
249
-            <SelectCity />,  
241
+            <SelectCity />,
250
           )}
242
           )}
251
         </Form.Item>
243
         </Form.Item>
252
         <Form.Item>
244
         <Form.Item>
253
           {getFieldDecorator('buildingId')(
245
           {getFieldDecorator('buildingId')(
254
-              <BuildSelect />,
255
-            )}
246
+            <BuildSelect />,
247
+          )}
256
         </Form.Item>
248
         </Form.Item>
257
-        <Form.Item>
249
+        {/* <Form.Item>
258
           {getFieldDecorator('title')(
250
           {getFieldDecorator('title')(
259
             <Input
251
             <Input
260
               prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
252
               prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
261
               placeholder="请输入标题"
253
               placeholder="请输入标题"
262
             />,
254
             />,
263
           )}
255
           )}
264
-        </Form.Item>
256
+        </Form.Item> */}
265
         <Form.Item>
257
         <Form.Item>
266
           {getFieldDecorator('newsTypeId')(
258
           {getFieldDecorator('newsTypeId')(
267
             <NewsTypeSelect />,
259
             <NewsTypeSelect />,
268
           )}
260
           )}
269
-        </Form.Item>       
261
+        </Form.Item>
270
         <Form.Item>
262
         <Form.Item>
271
           {getFieldDecorator('newsStatus')(
263
           {getFieldDecorator('newsStatus')(
272
             <Select style={{ width: '180px' }} placeholder="状态">
264
             <Select style={{ width: '180px' }} placeholder="状态">
276
           )}
268
           )}
277
         </Form.Item>
269
         </Form.Item>
278
         <Form.Item>
270
         <Form.Item>
279
-          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
271
+          <Button type="primary" htmlType="submit" >
280
             搜索
272
             搜索
281
           </Button>
273
           </Button>
282
         </Form.Item>
274
         </Form.Item>
283
       </Form>
275
       </Form>
284
-      <Button type="primary" className={Styles.addButton} onClick={toEditList()}>
276
+      <Button type="danger" style={{ padding: '0 40px', margin: '20px 0' }} onClick={toEditList()}>
285
         新增
277
         新增
286
       </Button>
278
       </Button>
287
 
279
 
289
       <Row style={{ padding: ' 0 10px' }}>
281
       <Row style={{ padding: ' 0 10px' }}>
290
         {
282
         {
291
           dataSource.records.map((item, index) => (
283
           dataSource.records.map((item, index) => (
292
-              <Col span={8}>
293
-                <CartBody data={item} key={item.buildingId}/>
294
-              </Col>
295
-            ))
284
+            <Col span={12}>
285
+              <CartBody data={item} key={item.buildingId} />
286
+            </Col>
287
+          ))
296
         }
288
         }
297
       </Row>
289
       </Row>
298
       {/* 分页 */}
290
       {/* 分页 */}