|
@@ -161,7 +161,10 @@ export default {
|
|
|
this.observerResize();
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState("invigilation", ["liveDomains"]),
|
|
|
+ ...mapState("invigilation", [
|
|
|
+ "liveDomains",
|
|
|
+ "warningMessageListTimeCaches",
|
|
|
+ ]),
|
|
|
isFullScreen() {
|
|
|
return this.$store.state.isFullScreen;
|
|
|
},
|
|
@@ -269,6 +272,9 @@ export default {
|
|
|
|
|
|
/** 跳转详情 */
|
|
|
toDetail(item) {
|
|
|
+ const stdKey = `${item.examRecordId}_${item.title}`;
|
|
|
+ this.warningMessageListTimeCaches[stdKey] = Date.now();
|
|
|
+
|
|
|
this.$router
|
|
|
.push({
|
|
|
name: "WarningDetail",
|
|
@@ -366,12 +372,23 @@ export default {
|
|
|
let warningListMap = {};
|
|
|
res.data.data.forEach((item, index) => {
|
|
|
item.index = index;
|
|
|
- if (!warningListMap[item.examRecordId])
|
|
|
- warningListMap[item.examRecordId] = item;
|
|
|
+ warningListMap[item.examRecordId] = item;
|
|
|
});
|
|
|
this.warningList = Object.values(warningListMap).sort(
|
|
|
(a, b) => a.index - b.index
|
|
|
);
|
|
|
+ const nowTime = Date.now();
|
|
|
+ const maxCacheTime = 5 * 60 * 1000;
|
|
|
+ this.warningList = this.warningList
|
|
|
+ .map((item) => {
|
|
|
+ const content = (item.info || "").split(/【|】/);
|
|
|
+ item.title = content.length === 3 ? content[1] : "";
|
|
|
+ })
|
|
|
+ .filter((item) => {
|
|
|
+ const stdKey = `${item.examRecordId}_${item.title}`;
|
|
|
+ const cacheTime = this.warningMessageListTimeCaches[stdKey] || 0;
|
|
|
+ return nowTime - cacheTime > maxCacheTime;
|
|
|
+ });
|
|
|
},
|
|
|
/** 定时刷新预警/通话待办 */
|
|
|
refreshList() {
|