Compare commits

..

No commits in common. "fb3ffd5ddaafc4f966616ea87f51048249ce1139" and "5771533039856b5560a0b0d24fb7cd467e378867" have entirely different histories.

3 changed files with 28 additions and 51 deletions

View File

@ -82,8 +82,6 @@ export class MsgEnum {
MSG_classcourseopen : 'classcourseopen', MSG_classcourseopen : 'classcourseopen',
/** @desc: 学生的测练结果反馈 */ /** @desc: 学生的测练结果反馈 */
MSG_classquizfeedback : 'classquizfeedback', MSG_classquizfeedback : 'classquizfeedback',
/** @desc: 学生提交作业 */
MSG_finishHomework : 'finishHomework',
/** @desc: 老师端:接收到学生反馈消息-课堂测练中的其他任务 */ /** @desc: 老师端:接收到学生反馈消息-课堂测练中的其他任务 */
MSG_classtaskfeedback : 'classtaskfeedback', MSG_classtaskfeedback : 'classtaskfeedback',
/** @desc: 老师端学生反馈的消息具体要看其中的feedbackkey类别较繁杂 */ /** @desc: 老师端学生反馈的消息具体要看其中的feedbackkey类别较繁杂 */

View File

@ -395,6 +395,6 @@ export const dataSetJson = {
"课标-高中-英语": "e889fcac9fd011efb22a0242ac140006", "课标-高中-英语": "e889fcac9fd011efb22a0242ac140006",
"课标-高中-数学": "e03aa4fe9fd011ef91270242ac140006", "课标-高中-数学": "e03aa4fe9fd011ef91270242ac140006",
"课标-高中-地理": "270516829fd111efb13c0242ac140006", "课标-高中-地理": "270516829fd111efb13c0242ac140006",
"课标-高中-政治": "a2f0b247b85d11ef84290242ac140005", "课标-高中-政治": "a7df2b01aafd11ef8bb40242ac140002",
"鉴权": "ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm" "鉴权": "ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm"
} }

View File

@ -162,10 +162,9 @@ import ItemDialogScore from '@/views/classTask/container/classTask/item-dialog-s
import quizStats from '@/views/classTask/container/quizStats.vue' import quizStats from '@/views/classTask/container/quizStats.vue'
import ClassOverview from '@/views/classTask/container/classOverview.vue' import ClassOverview from '@/views/classTask/container/classOverview.vue'
import {sessionStore} from '@/utils/store' import {sessionStore} from '@/utils/store'
// import Chat from '@/utils/chat' // im import Chat from '@/utils/chat' // im
import MsgEnum from '@/plugins/imChat/msgEnum' // im
import ChatWs from '@/plugins/socket' // socket
if (!ChatWs.ws) ChatWs.init()
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const emit = defineEmits(['cle-click']) const emit = defineEmits(['cle-click'])
const props = defineProps({ const props = defineProps({
@ -716,35 +715,25 @@ const closeDialog = () => {
const msgHandle = (msg) => { const msgHandle = (msg) => {
const { type, data } = msg const { type, data } = msg
switch(type) { switch(type) {
case MsgEnum.HEADS.MSG_closed: // : case 'TIMAddRecvNewMsgCallback': // data=[]
window.close() // {
break (data||[]).forEach(o => {
case MsgEnum.HEADS.MSG_finishHomework: // : const msgArr = o?.message_elem_array||[]
const data = JSON.parse(localStorage.getItem('teachClassWorkItem')); msgArr.forEach(info => {
openDialog(data, false); const msgType = info?.elem_type // TIMElemType
break const msgData = !!info.text_elem_content ? JSON.parse(info.text_elem_content)||'' : ''
case MsgEnum.HEADS.MSG_slideFlapping: // //
window.close() // //console.log('msgData->', msgData);
break if (msgData.msgKey == "finishHomework"){
// case 'TIMAddRecvNewMsgCallback': // data=[] //
// { const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
// (data||[]).forEach(o => { //console.log('data->', data);
// const msgArr = o?.message_elem_array||[] openDialog(data, false);
// msgArr.forEach(info => { }
// const msgType = info?.elem_type // TIMElemType })
// const msgData = !!info.text_elem_content ? JSON.parse(info.text_elem_content)||'' : '' })
// // }
// //console.log('msgData->', msgData); break
// if (msgData.msgKey == "finishHomework"){
// //
// const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
// //console.log('data->', data);
// openDialog(data, false);
// }
// })
// })
// }
// break
} }
} }
@ -761,21 +750,11 @@ onMounted(() => {
isReloadTimer(); isReloadTimer();
// im // im
if (ChatWs.ws) { if (!Chat.imChat) {
ChatWs.watch((msg, e) => { Chat.init(true, true, msgHandle);
try { } else {
msgHandle(JSON.parse(msg)) Chat.listenMsg(msgHandle);
} catch (error) { }
console.error('socket 解析异常 ', error, e)
msgHandle(msg)
}
})
}
// if (!Chat.imChat) {
// Chat.init(true, true, msgHandle);
// } else {
// Chat.listenMsg(msgHandle);
// }
}) })
const isReloadTimer = () =>{ const isReloadTimer = () =>{
clearInterval(reloadTimer.value) // clearInterval(reloadTimer.value) //