agilebuilder-ui 1.1.36-tmp4 → 1.1.37

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 (67) hide show
  1. package/lib/{401-c55bdcf2.js → 401-9314ce87.js} +1 -1
  2. package/lib/{404-c1dbd5e1.js → 404-572d631d.js} +1 -1
  3. package/lib/{iframe-page-917912ae.js → iframe-page-87c9c0d0.js} +1 -1
  4. package/lib/{index-6ec53ef7.js → index-79b98485.js} +12729 -12671
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +99 -99
  8. package/lib/{tab-content-iframe-index-46a76242.js → tab-content-iframe-index-070ce653.js} +1 -1
  9. package/lib/{tab-content-index-132379e6.js → tab-content-index-3b98efb4.js} +1 -1
  10. package/lib/{tache-subprocess-history-384455d6.js → tache-subprocess-history-46442012.js} +1 -1
  11. package/package.json +2 -2
  12. package/packages/department-tree/src/department-tree.vue +130 -123
  13. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +435 -466
  14. package/packages/department-tree-inline/src/department-single-tree-inline.vue +335 -342
  15. package/packages/department-tree-inline/src/department-tree-inline.vue +18 -11
  16. package/packages/department-tree-inline/src/department-tree-service.js +10 -11
  17. package/packages/department-tree-mobile/src/department-tree-app.vue +103 -75
  18. package/packages/department-tree-mobile/src/department-tree-inline-app.vue +256 -225
  19. package/packages/department-tree-mobile/src/department-tree-service.ts +98 -75
  20. package/packages/department-user-tree/src/department-user-multiple-tree.vue +112 -115
  21. package/packages/department-user-tree/src/department-user-single-tree.vue +85 -88
  22. package/packages/department-user-tree/src/department-user-tree.vue +127 -119
  23. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +6 -1
  24. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +5 -0
  25. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +18 -11
  26. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +26 -51
  27. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +25 -45
  28. package/packages/department-user-tree-inline/src/group-user/group-list.vue +97 -90
  29. package/packages/department-user-tree-inline/src/group-user/group-user.vue +28 -32
  30. package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +103 -75
  31. package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +282 -224
  32. package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +58 -51
  33. package/packages/fs-preview/src/fs-preview.vue +20 -2
  34. package/packages/fs-upload-list/src/fs-upload-list.vue +30 -7
  35. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
  36. package/packages/fs-upload-new/src/fs-preview-new.vue +27 -15
  37. package/packages/index.js +4 -4
  38. package/packages/organization-input/src/organization-input.vue +34 -12
  39. package/packages/super-grid/src/apis.js +21 -4
  40. package/packages/super-grid/src/dynamic-input.vue +58 -13
  41. package/packages/super-grid/src/normal-column-content.vue +1 -1
  42. package/packages/super-grid/src/row-operation.vue +10 -4
  43. package/packages/super-grid/src/super-grid.vue +51 -42
  44. package/packages/super-grid/src/utils.js +13 -8
  45. package/packages/super-icon/src/index.vue +4 -1
  46. package/packages/workgroup-tree/src/workgroup-tree.vue +117 -110
  47. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +6 -1
  48. package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +103 -75
  49. package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +229 -208
  50. package/src/api/sso-service.js +6 -5
  51. package/src/directives/permission/index.js +4 -4
  52. package/src/index.js +71 -2
  53. package/src/store/modules/table.js +0 -1
  54. package/src/styles/theme/dark-blue/sidebar.scss +9 -0
  55. package/src/styles/theme/gray/sidebar.scss +9 -8
  56. package/src/styles/theme/green/sidebar.scss +10 -0
  57. package/src/styles/theme/ocean-blue/sidebar.scss +9 -0
  58. package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +9 -0
  59. package/src/utils/insert_css.js +1 -1
  60. package/src/utils/util.js +19 -0
  61. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
  62. package/src/views/dsc-component/Sidebar/index.vue +36 -18
  63. package/src/views/layout/components/Menubar/Item.vue +0 -9
  64. package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
  65. package/src/views/layout/components/Sidebar/Item.vue +4 -1
  66. package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
  67. package/vite.config.js +1 -1
@@ -92,6 +92,11 @@ export default {
92
92
  parentFormData: {
93
93
  type: Object,
94
94
  default: null
95
+ },
96
+ // 按钮绑定的事件名称
97
+ eventName: {
98
+ type: String,
99
+ default: null
95
100
  }
96
101
  },
