|
@@ -0,0 +1,133 @@
|
|
|
+<template>
|
|
|
+ <div class="course-link-manage">
|
|
|
+ <div class="part-box part-box-filter part-box-flex">
|
|
|
+ <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
|
|
|
+ <el-form-item prop="semesterId" label="学期:">
|
|
|
+ <semester-select v-model="filter.semesterId"></semester-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="examTypeId" label="考试类型:">
|
|
|
+ <exam-type-select v-model="filter.examTypeId"></exam-type-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="云阅卷课程代码:">
|
|
|
+ <el-input
|
|
|
+ style="width: 200px;"
|
|
|
+ v-model.trim="filter.cloudMarkingCourseCode"
|
|
|
+ placeholder="云阅卷课程代码模糊查询"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="考务数据课程代码:">
|
|
|
+ <el-input
|
|
|
+ style="width: 210px;"
|
|
|
+ v-model.trim="filter.syncCourseCode"
|
|
|
+ placeholder="考务数据课程代码模糊查询"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="toPage(1)">查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="part-box-action">
|
|
|
+ <upload-button
|
|
|
+ btn-content="导入"
|
|
|
+ btn-type="primary"
|
|
|
+ :upload-url="uploadUrl"
|
|
|
+ :upload-data="{
|
|
|
+ semesterId: filter.semesterId,
|
|
|
+ examTypeId: filter.examTypeId
|
|
|
+ }"
|
|
|
+ :format="['xls', 'xlsx']"
|
|
|
+ accept=".xls,.xlsx"
|
|
|
+ :disabled="!filter.semesterId || !filter.examTypeId"
|
|
|
+ @valid-error="validError"
|
|
|
+ @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="semesterName" label="学期"></el-table-column>
|
|
|
+ <el-table-column prop="examTypeName" label="考试类型"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cloudMarkingCourseCode"
|
|
|
+ label="云阅卷课程代码"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="syncCourseCode"
|
|
|
+ label="考务数据课程代码"
|
|
|
+ ></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"
|
|
|
+ :page-sizes="[20, 50, 100]"
|
|
|
+ @current-change="toPage"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { courseLinkList } from "../api";
|
|
|
+import UploadButton from "@/components/UploadButton";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "course-link-manage",
|
|
|
+ components: { UploadButton },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ filter: {
|
|
|
+ semesterId: "",
|
|
|
+ examTypeId: "",
|
|
|
+ syncCourseCode: "",
|
|
|
+ cloudMarkingCourseCode: ""
|
|
|
+ },
|
|
|
+ current: 1,
|
|
|
+ size: this.GLOBAL.pageSize,
|
|
|
+ total: 0,
|
|
|
+ dataList: [],
|
|
|
+ uploadUrl: "/api/exam_course_mapping/import"
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getList() {
|
|
|
+ const datas = {
|
|
|
+ ...this.filter,
|
|
|
+ pageNumber: this.current,
|
|
|
+ pageSize: this.size
|
|
|
+ };
|
|
|
+
|
|
|
+ const data = await courseLinkList(datas);
|
|
|
+ this.dataList = data.records;
|
|
|
+ this.total = data.total;
|
|
|
+ },
|
|
|
+ toPage(page) {
|
|
|
+ this.current = page;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ validError(errorData) {
|
|
|
+ this.$message.error(errorData.message);
|
|
|
+ },
|
|
|
+ uploadSuccess() {
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|