agilebuilder-ui 1.1.36 → 1.1.37-sit2

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 (68) hide show
  1. package/lib/{401-b8934d65.js → 401-c46a3b20.js} +1 -1
  2. package/lib/{404-743a4631.js → 404-c35a937a.js} +1 -1
  3. package/lib/{iframe-page-5e102433.js → iframe-page-10e94ddd.js} +1 -1
  4. package/lib/{index-a0c08bb5.js → index-f92e8ddb.js} +8140 -8005
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +97 -97
  8. package/lib/{tab-content-iframe-index-e9b465bf.js → tab-content-iframe-index-8113610a.js} +1 -1
  9. package/lib/{tab-content-index-313404d0.js → tab-content-index-3b7f4fa8.js} +1 -1
  10. package/lib/{tache-subprocess-history-7d87cd77.js → tache-subprocess-history-75f40d2a.js} +1 -1
  11. package/package.json +1 -1
  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/organization-input/src/organization-input.vue +34 -12
  38. package/packages/super-grid/src/apis.js +25 -4
  39. package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
  40. package/packages/super-grid/src/dynamic-input.vue +94 -16
  41. package/packages/super-grid/src/formValidatorUtil.js +7 -2
  42. package/packages/super-grid/src/normal-column-content.vue +2 -1
  43. package/packages/super-grid/src/row-operation.vue +23 -13
  44. package/packages/super-grid/src/search-form-item.vue +444 -460
  45. package/packages/super-grid/src/super-grid.vue +73 -45
  46. package/packages/super-grid/src/utils.js +28 -9
  47. package/packages/super-icon/src/index.vue +4 -1
  48. package/packages/utils/value-set.js +25 -33
  49. package/packages/workgroup-tree/src/workgroup-tree.vue +117 -110
  50. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +6 -1
  51. package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +103 -75
  52. package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +229 -208
  53. package/src/api/sso-service.js +6 -5
  54. package/src/store/modules/table.js +0 -1
  55. package/src/styles/theme/dark-blue/sidebar.scss +9 -0
  56. package/src/styles/theme/gray/sidebar.scss +9 -8
  57. package/src/styles/theme/green/sidebar.scss +10 -0
  58. package/src/styles/theme/ocean-blue/sidebar.scss +9 -0
  59. package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +9 -0
  60. package/src/utils/common-util.js +2 -1
  61. package/src/utils/insert_css.js +1 -1
  62. package/src/utils/util.js +19 -0
  63. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
  64. package/src/views/dsc-component/Sidebar/index.vue +36 -18
  65. package/src/views/layout/components/Menubar/Item.vue +0 -9
  66. package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
  67. package/src/views/layout/components/Sidebar/Item.vue +4 -1
  68. package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
@@ -333,6 +333,17 @@
333
333
  <!-- <custom-fma v-if="type==null ||type === ''" /> -->
334
334
  <!-- v-model="newValue" -->
335
335
  <!--必须有@input ,否则无法输入值-->
336
+ <GridRadioInput
337
+ v-else-if="type === 'radio'"
338
+ v-model="innerValue"
339
+ @update:modelValue="innerValue = $event"
340
+ :disabled="disabled"
341
+ :options="options"
342
+ :value-set-options="valueSetOptions"
343
+ :prop="column.prop"
344
+ :entity="row"
345
+ @cellEvent="cellEvent"
346
+ />
336
347
  <el-select
337
348
  v-else-if="type === 'select' && !isDynamicDataSourceSource()"
338
349
  ref="item"
@@ -468,6 +479,7 @@
468
479
  :check-strictly="isCheckStrictly"
469
480
  :department-info="departmentInfo"
470
481
  :disabled="disabled"
482
+ :limit-filter-column="controlConfig?.limitFilterColumn"
471
483
  :fields="fields"
472
484
  :is-join-table="isJoinTable"
473
485
  :models="row"
@@ -525,23 +537,31 @@ import {
525
537
  isDynamicDataSourceSource,
526
538
  isEditOptionFunction,
527
539
  otherFilesToStandard,
528
- getControlConfig
540
+ getControlConfig,
541
+ rowBeforeValidate
529
542
  } from './utils'
530
543
  import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
531
- import { getEntityFieldValue, setEntityFieldValue } from '../../../src/utils/util'
544
+ import {
545
+ getEntityFieldValue,
546
+ setEntityFieldValue,
547
+ getPropValueNew,
548
+ watchPageContextDynamicVariable
549
+ } from '../../../src/utils/util'
532
550
  import { getToken } from '../../../src/utils/auth'
533
551
  import apis from './apis'
