xujing 5 年 前
コミット
daa86f4098
共有1 個のファイルを変更した25 個の追加15 個の削除を含む
  1. 25
    15
      src/pages/statistical/consultant/index.jsx

+ 25
- 15
src/pages/statistical/consultant/index.jsx ファイルの表示

@@ -244,7 +244,7 @@ function record(props) {
244 244
             dataIndex: 'buildingName',
245 245
             key: 'buildingName',
246 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,8 +265,8 @@ function record(props) {
265 265
             key: 'totalPersons',
266 266
             align: 'center',
267 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 272
             title: '新增客户',
@@ -274,7 +274,8 @@ function record(props) {
274 274
             key: 'newPersons',
275 275
             align: 'center',
276 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 281
             title: '分享次数',
@@ -282,7 +283,8 @@ function record(props) {
282 283
             key: 'shareNum',
283 284
             align: 'center',
284 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 290
             title: '分享访问人数',
@@ -290,7 +292,8 @@ function record(props) {
290 292
             key: 'visitPersons',
291 293
             align: 'center',
292 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 299
             title: '分享访问次数',
@@ -298,7 +301,8 @@ function record(props) {
298 301
             key: 'visitNum',
299 302
             align: 'center',
300 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,7 +311,8 @@ function record(props) {
307 311
             key: 'sharePersons',
308 312
             align: 'center',
309 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 318
             title: '主页访问人数',
@@ -315,7 +320,8 @@ function record(props) {
315 320
             key: 'homePagePersons',
316 321
             align: 'center',
317 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 327
             title: '主页访问次数',
@@ -323,7 +329,8 @@ function record(props) {
323 329
             key: 'homePageNums',
324 330
             align: 'center',
325 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 336
             title: '咨询数',
@@ -331,7 +338,8 @@ function record(props) {
331 338
             key: 'chatPersons',
332 339
             align: 'center',
333 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 345
             title: '点赞数',
@@ -339,7 +347,8 @@ function record(props) {
339 347
             key: 'favorNum',
340 348
             align: 'center',
341 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,8 +380,8 @@ function record(props) {
371 380
         moment(formData.startDate),
372 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 385
     return (
377 386
 
378 387
         <>
@@ -429,7 +438,8 @@ function record(props) {
429 438
             </AuthButton>
430 439
             <Table rowKey={record => (record.userId + record.buildingId || '')}
431 440
                 style={{ marginTop: '30px' }}
432
-                dataSource={data.records}
441
+                dataSource={_list}
442
+                // dataSource={data.records}
433 443
                 columns={columns}
434 444
                 pagination={false}
435 445
                 onChange={handleChange}