agilebuilder-ui 1.0.39 → 1.0.40-beta2
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/super-ui.js +71338 -71329
- package/lib/super-ui.umd.cjs +113 -113
- package/package.json +1 -1
- package/packages/super-grid/src/apis.js +2 -1
- package/packages/super-grid/src/dynamic-input.vue +38 -6
- package/packages/super-grid/src/group-column.vue +2 -1
- package/src/views/layout/components/Menubar/index.vue +34 -45
package/package.json
CHANGED
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
@input="cellEvent('input', $event)"
|
|
314
314
|
/>
|
|
315
315
|
<!--mysql数据库--->
|
|
316
|
-
<el-switch
|
|
316
|
+
<!-- <el-switch
|
|
317
317
|
v-else-if="(type === 'switch' || column.dataType === 'BOOLEAN') && dataSourceType === 'mysql'"
|
|
318
318
|
ref="item"
|
|
319
319
|
v-model="innerValue"
|
|
@@ -322,17 +322,19 @@
|
|
|
322
322
|
inactive-color="#ff4949"
|
|
323
323
|
@change="cellEvent('change', $event)"
|
|
324
324
|
@input="cellEvent('input', $event, true)"
|
|
325
|
-
/>
|
|
325
|
+
/> -->
|
|
326
326
|
<!--oracle或sqlserver数据库--->
|
|
327
327
|
<el-switch
|
|
328
328
|
v-else-if="type === 'switch' || column.dataType === 'BOOLEAN'"
|
|
329
329
|
ref="item"
|
|
330
330
|
v-model="innerValue"
|
|
331
|
-
:active-
|
|
331
|
+
:active-text="getSwitchConfig('activeText')"
|
|
332
|
+
:active-value="getSwitchConfig('activeValue')"
|
|
332
333
|
:disabled="disabled"
|
|
333
|
-
:inactive-
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
:inactive-text="getSwitchConfig('inactiveText')"
|
|
335
|
+
:inactive-value="getSwitchConfig('inactiveValue')"
|
|
336
|
+
:active-color="getSwitchConfig('onColor')"
|
|
337
|
+
:inactive-color="getSwitchConfig('offColor')"
|
|
336
338
|
@change="cellEvent('change', $event)"
|
|
337
339
|
@input="cellEvent('input', $event, true)"
|
|
338
340
|
/>
|
|
@@ -657,6 +659,11 @@ export default {
|
|
|
657
659
|
if (valueSetOptionsObj.dynamicDataSourceCode && valueSetOptionsObj.dynamicDataSourceCode !== '') {
|
|
658
660
|
this.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
|
|
659
661
|
}
|
|
662
|
+
} else if (this.column.componentType === 'switch') {
|
|
663
|
+
const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
|
|
664
|
+
if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
|
|
665
|
+
this.valueSetOptions = valueSetOptionsObj.valueSetOptions
|
|
666
|
+
}
|
|
660
667
|
}
|
|
661
668
|
if (this.column.orgTreeSet) {
|
|
662
669
|
const orgTreeSet = JSON.parse(this.column.orgTreeSet)
|
|
@@ -1425,6 +1432,7 @@ export default {
|
|
|
1425
1432
|
return numberValue
|
|
1426
1433
|
}
|
|
1427
1434
|
}
|
|
1435
|
+
return e
|
|
1428
1436
|
},
|
|
1429
1437
|
refresData(data) {
|
|
1430
1438
|
$emit(this, 'refresData', data)
|
|
@@ -1497,6 +1505,30 @@ export default {
|
|
|
1497
1505
|
},
|
|
1498
1506
|
isInvalidValue(value) {
|
|
1499
1507
|
return value === undefined || value === null || value === ''
|
|
1508
|
+
},
|
|
1509
|
+
getSwitchConfig(switchProp) {
|
|
1510
|
+
debugger
|
|
1511
|
+
if (this.valueSetOptions && this.valueSetOptions[switchProp]) {
|
|
1512
|
+
return this.valueSetOptions[switchProp]
|
|
1513
|
+
} else {
|
|
1514
|
+
if (switchProp === 'activeValue') {
|
|
1515
|
+
if (this.dataSourceType === 'mysql') {
|
|
1516
|
+
return true
|
|
1517
|
+
} else {
|
|
1518
|
+
return 1
|
|
1519
|
+
}
|
|
1520
|
+
} else if (switchProp === 'inactiveValue') {
|
|
1521
|
+
if (this.dataSourceType === 'mysql') {
|
|
1522
|
+
return false
|
|
1523
|
+
} else {
|
|
1524
|
+
return 0
|
|
1525
|
+
}
|
|
1526
|
+
} else if (switchProp === 'offColor') {
|
|
1527
|
+
return '#ff4949'
|
|
1528
|
+
} else if (switchProp === 'onColor') {
|
|
1529
|
+
return '#13ce66'
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1500
1532
|
}
|
|
1501
1533
|
}
|
|
1502
1534
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-table-column width="150" :align="column.groupHeader ? 'center' : ''">
|
|
2
|
+
<el-table-column :width="column.width ? column.width : 150" :align="column.groupHeader ? 'center' : ''">
|
|
3
3
|
<template v-slot:header>
|
|
4
4
|
<span class="cell--span" :title="label" v-html="label" />
|
|
5
5
|
</template>
|
|
@@ -79,6 +79,7 @@ export default {
|
|
|
79
79
|
},
|
|
80
80
|
created() {
|
|
81
81
|
this.label = this.getHeader()
|
|
82
|
+
console.log('%c描述-181624','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',this.column);
|
|
82
83
|
},
|
|
83
84
|
methods: {
|
|
84
85
|
getHeader() {
|
|
@@ -38,6 +38,7 @@ import tabJs from '../../../../api/tab'
|
|
|
38
38
|
import {getI18nName} from '../../../../utils/menu'
|
|
39
39
|
import Cookies from 'js-cookie'
|
|
40
40
|
import {getMenus} from '../../../../utils/permissionAuth'
|
|
41
|
+
import authApi from "../../../../utils/auth-api"
|
|
41
42
|
|
|
42
43
|
export default {
|
|
43
44
|
name: 'Menubar',
|
|
@@ -63,12 +64,16 @@ export default {
|
|
|
63
64
|
systemName = systemNameObj[language]
|
|
64
65
|
}
|
|
65
66
|
}
|
|
67
|
+
const isSelectFirst = window.$vueApp.config.globalProperties.showFirstMenu === undefined || window.$vueApp.config.globalProperties.showFirstMenu === null? true : window.$vueApp.config.globalProperties.showFirstMenu
|
|
68
|
+
let isDevp = authApi.isDevpSystem()
|
|
66
69
|
const menus = getMenus()
|
|
67
70
|
return {
|
|
68
71
|
firstLeafMenu: null, // 第一个有权限的叶子菜单,用于默认展开第一个父菜单
|
|
69
72
|
systemName,
|
|
70
73
|
defaultActive: '',
|
|
71
74
|
menus,
|
|
75
|
+
isSelectFirst,
|
|
76
|
+
isDevp
|
|
72
77
|
}
|
|
73
78
|
},
|
|
74
79
|
computed: {
|
|
@@ -129,7 +134,11 @@ export default {
|
|
|
129
134
|
}
|
|
130
135
|
const path = this.firstLeafMenu.fullPath
|
|
131
136
|
this.addTabs(query, this.$store.state.tabContent.openTab, path, path)
|
|
132
|
-
|
|
137
|
+
let routePath = '/tab-content-index'
|
|
138
|
+
if(this.isDevp){
|
|
139
|
+
routePath = '/devp-project/setting'
|
|
140
|
+
}
|
|
141
|
+
this.$router.push({path: routePath , query: query})
|
|
133
142
|
// this.$router.push({ path: this.firstLeafMenu.fullPath })
|
|
134
143
|
}
|
|
135
144
|
}
|
|
@@ -144,67 +153,47 @@ export default {
|
|
|
144
153
|
Cookies.set('selectMenu', index)
|
|
145
154
|
},
|
|
146
155
|
getFirstMenu(menus) {
|
|
147
|
-
|
|
156
|
+
const currentMenuCode = this.$route.query
|
|
157
|
+
? this.$route.query._menuCode
|
|
158
|
+
: null
|
|
159
|
+
if(currentMenuCode){
|
|
160
|
+
// 表示需要选中指定的菜单
|
|
161
|
+
this.isSelectFirst = true
|
|
162
|
+
}
|
|
163
|
+
if (this.isSelectFirst && menus && menus.length > 0) {
|
|
148
164
|
let shouldSelectMenu
|
|
149
165
|
for (let i = 0; i < menus.length; i++) {
|
|
150
166
|
const menu = menus[i]
|
|
151
|
-
shouldSelectMenu = this.getShouldSelectMenu(menu)
|
|
167
|
+
shouldSelectMenu = this.getShouldSelectMenu(menu, currentMenuCode)
|
|
152
168
|
if (shouldSelectMenu) {
|
|
153
169
|
// 表示获得到了应该选中的菜单
|
|
154
170
|
break
|
|
155
171
|
}
|
|
156
172
|
}
|
|
157
|
-
// if (!shouldSelectMenu) {
|
|
158
|
-
// // 如果没有获得默认选中的菜单,则默认选中第一个菜单
|
|
159
|
-
// shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
|
|
160
|
-
// }
|
|
161
173
|
return shouldSelectMenu
|
|
162
174
|
}
|
|
163
175
|
},
|
|
164
|
-
getShouldSelectMenu(menu) {
|
|
165
|
-
const currentMenuCode = this.$route.query
|
|
166
|
-
? this.$route.query._menuCode
|
|
167
|
-
: null
|
|
168
|
-
if (menu && currentMenuCode) {
|
|
169
|
-
let shouldSelectMenu
|
|
170
|
-
const children = menu.children
|
|
171
|
-
if (children && children.length > 0) {
|
|
172
|
-
shouldSelectMenu = this.getFirstMenu(children)
|
|
173
|
-
} else if (menu.code && menu.code === currentMenuCode) {
|
|
174
|
-
shouldSelectMenu = menu
|
|
175
|
-
}
|
|
176
|
-
return shouldSelectMenu
|
|
177
|
-
}
|
|
178
|
-
// if (menu) {
|
|
179
|
-
// const cookieMenu = Cookies.get('selectMenu')
|
|
180
|
-
// let currentRoute = this.$route.path
|
|
181
|
-
// if (cookieMenu && cookieMenu.indexOf('~~') > 0) {
|
|
182
|
-
// // cookie中记录了选中的菜单路径
|
|
183
|
-
// const path = cookieMenu.substring(0, cookieMenu.lastIndexOf('~~'))
|
|
184
|
-
// currentRoute = path
|
|
185
|
-
// }
|
|
186
|
-
// let shouldSelectMenu
|
|
187
|
-
// const children = menu.children
|
|
188
|
-
// if (children && children.length > 0) {
|
|
189
|
-
// shouldSelectMenu = this.getFirstMenu(children)
|
|
190
|
-
// } else if (menu.fullPath && menu.fullPath === currentRoute) {
|
|
191
|
-
// shouldSelectMenu = menu
|
|
192
|
-
// }
|
|
193
|
-
// return shouldSelectMenu
|
|
194
|
-
// }
|
|
195
|
-
},
|
|
196
|
-
getSelectMenuWithFirstMenu(menu) {
|
|
176
|
+
getShouldSelectMenu(menu, currentMenuCode) {
|
|
197
177
|
if (menu) {
|
|
198
178
|
let shouldSelectMenu
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
179
|
+
if(currentMenuCode){
|
|
180
|
+
const children = menu.children
|
|
181
|
+
if (children && children.length > 0) {
|
|
182
|
+
shouldSelectMenu = this.getFirstMenu(children)
|
|
183
|
+
} else if (menu.code && menu.code === currentMenuCode) {
|
|
184
|
+
shouldSelectMenu = menu
|
|
185
|
+
}
|
|
202
186
|
} else {
|
|
203
|
-
|
|
187
|
+
const children = menu.children
|
|
188
|
+
if (children && children.length > 0) {
|
|
189
|
+
shouldSelectMenu = this.getFirstMenu(children)
|
|
190
|
+
} else {
|
|
191
|
+
shouldSelectMenu = menu
|
|
192
|
+
}
|
|
204
193
|
}
|
|
205
194
|
return shouldSelectMenu
|
|
206
195
|
}
|
|
207
|
-
}
|
|
196
|
+
}
|
|
208
197
|
},
|
|
209
198
|
}
|
|
210
199
|
</script>
|