534
- import ViewImageDialog from './view-image-dialog'
552
+ import ViewImageDialog from './view-image-dialog.vue'
535
553
  import { $emit } from '../../utils/gogocodeTransfer'
536
554
  import eventBus from './eventBus'
537
555
  import { isMobileBrowser, getAuthSource } from '../../../src/utils/common-util'
538
556
  import { analysisScanValue, setScanAnalysisValue } from './scan-util.ts'
539
557
  import customFormatter from './custom-formatter'
558
+ import GridRadioInput from './components/grid-radio-input.vue'
540
559
  export default {
541
560
  name: 'DynamicInput',
542
561
  components: {
543
562
  dynamicSourceSelect,
544
- ViewImageDialog
563
+ ViewImageDialog,
564
+ GridRadioInput
545
565
  },
546
566
  props: {
547
567
  value: {
@@ -614,7 +634,7 @@ export default {
614
634
  if (defaultValue !== undefined && defaultValue !== null) {
615
635
  innerValue = defaultValue
616
636
  }
617
- const disabled = isDisableEdit(this.column.prop, this.listCode, this.row)
637
+ const disabled = isDisableEdit(this.column.prop, this.listCode, this.row, this.rowIndex)
618
638
  this.$emit('change-disabled', disabled)
619
639
  const defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
620
640
  if (!this.listCode) {
@@ -664,7 +684,6 @@ export default {
664
684
  // 表示手机浏览器访问的
665
685
  userAgent = 'browser'
666
686
  }
667
- console.log('superGrid----window.location.protocol---', window.location.protocol)
668
687
  const isDingTalk = getAuthSource() === 'dingtalk' ? true : false
669
688
  const isApk = isMobile && userAgent && userAgent === 'app' ? true : false
670
689
  const isShowScanIcon =
@@ -677,14 +696,6 @@ export default {
677
696
  const colConfigure = gridParams.colConfigureMap ? gridParams.colConfigureMap[this.column.prop] : null
678
697
  const runtimeInfo = colConfigure && colConfigure.runtime ? colConfigure.runtime : {}
679
698
  const designProperty = runtimeInfo.props ? runtimeInfo.props : {}
680
- console.log(
681
- 'super-grid-dynamicInput--designProperty=',
682
- designProperty,
683
- 'colConfigure=',
684
- colConfigure,
685
- 'gridParams.colConfigureMap=',
686
- gridParams.colConfigureMap
687
- )
688
699
  return {
689
700
  deptManTree: false, // 是否是部门人员树
690
701
  isMultiTree: false, // 是否是多选树
@@ -840,6 +851,7 @@ export default {
840
851
  }
841
852
  }
842
853
  }
854
+
843
855
  if (this.column.orgTreeSet) {
844
856
  const orgTreeSet = JSON.parse(this.column.orgTreeSet)
845
857
  if (this.type.indexOf('DeptTree') > 0 && orgTreeSet.checkStrictly) {
@@ -1041,6 +1053,7 @@ export default {
1041
1053
  // 说明是工作组树
1042
1054
  this.wgTree = true
1043
1055
  }
1056
+ this.deptScopeLimit()
1044
1057
  }
1045
1058
  },
1046
1059
  orgTreeSetSort() {
@@ -1133,7 +1146,6 @@ export default {
1133
1146
  this.blurEvent()
1134
1147
  isInputVal = true
1135
1148
  if (this.innerValue && this.isInputControl() && this.column.dataType === 'TEXT') {
1136
- console.log('trim value', this.innerValue)
1137
1149
  this.innerValue = this.innerValue.trim()
1138
1150
  }
1139
1151
  }
@@ -1320,6 +1332,12 @@ export default {
1320
1332
  }
1321
1333
  }
1322
1334
  }
1335
+ this.callCustomEventWithParam('uploaded', {
1336
+ value: response,
1337
+ row: this.row,
1338
+ column: this.column,
1339
+ extendParams: this.extendParams
1340
+ })
1323
1341
  }
1324
1342
  this.annexUploadFlag = false
1325
1343
  },
@@ -1837,6 +1855,12 @@ export default {
1837
1855
  $emit(this, 'refresMainTableFields', map)
1838
1856
  },
1839
1857
  deleteSuccess(deleteFile) {
1858
+ this.callCustomEventWithParam('deleted', {
1859
+ value: deleteFile,
1860
+ row: this.row,
1861
+ column: this.column,
1862
+ extendParams: this.extendParams
1863
+ })
1840
1864
  console.log('deleteSuccess', deleteFile, this.fileInfo)
1841
1865
  },
1842
1866
  // 时间格式判断是否是字符串类型,如果是字符串类型使用格式化的数据,如果是时间格式的显示时间搓
@@ -1977,10 +2001,17 @@ export default {
1977
2001
  this.blurEvent()
1978
2002
  },
1979
2003
  packageCustomRules(columnRule) {
1980
- console.log('packageCustomRules---columnRule=', columnRule)
1981
2004
  if (!columnRule) {
1982
2005
  return
1983
2006
  }
2007
+ let beforeValidateResult = true
2008
+ if (columnRule.beforeValidate) {
2009
+ const gridParams = store.get(this.listCode)
2010
+ beforeValidateResult = rowBeforeValidate(columnRule, gridParams, this.row, this.rowIndex)
2011
+ if (beforeValidateResult === false) {
2012
+ return
2013
+ }
2014
+ }
1984
2015
  if (columnRule.disabled !== undefined) {
1985
2016
  this.$emit('change-disabled', columnRule.disabled)
1986
2017
  }
@@ -2021,6 +2052,53 @@ export default {
2021
2052
  // 表示没有跳转页面配置
2022
2053
  this.callCustomEvent(eventName)
2023
2054
  }
2055
+ },
2056
+ deptScopeLimit() {
2057
+ if (this.controlConfig && this.controlConfig.deptScope) {
2058
+ // 表示有部门范围限制
2059
+ if (this.controlConfig.deptScope == 'field' && this.controlConfig.deptScopeField) {
2060
+ if (this.controlConfig.deptScopeField.indexOf('${row.') === 0) {
2061
+ // 表示是行记录的字段
2062
+ const fieldName = this.controlConfig.deptScopeField.replace('${row.', '').replace('}', '')
2063
+ if (this.row[fieldName]) {
2064
+ this.departmentInfo = this.row[fieldName].split(',')
2065
+ } else {
2066
+ this.departmentInfo = []
2067
+ }
2068
+ this.$watch('row.' + fieldName, (newVal, oldVal) => {
2069
+ if (newVal) {
2070
+ this.departmentInfo = newVal.split(',')
2071
+ } else {
2072
+ this.departmentInfo = []
2073
+ }
2074
+ })
2075
+ } else {
2076
+ // 表示是页面pageContext的字段
2077
+ this.setLimitDepartmentInfo()
2078
+ if (!this.controlConfig.deptScopeField.indexOf('${fixed.') === 0) {
2079
+ watchPageContextDynamicVariable(
2080
+ this,
2081
+ this.pageContext,
2082
+ this.controlConfig.deptScopeField,
2083
+ (newVal, oldVal) => {
2084
+ this.setLimitDepartmentInfo()
2085
+ }
2086
+ )
2087
+ }
2088
+ }
2089
+ } else if (this.controlConfig.deptScope == 'depts' && this.controlConfig.deptScopeCodes) {
2090
+ // 表示固定部门范围
2091
+ this.departmentInfo = this.controlConfig.deptScopeCodes.split(',')
2092
+ }
2093
+ }
2094
+ },
2095
+ setLimitDepartmentInfo() {
2096
+ const deptScopeFieldValue = getPropValueNew(this.controlConfig.deptScopeField, this.pageContext, this.row)
2097
+ if (deptScopeFieldValue) {
2098
+ this.departmentInfo = deptScopeFieldValue.split(',')
2099
+ } else {
2100
+ this.departmentInfo = []
2101
+ }
2024
2102
  }
2025
2103
  }
2026
2104
  }
