|
@@ -0,0 +1,186 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="score-sync">
|
|
|
|
+ <div class="part-box part-box-filter">
|
|
|
|
+ <el-form ref="FilterForm" label-position="left" inline>
|
|
|
|
+ <template v-if="checkPrivilege('condition', 'condition')">
|
|
|
|
+ <el-form-item label="学期:">
|
|
|
|
+ <semester-select v-model="filter.semesterId"></semester-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="考试:">
|
|
|
|
+ <exam-select
|
|
|
|
+ v-model="filter.examId"
|
|
|
|
+ :semester-id="filter.semesterId"
|
|
|
|
+ ></exam-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ <el-form-item label-width="0px">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="checkPrivilege('button', 'select')"
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="!filter.semesterId || !filter.examId"
|
|
|
|
+ @click="toPage(1)"
|
|
|
|
+ >查询</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="part-box part-box-pad">
|
|
|
|
+ <el-table ref="TableList" :data="dataList">
|
|
|
|
+ <el-table-column
|
|
|
|
+ type="index"
|
|
|
|
+ label="序号"
|
|
|
|
+ width="70"
|
|
|
|
+ :index="indexMethod"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="examId"
|
|
|
|
+ label="考试ID"
|
|
|
|
+ min-width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="examName"
|
|
|
|
+ label="考试名称"
|
|
|
|
+ min-width="200"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="startTime"
|
|
|
|
+ label="开始时间"
|
|
|
|
+ width="170"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="endTime"
|
|
|
|
+ label="结束时间"
|
|
|
|
+ width="170"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="status"
|
|
|
|
+ label="状态"
|
|
|
|
+ width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="totalCourses"
|
|
|
|
+ label="总课程数"
|
|
|
|
+ width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="totalStudents"
|
|
|
|
+ label="总考生数"
|
|
|
|
+ width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="resule"
|
|
|
|
+ label="结果"
|
|
|
|
+ width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="totalScore"
|
|
|
|
+ label="成绩"
|
|
|
|
+ width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ class-name="action-column"
|
|
|
|
+ label="操作"
|
|
|
|
+ width="140"
|
|
|
|
+ fixed="right"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="checkPrivilege('link', 'sync')"
|
|
|
|
+ class="btn-primary"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="toSync(scope.row)"
|
|
|
|
+ >同步</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="
|
|
|
|
+ checkPrivilege('link', 'sync') &&
|
|
|
|
+ scope.row.status === 'FINISH' &&
|
|
|
|
+ scope.row.result === 'ERROR'
|
|
|
|
+ "
|
|
|
|
+ class="btn-primary"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="toExporLog(scope.row)"
|
|
|
|
+ >导出日志</el-button
|
|
|
|
+ >
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div class="part-page">
|
|
|
|
+ <el-pagination
|
|
|
|
+ background
|
|
|
|
+ layout="total,prev, pager, next"
|
|
|
|
+ :current-page="current"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page-size="size"
|
|
|
|
+ @current-change="toPage"
|
|
|
|
+ >
|
|
|
|
+ </el-pagination>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { scoreLogListPage, scoreLogSync } from "../api";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: "score-archive",
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ filter: {
|
|
|
|
+ semesterId: "",
|
|
|
|
+ examId: ""
|
|
|
|
+ },
|
|
|
|
+ current: 1,
|
|
|
|
+ size: this.GLOBAL.pageSize,
|
|
|
|
+ total: 0,
|
|
|
|
+ dataList: [],
|
|
|
|
+ curImage: {},
|
|
|
|
+ curRow: {},
|
|
|
|
+ curPapers: [],
|
|
|
|
+ downloading: false,
|
|
|
|
+ syncLoading: false,
|
|
|
|
+ exportLoading: false,
|
|
|
|
+ loading: false,
|
|
|
|
+ taskType: ""
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ // this.toPage(1);
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ async getList() {
|
|
|
|
+ if (!this.checkPrivilege("list", "list")) return;
|
|
|
|
+ const datas = {
|
|
|
|
+ ...this.filter,
|
|
|
|
+ pageNumber: this.current,
|
|
|
|
+ pageSize: this.size
|
|
|
|
+ };
|
|
|
|
+ const data = await scoreLogListPage(datas);
|
|
|
|
+ this.dataList = data.records;
|
|
|
|
+ this.total = data.total;
|
|
|
|
+ },
|
|
|
|
+ toPage(page) {
|
|
|
|
+ this.current = page;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ async toSync() {
|
|
|
|
+ if (this.syncLoading) return;
|
|
|
|
+ this.syncLoading = true;
|
|
|
|
+ const res = await scoreLogSync({
|
|
|
|
+ semesterId: this.filter.semesterId,
|
|
|
|
+ courseCode: this.filter.courseCode,
|
|
|
|
+ examId: this.filter.examId
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ this.syncLoading = false;
|
|
|
|
+ if (!res) return;
|
|
|
|
+ this.$message.success("同步任务已经提交");
|
|
|
|
+ },
|
|
|
|
+ toExporLog(row) {
|
|
|
|
+ if (!row.errorFileUrl) return;
|
|
|
|
+ window.open(row.errorFileUrl);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|