diff --git a/app/view/component/flow/processFlow.html b/app/view/component/flow/processFlow.html
index 02f2391..6d34674 100644
--- a/app/view/component/flow/processFlow.html
+++ b/app/view/component/flow/processFlow.html
@@ -104,21 +104,6 @@
-
-
- {{disPassValidateText}}
-
-
- 关闭
-
-
-
-
@@ -226,7 +211,6 @@ Vue.component("process-flow", {
displayMode: 'complex', // 'complex'、'simple'
isAddNodeMenuShown: false,
activeMenuIndex: -1,
- isSnackerShown: false,
disPassValidateText:"",
isPassValidate: true
};
@@ -823,10 +807,10 @@ Vue.component("process-flow", {
this.isPassValidate = true
const { lineList, nodeList } = this.workflowConfig;
- // 不允许多个开始节点或结束节点
- if(nodeList.filter(n=>n.properties.type == 'start').length != 1 || nodeList.filter(n=>n.properties.type == 'end').length != 1){
+ // 不允许单节点回环
+ if(lineList.filter(l => l.sourceNodeId == l.targetNodeId).length > 0){
this.isPassValidate = false
- this.disPassValidateText += "只允许存在1个开始节点或结束节点!\n"
+ this.disPassValidateText += "不允许单节点回环!\n"
}
// 不允许没有审核节点
@@ -902,7 +886,7 @@ Vue.component("process-flow", {
// 拿到同一层的条件节点
var conditionNode = element.map(l => nodeList.find(n => n.id === l.targetNodeId))
- if(!_.some(conditionNode, i => i.properties.priority == -1)){
+ if(!_.some(conditionNode, i => i.properties?.priority == -1)){
this.isPassValidate = false
this.disPassValidateText += "不允许存在某层条件节点没有默认条件优先级!\n"
}
@@ -914,11 +898,11 @@ Vue.component("process-flow", {
const element = nodeList[index];
if(['conditionTask'].includes(element.properties.type)){
- if(!element.properties.priority){
+ if(!element.properties?.priority){
this.isPassValidate = false
this.disPassValidateText += `${element.properties.label}节点没有设置优先级!\n`
}else{
- if(element.properties.priority != -1 && element.properties.conditionList.length <= 0){
+ if(element.properties?.priority != -1 && element.properties?.conditionList.length <= 0){
this.isPassValidate = false
this.disPassValidateText += `${element.properties.label}节点没有设置条件组!\n`
}
@@ -947,9 +931,8 @@ Vue.component("process-flow", {
}
if(!this.isPassValidate){
- // await window.vtoast.fail(this.disPassValidateText);
- this.isSnackerShown = true
- throw new Error(this.disPassValidateText)
+ await window.vtoast.fail('流程设置:' + this.disPassValidateText);
+ throw new Error('流程设置:' + this.disPassValidateText)
}
},
closeEditNode(){
@@ -1091,5 +1074,6 @@ Vue.component("process-flow", {
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
+ word-wrap: break-word;
}
diff --git a/app/view/component/tpl/formItemListGenerator.html b/app/view/component/tpl/formItemListGenerator.html
index 95f9e45..bd0da09 100644
--- a/app/view/component/tpl/formItemListGenerator.html
+++ b/app/view/component/tpl/formItemListGenerator.html
@@ -295,8 +295,8 @@ Vue.component("form-item-list-generator", {
// 检查单选多选是否还有选项
this.formItemList.forEach(element => {
if(['single', 'multiple'].includes(element.type) && !(element.optionList && element.optionList.length)){
- window.vtoast.fail("存在选择题没有选项!");
- throw new Error("存在选择题没有选项!")
+ window.vtoast.fail("表单设置:存在选择题没有选项!");
+ throw new Error("表单设置:存在选择题没有选项!")
}
});
diff --git a/app/view/component/workflowEditorDrawer.html b/app/view/component/workflowEditorDrawer.html
index 8c004c0..4c08c9c 100644
--- a/app/view/component/workflowEditorDrawer.html
+++ b/app/view/component/workflowEditorDrawer.html
@@ -45,7 +45,7 @@
-
+
@@ -194,7 +194,16 @@ Vue.component("workflow-editor-drawer", {
this.formObj = formObj;
} else {
this.submitUiActionId = 'createItem';
- this.formObj = {workflowInfo: {}, workflowForm: [], workflowConfig: {lineList: [], nodeList: []}};
+ this.formObj = {workflowInfo: {
+ taskTemplateIcon: '/images/task-template-icon/10001.png',
+ addAuthority: false,
+ modifyAuthority: false,
+ abnormalType: '-1',
+ autoApprovel: '1',
+ },
+ workflowForm: [],
+ workflowConfig: {lineList: [], nodeList: []}
+ };
}
this.$refs.form.resetValidation();
this.loading = false;
@@ -312,6 +321,7 @@ Vue.component("workflow-editor-drawer", {
prepareFormSubmitData() {
const {id, workflowId, workflowInfo, workflowForm} = this.formObj;
const { workflowName, ...data } = workflowInfo
+ if( data.abnormalType == -1 ) data.abnormalUser && delete data.abnormalUser
const workflowConfig = this.$refs.processFlow.getBusinessData();
workflowConfig.nodeList.forEach(node => {
if (node.type === 'userTask') {