|
@@ -0,0 +1,175 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="exam-statistics">
|
|
|
|
+ <div class="part-box part-box-filter part-box-flex">
|
|
|
|
+ <el-form ref="FilterForm" label-position="left" label-width="90px" inline>
|
|
|
|
+ <el-form-item label="开课学院:">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="filter.collegeName"
|
|
|
|
+ placeholder="开课学院"
|
|
|
|
+ clearable
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="开课部门:">
|
|
|
|
+ <teaching-room-select
|
|
|
|
+ v-model="filter.teachingRoomName"
|
|
|
|
+ placeholder="开课部门"
|
|
|
|
+ clearable
|
|
|
|
+ ></teaching-room-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="完成状态:">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="filter.status"
|
|
|
|
+ style="width: 142px;"
|
|
|
|
+ placeholder="完成状态"
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(val, key) in FINISH_STATUS"
|
|
|
|
+ :key="key"
|
|
|
|
+ :value="key"
|
|
|
|
+ :label="val"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="课程名称:">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="filter.courseName"
|
|
|
|
+ placeholder="课程名称"
|
|
|
|
+ clearable
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="任课老师:">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.trim="filter.teacherName"
|
|
|
|
+ placeholder="任课老师"
|
|
|
|
+ clearable
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="checkPrivilege('button', 'select')"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="toPage(1)"
|
|
|
|
+ >查询</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div class="part-box-action">
|
|
|
|
+ <el-button
|
|
|
|
+ type="success"
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ v-if="checkPrivilege('button', 'import')"
|
|
|
|
+ ><a :href="downloadUrl" :download="dfilename">模板下载</a></el-button
|
|
|
|
+ >
|
|
|
|
+ <upload-button
|
|
|
|
+ v-if="checkPrivilege('button', 'import')"
|
|
|
|
+ btn-icon="el-icon-circle-plus-outline"
|
|
|
|
+ btn-content="导入"
|
|
|
|
+ btn-type="success"
|
|
|
|
+ :upload-url="uploadUrl"
|
|
|
|
+ :format="['xls', 'xlsx']"
|
|
|
|
+ @upload-error="uplaodError"
|
|
|
|
+ @upload-success="uploadSuccess"
|
|
|
|
+ >
|
|
|
|
+ </upload-button>
|
|
|
|
+ </div>
|
|
|
|
+ </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="courseCode" label="课程代码"></el-table-column>
|
|
|
|
+ <el-table-column prop="courseName" label="课程名称"></el-table-column>
|
|
|
|
+ <el-table-column prop="teacherName" label="任课老师"></el-table-column>
|
|
|
|
+ <el-table-column prop="clazzName" label="班级名称"></el-table-column>
|
|
|
|
+ <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="printPlanName"
|
|
|
|
+ label="印刷计划"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column prop="printSum" label="总印份数"></el-table-column>
|
|
|
|
+ <el-table-column prop="status" label="状态">
|
|
|
|
+ <span slot-scope="scope">{{ FINISH_STATUS[scope.row.status] }}</span>
|
|
|
|
+ </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 { statisticsList } from "../api";
|
|
|
|
+import UploadButton from "../../../components/UploadButton";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: "exam-statistics",
|
|
|
|
+ components: { UploadButton },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ filter: {
|
|
|
|
+ courseName: "",
|
|
|
|
+ teacherName: "",
|
|
|
|
+ collegeName: "",
|
|
|
|
+ teachingRoomName: "",
|
|
|
|
+ status: ""
|
|
|
|
+ },
|
|
|
|
+ current: 1,
|
|
|
|
+ size: this.GLOBAL.pageSize,
|
|
|
|
+ total: 0,
|
|
|
|
+ dataList: [],
|
|
|
|
+ curRow: {},
|
|
|
|
+ FINISH_STATUS: { UN_FINISH: "未完成", FINISH: "已完成" },
|
|
|
|
+ // import
|
|
|
|
+ uploadUrl: "/api/admin/statistics/import",
|
|
|
|
+ downloadUrl: "/temps/studentTemplate.xlsx",
|
|
|
|
+ dfilename: "学生导入模板.xlsx"
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ async getList() {
|
|
|
|
+ if (!this.checkPrivilege("list", "list")) return;
|
|
|
|
+
|
|
|
|
+ const datas = {
|
|
|
|
+ ...this.filter,
|
|
|
|
+ pageNumber: this.current,
|
|
|
|
+ pageSize: this.size
|
|
|
|
+ };
|
|
|
|
+ const data = await statisticsList(datas);
|
|
|
|
+ this.dataList = data.records;
|
|
|
|
+ this.total = data.total;
|
|
|
|
+ },
|
|
|
|
+ toPage(page) {
|
|
|
|
+ this.current = page;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ campusChange() {
|
|
|
|
+ this.filter.clazzId = "";
|
|
|
|
+ },
|
|
|
|
+ // import
|
|
|
|
+ uplaodError(errorData) {
|
|
|
|
+ this.$notify.error({ title: "错误提示", message: errorData.message });
|
|
|
|
+ },
|
|
|
|
+ uploadSuccess() {
|
|
|
|
+ this.$message.success("文件上传成功,后台正在导入!");
|
|
|
|
+ this.getList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|