cfel-base-components 2.5.39 → 2.5.41

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.5.39",
3
+ "version": "2.5.41",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -54,6 +54,7 @@
54
54
  "dayjs": "^1.11.9",
55
55
  "html2canvas": "^1.4.1",
56
56
  "qrcode.react": "^3.1.0",
57
+ "react-json-view": "^1.21.3",
57
58
  "sass": "^1.77.6"
58
59
  }
59
60
  }
@@ -1,4 +1,4 @@
1
- import request from '@/api/config'
1
+ import request from "../../../apiRequest/config"
2
2
 
3
3
  export const pageRequest = (data?: any) => {
4
4
  return request.post('/api/permission/role/page.json', { ...data })
@@ -117,6 +117,9 @@ export default function Role({ historyAction }: RoleProps) {
117
117
  hidden: !(productCode === 'puhui-operation-customer'),
118
118
  key: 'metaData',
119
119
  render: (cell: any, record: any) => {
120
+ if (record.roleCode === 'admin') {
121
+ return '-'
122
+ }
120
123
  if (cell !== undefined) {
121
124
  return (
122
125
  <span
@@ -1,4 +1,5 @@
1
- import request from "../../../apiRequest/config"
1
+ import request from '../../../apiRequest/config'
2
+
2
3
  //根据角色分页查询绑定的账号
3
4
  export const pageBoundAccounts = (data?: any) => {
4
5
  return request.post('/api/permission/accountRole/pageBoundAccounts.json', { ...data })
@@ -65,15 +65,23 @@ export default function RoleInfo({ isShowTab, getAuthTree, getRoleAuthTree, empo
65
65
 
66
66
  const renderMetaData = () => {
67
67
  //如果详情为的metadata为null则显示false
68
- if (roleInfo.metadata === null) {
68
+ if (roleInfo?.metaData === null) {
69
69
  return Object.keys(metaData).map((key) => {
70
- return <Descriptions.Item key={key} label={metaData[key]}>false</Descriptions.Item>
70
+ return (
71
+ <Descriptions.Item key={key} label={metaData[key]}>
72
+ false
73
+ </Descriptions.Item>
74
+ )
71
75
  })
72
76
  }
73
77
 
74
78
  //如果有数据则根据metadata翻译成中文
75
79
  return Object.keys(metaData).map((key) => {
76
- return <Descriptions.Item key={key} label={metaData[key]}>{roleInfo.metadata[key]}</Descriptions.Item>
80
+ return (
81
+ <Descriptions.Item key={key} label={metaData[key]}>
82
+ {roleInfo?.metaData[key]}
83
+ </Descriptions.Item>
84
+ )
77
85
  })
78
86
  }
79
87
 
@@ -484,7 +492,7 @@ export default function RoleInfo({ isShowTab, getAuthTree, getRoleAuthTree, empo
484
492
  <Descriptions.Item label="角色描述">{roleInfo?.description || ''}</Descriptions.Item>
485
493
  <Descriptions.Item label="创建时间">{timeFormatter(roleInfo?.gmtCreate) || ''}</Descriptions.Item>
486
494
  <Descriptions.Item label="更新时间">{timeFormatter(roleInfo?.gmtModified) || ''}</Descriptions.Item>
487
- {isCustomer && renderMetaData()}
495
+ {roleInfo?.roleCode === 'admin' ? null : <>{isCustomer && roleInfo?.id && renderMetaData()}</>}
488
496
  </Descriptions>
489
497
 
490
498
  <div>