agilebuilder-ui 1.1.36-p1 → 1.1.36-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-b8934d65.js → 401-e367a09a.js} +1 -1
- package/lib/{404-743a4631.js → 404-45104bc5.js} +1 -1
- package/lib/{iframe-page-5e102433.js → iframe-page-8a758d4d.js} +1 -1
- package/lib/{index-a0c08bb5.js → index-8c6ab0ba.js} +1545 -1513
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +100 -100
- package/lib/{tab-content-iframe-index-e9b465bf.js → tab-content-iframe-index-16f7cb65.js} +1 -1
- package/lib/{tab-content-index-313404d0.js → tab-content-index-f136be89.js} +1 -1
- package/lib/{tache-subprocess-history-7d87cd77.js → tache-subprocess-history-4f9a7773.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +130 -123
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +435 -466
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +335 -342
- package/packages/department-tree-inline/src/department-tree-inline.vue +18 -11
- package/packages/department-tree-inline/src/department-tree-service.js +10 -11
- package/packages/department-tree-mobile/src/department-tree-app.vue +103 -75
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +256 -225
- package/packages/department-tree-mobile/src/department-tree-service.ts +98 -75
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +111 -115
- package/packages/department-user-tree/src/department-user-single-tree.vue +85 -88
- package/packages/department-user-tree/src/department-user-tree.vue +127 -119
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +6 -1
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +5 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +18 -11
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +25 -51
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +97 -90
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +28 -32
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +103 -75
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +282 -224
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +58 -51
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
- package/packages/organization-input/src/organization-input.vue +34 -12
- package/packages/super-grid/src/apis.js +21 -4
- package/packages/super-grid/src/dynamic-input.vue +1 -12
- package/packages/super-grid/src/normal-column-content.vue +2 -1
- package/packages/super-grid/src/row-operation.vue +23 -13
- package/packages/super-grid/src/super-grid.vue +51 -42
- package/packages/super-grid/src/utils.js +13 -8
- package/packages/super-icon/src/index.vue +4 -1
- package/packages/workgroup-tree/src/workgroup-tree.vue +117 -110
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +6 -1
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +103 -75
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +229 -208
- package/src/api/sso-service.js +6 -5
- package/src/store/modules/table.js +0 -1
- package/src/styles/theme/dark-blue/sidebar.scss +8 -0
- package/src/styles/theme/green/sidebar.scss +9 -0
- package/src/styles/theme/ocean-blue/sidebar.scss +8 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +8 -0
- package/src/utils/insert_css.js +1 -1
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
- package/src/views/dsc-component/Sidebar/index.vue +36 -18
- package/src/views/layout/components/Menubar/Item.vue +0 -9
- package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
- package/src/views/layout/components/Sidebar/Item.vue +4 -1
- package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
|
@@ -581,11 +581,15 @@ export default {
|
|
|
581
581
|
if (gridParams && gridParams.options && gridParams.options.rowKeyProp) {
|
|
582
582
|
return gridParams.options.rowKeyProp
|
|
583
583
|
} else {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
584
|
+
// 使用rowDataGuId作为唯一标识,解决台账显示或不显示id。
|
|
585
|
+
// 大小写、或(子表时id还不存在问题,导致行选择和push新数据后 3行数据,
|
|
586
|
+
// 在第二行插入数据,因为key问题3、4行数据变成一样的)
|
|
587
|
+
return '$rowDataGuId'
|
|
588
|
+
// if (this.dataSourceType === 'oracle') {
|
|
589
|
+
// return 'ID'
|
|
590
|
+
// } else {
|
|
591
|
+
// return 'id'
|
|
592
|
+
// }
|
|
589
593
|
}
|
|
590
594
|
},
|
|
591
595
|
filterGridData() {
|
|
@@ -630,15 +634,12 @@ export default {
|
|
|
630
634
|
tableDatas: {
|
|
631
635
|
deep: true,
|
|
632
636
|
immediate: true,
|
|
633
|
-
handler(a, b) {
|
|
634
|
-
console.log('SGQ --- 表格监听数据修改============================》', a, b)
|
|
635
|
-
}
|
|
637
|
+
handler(a, b) {}
|
|
636
638
|
},
|
|
637
639
|
'options.SuperGrid': {
|
|
638
640
|
deep: true,
|
|
639
641
|
handler: function () {
|
|
640
642
|
this.externalClickFlag = true
|
|
641
|
-
console.log('监听到数据改变')
|
|
642
643
|
this.initSetting()
|
|
643
644
|
this.initialize()
|
|
644
645
|
}
|
|
@@ -714,7 +715,6 @@ export default {
|
|
|
714
715
|
deep: true,
|
|
715
716
|
handler: function () {
|
|
716
717
|
this.externalClickFlag = true
|
|
717
|
-
console.log('监听到数据改变================', this.options.validateRules)
|
|
718
718
|
const gridParams = store.get(this.code)
|
|
719
719
|
if (gridParams && gridParams.options) {
|
|
720
720
|
gridParams.options.validateRules = this.options.validateRules
|
|
@@ -746,7 +746,6 @@ export default {
|
|
|
746
746
|
'options.extraParam.entityMap': {
|
|
747
747
|
deep: true,
|
|
748
748
|
handler(newValue, oldValue) {
|
|
749
|
-
console.log('watch====options.extraParam.entityMap===改变==', newValue)
|
|
750
749
|
this.parentFormData = newValue
|
|
751
750
|
this.$emit('change-form-data', this.parentFormData)
|
|
752
751
|
}
|
|
@@ -937,7 +936,6 @@ export default {
|
|
|
937
936
|
if (that.options.isEnableEnterEvent !== undefined && that.options.isEnableEnterEvent === false) {
|
|
938
937
|
canCall = false
|
|
939
938
|
}
|
|
940
|
-
console.log('super-grid-----isEnableEnterEvent=', that.options.isEnableEnterEvent, 'canCall=', canCall)
|
|
941
939
|
const gridParams = store.get(that.code)
|
|
942
940
|
if (canCall && gridParams.options && gridParams.options.isFormSubTable) {
|
|
943
941
|
canCall = false
|
|
@@ -994,19 +992,19 @@ export default {
|
|
|
994
992
|
tempMaxHeight = tableHeight
|
|
995
993
|
}
|
|
996
994
|
}
|
|
997
|
-
if(tempMaxHeight === null){
|
|
995
|
+
if (tempMaxHeight === null) {
|
|
998
996
|
// 高度是null会导致页面卡死
|
|
999
997
|
tempMaxHeight = undefined
|
|
1000
998
|
}
|
|
1001
|
-
if(tempMaxHeight !== null && tempMaxHeight !== undefined && parseFloat(tempMaxHeight+'') < 100){
|
|
999
|
+
if (tempMaxHeight !== null && tempMaxHeight !== undefined && parseFloat(tempMaxHeight + '') < 100) {
|
|
1002
1000
|
// 如果小于100时,高度给100
|
|
1003
1001
|
tempMaxHeight = 100
|
|
1004
1002
|
}
|
|
1005
|
-
if(tempMaxHeight !== null && tempMaxHeight !== undefined){
|
|
1003
|
+
if (tempMaxHeight !== null && tempMaxHeight !== undefined) {
|
|
1006
1004
|
// 用parseFloat是因为tempMaxHeight的值有时是数字字符串
|
|
1007
|
-
tempMaxHeight = parseFloat(tempMaxHeight+'')
|
|
1008
|
-
}
|
|
1009
|
-
if(gridParams.options && gridParams.options.isFormSubTable){
|
|
1005
|
+
tempMaxHeight = parseFloat(tempMaxHeight + '')
|
|
1006
|
+
}
|
|
1007
|
+
if (gridParams.options && gridParams.options.isFormSubTable) {
|
|
1010
1008
|
// 表示表单页面子表时,不解析 显示效果了,直接使用高度就行了
|
|
1011
1009
|
if (
|
|
1012
1010
|
!this.basicInfo.displayEffect ||
|
|
@@ -1037,16 +1035,6 @@ export default {
|
|
|
1037
1035
|
this.tableHeight = undefined
|
|
1038
1036
|
}
|
|
1039
1037
|
}
|
|
1040
|
-
console.log(
|
|
1041
|
-
'resizeTableHeight-----tempMaxHeight=',
|
|
1042
|
-
tempMaxHeight,
|
|
1043
|
-
'this.tableHeight=',
|
|
1044
|
-
this.tableHeight,
|
|
1045
|
-
'this.maxHeight=',
|
|
1046
|
-
this.maxHeight,
|
|
1047
|
-
'gridParams.options=',
|
|
1048
|
-
gridParams.options
|
|
1049
|
-
)
|
|
1050
1038
|
})
|
|
1051
1039
|
},
|
|
1052
1040
|
// 回车键
|
|
@@ -1556,7 +1544,6 @@ export default {
|
|
|
1556
1544
|
// 子表无记录时不需要刷新子表记录。表示是新建或修改时子表无记录,且不需要刷新子表。
|
|
1557
1545
|
if (this.isSubTableEmpty(gridParams)) {
|
|
1558
1546
|
// 表示是新建表单时,子表记录集合是空数组
|
|
1559
|
-
console.log('子表无记录----code=', this.code, gridParams)
|
|
1560
1547
|
const subTableData = []
|
|
1561
1548
|
this.packageSubTableData(gridParams, subTableData)
|
|
1562
1549
|
}
|
|
@@ -2180,7 +2167,7 @@ export default {
|
|
|
2180
2167
|
} else {
|
|
2181
2168
|
vm.fetchData(vm.getSearchParam(), isSearch, parentRowIds)
|
|
2182
2169
|
.then((data) => {
|
|
2183
|
-
console.log('打印1====', gridParams)
|
|
2170
|
+
// console.log('打印1====', gridParams)
|
|
2184
2171
|
if (
|
|
2185
2172
|
gridParams !== undefined &&
|
|
2186
2173
|
gridParams.options !== undefined &&
|
|
@@ -2188,18 +2175,18 @@ export default {
|
|
|
2188
2175
|
gridParams.options.isHiddenSearchForm === true
|
|
2189
2176
|
) {
|
|
2190
2177
|
// 查询时,是否隐藏查询区域,默认是不隐藏查询区域
|
|
2191
|
-
console.log('打印2====', vm)
|
|
2178
|
+
// console.log('打印2====', vm)
|
|
2192
2179
|
vm.showSearch = false
|
|
2193
2180
|
$emit(vm, 'cancel-search')
|
|
2194
2181
|
}
|
|
2195
|
-
console.log('打印3====', vm)
|
|
2196
|
-
console.log('打印4====', vm.$refs)
|
|
2182
|
+
// console.log('打印3====', vm)
|
|
2183
|
+
// console.log('打印4====', vm.$refs)
|
|
2197
2184
|
if (vm.$refs && vm.$refs.sf) {
|
|
2198
|
-
console.log('打印5====', vm.$refs.sf)
|
|
2185
|
+
// console.log('打印5====', vm.$refs.sf)
|
|
2199
2186
|
vm.$refs.sf.loading = false
|
|
2200
2187
|
vm.$refs.sf.searchComplete()
|
|
2201
2188
|
}
|
|
2202
|
-
console.log('打印6====', vm)
|
|
2189
|
+
// console.log('打印6====', vm)
|
|
2203
2190
|
// 重新计算列表高度
|
|
2204
2191
|
this.resizeTableHeight()
|
|
2205
2192
|
resolve(data)
|
|
@@ -2344,8 +2331,6 @@ export default {
|
|
|
2344
2331
|
} else if (prop === undefined && column.children && column.children.length > 0) {
|
|
2345
2332
|
type = 'GroupColumn'
|
|
2346
2333
|
}
|
|
2347
|
-
// console.log('%c描述-180428','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',this.myCustomFormatter);
|
|
2348
|
-
// console.log('%c描述-155704','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',type);
|
|
2349
2334
|
return type
|
|
2350
2335
|
},
|
|
2351
2336
|
focusOnFirstEditableInput() {
|
|
@@ -2356,7 +2341,6 @@ export default {
|
|
|
2356
2341
|
},
|
|
2357
2342
|
handleSizeChange(val) {
|
|
2358
2343
|
if (!this.options || !this.options.isPageShow) {
|
|
2359
|
-
// console.log(`每页 ${val} 条`)
|
|
2360
2344
|
this.currentPage = 1
|
|
2361
2345
|
this.pageSize = val
|
|
2362
2346
|
this.pagination.pageSize = val
|
|
@@ -2839,7 +2823,6 @@ export default {
|
|
|
2839
2823
|
return this.isSubTableShowPage ? this.subTableData : this.gridData
|
|
2840
2824
|
},
|
|
2841
2825
|
rowDblclickEvent(row, column, event) {
|
|
2842
|
-
debugger
|
|
2843
2826
|
const gridParams = store.get(this.code)
|
|
2844
2827
|
if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.isPdfEditor) {
|
|
2845
2828
|
// 如果是子表并且是pdf模式
|
|
@@ -2849,7 +2832,6 @@ export default {
|
|
|
2849
2832
|
let canEdit = true
|
|
2850
2833
|
const gridParams = store.get(this.code)
|
|
2851
2834
|
if (isEditOptionFunction('beforeEdit', this.code)) {
|
|
2852
|
-
debugger;
|
|
2853
2835
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
2854
2836
|
// 每页显示多少条
|
|
2855
2837
|
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
@@ -2880,7 +2862,6 @@ export default {
|
|
|
2880
2862
|
}
|
|
2881
2863
|
} else {
|
|
2882
2864
|
if (row) {
|
|
2883
|
-
debugger
|
|
2884
2865
|
if (gridParams && gridParams.lineEdit && gridParams.lineEdit.editable && gridParams.canntEdit) {
|
|
2885
2866
|
let index = this.gridData.findIndex(function (item) {
|
|
2886
2867
|
return (item.id && item.id === row.id) || (item.ID && item.ID === row.ID)
|
|
@@ -2895,7 +2876,6 @@ export default {
|
|
|
2895
2876
|
this.rowDblClick(row, column, event)
|
|
2896
2877
|
},
|
|
2897
2878
|
rowDbClickEditRow(gridParams, row) {
|
|
2898
|
-
console.log('rowDbClickEditRow+++++++++++++++++++', gridParams, row)
|
|
2899
2879
|
// 取消上一行的编辑状态
|
|
2900
2880
|
let editRows
|
|
2901
2881
|
if (this.isSubTableShowPage) {
|
|
@@ -3353,6 +3333,35 @@ export default {
|
|
|
3353
3333
|
},
|
|
3354
3334
|
changeOperationAddState(state) {
|
|
3355
3335
|
eventBus.$emit('change-add-state', state)
|
|
3336
|
+
},
|
|
3337
|
+
scrollTo(options, yCoord) {
|
|
3338
|
+
this.$refs.superGrid?.scrollTo(options, yCoord)
|
|
3339
|
+
},
|
|
3340
|
+
setScrollTop(top) {
|
|
3341
|
+
this.$refs.superGrid?.setScrollTop(top)
|
|
3342
|
+
},
|
|
3343
|
+
setScrollLeft(left) {
|
|
3344
|
+
this.$refs.superGrid?.setScrollLeft(left)
|
|
3345
|
+
},
|
|
3346
|
+
setScrollTopByRowIndex(rowIndex) {
|
|
3347
|
+
if (this.$refs.superGrid) {
|
|
3348
|
+
const theTableRows = this.$refs.superGrid.$el.querySelectorAll('.el-table__body tbody .el-table__row')
|
|
3349
|
+
let scrollTop = 0
|
|
3350
|
+
for (let i = 0; i < theTableRows.length; i++) {
|
|
3351
|
+
if (i === rowIndex) {
|
|
3352
|
+
break
|
|
3353
|
+
}
|
|
3354
|
+
scrollTop += theTableRows[i].offsetHeight
|
|
3355
|
+
}
|
|
3356
|
+
this.$refs.superGrid.setScrollTop(scrollTop)
|
|
3357
|
+
}
|
|
3358
|
+
},
|
|
3359
|
+
setCurrentRowIndex(rowIndex) {
|
|
3360
|
+
// 选中行
|
|
3361
|
+
this.$refs.superGrid.setCurrentRow(this.tableDatas[rowIndex])
|
|
3362
|
+
},
|
|
3363
|
+
getSuperGridRef() {
|
|
3364
|
+
return this.$refs.superGrid
|
|
3356
3365
|
}
|
|
3357
3366
|
},
|
|
3358
3367
|
emits: [
|
|
@@ -264,9 +264,14 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
264
264
|
}
|
|
265
265
|
if (isDiabled === false) {
|
|
266
266
|
// 表示不是禁止编辑的,继续校验自定义规则中是否是禁止编辑的
|
|
267
|
-
if
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
if (
|
|
268
|
+
gridParams.options.customRules &&
|
|
269
|
+
(gridParams.options.customRules[prop] || gridParams.options.customRules['_all_fields'])
|
|
270
|
+
) {
|
|
271
|
+
const columnRules = gridParams.options.customRules[prop]
|
|
272
|
+
? gridParams.options.customRules[prop]
|
|
273
|
+
: gridParams.options.customRules['_all_fields']
|
|
274
|
+
if (columnRules && columnRules.disabled) {
|
|
270
275
|
isDiabled = true
|
|
271
276
|
}
|
|
272
277
|
}
|
|
@@ -565,7 +570,6 @@ export function getTableHeight(superGrid, listCode, pageHeight) {
|
|
|
565
570
|
rect = superGrid.$el.getBoundingClientRect()
|
|
566
571
|
}
|
|
567
572
|
const totalHeight = window.innerHeight - (rect?.y ?? 0) - 110
|
|
568
|
-
console.log('rect=', rect, 'window.innerHeight=', window.innerHeight, 'totalHeight=', totalHeight)
|
|
569
573
|
return totalHeight
|
|
570
574
|
|
|
571
575
|
// let topDivHeight = 120
|
|
@@ -755,9 +759,12 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, b
|
|
|
755
759
|
|
|
756
760
|
// 值设置是否是动态数据源类型的数据源
|
|
757
761
|
export function isDynamicDataSourceSource(column) {
|
|
758
|
-
if(column.valueSetOptions) {
|
|
762
|
+
if (column.valueSetOptions) {
|
|
759
763
|
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
760
|
-
if(
|
|
764
|
+
if (
|
|
765
|
+
(valueSetOptionsObj.type && valueSetOptionsObj.type === 'dynamicData') ||
|
|
766
|
+
valueSetOptionsObj.dynamicDataSourceCode
|
|
767
|
+
) {
|
|
761
768
|
// 表示是动态数据源
|
|
762
769
|
return true
|
|
763
770
|
}
|
|
@@ -782,10 +789,8 @@ export function getLastPageNum(total, rowsPerPage) {
|
|
|
782
789
|
// 纵向滚动条滚动最底部功能
|
|
783
790
|
export function scrollYToBottom(listCode) {
|
|
784
791
|
const scrollDivElement = document.querySelector('.' + listCode + ' .el-table--scrollable-y .el-table__body-wrapper')
|
|
785
|
-
console.log('scrollDivElement==', scrollDivElement)
|
|
786
792
|
if (scrollDivElement && scrollDivElement !== null) {
|
|
787
793
|
// 表示有滚动条,需要将滚动条滚动最底部
|
|
788
|
-
console.log('scrollDivElement==scrollDivElement.scrollHeight=', scrollDivElement.scrollHeight)
|
|
789
794
|
scrollDivElement.scrollTop = scrollDivElement.scrollHeight
|
|
790
795
|
}
|
|
791
796
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<i v-else-if="iconValue.indexOf('fa-') === 0" :class="'fa ' + iconValue" />
|
|
5
5
|
<img
|
|
6
6
|
v-else-if="iconValue.indexOf('svg-img-') === 0"
|
|
7
|
-
:src="
|
|
7
|
+
:src="defaultShowSvgAction + iconValue"
|
|
8
8
|
style="width: 1em; height: 1em"
|
|
9
9
|
/>
|
|
10
10
|
<SvgIcon v-else-if="iconValue.indexOf('svg-') === 0" :icon-class="iconValue.substring('svg-'.length)" />
|
|
@@ -39,6 +39,9 @@ const props = defineProps({
|
|
|
39
39
|
const defaultShowImageAction = ref(
|
|
40
40
|
window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-image?serverPath='
|
|
41
41
|
)
|
|
42
|
+
const defaultShowSvgAction = ref(
|
|
43
|
+
window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-svg?svgName='
|
|
44
|
+
)
|
|
42
45
|
</script>
|
|
43
46
|
<style lang="scss" scoped>
|
|
44
47
|
.super-icon {
|
|
@@ -1,120 +1,127 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<WorkgroupMobileTree
|
|
4
|
+
v-if="isMobile"
|
|
5
|
+
ref="workgroupTree"
|
|
6
|
+
:close-on-click-modal="false"
|
|
7
|
+
:close-on-press-escape="false"
|
|
8
|
+
:branch-info="branchInfo"
|
|
9
|
+
:multiple="multiple"
|
|
10
|
+
:search-field="searchField"
|
|
11
|
+
:select-workgroup-info="selectWorkgroupInfo"
|
|
12
|
+
:limit-filter-column="limitFilterColumn"
|
|
13
|
+
:separator="separator"
|
|
14
|
+
@close="result"
|
|
15
|
+
/>
|
|
16
|
+
<el-dialog
|
|
17
|
+
v-else
|
|
18
|
+
:close-on-click-modal="false"
|
|
19
|
+
:title="myTitle"
|
|
20
|
+
:width="multiple ? '60%' : '40%'"
|
|
21
|
+
append-to-body
|
|
22
|
+
class="user-tree"
|
|
23
|
+
model-value
|
|
24
|
+
@close="$emit('close')"
|
|
25
|
+
@closed="$emit('closed')"
|
|
26
|
+
@open="$emit('open')"
|
|
27
|
+
@opend="$emit('opend')"
|
|
28
|
+
>
|
|
29
|
+
<inline-workgroup-tree
|
|
30
|
+
ref="workgroupTree"
|
|
31
|
+
:branch-info="branchInfo"
|
|
32
|
+
:limit-filter-column="limitFilterColumn"
|
|
33
|
+
:multiple="multiple"
|
|
34
|
+
@result="result"
|
|
35
|
+
/>
|
|
36
|
+
<template v-slot:footer>
|
|
37
|
+
<div class="dialog-footer">
|
|
38
|
+
<el-button class="button--default" size="default" @click="$emit('close')">
|
|
39
|
+
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
40
|
+
</el-button>
|
|
41
|
+
<el-button size="default" type="primary" @click="selectWorkgroup">
|
|
42
|
+
{{ $t('imatrixUIPublicModel.sure') }}
|
|
43
|
+
</el-button>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
</el-dialog>
|
|
47
|
+
</div>
|
|
46
48
|
</template>
|
|
47
49
|
|
|
48
50
|
<script>
|
|
49
|
-
import {$emit} from '../../utils/gogocodeTransfer'
|
|
51
|
+
import { $emit } from '../../utils/gogocodeTransfer'
|
|
50
52
|
import InlineWorkgroupTree from '../../workgroup-tree-inline/src/workgroup-tree-inline.vue'
|
|
51
53
|
import WorkgroupMobileTree from '../../workgroup-tree-mobile/src/workgroup-tree-app.vue'
|
|
52
|
-
import {isMobileBrowser} from '../../../src/utils/common-util'
|
|
54
|
+
import { isMobileBrowser } from '../../../src/utils/common-util'
|
|
53
55
|
|
|
54
56
|
export default {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
57
|
+
name: 'WorkgroupTree',
|
|
58
|
+
components: {
|
|
59
|
+
InlineWorkgroupTree,
|
|
60
|
+
WorkgroupMobileTree
|
|
61
|
+
},
|
|
62
|
+
props: {
|
|
63
|
+
// 是否是多选树,默认是true
|
|
64
|
+
multiple: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
69
|
+
branchInfo: {
|
|
70
|
+
type: Array,
|
|
71
|
+
default: null
|
|
72
|
+
},
|
|
73
|
+
// 弹框的标题
|
|
74
|
+
title: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: null
|
|
77
|
+
},
|
|
78
|
+
// 弹框的宽度
|
|
79
|
+
width: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: '60%'
|
|
82
|
+
},
|
|
83
|
+
// 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
|
|
84
|
+
selectWorkgroupInfo: {
|
|
85
|
+
type: [String, Number],
|
|
86
|
+
default: null
|
|
87
|
+
},
|
|
88
|
+
// 移除部门时,部门属性名称:id、name、code,默认是id
|
|
89
|
+
searchField: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: 'code'
|
|
92
|
+
},
|
|
93
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
94
|
+
separator: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: ','
|
|
97
|
+
},
|
|
98
|
+
// 根据变量限制部门时,根据部门表的哪个字段进行过滤,默认是code
|
|
99
|
+
limitFilterColumn: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: 'code'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
data() {
|
|
105
|
+
let myTitle = this.$t('imatrixUIMessage.pleaseSelectATeam')
|
|
106
|
+
if (this.title) {
|
|
107
|
+
myTitle = this.title
|
|
108
|
+
}
|
|
109
|
+
const isMobile = isMobileBrowser()
|
|
110
|
+
return {
|
|
111
|
+
myTitle,
|
|
112
|
+
isMobile
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
methods: {
|
|
116
|
+
// 工作组单选回调
|
|
117
|
+
result(selectNodeInfo) {
|
|
118
|
+
$emit(this, 'close', selectNodeInfo)
|
|
119
|
+
},
|
|
120
|
+
// 嵌入树,多选时,点击确定时调用的方法
|
|
121
|
+
selectWorkgroup() {
|
|
122
|
+
this.$refs.workgroupTree.selectWorkgroup()
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
emits: ['open', 'opend', 'close', 'closed', 'opend', 'close', 'closed']
|
|
119
126
|
}
|
|
120
127
|
</script>
|