|
@@ -63,11 +63,17 @@ export default {
|
|
|
data.stuname = this.user.name;
|
|
|
data.schid = this.user.schid;
|
|
|
let res = await this.create(data);
|
|
|
- if (res.errcode === 0) {
|
|
|
- let msg = `${this.keyWord}添加成功`;
|
|
|
- if (this.$checkRes(res, msg)) this.cancelClick();
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$notify({
|
|
|
+ message: '提交成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.cancelClick();
|
|
|
} else {
|
|
|
- let msg = `${this.keyWord}添加失败`;
|
|
|
+ this.$notify({
|
|
|
+ message: res.errmsg,
|
|
|
+ type: 'danger',
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
cancelClick() {
|