1.7 优化

This commit is contained in:
zhengjie
2019-04-17 17:28:26 +08:00
parent 707f15d84b
commit ea183f380a
6 changed files with 69 additions and 53 deletions

View File

@@ -61,10 +61,17 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
if (this.form.pid) {
this.loading = true
if (this.isAdd) {
this.doAdd()
} else this.doEdit()
} else {
this.$message({
message: '上级部门不能为空',
type: 'warning'
})
}
}
})
},