|
@@ -1,118 +1,109 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- class="data-check-dialog page-dialog"
|
|
|
- :visible.sync="modalIsShow"
|
|
|
- title="数据处理"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false"
|
|
|
- append-to-body
|
|
|
- fullscreen
|
|
|
- @open="visibleChange"
|
|
|
- >
|
|
|
- <div class="data-check-body">
|
|
|
- <div class="data-check-action part-box">
|
|
|
- <el-form
|
|
|
- class="data-check-action-form"
|
|
|
- ref="modalFormComp"
|
|
|
- :model="modalForm"
|
|
|
- :rules="rules"
|
|
|
- label-position="top"
|
|
|
- >
|
|
|
- <el-form-item prop="semesterId" label-width="0">
|
|
|
- <semester-select
|
|
|
- v-model="modalForm.semesterId"
|
|
|
- class="width-full"
|
|
|
- placeholder="学期"
|
|
|
- ></semester-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="courseCode">
|
|
|
- <el-select
|
|
|
- class="width-full"
|
|
|
- v-model="modalForm.courseCode"
|
|
|
- placeholder="课程"
|
|
|
- filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in courseList"
|
|
|
- :key="item.id"
|
|
|
- :value="item.id"
|
|
|
- :label="item.name"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-divider></el-divider>
|
|
|
- <el-form-item prop="studentId" label="绑定学生">
|
|
|
- <el-input
|
|
|
- v-model="studentNameOrNo"
|
|
|
- class="width-full"
|
|
|
- placeholder="请输入学号/姓名"
|
|
|
- clearable
|
|
|
- @input="nameOrNoInput"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div class="data-check-action-student">
|
|
|
- <el-table ref="TableList" :data="studentList">
|
|
|
- <el-table-column
|
|
|
- prop="studentName"
|
|
|
- label="姓名"
|
|
|
- width="80"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column prop="studentNo" label="学号"></el-table-column>
|
|
|
- <el-table-column label="操作" width="55">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- :disabled="loading"
|
|
|
- @click="toBind(scope.row)"
|
|
|
- >绑定</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <div class="data-check-action-footer">
|
|
|
- <el-button type="primary" size="small" @click="toNextPaper"
|
|
|
- >下一张</el-button
|
|
|
+ <div>
|
|
|
+ <el-dialog
|
|
|
+ class="data-check-dialog page-dialog"
|
|
|
+ :visible.sync="modalIsShow"
|
|
|
+ title="数据处理"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ append-to-body
|
|
|
+ fullscreen
|
|
|
+ @open="visibleChange"
|
|
|
+ >
|
|
|
+ <div class="data-check-body">
|
|
|
+ <div class="data-check-action part-box">
|
|
|
+ <el-form
|
|
|
+ class="data-check-action-form"
|
|
|
+ ref="modalFormComp"
|
|
|
+ :model="modalForm"
|
|
|
+ :rules="rules"
|
|
|
+ label-position="top"
|
|
|
>
|
|
|
+ <el-button size="mini" type="primary" @click="toSelectTaskStd"
|
|
|
+ >所有任务考生信息</el-button
|
|
|
+ >
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-form-item prop="studentId" label="绑定学生">
|
|
|
+ <el-input
|
|
|
+ v-model="studentNameOrNo"
|
|
|
+ class="width-full"
|
|
|
+ placeholder="请输入学号/姓名"
|
|
|
+ clearable
|
|
|
+ @input="nameOrNoInput"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="data-check-action-student">
|
|
|
+ <el-table ref="TableList" :data="studentList">
|
|
|
+ <el-table-column
|
|
|
+ prop="studentName"
|
|
|
+ label="姓名"
|
|
|
+ width="80"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column prop="studentNo" label="学号"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="55">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ :disabled="loading"
|
|
|
+ @click="toBind(scope.row)"
|
|
|
+ >绑定</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="data-check-action-footer">
|
|
|
+ <el-button type="primary" size="small" @click="toNextPaper"
|
|
|
+ >下一张</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="data-check-content part-box">
|
|
|
- <div class="data-check-content-page">
|
|
|
- <el-button
|
|
|
- :type="curPagePaperIndex === 0 ? 'primary' : 'default'"
|
|
|
- @click="switchCurPage(0)"
|
|
|
- >正面</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- :type="curPagePaperIndex === 1 ? 'primary' : 'default'"
|
|
|
- @click="switchCurPage(1)"
|
|
|
- >反面</el-button
|
|
|
- >
|
|
|
+ <div class="data-check-content part-box">
|
|
|
+ <div v-if="curPagePapers.length" class="data-check-content-page">
|
|
|
+ <el-button
|
|
|
+ :type="curPagePaperIndex === 0 ? 'primary' : 'default'"
|
|
|
+ @click="switchCurPage(0)"
|
|
|
+ >正面</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ :type="curPagePaperIndex === 1 ? 'primary' : 'default'"
|
|
|
+ @click="switchCurPage(1)"
|
|
|
+ >反面</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <image-contain
|
|
|
+ ref="ImageContain"
|
|
|
+ :image="curPagePaper"
|
|
|
+ :show-guide="false"
|
|
|
+ ></image-contain>
|
|
|
</div>
|
|
|
- <image-contain
|
|
|
- ref="ImageContain"
|
|
|
- :image="curPagePaper"
|
|
|
- :show-guide="false"
|
|
|
- ></image-contain>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- RelateStudentDialog -->
|
|
|
+ <relate-student-dialog
|
|
|
+ ref="RelateStudentDialog"
|
|
|
+ :page-data="curPage"
|
|
|
+ @confirm="toBind"
|
|
|
+ ></relate-student-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import timeMixin from "../../../mixins/timeMixin";
|
|
|
-import { studentListQuery } from "../../../modules/base/api";
|
|
|
-import { paperBindUser, studentUnbindTaskListPage } from "../api";
|
|
|
+import {
|
|
|
+ paperBindUser,
|
|
|
+ studentUnbindTaskListPage,
|
|
|
+ scanTaskStudentListPage
|
|
|
+} from "../api";
|
|
|
import ImageContain from "../../../components/ImageContain.vue";
|
|
|
+import RelateStudentDialog from "./RelateStudentDialog.vue";
|
|
|
|
|
|
const initModalForm = {
|
|
|
paperLibraryId: "",
|
|
|
- paperScanTaskDetailId: "",
|
|
|
- semesterId: "",
|
|
|
- courseCode: ""
|
|
|
+ paperScanTaskDetailId: ""
|
|
|
};
|
|
|
|
|
|
export default {
|
|
@@ -123,6 +114,12 @@ export default {
|
|
|
default: "undo",
|
|
|
validate: val => ["undo", "fix"].includes(val)
|
|
|
},
|
|
|
+ filterData: {
|
|
|
+ tyep: Object,
|
|
|
+ default() {
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ },
|
|
|
student: {
|
|
|
type: Object,
|
|
|
default() {
|
|
@@ -132,7 +129,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- components: { ImageContain },
|
|
|
+ components: { ImageContain, RelateStudentDialog },
|
|
|
mixins: [timeMixin],
|
|
|
data() {
|
|
|
return {
|
|
@@ -140,20 +137,6 @@ export default {
|
|
|
studentNameOrNo: "",
|
|
|
modalForm: { ...initModalForm },
|
|
|
rules: {
|
|
|
- semesterId: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "请选择学期",
|
|
|
- trigger: "change"
|
|
|
- }
|
|
|
- ],
|
|
|
- courseCode: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "请选择课程",
|
|
|
- trigger: "change"
|
|
|
- }
|
|
|
- ],
|
|
|
paperScanTaskDetailId: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -171,7 +154,8 @@ export default {
|
|
|
curPage: null,
|
|
|
curPagePapers: [],
|
|
|
curPagePaperIndex: 0,
|
|
|
- curPagePaper: { url: "" }
|
|
|
+ curPagePaper: { url: "" },
|
|
|
+ lastPaperScanTaskId: ""
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -197,9 +181,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.curPage = this.undoPageList.shift();
|
|
|
- this.curPagePapers = this.curPage.fileUrls;
|
|
|
- this.switchCurPage(0);
|
|
|
+ this.getNextPaper();
|
|
|
},
|
|
|
cancel() {
|
|
|
this.modalIsShow = false;
|
|
@@ -216,13 +198,17 @@ export default {
|
|
|
},
|
|
|
async getStudentList() {
|
|
|
const datas = {
|
|
|
- queryParams: this.studentNameOrNo,
|
|
|
+ paperScanTaskId: this.curPage.paperScanTaskId,
|
|
|
+ param: this.studentNameOrNo,
|
|
|
pageNumber: 1,
|
|
|
pageSize: 30
|
|
|
};
|
|
|
- const data = await studentListQuery(datas);
|
|
|
+ const data = await scanTaskStudentListPage(datas);
|
|
|
this.studentList = data.records;
|
|
|
},
|
|
|
+ toSelectTaskStd() {
|
|
|
+ this.$refs.RelateStudentDialog.open();
|
|
|
+ },
|
|
|
switchCurPage(curPagePaperIndex) {
|
|
|
this.curPagePaperIndex = curPagePaperIndex;
|
|
|
this.curPagePaper = {
|
|
@@ -230,7 +216,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async getUndoPageList() {
|
|
|
- const data = await studentUnbindTaskListPage({});
|
|
|
+ const data = await studentUnbindTaskListPage({ ...this.filterData });
|
|
|
this.undoPageList.push(...data);
|
|
|
},
|
|
|
toNextPaper() {
|
|
@@ -243,7 +229,13 @@ export default {
|
|
|
this.getUndoPageList();
|
|
|
|
|
|
if (this.curPage) this.donePageList.push({ ...this.curPage });
|
|
|
+ this.getNextPaper();
|
|
|
+ },
|
|
|
+ getNextPaper() {
|
|
|
this.curPage = this.undoPageList.shift();
|
|
|
+ if (this.lastPaperScanTaskId !== this.curPage.paperScanTaskId) {
|
|
|
+ this.getStudentList();
|
|
|
+ }
|
|
|
this.curPagePapers = this.curPage.fileUrls;
|
|
|
this.switchCurPage(0);
|
|
|
},
|