Преглед на файлове

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

zhoulisen преди 5 години
родител
ревизия
2b616acbe6

+ 2
- 1
src/pages/carouselFigure/advertisingList.jsx Целия файл

@@ -5,6 +5,7 @@ import moment from 'moment';
5 5
 import AuthButton from '@/components/AuthButton';
6 6
 import withActions from '@/components/ActionList';
7 7
 import EditIcon from '@/components/EditIcon';
8
+import Navigate from '@/components/Navigate';
8 9
 import SelectCity from '../../components/SelectButton/CitySelect'
9 10
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10 11
 import apis from '../../services/apis';
@@ -47,7 +48,7 @@ const header = (props) => {
47 48
       dataIndex: 'image',
48 49
       key: 'image',
49 50
       align: 'center',
50
-      render: (image,row) => <img onClick={toEdit(row.contentId)} src={image} className={styles.imgSmall} />,
51
+      render: (image,row) => <Navigate onClick={toEdit(row.contentId)}><img src={image} className={styles.imgSmall} /></Navigate>,
51 52
     },
52 53
     {
53 54
       title: '发布城市',

+ 2
- 1
src/pages/carouselFigure/carouselFigureList.jsx Целия файл

@@ -5,6 +5,7 @@ import moment from 'moment';
5 5
 import AuthButton from '@/components/AuthButton';
6 6
 import withActions from '@/components/ActionList';
7 7
 import EditIcon from '@/components/EditIcon';
8
+import Navigate from '@/components/Navigate';
8 9
 import SelectCity from '../../components/SelectButton/CitySelect'
9 10
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10 11
 import apis from '../../services/apis';
@@ -47,7 +48,7 @@ const header = (props) => {
47 48
       dataIndex: 'image',
48 49
       key: 'image',
49 50
       align: 'center',
50
-      render: (x, row) => <img onClick={toEditCarouse(row.contentId)} src={row.image} className={row.showPosition === 'index' ? styles.imgIndex : row.showPosition === 'mall' ? styles.imgPerfect : ''} />,
51
+      render: (x, row) => <Navigate onClick={toEditCarouse(row.contentId)} ><img src={row.image} className={row.showPosition === 'index' ? styles.imgIndex : row.showPosition === 'mall' ? styles.imgPerfect : ''} /></Navigate>,
51 52
     },
52 53
     {
53 54
       title: '发布城市',

+ 3
- 2
src/pages/carouselFigure/customImg/list.jsx Целия файл

@@ -1,9 +1,10 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { Form, Table } from 'antd';
3
+import router from 'umi/router';
3 4
 import AuthButton from '@/components/AuthButton';
4 5
 import withActions from '@/components/ActionList';
5 6
 import EditIcon from '@/components/EditIcon';
6
-import router from 'umi/router';
7
+import Navigate from '@/components/Navigate';
7 8
 import apis from '../../../services/apis';
8 9
 import request from '../../../utils/request'
9 10
 
@@ -52,7 +53,7 @@ function header(props) {
52 53
       <Table dataSource={data}>
53 54
         <Column title="图片" dataIndex="imgUrl" key="imgUrl"
54 55
           render={(text, record) => (
55
-            <img onClick={toEditCustom(record.imgId, record.imgType)} src={record.imgUrl} height="120px" width="150px" style={{ objectFit: 'contain' }} />
56
+            <Navigate onClick={toEditCustom(record.imgId, record.imgType)} ><img src={record.imgUrl} height="120px" width="150px" style={{ objectFit: 'contain' }} /></Navigate>
56 57
           )} />
57 58
         <Column title="类型" dataIndex="imgType" key="imgType"
58 59
           render={(text, record) => (

+ 2
- 1
src/pages/carouselFigure/propagandaList.jsx Целия файл

@@ -5,6 +5,7 @@ import moment from 'moment';
5 5
 import AuthButton from '@/components/AuthButton';
6 6
 import EditIcon from '@/components/EditIcon';
7 7
 import withActions from '@/components/ActionList';
8
+import Navigate from '@/components/Navigate';
8 9
 import SelectCity from '../../components/SelectButton/CitySelect'
9 10
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10 11
 import apis from '../../services/apis';
@@ -47,7 +48,7 @@ const header = (props) => {
47 48
       dataIndex: 'image',
48 49
       key: 'image',
49 50
       align: 'center',
50
-      render: (image,row) => <img onClick={toEdit(row.contentId)} src={image} className={styles.propaganda} />,
51
+      render: (image,row) => <Navigate onClick={toEdit(row.contentId)} ><img src={image} className={styles.propaganda} /></Navigate>,
51 52
     },
52 53
     {
53 54
       title: '发布城市',

+ 74
- 53
src/pages/customer/customerlist/index.jsx Целия файл

@@ -5,7 +5,7 @@ import request from '../../../utils/request';
5 5
 import apis from '../../../services/apis';
6 6
 import Styles from './style.less';
7 7
 import router from 'umi/router';
8
-
8
+import withActions from '@/components/ActionList';
9 9
 import Attribution from './components/attribution'
10 10
 import AssistConsultant from './components/assistConsultant'
11 11
 import BatchAssistConsultant from './components/BatchAssistConsultant'
@@ -217,7 +217,7 @@ function body(props) {
217 217
         localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
218 218
         props.form.setFieldsValue(localStorageValue);
219 219
 
220
-        getList( {pageNumber: 1, pageSize: 10, customerType, ...JSON.parse(localStorage.getItem("pubPageParams")) })
220
+        getList({ pageNumber: 1, pageSize: 10, customerType, ...JSON.parse(localStorage.getItem("pubPageParams")) })
221 221
       } else {
222 222
         localStorage.setItem("pubPageParams", JSON.stringify({ pageNumber: 1, pageSize: 10, customerType: 'public' }))
223 223
         getList({ pageNumber: 1, pageSize: 10, customerType: 'public' })
@@ -413,7 +413,7 @@ function body(props) {
413 413
       dataIndex: 'picture',
414 414
       key: 'picture',
415 415
       align: 'center',
416
-      width: '15%',
416
+      width: '10%',
417 417
       // render: (_, record) => <Avatar shape="square" style={{ color: 'blue', cursor: 'pointer' }} onClick={() => publicCustomerDetail(record)} src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
418 418
       render: (_, record) => <Avatar shape="square" style={{ color: 'blue', cursor: 'pointer' }} onClick={() => publicCustomerDetail(record)} src={record.picture} size={64} icon="user" />,
419 419
     },
@@ -438,7 +438,7 @@ function body(props) {
438 438
       dataIndex: '',
439 439
       key: '',
440 440
       align: 'center',
441
-      width: '15%',
441
+      width: '10%',
442 442
       render: (_, record) => <><span>{record.buildingId != null ? '是' : '否'}</span></>,
443 443
     },
444 444
     {
@@ -453,7 +453,7 @@ function body(props) {
453 453
       dataIndex: 'sharePersonName',
454 454
       key: 'sharePersonName',
455 455
       align: 'center',
456
-      width: '15%',
456
+      width: '10%',
457 457
     },
458 458
     {
459 459
       title: '性别',
@@ -469,25 +469,35 @@ function body(props) {
469 469
       dataIndex: 'customerId',
470 470
       key: 'customerId',
471 471
       align: 'center',
472
-      width: '25%',
473
-      // eslint-disable-next-line no-nested-ternary
474
-      render: (_, record) => (
475
-        <>
476
-          {/* <AuthButton name="admin.customer.public.detail" noRight={null}>
477
-            <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
478
-          </AuthButton>
479
-          &nbsp;&nbsp; */}
480
-          <AuthButton name="admin.customer.recommend" noRight={null}>
481
-            <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
482
-          </AuthButton>
483
-          <AuthButton name="admin.customer.assign" noRight={null}>
484
-            <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
485
-          </AuthButton>
486
-          <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
487
-            <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
488
-          </AuthButton>
489
-        </>
490
-      ),
472
+      width: '20%',
473
+      render: withActions((text, record) => [
474
+        <AuthButton name="admin.customer.recommend" noRight={null}>
475
+          <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
476
+        </AuthButton>,
477
+        <AuthButton name="admin.customer.assign" noRight={null}>
478
+          <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
479
+        </AuthButton>,
480
+        <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
481
+          <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
482
+        </AuthButton>
483
+      ]),
484
+      // render: (_, record) => (
485
+      //   <>
486
+      //     {/* <AuthButton name="admin.customer.public.detail" noRight={null}>
487
+      //       <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
488
+      //     </AuthButton>
489
+      //     &nbsp;&nbsp; */}
490
+      //     <AuthButton name="admin.customer.recommend" noRight={null}>
491
+      //       <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
492
+      //     </AuthButton>
493
+      //     <AuthButton name="admin.customer.assign" noRight={null}>
494
+      //       <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
495
+      //     </AuthButton>
496
+      //     <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
497
+      //       <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
498
+      //     </AuthButton>
499
+      //   </>
500
+      // ),
491 501
     },
492 502
   ]
493 503
 
@@ -574,35 +584,46 @@ function body(props) {
574 584
       key: 'customerId',
575 585
       align: 'center',
576 586
       width: '20%',
577
-      // eslint-disable-next-line no-nested-ternary
578
-      render: (_, record) => (
579
-        <>
580
-          <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', }}>
581
-            <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
582
-              <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
583
-            </AuthButton>
584
-
585
-            <AuthButton name="admin.customer.recommend.belong" noRight={null}>
586
-              <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
587
-            </AuthButton>
588
-          </div>
589
-
590
-
591
-          {/* <AuthButton name="admin.customer.recommend.get" noRight={null}>
592
-            <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
593
-          </AuthButton>
594
-            &nbsp;&nbsp; */}
595
-          <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
596
-            <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
597
-              <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
598
-            </AuthButton>
599
-
600
-            <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
601
-              <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
602
-            </AuthButton>
603
-          </div>
604
-        </>
605
-      ),
587
+      render: withActions((text, record) => [
588
+
589
+        <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
590
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
591
+        </AuthButton>,
592
+
593
+        <AuthButton name="admin.customer.recommend.belong" noRight={null}>
594
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
595
+        </AuthButton>,
596
+
597
+        <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
598
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
599
+        </AuthButton>,
600
+
601
+        <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
602
+          <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
603
+        </AuthButton>
604
+      ]),
605
+      // render: (_, record) => (
606
+      //   <>
607
+      //     <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
608
+      //       <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
609
+      //     </AuthButton>
610
+      //     <AuthButton name="admin.customer.recommend.belong" noRight={null}>
611
+      //       <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
612
+      //     </AuthButton>
613
+
614
+      //     {/* <AuthButton name="admin.customer.recommend.get" noRight={null}>
615
+      //       <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
616
+      //     </AuthButton>
617
+      //       &nbsp;&nbsp; */}
618
+      //     <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
619
+      //       <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
620
+      //     </AuthButton>
621
+      //     <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
622
+      //       <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
623
+      //     </AuthButton>
624
+
625
+      //   </>
626
+      // ),
606 627
     },
607 628
   ]
608 629
 

+ 2
- 3
src/pages/system/housingPolicy.jsx Целия файл

@@ -6,12 +6,11 @@ import moment from 'moment';
6 6
 import AuthButton from '@/components/AuthButton';
7 7
 import withActions from '@/components/ActionList';
8 8
 import EditIcon from '@/components/EditIcon';
9
+import Navigate from '@/components/Navigate';
9 10
 import SelectCity from '../../components/SelectButton/CitySelect';
10 11
 import apis from '../../services/apis';
11 12
 import request from '../../utils/request';
12 13
 import styles from '../style/GoodsList.less';
13
-import Navigate from '@/components/Navigate';
14
-
15 14
 
16 15
 const { Option } = Select;
17 16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
@@ -53,7 +52,7 @@ const header = (props) => {
53 52
       dataIndex: 'policyImg',
54 53
       key: 'policyImg',
55 54
       align: 'center',
56
-      render: (policyImg,row) => <img onClick={toEditPolicy(row.policyId)} src={policyImg} className={styles.touxiang} />,
55
+      render: (policyImg,row) =><Navigate onClick={toEditPolicy(row.policyId)} ><img src={policyImg} className={styles.touxiang} /></Navigate> ,
57 56
     },
58 57
     {
59 58
       title: '标题',