Просмотр исходного кода

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

zhoulisen 5 лет назад
Родитель
Сommit
2b616acbe6

+ 2
- 1
src/pages/carouselFigure/advertisingList.jsx Просмотреть файл

5
 import AuthButton from '@/components/AuthButton';
5
 import AuthButton from '@/components/AuthButton';
6
 import withActions from '@/components/ActionList';
6
 import withActions from '@/components/ActionList';
7
 import EditIcon from '@/components/EditIcon';
7
 import EditIcon from '@/components/EditIcon';
8
+import Navigate from '@/components/Navigate';
8
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10
 import apis from '../../services/apis';
11
 import apis from '../../services/apis';
47
       dataIndex: 'image',
48
       dataIndex: 'image',
48
       key: 'image',
49
       key: 'image',
49
       align: 'center',
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
       title: '发布城市',
54
       title: '发布城市',

+ 2
- 1
src/pages/carouselFigure/carouselFigureList.jsx Просмотреть файл

5
 import AuthButton from '@/components/AuthButton';
5
 import AuthButton from '@/components/AuthButton';
6
 import withActions from '@/components/ActionList';
6
 import withActions from '@/components/ActionList';
7
 import EditIcon from '@/components/EditIcon';
7
 import EditIcon from '@/components/EditIcon';
8
+import Navigate from '@/components/Navigate';
8
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10
 import apis from '../../services/apis';
11
 import apis from '../../services/apis';
47
       dataIndex: 'image',
48
       dataIndex: 'image',
48
       key: 'image',
49
       key: 'image',
49
       align: 'center',
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
       title: '发布城市',
54
       title: '发布城市',

+ 3
- 2
src/pages/carouselFigure/customImg/list.jsx Просмотреть файл

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
 import { Form, Table } from 'antd';
2
 import { Form, Table } from 'antd';
3
+import router from 'umi/router';
3
 import AuthButton from '@/components/AuthButton';
4
 import AuthButton from '@/components/AuthButton';
4
 import withActions from '@/components/ActionList';
5
 import withActions from '@/components/ActionList';
5
 import EditIcon from '@/components/EditIcon';
6
 import EditIcon from '@/components/EditIcon';
6
-import router from 'umi/router';
7
+import Navigate from '@/components/Navigate';
7
 import apis from '../../../services/apis';
8
 import apis from '../../../services/apis';
8
 import request from '../../../utils/request'
9
 import request from '../../../utils/request'
9
 
10
 
52
       <Table dataSource={data}>
53
       <Table dataSource={data}>
53
         <Column title="图片" dataIndex="imgUrl" key="imgUrl"
54
         <Column title="图片" dataIndex="imgUrl" key="imgUrl"
