|
@@ -78,15 +78,24 @@
|
|
|
>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <div class="part-box-action">
|
|
|
+ <el-button
|
|
|
+ v-if="checkPrivilege('link', 'createPdf')"
|
|
|
+ icon="el-icon-document"
|
|
|
+ type="primary"
|
|
|
+ @click="toBatchResetCreatePdf"
|
|
|
+ >
|
|
|
+ 批量重新生成
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="part-box part-box-pad">
|
|
|
- <el-table ref="TableList" :data="dataList">
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="序号"
|
|
|
- width="50"
|
|
|
- :index="indexMethod"
|
|
|
- ></el-table-column>
|
|
|
+ <el-table
|
|
|
+ ref="TableList"
|
|
|
+ :data="dataList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="50"></el-table-column>
|
|
|
<el-table-column
|
|
|
prop="paperNumber"
|
|
|
label="试卷编号"
|
|
@@ -245,6 +254,7 @@ export default {
|
|
|
loading: false,
|
|
|
DATA_TASK_STATUS,
|
|
|
DATA_TASK_RESULT,
|
|
|
+ multipleSelection: [],
|
|
|
// date-picker
|
|
|
createTime: [],
|
|
|
pickerOptions,
|
|
@@ -277,10 +287,36 @@ export default {
|
|
|
this.current = page;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val.map((item) => item.id);
|
|
|
+ },
|
|
|
toViewLog(row) {
|
|
|
this.logList = (row.summary || "").split("\n");
|
|
|
this.modalIsShow = true;
|
|
|
},
|
|
|
+ async toBatchResetCreatePdf() {
|
|
|
+ if (!this.multipleSelection.length) {
|
|
|
+ this.$message.error("请选择数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const action = await this.$confirm(
|
|
|
+ `确定要重新生成所选数据的全部PDF吗?`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).catch(() => {});
|
|
|
+ if (action !== "confirm") return;
|
|
|
+
|
|
|
+ const res = await rebuildPrintTaskPdf(
|
|
|
+ this.multipleSelection.join(),
|
|
|
+ undefined
|
|
|
+ ).catch(() => {});
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
async toResetCreatePdf(row) {
|
|
|
this.curRow = row;
|
|
|
this.pdfList = [];
|