From 40210437ea7f6459fa2e64feffba2cdbcbec9a05 Mon Sep 17 00:00:00 2001
From: wyw <571921741@qq.com>
Date: Thu, 2 Apr 2026 14:27:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/apply/subPages/SE/7answerPageEdit.vue | 138 +++++++++++++++++---
1 file changed, 122 insertions(+), 16 deletions(-)
diff --git a/pages/apply/subPages/SE/7answerPageEdit.vue b/pages/apply/subPages/SE/7answerPageEdit.vue
index 1185734..c2ae708 100644
--- a/pages/apply/subPages/SE/7answerPageEdit.vue
+++ b/pages/apply/subPages/SE/7answerPageEdit.vue
@@ -40,7 +40,7 @@
-
+
@@ -48,7 +48,7 @@
-
@@ -105,7 +105,9 @@
-
+
+
@@ -175,8 +177,10 @@
btnText: '提交', //'下一题'
perPaper: [], //每次的答题 wyw 20260306
listPath: [],
- indexCour: -1 //课件
-
+ indexCour: -1, //课件
+ listViewInfo: [],
+ VIEWSEC: 0,
+ currSce: 0,
}
// https: //sps.cxtc.com:3199/BT/VIDEO/20251226/251226100216835841.mp4
// https: //sps.cxtc.com:3199/BT/VIDEO/20251226/12345.mp4
@@ -262,11 +266,17 @@
let record = res.Nav_Papers[0].Nav_Record;
let notify = record ? record.Nav_Notify : null;
let hasAnswered = false;
- for (let i = 0; i < res.Nav_Papers.length; i++) {
- if (res.Nav_Papers[i].ANSWER !== 0) {
- hasAnswered = true;
- }
- }
+ // for (let i = 0; i < res.Nav_Papers.length; i++) {
+ // if (res.Nav_Papers[i].ANSWER !== 0) {
+ // hasAnswered = true;
+ // }
+ // }
+ var check = res.Nav_Papers.filter(e => e.ANSWER == 0)
+ if (check != null || check.length > 0)
+ hasAnswered = false
+ else
+ hasAnswered = true
+
this.papers = papers;
this.papers.forEach(item => {
if (item.Nav_Test.TYPE == 2) {
@@ -307,6 +317,7 @@
this.notify = notify;
this.readonly = hasAnswered;
this.score = this.papers[0].SCORE;
+ this.listViewInfo = res.ListViewInfo
if (this.isCourEdit) {
this.submit()
} else {
@@ -493,40 +504,135 @@
this.filepath = this.listPath[this.indexCour]
this.perPaper = this.papers.filter(e => e.FILE_PATH == this.filepath)
+ var ISEND = true
+ var VIEWSEC = 0
+ if (this.listViewInfo != null && this.listViewInfo.length > 0 && this.perPaper != null &&
+ this.perPaper.length > 0) {
+ var checkV = this.listViewInfo.filter(e => e.EDU_CARD_ID == this.perPaper[0].EDU_CARD_ID)
+ if (checkV != null && checkV.length > 0) {
+ ISEND = checkV[0].ISEND
+ VIEWSEC = checkV[0].VIEWSEC
+ }
+ }
+
if (this.filepath.indexOf('/VIDEO/') > -1) {
this.isViedo = true
this.isVideoEnd = false
this.filepath = config.uni_app_web_video_source_url + this.filepath
this.filepathf = []
+ if (ISEND && VIEWSEC == 0) {
+ ISEND = false
+ }
} else if (this.filepath.indexOf('.mp4') > -1 || this.filepath
.indexOf('.avi') > -1) {
//暂时不应该进来
this.isViedo = true
- this.isVideoEnd = false
+ if (ISEND) {
+ ISEND = false
+ }
+ // this.isVideoEnd = false
this.filepath = config.uni_app_web_source_url + this.filepath
this.filepathf = []
} else {
this.isViedo = false
- this.isVideoEnd = true
+ // this.isVideoEnd = true
this.filepath = this.filepath
this.filepathf = getFileShow(this.filepath)
}
+ this.isVideoEnd = ISEND
+ this.VIEWSEC = VIEWSEC
}
},
onTimeUpdate(e) {
const currentTime = e.detail.currentTime;
+ if (Math.abs(e.detail.currentTime - this.VIEWSEC) < 1) {
+ this.lastTime = this.VIEWSEC
+ }
if (currentTime > this.lastTime + 1) {
- uni.$showErrorInfo('禁止快进');
- const videoContext = uni.createVideoContext('myVideo', this)
- videoContext.seek(this.lastTime);
+ if (this.isVideoEnd || currentTime < this.VIEWSEC) {
+
+ } else {
+ uni.$showErrorInfo('禁止快进')
+ const videoContext = uni.createVideoContext('myVideo', this)
+ videoContext.seek(this.lastTime)
+ }
} else {
this.lastTime = currentTime;
}
+ this.currSce = currentTime
},
//播放结束
- onEnd() {
+ onEnd(e) {
this.isVideoEnd = true
+ var check = this.listViewInfo.filter(e => e.EDU_CARD_ID == this.perPaper[0].EDU_CARD_ID)
+ if (check == null || check.length < 1) {
+ this.listViewInfo.push({
+ ID: guid(),
+ ORG_ID: this.perPaper[0].ORG_ID,
+ EDU_CARD_ID: this.perPaper[0].EDU_CARD_ID,
+ USER_ID: this.perPaper[0].USER_ID,
+ RECORD_ID: this.perPaper[0].RECORD_ID,
+ TEXT_ID: this.perPaper[0].TEXT_ID,
+ EDU_CARD_ID: this.perPaper[0].EDU_CARD_ID,
+ ISEND: true,
+ VIEWSEC: parseInt(this.currSce) + 1,
+ })
+ } else {
+ this.listViewInfo.forEach(e => {
+ if (e.EDU_CARD_ID == this.perPaper[0].EDU_CARD_ID) {
+ e.ISEND = true
+ e.VIEWSEC = parseInt(this.currSce) + 1
+ }
+ });
+ }
},
+
+ onTempSave() {
+ if (this.readonly) {
+ return
+ }
+ if (this.isViedo) {
+ var check = this.listViewInfo.filter(e => e.EDU_CARD_ID == this.perPaper[0].EDU_CARD_ID)
+ if (check == null || check.length < 1) {
+ this.listViewInfo.push({
+ ID: guid(),
+ ORG_ID: this.perPaper[0].ORG_ID,
+ EDU_CARD_ID: this.perPaper[0].EDU_CARD_ID,
+ USER_ID: this.perPaper[0].USER_ID,
+ RECORD_ID: this.perPaper[0].RECORD_ID,
+ TEXT_ID: this.perPaper[0].TEXT_ID,
+ EDU_CARD_ID: this.perPaper[0].EDU_CARD_ID,
+ ISEND: false,
+ VIEWSEC: parseInt(this.currSce) - 1,
+ })
+ } else if (check.length > 0 && !check[0].ISEND) {
+ this.listViewInfo.forEach(e => {
+ e.VIEWSEC = parseInt(this.currSce) - 1
+ })
+ }
+ }
+ let data = {
+ Nav_Config: JSON.parse(JSON.stringify(this.configE)),
+ Nav_Papers: JSON.parse(JSON.stringify(this.papers)),
+ TaskID: this.TaskID,
+ ORG_ID: this.ORG_ID,
+ TEXT_ID: this.EDIT_ID,
+ ListViewInfo: this.listViewInfo
+ }
+ getRequest(data, "/SE/SETrainRecord/SavePapersTemp").then(res => {
+ if (res && res.IsOperateSuccessful) {
+ var icon = 'success'
+ var duration = 1000
+ if (!res.IsPass) {
+ icon = 'error'
+ duration = 2000
+ }
+ uni.$showMsgFunc('执行成功', () => {
+ uni.navigateBack()
+ }, icon, duration)
+ }
+ })
+ }
}
}