xujing преди 5 години
родител
ревизия
daa86f4098
променени са 1 файла, в които са добавени 25 реда и са изтрити 15 реда
  1. 25
    15
      src/pages/statistical/consultant/index.jsx

+ 25
- 15
src/pages/statistical/consultant/index.jsx Целия файл

244
             dataIndex: 'buildingName',
244
             dataIndex: 'buildingName',
245
             key: 'buildingName',
245
             key: 'buildingName',
246
             align: 'center',
246
             align: 'center',
247
-            // render: (txt, _, index) => index ? txt : <span>总计</span>,
247
+            render: (txt, _, index) => index ? txt : <span>总计</span>,
248
         },
248
         },
249
 
249
 
250
         {
250
         {
265
             key: 'totalPersons',
265
             key: 'totalPersons',
266
             align: 'center',
266
             align: 'center',
267
             sorter: true,
267
             sorter: true,
268
-            render: (txt, record, index) => clickCon(txt, record, 'totalPersons'),
269
-            // render: (txt, record, index) => index ? clickCon(txt, record, 'totalPersons') : <strong>{txt}</strong>,
268
+            // render: (txt, record, index) => clickCon(txt, record, 'totalPersons'),
269
+            render: (txt, record, index) => index ? clickCon(txt, record, 'totalPersons') : <strong>{txt}</strong>,
270
         },
270
         },
271
         {
271
         {
272
             title: '新增客户',
272
             title: '新增客户',
274
             key: 'newPersons',
274
             key: 'newPersons',
275
             align: 'center',
275
             align: 'center',
276
             sorter: true,
276
             sorter: true,
277
-            render: (txt, record, index) => clickCon(txt, record, 'newPersons'),
277
+            // render: (txt, record, index) => clickCon(txt, record, 'newPersons'),
278
+            render: (txt, record, index) => index ? clickCon(txt, record, 'newPersons') : <strong>{txt}</strong>,
278
         },
279
         },
279
         {
280
         {
280
             title: '分享次数',
281
             title: '分享次数',
282
             key: 'shareNum',
283
             key: 'shareNum',
283
             align: 'center',
284
             align: 'center',
284
             sorter: true,
285
             sorter: true,
285
-            render: (txt, record, index) => clickCon(txt, record, 'shareNum'),
286
+            // render: (txt, record, index) => clickCon(txt, record, 'shareNum'),
287
+            render: (txt, record, index) => index ? clickCon(txt, record, 'shareNum') : <strong>{txt}</strong>,
286
         },
288
         },
287
         {
289
         {
288
             title: '分享访问人数',
290
             title: '分享访问人数',
290
             key: 'visitPersons',
292
             key: 'visitPersons',
291
             align: 'center',
293
             align: 'center',
292
             sorter: true,
294
             sorter: true,
293
-            render: (txt, record, index) => clickCon(txt, record, 'visitPersons'),
295
+            // render: (txt, record, index) => clickCon(txt, record, 'visitPersons'),
296
+            render: (txt, record, index) => index ? clickCon(txt, record, 'visitPersons') : <strong>{txt}</strong>,
294
         },
297
         },
295
         {
298
         {
296
             title: '分享访问次数',
299
             title: '分享访问次数',
298
             key: 'visitNum',
301
             key: 'visitNum',
299
             align: 'center',
302
             align: 'center',
300
             sorter: true,
303
             sorter: true,
301
-            render: (txt, record, index) => clickCon(txt, record, 'visitNum'),
304
+            // render: (txt, record, index) => clickCon(txt, record, 'visitNum'),
305
+            render: (txt, record, index) => index ? clickCon(txt, record, 'visitNum') : <strong>{txt}</strong>,
302
         },
306
         },
303
 
307
 
