|
@@ -145,7 +145,7 @@
|
|
|
:data="dataList"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
<el-table-column prop="examName" label="批次"></el-table-column>
|
|
|
<el-table-column prop="examActivityCode" label="场次"></el-table-column>
|
|
|
<el-table-column prop="roomName" label="考场"> </el-table-column>
|
|
@@ -206,11 +206,11 @@ import {
|
|
|
examBatchList,
|
|
|
examActivityRoomList,
|
|
|
invigilationWarningList,
|
|
|
- clearInvigilationUnreadWarningList,
|
|
|
+ clearInvigilationFilterUnreadWarningList,
|
|
|
} from "@/api/invigilation";
|
|
|
-import { mapActions, mapMutations } from "vuex";
|
|
|
-
|
|
|
import { APPROVE_STATUS } from "@/constant/constants";
|
|
|
+import { mapState, mapActions, mapMutations } from "vuex";
|
|
|
+
|
|
|
export default {
|
|
|
name: "WarningManage",
|
|
|
data() {
|
|
@@ -243,6 +243,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState("invigilation", ["selectedExamId"]),
|
|
|
user() {
|
|
|
return this.$store.state.user;
|
|
|
},
|
|
@@ -254,11 +255,20 @@ export default {
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions("invigilation", ["updateDetailIds"]),
|
|
|
- ...mapMutations("invigilation", ["setDetailIds"]),
|
|
|
+ ...mapActions("invigilation", [
|
|
|
+ "updateDetailIds",
|
|
|
+ "updateSelectedExamId",
|
|
|
+ "fetchWarningManageCount",
|
|
|
+ ]),
|
|
|
+ ...mapMutations("invigilation", ["setDetailIds", "setSelectedExamId"]),
|
|
|
async initData() {
|
|
|
await this.getExamBatchList();
|
|
|
- this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
|
|
|
+ this.updateSelectedExamId({
|
|
|
+ exams: this.examBatchs,
|
|
|
+ selectedExamId: this.selectedExamId,
|
|
|
+ });
|
|
|
+ this.filter.examId = this.selectedExamId;
|
|
|
+ // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
|
|
|
this.toSearch();
|
|
|
this.getExamActivityRoomList();
|
|
|
},
|
|
@@ -279,6 +289,7 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
async toSearch() {
|
|
|
+ this.setSelectedExamId(this.filter.examId);
|
|
|
this.current = 1;
|
|
|
await this.getList();
|
|
|
if (this.total > this.size) {
|
|
@@ -323,14 +334,15 @@ export default {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
async cleanUnread() {
|
|
|
- await clearInvigilationUnreadWarningList({
|
|
|
- approveStatus: 1,
|
|
|
- warningIds: this.dataList
|
|
|
- .filter((item) => !item.approveStatus)
|
|
|
- .map((item) => item.warningId),
|
|
|
- });
|
|
|
+ await clearInvigilationFilterUnreadWarningList(this.filter);
|
|
|
this.$message.success("操作成功!");
|
|
|
this.getList();
|
|
|
+
|
|
|
+ const user = this.$store.state.user;
|
|
|
+ const datas = user.roleCodes.includes("INVIGILATE")
|
|
|
+ ? { userId: user.id }
|
|
|
+ : {};
|
|
|
+ this.fetchWarningManageCount(datas);
|
|
|
},
|
|
|
toDetail(row) {
|
|
|
const router = this.IS_INVIGILATE
|