Merge pull request 'baigl' (#311) from baigl into main

Reviewed-on: #311
This commit is contained in:
baigl 2024-10-11 16:33:56 +08:00
commit 3fb3af9cae
4 changed files with 64 additions and 50 deletions

View File

@ -71,7 +71,8 @@ import { useToolState } from '@/store/modules/tool'
import { getCurrentTime, getTomorrow } from '@/utils/date' import { getCurrentTime, getTomorrow } from '@/utils/date'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useClassTaskStore from "@/store/modules/classTask"; import useClassTaskStore from "@/store/modules/classTask";
import {sessionStore, createWindow} from '@/utils/tool' import {createWindow} from '@/utils/tool'
import {sessionStore} from '@/utils/store'
import {throttle,debounce } from '@/utils/comm' import {throttle,debounce } from '@/utils/comm'

View File

@ -101,11 +101,7 @@
<!-- 作业内容编辑 --> <!-- 作业内容编辑 -->
<el-dialog v-model="workEdit" title="作业内容详情" width="90%" append-to-body> <el-dialog v-model="workEdit" title="作业内容详情" width="90%" append-to-body>
<div v-if="currentTag=='学习目标定位'" style="display: flex;">
<degreeevolution :attainmentList="attainmentList" :show-class="true" :courseQualityList="courseQualityList"/>
</div>
<!-- 课标研读 目标设定 教材研读 框架梳理 学科定位 --> <!-- 课标研读 目标设定 教材研读 框架梳理 学科定位 -->
<div v-if="currentTag=='习题训练'" :style="{'padding': '15px', 'overflow': 'auto'}"> <div v-if="currentTag=='习题训练'" :style="{'padding': '15px', 'overflow': 'auto'}">
<el-table :data="workConfObj.quizlist" style="width: 100%;"> <el-table :data="workConfObj.quizlist" style="width: 100%;">
<el-table-column type="index" width="60" /> <el-table-column type="index" width="60" />
@ -130,6 +126,32 @@
</el-table> </el-table>
</div> </div>
<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>
</div>
</div>
</div>
</template>
</div>
</div>
<div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;"> <div slot="footer" class="dialog-footer" style="text-align: right; margin-top: 20px;">
<div style="display: flex"> <div style="display: flex">
<!-- <el-button v-if="currentTag=='习题训练'" style="margin-right: auto" type="primary" <!-- <el-button v-if="currentTag=='习题训练'" style="margin-right: auto" type="primary"
@ -137,7 +159,6 @@
<el-button type="primary" style="margin-left: auto" :disabled="checkTaskAssigned(currentWorkEdit.currentTask)" <el-button type="primary" style="margin-left: auto" :disabled="checkTaskAssigned(currentWorkEdit.currentTask)"
@click="submitStudy('submit')"> </el-button> @click="submitStudy('submit')"> </el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -467,7 +488,21 @@ const handleWorkTitleEdit = (row, index) => {
}; };
// - // --
let classtaskObj = reactive({
id: '', //
bookName: '', //
uniquekey: '', //
title: '', //
worktype: '', //
quizlist: [], //
chooseWorkLists: [],// list
fileHomeworkList: [],// list
whiteboardObj: '',//
})
/**
* 作业内容-查看详情
* */
const handleWorkEdit = (row, index) =>{ const handleWorkEdit = (row, index) =>{
console.log(row, index) console.log(row, index)
workEdit.value = true workEdit.value = true
@ -549,34 +584,8 @@ const handleWorkEdit = (row, index) =>{
} }
} }
}; };
// --
let classtaskObj = reactive({
id: '', //
bookName: '', //
uniquekey: '', //
title: '', //
worktype: '', //
quizlist: [], //
chooseWorkLists: [],// list
fileHomeworkList: [],// list
whiteboardObj: '',//
})
// - // -
const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
// this.newWorkSpace = true;
// this.newWorkSpaceEdit = true;
// this.currentTask = row;
// this.currentIndex = index;
// this.currentTag = row.worktype;
// this.attainmentList = row.workcodesList?.attlist;
// this.courseQualityList = row.workcodesList?.qualist;
//
// this.classWorkForm.uniquekey = this.currentTask.uniquekey;
// this.classWorkForm.title = this.currentTask.title;
//
// this.classWorkForm.worktype = this.currentTask.worktype;
//[] //[]
var listCourseWork = []; var listCourseWork = [];
for (var i=0; i < row.entpcourseworklistarray.length; i++) { for (var i=0; i < row.entpcourseworklistarray.length; i++) {
@ -600,11 +609,6 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
if (row.worktype == '框架梳理') { if (row.worktype == '框架梳理') {
// //
// let queryParams = {}
// queryParams.id = listCourseWork[0].id;
// queryParams.ppttype = '';
// queryParams.title = '';
// queryParams.filetype = 'draw';
const res = await getEvaluationclue(listCourseWork[0].id); const res = await getEvaluationclue(listCourseWork[0].id);
if ( res.data==null || res.data==undefined ) { if ( res.data==null || res.data==undefined ) {
return; return;
@ -615,6 +619,7 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
res.data.score = listCourseWork[0].score; res.data.score = listCourseWork[0].score;
classtaskObj.chooseWorkLists.push(res.data); classtaskObj.chooseWorkLists.push(res.data);
// //
ToNewClassTask(classtaskObj);
} }
else if (row.worktype == '习题训练') { else if (row.worktype == '习题训练') {
const ids = listCourseWork.map(item => item.id).join(","); const ids = listCourseWork.map(item => item.id).join(",");
@ -636,6 +641,7 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
classtaskObj.quizlist = idres.rows; classtaskObj.quizlist = idres.rows;
// //
ToNewClassTask(classtaskObj);
} }
}) })
} }
@ -644,15 +650,22 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
const workcodes = JSON.parse(row.workcodes); const workcodes = JSON.parse(row.workcodes);
classtaskObj.whiteboardObj = JSON.stringify(workcodes.json); classtaskObj.whiteboardObj = JSON.stringify(workcodes.json);
// //
ToNewClassTask(classtaskObj);
} }
else if (row.worktype == '常规作业') { else if (row.worktype == '常规作业') {
if(isJson(row.workcodes)){ if(isJson(row.workcodes)){
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes); classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
// //
ToNewClassTask(classtaskObj);
} }
} }
}
// };
/**
* 跳转 作业设计 进行编辑页面
* @param classtaskObj
*/
const ToNewClassTask = (classtaskObj) => {
router.push({ router.push({
path: '/newClassTask', path: '/newClassTask',
query: { query: {
@ -660,7 +673,6 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
} }
}) })
} }
};
const isJson = (str) => { const isJson = (str) => {
if (typeof str == 'string') { if (typeof str == 'string') {

View File

@ -156,7 +156,7 @@ import ItemDialogScore from '@/views/classTask/container/item-dialog-score.vue'
// zdg: // zdg:
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/tool' import {sessionStore} from '@/utils/store'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const emit = defineEmits(['cle-click']) const emit = defineEmits(['cle-click'])
@ -636,7 +636,7 @@ onMounted(() => {
// const data = JSON.parse(localStorage.getItem('teachClassWorkItem')); // const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
const data = sessionStore.get('teachClassWorkItem'); const data = sessionStore.get('teachClassWorkItem');
// console.log(data,'????????????????????' ) console.log(data,'????????????????????' )
if(data){ if(data){
openDialog(data) openDialog(data)
} }

View File

@ -35,7 +35,8 @@ import { ref, onMounted, watch } from 'vue'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { homeworklist } from '@/api/teaching/classwork' import { homeworklist } from '@/api/teaching/classwork'
import { getCurrentTime, getTomorrow } from '@/utils/date' import { getCurrentTime, getTomorrow } from '@/utils/date'
import {sessionStore, createWindow} from '@/utils/tool' import {sessionStore} from '@/utils/store'
import {createWindow} from '@/utils/tool'
import { useToolState } from '@/store/modules/tool' import { useToolState } from '@/store/modules/tool'
import {throttle,debounce } from '@/utils/comm' import {throttle,debounce } from '@/utils/comm'