|
@@ -110,9 +110,22 @@
|
|
type="text"
|
|
type="text"
|
|
icon="icon icon-download-act"
|
|
icon="icon icon-download-act"
|
|
@click="toExport(scope.row)"
|
|
@click="toExport(scope.row)"
|
|
- title="导出"
|
|
|
|
|
|
+ title="导出打印数量"
|
|
v-if="scope.row.printStatus === '已打印'"
|
|
v-if="scope.row.printStatus === '已打印'"
|
|
></el-button>
|
|
></el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ class="btn-table-icon"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="icon icon-circle-share"
|
|
|
|
+ @click="toExportPaper(scope.row)"
|
|
|
|
+ title="导出试卷数量统计"
|
|
|
|
+ v-if="
|
|
|
|
+ IS_SUPER_ADMIN &&
|
|
|
|
+ (scope.row.printStatus === '待打印' ||
|
|
|
|
+ scope.row.printStatus === '打印中' ||
|
|
|
|
+ scope.row.printStatus === '已打印')
|
|
|
|
+ "
|
|
|
|
+ ></el-button>
|
|
<el-button
|
|
<el-button
|
|
class="btn-table-icon"
|
|
class="btn-table-icon"
|
|
type="text"
|
|
type="text"
|
|
@@ -158,7 +171,8 @@ export default {
|
|
visible: false,
|
|
visible: false,
|
|
PRINT_STATUS,
|
|
PRINT_STATUS,
|
|
exams: [],
|
|
exams: [],
|
|
- examPages: []
|
|
|
|
|
|
+ examPages: [],
|
|
|
|
+ IS_SUPER_ADMIN: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -166,6 +180,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
|
|
+ const roleCode = this.$ls.get("user", { roleCode: "" }).roleCode;
|
|
|
|
+ this.IS_SUPER_ADMIN = roleCode.includes("SUPER_ADMIN");
|
|
this.getList();
|
|
this.getList();
|
|
this.getExamList();
|
|
this.getExamList();
|
|
},
|
|
},
|
|
@@ -232,7 +248,6 @@ export default {
|
|
// });
|
|
// });
|
|
// },
|
|
// },
|
|
async toExport(row) {
|
|
async toExport(row) {
|
|
- console.log(row);
|
|
|
|
let load = this.$message({
|
|
let load = this.$message({
|
|
iconClass: "el-message__icon el-icon-loading",
|
|
iconClass: "el-message__icon el-icon-loading",
|
|
message: "Loading...",
|
|
message: "Loading...",
|
|
@@ -254,6 +269,27 @@ export default {
|
|
if (!data) return;
|
|
if (!data) return;
|
|
this.$message.success("文件已开始下载!");
|
|
this.$message.success("文件已开始下载!");
|
|
},
|
|
},
|
|
|
|
+ async toExportPaper(row) {
|
|
|
|
+ let load = this.$message({
|
|
|
|
+ iconClass: "el-message__icon el-icon-loading",
|
|
|
|
+ message: "Loading...",
|
|
|
|
+ duration: 0
|
|
|
|
+ });
|
|
|
|
+ const data = await download({
|
|
|
|
+ type: "get",
|
|
|
|
+ url: `/api/print/exam/exam/expPrePrintCount?examId=${row.id}`,
|
|
|
|
+ fileName: `${row.examName}_试卷数量统计.xls`,
|
|
|
|
+ header: {
|
|
|
|
+ token: this.$ls.get("token")
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.$message.error(error);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ load.close();
|
|
|
|
+ if (!data) return;
|
|
|
|
+ this.$message.success("文件已开始下载!");
|
|
|
|
+ },
|
|
toDetail(row) {
|
|
toDetail(row) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: "ExamRomeDetail",
|
|
name: "ExamRomeDetail",
|