workflow-editor 0.0.83-up → 0.0.85-up
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-6a701dc9.js → 401-6d8d823d.js} +1 -1
- package/lib/{404-8ed89b16.js → 404-71e6f04b.js} +1 -1
- package/lib/{iframe-page-4ef6b386.js → iframe-page-f6d03745.js} +1 -1
- package/lib/{index-351e0152.js → index-acd72790.js} +879 -842
- package/lib/{tab-content-iframe-index-e7771116.js → tab-content-iframe-index-a109cac2.js} +1 -1
- package/lib/{tab-content-index-e4602841.js → tab-content-index-f39a83c1.js} +1 -1
- package/lib/{tache-subprocess-history-5d2e1d7a.js → tache-subprocess-history-8ec86536.js} +1 -1
- package/lib/workflow-editor.css +1 -1
- package/lib/workflow-editor.js +1 -1
- package/lib/workflow-editor.umd.cjs +13 -13
- package/package.json +2 -2
- package/packages/plugins/formValidatorUtil.js +38 -29
- package/packages/workflow-editor/src/workflow-editor.vue +17 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workflow-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.85-up",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/workflow-editor.js",
|
|
7
7
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
19
|
-
"agilebuilder-ui": "1.1.
|
|
19
|
+
"agilebuilder-ui": "1.1.83",
|
|
20
20
|
"axios": "^1.5.1",
|
|
21
21
|
"element-plus": "^2.4.1",
|
|
22
22
|
"font-awesome": "^4.7.0",
|
|
@@ -676,38 +676,47 @@ function formValidator(
|
|
|
676
676
|
subTablePageInfo,
|
|
677
677
|
isNeedField
|
|
678
678
|
) {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
validateRulesKeys.
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
679
|
+
// 兼容 workflowRules= { CODE:[{xxxxx}], rules:{},subRules:{}}格式的验证
|
|
680
|
+
let validateResult = validator(entity, validateRules, null, isSql, null, null, isNeedField)
|
|
681
|
+
if ((!isNeedField && validateResult === true) || (isNeedField && validateResult.msg === true)) {
|
|
682
|
+
// 先验证流程编辑器配置的字段必填验证
|
|
683
|
+
const validateRulesKeys = Object.keys(validateRules)
|
|
684
|
+
// 脚本控制的验证会走下面的验证代码
|
|
685
|
+
if (
|
|
686
|
+
validateRulesKeys.indexOf('rules') >= 0 &&
|
|
687
|
+
validateRulesKeys.indexOf('subRules') >= 0 &&
|
|
688
|
+
validateRulesKeys.indexOf('totalSubRules') >= 0
|
|
689
|
+
) {
|
|
690
|
+
// 表示是带有子表验证规则的
|
|
691
|
+
const rules = validateRules.rules
|
|
692
|
+
const subRules = validateRules.subRules
|
|
693
|
+
const totalSubRules = validateRules.totalSubRules
|
|
694
|
+
const dataTypeMap = validateRules.dataTypeMap
|
|
695
|
+
validateResult = validator(entity, rules, null, isSql, null, null, isNeedField)
|
|
696
|
+
if ((!isNeedField && validateResult === true) || (isNeedField && validateResult.msg === true)) {
|
|
697
|
+
if (subRules || totalSubRules) {
|
|
698
|
+
validateResult = validateSub(
|
|
699
|
+
entity,
|
|
700
|
+
subRules,
|
|
701
|
+
totalSubRules,
|
|
702
|
+
isSql,
|
|
703
|
+
dataTypeMap,
|
|
704
|
+
additionalParamMap,
|
|
705
|
+
taskParamMap,
|
|
706
|
+
contextParameter,
|
|
707
|
+
subTablePageInfo,
|
|
708
|
+
isNeedField
|
|
709
|
+
)
|
|
710
|
+
}
|
|
705
711
|
}
|
|
712
|
+
return validateResult
|
|
713
|
+
} else if(validateRulesKeys.indexOf('rules') >= 0) {
|
|
714
|
+
// 表示没有子表验证规则
|
|
715
|
+
const rules = validateRules.rules
|
|
716
|
+
return validator(entity, rules, null, isSql, null, null, isNeedField)
|
|
706
717
|
}
|
|
718
|
+
} else{
|
|
707
719
|
return validateResult
|
|
708
|
-
} else {
|
|
709
|
-
// 表示没有子表验证规则
|
|
710
|
-
return validator(entity, validateRules, null, isSql, null, null, isNeedField)
|
|
711
720
|
}
|
|
712
721
|
}
|
|
713
722
|
|
|
@@ -344,6 +344,7 @@ export default {
|
|
|
344
344
|
if (this.process && this.process.attr) {
|
|
345
345
|
this.setProcessCode(this.process.attr.code)
|
|
346
346
|
}
|
|
347
|
+
this.checkPageCode()
|
|
347
348
|
// 得到表单字段放到vuex
|
|
348
349
|
this.fetchFormFields()
|
|
349
350
|
this.clearCanvas()
|
|
@@ -721,6 +722,22 @@ export default {
|
|
|
721
722
|
this.$alert(this.$t('workflowEditorMessage.enabledSuccessfully'))
|
|
722
723
|
})
|
|
723
724
|
}
|
|
725
|
+
},
|
|
726
|
+
// 检查并更新页面编码
|
|
727
|
+
checkPageCode() {
|
|
728
|
+
if (this.pageCode) {
|
|
729
|
+
if (this.process.properties) {
|
|
730
|
+
if (this.process.properties.parameterSettings && this.process.properties.parameterSettings.doTask) {
|
|
731
|
+
const url = this.process.properties.parameterSettings.doTask.url
|
|
732
|
+
if (url && url.startsWith('page:')) {
|
|
733
|
+
const existingPageCode = url.substring(5)
|
|
734
|
+
if (existingPageCode !== this.pageCode) {
|
|
735
|
+
this.process.properties.parameterSettings.doTask.url = 'page:' + this.pageCode
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
724
741
|
}
|
|
725
742
|
}
|
|
726
743
|
}
|