vue2-client 1.15.29 → 1.15.30
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/package.json
CHANGED
@@ -68,7 +68,7 @@ export default {
|
|
68
68
|
},
|
69
69
|
mounted () {
|
70
70
|
this.activeKey = this.defaultActiveKey
|
71
|
-
this.tabPaneChange('
|
71
|
+
this.tabPaneChange('initTabLoading')
|
72
72
|
},
|
73
73
|
methods: {
|
74
74
|
// 自定义函数中调用的方法 这个不能删
|
@@ -82,9 +82,9 @@ export default {
|
|
82
82
|
getConfigByNameAsync,
|
83
83
|
tabPaneChange (newKey) {
|
84
84
|
let result = {}
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
if (this.activeKey === newKey) {
|
86
|
+
return
|
87
|
+
}
|
88
88
|
const oldKey = this.activeKey
|
89
89
|
if (this.config.changeFunc) {
|
90
90
|
let oldRef
|
@@ -1059,6 +1059,10 @@ export default {
|
|
1059
1059
|
const stepDefine = this.targetStepDefine[i]
|
1060
1060
|
const key = this.getRealKey(stepDefine.model, isKeyHandle)
|
1061
1061
|
if (Object.prototype.hasOwnProperty.call(dataObj, key)) {
|
1062
|
+
// 历史表单内容根据流程中配置的表单项顺序进行渲染,需要兼容表单项展示函数
|
1063
|
+
if (stepDefine.showFormItemFunc && !(await this.showFormItemFunc(stepDefine.showFormItemFunc, dataObj))) {
|
1064
|
+
continue
|
1065
|
+
}
|
1062
1066
|
let value = dataObj[key]
|
1063
1067
|
// 字典值处理
|
1064
1068
|
if (stepDefine.formType === 'select' && stepDefine.selectType === 'key') {
|
@@ -1361,6 +1365,26 @@ export default {
|
|
1361
1365
|
this.$message.error('执行操作失败')
|
1362
1366
|
}
|
1363
1367
|
},
|
1368
|
+
// 表单项展示函数--用来渲染历史节点数据时和填写表单显示内容同步
|
1369
|
+
async showFormItemFunc (func, form) {
|
1370
|
+
try {
|
1371
|
+
if (func) {
|
1372
|
+
// 一般展示项函数中不应该存在setForm函数 先屏蔽this.setForm和this.attr的传递还有在this上下文指向不同可能存在异常 流程表单的展示项函数尽量功能单一。有异常默认进行展示(先兼容到这后续有问题进行调整)
|
1373
|
+
const obj = executeStrFunctionByContext(this, func, [form, null, null, util, '新增/修改'])
|
1374
|
+
// 判断是 bool 还是 obj 兼容
|
1375
|
+
if (typeof obj === 'boolean') {
|
1376
|
+
return obj
|
1377
|
+
} else if (obj && typeof obj === 'object') {
|
1378
|
+
// obj 是一个对象,并且不是数组
|
1379
|
+
return obj?.show
|
1380
|
+
}
|
1381
|
+
} else {
|
1382
|
+
return true
|
1383
|
+
}
|
1384
|
+
} catch (e) {
|
1385
|
+
return true
|
1386
|
+
}
|
1387
|
+
},
|
1364
1388
|
// 检查按钮是否显示
|
1365
1389
|
checkButtonVisible (button) {
|
1366
1390
|
try {
|