Parcourir la source

优化bug修改

zhangjie il y a 4 ans
Parent
commit
fd98541206

+ 3 - 3
src/main.js

@@ -72,9 +72,9 @@ axios.interceptors.request.use(
     }
 
     // 为请求头添加token信息
-    let token = Vue.ls.get("token");
-    if (token) {
-      config.headers["Authorization"] = token;
+    const user = Vue.ls.get("user", { id: "" });
+    if (user) {
+      config.headers["userId"] = user.id;
     }
 
     // 设置延迟时效

+ 4 - 0
src/modules/grading/GradingDetail.vue

@@ -199,6 +199,7 @@
       :level-info="levelInfo"
       :markers="markers"
       @modified="leaderGradingSuccess"
+      @canceled="leaderGradingCancel"
       ref="ModifyLeaderGrading"
     ></modify-leader-grading>
     <!-- grade-analysis-export -->
@@ -610,6 +611,9 @@ export default {
         this.toActionNextPaper();
       }
     },
+    leaderGradingCancel() {
+      this.$refs.GradeAction.btnClicked = false;
+    },
     // paper carousel
     toViewCarouselPaper(paperIndex, papers, type) {
       this.carouselType = type;

+ 1 - 4
src/modules/grading/components/GradeAction.vue

@@ -305,6 +305,7 @@ export default {
       if (this.rights.gradeHis) {
         this.getMarkHistory();
       }
+      this.btnClicked = false;
     },
     getCurLevel() {
       const levelName = this.curPaperOrTask.rejected
@@ -338,10 +339,6 @@ export default {
       if (this.btnClicked) return;
       this.btnClicked = true;
 
-      this.setT = setTimeout(() => {
-        this.btnClicked = false;
-      }, 500);
-
       if (this.IS_MARK_LEADER) {
         this.$emit(
           "on-leader-level",

+ 2 - 1
src/modules/grading/components/GradeHistoryPaper.vue

@@ -50,7 +50,8 @@ export default {
   },
   computed: {
     title() {
-      if (this.IS_MARK_LEADER) return `一键定档  ${this.curPaper.level}`;
+      if (this.IS_MARK_LEADER)
+        return this.curPaper.level ? `一键定档  ${this.curPaper.level}` : "";
       return this.curPaper.result ? `已评  ${this.curPaper.result}` : "";
       // return this.curPaper.sn ? `NO.${this.curPaper.sn}` : "";
     }

+ 5 - 0
src/modules/grading/components/ModifyLeaderGrading.vue

@@ -4,6 +4,7 @@
     v-model="modalIsShow"
     title="科组长评档"
     :mask-closable="false"
+    @on-cancel="cancelHandle"
     @on-visible-change="visibleChange"
   >
     <div class="leader-grading">
@@ -107,6 +108,10 @@ export default {
     },
     cancel() {
       this.modalIsShow = false;
+      this.cancelHandle();
+    },
+    cancelHandle() {
+      this.$emit("canceled");
     },
     open() {
       this.modalIsShow = true;

+ 1 - 1
src/modules/login/LoginHome.vue

@@ -111,7 +111,7 @@ export default {
       this.isSubmit = false;
       if (!data) return;
 
-      this.$ls.set("user", data, this.GLOBAL.authTimeout);
+      this.$ls.set("user", data);
       this.$store.commit("setUser", data);
       // 初次登陆强制修改密码
       if (

+ 4 - 1
src/modules/mark/MarkDetail.vue

@@ -60,7 +60,7 @@
           @on-code-search="serachPaperByCode"
           @on-grade-change-search="searchGradeChangeList"
           v-if="curPaper.id"
-          ref="GradeAction"
+          ref="MarkAction"
         ></mark-action>
       </div>
       <!-- detail-papers -->
@@ -452,6 +452,9 @@ export default {
           this.getStepLevels();
           // this.updateHistory();
           this.toActionNextPaper();
+        },
+        onCancel: () => {
+          this.$refs.MarkAction.btnClicked = false;
         }
       });
     },

+ 7 - 6
src/modules/mark/components/MarkAction.vue

@@ -381,6 +381,7 @@ export default {
       if (this.rights.markHis) {
         this.getMarkHistory();
       }
+      this.btnClicked = false;
     },
     updateScoreList() {
       let scores = [];
@@ -412,9 +413,9 @@ export default {
       if (this.btnClicked) return;
       this.btnClicked = true;
 
-      this.setT = setTimeout(() => {
-        this.btnClicked = false;
-      }, 500);
+      // this.setT = setTimeout(() => {
+      //   this.btnClicked = false;
+      // }, 500);
 
       // 科组长改档 / 评卷同意改档:只使用selectedLevel
       this.$emit("on-leader-level", {
@@ -433,9 +434,9 @@ export default {
       if (this.btnClicked) return;
       this.btnClicked = true;
 
-      this.setT = setTimeout(() => {
-        this.btnClicked = false;
-      }, 500);
+      // this.setT = setTimeout(() => {
+      //   this.btnClicked = false;
+      // }, 500);
       // 评卷员打分
       this.$emit("on-select-score", score * 1);
     },