|
@@ -127,22 +127,6 @@
|
|
|
>
|
|
|
</one-date-time-range>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="印刷室:">
|
|
|
- <el-select
|
|
|
- v-model="taskModel.printHouseId"
|
|
|
- placeholder="请选择"
|
|
|
- filterable
|
|
|
- :disabled="!editable"
|
|
|
- @change="printHouseChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="room in printHouses"
|
|
|
- :key="room.printHouseId"
|
|
|
- :value="room.printHouseId"
|
|
|
- :label="room.printHouseName"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
<el-table ref="TableList" :data="tableData" border>
|
|
|
<el-table-column type="index" width="80" label="卷袋序号">
|
|
@@ -173,6 +157,23 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="printHouseName" label="印刷室" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.printHouseId"
|
|
|
+ placeholder="请选择"
|
|
|
+ filterable
|
|
|
+ @change="() => printHouseChange(scope.row)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="room in printHouses"
|
|
|
+ :key="room.printHouseId"
|
|
|
+ :value="room.printHouseId"
|
|
|
+ :label="room.printHouseName"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="examPlace" label="校区(考点)" width="140">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
@@ -193,8 +194,6 @@
|
|
|
></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="printHouseName" label="印刷室" width="140">
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
width="120"
|
|
@@ -292,8 +291,8 @@ export default {
|
|
|
showStudent: false,
|
|
|
curCreateTime: [],
|
|
|
defaultTime: "",
|
|
|
- taskModel: { examStartTime: null, examEndTime: null, printHouseId: "" },
|
|
|
- curHouse: null,
|
|
|
+ taskModel: { examStartTime: null, examEndTime: null },
|
|
|
+ defaultHouse: null,
|
|
|
// exam task content
|
|
|
infoExamTask: {},
|
|
|
infoExamTaskDetail: [],
|
|
@@ -325,8 +324,9 @@ export default {
|
|
|
async getPrintHouses() {
|
|
|
this.printHouses = await listTaskPrintHouse();
|
|
|
if (this.printHouses.length === 1) {
|
|
|
- this.curHouse = this.printHouses[0];
|
|
|
- this.taskModel.printHouseId = this.curHouse.printHouseId;
|
|
|
+ this.defaultHouse = this.printHouses[0];
|
|
|
+ } else {
|
|
|
+ this.defaultHouse = null;
|
|
|
}
|
|
|
},
|
|
|
async getInfoPrintTask() {
|
|
@@ -359,17 +359,6 @@ export default {
|
|
|
|
|
|
this.tableData = this.infoPrintTask.list;
|
|
|
this.updatePackageInfos();
|
|
|
-
|
|
|
- // 数据复现
|
|
|
- if (this.tableData.length) {
|
|
|
- const row = this.tableData[0];
|
|
|
- this.taskModel.printHouseId = row.printHouseId;
|
|
|
- this.taskModel.examStartTime = row.examStartTime;
|
|
|
- this.taskModel.examEndTime = row.examEndTime;
|
|
|
- this.curHouse = this.printHouses.find(
|
|
|
- (item) => item.printHouseId === this.taskModel.printHouseId
|
|
|
- );
|
|
|
- }
|
|
|
},
|
|
|
updatePackageInfos() {
|
|
|
this.packageInfos.packageCount = this.tableData.length;
|
|
@@ -393,15 +382,9 @@ export default {
|
|
|
return { backupCount, minBackupCount: backupCount };
|
|
|
},
|
|
|
timeChange() {
|
|
|
- this.tableData.forEach((row) => {
|
|
|
- if (!this.taskModel.examStartTime || !this.taskModel.examEndTime) {
|
|
|
- row.examDate = "";
|
|
|
- row.examTime = "";
|
|
|
- row.examStartTime = "";
|
|
|
- row.examEndTime = "";
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (!this.taskModel.examStartTime || !this.taskModel.examEndTime) return;
|
|
|
|
|
|
+ this.tableData.forEach((row) => {
|
|
|
row.examStartTime = this.taskModel.examStartTime;
|
|
|
row.examEndTime = this.taskModel.examEndTime;
|
|
|
|
|
@@ -417,14 +400,13 @@ export default {
|
|
|
backupCountChange() {
|
|
|
this.updatePackageInfos();
|
|
|
},
|
|
|
- printHouseChange() {
|
|
|
- this.curHouse = this.printHouses.find(
|
|
|
- (item) => item.printHouseId === this.taskModel.printHouseId
|
|
|
+ printHouseChange(row) {
|
|
|
+ const defaultHouse = this.printHouses.find(
|
|
|
+ (item) => item.printHouseId === row.printHouseId
|
|
|
);
|
|
|
- this.tableData.forEach((row) => {
|
|
|
- row.printHouseId = this.curHouse?.printHouseId;
|
|
|
- row.printHouseName = this.curHouse?.printHouseName;
|
|
|
- });
|
|
|
+ if (defaultHouse) {
|
|
|
+ row.printHouseName = defaultHouse.printHouseName;
|
|
|
+ }
|
|
|
},
|
|
|
toAdd() {
|
|
|
if (!this.infoExamTask.courseId) {
|
|
@@ -558,11 +540,12 @@ export default {
|
|
|
className: data.classNames.join(),
|
|
|
studentCount: data.examTaskStudentObjectParamList.length,
|
|
|
});
|
|
|
+ if (this.defaultHouse) {
|
|
|
+ tableRow.printHouseId = this.defaultHouse.printHouseId;
|
|
|
+ tableRow.printHouseName = this.defaultHouse.printHouseName;
|
|
|
+ }
|
|
|
this.tableData.push(tableRow);
|
|
|
});
|
|
|
- // 更新考试时间和印刷室
|
|
|
- this.printHouseChange();
|
|
|
- this.timeChange();
|
|
|
},
|
|
|
toDelete(index) {
|
|
|
this.tableData.splice(index, 1);
|