agilebuilder-ui 1.1.37 → 1.1.38-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-9314ce87.js → 401-00dc5c6a.js} +1 -1
- package/lib/{404-572d631d.js → 404-da4b5e44.js} +1 -1
- package/lib/{iframe-page-87c9c0d0.js → iframe-page-9211c46a.js} +1 -1
- package/lib/{index-79b98485.js → index-398aaf91.js} +8956 -8827
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +76 -73
- package/lib/{tab-content-iframe-index-070ce653.js → tab-content-iframe-index-2a5e10d0.js} +1 -1
- package/lib/{tab-content-index-3b98efb4.js → tab-content-index-b4e908df.js} +22 -22
- package/lib/{tache-subprocess-history-46442012.js → tache-subprocess-history-b4622487.js} +1 -1
- package/package.json +1 -1
- 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 +25 -5
- package/packages/fs-upload-new/src/fs-upload-new.vue +20 -0
- package/packages/super-grid/src/apis.js +4 -0
- package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
- package/packages/super-grid/src/dynamic-input.vue +48 -25
- package/packages/super-grid/src/formValidatorUtil.js +7 -2
- package/packages/super-grid/src/normal-column-content.vue +9 -1
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/search-form-item.vue +461 -461
- package/packages/super-grid/src/super-grid.vue +22 -3
- package/packages/super-grid/src/utils.js +16 -2
- package/packages/utils/value-set.js +25 -33
- package/src/api/sso-service.js +2 -1
- package/src/permission.js +2 -1
- package/src/store/modules/user.js +4 -1
- package/src/utils/common-util.js +1 -0
- package/src/utils/permissionAuth.js +7 -5
- package/src/utils/util.js +16 -0
- package/src/views/dsc-component/Sidebar/Item.vue +15 -4
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +10 -2
- package/src/views/layout/components/Menubar/Item.vue +14 -3
- package/src/views/layout/components/Menubar/SidebarItem.vue +9 -1
- package/vite.config.js +1 -2
|
@@ -210,7 +210,8 @@ import {
|
|
|
210
210
|
isEditOptionFunction,
|
|
211
211
|
isHasEditOption,
|
|
212
212
|
isHasOptionFunction,
|
|
213
|
-
isObjectValueEqual
|
|
213
|
+
isObjectValueEqual,
|
|
214
|
+
rowBeforeValidate
|
|
214
215
|
} from './utils'
|
|
215
216
|
import Sortable from 'sortablejs'
|
|
216
217
|
import store from './store'
|
|
@@ -2775,10 +2776,28 @@ export default {
|
|
|
2775
2776
|
gridData = this.subTableData
|
|
2776
2777
|
}
|
|
2777
2778
|
if (gridData && gridData.length > 0) {
|
|
2779
|
+
const gridParams = store.get(this.code)
|
|
2780
|
+
const customRules = gridParams.options.customRules
|
|
2778
2781
|
const pageSize = this.pagination && this.pagination.pageSize
|
|
2779
2782
|
const validateRules = formValidatorService.getValidator(this.code)
|
|
2780
2783
|
for (let i = 0; i < gridData.length; i++) {
|
|
2781
2784
|
const row = gridData[i]
|
|
2785
|
+
let rules = validateRules
|
|
2786
|
+
if (customRules) {
|
|
2787
|
+
const propNames = Object.keys(customRules)
|
|
2788
|
+
if (propNames.length > 0) {
|
|
2789
|
+
// 遍历customRules,判断customRules的规则是否有beforeValidate
|
|
2790
|
+
for (const propName of propNames) {
|
|
2791
|
+
if (customRules[propName].beforeValidate) {
|
|
2792
|
+
const result = rowBeforeValidate(customRules[propName], gridParams, row)
|
|
2793
|
+
if (result === false && rules[propName]) {
|
|
2794
|
+
rules = JSON.parse(JSON.stringify(validateRules))
|
|
2795
|
+
rules[propName] = []
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2782
2801
|
// 取消最后一个编辑行的状态
|
|
2783
2802
|
if (row.$editing !== undefined && row.$editing === true) {
|
|
2784
2803
|
setEntityFieldValue(row, '$editing', false)
|
|
@@ -2788,7 +2807,7 @@ export default {
|
|
|
2788
2807
|
let needValidate = true
|
|
2789
2808
|
if (isHasEditOption('isEnableValidate', this.code)) {
|
|
2790
2809
|
// 表示配置了是否启用必填验证
|
|
2791
|
-
needValidate =
|
|
2810
|
+
needValidate = gridParams.options.lineEditOptions['isEnableValidate']
|
|
2792
2811
|
}
|
|
2793
2812
|
let validateResult = true
|
|
2794
2813
|
if (needValidate === true) {
|
|
@@ -2803,7 +2822,7 @@ export default {
|
|
|
2803
2822
|
row,
|
|
2804
2823
|
this.code,
|
|
2805
2824
|
i,
|
|
2806
|
-
|
|
2825
|
+
rules,
|
|
2807
2826
|
this.isSubTableShowPage,
|
|
2808
2827
|
pageNum,
|
|
2809
2828
|
pageRowIndex
|
|
@@ -205,7 +205,7 @@ function getEntityId(row) {
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
// 行编辑时,是否有权限编辑某字段
|
|
208
|
-
export function isDisableEdit(prop, listCode, row) {
|
|
208
|
+
export function isDisableEdit(prop, listCode, row, rowIndex) {
|
|
209
209
|
if (!listCode) {
|
|
210
210
|
listCode = store.get('_list_code')
|
|
211
211
|
}
|
|
@@ -271,7 +271,11 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
271
271
|
const columnRules = gridParams.options.customRules[prop]
|
|
272
272
|
? gridParams.options.customRules[prop]
|
|
273
273
|
: gridParams.options.customRules['_all_fields']
|
|
274
|
-
|
|
274
|
+
let beforeValidateResult = true
|
|
275
|
+
// if (columnRules.beforeValidate) {
|
|
276
|
+
// beforeValidateResult = rowBeforeValidate(columnRules, gridParams, row, rowIndex)
|
|
277
|
+
// }
|
|
278
|
+
if (columnRules && columnRules.disabled && beforeValidateResult !== false) {
|
|
275
279
|
isDiabled = true
|
|
276
280
|
}
|
|
277
281
|
}
|
|
@@ -280,6 +284,16 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
280
284
|
return isDiabled
|
|
281
285
|
}
|
|
282
286
|
|
|
287
|
+
export function rowBeforeValidate(columnRules, gridParams, row) {
|
|
288
|
+
const params = {
|
|
289
|
+
parent: gridParams.options.extraParam.entityMap,
|
|
290
|
+
row: row,
|
|
291
|
+
pageContext: gridParams.options.pageContext,
|
|
292
|
+
configure: gridParams.options.configureObj
|
|
293
|
+
}
|
|
294
|
+
return columnRules.beforeValidate(params)
|
|
295
|
+
}
|
|
296
|
+
|
|
283
297
|
// 行编辑时,是否必填某字段, 如果是流程表单子表, 需要将列表管理里配置的必填字段去掉,使用流程内的子表编辑权限控制
|
|
284
298
|
export function isRequiredEdit(column, listCode) {
|
|
285
299
|
const prop = column.prop
|
|
@@ -17,7 +17,7 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
const valueSetColumnsInfo = {
|
|
19
19
|
listCode: listCode,
|
|
20
|
-
valueSetMetas: []
|
|
20
|
+
valueSetMetas: []
|
|
21
21
|
}
|
|
22
22
|
const valueSetColumnIndexs = []
|
|
23
23
|
for (let i = 0; i < columns.length; i++) {
|
|
@@ -27,13 +27,11 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
27
27
|
let titleValueSet = null
|
|
28
28
|
const titleValueSetJson = column.titleValueSet
|
|
29
29
|
if (titleValueSetJson) {
|
|
30
|
-
titleValueSet = packageEnumAndBeanColumnValueSet(
|
|
31
|
-
JSON.parse(titleValueSetJson)
|
|
32
|
-
)
|
|
30
|
+
titleValueSet = packageEnumAndBeanColumnValueSet(JSON.parse(titleValueSetJson))
|
|
33
31
|
}
|
|
34
32
|
if (columnValueSet || titleValueSet) {
|
|
35
33
|
const valueSetMeta = {
|
|
36
|
-
prop: prop
|
|
34
|
+
prop: prop
|
|
37
35
|
}
|
|
38
36
|
if (columnValueSet) {
|
|
39
37
|
// 字段的值设置
|
|
@@ -48,17 +46,11 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
48
46
|
}
|
|
49
47
|
if (valueSetColumnsInfo.valueSetMetas.length > 0) {
|
|
50
48
|
window.$vueApp.config.globalProperties.$http
|
|
51
|
-
.post(
|
|
52
|
-
window.$vueApp.config.globalProperties.baseURL +
|
|
53
|
-
'/common/super-grids/value-sets',
|
|
54
|
-
valueSetColumnsInfo
|
|
55
|
-
)
|
|
49
|
+
.post(window.$vueApp.config.globalProperties.baseURL + '/common/super-grids/value-sets', valueSetColumnsInfo)
|
|
56
50
|
.then((columnValueSets) => {
|
|
57
51
|
valueSetColumnIndexs.forEach((columnIndex) => {
|
|
58
52
|
let valueSetMap
|
|
59
|
-
const prop = columns[columnIndex].prop
|
|
60
|
-
? columns[columnIndex].prop
|
|
61
|
-
: columns[columnIndex].label
|
|
53
|
+
const prop = columns[columnIndex].prop ? columns[columnIndex].prop : columns[columnIndex].label
|
|
62
54
|
for (const prop1 in columnValueSets) {
|
|
63
55
|
if (prop === prop1) {
|
|
64
56
|
valueSetMap = columnValueSets[prop]
|
|
@@ -70,8 +62,7 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
70
62
|
columns[columnIndex].valueSet = valueSetMap.valueSet
|
|
71
63
|
}
|
|
72
64
|
if (valueSetMap.titleValueSet) {
|
|
73
|
-
columns[columnIndex].titleValueSetValue =
|
|
74
|
-
valueSetMap.titleValueSet
|
|
65
|
+
columns[columnIndex].titleValueSetValue = valueSetMap.titleValueSet
|
|
75
66
|
}
|
|
76
67
|
}
|
|
77
68
|
})
|
|
@@ -111,7 +102,7 @@ function packageEnumAndBeanColumnValueSet(valueSetInfo) {
|
|
|
111
102
|
* 封装值设置为枚举 或 bean方式时的值为'key-value'键值对信息
|
|
112
103
|
*/
|
|
113
104
|
function packageEnumAndBeanColumnValueSetsWhenOtherSys(columns, listCode, additionalParamMap, entity, systemCode) {
|
|
114
|
-
return new Promise((resolve, reject) => {
|
|
105
|
+
return new Promise((resolve, reject) => {
|
|
115
106
|
const dataSourceList = getDataSourceConfigList(columns)
|
|
116
107
|
const valueSetColumnIndexs = dataSourceList.valueSetColumnIndexs
|
|
117
108
|
const param = {
|
|
@@ -129,7 +120,7 @@ function packageEnumAndBeanColumnValueSetsWhenOtherSys(columns, listCode, additi
|
|
|
129
120
|
.then((result) => {
|
|
130
121
|
const columnValueSet = result.columnValueSet
|
|
131
122
|
const columnTitleValueSet = result.columnTitleValueSet
|
|
132
|
-
for(let prop in valueSetColumnIndexs){
|
|
123
|
+
for (let prop in valueSetColumnIndexs) {
|
|
133
124
|
const columnIndex = valueSetColumnIndexs[prop]
|
|
134
125
|
const valueSet = columnValueSet[prop]
|
|
135
126
|
if (valueSet) {
|
|
@@ -175,7 +166,7 @@ function getDataSourceConfigList(columns) {
|
|
|
175
166
|
valueSetColumnIndexs[prop] = i
|
|
176
167
|
}
|
|
177
168
|
}
|
|
178
|
-
return {dataSourceConfigList, dataSourceConfigListTitle, valueSetColumnIndexs}
|
|
169
|
+
return { dataSourceConfigList, dataSourceConfigListTitle, valueSetColumnIndexs }
|
|
179
170
|
}
|
|
180
171
|
|
|
181
172
|
function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
@@ -203,41 +194,42 @@ function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
|
203
194
|
}
|
|
204
195
|
}
|
|
205
196
|
} else if (beanName && beanName !== '') {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}else if(column && column.valueSetOptions) {
|
|
212
|
-
//
|
|
197
|
+
infoObj.type = 'beanName'
|
|
198
|
+
infoObj.props = {
|
|
199
|
+
prop: prop,
|
|
200
|
+
valueSet: BEAN_NAME_PREFIX + beanName
|
|
201
|
+
}
|
|
202
|
+
} else if (column && column.valueSetOptions) {
|
|
203
|
+
// 动态数据源(select开启value-label自动转换或者)、数据表/视图、服务
|
|
213
204
|
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
214
|
-
if(
|
|
205
|
+
if (
|
|
206
|
+
(valueSetOptionsObj.type || valueSetOptionsObj.dynamicDataSourceCode) &&
|
|
207
|
+
(column.componentType === 'radio' || column.componentType === 'checkbox' || valueSetOptionsObj.valueLabelSwitch)
|
|
208
|
+
) {
|
|
215
209
|
// 表示是动态数据源等值设置信息
|
|
216
210
|
// const isShouldInitSearch = (valueSetOptionsObj.filterType === undefined || valueSetOptionsObj.filterType != 'remote')
|
|
217
|
-
if(!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup'){
|
|
211
|
+
if (!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup') {
|
|
218
212
|
// 选项组时不需要在此处获得
|
|
219
213
|
Object.assign(infoObj, valueSetOptionsObj)
|
|
220
214
|
// 更新uuid为字段名
|
|
221
215
|
infoObj.uuid = prop
|
|
222
|
-
if(!infoObj.props){
|
|
216
|
+
if (!infoObj.props) {
|
|
223
217
|
infoObj.props = {}
|
|
224
218
|
}
|
|
225
219
|
infoObj.props.prop = prop
|
|
226
220
|
}
|
|
227
|
-
if(valueSetOptionsObj.dynamicDataSourceCode){
|
|
221
|
+
if (valueSetOptionsObj.dynamicDataSourceCode) {
|
|
228
222
|
infoObj.type = 'dynamicData'
|
|
229
|
-
if(!infoObj.props){
|
|
223
|
+
if (!infoObj.props) {
|
|
230
224
|
infoObj.props = {}
|
|
231
225
|
}
|
|
232
226
|
infoObj.props.code = valueSetOptionsObj.dynamicDataSourceCode
|
|
233
227
|
}
|
|
234
228
|
}
|
|
235
229
|
}
|
|
236
|
-
if(infoObj.type){
|
|
230
|
+
if (infoObj.type) {
|
|
237
231
|
// 表示是有效的值设置
|
|
238
232
|
return infoObj
|
|
239
233
|
}
|
|
240
234
|
return null
|
|
241
235
|
}
|
|
242
|
-
|
|
243
|
-
|
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=' +
|
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
|
@@ -243,6 +243,7 @@ export function getServerConfigUtil(http) {
|
|
|
243
243
|
window.$vueApp.config.globalProperties.baseAPI
|
|
244
244
|
)
|
|
245
245
|
localStorage.setItem('_baseAPI_', window.$vueApp.config.globalProperties.baseAPI)
|
|
246
|
+
localStorage.setItem('_amb_projectModel_', window.$vueApp.config.globalProperties.projectModel)
|
|
246
247
|
if (config.fontIconAddress && window.insertCssFile) {
|
|
247
248
|
window.insertCssFile(`${config.fontIconAddress}/iconfont.css`)
|
|
248
249
|
}
|
|
@@ -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)
|
|
@@ -91,17 +91,19 @@ export function getTotalPermissions() {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
export function setPermissions(permissions, systemCode) {
|
|
94
|
+
console.log('setPermissions==========systemCode=', systemCode,'isHasPlatPermission----permissions[0]=',permissions && permissions.length > 0 ?permissions[0]: null)
|
|
94
95
|
const isMobile = isMobileBrowser()
|
|
95
96
|
let key
|
|
96
97
|
const permissionObjs = getPermissionObjs(permissions)
|
|
97
98
|
if(isMobile){
|
|
98
99
|
key = mobilePermissionKey
|
|
99
100
|
} else {
|
|
100
|
-
if (!systemCode) {
|
|
101
|
+
if (!systemCode || systemCode+''==='null') {
|
|
101
102
|
systemCode = getSystemCode()
|
|
102
103
|
}
|
|
103
104
|
key = permissionKey + systemCode
|
|
104
105
|
}
|
|
106
|
+
console.log('setPermissions==========systemCode=', systemCode,'key=',key)
|
|
105
107
|
localStorage.setItem(key, JSON.stringify(permissionObjs))
|
|
106
108
|
setPermissionAllSystemKey(key)
|
|
107
109
|
return permissionObjs
|
|
@@ -121,7 +123,7 @@ function getPermissionObjs(permissions){
|
|
|
121
123
|
|
|
122
124
|
|
|
123
125
|
export function getMenus(systemCode) {
|
|
124
|
-
if (!systemCode) {
|
|
126
|
+
if (!systemCode || systemCode+''==='null') {
|
|
125
127
|
systemCode = getSystemCode()
|
|
126
128
|
}
|
|
127
129
|
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
|
@@ -136,7 +138,7 @@ export function getMenus(systemCode) {
|
|
|
136
138
|
|
|
137
139
|
export function setMenus(menus, systemCode) {
|
|
138
140
|
if (menus) {
|
|
139
|
-
if (!systemCode) {
|
|
141
|
+
if (!systemCode || systemCode+''==='null') {
|
|
140
142
|
systemCode = getSystemCode()
|
|
141
143
|
}
|
|
142
144
|
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
|
@@ -148,7 +150,7 @@ export function setMenus(menus, systemCode) {
|
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
export function removeMenus(systemCode) {
|
|
151
|
-
if (!systemCode) {
|
|
153
|
+
if (!systemCode || systemCode+''==='null') {
|
|
152
154
|
systemCode = getSystemCode()
|
|
153
155
|
}
|
|
154
156
|
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
package/src/utils/util.js
CHANGED
|
@@ -620,6 +620,22 @@ function getAdditionalParamMap(pageContext) {
|
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
|
|
623
|
+
export function formatCustomParams(customParams, pageContext, row) {
|
|
624
|
+
if (customParams && customParams.length > 0) {
|
|
625
|
+
customParams.forEach((param) => {
|
|
626
|
+
if (param.paramValue && param.paramValue.indexOf('${') === 0) {
|
|
627
|
+
// 表示是动态变量
|
|
628
|
+
const dynamicValue = getPropValueNew(param.paramValue, pageContext, row)
|
|
629
|
+
if (dynamicValue !== undefined && dynamicValue !== null) {
|
|
630
|
+
param.paramValue = dynamicValue
|
|
631
|
+
} else {
|
|
632
|
+
param.paramValue = null
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
})
|
|
636
|
+
}
|
|
637
|
+
return customParams
|
|
638
|
+
}
|
|
623
639
|
export function getPropValueNew(propValue, pageContext, row) {
|
|
624
640
|
let value = null
|
|
625
641
|
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
|
{
|
|
@@ -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
|
|
|
@@ -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
|
{
|
|
@@ -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>
|
|
@@ -275,6 +277,9 @@ export default {
|
|
|
275
277
|
width: var(--admin-layout-left-menu-collapse, 54px);
|
|
276
278
|
font-size: 16px;
|
|
277
279
|
}
|
|
280
|
+
:deep(.smb-sidebar-menu-item-no-icon) {
|
|
281
|
+
width: 20px;
|
|
282
|
+
}
|
|
278
283
|
:deep(.smb-sidebar-menu-item-title) {
|
|
279
284
|
flex: 0 0 calc(100% - var(--admin-layout-left-menu-collapse, 54px) - 35px);
|
|
280
285
|
overflow: hidden;
|
|
@@ -288,5 +293,8 @@ export default {
|
|
|
288
293
|
text-overflow: ellipsis;
|
|
289
294
|
}
|
|
290
295
|
}
|
|
296
|
+
:deep(.smb-sidebar-menu-item-no-icon-title) {
|
|
297
|
+
flex: 0 0 calc(100% - 20px - 20px);
|
|
298
|
+
}
|
|
291
299
|
}
|
|
292
300
|
</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,不做任何处理
|