|
@@ -2,16 +2,16 @@
|
|
|
<div class="manage-evaluation-container custom-iview-split">
|
|
|
<Loading :top="200" type="1" style="text-align: center" v-show="isLoading"></Loading>
|
|
|
<div class="back-page"
|
|
|
- style="margin-top: 15px;margin-left: 15px;margin-bottom: 15px;cursor: pointer;user-select: none;width: 50px;"
|
|
|
- @click="goBack">
|
|
|
+ style="margin-top: 15px;margin-left: 15px;margin-bottom: 15px;cursor: pointer;user-select: none;width: 50px;"
|
|
|
+ @click="goBack">
|
|
|
<Icon type="md-arrow-round-back" />
|
|
|
{{ $t('cusMgt.rcd.rtn') }}
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
<div style="margin: 10px">
|
|
|
- <el-select v-model="filter.schedule" style="margin-right: 30px;" @change="findEvaluation">
|
|
|
+ <el-select v-model="filter.schedule" style="margin-right: 30px;" @change="findEvaluation">
|
|
|
<el-option v-for="item in propSchedules" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
- <el-select v-model="filter.group" @change="findEvaluation">
|
|
|
+ <el-select v-model="filter.group" @change="findEvaluation">
|
|
|
<el-option v-for="item in propGroups" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -20,65 +20,65 @@
|
|
|
<div class="evaluation-list-wrap" slot="left">
|
|
|
<div class="evaluation-list-title">
|
|
|
<b class="title">
|
|
|
- {{ scope == "school" ? $t("learnActivity.mgtScEv.listLabel1") :
|
|
|
- $t("learnActivity.mgtScEv.listLabel2") }}
|
|
|
+ {{scope == "school" ? $t("learnActivity.mgtScEv.listLabel1") : $t("learnActivity.mgtScEv.listLabel2")}}
|
|
|
</b>
|
|
|
<div class="action-icon-wrap" v-if="!isSearch">
|
|
|
<Icon type="md-add" class="to-create-icon" @click="goToCreate"
|
|
|
- :title="$t('learnActivity.mgtScEv.create')" v-show="isNotExamMark" />
|
|
|
+ :title="$t('learnActivity.mgtScEv.create')" v-show="isNotExamMark" />
|
|
|
<!-- <Icon type="md-trash" v-show="htEvaListShow.length" class="to-create-icon"
|
|
|
- :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" v-if="evAuthStatus" /> -->
|
|
|
+ :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" v-if="evAuthStatus" /> -->
|
|
|
<!-- 筛选 -->
|
|
|
<!-- <Poptip style="float: right" trigger="click" :offset="-10" theme="light">
|
|
|
- <Icon type="ios-funnel" class="to-create-icon" />
|
|
|
- <div slot="content">
|
|
|
- <div class="filter-item">
|
|
|
- <span>{{ $t("learnActivity.mgtScEv.ftStatus") }}</span>
|
|
|
- <Select v-model="filter.progress" style="width: 100px" size="small" clearable
|
|
|
- @on-change="filterEv">
|
|
|
- <Option value="pending">{{ $t("learnActivity.mgtScEv.pending") }}</Option>
|
|
|
- <Option value="going">{{ $t("learnActivity.mgtScEv.going") }}</Option>
|
|
|
- <Option value="finish">{{ $t("learnActivity.mgtScEv.finish") }}</Option>
|
|
|
- </Select>
|
|
|
- </div>
|
|
|
- <div class="filter-item">
|
|
|
- <span>{{ $t("learnActivity.mgtScEv.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>
|
|
|
+ <Icon type="ios-funnel" class="to-create-icon" />
|
|
|
+ <div slot="content">
|
|
|
+ <div class="filter-item">
|
|
|
+ <span>{{ $t("learnActivity.mgtScEv.ftStatus") }}</span>
|
|
|
+ <Select v-model="filter.progress" style="width: 100px" size="small" clearable
|
|
|
+ @on-change="filterEv">
|
|
|
+ <Option value="pending">{{ $t("learnActivity.mgtScEv.pending") }}</Option>
|
|
|
+ <Option value="going">{{ $t("learnActivity.mgtScEv.going") }}</Option>
|
|
|
+ <Option value="finish">{{ $t("learnActivity.mgtScEv.finish") }}</Option>
|
|
|
+ </Select>
|
|
|
</div>
|
|
|
- </Poptip> -->
|
|
|
+ <div class="filter-item">
|
|
|
+ <span>{{ $t("learnActivity.mgtScEv.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.mgtScEv.search')" />
|
|
|
+ :title="$t('learnActivity.mgtScEv.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)()" />
|
|
|
+ :placeholder="$t('schoolBaseInfo.codeSearchHolder')" autofocus style="width: 100%"
|
|
|
+ @on-click="closeKeySearch" @on-change="$jsFn.debounce(filterEv, 1000)()" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<Scroll class="evaluation-list-main" :on-reach-bottom="handleReachBottom" :distance-to-edge="[-1, -1]">
|
|
|
<div v-for="(item, index) in htEvaListShow" @click.capture="selectEvaluation(index)"
|
|
|
- :class="['evaluation-item', 'block-bg', index == curEvaIndex ? 'block-bg-active' : '']"
|
|
|
- :key="index">
|
|
|
+ :class="['evaluation-item', 'block-bg', index == curEvaIndex ? 'block-bg-active' : '']"
|
|
|
+ :key="index">
|
|
|
<p class="evaluation-name">
|
|
|
{{ item.name }}
|
|
|
<!-- 修改评测名称 -->
|
|
|
<Icon type="md-create" class="edit-end-time" @click="editEvName(index)"
|
|
|
- :title="$t('learnActivity.mgtScEv.edName')" v-show="isNotExamMark" />
|
|
|
+ :title="$t('learnActivity.mgtScEv.edName')" v-show="isNotExamMark" />
|
|
|
</p>
|
|
|
<div class="all-tag-box">
|
|
|
<div class="tags-wrap">
|
|
|
<!-- 活动进度状态 -->
|
|
|
<!-- <span class="evaluation-status-tag ev-tag-common" :style="{ background:item.progColor, color: item.progColor}">
|
|
|
- {{ item.progText }}
|
|
|
- </span> -->
|
|
|
+ {{ item.progText }}
|
|
|
+ </span> -->
|
|
|
<!-- 评测模式 -->
|
|
|
- <span class="ev-info-tag ev-tag-common">{{ getModeLabel(item.source)
|
|
|
- }}</span>
|
|
|
+ <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> -->
|
|
@@ -90,12 +90,10 @@
|
|
|
<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)">
|
|
|
+ <!-- <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 }">
|
|
|
+ <span v-else class="handle-end-tag ev-tag-common" :style="{ background: '#c0c0c0', color: item.progColor }">
|
|
|
{{ item.progText }}
|
|
|
</span> -->
|
|
|
</div>
|
|
@@ -106,13 +104,12 @@
|
|
|
-
|
|
|
<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')" /> -->
|
|
|
+ <!-- <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> -->
|
|
|
+ <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" />
|
|
@@ -126,64 +123,60 @@
|
|
|
{{ $t("learnActivity.mgtScEv.shareText10") }}
|
|
|
</p>
|
|
|
</div>
|
|
|
- </Tooltip>
|
|
|
+ </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> -->
|
|
|
+ <Icon size="20" type="md-power" class="qr-code-icon" />
|
|
|
+ </span> -->
|
|
|
</div>
|
|
|
- <EmptyData v-if="htEvaListShow.length == 0" style="margin-top: 100px"
|
|
|
- :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
|
|
|
+ <EmptyData v-if="htEvaListShow.length == 0" style="margin-top: 100px" :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
|
|
|
</Scroll>
|
|
|
</div>
|
|
|
<div slot="right" class="evaluation-detail-wrap">
|
|
|
<!--顶部菜单-->
|
|
|
- <div class="evaluation-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)" v-show="isNotExamMark">
|
|
|
- {{ $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>
|
|
|
+ <el-row type="flex" justify="start" class="evaluation-detail-bar">
|
|
|
+ <!--Navi Tab-->
|
|
|
+ <el-col :span="22" >
|
|
|
+ <!-- 评测数据 -->
|
|
|
+ <!-- <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)" v-show="isNotExamMark">
|
|
|
+ {{ $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> -->
|
|
|
+ </el-col>
|
|
|
+ <!--右側按鈕-->
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-row type="flex" justify="end">
|
|
|
+ <!-- 匯出成績 -->
|
|
|
+ <el-button @click="showExportScoreModalFunc" long type="primary" style="width: 100%; margin-top: 2px;" v-if="false">
|
|
|
+ {{$t("learnActivity.mgtScEv.exportScore")}}
|
|
|
+ </el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<!-- 暂无数据 -->
|
|
|
<EmptyData v-if="!htEvaListShow.length" :top="120"></EmptyData>
|
|
|
-
|
|
|
<!-- 评测数据 -->
|
|
|
- <DataView v-else-if="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData"
|
|
|
- :simpleData="simpleData" :dataErr="dataErr" class="evaluation-base-info"></DataView>
|
|
|
+ <DataView v-else-if="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="evaluation-base-info"></DataView>
|
|
|
<!-- 作答详情 -->
|
|
|
- <AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData"
|
|
|
- class="evaluation-base-info"></AnswerTable>
|
|
|
+ <AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="evaluation-base-info"></AnswerTable>
|
|
|
<!-- 评测试卷 -->
|
|
|
- <ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" :activityIndex="curEvaIndex"
|
|
|
- :refreshExam="refreshExam" class="evaluation-base-info"></ExamPaper>
|
|
|
-
|
|
|
+ <ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" :activityIndex="curEvaIndex" :refreshExam="refreshExam" class="evaluation-base-info"></ExamPaper>
|
|
|
</div>
|
|
|
</Split>
|
|
|
<!-- 修改评测名称 -->
|
|
@@ -196,8 +189,9 @@
|
|
|
{{ $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>
|
|
|
+ <Button :loading="btnLoading" @click="confirmEditName" long type="primary" class="confirm-btn">
|
|
|
+ {{$t("syllabus.confirm")}}
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
<!-- 修改评测时间 -->
|
|
@@ -210,21 +204,35 @@
|
|
|
{{ $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%">
|
|
|
+ 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>
|
|
|
+ <Button :loading="btnLoading" @click="confirmEditEndtime" long type="primary" class="confirm-btn">
|
|
|
+ {{$t("syllabus.confirm")}}
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
<!-- 分享二维码 -->
|
|
|
<QrcodeModal v-model="showQrStatus" :config="qrConfig"></QrcodeModal>
|
|
|
+ <!-- 匯出成績彈出視窗 -->
|
|
|
+ <el-dialog :title="this.$t('learnActivity.mgtScEv.exportScore')" :visible.sync="showExportScoreModal" width="40%">
|
|
|
+ <el-button type="primary" class="btn-new" size="small" style="margin-top: 0; margin-bottom: 10px; margin-left: 0; " @click="exportExcel('teacherCourse')">{{this.$t("htcommunity.export")}}</el-button>
|
|
|
+ <c-scrollbar ref="scrollbarRef" width="100%" height="66vh" trigger="hover" direction="y">
|
|
|
+ <el-table class="export-group-tb" :data="groupListForExport" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column prop="teacherName" :label="$t('learnActivity.mgtScEv.teacherName')"></el-table-column>
|
|
|
+ <el-table-column prop="courseName" :label="$t('learnActivity.mgtScEv.courseName')"></el-table-column>
|
|
|
+ <el-table-column prop="groupListName" :label="$t('learnActivity.mgtScEv.className')"></el-table-column>
|
|
|
+ <el-table-column type="selection" :label="$t('purchase.action')"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </c-scrollbar>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import DataView from "../learnactivity/tabs/DataView.vue";
|
|
|
import AnswerTable from "../learnactivity/tabs/htAnswerTable.vue";
|
|
|
import ExamPaper from "../learnactivity/tabs/htExamPaper.vue";
|
|
|
-
|
|
|
+import XLSX from 'xlsx';
|
|
|
+import excel from '@/utils/excel.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -278,6 +286,10 @@ export default {
|
|
|
group: ""
|
|
|
},
|
|
|
semesterRange: null,
|
|
|
+ exportScoreLoading: false,
|
|
|
+ showExportScoreModal: false,
|
|
|
+ groupListForExport: [], //匯出成績視窗 課程名單列表
|
|
|
+ importSelection: [], //(匯入成績時)選擇中的課程名單
|
|
|
// activeGroups:[
|
|
|
// {
|
|
|
// id:"1",
|
|
@@ -375,7 +387,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
this.$Modal.info({
|
|
|
title: this.$t("learnActivity.createEv.evTarget"),
|
|
|
render: (h) => {
|
|
@@ -631,6 +642,7 @@ export default {
|
|
|
this.isLoading = false;
|
|
|
}
|
|
|
this.isLoading = false;
|
|
|
+ console.log('htEvaListShow', this.htEvaListShow);
|
|
|
} else {
|
|
|
this.isLoading = false;
|
|
|
}
|
|
@@ -669,6 +681,7 @@ export default {
|
|
|
},
|
|
|
// 點擊左側個人評量列表項目的動作
|
|
|
selectEvaluation(index) {
|
|
|
+ console.log('點擊左側個人評量列表項目的動作');
|
|
|
this.checkScoreSave(this.toEvaluation, index);
|
|
|
this.$EventBus.$emit("onEvaChange", this.htEvaListShow[index]);
|
|
|
},
|
|
@@ -790,72 +803,72 @@ export default {
|
|
|
// });
|
|
|
|
|
|
this.dataErr = false;
|
|
|
-
|
|
|
- let resData = this.htEvaListShow[this.curEvaIndex];
|
|
|
- resData.score = 0;
|
|
|
- for (let index in resData.papers) {
|
|
|
- let blob = resData.papers[index].blob;
|
|
|
- let sheetNo = resData.papers[index].sheetNo;
|
|
|
- let totlaSocre = 0;
|
|
|
- if (resData.papers[index].point) {
|
|
|
- totlaSocre = resData.papers[index].point.reduce((prev, next, index, array) => {
|
|
|
- return prev + next;
|
|
|
- });
|
|
|
- }
|
|
|
+ let resData = this.htEvaListShow[this.curEvaIndex];
|
|
|
+ resData.score = 0;
|
|
|
+ for (let index in resData.papers) {
|
|
|
+ let blob = resData.papers[index].blob;
|
|
|
+ let sheetNo = resData.papers[index].sheetNo;
|
|
|
+ let totlaSocre = 0;
|
|
|
+ if (resData.papers[index].point) {
|
|
|
+ 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.htEvaListShow[this.curEvaIndex].creatorId;
|
|
|
- if (tmdid != this.$store.state.userInfo.TEAMModelId && this.htEvaListShow[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].examSchool = resData.school;
|
|
|
- resData.papers[index].examSubject = resData.subjects;
|
|
|
- resData.papers[index].creatorId = resData.creatorId;
|
|
|
- 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].subjectName = resData.name;
|
|
|
+ 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.htEvaListShow[this.curEvaIndex].creatorId;
|
|
|
+ if (tmdid != this.$store.state.userInfo.TEAMModelId && this.htEvaListShow[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])
|
|
|
}
|
|
|
- resData.papers[index].blob = blob;
|
|
|
- resData.score += resData.papers[index].score;
|
|
|
-
|
|
|
- //补充评测状态信息
|
|
|
- let statusInfo = this.getEvStatusInfo(resData.progress, resData.sStatus);
|
|
|
- resData.progText = statusInfo.progText;
|
|
|
- resData.progColor = statusInfo.progColor;
|
|
|
- resData.scoreText = statusInfo.scoreText;
|
|
|
- resData.scoreColor = statusInfo.scoreColor;
|
|
|
- resData.curSchool = !(resData.scope === "school" && resData.school != this.$store.state.userInfo.schoolCode);
|
|
|
- //设置各科题号信息
|
|
|
- this.setPaperQuInfo(resData.papers);
|
|
|
+ } catch (e) {
|
|
|
+ resData.papers[index].item = [];
|
|
|
+ resData.examPaperErr = true;
|
|
|
+ this.$Message.error(this.$t("learnActivity.simple.paperErr"));
|
|
|
}
|
|
|
- this.htEvaListShow.splice(this.curEvaIndex, 1, resData);
|
|
|
-
|
|
|
- this.examDetaiInfo = JSON.parse(JSON.stringify(resData));
|
|
|
- // if (this.examDetaiInfo.progress === 'finish' && !this.dataErr) {
|
|
|
- if (this.examDetaiInfo.progress === "finish") {
|
|
|
- this.findSimpleAna();
|
|
|
+ resData.papers[index].examScope = resData.scope;
|
|
|
+ resData.papers[index].examCode = resData.code;
|
|
|
+ resData.papers[index].examId = resData.id;
|
|
|
+ resData.papers[index].examSchool = resData.school;
|
|
|
+ resData.papers[index].examSubject = resData.subjects;
|
|
|
+ resData.papers[index].creatorId = resData.creatorId;
|
|
|
+ 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].subjectName = resData.name;
|
|
|
}
|
|
|
+ resData.papers[index].blob = blob;
|
|
|
+ resData.score += resData.papers[index].score;
|
|
|
+
|
|
|
+ //补充评测状态信息
|
|
|
+ let statusInfo = this.getEvStatusInfo(resData.progress, resData.sStatus);
|
|
|
+ resData.progText = statusInfo.progText;
|
|
|
+ resData.progColor = statusInfo.progColor;
|
|
|
+ resData.scoreText = statusInfo.scoreText;
|
|
|
+ resData.scoreColor = statusInfo.scoreColor;
|
|
|
+ resData.curSchool = !(resData.scope === "school" && resData.school != this.$store.state.userInfo.schoolCode);
|
|
|
+ //设置各科题号信息
|
|
|
+ this.setPaperQuInfo(resData.papers);
|
|
|
+ }
|
|
|
+ this.htEvaListShow.splice(this.curEvaIndex, 1, resData);
|
|
|
+
|
|
|
+ this.examDetaiInfo = JSON.parse(JSON.stringify(resData));
|
|
|
+ // if (this.examDetaiInfo.progress === 'finish' && !this.dataErr) {
|
|
|
+ if (this.examDetaiInfo.progress === "finish") {
|
|
|
+ this.findSimpleAna();
|
|
|
+ }
|
|
|
+ console.log('examDetaiInfo', this.examDetaiInfo);
|
|
|
|
|
|
},
|
|
|
// 设置各科题号信息
|
|
@@ -1086,6 +1099,96 @@ export default {
|
|
|
this.$Message.success(activeId);
|
|
|
|
|
|
},
|
|
|
+ //顯示匯出成績視窗
|
|
|
+ showExportScoreModalFunc() {
|
|
|
+ this.showExportScoreModal = true;
|
|
|
+ },
|
|
|
+ //勾選匯出成績課程名單
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.importSelection = val;
|
|
|
+ },
|
|
|
+ //匯出所有活動成績至Excel
|
|
|
+ async exportExcel() {
|
|
|
+ console.log('勾選匯出成績課程名單', this.importSelection);
|
|
|
+ this.$api.htcommunity.findSummaryRecords({ data: this.importSelection })
|
|
|
+ .then(
|
|
|
+ (res) => {
|
|
|
+ debugger;
|
|
|
+ console.log('findSummaryRecords res:', res);
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ this.$Message.error(this.$t("learnActivity.mgtScEv.exInfoErr"));
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .finally(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ let title = ['學校', '老師', '班級', '評量名01', '評量名02', '總平均', '排名'];
|
|
|
+ let key = ['school', 'creator', 'no', 'groupId', 'groupName'];
|
|
|
+ let data = [
|
|
|
+ ['AAA', 123456789, 18, 'xx省oo縣', 'xx省oo縣', 100, 1],
|
|
|
+ ['BBB', 789456123, 20, 'cc省rr縣', 'cc省rr縣', 90, 2],
|
|
|
+ ['CCC', 741852963, 25, 'hh省zz縣', 'hh省zz縣', 80, 3]
|
|
|
+ ];
|
|
|
+ let autoWidth = true;
|
|
|
+ let filename = '檔案名';
|
|
|
+ let wb = XLSX.utils.book_new();
|
|
|
+
|
|
|
+ let arr = excel.export_json_to_array(key, data);
|
|
|
+ arr.unshift(title);
|
|
|
+ arr.unshift(['合併欄內容', '', '', '', '', '', '']);
|
|
|
+ let ws = XLSX.utils.aoa_to_sheet(arr);
|
|
|
+ ws = excel.export_auto_width(ws, arr);
|
|
|
+ ws["!merges"] = [{
|
|
|
+ s: {//s为开始
|
|
|
+ c: 0,//开始列
|
|
|
+ r: 0//开始取值范围
|
|
|
+ },
|
|
|
+ e: {//e结束
|
|
|
+ c: 6,//结束列
|
|
|
+ r: 0//结束范围
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ XLSX.utils.book_append_sheet(wb, ws);
|
|
|
+ let wbout = XLSX.write(wb, {
|
|
|
+ bookType: 'xlsx',
|
|
|
+ bookSST: true,
|
|
|
+ type: 'array'
|
|
|
+ });
|
|
|
+
|
|
|
+ let ws2 = XLSX.utils.aoa_to_sheet(arr);
|
|
|
+ ws2 = excel.export_auto_width(ws2, arr);
|
|
|
+ XLSX.utils.book_append_sheet(wb, ws2);
|
|
|
+
|
|
|
+ XLSX.writeFile(wb, filename + '.xlsx');
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // const params = {
|
|
|
+ // title: this.columns.map(i => i.title),
|
|
|
+ // key: this.columns.map(i => i.key),
|
|
|
+ // data: this.originData,
|
|
|
+ // autoWidth: true,
|
|
|
+ // filename: this.tableName + '(' + subjectName + '、' + className + ')',
|
|
|
+ // setTitle: {
|
|
|
+ // title: className,
|
|
|
+ // rules: [{//合并第一行数据
|
|
|
+ // s: {//s为开始
|
|
|
+ // c: 0,//开始列
|
|
|
+ // r: 0//开始取值范围
|
|
|
+ // },
|
|
|
+ // e: {//e结束
|
|
|
+ // c: 4,//结束列
|
|
|
+ // r: 0//结束范围
|
|
|
+ // }
|
|
|
+ // }]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //excel.export_array_to_excel(params);
|
|
|
+
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
curBarIndex(n, o) {
|
|
@@ -1097,6 +1200,31 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ examDetaiInfo: {
|
|
|
+ handler(n) {
|
|
|
+ this.groupListForExport = [];
|
|
|
+ n.stuLists.forEach((s) => {
|
|
|
+ s.courseLists.forEach((c) => {
|
|
|
+ c.groupLists.forEach((g) => {
|
|
|
+ let res = {
|
|
|
+ schoolId: s.schoolId,
|
|
|
+ schoolName: s.schoolName,
|
|
|
+ creatorId: s.creatorId,
|
|
|
+ creatorName: s.creatorName,
|
|
|
+ subjectId: c.courseId,
|
|
|
+ courseId: c.courseId,
|
|
|
+ courseName: c.courseName,
|
|
|
+ examId: (c.examId != null) ? c.examId : '',
|
|
|
+ groupListId: g.id,
|
|
|
+ groupListName: g.name,
|
|
|
+ teacherName: s.creatorName + ' (' + s.schoolName + ')'
|
|
|
+ };
|
|
|
+ this.groupListForExport.push(res);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
// "$store.state.user.curSemester": {
|
|
|
// deep: true,
|
|
|
// immediate: true,
|
|
@@ -1124,4 +1252,7 @@ export default {
|
|
|
height: 100% !important;
|
|
|
}
|
|
|
}
|
|
|
+.export-group-tb {
|
|
|
+ line-height: 10px !important;
|
|
|
+}
|
|
|
</style>
|