zhoulisen 5 年之前
父節點
當前提交
e97c29021d

+ 3
- 3
src/pages/activity/ActivityList.jsx 查看文件

175
           <EditIcon type={row.status === 1 ? 'cancel' : 'publish'} text={row.status === 1 ? '取消发布' : '发布'} onClick={sendOrPublicDynamic.bind(this, row)} />
175
           <EditIcon type={row.status === 1 ? 'cancel' : 'publish'} text={row.status === 1 ? '取消发布' : '发布'} onClick={sendOrPublicDynamic.bind(this, row)} />
176
         </AuthButton>,
176
         </AuthButton>,
177
 
177
 
178
-        <AuthButton name="admin.buildingDynamic.tag" noRight={null}>
179
-          <EditIcon type="look" text="查看详情" onClick={getActivityDetail(row.dynamicId)} />
180
-        </AuthButton>,
178
+    
179
+          <EditIcon type="look" text="查看详情" onClick={getActivityDetail(row.dynamicId)} />,
180
+        
181
 
181
 
182
         row.activityStatus === 0 ?
182
         row.activityStatus === 0 ?
183
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>
183
           <AuthButton name="admin.buildingDynamic.finish.put" noRight={null}>

+ 94
- 84
src/pages/activity/drainage/DrainageList.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Select, message, Table, Pagination, Modal, DatePicker, Radio } from 'antd';
2
+import { Form, Input, Button, Select, message, Table, Pagination, Typography, Modal, DatePicker, Radio } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import Prompt from 'umi/prompt';
5
 import Prompt from 'umi/prompt';
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 styles from '../../style/GoodsList.less';
9
 import styles from '../../style/GoodsList.less';
9
 import apis from '../../../services/apis';
10
 import apis from '../../../services/apis';
10
 import request from '../../../utils/request';
11
 import request from '../../../utils/request';
56
 
57
 
57
   }, [])
58
   }, [])
58
 
59
 