54
           render={(text, record) => (
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
         <Column title="类型" dataIndex="imgType" key="imgType"
58
         <Column title="类型" dataIndex="imgType" key="imgType"
58
           render={(text, record) => (
59
           render={(text, record) => (

+ 2
- 1
src/pages/carouselFigure/propagandaList.jsx Просмотреть файл

5
 import AuthButton from '@/components/AuthButton';
5
 import AuthButton from '@/components/AuthButton';
6
 import EditIcon from '@/components/EditIcon';
6
 import EditIcon from '@/components/EditIcon';
7
 import withActions from '@/components/ActionList';
7
 import withActions from '@/components/ActionList';
8
+import Navigate from '@/components/Navigate';
8
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10
 import BuildSelect from '../../components/SelectButton/BuildSelect'
10
 import apis from '../../services/apis';
11
 import apis from '../../services/apis';
47
       dataIndex: 'image',
48
       dataIndex: 'image',
48
       key: 'image',
49
       key: 'image',
49
       align: 'center',
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
       title: '发布城市',
54
       title: '发布城市',

+ 74
- 53
src/pages/customer/customerlist/index.jsx Просмотреть файл

5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
6
 import Styles from './style.less';
6
 import Styles from './style.less';
7
 import router from 'umi/router';
7
 import router from 'umi/router';
8
-
8
+import withActions from '@/components/ActionList';
9
 import Attribution from './components/attribution'
9
 import Attribution from './components/attribution'
10
 import AssistConsultant from './components/assistConsultant'
10
 import AssistConsultant from './components/assistConsultant'
11
 import BatchAssistConsultant from './components/BatchAssistConsultant'
11
 import BatchAssistConsultant from './components/BatchAssistConsultant'
217
         localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
217
         localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
218
         props.form.setFieldsValue(localStorageValue);
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
       } else {
221
       } else {
222
         localStorage.setItem("pubPageParams", JSON.stringify({ pageNumber: 1, pageSize: 10, customerType: 'public' }))
222
         localStorage.setItem("pubPageParams", JSON.stringify({ pageNumber: 1, pageSize: 10, customerType: 'public' }))
223
         getList({ pageNumber: 1, pageSize: 10, customerType: 'public' })
223
         getList({ pageNumber: 1, pageSize: 10, customerType: 'public' })
413
       dataIndex: 'picture',
413
       dataIndex: 'picture',
414
       key: 'picture',
414
       key: 'picture',
415
       align: 'center',
415
       align: 'center',
416
-      width: '15%',
416
+      width: '10%',
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" />,
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
       render: (_, record) => <Avatar shape="square" style={{ color: 'blue', cursor: 'pointer' }} onClick={() => publicCustomerDetail(record)} src={record.picture} size={64} icon="user" />,
418
       render: (_, record) => <Avatar shape="square" style={{ color: 'blue', cursor: 'pointer' }} onClick={() => publicCustomerDetail(record)} src={record.picture} size={64} icon="user" />,
419
     },
419
     },
438
       dataIndex: '',
438
       dataIndex: '',
439
       key: '',
439
       key: '',
440
       align: 'center',
440
       align: 'center',
441
-      width: '15%',
441
+      width: '10%',
442
       render: (_, record) => <><span>{record.buildingId != null ? '是' : '否'}</span></>,
442
       render: (_, record) => <><span>{record.buildingId != null ? '是' : '否'}</span></>,
443
     },
443
     },
444
     {
444
     {
453
       dataIndex: 'sharePersonName',
453
       dataIndex: 'sharePersonName',
454
       key: 'sharePersonName',
454
       key: 'sharePersonName',
455
       align: 'center',
455
       align: 'center',
456
-      width: '15%',
456
+      width: '10%',
457
     },
457
     },
458
     {
458
     {
459
       title: '性别',
459
       title: '性别',
469
       dataIndex: 'customerId',
469
       dataIndex: 'customerId',
470
       key: 'customerId',
470
       key: 'customerId',
471
       align: 'center',
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
       key: 'customerId',
584
       key: 'customerId',
575
       align: 'center',
585
       align: 'center',
576
       width: '20%',
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
 import AuthButton from '@/components/AuthButton';
6
 import AuthButton from '@/components/AuthButton';
7
 import withActions from '@/components/ActionList';
7
 import withActions from '@/components/ActionList';
8
 import EditIcon from '@/components/EditIcon';
8
 import EditIcon from '@/components/EditIcon';
9
+import Navigate from '@/components/Navigate';
9
 import SelectCity from '../../components/SelectButton/CitySelect';
10
 import SelectCity from '../../components/SelectButton/CitySelect';
10
 import apis from '../../services/apis';
11
 import apis from '../../services/apis';
11
 import request from '../../utils/request';
12
 import request from '../../utils/request';
12
 import styles from '../style/GoodsList.less';
13
 import styles from '../style/GoodsList.less';
13
-import Navigate from '@/components/Navigate';
14
-
15
 
14
 
16
 const { Option } = Select;
15
 const { Option } = Select;
17
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
53
       dataIndex: 'policyImg',
52
       dataIndex: 'policyImg',
54
       key: 'policyImg',
53
       key: 'policyImg',
55
       align: 'center',
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
       title: '标题',
58
       title: '标题',