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,11 +381,14 @@ export default { ...@@ -380,11 +381,14 @@ 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() {
if (this.isFlag) {
this.isFlag = false
this.$refs.editFormRef.$refs[this.handleFormRef].validate((valid) => { this.$refs.editFormRef.$refs[this.handleFormRef].validate((valid) => {
console.log(valid) console.log(valid)
if (valid) { if (valid) {
...@@ -395,6 +399,7 @@ export default { ...@@ -395,6 +399,7 @@ export default {
}) })
} }
} }
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!