agilebuilder-ui 1.1.38 → 1.1.39-sit2

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 (54) hide show
  1. package/lib/{401-d4103b15.js → 401-5847b8a0.js} +1 -1
  2. package/lib/{404-bbbf1615.js → 404-1af24e99.js} +1 -1
  3. package/lib/{iframe-page-eeb30592.js → iframe-page-1cdbd4ea.js} +1 -1
  4. package/lib/{index-93dc7bbc.js → index-a31ac238.js} +13767 -13658
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +82 -79
  8. package/lib/{tab-content-iframe-index-82db069a.js → tab-content-iframe-index-0c2d8fd9.js} +1 -1
  9. package/lib/{tab-content-index-06291a81.js → tab-content-index-7a255c7a.js} +22 -22
  10. package/lib/{tache-subprocess-history-661219ec.js → tache-subprocess-history-4be63968.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/department-tree-inline/src/department-single-tree-inline.vue +3 -1
  13. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +5 -1
  14. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +2 -1
  15. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -1
  16. package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +3 -1
  17. package/packages/fs-preview/src/fs-preview.vue +44 -7
  18. package/packages/fs-upload-list/src/fs-upload-list.vue +50 -24
  19. package/packages/fs-upload-new/src/fs-button-upload.vue +12 -0
  20. package/packages/fs-upload-new/src/fs-drag-upload.vue +12 -0
  21. package/packages/fs-upload-new/src/fs-preview-new.vue +24 -5
  22. package/packages/fs-upload-new/src/fs-upload-new.vue +20 -0
  23. package/packages/organization-input/src/organization-input.vue +3 -3
  24. package/packages/super-grid/src/components/mobile-table-card.jsx +0 -1
  25. package/packages/super-grid/src/custom-formatter.js +1 -1
  26. package/packages/super-grid/src/dynamic-input.vue +16 -22
  27. package/packages/super-grid/src/normal-column-content.vue +25 -13
  28. package/packages/super-grid/src/row-operation.vue +13 -9
  29. package/packages/super-grid/src/search-form-item.vue +75 -17
  30. package/packages/super-grid/src/search-form-mobile.vue +5 -0
  31. package/packages/super-grid/src/search-form-ordinarySearch.vue +5 -0
  32. package/packages/super-grid/src/search-methods.js +3 -1
  33. package/packages/super-grid/src/super-grid.vue +13 -0
  34. package/packages/utils/organization.ts +56 -40
  35. package/packages/workflow-history-list/src/workflow-history-list.vue +41 -3
  36. package/src/api/sso-service.js +2 -1
  37. package/src/directives/permission/permission.js +7 -1
  38. package/src/i18n/langs/cn.js +10 -3
  39. package/src/i18n/langs/en.js +10 -3
  40. package/src/permission.js +2 -1
  41. package/src/store/modules/user.js +4 -1
  42. package/src/styles/table.scss +8 -7
  43. package/src/utils/common-util.js +1 -1
  44. package/src/utils/file-util.ts +12 -4
  45. package/src/utils/jump-page-utils.js +1 -0
  46. package/src/utils/permission.js +2 -2
  47. package/src/utils/permissionAuth.js +11 -7
  48. package/src/utils/util.js +19 -0
  49. package/src/views/dsc-component/Sidebar/Item.vue +18 -7
  50. package/src/views/dsc-component/Sidebar/SidebarItem.vue +10 -2
  51. package/src/views/dsc-component/Sidebar/index.vue +0 -2
  52. package/src/views/layout/components/Menubar/Item.vue +20 -3
  53. package/src/views/layout/components/Menubar/SidebarItem.vue +46 -18
  54. package/vite.config.js +1 -2
@@ -15,7 +15,7 @@
15
15
  row-key="uuid"
16
16
  style="width: 100%"
17
17
  >
18
- <el-table-column :label="$t('workflowHistoryList.index')" align="left" width="80px">
18
+ <el-table-column :label="$t('workflowHistoryList.index')" align="center" width="80">
19
19
  <template v-slot="scope">
20
20
  {{ scope.$index + 1 }}
21
21
  </template>
@@ -35,13 +35,13 @@
35
35
  }}</span>
