cfel-base-components 2.5.5 → 2.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ {
2
+ "typescript.tsdk": "node_modules/typescript/lib"
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.5.5",
3
+ "version": "2.5.7",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -0,0 +1,10 @@
1
+ // @ts-nocheck
2
+ // This file is generated by Umi automatically
3
+ // DO NOT CHANGE IT MANUALLY!
4
+ import React from 'react';
5
+ import { HelmetProvider } from '/Users/wujingang/Desktop/workspace/base-components/node_modules/@umijs/renderer-react';
6
+ import { context } from './helmetContext';
7
+
8
+ export const innerProvider = (container) => {
9
+ return React.createElement(HelmetProvider, { context }, container);
10
+ }
@@ -0,0 +1,4 @@
1
+ // @ts-nocheck
2
+ // This file is generated by Umi automatically
3
+ // DO NOT CHANGE IT MANUALLY!
4
+ export const context = {};
@@ -130,6 +130,7 @@ export default function Account({
130
130
  let records = get(res, "records", [])
131
131
  let total = get(res, "total", 0)
132
132
  return {
133
+ ...res,
133
134
  dataList: records,
134
135
  totalCount: total
135
136
  }
@@ -154,6 +155,10 @@ export default function Account({
154
155
  <ProFormText name="account" label="账号" />
155
156
  </QueryFilter>
156
157
  <ProTable
158
+ columnsState={{
159
+ persistenceKey: 'base_account',
160
+ persistenceType: 'localStorage'
161
+ }}
157
162
  headerTitle={"账号列表"}
158
163
  dataSource={dataList}
159
164
  loading={isLoading}
@@ -129,6 +129,7 @@ export default function AccountInfo() {
129
129
  let records = get(res, "records", [])
130
130
  let total = get(res, "total", 0)
131
131
  return {
132
+ ...res,
132
133
  dataList: records,
133
134
  totalCount: total
134
135
  }
@@ -198,6 +199,10 @@ export default function AccountInfo() {
198
199
  </Descriptions>
199
200
 
200
201
  <ProTable
202
+ columnsState={{
203
+ persistenceKey: 'base_accountInfo',
204
+ persistenceType: 'localStorage'
205
+ }}
201
206
  headerTitle={"绑定的角色"}
202
207
  dataSource={dataList}
203
208
  loading={isLoading}
@@ -160,6 +160,7 @@ export default function Account({
160
160
  let records = get(res, "records", [])
161
161
  let total = get(res, "total", 0)
162
162
  return {
163
+ ...res,
163
164
  dataList: records,
164
165
  totalCount: total
165
166
  }
@@ -203,6 +204,10 @@ export default function Account({
203
204
  <ProFormText name="account" label="账号" />
204
205
  </QueryFilter>
205
206
  <ProTable
207
+ columnsState={{
208
+ persistenceKey: 'base_cpcAccount',
209
+ persistenceType: 'localStorage'
210
+ }}
206
211
  toolBarRender={() => {
207
212
  return [
208
213
  <Button
@@ -428,16 +428,19 @@ export default function AccountInfo({ isShowTab, getAuthTree, getAccountAuthTree
428
428
  columns={columns}
429
429
  pagination={false}
430
430
  />
431
- <Pagination
432
- {...pagination}
433
- onChange={(innerPageNo: number, innerPageSize: number) => {
434
- execute({
435
- innerPageNo,
436
- innerPageSize,
437
- accountId: pageId
438
- })
439
- }}
440
- />
431
+ <div className='paginBox'>
432
+ <span></span>
433
+ <Pagination
434
+ {...pagination}
435
+ onChange={(innerPageNo: number, innerPageSize: number) => {
436
+ execute({
437
+ innerPageNo,
438
+ innerPageSize,
439
+ accountId: pageId
440
+ })
441
+ }}
442
+ />
443
+ </div>
441
444
  </>
442
445
  )}
443
446
  {tabCheck === 'tableResource' && (
@@ -476,7 +479,9 @@ export default function AccountInfo({ isShowTab, getAuthTree, getAccountAuthTree
476
479
  columns={TablePolicy}
477
480
  pagination={false}
478
481
  />
479
- <Pagination
482
+ <div className='paginBox'>
483
+ <span></span>
484
+ <Pagination
480
485
  {...policy?.pagination}
481
486
  onChange={(innerPageNo: number, innerPageSize: number) => {
482
487
  policy?.execute({
@@ -486,6 +491,7 @@ export default function AccountInfo({ isShowTab, getAuthTree, getAccountAuthTree
486
491
  })
487
492
  }}
488
493
  />
494
+ </div>
489
495
  </>
490
496
  )}
491
497
  {tabCheck === 'tableData' && (
@@ -6,7 +6,7 @@ import QueryFilter from '../../base-component/QueryFilter';
6
6
  import ProTable from '../../base-component/ProTable';
7
7
  import Pagination from '../../base-component/Pagination';
8
8
  import { get } from 'lodash';
9
- import { Space, Button,message,Modal } from 'antd';
9
+ import { Space, Button,message,Modal,Popover } from 'antd';
10
10
  import { pageRequest,
11
11
  create,
12
12
  remove,
@@ -79,6 +79,22 @@ export default function Role({
79
79
  title: '角色描述',
80
80
  dataIndex: 'description',
81
81
  key: 'description',
82
+ render: (text: any) => {
83
+ if (text?.length > 30) {
84
+ let sliceText = text.slice(0, 30)
85
+ return (
86
+ <Popover
87
+ content={<div style={{ width: '300px', wordWrap: 'break-word' }}>{text}</div>}
88
+ trigger='hover'
89
+ >
90
+ {sliceText}
91
+ <a>更多</a>
92
+ </Popover>
93
+ )
94
+ } else {
95
+ return text
96
+ }
97
+ }
82
98
  },
83
99
  {
84
100
  title: '创建时间',
@@ -154,6 +170,7 @@ export default function Role({
154
170
  let records = get(res, "records", [])
155
171
  let total = get(res, "total", 0)
156
172
  return {
173
+ ...res,
157
174
  dataList: records,
158
175
  totalCount: total
159
176
  }
@@ -199,6 +216,10 @@ export default function Role({
199
216
  </QueryFilter>
200
217
 
201
218
  <ProTable
219
+ columnsState={{
220
+ persistenceKey: 'base_cpcRole',
221
+ persistenceType: 'localStorage'
222
+ }}
202
223
  toolBarRender={() => {
203
224
  return [
204
225
  <Button
@@ -521,6 +521,10 @@ export default function RoleInfo({
521
521
  <ProFormText name='keyword' label='关键词' />
522
522
  </QueryFilter>
523
523
  <ProTable
524
+ columnsState={{
525
+ persistenceKey: 'base_cpcRoleInfoMain',
526
+ persistenceType: 'localStorage'
527
+ }}
524
528
  size='small'
525
529
  dataSource={dataList}
526
530
  loading={isLoading}
@@ -543,17 +547,20 @@ export default function RoleInfo({
543
547
  ]
544
548
  }}
545
549
  />
546
-
547
- <Pagination
548
- {...pagination}
549
- onChange={(innerPageNo: number, innerPageSize: number) => {
550
- execute({
551
- innerPageNo,
552
- innerPageSize,
553
- roleCode: roleCode
554
- })
555
- }}
556
- />
550
+ <div className='paginBox'>
551
+ <span></span>
552
+ <Pagination
553
+ {...pagination}
554
+ onChange={(innerPageNo: number, innerPageSize: number) => {
555
+ execute({
556
+ innerPageNo,
557
+ innerPageSize,
558
+ roleCode: roleCode
559
+ })
560
+ }}
561
+ />
562
+ </div>
563
+
557
564
  </>
558
565
  )}
559
566
  {tabCheck === 'tableResource' && (
@@ -640,9 +647,27 @@ export default function RoleInfo({
640
647
  />
641
648
  </QueryFilter>
642
649
  <ProTable
650
+ columnsState={{
651
+ persistenceKey: 'base_cpcRoleInfoEmpower',
652
+ persistenceType: 'localStorage'
653
+ }}
643
654
  style={{ margin: '20px 0' }}
644
655
  toolBarRender={() => {
645
656
  return [
657
+ <Button
658
+ key="del"
659
+ disabled={rowKeys.length > 0 ? false : true}
660
+ onClick={() => {
661
+ Modal.confirm({
662
+ title: `确认批量解绑吗?`,
663
+ onOk: () => {
664
+ DeleteFunc(rowKeys)
665
+ }
666
+ })
667
+ }}
668
+ >
669
+ 批量解绑
670
+ </Button>,
646
671
  <Button
647
672
  key='add'
648
673
  size='middle'
@@ -678,19 +703,7 @@ export default function RoleInfo({
678
703
  }}
679
704
  />
680
705
  <div className='paginBox'>
681
- <Button
682
- disabled={rowKeys.length > 0 ? false : true}
683
- onClick={() => {
684
- Modal.confirm({
685
- title: `确认批量解绑吗?`,
686
- onOk: () => {
687
- DeleteFunc(rowKeys)
688
- }
689
- })
690
- }}
691
- >
692
- 批量解绑
693
- </Button>
706
+ <span></span>
694
707
  <Pagination {...policy?.pagination} />
695
708
  </div>
696
709
  </>
@@ -101,6 +101,7 @@ export default function Role({
101
101
  let records = get(res, "records", [])
102
102
  let total = get(res, "total", 0)
103
103
  return {
104
+ ...res,
104
105
  dataList: records,
105
106
  totalCount: total
106
107
  }
@@ -125,6 +126,10 @@ export default function Role({
125
126
  </QueryFilter>
126
127
 
127
128
  <ProTable
129
+ columnsState={{
130
+ persistenceKey: 'base_role',
131
+ persistenceType: 'localStorage'
132
+ }}
128
133
  headerTitle={"角色列表"}
129
134
  dataSource={dataList}
130
135
  loading={isLoading}
@@ -144,6 +144,7 @@ export default function RoleInfo() {
144
144
  let records = get(res, "records", [])
145
145
  let total = get(res, "total", 0)
146
146
  return {
147
+ ...res,
147
148
  dataList: records,
148
149
  totalCount: total
149
150
  }
@@ -209,6 +210,10 @@ export default function RoleInfo() {
209
210
  </QueryFilter>
210
211
 
211
212
  <ProTable
213
+ columnsState={{
214
+ persistenceKey: 'base_roleInfo',
215
+ persistenceType: 'localStorage'
216
+ }}
212
217
  headerTitle={"角色下绑定的账号"}
213
218
  dataSource={dataList}
214
219
  loading={isLoading}