|
@@ -48,7 +48,6 @@
|
|
|
class="part-filter-info-main"
|
|
|
data-type="trouble"
|
|
|
:exam-id="filter.examId"
|
|
|
- v-if="filter.examId"
|
|
|
ref="SummaryLine"
|
|
|
></summary-line>
|
|
|
<div class="part-filter-info-sub" v-if="!this.IS_INSPECTION">
|
|
@@ -138,19 +137,21 @@
|
|
|
<el-dropdown
|
|
|
@command="viewingAngleChange"
|
|
|
style="margin-right: 10px;"
|
|
|
+ trigger="click"
|
|
|
v-if="pageType === '1'"
|
|
|
>
|
|
|
<el-button type="primary"
|
|
|
- >{{ curViewingAngle.name || "切换视角"
|
|
|
- }}<i class="el-icon-arrow-down el-icon--right"></i
|
|
|
+ >切换视频源<i class="el-icon-arrow-down el-icon--right"></i
|
|
|
></el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item
|
|
|
v-for="item in viewingAngles"
|
|
|
:key="item.code"
|
|
|
:command="item"
|
|
|
- >切换{{ item.name }}</el-dropdown-item
|
|
|
+ :class="{ 'color-primary': item.code === curViewingAngle.code }"
|
|
|
>
|
|
|
+ {{ item.name }}
|
|
|
+ </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
<!-- <el-button
|
|
@@ -219,7 +220,7 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="125">
|
|
|
+ <el-table-column label="操作" width="125" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
:class="[
|
|
@@ -238,16 +239,17 @@
|
|
|
<div
|
|
|
class="invigilation-student-item"
|
|
|
v-for="item in dataList"
|
|
|
- :key="item.examStudentId"
|
|
|
+ :key="item.examRecordId"
|
|
|
>
|
|
|
<invigilation-student :data="item"></invigilation-student>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="part-page" v-if="total > size">
|
|
|
+ <div class="part-page">
|
|
|
<el-pagination
|
|
|
background
|
|
|
- layout="prev, pager, next,total,sizes,jumper"
|
|
|
+ hide-on-single-page
|
|
|
+ layout="prev, pager, next,total,jumper"
|
|
|
:current-page="current"
|
|
|
:total="total"
|
|
|
:page-size="size"
|
|
@@ -273,7 +275,6 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- invigilateList,
|
|
|
invigilateVideoList,
|
|
|
invigilateExamFinish,
|
|
|
monitorCallCount,
|
|
@@ -292,7 +293,7 @@ import {
|
|
|
CLIENT_WEBSOCKET_STATUS,
|
|
|
MONITOR_STATUS_SOURCE,
|
|
|
} from "@/constant/constants";
|
|
|
-import { mapMutations, mapActions } from "vuex";
|
|
|
+import { mapState, mapMutations, mapActions } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: "realtime-monitoring",
|
|
@@ -328,7 +329,6 @@ export default {
|
|
|
communicationCount: 0,
|
|
|
curExamBatch: {},
|
|
|
curViewingAngle: {},
|
|
|
- noticeCaches: {},
|
|
|
current: 1,
|
|
|
total: 0,
|
|
|
size: 24,
|
|
@@ -341,16 +341,20 @@ export default {
|
|
|
dataList: [],
|
|
|
viewingAngles: [
|
|
|
{
|
|
|
- code: "1",
|
|
|
- name: "第一视角",
|
|
|
+ code: "client_camera",
|
|
|
+ name: "电脑摄像头",
|
|
|
},
|
|
|
{
|
|
|
- code: "2",
|
|
|
- name: "第二视角",
|
|
|
+ code: "client_screen",
|
|
|
+ name: "电脑屏幕",
|
|
|
},
|
|
|
{
|
|
|
- code: "3",
|
|
|
- name: "第三视角",
|
|
|
+ code: "mobile_first",
|
|
|
+ name: "手机主机位",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: "mobile_second",
|
|
|
+ name: "手机辅机位",
|
|
|
},
|
|
|
],
|
|
|
};
|
|
@@ -367,6 +371,9 @@ export default {
|
|
|
this.toDetail({ examRecordId: id });
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState("invigilation", ["liveDomains"]),
|
|
|
+ },
|
|
|
methods: {
|
|
|
...mapActions("invigilation", ["updateDetailIds"]),
|
|
|
...mapMutations("invigilation", ["setDetailIds"]),
|
|
@@ -400,6 +407,7 @@ export default {
|
|
|
if (!examBatch) return;
|
|
|
this.filter.examId = examBatch.id;
|
|
|
this.curExamBatch = examBatch;
|
|
|
+
|
|
|
this.toSearch();
|
|
|
|
|
|
if (!this.IS_INSPECTION) {
|
|
@@ -422,7 +430,6 @@ export default {
|
|
|
},
|
|
|
pageTypeChange(pageType) {
|
|
|
this.pageType = pageType;
|
|
|
- this.toPage(1);
|
|
|
this.multipleSelection = [];
|
|
|
},
|
|
|
viewingAngleChange(data) {
|
|
@@ -436,20 +443,19 @@ export default {
|
|
|
pageSize: this.size,
|
|
|
};
|
|
|
|
|
|
- let res = null;
|
|
|
- if (this.pageType === "0") {
|
|
|
- res = await invigilateList(datas);
|
|
|
- this.dataList = res.data.data.records.map((item) => {
|
|
|
- item.label = `${item.identity} ${item.courseName}(${item.courseCode}) ${item.name}`;
|
|
|
- return item;
|
|
|
- });
|
|
|
- } else {
|
|
|
- res = await invigilateVideoList(datas);
|
|
|
- this.dataList = res.data.data.records.map((item) => {
|
|
|
- item.liveUrl = `http://live.qmth.com.cn/live/${item.monitorLiveUrl.toLowerCase()}.flv`;
|
|
|
- return item;
|
|
|
- });
|
|
|
- }
|
|
|
+ const res = await invigilateVideoList(datas);
|
|
|
+ const domainLen = this.liveDomains.length;
|
|
|
+ this.dataList = res.data.data.records.map((item, index) => {
|
|
|
+ const domain = domainLen ? this.liveDomains[index % domainLen] : "";
|
|
|
+ item.label = `${item.identity} ${item.courseName}(${item.courseCode}) ${item.name}`;
|
|
|
+ item.liveUrl = item.monitorLiveUrl
|
|
|
+ ? `${domain}/live/${item.monitorLiveUrl.toLowerCase()}.flv`
|
|
|
+ : "";
|
|
|
+
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.hasNewWarning = this.dataList.some((item) => item.warningNew);
|
|
|
this.total = res.data.data.total;
|
|
|
},
|
|
|
toPage(page) {
|
|
@@ -463,7 +469,7 @@ export default {
|
|
|
if (this.total > this.size) {
|
|
|
this.updateDetailIds({
|
|
|
filterData: this.filter,
|
|
|
- fetchFunc: invigilateList,
|
|
|
+ fetchFunc: invigilateVideoList,
|
|
|
});
|
|
|
} else {
|
|
|
const ids = this.dataList.map((item) => item.examRecordId);
|
|
@@ -480,12 +486,13 @@ export default {
|
|
|
},
|
|
|
async fetchWarningNotice() {
|
|
|
if (!this.filter.examId) return;
|
|
|
+ let noticeCaches = {};
|
|
|
|
|
|
const res = await invigilationWarningMessage(this.filter.examId);
|
|
|
res.data.data.forEach((item) => {
|
|
|
const stdKey = item.examRecordId;
|
|
|
- if (!this.noticeCaches[stdKey]) {
|
|
|
- this.noticeCaches[stdKey] = item;
|
|
|
+ if (!noticeCaches[stdKey]) {
|
|
|
+ noticeCaches[stdKey] = item;
|
|
|
this.$notify({
|
|
|
duration: 5 * 1000,
|
|
|
dangerouslyUseHTMLString: true,
|
|
@@ -533,7 +540,7 @@ export default {
|
|
|
if (!result) return;
|
|
|
|
|
|
await invigilateExamFinish(this.filter.examId);
|
|
|
- this.toPage(1);
|
|
|
+ this.$refs.ExamBatchDialog.getExamList();
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!",
|