304
         {
308
         {
307
             key: 'sharePersons',
311
             key: 'sharePersons',
308
             align: 'center',
312
             align: 'center',
309
             sorter: true,
313
             sorter: true,
310
-            render: (txt, record, index) => clickCon(txt, record, 'sharePersons'),
314
+            // render: (txt, record, index) => clickCon(txt, record, 'sharePersons'),
315
+            render: (txt, record, index) => index ? clickCon(txt, record, 'sharePersons') : <strong>{txt}</strong>,
311
         },
316
         },
312
         {
317
         {
313
             title: '主页访问人数',
318
             title: '主页访问人数',
315
             key: 'homePagePersons',
320
             key: 'homePagePersons',
316
             align: 'center',
321
             align: 'center',
317
             sorter: true,
322
             sorter: true,
318
-            render: (txt, record, index) => clickCon(txt, record, 'homePagePersons'),
323
+            // render: (txt, record, index) => clickCon(txt, record, 'homePagePersons'),
324
+            render: (txt, record, index) => index ? clickCon(txt, record, 'homePagePersons') : <strong>{txt}</strong>,
319
         },
325
         },
320
         {
326
         {
321
             title: '主页访问次数',
327
             title: '主页访问次数',
323
             key: 'homePageNums',
329
             key: 'homePageNums',
324
             align: 'center',
330
             align: 'center',
325
             sorter: true,
331
             sorter: true,
326
-            render: (txt, record, index) => clickCon(txt, record, 'homePageNums'),
332
+            // render: (txt, record, index) => clickCon(txt, record, 'homePageNums'),
333
+            render: (txt, record, index) => index ? clickCon(txt, record, 'homePageNums') : <strong>{txt}</strong>,
327
         },
334
         },
328
         {
335
         {
329
             title: '咨询数',
336
             title: '咨询数',
331
             key: 'chatPersons',
338
             key: 'chatPersons',
332
             align: 'center',
339
             align: 'center',
333
             sorter: true,
340
             sorter: true,
334
-            render: (txt, record, index) => clickCon(txt, record, 'chatPersons'),
341
+            // render: (txt, record, index) => clickCon(txt, record, 'chatPersons'),
342
+            render: (txt, record, index) => index ? clickCon(txt, record, 'chatPersons') : <strong>{txt}</strong>,
335
         },
343
         },
336
         {
344
         {
337
             title: '点赞数',
345
             title: '点赞数',
339
             key: 'favorNum',
347
             key: 'favorNum',
340
             align: 'center',
348
             align: 'center',
341
             sorter: true,
349
             sorter: true,
342
-            render: (txt, record, index) => clickCon(txt, record, 'favorNum'),
350
+            // render: (txt, record, index) => clickCon(txt, record, 'favorNum'),
351
+            render: (txt, record, index) => index ? clickCon(txt, record, 'favorNum') : <strong>{txt}</strong>,
343
         },
352
         },
344
     ];
353
     ];
345
     // 下载文档
354
     // 下载文档
371
         moment(formData.startDate),
380
         moment(formData.startDate),
372
         moment(formData.endDate),
381
         moment(formData.endDate),
373
     ]
382
     ]
374
-    // const list = data.records
375
-    // const _list = list && list.length > 0 ? [totalRow, ...list] : [];
383
+    const list = data.records
384
+    const _list = list && list.length > 0 ? [totalRow, ...list] : [];
376
     return (
385
     return (
377
 
386
 
378
         <>
387
         <>
429
             </AuthButton>
438
             </AuthButton>
430
             <Table rowKey={record => (record.userId + record.buildingId || '')}
439
             <Table rowKey={record => (record.userId + record.buildingId || '')}
431
                 style={{ marginTop: '30px' }}
440
                 style={{ marginTop: '30px' }}
432
-                dataSource={data.records}
441
+                dataSource={_list}
442
+                // dataSource={data.records}
433
                 columns={columns}
443
                 columns={columns}
434
                 pagination={false}
444
                 pagination={false}
435
                 onChange={handleChange}
445
                 onChange={handleChange}