agilebuilder-ui 1.1.36-tmp4 → 1.1.37-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-c55bdcf2.js → 401-ce7358c2.js} +1 -1
- package/lib/{404-c1dbd5e1.js → 404-8a0c9304.js} +1 -1
- package/lib/{iframe-page-917912ae.js → iframe-page-53f52856.js} +1 -1
- package/lib/{index-6ec53ef7.js → index-2e61e67f.js} +13090 -13013
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +97 -97
- package/lib/{tab-content-iframe-index-46a76242.js → tab-content-iframe-index-e0a67343.js} +1 -1
- package/lib/{tab-content-index-132379e6.js → tab-content-index-fd4f9ad4.js} +1 -1
- package/lib/{tache-subprocess-history-384455d6.js → tache-subprocess-history-7381fba2.js} +1 -1
- package/package.json +2 -2
- 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 +112 -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 +26 -51
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +25 -45
- 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-preview/src/fs-preview.vue +20 -2
- package/packages/fs-upload-list/src/fs-upload-list.vue +30 -7
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
- package/packages/fs-upload-new/src/fs-preview-new.vue +27 -15
- package/packages/index.js +4 -4
- package/packages/organization-input/src/organization-input.vue +34 -12
- package/packages/super-grid/src/apis.js +25 -4
- package/packages/super-grid/src/dynamic-input.vue +85 -15
- 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 +28 -9
- 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/directives/permission/index.js +4 -4
- package/src/index.js +71 -2
- package/src/store/modules/table.js +0 -1
- package/src/styles/theme/dark-blue/sidebar.scss +9 -0
- package/src/styles/theme/gray/sidebar.scss +9 -8
- package/src/styles/theme/green/sidebar.scss +10 -0
- package/src/styles/theme/ocean-blue/sidebar.scss +9 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +9 -0
- package/src/utils/common-util.js +2 -1
- package/src/utils/insert_css.js +1 -1
- package/src/utils/util.js +19 -0
- 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
- package/vite.config.js +1 -1
|
@@ -333,6 +333,23 @@
|
|
|
333
333
|
<!-- <custom-fma v-if="type==null ||type === ''" /> -->
|
|
334
334
|
<!-- v-model="newValue" -->
|
|
335
335
|
<!--必须有@input ,否则无法输入值-->
|
|
336
|
+
<el-radio-group
|
|
337
|
+
v-else-if="type === 'radio' && !isDynamicDataSourceSource()"
|
|
338
|
+
ref="item"
|
|
339
|
+
v-model="innerValue"
|
|
340
|
+
:disabled="disabled"
|
|
341
|
+
:title="getClassOptionTitle(innerValue)"
|
|
342
|
+
@blur="cellEvent('blur', $event)"
|
|
343
|
+
@change="cellEvent('change', $event)"
|
|
344
|
+
@clear="cellEvent('clear', $event)"
|
|
345
|
+
@focus="cellEvent('focus', $event)"
|
|
346
|
+
@input="cellEvent('input', $event)"
|
|
347
|
+
@visible-change="cellEvent('visible-change', $event)"
|
|
348
|
+
>
|
|
349
|
+
<el-radio v-for="item in options" :key="item.value" :value="item.value">
|
|
350
|
+
{{ item.label }}
|
|
351
|
+
</el-radio>
|
|
352
|
+
</el-radio-group>
|
|
336
353
|
<el-select
|
|
337
354
|
v-else-if="type === 'select' && !isDynamicDataSourceSource()"
|
|
338
355
|
ref="item"
|
|
@@ -468,6 +485,7 @@
|
|
|
468
485
|
:check-strictly="isCheckStrictly"
|
|
469
486
|
:department-info="departmentInfo"
|
|
470
487
|
:disabled="disabled"
|
|
488
|
+
:limit-filter-column="controlConfig?.limitFilterColumn"
|
|
471
489
|
:fields="fields"
|
|
472
490
|
:is-join-table="isJoinTable"
|
|
473
491
|
:models="row"
|
|
@@ -525,13 +543,19 @@ import {
|
|
|
525
543
|
isDynamicDataSourceSource,
|
|
526
544
|
isEditOptionFunction,
|
|
527
545
|
otherFilesToStandard,
|
|
528
|
-
getControlConfig
|
|
546
|
+
getControlConfig,
|
|
547
|
+
rowBeforeValidate
|
|
529
548
|
} from './utils'
|
|
530
549
|
import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
|
|
531
|
-
import {
|
|
550
|
+
import {
|
|
551
|
+
getEntityFieldValue,
|
|
552
|
+
setEntityFieldValue,
|
|
553
|
+
getPropValueNew,
|
|
554
|
+
watchPageContextDynamicVariable
|
|
555
|
+
} from '../../../src/utils/util'
|
|
532
556
|
import { getToken } from '../../../src/utils/auth'
|
|
533
557
|
import apis from './apis'
|
|
534
|
-
import ViewImageDialog from './view-image-dialog'
|
|
558
|
+
import ViewImageDialog from './view-image-dialog.vue'
|
|
535
559
|
import { $emit } from '../../utils/gogocodeTransfer'
|
|
536
560
|
import eventBus from './eventBus'
|
|
537
561
|
import { isMobileBrowser, getAuthSource } from '../../../src/utils/common-util'
|
|
@@ -614,7 +638,7 @@ export default {
|
|
|
614
638
|
if (defaultValue !== undefined && defaultValue !== null) {
|
|
615
639
|
innerValue = defaultValue
|
|
616
640
|
}
|
|
617
|
-
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row)
|
|
641
|
+
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row, this.rowIndex)
|
|
618
642
|
this.$emit('change-disabled', disabled)
|
|
619
643
|
const defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
620
644
|
if (!this.listCode) {
|
|
@@ -664,7 +688,6 @@ export default {
|
|
|
664
688
|
// 表示手机浏览器访问的
|
|
665
689
|
userAgent = 'browser'
|
|
666
690
|
}
|
|
667
|
-
console.log('superGrid----window.location.protocol---', window.location.protocol)
|
|
668
691
|
const isDingTalk = getAuthSource() === 'dingtalk' ? true : false
|
|
669
692
|
const isApk = isMobile && userAgent && userAgent === 'app' ? true : false
|
|
670
693
|
const isShowScanIcon =
|
|
@@ -677,14 +700,6 @@ export default {
|
|
|
677
700
|
const colConfigure = gridParams.colConfigureMap ? gridParams.colConfigureMap[this.column.prop] : null
|
|
678
701
|
const runtimeInfo = colConfigure && colConfigure.runtime ? colConfigure.runtime : {}
|
|
679
702
|
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
703
|
return {
|
|
689
704
|
deptManTree: false, // 是否是部门人员树
|
|
690
705
|
isMultiTree: false, // 是否是多选树
|
|
@@ -840,6 +855,7 @@ export default {
|
|
|
840
855
|
}
|
|
841
856
|
}
|
|
842
857
|
}
|
|
858
|
+
|
|
843
859
|
if (this.column.orgTreeSet) {
|
|
844
860
|
const orgTreeSet = JSON.parse(this.column.orgTreeSet)
|
|
845
861
|
if (this.type.indexOf('DeptTree') > 0 && orgTreeSet.checkStrictly) {
|
|
@@ -1041,6 +1057,7 @@ export default {
|
|
|
1041
1057
|
// 说明是工作组树
|
|
1042
1058
|
this.wgTree = true
|
|
1043
1059
|
}
|
|
1060
|
+
this.deptScopeLimit()
|
|
1044
1061
|
}
|
|
1045
1062
|
},
|
|
1046
1063
|
orgTreeSetSort() {
|
|
@@ -1133,7 +1150,6 @@ export default {
|
|
|
1133
1150
|
this.blurEvent()
|
|
1134
1151
|
isInputVal = true
|
|
1135
1152
|
if (this.innerValue && this.isInputControl() && this.column.dataType === 'TEXT') {
|
|
1136
|
-
console.log('trim value', this.innerValue)
|
|
1137
1153
|
this.innerValue = this.innerValue.trim()
|
|
1138
1154
|
}
|
|
1139
1155
|
}
|
|
@@ -1977,10 +1993,17 @@ export default {
|
|
|
1977
1993
|
this.blurEvent()
|
|
1978
1994
|
},
|
|
1979
1995
|
packageCustomRules(columnRule) {
|
|
1980
|
-
console.log('packageCustomRules---columnRule=', columnRule)
|
|
1981
1996
|
if (!columnRule) {
|
|
1982
1997
|
return
|
|
1983
1998
|
}
|
|
1999
|
+
let beforeValidateResult = true
|
|
2000
|
+
if (columnRule.beforeValidate) {
|
|
2001
|
+
const gridParams = store.get(this.listCode)
|
|
2002
|
+
beforeValidateResult = rowBeforeValidate(columnRules, gridParams, this.row, this.rowIndex)
|
|
2003
|
+
if (beforeValidateResult === false) {
|
|
2004
|
+
return
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
1984
2007
|
if (columnRule.disabled !== undefined) {
|
|
1985
2008
|
this.$emit('change-disabled', columnRule.disabled)
|
|
1986
2009
|
}
|
|
@@ -2021,6 +2044,53 @@ export default {
|
|
|
2021
2044
|
// 表示没有跳转页面配置
|
|
2022
2045
|
this.callCustomEvent(eventName)
|
|
2023
2046
|
}
|
|
2047
|
+
},
|
|
2048
|
+
deptScopeLimit() {
|
|
2049
|
+
if (this.controlConfig && this.controlConfig.deptScope) {
|
|
2050
|
+
// 表示有部门范围限制
|
|
2051
|
+
if (this.controlConfig.deptScope == 'field' && this.controlConfig.deptScopeField) {
|
|
2052
|
+
if (this.controlConfig.deptScopeField.indexOf('${row.') === 0) {
|
|
2053
|
+
// 表示是行记录的字段
|
|
2054
|
+
const fieldName = this.controlConfig.deptScopeField.replace('${row.', '').replace('}', '')
|
|
2055
|
+
if (this.row[fieldName]) {
|
|
2056
|
+
this.departmentInfo = this.row[fieldName].split(',')
|
|
2057
|
+
} else {
|
|
2058
|
+
this.departmentInfo = []
|
|
2059
|
+
}
|
|
2060
|
+
this.$watch('row.' + fieldName, (newVal, oldVal) => {
|
|
2061
|
+
if (newVal) {
|
|
2062
|
+
this.departmentInfo = newVal.split(',')
|
|
2063
|
+
} else {
|
|
2064
|
+
this.departmentInfo = []
|
|
2065
|
+
}
|
|
2066
|
+
})
|
|
2067
|
+
} else {
|
|
2068
|
+
// 表示是页面pageContext的字段
|
|
2069
|
+
this.setLimitDepartmentInfo()
|
|
2070
|
+
if (!this.controlConfig.deptScopeField.indexOf('${fixed.') === 0) {
|
|
2071
|
+
watchPageContextDynamicVariable(
|
|
2072
|
+
this,
|
|
2073
|
+
this.pageContext,
|
|
2074
|
+
this.controlConfig.deptScopeField,
|
|
2075
|
+
(newVal, oldVal) => {
|
|
2076
|
+
this.setLimitDepartmentInfo()
|
|
2077
|
+
}
|
|
2078
|
+
)
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
} else if (this.controlConfig.deptScope == 'depts' && this.controlConfig.deptScopeCodes) {
|
|
2082
|
+
// 表示固定部门范围
|
|
2083
|
+
this.departmentInfo = this.controlConfig.deptScopeCodes.split(',')
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2087
|
+
setLimitDepartmentInfo() {
|
|
2088
|
+
const deptScopeFieldValue = getPropValueNew(this.controlConfig.deptScopeField, this.pageContext, this.row)
|
|
2089
|
+
if (deptScopeFieldValue) {
|
|
2090
|
+
this.departmentInfo = deptScopeFieldValue.split(',')
|
|
2091
|
+
} else {
|
|
2092
|
+
this.departmentInfo = []
|
|
2093
|
+
}
|
|
2024
2094
|
}
|
|
2025
2095
|
}
|
|
2026
2096
|
}
|
|
@@ -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
|
|
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:
|
|
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
|
|
116
|
+
return ['lineEditSave', 'saveRow'].includes(this.eventName)
|
|
108
117
|
},
|
|
109
118
|
// 是否是删除按钮
|
|
110
119
|
isDeleteRow() {
|
|
111
|
-
return
|
|
120
|
+
return ['lineEditDelete', 'deleteRow'].includes(this.eventName)
|
|
112
121
|
},
|
|
113
122
|
// 是否是修改按钮
|
|
114
123
|
isEditRow() {
|
|
115
|
-
return
|
|
124
|
+
return ['lineEditUpdate', 'editRow'].includes(this.eventName)
|
|
116
125
|
},
|
|
117
126
|
// 是否是取消按钮
|
|
118
127
|
isRestoreRow() {
|
|
119
|
-
return
|
|
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.
|
|
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.
|
|
161
|
+
if (this.operationSetting.isTextIcon === undefined) {
|
|
152
162
|
return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
|
|
153
163
|
}
|
|
154
|
-
return this.
|
|
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
|
|
179
|
+
if (this.operationSetting?.text) return true
|
|
170
180
|
if (this.isTableBtnLink && this.elementType === 'el-button') {
|
|
171
|
-
return [this.operationSetting
|
|
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
|
|
@@ -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: [
|
|
@@ -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
|
}
|
|
@@ -264,9 +264,18 @@ 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
|
+
let beforeValidateResult = true
|
|
275
|
+
if (columnRules.beforeValidate) {
|
|
276
|
+
beforeValidateResult = rowBeforeValidate(columnRules, gridParams, row, rowIndex)
|
|
277
|
+
}
|
|
278
|
+
if (columnRules && columnRules.disabled && beforeValidateResult !== false) {
|
|
270
279
|
isDiabled = true
|
|
271
280
|
}
|
|
272
281
|
}
|
|
@@ -275,6 +284,16 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
275
284
|
return isDiabled
|
|
276
285
|
}
|
|
277
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
|
+
|
|
278
297
|
// 行编辑时,是否必填某字段, 如果是流程表单子表, 需要将列表管理里配置的必填字段去掉,使用流程内的子表编辑权限控制
|
|
279
298
|
export function isRequiredEdit(column, listCode) {
|
|
280
299
|
const prop = column.prop
|
|
@@ -565,7 +584,6 @@ export function getTableHeight(superGrid, listCode, pageHeight) {
|
|
|
565
584
|
rect = superGrid.$el.getBoundingClientRect()
|
|
566
585
|
}
|
|
567
586
|
const totalHeight = window.innerHeight - (rect?.y ?? 0) - 110
|
|
568
|
-
console.log('rect=', rect, 'window.innerHeight=', window.innerHeight, 'totalHeight=', totalHeight)
|
|
569
587
|
return totalHeight
|
|
570
588
|
|
|
571
589
|
// let topDivHeight = 120
|
|
@@ -755,9 +773,12 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, b
|
|
|
755
773
|
|
|
756
774
|
// 值设置是否是动态数据源类型的数据源
|
|
757
775
|
export function isDynamicDataSourceSource(column) {
|
|
758
|
-
if(column.valueSetOptions) {
|
|
776
|
+
if (column.valueSetOptions) {
|
|
759
777
|
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
760
|
-
if(
|
|
778
|
+
if (
|
|
779
|
+
(valueSetOptionsObj.type && valueSetOptionsObj.type === 'dynamicData') ||
|
|
780
|
+
valueSetOptionsObj.dynamicDataSourceCode
|
|
781
|
+
) {
|
|
761
782
|
// 表示是动态数据源
|
|
762
783
|
return true
|
|
763
784
|
}
|
|
@@ -782,10 +803,8 @@ export function getLastPageNum(total, rowsPerPage) {
|
|
|
782
803
|
// 纵向滚动条滚动最底部功能
|
|
783
804
|
export function scrollYToBottom(listCode) {
|
|
784
805
|
const scrollDivElement = document.querySelector('.' + listCode + ' .el-table--scrollable-y .el-table__body-wrapper')
|
|
785
|
-
console.log('scrollDivElement==', scrollDivElement)
|
|
786
806
|
if (scrollDivElement && scrollDivElement !== null) {
|
|
787
807
|
// 表示有滚动条,需要将滚动条滚动最底部
|
|
788
|
-
console.log('scrollDivElement==scrollDivElement.scrollHeight=', scrollDivElement.scrollHeight)
|
|
789
808
|
scrollDivElement.scrollTop = scrollDivElement.scrollHeight
|
|
790
809
|
}
|
|
791
810
|
}
|
|
@@ -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 {
|