export default {
  methods: {
    toMarkMark(data) {
      this.$ls.set("mark", {
        examId: data.examId,
        paperNumber: data.paperNumber,
        groupNumber: data.groupNumber,
      });
      this.openPage("/mark/mark");
    },
    toMarkArbitrate(data) {
      // paperNumber, groupNumber, examId, arbitrateId
      this.$ls.set("arbitrate", data);
      this.openPage("/mark/arbitrate");
    },
    toMarkTrack(studentId) {
      this.$ls.set("check-students", studentId);
      this.openPage("/mark/track/student");
    },
    toMarkObjectiveAnswer(studentIds) {
      this.$ls.set("check-students", studentIds);
      this.openPage("/mark/check/objective-answer");
    },
    toMarkSubjectiveAnswer({ examId, paperNumber, studentIds }) {
      this.$ls.set("check-students", { examId, paperNumber, studentIds });
      this.openPage("/mark/check/subjective-answer");
    },
    toMarkReject(data) {
      this.$ls.set("reject", data);
      this.openPage("/mark/reject");
    },
    openPage(url) {
      // window.location.href = url;
      window.open(url);
    },
  },
};
