|
@@ -46,7 +46,7 @@
|
|
<el-button
|
|
<el-button
|
|
v-if="checkPrivilege('button', 'select')"
|
|
v-if="checkPrivilege('button', 'select')"
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled="!filter.semesterId"
|
|
|
|
|
|
+ :disabled="!filter.semesterId || !filter.courseCode"
|
|
@click="toPage(1)"
|
|
@click="toPage(1)"
|
|
>查询</el-button
|
|
>查询</el-button
|
|
>
|
|
>
|
|
@@ -57,7 +57,7 @@
|
|
type="success"
|
|
type="success"
|
|
icon="el-icon-refresh"
|
|
icon="el-icon-refresh"
|
|
:loading="syncLoading"
|
|
:loading="syncLoading"
|
|
- :disabled="!filter.semesterId"
|
|
|
|
|
|
+ :disabled="!filter.semesterId || !filter.courseCode"
|
|
@click="toSync"
|
|
@click="toSync"
|
|
>同步</el-button
|
|
>同步</el-button
|
|
>
|
|
>
|
|
@@ -66,7 +66,7 @@
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
- :disabled="!filter.semesterId"
|
|
|
|
|
|
+ :disabled="!filter.semesterId || !filter.courseCode"
|
|
@click="toDownloadAll"
|
|
@click="toDownloadAll"
|
|
>一键下载</el-button
|
|
>一键下载</el-button
|
|
>
|
|
>
|
|
@@ -75,7 +75,7 @@
|
|
type="primary"
|
|
type="primary"
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- :disabled="!filter.semesterId"
|
|
|
|
|
|
+ :disabled="!filter.semesterId || !filter.courseCode"
|
|
@click="toExport"
|
|
@click="toExport"
|
|
>成绩导出</el-button
|
|
>成绩导出</el-button
|
|
>
|
|
>
|
|
@@ -151,7 +151,8 @@ import {
|
|
scoreExport,
|
|
scoreExport,
|
|
scoreBatchDownload,
|
|
scoreBatchDownload,
|
|
scoreDownload,
|
|
scoreDownload,
|
|
- scoreSync
|
|
|
|
|
|
+ scoreSync,
|
|
|
|
+ scorePreview
|
|
} from "../api";
|
|
} from "../api";
|
|
// import { downloadPaper } from "../components/downloadPaper";
|
|
// import { downloadPaper } from "../components/downloadPaper";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
@@ -208,7 +209,8 @@ export default {
|
|
if (this.syncLoading) return;
|
|
if (this.syncLoading) return;
|
|
this.syncLoading = true;
|
|
this.syncLoading = true;
|
|
const res = await scoreSync({
|
|
const res = await scoreSync({
|
|
- semesterId: this.filter.semesterId
|
|
|
|
|
|
+ semesterId: this.filter.semesterId,
|
|
|
|
+ courseCode: this.filter.courseCode
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
this.syncLoading = false;
|
|
this.syncLoading = false;
|
|
if (!res) return;
|
|
if (!res) return;
|
|
@@ -249,13 +251,17 @@ export default {
|
|
this.$message.success("下载成功!");
|
|
this.$message.success("下载成功!");
|
|
},
|
|
},
|
|
// img view
|
|
// img view
|
|
- toViewPaper(row) {
|
|
|
|
- if (!row.sheetUrls) {
|
|
|
|
|
|
+ async toViewPaper(row) {
|
|
|
|
+ const res = await scorePreview(row.id).catch(() => {});
|
|
|
|
+ if (!res) return;
|
|
|
|
+
|
|
|
|
+ if (!res.length) {
|
|
this.$message.error("原卷缺失!");
|
|
this.$message.error("原卷缺失!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
this.curImageIndex = 0;
|
|
this.curImageIndex = 0;
|
|
- this.imageList = JSON.parse(row.sheetUrls).map((item, index) => {
|
|
|
|
|
|
+ this.imageList = res.map((item, index) => {
|
|
return { url: item, name: index + 1 };
|
|
return { url: item, name: index + 1 };
|
|
});
|
|
});
|
|
this.selectImage(this.curImageIndex);
|
|
this.selectImage(this.curImageIndex);
|