Commit 6d60141e authored by 黎博's avatar 黎博

提交时新增校验

parent aa88ea0d
...@@ -113,6 +113,10 @@ export default { ...@@ -113,6 +113,10 @@ export default {
}, },
// 新增 // 新增
addRobotProject() { addRobotProject() {
this.$refs.addRobotFormRef.validate((valid) => {
if (!valid) {
return false
} else {
addProjectRobot(this.robotForm).then((resp) => { addProjectRobot(this.robotForm).then((resp) => {
if (resp.data.data === true) { if (resp.data.data === true) {
this.addDialogVisible = false this.addDialogVisible = false
...@@ -122,9 +126,15 @@ export default { ...@@ -122,9 +126,15 @@ export default {
return this.$message.error(resp.data.msg) return this.$message.error(resp.data.msg)
} }
}) })
}
})
}, },
// 编辑 // 编辑
editRobotProject() { editRobotProject() {
this.$refs.editRobotFormRef.validate((valid) => {
if (!valid) {
return false
} else {
modifyProjectRobot(this.editRobotForm).then((resp) => { modifyProjectRobot(this.editRobotForm).then((resp) => {
if (resp.data.data === true) { if (resp.data.data === true) {
this.editDialogVisible = false this.editDialogVisible = false
...@@ -134,6 +144,8 @@ export default { ...@@ -134,6 +144,8 @@ export default {
return this.$message.error(resp.data.msg) return this.$message.error(resp.data.msg)
} }
}) })
}
})
}, },
// 删除 // 删除
delProjectRobot(robotId) { delProjectRobot(robotId) {
......
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 to comment