36
36
  </template>
37
37
  </el-table-column>
38
- <el-table-column :label="$t('workflowHistoryList.operator')" align="left" width="250">
38
+ <el-table-column :label="$t('workflowHistoryList.operator')" align="left" width="120">
39
39
  <template v-slot="scope">
40
40
  <span v-if="scope.row.historyType && scope.row.historyType === 'PROCESS_END'" />
41
41
  <span v-else>{{ scope.row.creatorName }}</span>
42
42
  </template>
43
43
  </el-table-column>
44
- <el-table-column :label="$t('workflowHistoryList.operatorLg')" align="left" width="250">
44
+ <el-table-column :label="$t('workflowHistoryList.operatorLg')" align="left" width="160">
45
45
  <template v-slot="scope">
46
46
  <span v-if="scope.row.historyType && scope.row.historyType === 'PROCESS_END'" />
47
47
  <span v-else>{{ scope.row.creator }}</span>
@@ -59,6 +59,28 @@
59
59
  <span v-else>{{ scope.row.formatCreatedTime }}</span>
60
60
  </template>
61
61
  </el-table-column>
62
+ <el-table-column :label="$t('workflowHistoryList.taskState')" align="left" width="100">
63
+ <template v-slot="scope">
64
+ <span v-if="scope.row.historyType && scope.row.historyType === 'PROCESS_END'" />
65
+ <el-tag v-else-if="scope.row.current" type="warning">{{$t('workflowHistoryList.taskStateDoing')}}</el-tag>
66
+ <el-tag v-else type="success">{{$t('workflowHistoryList.taskStateDone')}}</el-tag>
67
+ </template>
68
+ </el-table-column>
69
+ <el-table-column :label="$t('workflowHistoryList.processingDuration')" align="center" width="120">
70
+ <template v-slot="scope">
71
+ <span v-if="scope.row.historyType && scope.row.historyType === 'PROCESS_END'" />
72
+ <span v-else-if="!scope.row.copyTask">{{ scope.row.processingDuration }}</span>
73
+ </template>
74
+ </el-table-column>
75
+ <el-table-column :label="$t('workflowHistoryList.isOverdue')" align="center" width="100">
76
+ <template v-slot="scope">
77
+ <span v-if="scope.row.historyType && scope.row.historyType === 'PROCESS_END'" />
78
+ <span v-else>
79
+ <div v-if="scope.row.overdueDuration && scope.row.overdueDuration > 0" class="red-circle"/>
80
+ <div v-else class="green-circle"/>
81
+ </span>
82
+ </template>
83
+ </el-table-column>
62
84
  <el-table-column :label="$t('workflowHistoryList.operation')" align="left" width="400">
63
85
  <template v-slot="scope">
64
86
  <span v-if="scope.row.historyType && scope.row.historyType === 'PROCESS_END'" />
@@ -286,3 +308,19 @@ export default {
286
308
  }
287
309
  }
288
310
  </script>
311
+ <style scoped>
312
+ .red-circle {
313
+ width: 20px; /* 圆圈的宽度 */
314
+ height: 20px; /* 圆圈的高度 */
315
+ background-color: red; /* 背景色设置为红色 */
316
+ border-radius: 50%; /* 边框半径设置为50%,使元素变为圆形 */
317
+ display: inline-block; /* 确保元素以块级元素显示 */
318
+ }
319
+ .green-circle {
320
+ width: 20px; /* 圆圈的宽度 */
321
+ height: 20px; /* 圆圈的高度 */
322
+ background-color: rgb(11, 177, 121); /* 背景色设置为红色 */
323
+ border-radius: 50%; /* 边框半径设置为50%,使元素变为圆形 */
324
+ display: inline-block; /* 确保元素以块级元素显示 */
325
+ }
326
+ </style>
@@ -61,7 +61,7 @@ function logout() {
61
61
  }
62
62
 
