|
|
|
@ -406,7 +406,8 @@ export default { |
|
|
|
|
headers: { |
|
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
|
}, |
|
|
|
|
disableds:false |
|
|
|
|
disableds:false, |
|
|
|
|
submiting: false // 新增编辑员工防抖标识 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -886,6 +887,7 @@ export default { |
|
|
|
|
saveData(type) { // 提交新增/编辑学生 |
|
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
let nodes = this.$refs.classTree.getCheckedNodes(); |
|
|
|
|
if (nodes.length) { |
|
|
|
|
let tempArr = []; |
|
|
|
@ -897,6 +899,7 @@ export default { |
|
|
|
|
this.form.classId = tempArr.toString(); |
|
|
|
|
} |
|
|
|
|
if (this.form.accountId) { |
|
|
|
|
this.submiting = true |
|
|
|
|
this.$post(this.api.modifyStudent, this.form).then(res => { |
|
|
|
|
util.successMsg("编辑成功!"); |
|
|
|
|
if (type) { |
|
|
|
@ -909,13 +912,20 @@ export default { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.submiting = false |
|
|
|
|
}, 2000) |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.submiting = false |
|
|
|
|
}, 2000) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
if (this.accountReapeat) return util.warningMsg("该账号已存在"); |
|
|
|
|
if (this.workNumberReapeat) return util.warningMsg("该学生学号已存在"); |
|
|
|
|
if (this.phoneRepeat) return util.warningMsg("该手机号已存在"); |
|
|
|
|
if (this.emailRepeat) return util.warningMsg("该邮箱已存在"); |
|
|
|
|
this.submiting = true |
|
|
|
|
this.form.uniqueIdentification = new Date().getTime(); |
|
|
|
|
this.$post(this.api.addStudent, this.form).then(res => { |
|
|
|
|
util.successMsg("新增成功!"); |
|
|
|
@ -929,8 +939,14 @@ export default { |
|
|
|
|
this.getOrgStudentData(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.submiting = false |
|
|
|
|
}, 2000) |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.submiting = false |
|
|
|
|
}, 2000) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return false; |
|
|
|
|