Commit 04f84338 by Mr. Lan

fix bug.

parent 6373aeaa
Showing with 6 additions and 7 deletions
...@@ -340,9 +340,6 @@ export default { ...@@ -340,9 +340,6 @@ export default {
}) })
}, },
verifyProcess(structureValue) { verifyProcess(structureValue) {
if (structureValue === undefined && structureValue === null) {
structureValue = this.ruleForm.structure
}
for (var r of structureValue.nodes) { for (var r of structureValue.nodes) {
if (r.sort === undefined || r.sort === null || r.sort === '') { if (r.sort === undefined || r.sort === null || r.sort === '') {
return '流程节点顺序不能为空' return '流程节点顺序不能为空'
...@@ -369,14 +366,16 @@ export default { ...@@ -369,14 +366,16 @@ export default {
return '' return ''
}, },
submitForm(formName) { submitForm(formName) {
var r = this.verifyProcess() this.$refs[formName].validate((valid) => {
if (valid) {
var structureValue = this.$refs.wfd.graph.save()
var r = this.verifyProcess(structureValue)
if (r !== '') { if (r !== '') {
this.$message.error(r) this.$message.error(r)
return return
} }
this.$refs[formName].validate((valid) => { if (structureValue.nodes.length > 0 && structureValue.edges.length > 0) {
if (valid) { this.ruleForm.structure = structureValue
if (this.ruleForm.structure.nodes.length > 0 && this.ruleForm.structure.edges.length > 0) {
createProcess(this.ruleForm).then(response => { createProcess(this.ruleForm).then(response => {
this.getList() this.getList()
this.open = false this.open = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment