|
@@ -363,7 +363,7 @@
|
|
|
size="mini"
|
|
|
type="success"
|
|
|
icon="el-icon-success"
|
|
|
- @click="auditPass(scope.row.dataId)"
|
|
|
+ @click="auditPass(scope.row.dataId, false)"
|
|
|
>通 过</el-button
|
|
|
>
|
|
|
</el-dropdown-item>
|
|
@@ -373,7 +373,7 @@
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
icon="el-icon-error"
|
|
|
- @click="openAuditDialog(scope.row.dataId)"
|
|
|
+ @click="openAuditDialog(scope.row.dataId, false)"
|
|
|
>不通过</el-button
|
|
|
>
|
|
|
</el-dropdown-item>
|
|
@@ -399,6 +399,7 @@
|
|
|
</el-row>
|
|
|
<el-dialog
|
|
|
title="审核"
|
|
|
+ width="400px"
|
|
|
:visible.sync="dialogFormVisible"
|
|
|
@closed="auditDialogClosed"
|
|
|
>
|
|
@@ -432,7 +433,7 @@
|
|
|
<el-input
|
|
|
v-model="auditForm.disciplineDetail"
|
|
|
type="textarea"
|
|
|
- :autosize="{ minRows: 6, maxRows: 10 }"
|
|
|
+ :autosize="{ minRows: 3, maxRows: 5 }"
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -443,7 +444,8 @@
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
- title="审核"
|
|
|
+ title="批量审核"
|
|
|
+ width="400px"
|
|
|
:visible.sync="dialogBatchFormVisible"
|
|
|
@closed="batchAuditDialogClosed"
|
|
|
>
|
|
@@ -477,7 +479,7 @@
|
|
|
<el-input
|
|
|
v-model="batchAuditForm.disciplineDetail"
|
|
|
type="textarea"
|
|
|
- :autosize="{ minRows: 6, maxRows: 10 }"
|
|
|
+ :autosize="{ minRows: 3, maxRows: 5 }"
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -496,6 +498,9 @@
|
|
|
>
|
|
|
<ExamRecordDetail
|
|
|
:exam-record-data-id="curSelectedExamRecordDataId"
|
|
|
+ :show-audit-button="curSelectedShowAuditButton"
|
|
|
+ @changeExamRecordData="changeExamRecordData"
|
|
|
+ @auditExamRecordData="auditExamRecordData"
|
|
|
></ExamRecordDetail>
|
|
|
</el-dialog>
|
|
|
</el-main>
|
|
@@ -509,31 +514,34 @@ import _ from "lodash";
|
|
|
export default {
|
|
|
components: { commonFormVue },
|
|
|
mixins: [pagePrivilege],
|
|
|
- beforeRouteEnter(to, from, next) {
|
|
|
- next((vm) => {
|
|
|
- if (from.params?.checkedRows) {
|
|
|
- const unwatch = vm.$watch("tableData", (tableData = []) => {
|
|
|
- tableData.forEach((d) => {
|
|
|
- vm.$refs["multipleTable"]?.toggleRowSelection(
|
|
|
- d,
|
|
|
- from.params.checkedRows.includes(d.dataId)
|
|
|
- );
|
|
|
- });
|
|
|
- if (unwatch) {
|
|
|
- unwatch();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- beforeRouteLeave(to, from, next) {
|
|
|
- to.params.checkedRows = this.routeSelectedIds;
|
|
|
- next();
|
|
|
- },
|
|
|
+ // beforeRouteEnter(to, from, next) {
|
|
|
+ // next((vm) => {
|
|
|
+ // if (from.params?.checkedRows) {
|
|
|
+ // const unwatch = vm.$watch("tableData", (tableData = []) => {
|
|
|
+ // tableData.forEach((d) => {
|
|
|
+ // vm.$refs["multipleTable"]?.toggleRowSelection(
|
|
|
+ // d,
|
|
|
+ // from.params.checkedRows.includes(d.dataId)
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // if (unwatch) {
|
|
|
+ // unwatch();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // beforeRouteLeave(to, from, next) {
|
|
|
+ // to.params.checkedRows = this.routeSelectedIds;
|
|
|
+ // next();
|
|
|
+ // },
|
|
|
data() {
|
|
|
return {
|
|
|
curSelectedExamRecordDataId: null,
|
|
|
+ curSelectedShowAuditButton: false,
|
|
|
examRecordDataDialog: false,
|
|
|
+ toNext: false,
|
|
|
+ curTotalPages: 0,
|
|
|
routeSelectedIds: [],
|
|
|
total: 0,
|
|
|
tableLoading: false,
|
|
@@ -609,7 +617,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- this.backFill();
|
|
|
+ // this.backFill();
|
|
|
this.getDisciplineTypeList("");
|
|
|
},
|
|
|
methods: {
|
|
@@ -688,13 +696,14 @@ export default {
|
|
|
this.tableData = response.data.content;
|
|
|
this.total = response.data.totalElements;
|
|
|
this.form.pageNo = response.data.number + 1;
|
|
|
+ this.curTotalPages = response.data.totalPages;
|
|
|
} else {
|
|
|
this.tableData = [];
|
|
|
}
|
|
|
this.tableLoading = false;
|
|
|
- this.$router.push({
|
|
|
- path: "/oe/awaitingAudit?" + new URLSearchParams(params),
|
|
|
- });
|
|
|
+ // this.$router.push({
|
|
|
+ // path: "/oe/awaitingAudit?" + new URLSearchParams(params),
|
|
|
+ // });
|
|
|
});
|
|
|
},
|
|
|
formatVirtualCameraName(row) {
|
|
@@ -749,12 +758,13 @@ export default {
|
|
|
type: "success",
|
|
|
duration: 5000,
|
|
|
});
|
|
|
- this.search();
|
|
|
+ // this.search();
|
|
|
});
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
- openAuditDialog(examRecordDataId) {
|
|
|
+ openAuditDialog(examRecordDataId, toNext) {
|
|
|
+ this.toNext = toNext;
|
|
|
this.dialogFormVisible = true;
|
|
|
this.auditForm = {
|
|
|
examRecordDataId: examRecordDataId,
|
|
@@ -795,7 +805,10 @@ export default {
|
|
|
duration: 5000,
|
|
|
});
|
|
|
this.dialogFormVisible = false;
|
|
|
- this.search();
|
|
|
+ // this.search();
|
|
|
+ if (this.toNext) {
|
|
|
+ this.changeExamRecordData(true);
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
return false;
|
|
@@ -821,7 +834,7 @@ export default {
|
|
|
duration: 5000,
|
|
|
});
|
|
|
this.dialogBatchFormVisible = false;
|
|
|
- this.search();
|
|
|
+ // this.search();
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
@@ -838,7 +851,7 @@ export default {
|
|
|
/**
|
|
|
* 审核通过
|
|
|
*/
|
|
|
- auditPass(examRecordDataId) {
|
|
|
+ auditPass(examRecordDataId, toNext) {
|
|
|
var auditParams = {
|
|
|
examRecordDataId: examRecordDataId,
|
|
|
isPass: true,
|
|
@@ -847,22 +860,101 @@ export default {
|
|
|
this.$http
|
|
|
.post("/api/ecs_oe_admin/exam/audit/single/audit", param)
|
|
|
.then(() => {
|
|
|
- this.search();
|
|
|
this.$notify({
|
|
|
title: "成功",
|
|
|
message: "操作成功",
|
|
|
type: "success",
|
|
|
duration: 5000,
|
|
|
});
|
|
|
+
|
|
|
+ // this.search();
|
|
|
+ if (toNext) {
|
|
|
+ this.changeExamRecordData(true);
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
+ curSelectedRow(examRecordDataId) {
|
|
|
+ for (let n = 0; n < this.tableData.length; n++) {
|
|
|
+ let row = this.tableData[n];
|
|
|
+ if (examRecordDataId === row.dataId) {
|
|
|
+ this.$refs["multipleTable"]?.toggleRowSelection(row, true);
|
|
|
+ } else {
|
|
|
+ this.$refs["multipleTable"]?.toggleRowSelection(row, false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
examRecordDataDialogClose() {
|
|
|
- this.curSelectedExamRecordDataId = null;
|
|
|
this.examRecordDataDialog = false;
|
|
|
},
|
|
|
- examRecordDataDialogOpen(row) {
|
|
|
- this.curSelectedExamRecordDataId = row.dataId;
|
|
|
+ examRecordDataDialogOpen(examRecordDataId, showAuditButton) {
|
|
|
this.examRecordDataDialog = true;
|
|
|
+ this.curSelectedShowAuditButton = showAuditButton;
|
|
|
+ this.curSelectedExamRecordDataId = examRecordDataId;
|
|
|
+ this.curSelectedRow(examRecordDataId);
|
|
|
+ },
|
|
|
+ changeExamRecordData(isNext) {
|
|
|
+ console.log("isNext:" + isNext);
|
|
|
+ let curId = null;
|
|
|
+ let isFirst = false;
|
|
|
+ let isLast = false;
|
|
|
+ let rowSize = this.tableData.length;
|
|
|
+ for (let n = 0; n < rowSize; n++) {
|
|
|
+ isFirst = n === 0;
|
|
|
+ isLast = n === rowSize - 1;
|
|
|
+ let row = this.tableData[n];
|
|
|
+ if (this.curSelectedExamRecordDataId === row.dataId) {
|
|
|
+ curId = row.dataId;
|
|
|
+ if (isNext) {
|
|
|
+ if (!isLast) {
|
|
|
+ curId = this.tableData[n + 1].dataId;
|
|
|
+ } else {
|
|
|
+ if (this.form.pageNo < this.curTotalPages) {
|
|
|
+ // 跳到下一页
|
|
|
+ curId = null;
|
|
|
+ this.handleCurrentChange(this.form.pageNo + 1);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "当前数据为最后一条!",
|
|
|
+ type: "warning",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!isFirst) {
|
|
|
+ curId = this.tableData[n - 1].dataId;
|
|
|
+ } else {
|
|
|
+ if (this.form.pageNo > 1) {
|
|
|
+ // 跳到上一页
|
|
|
+ curId = null;
|
|
|
+ this.handleCurrentChange(this.form.pageNo - 1);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "当前数据为第一条!",
|
|
|
+ type: "warning",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (curId) {
|
|
|
+ this.curSelectedExamRecordDataId = curId;
|
|
|
+ this.curSelectedRow(curId);
|
|
|
+ } else {
|
|
|
+ this.examRecordDataDialogClose();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ auditExamRecordData(isPass) {
|
|
|
+ console.log("isPass:" + isPass);
|
|
|
+ if (isPass) {
|
|
|
+ this.auditPass(this.curSelectedExamRecordDataId, true);
|
|
|
+ } else {
|
|
|
+ this.openAuditDialog(this.curSelectedExamRecordDataId, true);
|
|
|
+ }
|
|
|
},
|
|
|
gotoCaptureDetail(row) {
|
|
|
if (!this.form.examId) {
|
|
@@ -875,25 +967,23 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- // this.examRecordDataDialogOpen(row);
|
|
|
- // if (true) return;
|
|
|
+ // let pendingOperate = !this.currentPagePrivileges.PENDING_OPERATE;
|
|
|
+ this.examRecordDataDialogOpen(row.dataId, true);
|
|
|
|
|
|
- let pendingOperate = !this.currentPagePrivileges.PENDING_OPERATE;
|
|
|
- let searchParam = JSON.stringify(this.form);
|
|
|
+ // this.routeSelectedIds = [];
|
|
|
+ // this.routeSelectedIds.push(row.dataId);
|
|
|
+ // this.$refs["multipleTable"]?.toggleRowSelection(row, true);
|
|
|
|
|
|
- this.routeSelectedIds = [];
|
|
|
- this.routeSelectedIds.push(row.dataId);
|
|
|
- this.$refs["multipleTable"]?.toggleRowSelection(row, true);
|
|
|
- this.$nextTick(() => {
|
|
|
- /** checkbox UI选中状态延迟 */
|
|
|
- setTimeout(() => {
|
|
|
- this.$router.push({
|
|
|
- path: "/oe/captureDetail/" + row.dataId + "/awaitingAudit",
|
|
|
- // name: "captureDetail",
|
|
|
- query: { pendingOperate, searchParam },
|
|
|
- });
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ // let searchParam = JSON.stringify(this.form);
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // /** checkbox UI选中状态延迟 */
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$router.push({
|
|
|
+ // path: "/oe/captureDetail/" + row.dataId + "/awaitingAudit",
|
|
|
+ // query: { pendingOperate, searchParam },
|
|
|
+ // });
|
|
|
+ // }, 200);
|
|
|
+ // });
|
|
|
},
|
|
|
backFill() {
|
|
|
var formData = this.$route.query;
|