123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import {logicStatus} from "../../model/enum";
- import {toast} from "../../utils/utils";
- import Route from "../../model/route";
- Page({
- data: {
- eInfo: {},
- isPre: logicStatus.NO,
- logicStatusEnum: logicStatus,
- },
- onLoad: function (options) {
- let isPre = options.isPre;
- let detail = JSON.parse(options.detail);
- this.setData({
- isPre,
- eInfo: detail
- })
- },
- toCertificate(e) {
- let detail = JSON.stringify(this.data.eInfo);
- Route.toCertificate(detail, {
- get: () => {
- const eventChannel = this.getOpenerEventChannel()
- eventChannel.emit('refresh');
- }
- })
- },
- toQuestion(e) {//调查
- let eInfo = this.data.eInfo;
- if (eInfo.isQuestionnaire == logicStatus.NO) {
- Route.toQuestionDetail(eInfo.questionnaireId, eInfo.teamId, "", "", eInfo.eduStuId,
- {
- answer: () => {
- this.setData({
- 'eInfo.isQuestionnaire': 1
- })
- const eventChannel = this.getOpenerEventChannel()
- eventChannel.emit('refresh');
- }
- });
- } else {
- toast("已完成问卷")
- }
- },
- toQuestion2(e) {//综合
- let eInfo = this.data.eInfo;
- if (eInfo.isComprehensive == logicStatus.NO) {
- Route.toQuestionDetail(eInfo.comprehensiveId, eInfo.teamId, "", "", eInfo.eduStuId,
- {
- answer: () => {
- this.setData({
- 'eInfo.isComprehensive': 1
- })
- const eventChannel = this.getOpenerEventChannel()
- eventChannel.emit('refresh');
- }
- });
- } else {
- toast("已完成问卷")
- }
- },
- toExam(e) {//期末
- let eInfo = this.data.eInfo;
- if (eInfo.isExam == logicStatus.NO) {
- Route.toExamDetail(eInfo.paperId, eInfo.examId, eInfo.eduStuId, {
- answer: () => {
- this.setData({
- 'eInfo.isExam': 1
- })
- const eventChannel = this.getOpenerEventChannel()
- eventChannel.emit('refresh');
- }
- });
- } else {
- toast("已完成试卷")
- }
- }
- })
|