97
102
  data() {
@@ -104,19 +109,20 @@ export default {
104
109
  ...mapGetters(['preventReclick']),
105
110
  // 是否是保存按钮
106
111
  isSaveRow() {
107
- return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
112
+ return ['lineEditSave', 'saveRow'].includes(this.eventName)
108
113
  },
109
114
  // 是否是删除按钮
110
115
  isDeleteRow() {
111
- return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
116
+ return ['lineEditDelete', 'deleteRow'].includes(this.eventName)
112
117
  },
113
118
  // 是否是修改按钮
114
119
  isEditRow() {
115
- return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
120
+ return ['lineEditUpdate', 'editRow'].includes(this.eventName)
116
121
  },
117
122
  // 是否是取消按钮
118
123
  isRestoreRow() {
119
- return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
124
+ return ['restoreEdit', 'restoreRow'].includes(this.eventName)
125
+ // return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
120
126
  },
121
127
  // 前置图标
122
128
  prefixIcon() {
@@ -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
- if (this.dataSourceType === 'oracle') {
585
- return 'ID'
586
- } else {
587
- return 'id'
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(gridParams.options.customRules && (gridParams.options.customRules[prop] || gridParams.options.customRules['_all_fields'])){
268
- const columnRules = gridParams.options.customRules[prop]? gridParams.options.customRules[prop]: gridParams.options.customRules['_all_fields']
269
- if(columnRules && columnRules.disabled){
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((valueSetOptionsObj.type && valueSetOptionsObj.type === 'dynamicData') || valueSetOptionsObj.dynamicDataSourceCode){
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="defaultShowImageAction + iconValue.substring('svg-img-'.length)"
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
- <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
- :separator="separator"
13
- @close="result"
14
- />
15
- <el-dialog
16
- v-else
17
- :close-on-click-modal="false"
18
- :title="myTitle"
19
- :width="multiple ? '60%' : '40%'"
20
- append-to-body
21
- class="user-tree"
22
- model-value
23
- @close="$emit('close')"
24
- @closed="$emit('closed')"
25
- @open="$emit('open')"
26
- @opend="$emit('opend')"
27
- >
28
- <inline-workgroup-tree
29
- ref="workgroupTree"
30
- :branch-info="branchInfo"
31
- :multiple="multiple"
32
- @result="result"
33
- />
34
- <template v-slot:footer>
35
- <div class="dialog-footer">
36
- <el-button class="button--default" size="default" @click="$emit('close')">
37
- {{ $t('imatrixUIPublicModel.cancel') }}
38
- </el-button>
39
- <el-button size="default" type="primary" @click="selectWorkgroup">
40
- {{ $t('imatrixUIPublicModel.sure') }}
41
- </el-button>
42
- </div>
43
- </template>
44
- </el-dialog>
45
- </div>
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
- name: 'WorkgroupTree',
56
- components: {
57
- InlineWorkgroupTree,
58
- WorkgroupMobileTree
59
- },
60
- props: {
61
- // 是否是多选树,默认是true
62
- multiple: {
63
- type: Boolean,
64
- default: true,
65
- },
66
- // 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
67
- branchInfo: {
68
- type: Array,
69
- default: null,
70
- },
71
- // 弹框的标题
72
- title: {
73
- type: String,
74
- default: null,
75
- },
76
- // 弹框的宽度
77
- width: {
78
- type: String,
79
- default: '60%',
80
- },
81
- // 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
82
- selectWorkgroupInfo: {
83
- type: [String, Number],
84
- default: null
85
- },
86
- // 移除部门时,部门属性名称:id、name、code,默认是id
87
- searchField: {
88
- type: String,
89
- default: 'code',
90
- },
91
- // 多选树时结果之间的分隔符,默认是逗号分隔
92
- separator: {
93
- type: String,
94
- default: ','
95
- }
96
- },
97
- data() {
98
- let myTitle = this.$t('imatrixUIMessage.pleaseSelectATeam')
99
- if (this.title) {
100
- myTitle = this.title
101
- }
102
- const isMobile = isMobileBrowser()
103
- return {
104
- myTitle,
105
- isMobile
106
- }
107
- },
108
- methods: {
109
- // 工作组单选回调
110
- result(selectNodeInfo) {
111
- $emit(this, 'close', selectNodeInfo)
112
- },
113
- // 嵌入树,多选时,点击确定时调用的方法
114
- selectWorkgroup() {
115
- this.$refs.workgroupTree.selectWorkgroup()
116
- },
117
- },
118
- emits: ['open', 'opend', 'close', 'closed', 'opend', 'close', 'closed'],
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>
@@ -177,7 +177,12 @@ export default {
177
177
  separator: {
178
178
  type: String,
179
179
  default: ',',
180
- }
180
+ },
181
+ // 根据变量限制部门时,根据部门表的哪个字段进行过滤,默认是code
182
+ limitFilterColumn: {
183
+ type: String,
184
+ default: 'code'
185
+ }
181
186
  },
182
187
  computed: {},
183
188
  watch: {