@@ -117,7 +117,12 @@ function setRules(rules, editField, listCode, customRules) {
117
117
  item.pattern = new RegExp(item.pattern)
118
118
  }
119
119
  })
120
- validations = validations.concat(columnCustomRules)
120
+ // validations = validations.concat(columnCustomRules)
121
+ if (columnCustomRules && columnCustomRules.length > 0) {
122
+ validations = columnCustomRules
123
+ } else {
124
+ validations = validations.concat(columnCustomRules)
125
+ }
121
126
  if (prop.indexOf('.') > 0) {
122
127
  setObjectPropRule(editField, rules, validations)
123
128
  } else {
@@ -189,7 +194,7 @@ function setRuleDataType(dataType, rule) {
189
194
  if (!rule.type) {
190
195
  if (dataType === 'BOOLEAN') {
191
196
  rule.type = 'boolean'
192
- }
197
+ }
193
198
  return rule
194
199
  }
195
200
  }
@@ -106,8 +106,10 @@
106
106
  :is-show="operation.isShow"
107
107
  :label="operation.props.label ? operation.props.label : row[column.prop]"
108
108
  :on-click="operation.onClick"
109
+ :operation="operation"
109
110
  :operation-index="operationIndex"
110
111
  :operation-setting="operation.props"
112
+ :event-name="operation.eventName"
111
113
  :row-index="rowIndex"
