agilebuilder-ui 1.1.41 → 1.1.42-sit1

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.
Files changed (31) hide show
  1. package/lib/{401-deb6f978.js → 401-5c692db3.js} +1 -1
  2. package/lib/{404-ca0b33ee.js → 404-bcdb3ce5.js} +1 -1
  3. package/lib/{iframe-page-eb39ba95.js → iframe-page-c8073fc1.js} +1 -1
  4. package/lib/{index-a36c91b2.js → index-fa4b5a84.js} +4882 -4825
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +85 -85
  8. package/lib/{tab-content-iframe-index-094835e7.js → tab-content-iframe-index-2be5c19e.js} +1 -1
  9. package/lib/{tab-content-index-92b24462.js → tab-content-index-69988e2f.js} +1 -1
  10. package/lib/{tache-subprocess-history-0d32337a.js → tache-subprocess-history-9889b788.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/fs-preview/src/fs-preview.vue +38 -29
  13. package/packages/fs-upload-new/src/fs-button-upload.vue +34 -1
  14. package/packages/fs-upload-new/src/fs-drag-upload.vue +43 -2
  15. package/packages/fs-upload-new/src/fs-preview-new.vue +6 -4
  16. package/packages/super-grid/src/custom-formatter.js +16 -10
  17. package/packages/super-grid/src/dynamic-input.vue +8 -3
  18. package/packages/super-grid/src/normal-column-content.vue +1 -0
  19. package/packages/super-grid/src/normal-column.vue +8 -4
  20. package/packages/super-grid/src/row-operation.vue +13 -9
  21. package/packages/super-grid/src/search-form-advancedQuery.vue +1 -1
  22. package/packages/super-grid/src/search-form-item.vue +23 -23
  23. package/packages/super-grid/src/search-form-open.vue +164 -158
  24. package/packages/super-grid/src/super-grid-service.js +141 -153
  25. package/packages/super-grid/src/super-grid.vue +43 -14
  26. package/packages/super-nine-grid/src/search-form.vue +469 -659
  27. package/packages/super-nine-grid/src/super-nine-grid.vue +1 -1
  28. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +515 -539
  29. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +24 -44
  30. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +626 -665
  31. package/src/utils/permission.js +86 -9
@@ -6,24 +6,24 @@ import { getTotalPermissions, isDevpAccess } from './permissionAuth'
6
6
  * @returns {Boolean}
7
7
  */
8
8
  export default function checkPermission(permission, systemCode) {
9
+ if (permission && permission === 'true') {
10
+ return true
11
+ }
9
12
  if (permission) {
10
13
  // 是否是预览项目时开发平台用户
11
- const isDevpPermission= isDevpAccess()
14
+ const isDevpPermission = isDevpAccess()
12
15
  // console.log('checkPermission---------permission=', permission, 'isDevpPermission=', isDevpPermission)
13
- if(isDevpPermission){
16
+ if (isDevpPermission) {
14
17
  return true
15
18
  }
16
19
  let hasPermission = false
17
20
  const storeCurrentUserPermissions = getTotalPermissions(systemCode)
18
- if (
19
- typeof storeCurrentUserPermissions !== 'undefined' &&
20
- storeCurrentUserPermissions !== null
21
- ) {
21
+ if (typeof storeCurrentUserPermissions !== 'undefined' && storeCurrentUserPermissions !== null) {
22
22
  const permissions = permission.split(',')
23
- for(let i=0;i<permissions.length;i++){
23
+ for (let i = 0; i < permissions.length; i++) {
24
24
  const permissionItem = permissions[i]
25
25
  const isPermission = isHasPermission(permissionItem, storeCurrentUserPermissions)
26
- if(isPermission !== undefined && isPermission === true) {
26
+ if (isPermission !== undefined && isPermission === true) {
27
27
  hasPermission = true
28
28
  break
29
29
  }
@@ -46,4 +46,81 @@ function isHasPermission(permission, storeCurrentUserPermissions) {
46
46
  }
47
47
  }
48
48
 
49
- export { checkPermission }
49
+ function getPermissionCodes(configure, pageContext) {
50
+ // if (!pageContext || !configure || pageContext.isTest) {
51
+ // // 如果是预览时
52
+ // return 'true'
53
+ // }
54
+ const codes = []
55
+ //默认生成的资源编码 固定为标准
56
+ if (configure.autoPermissions) {
57
+ for (const p of configure.autoPermissions) {
58
+ codes.push(pageContext.code + '.' + p.simpleCode)
59
+ }
60
+ }
61
+ //检查是否有手动选择绑定
62
+ if (configure.functionCodes) {
63
+ const sourceTypes = configure.sourceTypes ? configure.sourceTypes : []
64
+ const functionCodes = configure.functionCodes
65
+ for (let i = 0; i < functionCodes.length; i++) {
66
+ const functionCode = functionCodes[i]
67
+ const sourceType = i < sourceTypes.length ? sourceTypes[i] : ''
68
+ //服务时不加前缀
69
+ let newCode = ''
70
+ if (sourceType == 'service') {
71
+ newCode = functionCode
72
+ } else {
73
+ if (sourceType === 'standard') {
74
+ newCode = pageContext.code + '.' + functionCode
75
+ } else {
76
+ const permissionObject = getPagePermissionObjectBySimpleCode(functionCode, pageContext)
77
+ if (permissionObject.type === 'custom') {
78
+ newCode = functionCode
79
+ } else {
80
+ newCode = pageContext.code + '.' + functionCode
81
+ }
82
+ }
83
+ }
84
+ if (!codes.includes(newCode)) {
85
+ codes.push(newCode)
86
+ }
87
+ }
88
+ }
89
+ return codes.join(',')
90
+ }
91
+
92
+ function getPagePermissionObjectBySimpleCode(persmissionCode, pageContext) {
93
+ const pagePermissions = pageContext.pagePermissions
94
+ if (pagePermissions && pagePermissions.length > 0) {
95
+ for (let i = 0; i < pagePermissions.length; i++) {
96
+ if (pagePermissions[i].simpleCode === persmissionCode) {
97
+ return pagePermissions[i]
98
+ }
99
+ }
100
+ }
101
+ return null
102
+ }
103
+
104
+ /**
105
+ * 检查字段是否有分支字段权限
106
+ * @param {Object} branchFieldsMap - 分支字段权限
107
+ * @param {string} fieldName - 字段名
108
+ * @returns {boolean} - 是否有权限
109
+ */
110
+ function isFieldHasBranchAuth(branchFieldsMap, fieldName) {
111
+ if (branchFieldsMap) {
112
+ const hasAuthFields = branchFieldsMap.hasAuthFields
113
+ if (hasAuthFields && hasAuthFields.includes(fieldName)) {
114
+ // 说明分支配置了该字段的权限
115
+ return true
116
+ }
117
+ const allAuthFields = branchFieldsMap.allAuthFields
118
+ if (allAuthFields && allAuthFields.includes(fieldName)) {
119
+ // 说明分支没有配置该分支字段权限
120
+ return false
121
+ }
122
+ }
123
+ return true
124
+ }
125
+
126
+ export { checkPermission, getPermissionCodes, isFieldHasBranchAuth }