agilebuilder-ui 1.1.38 → 1.1.39-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.
- package/lib/{401-d4103b15.js → 401-994c9198.js} +1 -1
- package/lib/{404-bbbf1615.js → 404-529e9d04.js} +1 -1
- package/lib/{iframe-page-eeb30592.js → iframe-page-8416d7e7.js} +1 -1
- package/lib/{index-93dc7bbc.js → index-f2020c47.js} +13764 -13655
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +82 -79
- package/lib/{tab-content-iframe-index-82db069a.js → tab-content-iframe-index-b9c23a8b.js} +1 -1
- package/lib/{tab-content-index-06291a81.js → tab-content-index-289ae3af.js} +22 -22
- package/lib/{tache-subprocess-history-661219ec.js → tache-subprocess-history-3ad4baa1.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +3 -1
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +5 -1
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +2 -1
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -1
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +3 -1
- package/packages/fs-preview/src/fs-preview.vue +44 -7
- package/packages/fs-upload-list/src/fs-upload-list.vue +50 -24
- package/packages/fs-upload-new/src/fs-button-upload.vue +12 -0
- package/packages/fs-upload-new/src/fs-drag-upload.vue +12 -0
- package/packages/fs-upload-new/src/fs-preview-new.vue +24 -5
- package/packages/fs-upload-new/src/fs-upload-new.vue +20 -0
- package/packages/organization-input/src/organization-input.vue +3 -3
- package/packages/super-grid/src/components/mobile-table-card.jsx +0 -1
- package/packages/super-grid/src/custom-formatter.js +1 -1
- package/packages/super-grid/src/dynamic-input.vue +16 -22
- package/packages/super-grid/src/normal-column-content.vue +25 -13
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/search-form-item.vue +75 -17
- package/packages/super-grid/src/search-form-mobile.vue +5 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +5 -0
- package/packages/super-grid/src/search-methods.js +3 -1
- package/packages/utils/organization.ts +56 -40
- package/packages/workflow-history-list/src/workflow-history-list.vue +41 -3
- package/src/api/sso-service.js +2 -1
- package/src/directives/permission/permission.js +7 -1
- package/src/i18n/langs/cn.js +10 -3
- package/src/i18n/langs/en.js +10 -3
- package/src/permission.js +2 -1
- package/src/store/modules/user.js +4 -1
- package/src/utils/common-util.js +1 -1
- package/src/utils/file-util.ts +12 -4
- package/src/utils/jump-page-utils.js +1 -0
- package/src/utils/permission.js +2 -2
- package/src/utils/permissionAuth.js +11 -7
- package/src/utils/util.js +19 -0
- package/src/views/dsc-component/Sidebar/Item.vue +18 -7
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +10 -2
- package/src/views/dsc-component/Sidebar/index.vue +0 -2
- package/src/views/layout/components/Menubar/Item.vue +20 -3
- package/src/views/layout/components/Menubar/SidebarItem.vue +46 -18
- package/vite.config.js +1 -2
package/src/api/sso-service.js
CHANGED
|
@@ -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 (
|
|
17
|
+
if (permissionCodes !== 'true' && !checkPermission(permissionCodes, systemCode)) {
|
|
12
18
|
el.parentNode && el.parentNode.removeChild(el)
|
|
13
19
|
}
|
|
14
20
|
} else {
|
package/src/i18n/langs/cn.js
CHANGED
|
@@ -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: '接口调用超时',
|
package/src/i18n/langs/en.js
CHANGED
|
@@ -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('
|
|
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
|
|
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
|
})
|
package/src/utils/common-util.js
CHANGED
|
@@ -589,7 +589,7 @@ export function loadCSS() {
|
|
|
589
589
|
console.error('皮肤主题为空!')
|
|
590
590
|
return
|
|
591
591
|
}
|
|
592
|
-
const 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
|
package/src/utils/file-util.ts
CHANGED
|
@@ -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-
|
|
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
|
|
21
|
+
return qitaIcon
|
|
18
22
|
}
|
|
19
23
|
let fileType = fileName.substring(fileName.lastIndexOf('.') + 1) // 获取文件名
|
|
20
24
|
if (!fileType) {
|
|
21
|
-
return
|
|
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
|
-
|
|
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(
|
package/src/utils/permission.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
82
|
-
height:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:class="{ 'submenu-title-noDropdown': !isNest }"
|
|
9
9
|
>
|
|
10
10
|
<item
|
|
11
|
+
:menu-layer="item.layer"
|
|
11
12
|
:icon="item.iconName"
|
|
12
13
|
:title="getI18nName(item)"
|
|
13
14
|
:is-root="true"
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
<el-sub-menu v-else :index="item.code + '~~' + item.i18nValue" class="smb-sidebar-menu-item">
|
|
20
21
|
<template v-slot:title>
|
|
21
22
|
<item
|
|
23
|
+
:menu-layer="item.layer"
|
|
22
24
|
:icon="item.iconName"
|
|
23
25
|
:title="getI18nName(item)"
|
|
24
26
|
:has-children="item.children.length > 0 ? true : false"
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
/>
|
|
36
38
|
<app-link :key="child.code" v-else :to="toPath(child)" @click="clickMenu(toPath(child))">
|
|
37
39
|
<el-menu-item :index="child.code + '~~' + child.i18nValue" class="smb-sidebar-menu-item">
|
|
38
|
-
<item :backlog-total="backlogTotal" :code="child.code" :icon="child.iconName" :title="getI18nName(child)" />
|
|
40
|
+
<item :menu-layer="child.layer" :backlog-total="backlogTotal" :code="child.code" :icon="child.iconName" :title="getI18nName(child)" />
|
|
39
41
|
</el-menu-item>
|
|
40
42
|
</app-link>
|
|
41
43
|
</template>
|
|
@@ -51,6 +53,7 @@ import { getI18nName } from "../../../../utils/menu";
|
|
|
51
53
|
import tabJs from "../../../../api/tab";
|
|
52
54
|
import { getSystemCode } from "../../../../utils/permissionAuth";
|
|
53
55
|
import authApi from "../../../../utils/auth-api";
|
|
56
|
+
import { getSystemFrontendUrl } from '../../../../utils/common-util';
|
|
54
57
|
|
|
55
58
|
export default {
|
|
56
59
|
name: "SidebarItem",
|
|
@@ -155,7 +158,22 @@ export default {
|
|
|
155
158
|
toPathObj.query.customSystem = getSystemCode();
|
|
156
159
|
toPathObj.query._menuCode = menu.code;
|
|
157
160
|
toPathObj.query._menuName = getI18nName(menu);
|
|
158
|
-
} else {
|
|
161
|
+
} else if(menu.openWay && menu.openWay === 'NEW_PAGE_OPEN'){
|
|
162
|
+
// 新页签打开菜单时
|
|
163
|
+
routePath = menu.fullPath
|
|
164
|
+
if(routePath.indexOf('http:') < 0 && routePath.indexOf('https:') < 0){
|
|
165
|
+
// 表示不是全路径
|
|
166
|
+
let frontUrl = getSystemFrontendUrl(window.$vueApp.config.globalProperties.frontUrl)
|
|
167
|
+
if(frontUrl.lastIndexOf("/") < frontUrl.length -1 ){
|
|
168
|
+
// 表示最后不是斜线结尾的,需要添加斜线结尾
|
|
169
|
+
frontUrl = frontUrl + '/'
|
|
170
|
+
}
|
|
171
|
+
routePath = frontUrl + "#" + routePath
|
|
172
|
+
}
|
|
173
|
+
toPathObj.query = {}
|
|
174
|
+
toPathObj.query._menuCode = menu.code;
|
|
175
|
+
toPathObj.path=routePath
|
|
176
|
+
}else{
|
|
159
177
|
routePath = menu.fullPath;
|
|
160
178
|
if(!routePath) {
|
|
161
179
|
routePath = ''
|
|
@@ -215,26 +233,30 @@ export default {
|
|
|
215
233
|
clickMenu(toPathObj) {
|
|
216
234
|
if (
|
|
217
235
|
toPathObj.openWay &&
|
|
218
|
-
toPathObj.openWay === "NEW_PAGE_OPEN"
|
|
219
|
-
toPathObj.query
|
|
236
|
+
toPathObj.openWay === "NEW_PAGE_OPEN"
|
|
220
237
|
) {
|
|
221
238
|
// 新页签打开菜单
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
url
|
|
239
|
+
if(toPathObj.query && toPathObj.query.src){
|
|
240
|
+
let url = toPathObj.query.src;
|
|
241
|
+
if (url && url.indexOf("?") > 0) {
|
|
242
|
+
url += "&";
|
|
243
|
+
} else {
|
|
244
|
+
url += "?";
|
|
245
|
+
}
|
|
246
|
+
if (toPathObj.query.customSystem) {
|
|
247
|
+
url += "customSystem=" + toPathObj.query.customSystem;
|
|
248
|
+
}
|
|
249
|
+
if (toPathObj.query._menuCode) {
|
|
250
|
+
url += "_menuCode=" + toPathObj.query._menuCode;
|
|
251
|
+
}
|
|
252
|
+
if (toPathObj.query._menuCode) {
|
|
253
|
+
url += "_menuName=" + toPathObj.query._menuName;
|
|
254
|
+
}
|
|
255
|
+
window.open(url, toPathObj.query._menuCode)
|
|
225
256
|
} else {
|
|
226
|
-
url
|
|
227
|
-
|
|
228
|
-
if (toPathObj.query.customSystem) {
|
|
229
|
-
url += "customSystem=" + toPathObj.query.customSystem;
|
|
230
|
-
}
|
|
231
|
-
if (toPathObj.query._menuCode) {
|
|
232
|
-
url += "_menuCode=" + toPathObj.query._menuCode;
|
|
257
|
+
const url = toPathObj.path;
|
|
258
|
+
window.open(url, toPathObj.query._menuCode)
|
|
233
259
|
}
|
|
234
|
-
if (toPathObj.query._menuCode) {
|
|
235
|
-
url += "_menuName=" + toPathObj.query._menuName;
|
|
236
|
-
}
|
|
237
|
-
window.open(url, toPathObj.query._menuCode);
|
|
238
260
|
} else {
|
|
239
261
|
// 刷新页签打开菜单
|
|
240
262
|
this.addTabs(
|
|
@@ -275,6 +297,9 @@ export default {
|
|
|
275
297
|
width: var(--admin-layout-left-menu-collapse, 54px);
|
|
276
298
|
font-size: 16px;
|
|
277
299
|
}
|
|
300
|
+
:deep(.smb-sidebar-menu-item-no-icon) {
|
|
301
|
+
width: 20px;
|
|
302
|
+
}
|
|
278
303
|
:deep(.smb-sidebar-menu-item-title) {
|
|
279
304
|
flex: 0 0 calc(100% - var(--admin-layout-left-menu-collapse, 54px) - 35px);
|
|
280
305
|
overflow: hidden;
|
|
@@ -288,5 +313,8 @@ export default {
|
|
|
288
313
|
text-overflow: ellipsis;
|
|
289
314
|
}
|
|
290
315
|
}
|
|
316
|
+
:deep(.smb-sidebar-menu-item-no-icon-title) {
|
|
317
|
+
flex: 0 0 calc(100% - 20px - 20px);
|
|
318
|
+
}
|
|
291
319
|
}
|
|
292
320
|
</style>
|
package/vite.config.js
CHANGED
|
@@ -12,8 +12,7 @@ export default defineConfig(({ mode }) => ({
|
|
|
12
12
|
terser({
|
|
13
13
|
compress: {
|
|
14
14
|
drop_debugger: ['production'].includes(mode),
|
|
15
|
-
//
|
|
16
|
-
pure_funcs: ['production'].includes(mode) ? ['console.log', 'console.info', 'console.warn', 'console.debug'] : [],
|
|
15
|
+
// pure_funcs: ['production'].includes(mode) ? ['console.log', 'console.info', 'console.warn', 'console.debug'] : [],
|
|
17
16
|
},
|
|
18
17
|
output: {
|
|
19
18
|
// 对于console.error,不做任何处理
|