Commit 6857ba85 by wangzhihui

防止多次提交

1 parent 63fe0931
...@@ -101,6 +101,7 @@ export default { ...@@ -101,6 +101,7 @@ export default {
}, },
data() { data() {
return { return {
isFlag: true,
isBlock: true, isBlock: true,
handleFormRef: "handleFormRef", handleFormRef: "handleFormRef",
multipleVisible: false, multipleVisible: false,
...@@ -380,19 +381,23 @@ export default { ...@@ -380,19 +381,23 @@ export default {
}, },
submit(params) { submit(params) {
insertOrUpdate(params).then((res) => { insertOrUpdate(params).then((res) => {
this.isFlag = true
this.notice.okTips("操作成功") this.notice.okTips("操作成功")
this.$emit("handleConfigureCourse") this.$emit("handleConfigureCourse")
}) })
}, },
handleSubmit() { handleSubmit() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate((valid) => { if (this.isFlag) {
console.log(valid) this.isFlag = false
if (valid) { this.$refs.editFormRef.$refs[this.handleFormRef].validate((valid) => {
let params = this.handleParams() console.log(valid)
// this.visible = false if (valid) {
this.submit(params) let params = this.handleParams()
} // this.visible = false
}) this.submit(params)
}
})
}
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!