作业布置:新增 框架梳理 列表详情预览

This commit is contained in:
白了个白 2024-10-14 17:26:49 +08:00
parent c3787eef0f
commit b0415ecafa
3 changed files with 204 additions and 128 deletions

View File

@ -99,7 +99,7 @@
</el-table>
</div>
<!-- 作业内容编辑 -->
<!-- 作业内容详情 -->
<el-dialog v-model="workEdit" title="作业内容详情" width="90%" append-to-body>
<!-- 课标研读 目标设定 教材研读 框架梳理 学科定位 -->
<div v-if="currentTag=='习题训练'" :style="{'padding': '15px', 'overflow': 'auto'}">
@ -128,29 +128,20 @@
<div v-if="currentTag=='框架梳理'" :style="{'padding': '15px', 'overflow': 'auto'}">
<div style="margin: 5px; background-color: white">
<template v-for="(item) in workConfObj.chooseWorkLists" :key="item.id">
<div v-if="item.worktype==workConfObj.worktype">
<div class="choose-work">
<div class="choose-work-title">{{ item.worktype }}</div>
<div class="choose-work-content">
<div style="color: silver; display: flex;align-items: center;flex: 1;">
<el-form-item label="分值">
<el-input-number v-model="item.score" :min="1" :max="100" size="small"></el-input-number >
</el-form-item>
<div style="display: flex;align-items: center;flex: 1;justify-content: flex-end;">
<el-button @click="prevRead(item)">预览</el-button>
</div>
</div>
<template v-for="(_item,index) in workConfObj.chooseWorkLists" :key="index">
<div v-if="_item.worktype=='框架梳理'">
<div style="color: silver; display: flex;align-items: center;">
<div style="flex: 1;">{{ _item.worktype }}</div>
<div style="flex: 1;">分值{{ _item.score }}</div>
<div style="display: flex;align-items: center;flex: 1;justify-content: flex-end;">
<el-button @click="prevRead(_item)">预览</el-button>
</div>
</div>
</div>
</template>
</div>
</div>
<!-- TODO 课堂展示 常规作业 预览待开发-->
<div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;">
<div style="display: flex">
@ -250,6 +241,9 @@
<el-button type="primary" @click="handleTaskAssignToAllClassType()" >{{'推送'}}</el-button>
</div>
</el-dialog>
<!-- 预览框 -->
<prevReadMsgDialog ref="prevReadMsgDialogRef" :bookobj="courseObj"/>
</div>
</div>
</template>
@ -268,6 +262,8 @@ import { useGetHomework } from '@/hooks/useGetHomework'
import { processList } from '@/hooks/useProcessList'
import { uniqBy, groupBy } from 'lodash'
import { getCurrentTime } from '@/utils/date'
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore().user
const { proxy } = getCurrentInstance()
@ -284,7 +280,7 @@ const props = defineProps({
// ---------------------------------------------------
const isCollapse = ref(false)
const prevReadMsgDialogRef = ref(null);// ref
const courseObj = reactive({
// : id,id,id,
@ -308,9 +304,10 @@ const currentWorkEdit = reactive({
currentIndex: 0,
})//
const currentTag = ref('');//
// -
const workConfObj = reactive({
quizlist: [], // list
chooseWorkLists: [], //
});
//
@ -508,7 +505,7 @@ let classtaskObj = reactive({
/**
* 作业内容-查看详情
* */
const handleWorkEdit = (row, index) =>{
const handleWorkEdit = (row, index) =>{
console.log(row, index)
workEdit.value = true
currentWorkEdit.currentTask = row;
@ -517,24 +514,28 @@ let classtaskObj = reactive({
// this.attainmentList = row.workcodesList?.attlist;
// this.courseQualityList = row.workcodesList?.qualist;
if (row.worktype == '框架梳理') {
this.$nextTick(()=>{
this.getFlowData()
//TODO
// entpcourseworklistarray
var listCourseWork = [];
for (var i=0; i < row.entpcourseworklistarray.length; i++) {
listCourseWork.push(row.entpcourseworklistarray[i]);
}
nextTick(()=>{
// id
getEvaluationclue(listCourseWork[0].id).then(res => {
if ( res.data==null || res.data==undefined ) {
return;
}
res.data.worktype = '框架梳理';
res.data.score = listCourseWork[0].score;
console.log('框架梳理的列表', res.data);
// list
workConfObj.chooseWorkLists = [res.data];
});
})
}
// if (row.worktype == '') {
// // TODO
// rootid:entpcourseworkid rootid: row.entpcourseworklistarray[0].id,
// listEvaluationclue({ cluegroup: 'graph', edusubject: this.courseObj.edusubject, pageSize: 1000 }).then((res) => {
// var glist = [];
// for (var i = 0; i < res.rows.length; i++) {
// glist.push(res.rows[i]);
// }
// this.isEditable = false;
// this.preKnowList = glist;
// this.$refs.jsMind.updateFromParent(this.preKnowList, this.courseObj.edusubject);
// this.$refs.jsMind.initJsMindMap();
// })
// }
// //
if (row.worktype == '习题训练') {
@ -572,7 +573,7 @@ let classtaskObj = reactive({
})
}
//
//TODO
if(row.worktype == '常规作业' || row.worktype == '课堂展示'){
console.log(row,'常规作业-课堂展示');
// workcodes
@ -1065,6 +1066,13 @@ const handleNewClassWorkDialog = () => {
router.push({ path: '/newClassTask' });
}
/**
* 预览框
*/
const prevRead = (item) => {
proxy.$refs.prevReadMsgDialogRef.openDialog(item);
}
// -
const submitWorkTitle = () => {
if(currentWorkEdit.currentTask.title == currentWorkEdit.currentTitle){

View File

@ -0,0 +1,148 @@
<template>
<!-- 预览框 -->
<el-dialog v-if="prevReadMsg.visible" v-model="prevReadMsg.visible" class="prev-read-zy-wrap" width="90%" style="height: 80vh" append-to-body>
<!-- <div v-if="prevReadMsg.type=='课标研读'" style="height: 100%;">
<standard book-type="课标研读" :show-cata="true" :show-tools="false" :course-obj="courseObj" :bookdatahtml="versionObj.bookdata" :teachResObj="activeTeachResOfStandard"></standard>
</div>
<div v-if="prevReadMsg.type=='目标设定'" style="height: 100%;display: flex;">
<degreeevolution :courseObj="courseObj" :show-class="true" :teachResObj="activeTeachResOfStandard" :attainmentList="attainmentList" :courseQualityList="courseQualityList"/>
</div>
<div v-if="prevReadMsg.type=='教材研读'" style="height: 100%;">
<standard book-type="教材研读" :course-obj="courseObj" :show-tools="false" :bookdatahtml="versionObj.bookdata" :teachResObj="activeTeachResOfStandard"></standard>
</div> -->
<div v-if="prevReadMsg.type=='框架梳理'" style="height: 100%;">
<FlowChart ref="flowref" :flowHeight="mainHeight" :dataSource="flowData"/>
</div>
<!-- <div v-if="prevReadMsg.type=='学科定位'" style="height: 100%;">
<teachJsMind :course-obj="courseObj" :teachResObj="activeTeachResOfStandard"></teachJsMind>
</div> -->
<!-- <div v-if="prevReadMsg.type=='习题训练'">习题训练</div> -->
</el-dialog>
</template>
<script setup name="prevReadMsgDialogRef">
import { onMounted, ref, watch, reactive, getCurrentInstance } from 'vue'
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
import { useGetHomework } from '@/hooks/useGetHomework'
import FlowChart from "@/components/Flowchart/index.vue";
// import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
// import { addClassworkReturnId } from '@/api/teaching/classwork'
// import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval,updateClassworkeval } from '@/api/classTask'
// import { listEvaluation } from '@/api/subject'
// import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
import FileUpload from "@/components/FileUpload/index.vue";
import whiteboard from '@/components/whiteboard/whiteboard.vue'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore().user
const { proxy } = getCurrentInstance()
const props = defineProps({
bookobj: {
type: Object,
default: () => ({})
},
})
const mainHeight = ref(document.documentElement.clientHeight - 110)
//
const prevReadMsg = reactive({
visible: false,
type: ""
});// msg
// ----------
const flowData = ref({})//
// 1
const openDialog = async (item) => {
prevReadMsg.visible = true;
prevReadMsg.type = item.worktype;
// // if (item.worktype===''){
// // //
// // listEvaluation({itemkey: 'subject', edusubject: userStore.edusubject, edustage: userStore.edustage}).then(res => {
// // // TODO -
// // console.log("-",res);
// // // this.versionObj = res.rows[0];
// // // //
// // // if (this.versionObj.fileurl.length > 0) {
// // // readFile({cluelink: this.versionObj.fileurl}).then(fileres => {
// // // this.versionObj.bookdata = fileres;
// // // this.activeTeachResOfStandard = item;
// // // })
// // // }
// // })
// // }
// // if (item.worktype===''){
// // // TODO -
// // // this.activeTeachResOfStandard = item;
// // }
// if (item.worktype===''){
// // TODO -
// // getEvaluation(this.courseObj.evalrootid).then(bookres => {
// // this.versionObj = bookres.data;
// // if (this.versionObj.fileurl.length > 0) {
// // readFile({cluelink: this.versionObj.fileurl}).then(fileres => {
// // this.versionObj.bookdata = fileres;
// // this.activeTeachResOfStandard = item;
// // })
// // }
// // })
// }
if (item.worktype==='框架梳理'){
flowData.value = {};
const { chapterId } = await useGetHomework(props.bookobj.node)
// this.entpcourseid = chapterId
let queryParams = {
entpcourseid: chapterId,
ppttype: '教材分析',
parentid: item.id,
title: '逻辑框架建构',
filetype: 'draw'
}
listEntpcoursefile(queryParams).then(response=>{
if (response.rows.length == 0) {
return;
}
flowData.value = JSON.parse(response.rows[0].datacontent)
})
}
// if (item.worktype===''){
// // TODO -
// // this.activeTeachResOfStandard = item;
// }
}
onMounted(() => {
})
watch(() => props.bookobj.levelSecondId, (newVal) => {
console.log(props.bookobj,'课程选择')
})
defineExpose({
openDialog,
})
</script>
<style>
.prev-read-zy-wrap .el-dialog__header{
padding: 0!important;
}
.prev-read-zy-wrap .el-dialog__header button{
z-index: 99;
}
.prev-read-zy-wrap .el-dialog__body{
padding: 0!important;
height: 100%;
}
</style>

View File

@ -222,25 +222,8 @@
</div>
</el-form>
<!-- 预览框 -->
<el-dialog v-if="prevReadMsg.visible" v-model="prevReadMsg.visible" class="prev-read-zy-wrap" width="90%" style="height: 80vh" append-to-body>
<!-- <div v-if="prevReadMsg.type=='课标研读'" style="height: 100%;">
<standard book-type="课标研读" :show-cata="true" :show-tools="false" :course-obj="courseObj" :bookdatahtml="versionObj.bookdata" :teachResObj="activeTeachResOfStandard"></standard>
</div>
<div v-if="prevReadMsg.type=='目标设定'" style="height: 100%;display: flex;">
<degreeevolution :courseObj="courseObj" :show-class="true" :teachResObj="activeTeachResOfStandard" :attainmentList="attainmentList" :courseQualityList="courseQualityList"/>
</div>
<div v-if="prevReadMsg.type=='教材研读'" style="height: 100%;">
<standard book-type="教材研读" :course-obj="courseObj" :show-tools="false" :bookdatahtml="versionObj.bookdata" :teachResObj="activeTeachResOfStandard"></standard>
</div> -->
<div v-if="prevReadMsg.type=='框架梳理'" style="height: 100%;">
<FlowChart ref="flowref" :flowHeight="mainHeight" :dataSource="flowData"/>
</div>
<!-- <div v-if="prevReadMsg.type=='学科定位'" style="height: 100%;">
<teachJsMind :course-obj="courseObj" :teachResObj="activeTeachResOfStandard"></teachJsMind>
</div> -->
<!-- <div v-if="prevReadMsg.type=='习题训练'">习题训练</div> -->
</el-dialog>
<!-- 预览框 -->
<prevReadMsgDialog ref="prevReadMsgDialogRef" :bookobj="props.bookobj"/>
</div>
</template>
@ -260,16 +243,16 @@ import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
import { useGetHomework } from '@/hooks/useGetHomework'
import { processList } from '@/hooks/useProcessList'
import { getCurrentTime } from '@/utils/date'
import FlowChart from "@/components/Flowchart/index.vue";
import FileUpload from "@/components/FileUpload/index.vue";
import whiteboard from '@/components/whiteboard/whiteboard.vue'
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
import { useToolState } from '@/store/modules/tool'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore().user
const { proxy } = getCurrentInstance()
const router = useRouter()
const toolStore = useToolState()
const props = defineProps({
bookobj: {
@ -286,12 +269,8 @@ const props = defineProps({
}
})
const prevReadMsgDialogRef = ref(null);// ref
const isDialogOpen = ref(false)
const toolStore = useToolState()
const openDialog = () => {
isDialogOpen.value = true
}
const classWorkFormRef = ref(null);
const entpCourseWorkTypeList = ref([
{value: 0, label: "不限"},
@ -372,12 +351,6 @@ const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常
// -------
const boardLoading = ref(false);
const prevReadMsg = reactive({
visible: false,
type: ""
});// msg
// ----------
const flowData = ref({})//
//----------
const fileLoading = ref(false); // loading
@ -388,8 +361,6 @@ const changeFormType = (val) => {
classWorkForm.worktype = val;
}
console.log(props.propsformobj)
console.log(classWorkForm,'==============zizujian===================')
/**
* @desc: 根据查询参数查询试题
* @return: {*}
@ -565,61 +536,7 @@ const handleClassWorkQuizAdd = (fromsrc, entpcourseworkid) => {
* 预览资源
*/
const prevRead = async (item) => {
prevReadMsg.visible = true;
prevReadMsg.type = item.worktype;
if (item.worktype==='课标研读'){
//
listEvaluation({itemkey: 'subject', edusubject: userStore.edusubject, edustage: userStore.edustage}).then(res => {
// TODO -
console.log("课标研读-还未接入",res);
// this.versionObj = res.rows[0];
// //
// if (this.versionObj.fileurl.length > 0) {
// readFile({cluelink: this.versionObj.fileurl}).then(fileres => {
// this.versionObj.bookdata = fileres;
// this.activeTeachResOfStandard = item;
// })
// }
})
}
if (item.worktype==='目标设定'){
// TODO -
// this.activeTeachResOfStandard = item;
}
if (item.worktype==='教材研读'){
// TODO -
// getEvaluation(this.courseObj.evalrootid).then(bookres => {
// this.versionObj = bookres.data;
// if (this.versionObj.fileurl.length > 0) {
// readFile({cluelink: this.versionObj.fileurl}).then(fileres => {
// this.versionObj.bookdata = fileres;
// this.activeTeachResOfStandard = item;
// })
// }
// })
}
if (item.worktype==='框架梳理'){
flowData.value = {};
const { chapterId } = await useGetHomework(props.bookobj.node)
// this.entpcourseid = chapterId
let queryParams = {
entpcourseid: chapterId,
ppttype: '教材分析',
parentid: item.id,
title: '逻辑框架建构',
filetype: 'draw'
}
listEntpcoursefile(queryParams).then(response=>{
if (response.rows.length == 0) {
return;
}
flowData.value = JSON.parse(response.rows[0].datacontent)
})
}
if (item.worktype==='学科定位'){
// TODO -
// this.activeTeachResOfStandard = item;
}
proxy.$refs.prevReadMsgDialogRef.openDialog(item);
};
/**
* 添加到作业
@ -831,7 +748,10 @@ const handleClassWorkSave = async () => {
}
});
};
/**
* 编辑作业内容
* @param cform 表单数据
*/
const editWork = async (cform) =>{
//
cform.id= classWorkForm.id;