112
114
  :list-code="listCode"
113
115
  :parent-form-data="parentFormData"
@@ -1184,7 +1186,6 @@ export default {
1184
1186
  return 'primary'
1185
1187
  },
1186
1188
  changeDisabled(state) {
1187
- debugger
1188
1189
  this.disabled = state
1189
1190
  },
1190
1191
  refreshList() {
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
3
3
  @blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
4
- <span :style="myStyle">
4
+ <span class="table-operation-row-btn" :style="myStyle">
5
5
  <template v-if="isShowButton()">
6
6
  <el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
7
- <template v-if="operationSettingData.permission">
7
+ <template v-if="operationSettingData?.permission">
8
8
  <component
9
9
  v-bind="operationSettingData"
10
10
  :is="isElementType"
@@ -77,9 +77,13 @@ export default {
77
77
  type: String,
78
78
  default: null,
79
79
  },
80
+ operation: {
81
+ type: Object,
82
+ default: () => ({}),
83
+ },
80
84
  operationSetting: {
81
85
  type: Object,
82
- default: null,
86
+ default: () => ({}),
83
87
  },
84
88
  operationIndex: {
85
89
  type: Number,
@@ -92,6 +96,11 @@ export default {
92
96
  parentFormData: {
93
97
  type: Object,
94
98
  default: null
99
+ },
100
+ // 按钮绑定的事件名称
101
+ eventName: {
102
+ type: String,
103
+ default: null
95
104
  }
96
105
  },
97
106
  data() {
@@ -104,19 +113,20 @@ export default {
104
113
  ...mapGetters(['preventReclick']),
105
114
  // 是否是保存按钮
106
115
  isSaveRow() {
107
- return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
116
+ return ['lineEditSave', 'saveRow'].includes(this.eventName)
108
117
  },
109
118
  // 是否是删除按钮
110
119
  isDeleteRow() {
111
- return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
120
+ return ['lineEditDelete', 'deleteRow'].includes(this.eventName)
112
121
  },
113
122
  // 是否是修改按钮
114
123
  isEditRow() {
115
- return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
124
+ return ['lineEditUpdate', 'editRow'].includes(this.eventName)
116
125
  },
117
126
  // 是否是取消按钮
118
127
  isRestoreRow() {
119
- return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
128
+ return ['restoreEdit', 'restoreRow'].includes(this.eventName)
129
+ // return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
120
130
  },
121
131
  // 前置图标
122
132
  prefixIcon() {
@@ -142,16 +152,16 @@ export default {
142
152
  },
143
153
  // 后置图标
144
154
  suffixIcon() {
145
- if(['right'].includes(this.operationSettingData.iconPosition)) return this.operationSetting.iconValue
155
+ if(['right'].includes(this.operationSetting.iconPosition)) return this.operationSetting.iconValue
146
156
  return undefined
147
157
  },
148
158
  // 是否显示文字按钮 > 图标模式
149
159
  isTextIcon() {
150
160
  if (this.isTableBtnLinkShow) {
151
- if (this.operationSettingData.isTextIcon === undefined) {
161
+ if (this.operationSetting.isTextIcon === undefined) {
152
162
  return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
153
163
  }
154
- return this.operationSettingData.isTextIcon
164
+ return this.operationSetting.isTextIcon
155
165
  } else {
156
166
  return false
157
167
  }
@@ -166,14 +176,14 @@ export default {
166
176
  },
167
177
  // 是否自动开启表格 按钮 转 文字按钮
168
178
  isTableBtnLinkShow() {
169
- if (this.operationSetting.text) return true
179
+ if (this.operationSetting?.text) return true
170
180
  if (this.isTableBtnLink && this.elementType === 'el-button') {
171
- return [this.operationSetting.text, this.operationSetting.plain, this.operationSetting.round].every(v => v === undefined)
181
+ return [this.operationSetting?.text, this.operationSetting?.plain, this.operationSetting?.round].every(v => v === undefined)
172
182
  }
173
183
  return false
174
184
  },
175
185
  operationSettingData() {
176
- const dataList = { ...this.operationSetting }
186
+ const dataList = { ...(this.operationSetting ?? {}) }
177
187
  if (this.isTableBtnLinkShow) {
178
188
  dataList.underline = false
179
189
  delete dataList.text