63
63
  function getCurrentUserPermissionsBySystem(loginName, systemCode) {
64
- console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, isMobileBrowser())
64
+ console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, 'isMobile=',isMobileBrowser(),'systemCode=',systemCode)
65
65
  if(isMobileBrowser()){
66
66
  return getCurrentUserMobilePermissions(loginName)
67
67
  } else {
@@ -72,6 +72,7 @@ function getCurrentUserPermissionsBySystem(loginName, systemCode) {
72
72
  systemCode = window.$vueApp.config.globalProperties.systemCode
73
73
  }
74
74
  }
75
+ console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, 'systemCode222=',systemCode)
75
76
  return request.get(
76
77
  window.$vueApp.config.globalProperties.baseAPI +
77
78
  '/sso/current-users/permissions/with-system?loginName=' +
@@ -6,9 +6,15 @@ export default {
6
6
 
7
7
  if (value) {
8
8
  // console.log('-----v-permission---init----')
9
+ let permissionCodes = value
10
+ let systemCode
11
+ if(value instanceof Object) {
12
+ permissionCodes = value.codes
13
+ systemCode = value.systemCode
14
+ }
9
15
  // 页面组件预览时不需要权限控制,系统中使用页面组件时需要使用权限控制,所以当是预览是资源编码传'true'
10
16
  // 工作流按钮组件中也使用了资源编码为'true'的情况
11
- if (value !== 'true' && !checkPermission(value)) {
17
+ if (permissionCodes !== 'true' && !checkPermission(permissionCodes, systemCode)) {
12
18
  el.parentNode && el.parentNode.removeChild(el)
13
19
  }
14
20
  } else {
@@ -83,7 +83,8 @@ const cn = {
83
83
  forbiddenExceptionLinkUser: '如有疑问请联系',
84
84
  uploadFileTip: '上传的文件不超过{fileSize}M',
85
85
  asyncExportJumpMsg: '或点击我跳转到下载页面',
86
- mustFill: '{label} 必须填写'
86
+ mustFill: '{label} 必须填写',
87
+ filePathNotFound: '文件UUID未找到,请检查配置',
87
88
  },
88
89
  // 列表组件
89
90
  superGrid: {
@@ -134,7 +135,8 @@ const cn = {
134
135
  fold: '收起',
135
136
  prevRow: '上一行',
136
137
  nextRow: '下一行',
137
- detail: '详情'
138
+ detail: '详情',
139
+ searchEmpty:'查询空值'
138
140
  },
139
141
  // 部门树组件
140
142
  departmentTree: {},
@@ -255,7 +257,12 @@ const cn = {
255
257
  operationTime: '操作时间',
256
258
  history_draw_dept_task: '{key_1}领取了部门[{key_2}]的任务',
257
259
  history_abandon_draw_dept_task: '{key_1}放弃领取部门[{key_2}]的任务',
258
- remark: '备注'
260
+ remark: '备注',
261
+ taskState: '节点状态',
262
+ processingDuration: '处理时长(H)',
263
+ isOverdue: '是否超期',
264
+ taskStateDoing: '进行中',
265
+ taskStateDone: '已完成'
259
266
  },
260
267
  gateway: {
261
268
  timeout: '接口调用超时',
@@ -84,7 +84,8 @@ const en = {
84
84
  forbiddenExceptionLinkUser: 'if you have any questions,please contact',
85
85
  uploadFileTip: 'The file size should lower {fileSize}M',
86
86
  asyncExportJumpMsg: 'Or click me to jump to download page.',
87
- mustFill: '{label} must fill'
87
+ mustFill: '{label} must fill',
88
+ filePathNotFound: 'File UUID not found, please check the configuration'
88
89
  },
89
90
  superGrid: {
90
91
  editablePlaceholder: 'Please click to input',
@@ -134,7 +135,8 @@ const en = {
134
135
  fold: 'Fold',
135
136
  prevRow: 'Prev Row',
136
137
  nextRow: 'Next Row',
137
- detail: 'Detail'
138
+ detail: 'Detail',
139
+ searchEmpty:'Search Empty'
138
140
  },
139
141
  departmentTree: {},
140
142
  departmentTreeInline: {
@@ -254,7 +256,12 @@ const en = {
254
256
  operationTime: 'Operation Time',
255
257
  history_draw_dept_task: '{key_1} Received tasks from department [{key_2}]',
256
258
  history_abandon_draw_dept_task: '{key_1} Abandon the task of receiving department [{key_2}]',
257
- remark: 'remark'
259
+ remark: 'remark',
260
+ taskState: 'Task State',
261
+ processingDuration: 'Processing Duration(H)',
262
+ isOverdue: 'Is Overdue',
263
+ taskStateDoing: 'Doing',
264
+ taskStateDone: 'Done'
258
265
  },
259
266
  gateway: {
260
267
  timeout: 'Interface call timeout',
package/src/permission.js CHANGED
@@ -157,10 +157,11 @@ router.beforeEach((to, from, next) => {
157
157
  // 开发平台本身的功能或直接平台功能时
158
158
  // console.log('开发平台本身的功能或直接平台功能时')
159
159
  let systemCode = to.query ? to.query.customSystem: null
160
+ console.log('getCurrentUserPermissions---systemCode111=', systemCode)
160
161
  if (!systemCode) {
161
162
  systemCode = window.$vueApp.config.globalProperties.currentSystem
162
163
  }
163
- console.log('3333systemCode=', systemCode)
164
+ console.log('getCurrentUserPermissions---systemCode222=', systemCode)
164
165
  return store.dispatch('getCurrentUserPermissions', {loginName:user.loginName, systemCode})
165
166
  }
166
167
  })
@@ -238,7 +238,7 @@ const user = {
238
238
  const loginName = param.loginName
239
239
  const systemCode = param.systemCode
240
240
  let storePermissions = getPermissions(systemCode)
241
- console.log('getCurrentUserPermissions-----systemCode=', systemCode, 'storePermissions=', storePermissions)
241
+ console.log('getCurrentUserPermissions-----systemCode=', systemCode)
242
242
  // 这个判断会导致资源不会重新加载??
243
243
  if (
244
244
  typeof storePermissions === 'undefined' ||
@@ -248,6 +248,7 @@ const user = {
248
248
  ssoService
249
249
  .getCurrentUserPermissionsBySystem(loginName, systemCode)
250
250
  .then((permissions) => {
251
+ console.log('getCurrentUserPermissions-----systemCode=', systemCode, 'permissions[0]=', permissions && permissions.length>0?permissions[0]: null )
251
252
  let currentPermissions = ['index']
252
253
  currentPermissions = currentPermissions.concat(permissions)
253
254
  storePermissions = setPermissions(currentPermissions, systemCode)
@@ -257,6 +258,8 @@ const user = {
257
258
  reject(error)
258
259
  })
259
260
  } else {
261
+ let keys = Object.keys(storePermissions)
262
+ console.log('getCurrentUserPermissions-----systemCode=', systemCode, 'storePermissions[1]=', keys && keys.length>1?keys[1]: null )
260
263
  resolve(storePermissions)
261
264
  }
262
265
  })
@@ -4,13 +4,14 @@
4
4
  background-color: $th-background-color;
5
5
  }
6
6
 
7
- &.is-scrolling-left, &.is-scrolling-right, &.is-scrolling-none {
8
- th.el-table-fixed-column--right{
9
- background-color: $th-background-color;
7
+ // 修改 Element Plus 表格滚动条颜色为 #aaaaaa
8
+ .el-scrollbar {
9
+ &__bar {
10
+ .el-scrollbar__thumb {
11
+ background-color: #aaaaaa;
12
+ opacity: 1;
13
+ }
10
14
  }
11
- th.el-table-fixed-column--left{
12
- background-color: $th-background-color;
13
- }
14
- }
15
+ }
15
16
  }
16
17
  }
@@ -589,7 +589,7 @@ export function loadCSS() {
589
589
  console.error('皮肤主题为空!')
590
590
  return
591
591
  }
592
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI?window.$vueApp.config.globalProperties.baseAPI:localStorage.getItem('_baseAPI_')
592
+ const baseAPI = localStorage.getItem('_baseAPI_')
593
593
  if (baseAPI) {
594
594
  const href = replacePrefix(baseAPI) + '/component/theme/load-theme?theme=' + theme + '&_t_=' + new Date().getTime()
595
595
  let isHasLink = true
@@ -4,21 +4,25 @@ const iconList = [
4
4
  'amb-color-icon-XLSX',
5
5
  'amb-color-icon-DOC',
6
6
  'amb-color-icon-DOCX',
7
+ 'amb-color-icon-PPT',
7
8
  'amb-color-icon-PDF',
8
9
  'amb-color-icon-TXT',
9
10
  'amb-color-icon-JPG',
10
11
  'amb-color-icon-PNG',
11
12
  'amb-color-icon-ZIP',
12
- 'amb-color-icon-unknown'
13
+ 'amb-color-icon-AVI',
14
+ 'amb-color-icon-MP4',
15
+ 'amb-color-icon-qita'
13
16
  ]
14
17
  // 列表_5215278368.xls
15
18
  export function getFileIconByName(fileName: string): string {
19
+ const qitaIcon = 'amb-color-icon-qita'
16
20
  if (!fileName) {
17
- return 'amb-color-icon-unknown'
21
+ return qitaIcon
18
22
  }
19
23
  let fileType = fileName.substring(fileName.lastIndexOf('.') + 1) // 获取文件名
20
24
  if (!fileType) {
21
- return 'amb-color-icon-unknown'
25
+ return qitaIcon
22
26
  }
23
27
  switch (fileType) {
24
28
  case 'xlsx':
@@ -28,5 +32,9 @@ export function getFileIconByName(fileName: string): string {
28
32
  fileType = 'DOC'
29
33
  break
30
34
  }
31
- return 'amb-color-icon-' + fileType.toUpperCase()
35
+ const finalIconName = 'amb-color-icon-' + fileType.toUpperCase()
36
+ if (iconList.includes(finalIconName)) {
37
+ return finalIconName
38
+ }
39
+ return qitaIcon
32
40
  }
@@ -79,6 +79,7 @@ export function initialization(
79
79
  }
80
80
  return { visible: false }
81
81
  } else {
82
+ result.displayTextJudge = jumpPage.displayTextJudge
82
83
  if (jumpPage.displayTextJudge) {
83
84
  // 例如:${obj.menu_code}-#-#${input.---}-#-#${context.currentTransactor}
84
85
  const label = analysisValue(
@@ -5,7 +5,7 @@ import { getTotalPermissions, isDevpAccess } from './permissionAuth'
5
5
  * @param {String} permission 多个资源编码以逗号隔开
6
6
  * @returns {Boolean}
7
7
  */
8
- export default function checkPermission(permission) {
8
+ export default function checkPermission(permission, systemCode) {
9
9
  if (permission) {
10
10
  // 是否是预览项目时开发平台用户
11
11
  const isDevpPermission= isDevpAccess()
@@ -14,7 +14,7 @@ export default function checkPermission(permission) {
14
14
  return true
15
15
  }
16
16
  let hasPermission = false
17
- const storeCurrentUserPermissions = getTotalPermissions()
17
+ const storeCurrentUserPermissions = getTotalPermissions(systemCode)
18
18
  if (
19
19
  typeof storeCurrentUserPermissions !== 'undefined' &&
20
20
  storeCurrentUserPermissions !== null
@@ -26,7 +26,7 @@ export function getSystemCode() {
26
26
 
27
27
  export function getPermissions(systemCode) {
28
28
  let totalPermissions = null
29
- if(!systemCode){
29
+ if(!systemCode || systemCode+''==='null'){
30
30
  systemCode = getSystemCode()
31
31
  }
32
32
  let permissions = localStorage.getItem(permissionKey + systemCode)
@@ -50,7 +50,7 @@ export function getPermissions(systemCode) {
50
50
  return totalPermissions
51
51
  }
52
52
 
53
- export function getTotalPermissions() {
53
+ export function getTotalPermissions(systemCode) {
54
54
  const a = new Date().getTime()
55
55
  let runPermissionsObj
56
56
  const runPermissions = getSessionCache(_RUN_PERMISSION)
@@ -58,7 +58,9 @@ export function getTotalPermissions() {
58
58
  runPermissionsObj = JSON.parse(runPermissions)
59
59
  }
60
60
  let sysetemPermissionsObj
61
- const systemCode = getSystemCode()
61
+ if (!systemCode || systemCode+''==='null') {
62
+ systemCode = getSystemCode()
63
+ }
62
64
  const sysetemPermissions = localStorage.getItem(permissionKey + systemCode)
63
65
  if (sysetemPermissions) {
64
66
  sysetemPermissionsObj = JSON.parse(sysetemPermissions)
@@ -91,17 +93,19 @@ export function getTotalPermissions() {
91
93
  }
92
94
 
93
95
  export function setPermissions(permissions, systemCode) {
96
+ console.log('setPermissions==========systemCode=', systemCode,'isHasPlatPermission----permissions[0]=',permissions && permissions.length > 0 ?permissions[0]: null)
94
97
  const isMobile = isMobileBrowser()
95
98
  let key
96
99
  const permissionObjs = getPermissionObjs(permissions)
97
100
  if(isMobile){
98
101
  key = mobilePermissionKey
99
102
  } else {
100
- if (!systemCode) {
103
+ if (!systemCode || systemCode+''==='null') {
101
104
  systemCode = getSystemCode()
102
105
  }
103
106
  key = permissionKey + systemCode
104
107
  }
108
+ console.log('setPermissions==========systemCode=', systemCode,'key=',key)
105
109
  localStorage.setItem(key, JSON.stringify(permissionObjs))
106
110
  setPermissionAllSystemKey(key)
107
111
  return permissionObjs
@@ -121,7 +125,7 @@ function getPermissionObjs(permissions){
121
125
 
122
126
 
123
127
  export function getMenus(systemCode) {
124
- if (!systemCode) {
128
+ if (!systemCode || systemCode+''==='null') {
125
129
  systemCode = getSystemCode()
126
130
  }
127
131
  const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
@@ -136,7 +140,7 @@ export function getMenus(systemCode) {
136
140
 
137
141
  export function setMenus(menus, systemCode) {
138
142
  if (menus) {
139
- if (!systemCode) {
143
+ if (!systemCode || systemCode+''==='null') {
140
144
  systemCode = getSystemCode()
141
145
  }
142
146
  const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
@@ -148,7 +152,7 @@ export function setMenus(menus, systemCode) {
148
152
  }
149
153
 
150
154
  export function removeMenus(systemCode) {
151
- if (!systemCode) {
155
+ if (!systemCode || systemCode+''==='null') {
152
156
  systemCode = getSystemCode()
153
157
  }
154
158
  const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
package/src/utils/util.js CHANGED
@@ -620,6 +620,25 @@ function getAdditionalParamMap(pageContext) {
620
620
  }
621
621
  }
622
622
 
623
+ export function formatCustomParams(customParams, pageContext, row) {
624
+ const formatCustomParams = {}
625
+ if (customParams && customParams.length > 0) {
626
+ customParams.forEach((param) => {
627
+ if (param.paramValue && param.paramValue.indexOf('${') === 0) {
628
+ // 表示是动态变量
629
+ const dynamicValue = getPropValueNew(param.paramValue, pageContext, row)
630
+ if (dynamicValue !== undefined && dynamicValue !== null) {
631
+ formatCustomParams[param.paramName] = dynamicValue
632
+ } else {
633
+ formatCustomParams[param.paramName] = null
634
+ }
635
+ } else {
636
+ formatCustomParams[param.paramName] = param.paramValue
637
+ }
638
+ })
639
+ }
640
+ return formatCustomParams
641
+ }
623
642
  export function getPropValueNew(propValue, pageContext, row) {
624
643
  let value = null
625
644
  if (propValue && propValue !== null && propValue !== '') {
@@ -21,11 +21,16 @@ export default defineComponent({
21
21
  isRoot: {
22
22
  type: Boolean,
23
23
  default: false
24
+ },
25
+ menuLayer: {
26
+ type: Number,
27
+ default: null
24
28
  }
25
29
  },
26
30
  render(props) {
27
- const { title, hasChildren, isRoot } = props
31
+ const { title, hasChildren, isRoot} = props
28
32
  const icon = props.icon
33
+ const menuLayer = props.menuLayer
29
34
  const vnodes = []
30
35
  let iconsData = [h('i', { class: 'amb-iconfont amb-icon-meun_post' })]
31
36
  // let iconsData = [h('i', { class: 'amb-color-iconfont amb-color-icon-goal-jichuweihu super-icon' })]
@@ -41,12 +46,18 @@ export default defineComponent({
41
46
  // iconsData = [h('i', { class: icon + ' svg-icon' })]
42
47
  // }
43
48
  }
44
- vnodes.push(h('div', { class: ['smb-sidebar-menu-item-icon'] }, iconsData))
49
+ let titleClass = ['smb-sidebar-menu-item-title']
50
+ if(!menuLayer || menuLayer <= 2) {
51
+ vnodes.push(h('div', { class: ['smb-sidebar-menu-item-icon'] }, iconsData))
52
+ } else {
53
+ vnodes.push(h('div', { class: ['smb-sidebar-menu-item-no-icon'] }))
54
+ titleClass.push('smb-sidebar-menu-item-no-icon-title')
55
+ }
45
56
  if (title) {
46
57
  if (isRoot) {
47
58
  // 是否是根目录,没有子菜单时
48
59
  vnodes.push(
49
- h('div', { class: ['smb-sidebar-menu-item-title'] }, [
60
+ h('div', { class: titleClass }, [
50
61
  h(
51
62
  'div',
52
63
  {
@@ -59,7 +70,7 @@ export default defineComponent({
59
70
  } else {
60
71
  // 有子菜单时
61
72
  vnodes.push(
62
- h('div', { class: ['smb-sidebar-menu-item-title'] }, [
73
+ h('div', { class: titleClass }, [
63
74
  h(
64
75
  'div',
65
76
  {
@@ -77,8 +88,8 @@ export default defineComponent({
77
88
  </script>
78
89
 
79
90
  <style lang="scss" scoped>
80
- .super-icon {
81
- width: 16px;
82
- height: 16px;
91
+ :deep(.super-icon) {
92
+ width: 20px !important;
93
+ height: 20px !important;
83
94
  }
84
95
  </style>
@@ -7,7 +7,7 @@
7
7
  class="smb-sidebar-menu-item"
8
8
  :class="{ 'submenu-title-noDropdown': !isNest }"
9
9
  >
10
- <item :icon="item.iconName" :title="getI18nName(item)" :is-root="true" />
10
+ <item :menu-layer="item.layer" :icon="item.iconName" :title="getI18nName(item)" :is-root="true" />
11
11
  </el-menu-item>
12
12
  </app-link>
13
13
  </template>
@@ -22,6 +22,7 @@
22
22
  >
23
23
  <template v-slot:title>
24
24
  <item
25
+ :menu-layer="item.layer"
25
26
  :icon="item.iconName"
26
27
  :title="getI18nName(item)"
27
28
  :has-children="item.children.length > 0 ? true : false"
@@ -37,7 +38,7 @@
37
38
  />
38
39
  <app-link v-else :to="toPath(child)" @click="clickMenu(toPath(child))">
39
40
  <el-menu-item :index="resolvePath(child.code, child.path, child.pageType, child.newPage)" class="smb-sidebar-menu-item">
40
- <item :icon="child.iconName" :title="getI18nName(child)" />
41
+ <item :menu-layer="child.layer" :icon="child.iconName" :title="getI18nName(child)" />
41
42
  </el-menu-item>
42
43
  </app-link>
43
44
  </template>
@@ -213,6 +214,10 @@ export default {
213
214
  width: var(--admin-layout-left-menu-collapse, 54px);
214
215
  font-size: 16px;
215
216
  }
217
+
218
+ :deep(.smb-sidebar-menu-item-no-icon) {
219
+ width: 20px;
220
+ }
216
221
  :deep(.smb-sidebar-menu-item-title) {
217
222
  flex: 0 0 calc(100% - var(--admin-layout-left-menu-collapse, 54px) - 35px);
218
223
  overflow: hidden;
@@ -226,6 +231,9 @@ export default {
226
231
  text-overflow: ellipsis;
227
232
  }
228
233
  }
234
+ :deep(.smb-sidebar-menu-item-no-icon-title) {
235
+ flex: 0 0 calc(100% - 20px - 20px);
236
+ }
229
237
  }
230
238
  </style>
231
239
 
@@ -71,11 +71,9 @@ export default {
71
71
  this.firstLeafMenu.pageType === 'iframe'
72
72
  ) {
73
73
  const iframeSrc = this.firstLeafMenu.fullPath
74
- const path = this.firstLeafMenu.path
75
74
  const query = {
76
75
  src: iframeSrc,
77
76
  customSystem: this.systemCode,
78
- path: path,
79
77
  _menuCode: this.firstLeafMenu.code,
80
78
  _menuName: getI18nName(this.firstLeafMenu),
81
79
  isNewPage: this.firstLeafMenu.newPage
@@ -30,23 +30,34 @@ export default defineComponent({
30
30
  backlogTotal: {
31
31
  type: Number,
32
32
  default: 0
33
+ },
34
+ menuLayer: {
35
+ type: Number,
36
+ default: null
33
37
  }
34
38
  },
35
39
  render(props) {
36
40
  const { title, hasChildren, isRoot, code, backlogTotal } = props
37
41
  const icon = props.icon
42
+ const menuLayer = props.menuLayer
38
43
  const vnodes = []
39
44
  // let iconsData = [h(SvgIcon,{'icon-class': 'meun_post' })]
40
45
  let iconsData = [h('i', { class: 'amb-iconfont amb-icon-meun_post' })]
41
46
  if (icon) {
42
47
  iconsData = [h(SuperIcon, { iconValue: icon })]
43
48
  }
44
- vnodes.push(h('div', { class: ['smb-sidebar-menu-item-icon'] }, iconsData))
49
+ let titleClass = ['smb-sidebar-menu-item-title']
50
+ if(!menuLayer || menuLayer <= 2) {
51
+ vnodes.push(h('div', { class: ['smb-sidebar-menu-item-icon'] }, iconsData))
52
+ } else {
53
+ vnodes.push(h('div', { class: ['smb-sidebar-menu-item-no-icon'] }))
54
+ titleClass.push('smb-sidebar-menu-item-no-icon-title')
55
+ }
45
56
  if (title) {
46
57
  if (isRoot) {
47
58
  // 是否是根目录,没有子菜单时
48
59
  vnodes.push(
49
- h('div', { class: ['smb-sidebar-menu-item-title'] }, [
60
+ h('div', { class: titleClass }, [
50
61
  h(
51
62
  'div',
52
63
  {
@@ -59,7 +70,7 @@ export default defineComponent({
59
70
  } else if (code === 'undoneTask') {
60
71
  // 有子菜单时
61
72
  vnodes.push(
62
- h('div', { class: ['smb-sidebar-menu-item-title'] }, [
73
+ h('div', { class: titleClass }, [
63
74
  h(
64
75
  'div',
65
76
  {
@@ -88,3 +99,9 @@ export default defineComponent({
88
99
  }
89
100
  })
90
101
  </script>
102
+ <style lang="scss" scoped>
103
+ :deep(.super-icon) {
104
+ width: 20px !important;
105
+ height: 20px !important;
106
+ }
107
+ </style>