|
@@ -1,982 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="jointexam-mgt-container custom-iview-split">
|
|
|
- <Loading :top="200" type="1" style="text-align: center" v-show="isLoading"></Loading>
|
|
|
- <Split v-model="split1" min="350px">
|
|
|
- <!--統測列表-->
|
|
|
- <div class="jointexam-list-wrap" slot="left">
|
|
|
- <div class="jointexam-list-title">
|
|
|
- <b class="title">
|
|
|
- {{ $t("learnActivity.jointexam.jointexam") }}
|
|
|
- </b>
|
|
|
- <div class="action-icon-wrap" v-if="!isSearch">
|
|
|
- <Icon type="md-add" class="to-create-icon" @click="goToCreate" :title="$t('learnActivity.jointexam.create')" v-if="evAuthStatus" />
|
|
|
- <Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.jointexam.delete')" @click="deleteEvaluation" v-if="evAuthStatus" />
|
|
|
- <!-- 篩選 -->
|
|
|
- <Poptip style="float: right" trigger="click" :offset="-10" theme="light">
|
|
|
- <Icon type="ios-funnel" class="to-create-icon" :title="$t('learnActivity.jointexam.create')" />
|
|
|
- <div slot="content">
|
|
|
- <div class="filter-item">
|
|
|
- <span>{{ $t("learnActivity.jointexam.ftStatus") }}</span>
|
|
|
- <Select v-model="filter.progress" style="width: 100px" size="small" clearable @on-change="filterEv">
|
|
|
- <Option value="pending">{{ $t("learnActivity.jointexam.pending") }}</Option>
|
|
|
- <Option value="going">{{ $t("learnActivity.jointexam.going") }}</Option>
|
|
|
- <Option value="finish">{{ $t("learnActivity.jointexam.finish") }}</Option>
|
|
|
- </Select>
|
|
|
- </div>
|
|
|
- <div class="filter-item">
|
|
|
- <span>{{ $t("learnActivity.jointexam.ftMode") }}</span>
|
|
|
- <Select v-model="filter.source" style="width: 100px" size="small" clearable @on-change="filterEv">
|
|
|
- <Option v-for="(item, index) in $GLOBAL.EV_MODE()" :value="item.value" :key="index">{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Poptip>
|
|
|
- <Icon type="md-search" class="to-create-icon" @click="isSearch = !isSearch" :title="$t('learnActivity.jointexam.search')" />
|
|
|
- </div>
|
|
|
- <div v-else style="float: right; width: 150px; padding-right: 10px" class="light-iview-input">
|
|
|
- <Input v-special-char icon="ios-close" v-model="filter.name" :placeholder="$t('schoolBaseInfo.codeSearchHolder')" autofocus style="width: 100%" @on-click="closeKeySearch" @on-change="$jsFn.debounce(filterEv, 1000)()" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <Scroll class="jointexam-list-main" :on-reach-bottom="handleReachBottom" :distance-to-edge="[-1, -1]">
|
|
|
- <div v-for="(item, index) in evaListShow" @click.capture="selectEvaluation(index)" :class="['jointexam-item', 'block-bg', index == curEvaIndex ? 'block-bg-active' : '']" :key="index">
|
|
|
- <p class="jointexam-name">
|
|
|
- {{ item.name }}
|
|
|
- <!-- 修改评测名称 -->
|
|
|
- <Icon type="md-create" class="edit-end-time" @click="editEvName(index)" :title="$t('learnActivity.mgtScEv.edName')" />
|
|
|
- </p>
|
|
|
- <div class="all-tag-box">
|
|
|
- <div class="tags-wrap">
|
|
|
- <!-- 评测模式 -->
|
|
|
- <span class="ev-info-tag ev-tag-common">{{ getModeLabel(item.source) }}</span>
|
|
|
- <span class="ev-info-tag ev-tag-common" v-if="item.examType && item.examType.name">
|
|
|
- {{ item.examType.name }}
|
|
|
- </span>
|
|
|
- <Icon class="exam-target" size="20" type="ios-people" @click="getExamTarget(item)" />
|
|
|
- </div>
|
|
|
- <!-- 立即结束 和评测状态 按钮-->
|
|
|
- <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
|
|
|
- {{ $t("learnActivity.mgtScEv.stop") }}
|
|
|
- </span>
|
|
|
- <span v-else class="handle-end-tag ev-tag-common" :style="{ background: '#c0c0c0', color: item.progColor }">
|
|
|
- {{ item.progText }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <p class="jointexam-type" style="margin-top: 10px">
|
|
|
- <Icon type="md-time" style="margin-right: 5px" size="16" />
|
|
|
- <span>{{ $jsFn.timeFormat(item.startTime) }}</span>
|
|
|
- -
|
|
|
- <span>{{ $jsFn.timeFormat(item.endTime) }}</span>
|
|
|
- <!-- 修改评测结束时间 -->
|
|
|
- <Icon type="md-create" class="edit-end-time" v-if="item.progress == 'going'" @click="editEvEndtime(index)" :title="$t('learnActivity.mgtScEv.editEndTime')" />
|
|
|
- </p>
|
|
|
- <!-- 二维码分享 (暂时去掉二维码分享,仅提供链接,因为尚未兼容手机端)-->
|
|
|
- <!-- <span class="ev-qr-tag" style="top:50%" @click="openQrcode(index)" v-show="item.source == '0' && item.progress == 'going'">
|
|
|
- <Icon size="20" custom="iconfont icon-qr-code" class="qr-code-icon" />
|
|
|
- </span> -->
|
|
|
- <span class="ev-qr-tag" style="top: 25%" v-if="item.source == '0' && item.progress == 'going'">
|
|
|
- <Tooltip content="Here is the prompt text" transfer theme="light">
|
|
|
- <Icon type="ios-send" size="24" />
|
|
|
- <div slot="content" style="padding: 5px">
|
|
|
- <p class="copy-text-info" @click="copyNotice(index)">
|
|
|
- <Icon type="ios-notifications" style="margin-right: 5px" />
|
|
|
- {{ $t("learnActivity.mgtScEv.shareText9") }}
|
|
|
- </p>
|
|
|
- <p class="copy-text-info" @click="copyLink(index)">
|
|
|
- <Icon type="ios-link" style="margin-right: 5px" />
|
|
|
- {{ $t("learnActivity.mgtScEv.shareText10") }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </Tooltip>
|
|
|
- </span>
|
|
|
- <!-- 立即结束 图标-->
|
|
|
- <!-- <span class="ev-qr-tag" style="top:65%" @click="handleEnd(index)" :title="$t('learnActivity.mgtScEv.stop')">
|
|
|
- <Icon size="20" type="md-power" class="qr-code-icon" />
|
|
|
- </span> -->
|
|
|
- </div>
|
|
|
- <EmptyData v-if="evaListShow.length == 0" style="margin-top: 100px" :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
|
|
|
- </Scroll>
|
|
|
- </div>
|
|
|
- <div slot="right" class="jointexam-detail-wrap">
|
|
|
- <!--顶部菜单-->
|
|
|
- <div class="jointexam-detail-bar">
|
|
|
- <!-- 评测数据 -->
|
|
|
- <span :class="curBarIndex == 0 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" @click="selectBar(0)">
|
|
|
- {{ $t("learnActivity.mgtScEv.tab1") }}
|
|
|
- </span>
|
|
|
- <!-- 作答详情 -->
|
|
|
- <span :class="curBarIndex == 3 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" @click="selectBar(3)">
|
|
|
- {{ $t("learnActivity.mgtScEv.tab3") }}
|
|
|
- </span>
|
|
|
- <!-- 评测试卷 -->
|
|
|
- <span :class="curBarIndex == 1 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" @click="selectBar(1)">
|
|
|
- {{ $t("learnActivity.mgtScEv.tab2") }}
|
|
|
- </span>
|
|
|
- <!-- 阅卷设置-->
|
|
|
- <span :class="curBarIndex == 2 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" v-show="scope == 'school'" @click="selectBar(2)">
|
|
|
- {{ $t("learnActivity.mgtScEv.markSetting") }}
|
|
|
- </span>
|
|
|
- <!-- 小学情-->
|
|
|
- <span :class="curBarIndex == 4 ? 'evalustion-bar-item line-bottom-active line-bottom' : 'evalustion-bar-item line-bottom'" v-show="scope !== 'school'" @click="selectBar(4)">
|
|
|
- {{ $t("learnActivity.mgtScEv.tab4") }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <!-- 暂无数据 -->
|
|
|
- <EmptyData v-if="!evaListShow.length" :top="120"></EmptyData>
|
|
|
- <!-- 跨校个人评测提示UI -->
|
|
|
- <CrossSchool v-else-if="examDetaiInfo && !examDetaiInfo.curSchool" :examInfo="examDetaiInfo"></CrossSchool>
|
|
|
- <!-- 评测数据 -->
|
|
|
- <DataView v-else-if="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="jointexam-base-info"></DataView>
|
|
|
- <!-- 作答详情 -->
|
|
|
- <AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="jointexam-base-info"></AnswerTable>
|
|
|
- <!-- 评测试卷 -->
|
|
|
- <ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" class="jointexam-base-info"></ExamPaper>
|
|
|
- <!-- 学情分析 -->
|
|
|
- <CloudDAS v-else-if="curBarIndex == 4" :evInfo="examDetaiInfo"></CloudDAS>
|
|
|
- <!-- 阅卷任务 -->
|
|
|
- <ExamTask v-show="curBarIndex == 2" :evInfo="examDetaiInfo" class="jointexam-base-info"></ExamTask>
|
|
|
- </div>
|
|
|
- </Split>
|
|
|
- <!-- 修改评测名称 -->
|
|
|
- <Modal v-model="editNameStatus" footer-hide className="ed-name-modal" @on-ok="confirmEditName">
|
|
|
- <div slot="header" class="modal-header">
|
|
|
- {{ $t("learnActivity.mgtScEv.edName") }}
|
|
|
- </div>
|
|
|
- <div class="edit-name-content">
|
|
|
- <p class="edit-name-label">
|
|
|
- {{ $t("cusMgt.listName") }}
|
|
|
- </p>
|
|
|
- <Input v-model="editName" :placeholder="$t('learnActivity.mgtScEv.edNameHolder')" />
|
|
|
- <Button :loading="btnLoading" @click="confirmEditName" long type="primary" class="confirm-btn">{{ $t("syllabus.confirm") }}</Button>
|
|
|
- </div>
|
|
|
- </Modal>
|
|
|
- <!-- 修改评测时间 -->
|
|
|
- <Modal v-model="editTimeStatus" footer-hide className="ed-name-modal">
|
|
|
- <div slot="header" class="modal-header">
|
|
|
- {{ $t("learnActivity.mgtScEv.editEndTime") }}
|
|
|
- </div>
|
|
|
- <div class="edit-name-content">
|
|
|
- <p class="edit-name-label">
|
|
|
- {{ $t("cusMgt.listName") }}
|
|
|
- </p>
|
|
|
- <DatePicker v-model="editTime" :options="dateOpt1" type="datetime" @on-change="handleTime" format="yyyy-MM-dd HH:mm" :placeholder="$t('learnActivity.mgtScEv.endTimeHolder')" style="width: 100%"></DatePicker>
|
|
|
- <Button :loading="btnLoading" @click="confirmEditEndtime" long type="primary" class="confirm-btn">{{ $t("syllabus.confirm") }}</Button>
|
|
|
- </div>
|
|
|
- </Modal>
|
|
|
- <!-- 分享二维码 -->
|
|
|
- <QrcodeModal v-model="showQrStatus" :config="qrConfig"></QrcodeModal>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-<script>
|
|
|
- import CrossSchool from "./tabs/CrossSchool.vue";
|
|
|
- import DataView from "./tabs/DataView.vue";
|
|
|
- import AnswerTable from "./tabs/AnswerTable.vue";
|
|
|
- import ExamPaper from "./tabs/ExamPaper.vue";
|
|
|
- import ExamTask from "./tabs/ExamTask.vue";
|
|
|
- import CloudDAS from "./tabs/CloudDAS.vue";
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- DataView,
|
|
|
- AnswerTable,
|
|
|
- ExamPaper,
|
|
|
- ExamTask,
|
|
|
- CrossSchool,
|
|
|
- CloudDAS
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- ctnToken: "",
|
|
|
- pageCount: 20,
|
|
|
- dataErr: false,
|
|
|
- isSetting: false,
|
|
|
- examTargets: [],
|
|
|
- correctData: [], //各科错题分析数据
|
|
|
- paperQuInfo: [],
|
|
|
- simpleData: {},
|
|
|
- btnLoading: false,
|
|
|
- shareUrl: "",
|
|
|
- split1: 0.2,
|
|
|
- isSearch: false,
|
|
|
- showQrStatus: false,
|
|
|
- qrConfig: {
|
|
|
- title: this.$t("learnActivity.mgtScEv.shareText8"),
|
|
|
- url: "", //二维码内容 不用转短网址,组件内部处理
|
|
|
- shareContent: "" //复制链接内容,支持字符串模板,如果包含网址需要处理好短网址
|
|
|
- },
|
|
|
- editTime: null,
|
|
|
- editTimeStatus: false,
|
|
|
- editName: "",
|
|
|
- editNameStatus: false,
|
|
|
- keyword: "",
|
|
|
- scope: "", //school 校本 private 个人
|
|
|
- curSubIndex: 0,
|
|
|
- curBarIndex: 0,
|
|
|
- curEvaIndex: 0,
|
|
|
- evaListShow: [],
|
|
|
- examDetaiInfo: {},
|
|
|
- targetList: [],
|
|
|
- isLoading: false,
|
|
|
- filterPeriod: undefined,
|
|
|
- curPdInfo: {},
|
|
|
- filter: {
|
|
|
- progress: "",
|
|
|
- source: "",
|
|
|
- name: ""
|
|
|
- },
|
|
|
- semesterRange: null
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- dateOpt1() {
|
|
|
- let _this = this;
|
|
|
- return {
|
|
|
- disabledDate(date) {
|
|
|
- let d = _this.evaListShow[_this.curEvaIndex]?.startTime ? _this.evaListShow[_this.curEvaIndex].startTime : Date.now();
|
|
|
- return d && d > date.valueOf();
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- evAuthStatus() {
|
|
|
- if (this.scope == "school") {
|
|
|
- return this.$access.can("admin.*|schoolAc-upd");
|
|
|
- } else {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.$EventBus.$off("onStatusChange");
|
|
|
- this.$EventBus.$on("onStatusChange", () => {
|
|
|
- if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].sStatus != 1) {
|
|
|
- this.evaListShow[this.curEvaIndex].sStatus = 1;
|
|
|
- this.evaListShow[this.curEvaIndex].scoreText = this.$t("learnActivity.mgtScEv.scoreStatus1");
|
|
|
- this.evaListShow[this.curEvaIndex].scoreColor = "#515a6e";
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- created() {
|
|
|
- if (this.$route.name === "schoolExam") {
|
|
|
- this.scope = "school";
|
|
|
- } else {
|
|
|
- this.scope = "private";
|
|
|
- }
|
|
|
- this.filterPeriod = this.$store.state.user.curPeriod?.id;
|
|
|
- // this.findEvaluation(true);
|
|
|
- },
|
|
|
- methods: {
|
|
|
- handleReachBottom() {
|
|
|
- return this.findEvaluation();
|
|
|
- },
|
|
|
- closeKeySearch() {
|
|
|
- this.isSearch = false;
|
|
|
- this.filter.name = "";
|
|
|
- this.filterEv();
|
|
|
- },
|
|
|
- getExamTarget(data) {
|
|
|
- console.log('getExamTarget data:', data)
|
|
|
- let ids = [];
|
|
|
- if (data.groupLists.length > 0) {
|
|
|
- data.groupLists.forEach((group) => {
|
|
|
- group.courseLists.forEach((course) => {
|
|
|
- ids = ids.concat(course.groupListIds)
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- this.examTargets = data.groupLists;
|
|
|
- this.$Modal.info({
|
|
|
- title: this.$t("learnActivity.createEv.evTarget"),
|
|
|
- render: (h) => {
|
|
|
- return h(
|
|
|
- "ul",
|
|
|
- this.examTargets.map((group2, index) => {
|
|
|
- return h("li",
|
|
|
- { style: { marginLeft: "20px" } },
|
|
|
- [
|
|
|
- group2.creatorName + " (" + group2.creatorId + ")",
|
|
|
- [
|
|
|
- h("ul",
|
|
|
- this.examTargets[index].courseLists.map((course2) => {
|
|
|
- return h(
|
|
|
- "li",
|
|
|
- { style: { marginLeft: "30px" } },
|
|
|
- course2.courseName
|
|
|
- );
|
|
|
- })
|
|
|
- )
|
|
|
- ]
|
|
|
- ]
|
|
|
- );
|
|
|
- })
|
|
|
- );
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- handleEnd(index) {
|
|
|
- this.$Modal.confirm({
|
|
|
- title: this.$t("learnActivity.mgtScEv.stopTitle"),
|
|
|
- content: `${this.$t("learnActivity.mgtScEv.stopContent")}${this.evaListShow[index].name}?`,
|
|
|
- onOk: () => {
|
|
|
- let code = this.evaListShow[index].code;
|
|
|
- this.$api.learnActivity
|
|
|
- .FinishEva({
|
|
|
- id: this.evaListShow[index].id,
|
|
|
- code: code.includes("Exam") ? code : `Exam-${code}`
|
|
|
- // code: this.evaListShow[index].code.replace('Exam-', '')
|
|
|
- })
|
|
|
- .then(
|
|
|
- (res) => {
|
|
|
- if (!res.error) {
|
|
|
- this.$Message.success(this.$t("learnActivity.mgtScEv.stopOk"));
|
|
|
- this.evaListShow[index].progress = "finish";
|
|
|
- this.evaListShow[index].progText = this.$t("learnActivity.mgtScEv.finish");
|
|
|
- this.evaListShow[index].progColor = "#75787d";
|
|
|
- // this.reload()
|
|
|
- } else {
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.actionErr"));
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- //获取各科题目正确率数据
|
|
|
- getCorrectData(data) {
|
|
|
- let d = [];
|
|
|
- if (data.averageTotal) {
|
|
|
- data.averageTotal.forEach((item) => {
|
|
|
- let quInfo = this.paperQuInfo.find((pq) => pq.subjectId == item.subjectId);
|
|
|
- let quNoList = quInfo ? quInfo.quNo : [];
|
|
|
- let total = item.total.length; //总人数
|
|
|
- let cData = item.wrongNum.map((w, i) => {
|
|
|
- let correct = total - w;
|
|
|
- return {
|
|
|
- correct: correct, //正确人数
|
|
|
- wrong: w, //错误人数
|
|
|
- rate: total ? parseInt((correct * 100) / total) : 0, //正确率
|
|
|
- quLabel: quNoList[i] ? quNoList[i].label : i
|
|
|
- };
|
|
|
- });
|
|
|
- d.push({
|
|
|
- subjectId: item.subjectId,
|
|
|
- subjectName: item.subjectName,
|
|
|
- data: cData
|
|
|
- });
|
|
|
- });
|
|
|
- this.correctData = d;
|
|
|
- } else {
|
|
|
- this.correctData = [];
|
|
|
- }
|
|
|
- },
|
|
|
- //获取已结束评测简要数据分析
|
|
|
- findSimpleAna() {
|
|
|
- this.simpleData = {};
|
|
|
- let requestData = {
|
|
|
- id: this.examDetaiInfo.id,
|
|
|
- code: this.examDetaiInfo.code.replace("Exam-", "")
|
|
|
- };
|
|
|
- this.$api.learnActivity
|
|
|
- .simpleAna(requestData)
|
|
|
- .then(
|
|
|
- (res) => {
|
|
|
- if (!res.error) {
|
|
|
- if (res.averageMap.length && res.averageMap.length) {
|
|
|
- this.dataErr = false;
|
|
|
- this.calculating = false;
|
|
|
- for (let i in res.averageMap) {
|
|
|
- for (let j in res.averageMap[i].ClassAverage) {
|
|
|
- res.averageMap[i].ClassAverage[j] = parseFloat(res.averageMap[i].ClassAverage[j].toFixed(2));
|
|
|
- }
|
|
|
- let subject = this.examDetaiInfo.subjects.find((item) => {
|
|
|
- return item.id == res.averageMap[i].subjectId;
|
|
|
- });
|
|
|
- if (subject) {
|
|
|
- res.averageMap[i].subjectId = subject.name;
|
|
|
- } else {
|
|
|
- res.averageMap[i].subjectId = "-";
|
|
|
- }
|
|
|
- }
|
|
|
- res.averageTotal.forEach((item) => {
|
|
|
- let subjectInfo = this.examDetaiInfo.papers.find((subItem) => {
|
|
|
- return subItem.subjectId == item.subjectId;
|
|
|
- });
|
|
|
- if (subjectInfo) {
|
|
|
- item.subjectName = subjectInfo.subjectName;
|
|
|
- item.paperScore = subjectInfo.score;
|
|
|
- } else {
|
|
|
- item.subjectName = this.examDetaiInfo.subjects && this.examDetaiInfo.subjects.length ? this.examDetaiInfo.subjects[0].name : "";
|
|
|
- item.paperScore = this.examDetaiInfo.papers && this.examDetaiInfo.papers[0] ? this.examDetaiInfo.papers[0].score : "";
|
|
|
- }
|
|
|
- });
|
|
|
- this.simpleData = res;
|
|
|
- this.getCorrectData(res);
|
|
|
- } else {
|
|
|
- this.calculating = true;
|
|
|
- this.$Message.warning(this.$t("learnActivity.simple.inCalc"));
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.dataErr = true;
|
|
|
- this.$Message.error(this.$t("learnActivity.simple.simpleErr"));
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- this.dataErr = true;
|
|
|
- }
|
|
|
- )
|
|
|
- .finally(() => {
|
|
|
- this.isLoading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- selectBar(index) {
|
|
|
- this.$EventBus.$emit("EvBarChange", index);
|
|
|
- this.checkScoreSave(this.handleSelectBar, index);
|
|
|
- },
|
|
|
- handleSelectBar(index) {
|
|
|
- this.curBarIndex = index;
|
|
|
- this.$nextTick(() => {
|
|
|
- if (this.$refs["score-box"]) this.$refs["score-box"].showTest = false;
|
|
|
- });
|
|
|
- },
|
|
|
- async copyNotice(index) {
|
|
|
- this.shareUrl = `https://${window.location.host}/studentWeb/examView?aId=${this.evaListShow[index].id}`;
|
|
|
- this.qrConfig.url = this.shareUrl;
|
|
|
- let evName = this.evaListShow[this.curEvaIndex].name;
|
|
|
- let evType = this.getModeLabel(this.evaListShow[this.curEvaIndex].source);
|
|
|
- let soc = this.evaListShow[this.curEvaIndex].owner === "school" ? this.$t("learnActivity.mgtScEv.shareText4") : this.$t("learnActivity.mgtScEv.shareText5");
|
|
|
- let socName = this.evaListShow[this.curEvaIndex].subjects.map((item) => item.name).join("、");
|
|
|
- try {
|
|
|
- let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl));
|
|
|
- let shareContent = `${this.$t("learnActivity.mgtScEv.shareText1")}\n\n${soc}${socName}\n${this.$t("learnActivity.mgtScEv.shareText3")}${evType}\n${this.$t("cusMgt.inviteInfo8")}${this.$store.state.userInfo.name}\n${this.$t("learnActivity.mgtScEv.shareText2")}${evName}\n\n${this.$t("learnActivity.mgtScEv.shareText6")}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t("learnActivity.mgtScEv.shareText11")}`;
|
|
|
- this.handleCopy(shareContent);
|
|
|
- } catch (e) {
|
|
|
- let shareContent = `${this.$t("learnActivity.mgtScEv.shareText1")}\n\n${soc}${socName}\n${this.$t("learnActivity.mgtScEv.shareText3")}${evType}\n${this.$t("cusMgt.inviteInfo8")}${this.$store.state.userInfo.name}\n${this.$t("learnActivity.mgtScEv.shareText2")}${evName}\n\n${this.$t("learnActivity.mgtScEv.shareText6")}\n${encodeURI(this.shareUrl)}\n\n${this.$t("learnActivity.mgtScEv.shareText11")}`;
|
|
|
- this.handleCopy(shareContent);
|
|
|
- }
|
|
|
- },
|
|
|
- async copyLink(index) {
|
|
|
- try {
|
|
|
- this.shareUrl = `https://${window.location.host}/studentWeb/examView?aId=${this.evaListShow[index].id}`;
|
|
|
- let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl));
|
|
|
- this.handleCopy(shortUrl.result);
|
|
|
- } catch (e) {
|
|
|
- this.handleCopy(ncodeURI(this.shareUrl));
|
|
|
- }
|
|
|
- },
|
|
|
- handleCopy(content) {
|
|
|
- //直接复制链接
|
|
|
- this.$copyText(content).then(
|
|
|
- (ok) => {
|
|
|
- this.$Message.success(this.$t("settings.copyModal1"));
|
|
|
- },
|
|
|
- (fail) => {
|
|
|
- this.$Message.error(this.$t("settings.copyModal2"));
|
|
|
- }
|
|
|
- );
|
|
|
- },
|
|
|
- async openQrcode() {
|
|
|
- this.shareUrl = `https://${window.location.host}/studentWeb/examView?aId=${this.evaListShow[index].id}`;
|
|
|
- let shortUrl = await this.$api.getShortUrl(encodeURI(this.shareUrl));
|
|
|
- this.qrConfig.url = this.shareUrl;
|
|
|
-
|
|
|
- let evName = this.evaListShow[this.curEvaIndex].name;
|
|
|
- let evType = this.getModeLabel(this.evaListShow[this.curEvaIndex].source);
|
|
|
- let soc = this.evaListShow[this.curEvaIndex].owner === "school" ? this.$t("learnActivity.mgtScEv.shareText4") : this.$t("learnActivity.mgtScEv.shareText5");
|
|
|
- let socName = this.evaListShow[this.curEvaIndex].subjects.map((item) => item.name).join("、");
|
|
|
- this.qrConfig.shareContent = `${this.$t("learnActivity.mgtScEv.shareText1")}\n\n${soc}${socName}\n${this.$t("learnActivity.mgtScEv.shareText3")}${evType}\n${this.$t("cusMgt.inviteInfo8")}${this.$store.state.userInfo.name}\n${this.$t("learnActivity.mgtScEv.shareText2")}${evName}\n\n${this.$t("learnActivity.mgtScEv.shareText6")}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t("learnActivity.mgtScEv.shareText7")}\nURL:https://${window.location.host}/login/student`;
|
|
|
- //直接复制链接
|
|
|
- // this.$copyText(this.qrConfig.shareContent).then(
|
|
|
- // ok => {
|
|
|
- // this.$Message.success(this.$t("settings.copyModal1"))
|
|
|
- // },
|
|
|
- // fail => {
|
|
|
- // this.$Message.error(this.$t("settings.copyModal2"))
|
|
|
- // }
|
|
|
- // )
|
|
|
- //暂时隐藏 现在不显示二维码,仅提供复制链接
|
|
|
- // this.showQrStatus = true
|
|
|
- },
|
|
|
- /**
|
|
|
- * @param isFresh 是否清空当前列表 如果是筛选条件变化需要清空,如果是只是下拉刷新则不需要
|
|
|
- */
|
|
|
- findEvaluation(isFresh) {
|
|
|
- // 下拉加载需要返回一个Promise
|
|
|
- return new Promise((r, j) => {
|
|
|
- if (isFresh) {
|
|
|
- this.evaListShow = [];
|
|
|
- this.ctnToken = "";
|
|
|
- }
|
|
|
- let requestData = {
|
|
|
- count: this.pageCount
|
|
|
- };
|
|
|
- //if(this.scope === 'school'){
|
|
|
- // requestData.stime = this.semesterRange.stime
|
|
|
- // requestData.etime = this.semesterRange.etime
|
|
|
- //}
|
|
|
- //判断是否加载完所有数据
|
|
|
- if (this.ctnToken == "end") {
|
|
|
- this.$Message.success(this.$t("learnActivity.jointexam.loadAll"));
|
|
|
- r();
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.ctnToken) requestData.token = this.ctnToken;
|
|
|
- //添加其他查询条件
|
|
|
- if (this.filter.progress) requestData.progress = this.filter.progress;
|
|
|
- if (this.filter.source) requestData.source = this.filter.source;
|
|
|
- if (this.filter.name) requestData.name = this.filter.name;
|
|
|
- this.isLoading = true;
|
|
|
- this.$api.learnActivity.FindJointExamList(requestData).then(
|
|
|
- (res) => {
|
|
|
- if (!res.error) {
|
|
|
- // res.examInfo = res.examInfo.sort((a, b) => {
|
|
|
- // return a.createTime - b.createTime > 0 ? -1 : 1
|
|
|
- // })
|
|
|
- res.jointExamInfo.forEach((item) => {
|
|
|
- let statusInfo = this.getEvStatusInfo(item.progress);
|
|
|
- item.progText = statusInfo.progText;
|
|
|
- item.progColor = statusInfo.progColor;
|
|
|
- });
|
|
|
- this.evaListShow.push(...res.jointExamInfo);
|
|
|
- if (isFresh && res.jointExamInfo.length) {
|
|
|
- this.selectEvaluation(0);
|
|
|
- } else {
|
|
|
- this.isLoading = false;
|
|
|
- }
|
|
|
- this.ctnToken = res.token || "end"; //返回token为null代表已经查完所有数据了
|
|
|
- r();
|
|
|
- } else {
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
- this.$Message.error(this.$t("learnActivity.jointexam.evListErr"));
|
|
|
- this.isLoading = false;
|
|
|
- j();
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- this.isLoading = false;
|
|
|
- j();
|
|
|
- }
|
|
|
- );
|
|
|
- });
|
|
|
- },
|
|
|
- getEvStatusInfo(progress) {
|
|
|
- let info = {};
|
|
|
- if (progress == "pending") {
|
|
|
- info.progText = this.$t("learnActivity.mgtScEv.pending");
|
|
|
- info.progColor = "#2d8cf0";
|
|
|
- } else if (progress == "going") {
|
|
|
- info.progText = this.$t("learnActivity.mgtScEv.going");
|
|
|
- info.progColor = "#2d8cf0";
|
|
|
- } else if (progress == "finish") {
|
|
|
- info.progText = this.$t("learnActivity.mgtScEv.finish");
|
|
|
- info.progColor = "#75787d";
|
|
|
- }
|
|
|
- // 待评分
|
|
|
- //if (isScore === 0) {
|
|
|
- // info.scoreText = this.$t("learnActivity.mgtScEv.scoreStatus");
|
|
|
- // info.scoreColor = "#ff9900";
|
|
|
- //}
|
|
|
- //已评分
|
|
|
- //else if (isScore === 1) {
|
|
|
- // info.scoreText = this.$t("learnActivity.mgtScEv.scoreStatus1");
|
|
|
- // info.scoreColor = "#515a6e";
|
|
|
- //}
|
|
|
- return info;
|
|
|
- },
|
|
|
- selectEvaluation(index) {
|
|
|
- this.checkScoreSave(this.toEvaluation, index);
|
|
|
- this.$EventBus.$emit("onEvaChange", this.evaListShow[index]);
|
|
|
- },
|
|
|
- toEvaluation(index) {
|
|
|
- this.curSubIndex = 0;
|
|
|
- this.curEvaIndex = index;
|
|
|
- sessionStorage.setItem("examScope", this.evaListShow[index].scope);
|
|
|
- //跨校个人评测
|
|
|
- if (!this.evaListShow[this.curEvaIndex].curSchool) {
|
|
|
- this.examDetaiInfo = this.evaListShow[this.curEvaIndex];
|
|
|
- this.isLoading = false;
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.evaListShow[this.curEvaIndex].progress == "going" && this.curBarIndex === 0) {
|
|
|
- this.curBarIndex = 3;
|
|
|
- }
|
|
|
- if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].papers.length == 0) {
|
|
|
- this.findExamInfo();
|
|
|
- } else {
|
|
|
- this.examDetaiInfo = this.evaListShow[this.curEvaIndex];
|
|
|
- if (this.examDetaiInfo.progress === "finish") {
|
|
|
- this.findSimpleAna();
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //查询当前评测的详细信息
|
|
|
- findExamInfo() {
|
|
|
- let requestData = {
|
|
|
- id: this.evaListShow[this.curEvaIndex].id,
|
|
|
- code: this.evaListShow[this.curEvaIndex].code
|
|
|
- };
|
|
|
- this.isLoading = true;
|
|
|
- this.$api.learnActivity
|
|
|
- .FindExamInfo(requestData)
|
|
|
- .then(
|
|
|
- async (res) => {
|
|
|
- this.dataErr = false;
|
|
|
- if (!res.error) {
|
|
|
- let resData = res.examInfo[0];
|
|
|
- resData.score = 0;
|
|
|
- for (let index in resData.papers) {
|
|
|
- let blob = resData.papers[index].blob;
|
|
|
- let sheetNo = resData.papers[index].sheetNo;
|
|
|
- let totlaSocre = resData.papers[index].point.reduce((prev, next, index, array) => {
|
|
|
- return prev + next;
|
|
|
- });
|
|
|
- resData.examPaperErr = false;
|
|
|
- resData.papers[index].examScope = resData.scope;
|
|
|
- resData.papers[index].examCode = resData.code;
|
|
|
- resData.papers[index].examId = resData.id;
|
|
|
- resData.papers[index].owner = resData.owner;
|
|
|
- resData.papers[index].sheetNo = sheetNo;
|
|
|
- try {
|
|
|
- let tmdid = this.evaListShow[this.curEvaIndex].code.substr(this.evaListShow[this.curEvaIndex].code.lastIndexOf("-") + 1)
|
|
|
- if(tmdid != this.$store.state.userInfo.TEAMModelId && this.evaListShow[this.curEvaIndex].scope != 'school') {
|
|
|
- resData.papers[index] = await this.$evTools.getFullPaperByTmdId(tmdid, resData.papers[index].blob)
|
|
|
- } else {
|
|
|
- resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- resData.papers[index].item = [];
|
|
|
- resData.examPaperErr = true;
|
|
|
- this.$Message.error(this.$t("learnActivity.simple.paperErr"));
|
|
|
- }
|
|
|
- resData.papers[index].examScope = resData.scope;
|
|
|
- resData.papers[index].examCode = resData.code;
|
|
|
- resData.papers[index].examId = resData.id;
|
|
|
- resData.papers[index].owner = resData.owner;
|
|
|
- resData.papers[index].sheetNo = sheetNo;
|
|
|
- resData.papers[index].totlaSocre = totlaSocre;
|
|
|
- if (!resData.papers[index].subjectId) {
|
|
|
- resData.papers[index].subjectId = blob.substring(blob.lastIndexOf("/") + 1);
|
|
|
- resData.papers[index].subjectName = resData.subjects[index].name;
|
|
|
- }
|
|
|
- resData.papers[index].blob = blob;
|
|
|
- resData.score += resData.papers[index].score;
|
|
|
-
|
|
|
- //补充评测状态信息
|
|
|
- let statusInfo = this.getEvStatusInfo(resData.progress);
|
|
|
- resData.progText = statusInfo.progText;
|
|
|
- resData.progColor = statusInfo.progColor;
|
|
|
- //设置各科题号信息
|
|
|
- this.setPaperQuInfo(resData.papers);
|
|
|
- }
|
|
|
- this.evaListShow.splice(this.curEvaIndex, 1, resData);
|
|
|
- this.examDetaiInfo = resData;
|
|
|
- // if (this.examDetaiInfo.progress === 'finish' && !this.dataErr) {
|
|
|
- if (this.examDetaiInfo.progress === "finish") {
|
|
|
- this.findSimpleAna();
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.exInfoErr"));
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
- }
|
|
|
- )
|
|
|
- .finally(() => {
|
|
|
- this.isLoading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- // 设置各科题号信息
|
|
|
- setPaperQuInfo(papers) {
|
|
|
- this.paperQuInfo = [];
|
|
|
- if (!papers) return;
|
|
|
- let objectiveQu = ["single", "multiple", "judge"];
|
|
|
- papers.forEach((paper) => {
|
|
|
- let data = [];
|
|
|
- let realIndex = 0;
|
|
|
- paper.item?.forEach((item, index) => {
|
|
|
- if (item.children.length) {
|
|
|
- item.children.forEach((childItem, childIndex) => {
|
|
|
- let i = realIndex++;
|
|
|
- data.push({
|
|
|
- label: index + 1 + "-" + (childIndex + 1),
|
|
|
- value: i,
|
|
|
- disabled: objectiveQu.includes(childItem.type),
|
|
|
- quIndex: index,
|
|
|
- childIndex: childIndex
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- let i = realIndex++;
|
|
|
- data.push({
|
|
|
- label: index + 1 + "",
|
|
|
- value: i,
|
|
|
- disabled: objectiveQu.includes(item.type),
|
|
|
- quIndex: index,
|
|
|
- childIndex: -1
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- this.paperQuInfo.push({
|
|
|
- subjectId: paper.subjectId,
|
|
|
- subjectName: paper.subjectName,
|
|
|
- quNo: data
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- checkScoreSave(fn, index) {
|
|
|
- let compStu = this.$refs["score-box"] ? this.$refs["score-box"].$refs["byStuMark"] : null;
|
|
|
- let compQu = this.$refs["score-box"] ? this.$refs["score-box"].$refs["byQuMark"] : null;
|
|
|
- if ((compStu && compStu.isUpd) || (compQu && compQu.isUpd)) {
|
|
|
- this.$Modal.confirm({
|
|
|
- title: this.$t("learnActivity.score.saveScoreTitle"),
|
|
|
- content: this.$t("learnActivity.score.saveScoreContent"),
|
|
|
- okText: this.$t("learnActivity.mark.yes"),
|
|
|
- cancelText: this.$t("learnActivity.mark.no"),
|
|
|
- onOk: () => {
|
|
|
- if (compStu && compStu.isUpd) {
|
|
|
- compStu.saveScore();
|
|
|
- } else if (compQu && compQu.isUpd) {
|
|
|
- compQu.saveScore();
|
|
|
- }
|
|
|
- if (fn) fn(index);
|
|
|
- },
|
|
|
- onCancel: () => {
|
|
|
- if (compStu && compStu.isUpd) {
|
|
|
- compStu.isUpd = false;
|
|
|
- } else if (compQu && compQu.isUpd) {
|
|
|
- compStu.preSaveList = {};
|
|
|
- }
|
|
|
- if (fn) fn(index);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- if (fn) fn(index);
|
|
|
- }
|
|
|
- },
|
|
|
- goToCreate() {
|
|
|
- if (this.scope == "school") {
|
|
|
- this.$router.push({
|
|
|
- name: "createSchoolEva"
|
|
|
- });
|
|
|
- } else if (this.scope == "private") {
|
|
|
- this.$router.push({
|
|
|
- name: "createPrivEva"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- // 复制评测
|
|
|
- copyEv() {
|
|
|
- // 课中评测不提供复制操作
|
|
|
- if (this.evaListShow[this.curEvaIndex]?.source === "1") {
|
|
|
- this.$Modal.info({
|
|
|
- title: this.$t("learnActivity.mgtScEv.copyTitle"),
|
|
|
- content: this.$t("learnActivity.mgtScEv.copyContent1")
|
|
|
- });
|
|
|
- } else if (this.evaListShow[this.curEvaIndex]) {
|
|
|
- this.$Modal.confirm({
|
|
|
- title: this.$t("learnActivity.mgtScEv.copyTitle"),
|
|
|
- content: this.$t("learnActivity.mgtScEv.copyContent"),
|
|
|
- onOk: () => {
|
|
|
- console.log(this.evaListShow[this.curEvaIndex]);
|
|
|
- if (this.scope == "school") {
|
|
|
- this.$router.push({
|
|
|
- name: "createSchoolEva",
|
|
|
- params: {
|
|
|
- evaluationInfo: this.evaListShow[this.curEvaIndex]
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$router.push({
|
|
|
- name: "createPrivEva",
|
|
|
- params: {
|
|
|
- evaluationInfo: this.evaListShow[this.curEvaIndex]
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- /**删除评测信息 */
|
|
|
- deleteEvaluation() {
|
|
|
- let isArtExam = this.evaListShow[this.curEvaIndex].qamode === 2;
|
|
|
- if (isArtExam) {
|
|
|
- this.$Message.warning(this.$t("learnActivity.mgtScEv.delArtExamTip"));
|
|
|
- return;
|
|
|
- }
|
|
|
- this.$Modal.confirm({
|
|
|
- title: this.$t("learnActivity.mgtScEv.deleteTitle"),
|
|
|
- content: `${this.$t("learnActivity.mgtScEv.deleteContent")}${this.evaListShow[this.curEvaIndex].name}?`,
|
|
|
- onOk: () => {
|
|
|
- let params = {
|
|
|
- id: this.evaListShow[this.curEvaIndex].id,
|
|
|
- scope: this.evaListShow[this.curEvaIndex].scope,
|
|
|
- code: this.evaListShow[this.curEvaIndex].code.replace("Exam-", "")
|
|
|
- };
|
|
|
- this.isLoading = true;
|
|
|
- this.$api.learnActivity
|
|
|
- .DeleteExamInfo(params)
|
|
|
- .then(
|
|
|
- (res) => {
|
|
|
- if (res.error == null) {
|
|
|
- let index = this.curEvaIndex;
|
|
|
- this.selectEvaluation(0);
|
|
|
- this.evaListShow.splice(index, 1);
|
|
|
- this.$Message.success(this.$t("learnActivity.mgtScEv.deleteOk"));
|
|
|
- } else {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.deleteErr"));
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.deleteErr"));
|
|
|
- }
|
|
|
- )
|
|
|
- .finally(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.isLoading = false;
|
|
|
- }, 500);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- //筛选评测
|
|
|
- filterEv() {
|
|
|
- this.ctnToken = "";
|
|
|
- this.findEvaluation(true);
|
|
|
- },
|
|
|
- /**获取mode对应的label */
|
|
|
- getModeLabel(code, qamode) {
|
|
|
- if (qamode == 1) {
|
|
|
- return this.$t("learnActivity.mgtScEv.paperExam");
|
|
|
- }
|
|
|
- for (let item of this.$GLOBAL.EV_MODE()) {
|
|
|
- if (item.value == code) {
|
|
|
- return item.label;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- /**获取type对应的label */
|
|
|
- getTypeLabel(code) {
|
|
|
- for (let item of this.$GLOBAL.EV_TYPE()) {
|
|
|
- if (item.value == code) {
|
|
|
- return item.label;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- editEvName(index) {
|
|
|
- this.editNameStatus = true;
|
|
|
- this.editName = this.evaListShow[index]?.name;
|
|
|
- },
|
|
|
- confirmEditName() {
|
|
|
- if (this.editName) {
|
|
|
- this.evaListShow[this.curEvaIndex].code = this.evaListShow[this.curEvaIndex].code.replace("Exam-", "");
|
|
|
- this.btnLoading = true;
|
|
|
- this.$api.learnActivity
|
|
|
- .updExamEndtime({
|
|
|
- id: this.evaListShow[this.curEvaIndex].id,
|
|
|
- code: this.evaListShow[this.curEvaIndex].code,
|
|
|
- name: this.editName
|
|
|
- })
|
|
|
- .then(
|
|
|
- (res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.evaListShow[this.curEvaIndex].name = this.editName;
|
|
|
- this.$Message.success(this.$t("learnActivity.mgtScEv.updOk"));
|
|
|
- } else {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
|
|
|
- }
|
|
|
- )
|
|
|
- .finally(() => {
|
|
|
- this.editNameStatus = false;
|
|
|
- this.btnLoading = false;
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$Message.warning(this.$t("learnActivity.mgtScEv.edNameHolder"));
|
|
|
- }
|
|
|
- },
|
|
|
- handleTime(value) {
|
|
|
- if (value.indexOf("00:00") > 0) {
|
|
|
- value = value.replace("00:00", "23:59:59");
|
|
|
- this.editTime = value;
|
|
|
- }
|
|
|
- },
|
|
|
- editEvEndtime(index) {
|
|
|
- this.editTimeStatus = true;
|
|
|
- this.editTime = new Date(this.evaListShow[index]?.endTime);
|
|
|
- },
|
|
|
- confirmEditEndtime() {
|
|
|
- if (this.editTime) {
|
|
|
- this.evaListShow[this.curEvaIndex].code = this.evaListShow[this.curEvaIndex].code.replace("Exam-", "");
|
|
|
- this.btnLoading = true;
|
|
|
- this.$api.learnActivity
|
|
|
- .updExamEndtime({
|
|
|
- id: this.evaListShow[this.curEvaIndex].id,
|
|
|
- code: this.evaListShow[this.curEvaIndex].code,
|
|
|
- time: this.editTime.getTime()
|
|
|
- })
|
|
|
- .then(
|
|
|
- (res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.evaListShow[this.curEvaIndex].endTime = this.editTime.getTime();
|
|
|
- this.$Message.success(this.$t("learnActivity.mgtScEv.updOk"));
|
|
|
- } else {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
|
|
|
- }
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- this.$Message.error(this.$t("learnActivity.mgtScEv.updErr"));
|
|
|
- }
|
|
|
- )
|
|
|
- .finally(() => {
|
|
|
- this.editTimeStatus = false;
|
|
|
- this.btnLoading = false;
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$Message.warning(this.$t("learnActivity.mgtScEv.endTimeHolder"));
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- curBarIndex(n, o) {
|
|
|
- if (n == 0) {
|
|
|
- if (this.$refs["score-box"] && this.$refs["score-box"].$refs["score-table"]) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs["score-box"].$refs["score-table"].handleResize();
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- "$store.state.user.curSemester": {
|
|
|
- deep: true,
|
|
|
- immediate: true,
|
|
|
- handler(n, old) {
|
|
|
- if (n) {
|
|
|
- this.scope = this.$route.name === "schoolExam" ? "school" : "private";
|
|
|
- this.semesterRange = this.$tools.getStTimeByYearAndSemester(n.year, n.index);
|
|
|
- let curPeriod = this.$store.state.user.curPeriod;
|
|
|
- this.filterPeriod = curPeriod.id;
|
|
|
- }
|
|
|
- this.findEvaluation(true);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-</script>
|
|
|
-<style lang="less" scoped>
|
|
|
- @import "./jointExamMgt.less";
|
|
|
-</style>
|
|
|
-<style lang="less">
|
|
|
- .jointexam-list-main {
|
|
|
- .ivu-scroll-container {
|
|
|
- width: 100%;
|
|
|
- height: 100% !important;
|
|
|
- }
|
|
|
- }
|
|
|
-</style>
|