59
-  function gettaDrainage (params) {
60
+  function gettaDrainage(params) {
60
     request({ ...apis.activity.taDrainage, params: params }).then((data) => {
61
     request({ ...apis.activity.taDrainage, params: params }).then((data) => {
61
       setDatas(data)
62
       setDatas(data)
62
       console.log(data.records, '_213_')
63
       console.log(data.records, '_213_')
71
       title: '确认删除该引流?',
72
       title: '确认删除该引流?',
72
       okText: '确认',
73
       okText: '确认',
73
       cancelText: '取消',
74
       cancelText: '取消',
74
-      onOk () {
75
+      onOk() {
75
         request({ ...apis.activity.deletetaDrainage, urlData: { id: drainageIid }, }).then((data) => {
76
         request({ ...apis.activity.deletetaDrainage, urlData: { id: drainageIid }, }).then((data) => {
76
           message.info('操作成功!')
77
           message.info('操作成功!')
77
           gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
78
           gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
110
   }
111
   }
111
 
112
 
112
   const exchangeDrainage = drainage => () => {
113
   const exchangeDrainage = drainage => () => {
113
-    if(drainage.status === 1){
114
-      if(drainage.isMiniapp){
114
+    if (drainage.status === 1) {
115
+      if (drainage.isMiniapp) {
115
         Modal.confirm({
116
         Modal.confirm({
116
           title: '下架后当前H5活动关联的小程序端开屏图、banner图等也会自动下架。',
117
           title: '下架后当前H5活动关联的小程序端开屏图、banner图等也会自动下架。',
117
           okText: '确认',
118
           okText: '确认',
118
           cancelText: '取消',
119
           cancelText: '取消',
119
-          onOk () {
120
+          onOk() {
120
             request({ ...apis.activity.exchangeDrainage, urlData: { id: drainage.drainageId }, data: drainage }).then((data) => {
121
             request({ ...apis.activity.exchangeDrainage, urlData: { id: drainage.drainageId }, data: drainage }).then((data) => {
121
               message.info('操作成功!')
122
               message.info('操作成功!')
122
               gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
123
               gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
126
             })
127
             })
127
           }
128
           }
128
         });
129
         });
129
-      }else{
130
+      } else {
130
         request({ ...apis.activity.exchangeDrainage, urlData: { id: drainage.drainageId }, data: drainage }).then((data) => {
131
         request({ ...apis.activity.exchangeDrainage, urlData: { id: drainage.drainageId }, data: drainage }).then((data) => {
131
           message.info('H5活动已下架!')
132
           message.info('H5活动已下架!')
132
           gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
133
           gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
135
           message.info(err.msg || err.message)
136
           message.info(err.msg || err.message)
136
         })
137
         })
137
       }
138
       }
138
-      
139
-    }else{
139
+
140
+    } else {
140
       request({ ...apis.activity.exchangeDrainage, urlData: { id: drainage.drainageId }, data: drainage }).then((data) => {
141
       request({ ...apis.activity.exchangeDrainage, urlData: { id: drainage.drainageId }, data: drainage }).then((data) => {
141
         message.info('H5活动已上架!')
142
         message.info('H5活动已上架!')
142
         gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
143
         gettaDrainage(JSON.parse(localStorage.getItem("drainageActivePageParams")))
145
         message.info(err.msg || err.message)
146
         message.info(err.msg || err.message)
146
       })
147
       })
147
     }
148
     }
148
-    
149
+
149
   }
150
   }
150
 
151
 
151
   const columns = [
152
   const columns = [
160
       dataIndex: 'isMiniapp',
161
       dataIndex: 'isMiniapp',
161
       key: 'isMiniapp',
162
       key: 'isMiniapp',
162
       align: 'cenxter',
163
       align: 'cenxter',
163
-      render: (isMiniapp) => <span>{ isMiniapp ? '是' : '否'  }</span>, 
164
+      render: (isMiniapp) => <span>{isMiniapp ? '是' : '否'}</span>,
164
     },
165
     },
165
     {
166
     {
166
       title: 'H5项目名称',
167
       title: 'H5项目名称',
167
       dataIndex: 'name',
168
       dataIndex: 'name',
168
       key: 'name',
169
       key: 'name',
169
       align: 'center',
170
       align: 'center',
170
-      render: (text, datas) => <>
171
-
172
-        <div style={{ color: '#66B3FF', cursor: 'pointer' }} onClick={toDrainageDetail(datas.drainageId)}>{datas.name}</div>
173
-
174
-      </>
171
+      render: (text, datas) => <Navigate onClick={toDrainageDetail(datas.drainageId)}><Typography.Text ellipsis>{datas.name}</Typography.Text></Navigate>,
175
     },
172
     },
176
     {
173
     {
177
       title: '链接地址',
174
       title: '链接地址',
185
       dataIndex: 'status',
182
       dataIndex: 'status',
186
       key: 'status',
183
       key: 'status',
187
       align: 'center',
184
       align: 'center',
188
-    render: (status) => <span>{status === 1 ? '已上架' : '已下架'}</span>,
185
+      render: (status) => <span>{status === 1 ? '已上架' : '已下架'}</span>,
189
     },
186
     },
190
     {
187
     {
191
       title: '新建时间',
188
       title: '新建时间',
226
           <EditIcon type="edit" text="编辑" onClick={() => addshowModal(datas)} />
223
           <EditIcon type="edit" text="编辑" onClick={() => addshowModal(datas)} />
227
         </AuthButton>,
224
         </AuthButton>,
228
 
225
 
226
+        <EditIcon type="look" text="查看详情" onClick={toDrainageDetail(datas.drainageId)} />,
227
+
229
         <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
228
         <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
230
           <EditIcon type="delete" text="删除" onClick={deleteDrainage(datas.drainageId)} />
229
           <EditIcon type="delete" text="删除" onClick={deleteDrainage(datas.drainageId)} />
231
         </AuthButton >,
230
         </AuthButton >,
232
 
231
 
233
-          <AuthButton name="admin.taDrainage.publish" noRight={null}>
234
-            <EditIcon type={datas.status === 1 ? 'cancel' : 'publish'} text={datas.status === 1 ? '下架' : '上架'} onClick={exchangeDrainage(datas)} />
235
-          </AuthButton>,
232
+        <AuthButton name="admin.taDrainage.publish" noRight={null}>
233
+          <EditIcon type={datas.status === 1 ? 'cancel' : 'publish'} text={datas.status === 1 ? '下架' : '上架'} onClick={exchangeDrainage(datas)} />
234
+        </AuthButton>,
235
+
236
+        <AuthButton name="admin.taDrainage.data" noRight={null}>
237
+          <EditIcon text="数据" onClick={toEditList(datas.drainageId)} />
238
+        </AuthButton>,
236
 
239
 
237
-          <AuthButton name="admin.taDrainage.data" noRight={null}>
238
-            <EditIcon color="#666" text="数据" onClick={toEditList(datas.drainageId)} />
239
-          </AuthButton>,
240
 
240
 
241
-          
242
-          <EditIcon color="#666" type="record" text="数据记录" onClick={toDataReacord(datas)} />,
241
+        <EditIcon type="record" text="数据记录" onClick={toDataReacord(datas)} />,
243
 
242
 
244
-          <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
245
-            <EditIcon color="#666" text="下载二维码" onClick={newQrcode.bind(this, datas)} />
246
-          </AuthButton >,
243
+        <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
244
+          <EditIcon text="下载二维码" onClick={newQrcode.bind(this, datas)} />
245
+        </AuthButton >,
247
       ]),
246
       ]),
248
     },
247
     },
249
   ];
248
   ];
256
     // }, [formsDate])
255
     // }, [formsDate])
257
 
256
 
258
     const [hiddenStatus, setHiddenStatus] = useState(formsdate.isMiniapp)
257
     const [hiddenStatus, setHiddenStatus] = useState(formsdate.isMiniapp)
259
-    
258
+
260
     const handleSubmit = e => {
259
     const handleSubmit = e => {
261
       e.preventDefault();
260
       e.preventDefault();
262
       props.form.validateFields((err, values) => {
261
       props.form.validateFields((err, values) => {
322
     };
321
     };
323
 
322
 
324
     const changeMiniapp = e => {
323
     const changeMiniapp = e => {
325
-      if(e.target.value == 1){
324
+      if (e.target.value == 1) {
326
         setHiddenStatus(true)
325
         setHiddenStatus(true)
327
-      }else{
326
+      } else {
328
         setHiddenStatus(false)
327
         setHiddenStatus(false)
329
       }
328
       }
330
     }
329
     }
335
     return <Form {...formItemLayout} onSubmit={handleSubmit}>
334
     return <Form {...formItemLayout} onSubmit={handleSubmit}>
336
 
335
 
337
       <Form.Item label="是否投放小程序端" help='选择是后,该活动可投放至小程序的轮播位以及开屏广告'>
336
       <Form.Item label="是否投放小程序端" help='选择是后,该活动可投放至小程序的轮播位以及开屏广告'>
338
-        {getFieldDecorator('isMiniapp',{
339
-          initialValue : formsDate.isMiniapp ? 1 : 0,
337
+        {getFieldDecorator('isMiniapp', {
338
+          initialValue: formsDate.isMiniapp ? 1 : 0,
340
           rules: [
339
           rules: [
341
             { required: true, message: '请选择是否投放小程序' },
340
             { required: true, message: '请选择是否投放小程序' },
342
           ],
341
           ],
348
         )}
347
         )}
349
       </Form.Item>
348
       </Form.Item>
350
       <Form.Item label="H5项目名称">
349
       <Form.Item label="H5项目名称">
351
-        {getFieldDecorator('name',{initialValue : formsDate.name,
350
+        {getFieldDecorator('name', {
351
+          initialValue: formsDate.name,
352
           rules: [
352
           rules: [
353
             { required: true, message: '请输入H5项目名称' },
353
             { required: true, message: '请输入H5项目名称' },
354
           ],
354
           ],
359
         )}
359
         )}
360
       </Form.Item>
360
       </Form.Item>
361
       {hiddenStatus && (<Form.Item label="选择项目">
361
       {hiddenStatus && (<Form.Item label="选择项目">
362
-        {getFieldDecorator('buildingId',{initialValue : formsDate.buildingId})(
363
-            <BuildSelect />,
362
+        {getFieldDecorator('buildingId', { initialValue: formsDate.buildingId })(
363
+          <BuildSelect />,
364
         )}
364
         )}
365
       </Form.Item>)}
365
       </Form.Item>)}
366
       <Form.Item label="下架时间">
366
       <Form.Item label="下架时间">
367
-        {getFieldDecorator('endDate',{initialValue : formsdate.endDate ? moment(formsdate.endDate, 'YYYY-MM-DD HH:mm:ss') : null,
367
+        {getFieldDecorator('endDate', {
368
+          initialValue: formsdate.endDate ? moment(formsdate.endDate, 'YYYY-MM-DD HH:mm:ss') : null,
368
           rules: [
369
           rules: [
369
             { required: true, message: '请输入下架时间' },
370
             { required: true, message: '请输入下架时间' },
370
-          ]})(
371
+          ]
372
+        })(
371
           <DatePicker
373
           <DatePicker
372
-          showTime={{ format: 'HH:mm:ss' }}
374
+            showTime={{ format: 'HH:mm:ss' }}
373
           />,
375
           />,
374
         )}
376
         )}
375
       </Form.Item>
377
       </Form.Item>
376
       {hiddenStatus && (<Form.Item label="活动链接地址">
378
       {hiddenStatus && (<Form.Item label="活动链接地址">
377
-        {getFieldDecorator('h5Address',{initialValue : formsDate.h5Address,
379
+        {getFieldDecorator('h5Address', {
380
+          initialValue: formsDate.h5Address,
378
           rules: [
381
           rules: [
379
             { required: true, message: '请输入H5活动链接地址' },
382
             { required: true, message: '请输入H5活动链接地址' },
380
-          ]})(
383
+          ]
384
+        })(
381
           <Input
385
           <Input
382
             placeholder="请输入H5活动链接地址"
386
             placeholder="请输入H5活动链接地址"
383
             disabled={formsDate.isMiniapp}
387
             disabled={formsDate.isMiniapp}
385
         )}
389
         )}
386
       </Form.Item>)}
390
       </Form.Item>)}
387
       {hiddenStatus && (<Form.Item label="分享设置" help="建议图片尺寸:750*600px,比例5:4,格式:jpg">
391
       {hiddenStatus && (<Form.Item label="分享设置" help="建议图片尺寸:750*600px,比例5:4,格式:jpg">
388
-          {getFieldDecorator('shareImg',{initialValue : formsDate.shareImg,
392
+        {getFieldDecorator('shareImg', {
393
+          initialValue: formsDate.shareImg,
389
           rules: [
394
           rules: [
390
             { required: true, message: '请选择分享图片' },
395
             { required: true, message: '请选择分享图片' },
391
-          ]})(<ImageUploader />)}
396
+          ]
397
+        })(<ImageUploader />)}
392
       </Form.Item>)}
398
       </Form.Item>)}
393
       {hiddenStatus && (<Form.Item label="活动分享语">
399
       {hiddenStatus && (<Form.Item label="活动分享语">
394
-        {getFieldDecorator('shareTitle',{initialValue : formsDate.shareTitle,
400
+        {getFieldDecorator('shareTitle', {
401
+          initialValue: formsDate.shareTitle,
395
           rules: [
402
           rules: [
396
             { required: true, message: '请输入活动分享语' },
403
             { required: true, message: '请输入活动分享语' },
397
-          ]})(
404
+          ]
405
+        })(
398
           <Input
406
           <Input
399
             placeholder="分享语,不超过15个字"
407
             placeholder="分享语,不超过15个字"
400
             maxLength="15"
408
             maxLength="15"
402
         )}
410
         )}
403
       </Form.Item>)}
411
       </Form.Item>)}
404
       {hiddenStatus && (<Form.Item label="中间页飞机图" help="建议图片尺寸:750*1667px,比例9:20,格式:jpg。图片底部不要放置关键信息。">
412
       {hiddenStatus && (<Form.Item label="中间页飞机图" help="建议图片尺寸:750*1667px,比例9:20,格式:jpg。图片底部不要放置关键信息。">
405
-          {getFieldDecorator('middleImg',{initialValue : formsDate.middleImg,
413
+        {getFieldDecorator('middleImg', {
414
+          initialValue: formsDate.middleImg,
406
           rules: [
415
           rules: [
407
             { required: true, message: '请选择中间页飞机图' },
416
             { required: true, message: '请选择中间页飞机图' },
408
-          ]})(<ImageUploader />)}
417
+          ]
418
+        })(<ImageUploader />)}
409
       </Form.Item>)}
419
       </Form.Item>)}
410
       <Form.Item {...tailFormItemLayout}>
420
       <Form.Item {...tailFormItemLayout}>
411
         <AuthButton name="admin.taDrainage.id.put" noRight={null}>
421
         <AuthButton name="admin.taDrainage.id.put" noRight={null}>
425
 
435
 
426
 
436
 
427
   //重置搜索
437
   //重置搜索
428
-  function handleReset () {
438
+  function handleReset() {
429
     props.form.resetFields();
439
     props.form.resetFields();
430
     localStorage.setItem("drainageActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));
440
     localStorage.setItem("drainageActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));
431
     gettaDrainage({ pageNum: 1, pageSize: 10 })
441
     gettaDrainage({ pageNum: 1, pageSize: 10 })
433
 
443
 
434
 
444
 
435
 
445
 
436
-  function addshowModal (datas) {
446
+  function addshowModal(datas) {
437
 
447
 
438
     // alert(datas.drainageId)
448
     // alert(datas.drainageId)
439
     setFormsDate(datas)
449
     setFormsDate(datas)
443
     });
453
     });
444
   };
454
   };
445
 
455
 
446
-  function showModal () {
456
+  function showModal() {
447
     setFormsDate({
457
     setFormsDate({
448
       drainageId: '',
458
       drainageId: '',
449
       name: '',
459
       name: '',
463
     });
473
     });
464
   }
474
   }
465
 
475
 
466
-  function handleOk () {
476
+  function handleOk() {
467
 
477
 
468
 
478
 
469
     setDate({
479
     setDate({
470
       ModalText: 'The modal will be closed after two seconds',
480
       ModalText: 'The modal will be closed after two seconds',
471
       confirmLoading: true,
481
       confirmLoading: true,
472
     });
482
     });
473
-    function setTimeout () {
483
+    function setTimeout() {
474
       setDate({
484
       setDate({
475
         visible: false,
485
         visible: false,
476
         confirmLoading: false,
486
         confirmLoading: false,
478
     };
488
     };
479
   };
489
   };
480
 
490
 
481
-  function handleCancel () {
491
+  function handleCancel() {
482
     console.log('Clicked cancel button');
492
     console.log('Clicked cancel button');
483
     setDate({
493
     setDate({
484
       visible: false,
494
       visible: false,
485
     });
495
     });
486
   };
496
   };
487
-  function handleSubmit (e) {
497
+  function handleSubmit(e) {
488
     e.preventDefault();
498
     e.preventDefault();
489
     props.form.validateFields((err, values) => {
499
     props.form.validateFields((err, values) => {
490
       console.log('values', values)
500
       console.log('values', values)
498
 
508
 
499
   //打开新页面
509
   //打开新页面
500
   const openIndexImg = () => {
510
   const openIndexImg = () => {
501
-    const newWin=window.open('about:blank');
502
-    newWin.location.href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%A1%88%E4%BE%8B.png"
511
+    const newWin = window.open('about:blank');
512
+    newWin.location.href = "http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%A1%88%E4%BE%8B.png"
503
   }
513
   }
504
-  
514
+
505
   const { getFieldDecorator } = props.form;
515
   const { getFieldDecorator } = props.form;
506
   const { visible, confirmLoading, ModalText, title } = date;
516
   const { visible, confirmLoading, ModalText, title } = date;
507
   return (
517
   return (
527
             )}
537
             )}
528
           </Form.Item>
538
           </Form.Item>
529
           <Form.Item>
539
           <Form.Item>
530
-          {getFieldDecorator('isMiniapp')(
531
-            <Select style={{ width: '180px' }} placeholder="是否投放小程序">
532
-              <Option value="1">是</Option>
533
-              <Option value="0">否</Option>
534
-            </Select>,
535
-          )}
536
-        </Form.Item>
537
-        <Form.Item>
538
-          {getFieldDecorator('status')(
539
-            <Select style={{ width: '180px' }} placeholder="上架状态">
540
-              <Option value="1">已上架</Option>
541
-              <Option value="0">已下架</Option>
542
-            </Select>,
543
-          )}
544
-        </Form.Item>
540
+            {getFieldDecorator('isMiniapp')(
541
+              <Select style={{ width: '180px' }} placeholder="是否投放小程序">
542
+                <Option value="1">是</Option>
543
+                <Option value="0">否</Option>
544
+              </Select>,
545
+            )}
546
+          </Form.Item>
547
+          <Form.Item>
548
+            {getFieldDecorator('status')(
549
+              <Select style={{ width: '180px' }} placeholder="上架状态">
550
+                <Option value="1">已上架</Option>
551
+                <Option value="0">已下架</Option>
552
+              </Select>,
553
+            )}
554
+          </Form.Item>
545
           <Form.Item >
555
           <Form.Item >
546
-          <AuthButton name="admin.taDrainage.search" noRight={null}>
547
-            <Button type="primary" htmlType="submit" className={styles.searchBtn} onClick>
548
-              搜索
556
+            <AuthButton name="admin.taDrainage.search" noRight={null}>
557
+              <Button type="primary" htmlType="submit" className={styles.searchBtn} onClick>
558
+                搜索
549
           </Button>
559
           </Button>
550
-          </AuthButton>
560
+            </AuthButton>
551
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
561
             <Button style={{ marginLeft: 8 }} onClick={handleReset}>
552
               重置
562
               重置
553
             </Button>
563
             </Button>
556
         <AuthButton name="admin.taDrainage.add.post" noRight={null}>
566
         <AuthButton name="admin.taDrainage.add.post" noRight={null}>
557
           <Button type="danger" className={styles.addBtn} onClick={showModal}>新增</Button>
567
           <Button type="danger" className={styles.addBtn} onClick={showModal}>新增</Button>
558
         </AuthButton>
568
         </AuthButton>
559
-          <span style={{ color: '#66B3FF', cursor: 'pointer', margin: '20px',display:'inline-block' }} onClick={openIndexImg}>优质案例</span>
569
+        <span style={{ color: '#66B3FF', cursor: 'pointer', margin: '20px', display: 'inline-block' }} onClick={openIndexImg}>优质案例</span>
560
         <Modal
570
         <Modal
561
           title={title}
571
           title={title}
562
 
572
 
568
         >
578
         >
569
           <Formss formsDate={formsdate} />
579
           <Formss formsDate={formsdate} />
570
         </Modal>
580
         </Modal>
571
-        <Table 
572
-        // onRow={record => {
573
-        //   return {
574
-        //     onClick: toDrainageDetail(record.drainageId),
575
-        //   };
576
-        // }}
577
-        columns={columns} dataSource={datas.records} pagination={false} rowKey="drainageList" />
581
+        <Table
582
+          // onRow={record => {
583
+          //   return {
584
+          //     onClick: toDrainageDetail(record.drainageId),
585
+          //   };
586
+          // }}
587
+          columns={columns} dataSource={datas.records} pagination={false} rowKey="drainageList" />
578
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
588
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
579
           <Pagination showQuickJumper defaultCurrent={1} total={datas.total} onChange={(e) => changePageNum(e)} current={datas.current} />
589
           <Pagination showQuickJumper defaultCurrent={1} total={datas.total} onChange={(e) => changePageNum(e)} current={datas.current} />
580
         </div>
590
         </div>

+ 8
- 6
src/pages/activity/groupActivity/list.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Pagination, Modal } from 'antd';
2
+import { Form, Input, Button, Icon, Select, message, Table, Typography, Pagination, Modal } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import AuthButton from '@/components/AuthButton';
5
 import AuthButton from '@/components/AuthButton';
92
       dataIndex: 'activityName',
92
       dataIndex: 'activityName',
93
       key: 'activityName',
93
       key: 'activityName',
94
       align: 'center',
94
       align: 'center',
95
-      render: (x, row) => <><div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '201px', title: 'content' }}>
96
-        <Navigate onClick={getActivityDetail(row.groupActivityId)}>{row.activityName}</Navigate></div></>,
95
+      render: (x, row) => <Navigate onClick={getActivityDetail(row.groupActivityId)}><Typography.Text ellipsis>{row.activityName}</Typography.Text></Navigate>,
97
     },
96
     },
98
     {
97
     {
99
       title: '活动时间',
98
       title: '活动时间',
147
       align: 'center',
146
       align: 'center',
148
       width: 400,
147
       width: 400,
149
       render: withActions((x, row) => [
148
       render: withActions((x, row) => [
149
+
150
+        <EditIcon type="look" text="查看详情" onClick={getActivityDetail(row.groupActivityId)} />,
151
+
150
         row.activityStatus === 0 ?
152
         row.activityStatus === 0 ?
151
           <AuthButton name="admin.taShareActivity.finish.put" noRight={null}>
153
           <AuthButton name="admin.taShareActivity.finish.put" noRight={null}>
152
             <EditIcon type="end" text="结束活动" onClick={endGroupActivity(row)} />
154
             <EditIcon type="end" text="结束活动" onClick={endGroupActivity(row)} />
161
           </AuthButton>,
163
           </AuthButton>,
162
             
164
             
163
           <AuthButton name="admin.taShareActivity.top" noRight={null}>
165
           <AuthButton name="admin.taShareActivity.top" noRight={null}>
164
-            <EditIcon color={row.activityStatus === 0 ? '#666' : undefined} type={row.sort === 1 ? 'cancel' : 'add'} text={row.sort === 1 ? '取消推荐首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
166
+            <EditIcon type={row.sort === 1 ? 'cancel' : 'add'} text={row.sort === 1 ? '取消推荐首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
165
           </AuthButton>,
167
           </AuthButton>,
166
 
168
 
167
-          <EditIcon color="#666" type="record" text="数据记录" onClick={() => toDataReacord(row.groupActivityId)} />,
169
+          <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.groupActivityId)} />,
168
 
170
 
169
           (row.activityStatus === 0 || row.activityStatus === 1) ?
171
           (row.activityStatus === 0 || row.activityStatus === 1) ?
170
             <AuthButton name="admin.taShareActivity.update.put" noRight={null}>
172
             <AuthButton name="admin.taShareActivity.update.put" noRight={null}>
171
-              <EditIcon color="#666" type="edit" text="编辑" onClick={toEditActivity(row.groupActivityId)} />
173
+              <EditIcon type="edit" text="编辑" onClick={toEditActivity(row.groupActivityId)} />
172
             </AuthButton> : null,
174
             </AuthButton> : null,
173
       ]),
175
       ]),
174
     },
176
     },

+ 10
- 10
src/pages/activity/helpActivity/list.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Pagination, Modal, DatePicker } from 'antd';
2
+import { Form, Input, Button, Icon, Select, message, Table, Pagination, Typography, Modal, DatePicker } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import AuthButton from '@/components/AuthButton';
5
 import AuthButton from '@/components/AuthButton';
86
       dataIndex: 'title',
86
       dataIndex: 'title',
87
       key: 'title',
87
       key: 'title',
88
       align: 'center',
88
       align: 'center',
89
-      render: (x, row) => <><div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '201px', title: 'content' }}>
90
-        <Navigate onClick={getActivityDetail(row.helpActivityId)}>{row.title}</Navigate>
91
-        </div></>,
89
+      render: (x, row) => <Navigate onClick={getActivityDetail(row.helpActivityId)}><Typography.Text ellipsis>{row.title}</Typography.Text></Navigate>,
92
     },
90
     },
93
     {
91
     {
94
       title: '活动时间',
92
       title: '活动时间',
104
       align: 'center',
102
       align: 'center',
105
       render: (x, row) => <><div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '201px', title: 'content' }}>
103
       render: (x, row) => <><div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '201px', title: 'content' }}>
106
         <Navigate onClick={getJoinPeople(row.helpActivityId)}>{row.enlistNum}</Navigate>
104
         <Navigate onClick={getJoinPeople(row.helpActivityId)}>{row.enlistNum}</Navigate>
107
-        </div></>,
105
+      </div></>,
108
     },
106
     },
109
     {
107
     {
110
       title: '助力成功数',
108
       title: '助力成功数',
144
             <EditIcon type="end" text="结束活动" onClick={topDynamic(row, 2)} />
142
             <EditIcon type="end" text="结束活动" onClick={topDynamic(row, 2)} />
145
           </AuthButton> : null,
143
           </AuthButton> : null,
146
 
144
 
145
+        <EditIcon type="look" text="查看详情" onClick={getActivityDetail(row.helpActivityId)} />,
146
+
147
         <AuthButton name="admin.help.tag" noRight={null}>
147
         <AuthButton name="admin.help.tag" noRight={null}>
148
           <EditIcon type={row.weight === 1 ? 'cancel' : 'add'} text={row.weight === 1 ? '取消标签' : '添加标签'} onClick={topDynamic(row, 0)} />
148
           <EditIcon type={row.weight === 1 ? 'cancel' : 'add'} text={row.weight === 1 ? '取消标签' : '添加标签'} onClick={topDynamic(row, 0)} />
149
         </AuthButton>,
149
         </AuthButton>,
150
 
150
 
151
         <AuthButton name="admin.help.top" noRight={null}>
151
         <AuthButton name="admin.help.top" noRight={null}>
152
-          <EditIcon type={row.isMain === 1 ? 'cancel' : 'add'} color="#666" text={row.isMain === 1 ? '取消推首页' : '推首页'} onClick={topDynamic(row, 1)} />
152
+          <EditIcon type={row.isMain === 1 ? 'cancel' : 'add'} text={row.isMain === 1 ? '取消推首页' : '推首页'} onClick={topDynamic(row, 1)} />
153
         </AuthButton>,
153
         </AuthButton>,
154
 
154
 
155
-        <EditIcon type="record" text="数据记录" color="#666" onClick={() => toDataReacord(row.helpActivityId)} />,
155
+        <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.helpActivityId)} />,
156
 
156
 
157
         (row.activityStatus === 1 || row.activityStatus === 0) ?
157
         (row.activityStatus === 1 || row.activityStatus === 0) ?
158
-            <AuthButton name="admin.helpActivity.update.put" noRight={null}>
159
-              <EditIcon color="#666" type="edit" text="编辑" onClick={toEditGoods(row.helpActivityId)} />
160
-            </AuthButton> : null,
158
+          <AuthButton name="admin.helpActivity.update.put" noRight={null}>
159
+            <EditIcon type="edit" text="编辑" onClick={toEditGoods(row.helpActivityId)} />
160
+          </AuthButton> : null,
161
       ]),
161
       ]),
162
     },
162
     },
163
   ];
163
   ];