guhongwei 4 سال پیش
والد
کامیت
417778a6fc
5فایلهای تغییر یافته به همراه55 افزوده شده و 12 حذف شده
  1. 1 1
      src/views/class/index.vue
  2. 11 1
      src/views/question/question.vue
  3. 11 4
      src/views/teacherscore/index.vue
  4. 22 2
      src/views/user/chuanzuoye.vue
  5. 10 4
      src/views/user/leaveDetail.vue

+ 1 - 1
src/views/class/index.vue

@@ -88,7 +88,7 @@ export default {
       navShow: true,
       // 班级信息
       // 头部标签
-      activeName: 'forth',
+      activeName: 'first',
       // 小组列表
       groupList: [],
       // 登陆者所在组,id

+ 11 - 1
src/views/question/question.vue

@@ -107,7 +107,17 @@ export default {
           object.id = answerid;
           res = await this.updateAnswer(object);
         }
-        this.$checkRes(res, '提交成功', res.errmsg);
+        if (this.$checkRes(res)) {
+          this.$notify({
+            message: '提交成功',
+            type: 'success',
+          });
+        } else {
+          this.$notify({
+            message: res.errmsg,
+            type: 'danger',
+          });
+        }
       } finally {
         this.loading = false;
       }

+ 11 - 4
src/views/teacherscore/index.vue

@@ -96,10 +96,17 @@ export default {
         data.lessonid = this.lessonid;
         data.teacherid = this.teaid;
         const res = await this.create(data);
-        this.$notify({
-          message: '评分成功',
-          type: 'success',
-        });
+        if (this.$checkRes(res)) {
+          this.$notify({
+            message: '提交成功',
+            type: 'success',
+          });
+        } else {
+          this.$notify({
+            message: res.errmsg,
+            type: 'danger',
+          });
+        }
         this.form = {};
         this.disabled = false;
         this.searchInfo();

+ 22 - 2
src/views/user/chuanzuoye.vue

@@ -106,10 +106,30 @@ export default {
       }
       if (!obj.id) {
         let res = await this.add(obj);
-        this.$checkRes(res, '提交成功', res.errmsg);
+        if (this.$checkRes(res)) {
+          this.$notify({
+            message: '提交成功',
+            type: 'success',
+          });
+        } else {
+          this.$notify({
+            message: res.errmsg,
+            type: 'danger',
+          });
+        }
       } else {
         let res = await this.update(obj);
-        this.$checkRes(res, '修改成功', res.errmsg);
+        if (this.$checkRes(res)) {
+          this.$notify({
+            message: '提交成功',
+            type: 'success',
+          });
+        } else {
+          this.$notify({
+            message: res.errmsg,
+            type: 'danger',
+          });
+        }
       }
     },
 

+ 10 - 4
src/views/user/leaveDetail.vue

@@ -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() {