|
@@ -154,6 +154,16 @@
|
|
|
</el-form>
|
|
|
|
|
|
<div class="block-seperator"></div>
|
|
|
+ <span>操作:</span>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ size="mini"
|
|
|
+ :disabled="noBatchSelected"
|
|
|
+ @click="bachBackRefresh"
|
|
|
+ >打回
|
|
|
+ </el-button>
|
|
|
+ <div style="width: 100%;margin-bottom: 10px;"></div>
|
|
|
<!-- 页面列表 -->
|
|
|
<el-table
|
|
|
stripe
|
|
@@ -162,7 +172,9 @@
|
|
|
:data="tableData"
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
+ @selection-change="selectChange"
|
|
|
>
|
|
|
+ <el-table-column type="selection" width="50"></el-table-column>
|
|
|
<el-table-column
|
|
|
label="试卷ID"
|
|
|
width="150"
|
|
@@ -279,6 +291,7 @@ import Viewer from "viewerjs";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectedIds: [],
|
|
|
formSearch: {
|
|
|
orgCode: "",
|
|
|
studentName: "",
|
|
@@ -327,9 +340,18 @@ export default {
|
|
|
courseSelect.push({ code: course.code, courseInfo: courseInfo });
|
|
|
}
|
|
|
return courseSelect;
|
|
|
+ },
|
|
|
+ noBatchSelected() {
|
|
|
+ return this.selectedIds.length === 0;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectChange(rows) {
|
|
|
+ this.selectedIds = [];
|
|
|
+ rows.forEach(element => {
|
|
|
+ this.selectedIds.push(element.id);
|
|
|
+ });
|
|
|
+ },
|
|
|
viewPicture(imagesClass, index) {
|
|
|
const viewer = new Viewer(document.querySelector(imagesClass), {
|
|
|
container: "#app",
|
|
@@ -607,14 +629,41 @@ export default {
|
|
|
return (c == "x" ? r : (r & 0x3) | 0x8).toString(16);
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ //批量打回
|
|
|
+ bachBackRefresh() {
|
|
|
+ this.$confirm("确定打回?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ var url = MARKING_API + "/markResults/reject";
|
|
|
+ this.$http.post(url, this.selectedIds).then(() => {
|
|
|
+ this.searchMarkPaperCheck();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ /*ignore*/
|
|
|
+ });
|
|
|
+ },
|
|
|
//打回
|
|
|
backRefresh(row) {
|
|
|
- var userId = this.user.userId;
|
|
|
- var url =
|
|
|
- MARKING_API + "/markResults/" + row.id + "/reject?creatorId=" + userId;
|
|
|
- this.$http.post(url).then(() => {
|
|
|
- this.searchMarkPaperCheck();
|
|
|
- });
|
|
|
+ this.$confirm("确定打回?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ var url = MARKING_API + "/markResults/reject";
|
|
|
+ var markResultIds = [row.id];
|
|
|
+ this.$http.post(url, markResultIds).then(() => {
|
|
|
+ this.searchMarkPaperCheck();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ /*ignore*/
|
|
|
+ });
|
|
|
},
|
|
|
operaQuery() {
|
|
|
let formData = this.$route.query;
|