|
@@ -5,16 +5,17 @@
|
|
|
<template v-if="checkPrivilege('condition', 'condition')">
|
|
|
<el-form-item label="印刷计划:">
|
|
|
<print-plan-select
|
|
|
- v-model.trim="filter.printPlanId"
|
|
|
+ v-model.trim="filter.printPlanIdList"
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
+ multiple
|
|
|
@change="printPlanChange"
|
|
|
></print-plan-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程(代码):" label-width="110px">
|
|
|
<course-select
|
|
|
v-model.trim="filter.courseCode"
|
|
|
- :print-plan-id="filter.printPlanId"
|
|
|
+ :print-plan-id="filter.printPlanIdList"
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
></course-select>
|
|
@@ -23,7 +24,7 @@
|
|
|
<paper-number-select
|
|
|
ref="PaperNumberSelect"
|
|
|
v-model="filter.paperNumber"
|
|
|
- :print-plan-id="filter.printPlanId"
|
|
|
+ :print-plan-id="filter.printPlanIdList"
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
></paper-number-select>
|
|
@@ -31,7 +32,7 @@
|
|
|
<el-form-item label="考点:" label-width="55px">
|
|
|
<place-select
|
|
|
v-model.trim="filter.examPlace"
|
|
|
- :print-plan-id="filter.printPlanId"
|
|
|
+ :print-plan-id="filter.printPlanIdList"
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
></place-select>
|
|
@@ -39,7 +40,7 @@
|
|
|
<el-form-item label="考场:" label-width="55px">
|
|
|
<room-select
|
|
|
v-model.trim="filter.examRoom"
|
|
|
- :print-plan-id="filter.printPlanId"
|
|
|
+ :print-plan-id="filter.printPlanIdList"
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
></room-select>
|
|
@@ -51,6 +52,20 @@
|
|
|
clearable
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="考试日期:">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="createTime"
|
|
|
+ type="daterange"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ value-format="timestamp"
|
|
|
+ align="right"
|
|
|
+ unlink-panels
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
</template>
|
|
|
<el-form-item label-width="0px">
|
|
|
<el-button
|
|
@@ -111,7 +126,7 @@
|
|
|
<el-table-column prop="packageCode" label="卷袋号"> </el-table-column>
|
|
|
<el-table-column prop="courseNameCode" label="课程(代码)">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="paperNumber" label="试卷编码"></el-table-column>
|
|
|
+ <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
|
|
|
<el-table-column prop="totalSubjects" label="科次" width="80">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -180,6 +195,7 @@ import {
|
|
|
import PreviewBusinessDetail from "../components/PreviewBusinessDetail";
|
|
|
import UploadBusinessDataDialog from "../components/UploadBusinessDataDialog";
|
|
|
import { downloadBlob, parseTimeRangeDateAndTime } from "@/plugins/utils";
|
|
|
+import pickerOptions from "@/constants/datePickerOptions";
|
|
|
|
|
|
export default {
|
|
|
name: "business-data-export",
|
|
@@ -187,12 +203,14 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
filter: {
|
|
|
- printPlanId: "",
|
|
|
+ printPlanIdList: "",
|
|
|
courseCode: "",
|
|
|
paperNumber: "",
|
|
|
examPlace: "",
|
|
|
examRoom: "",
|
|
|
- packageCode: ""
|
|
|
+ packageCode: "",
|
|
|
+ startDate: "",
|
|
|
+ endDate: ""
|
|
|
},
|
|
|
current: 1,
|
|
|
size: this.GLOBAL.pageSize,
|
|
@@ -202,7 +220,11 @@ export default {
|
|
|
totalData: {},
|
|
|
curPrintPlan: {},
|
|
|
loading: false,
|
|
|
+ // date-picker
|
|
|
+ createTime: [],
|
|
|
+ pickerOptions,
|
|
|
// import
|
|
|
+ // TODO:
|
|
|
uploadUrl: "/api/admin/exam/print/data_import",
|
|
|
uploadData: {
|
|
|
type: "FILE",
|
|
@@ -229,6 +251,10 @@ export default {
|
|
|
pageNumber: this.current,
|
|
|
pageSize: this.size
|
|
|
};
|
|
|
+ if (this.createTime) {
|
|
|
+ datas.startDate = this.createTime[0];
|
|
|
+ datas.endDate = this.createTime[1];
|
|
|
+ }
|
|
|
const data = await businessDataListPage(datas);
|
|
|
this.dataList = data.records.map(item => {
|
|
|
const { date, time } = parseTimeRangeDateAndTime(
|
|
@@ -242,7 +268,14 @@ export default {
|
|
|
this.total = data.total;
|
|
|
},
|
|
|
async getTotalData() {
|
|
|
- this.totalData = await businessTotalData(this.filter);
|
|
|
+ const datas = {
|
|
|
+ ...this.filter
|
|
|
+ };
|
|
|
+ if (this.createTime) {
|
|
|
+ datas.startDate = this.createTime[0];
|
|
|
+ datas.endDate = this.createTime[1];
|
|
|
+ }
|
|
|
+ this.totalData = await businessTotalData(datas);
|
|
|
},
|
|
|
toPage(page) {
|
|
|
this.current = page;
|
|
@@ -266,7 +299,14 @@ export default {
|
|
|
if (this.loading) return;
|
|
|
|
|
|
this.loading = true;
|
|
|
- const res = await businessDataExport({ ...this.filter }).catch(() => {});
|
|
|
+ const datas = {
|
|
|
+ ...this.filter
|
|
|
+ };
|
|
|
+ if (this.createTime) {
|
|
|
+ datas.startDate = this.createTime[0];
|
|
|
+ datas.endDate = this.createTime[1];
|
|
|
+ }
|
|
|
+ const res = await businessDataExport(datas).catch(() => {});
|
|
|
this.loading = false;
|
|
|
|
|
|
if (res) {
|