Merge branch 'main' into zhuhao_dev
# Conflicts: # src/renderer/src/views/prepare/index.vue
This commit is contained in:
commit
16b574a167
|
@ -18,6 +18,14 @@ export function listClassworkdataByDeadDate(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询classworkdata详细
|
||||||
|
export function getClassworkdata(id) {
|
||||||
|
return request({
|
||||||
|
url: '/education/classworkdata/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询classworkdata列表 班级作业列表
|
// 查询classworkdata列表 班级作业列表
|
||||||
export function listClassworkdata(query) {
|
export function listClassworkdata(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -55,6 +55,7 @@ import { saveByClassWorkArray } from '@/api/teaching/classwork'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import { getCurrentTime } from '@/utils/date'
|
import { getCurrentTime } from '@/utils/date'
|
||||||
import { uniqBy, groupBy } from 'lodash'
|
import { uniqBy, groupBy } from 'lodash'
|
||||||
|
import { sessionStore } from '@/utils/store'
|
||||||
|
|
||||||
const model = defineModel({ type: Boolean, default: false })
|
const model = defineModel({ type: Boolean, default: false })
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -211,6 +212,8 @@ const delStudent = (index) => {
|
||||||
|
|
||||||
const onSubmit = (formEl) => {
|
const onSubmit = (formEl) => {
|
||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
|
// 课堂id
|
||||||
|
const classRoomId = sessionStore.get('curClassRoom.id')
|
||||||
formEl.validate((valid) => {
|
formEl.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
/**
|
/**
|
||||||
|
@ -226,7 +229,8 @@ const onSubmit = (formEl) => {
|
||||||
id: 0,
|
id: 0,
|
||||||
parentid: props.row.id,
|
parentid: props.row.id,
|
||||||
classid: value,
|
classid: value,
|
||||||
classcourseid: 0,
|
classcourseid: 0, // 课堂id-ppt为字符串不能使用
|
||||||
|
classReservId: classRoomId, // 课堂id
|
||||||
entpcourseid: props.entpcourseid,
|
entpcourseid: props.entpcourseid,
|
||||||
studentlist: JSON.stringify(gradeObj[value]),
|
studentlist: JSON.stringify(gradeObj[value]),
|
||||||
feedback: form.feedback,
|
feedback: form.feedback,
|
||||||
|
|
|
@ -460,12 +460,13 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
// import { Plus } from '@element-plus/icons-vue'
|
// import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import { updateClassworkeval, updateClassworkdata } from '@/api/classTask'
|
import { updateClassworkeval, updateClassworkdata, getClassworkdata } from '@/api/classTask'
|
||||||
import { getTimeDate } from '@/utils/date'
|
import { getTimeDate } from '@/utils/date'
|
||||||
import ReFilePreview from '@/components/refile-preview/index.vue'
|
import ReFilePreview from '@/components/refile-preview/index.vue'
|
||||||
import { quizStrToList } from '@/utils/comm';
|
import { quizStrToList } from '@/utils/comm';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
@ -644,7 +645,7 @@ const selectScore = (score) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 接收父组件传过来的参数
|
// 接收父组件传过来的参数
|
||||||
const acceptParams = (params) => {
|
const acceptParams = async (params) => {
|
||||||
console.log(params)
|
console.log(params)
|
||||||
console.log(dialogProps, 'dialogProps')
|
console.log(dialogProps, 'dialogProps')
|
||||||
// 先重置一下 参数
|
// 先重置一下 参数
|
||||||
|
@ -709,8 +710,9 @@ const acceptParams = (params) => {
|
||||||
if (params.studentObj.worktype == '常规作业') {
|
if (params.studentObj.worktype == '常规作业') {
|
||||||
try {
|
try {
|
||||||
// 老师布置的附件 datacontent TODO:常规作业、其他类型还未接入
|
// 老师布置的附件 datacontent TODO:常规作业、其他类型还未接入
|
||||||
if (params.studentObj.datacontent != '') {
|
const res = await getClassworkdata(params.studentObj.id);
|
||||||
const teachWorkFileList = JSON.parse(params.studentObj.datacontent)
|
if(res.data.datacontent != ''){
|
||||||
|
const teachWorkFileList = JSON.parse(res.data.datacontent);
|
||||||
console.log(teachWorkFileList, '老师filelist-------------')
|
console.log(teachWorkFileList, '老师filelist-------------')
|
||||||
teachWorkFileList &&
|
teachWorkFileList &&
|
||||||
teachWorkFileList.forEach((item) => {
|
teachWorkFileList.forEach((item) => {
|
||||||
|
@ -727,7 +729,6 @@ const acceptParams = (params) => {
|
||||||
teacherFeedContentList.value.push(teachWorkFileList)
|
teacherFeedContentList.value.push(teachWorkFileList)
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogProps.value.studentObj.datacontent = dialogProps.value.studentObj.datacontent
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Invalid JSON:', error)
|
console.error('Invalid JSON:', error)
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,15 +418,15 @@ const getStudentClassWorkDataDetail = (row) => {
|
||||||
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
||||||
|
|
||||||
// 参考答案 去除下html标签
|
// 参考答案 去除下html标签
|
||||||
wevalres.rows[w].rightanswer =
|
// wevalres.rows[w].rightanswer =
|
||||||
wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
// wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
||||||
? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].rightanswer
|
// : wevalres.rows[w].rightanswer
|
||||||
// 学生回答 去除下html标签
|
// // 学生回答 去除下html标签
|
||||||
wevalres.rows[w].feedcontent =
|
// wevalres.rows[w].feedcontent =
|
||||||
wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
// wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
||||||
? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].feedcontent
|
// : wevalres.rows[w].feedcontent
|
||||||
|
|
||||||
if (classWorkAnalysis.row.worktype == '常规作业') {
|
if (classWorkAnalysis.row.worktype == '常规作业') {
|
||||||
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
||||||
|
|
|
@ -410,15 +410,15 @@ const getStudentClassWorkDataDetail = (row) => {
|
||||||
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
||||||
|
|
||||||
// 参考答案 去除下html标签
|
// 参考答案 去除下html标签
|
||||||
wevalres.rows[w].rightanswer =
|
// wevalres.rows[w].rightanswer =
|
||||||
wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
// wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
||||||
? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].rightanswer
|
// : wevalres.rows[w].rightanswer
|
||||||
// 学生回答 去除下html标签
|
// // 学生回答 去除下html标签
|
||||||
wevalres.rows[w].feedcontent =
|
// wevalres.rows[w].feedcontent =
|
||||||
wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
// wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
||||||
? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].feedcontent
|
// : wevalres.rows[w].feedcontent
|
||||||
|
|
||||||
if (classWorkAnalysis.row.worktype == '常规作业') {
|
if (classWorkAnalysis.row.worktype == '常规作业') {
|
||||||
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
||||||
|
|
|
@ -139,6 +139,7 @@
|
||||||
<!-- 上课配置 -->
|
<!-- 上课配置 -->
|
||||||
<class-start ref="calssRef" @close="closeChange"/>
|
<class-start ref="calssRef" @close="closeChange"/>
|
||||||
<PptDialog @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData" v-model="pptDialog"/>
|
<PptDialog @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData" v-model="pptDialog"/>
|
||||||
|
<!-- <button @click="test">test</button> -->
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Check,Plus } from '@element-plus/icons-vue'
|
import { Check,Plus } from '@element-plus/icons-vue'
|
||||||
|
@ -175,7 +176,6 @@ import ClassReserv from '@/views/classManage/classReserv.vue'
|
||||||
import classStart from './container/class-start.vue' // 预备上课
|
import classStart from './container/class-start.vue' // 预备上课
|
||||||
import MsgEnum from '@/plugins/imChat/msgEnum' // im 消息枚举
|
import MsgEnum from '@/plugins/imChat/msgEnum' // im 消息枚举
|
||||||
import Chat from '@/utils/chat' // im 登录初始化
|
import Chat from '@/utils/chat' // im 登录初始化
|
||||||
import msgEnum from '@/plugins/imChat/msgEnum'
|
|
||||||
if (!Chat.imChat) Chat.init()
|
if (!Chat.imChat) Chat.init()
|
||||||
|
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
|
@ -291,6 +291,10 @@ export default {
|
||||||
this.currentFileList.unshift(item.resData)
|
this.currentFileList.unshift(item.resData)
|
||||||
this.pptDialog = false
|
this.pptDialog = false
|
||||||
},
|
},
|
||||||
|
// test() {
|
||||||
|
// toolStore.resetDef() // 重置状态
|
||||||
|
// ipcMsgSend('tool-sphere:close') // 关闭窗口
|
||||||
|
// },
|
||||||
// 开始上课
|
// 开始上课
|
||||||
startClass(item, classObj) {
|
startClass(item, classObj) {
|
||||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||||
|
@ -316,7 +320,7 @@ export default {
|
||||||
}
|
}
|
||||||
case 'close': { // 关闭上课
|
case 'close': { // 关闭上课
|
||||||
const head = MsgEnum.HEADS.MSG_closed // closed
|
const head = MsgEnum.HEADS.MSG_closed // closed
|
||||||
const msgT = msgEnum.TYPES.TEACHER // teacher
|
const msgT = MsgEnum.TYPES.TEACHER // teacher
|
||||||
const isApt = !row.bookImg // bookImg ppt 否则Apt
|
const isApt = !row.bookImg // bookImg ppt 否则Apt
|
||||||
row.ex3 == 'undefined' && (row.ex3 = null)
|
row.ex3 == 'undefined' && (row.ex3 = null)
|
||||||
const timgroupid = isApt ? row.timgroupid : row.ex3 // ex3 ppt 否则Apt
|
const timgroupid = isApt ? row.timgroupid : row.ex3 // ex3 ppt 否则Apt
|
||||||
|
|
|
@ -98,6 +98,7 @@ onMounted(async() => {
|
||||||
const getClassInfo = async () => {
|
const getClassInfo = async () => {
|
||||||
const { data } = await classManageApi.getClassInfo(classObj.id)
|
const { data } = await classManageApi.getClassInfo(classObj.id)
|
||||||
classObj.data = data
|
classObj.data = data
|
||||||
|
sessionStore.set('curClassRoom', classObj) // 课堂信息-缓存
|
||||||
// 群id
|
// 群id
|
||||||
let timGroupId = data?.ex3 || ''
|
let timGroupId = data?.ex3 || ''
|
||||||
console.log('获取群ID:', timGroupId)
|
console.log('获取群ID:', timGroupId)
|
||||||
|
|
Loading…
Reference in New Issue