baigl #317
|
@ -60,7 +60,7 @@
|
||||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
||||||
import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask'
|
import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask'
|
||||||
|
|
||||||
import TaskItem from '@/views/classTask/container/task-item.vue'
|
import TaskItem from '@/views/classTask/container/classTask/task-item.vue'
|
||||||
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import { getCurrentTime, getTomorrow } from '@/utils/date'
|
import { getCurrentTime, getTomorrow } from '@/utils/date'
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 作业内容编辑 -->
|
<!-- 作业内容详情 -->
|
||||||
<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="{'padding': '15px', 'overflow': 'auto'}">
|
<div v-if="currentTag=='习题训练'" :style="{'padding': '15px', 'overflow': 'auto'}">
|
||||||
|
@ -125,30 +125,73 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 框架梳理 -->
|
||||||
<div v-if="currentTag=='框架梳理'" :style="{'padding': '15px', 'overflow': 'auto'}">
|
<div v-if="currentTag=='框架梳理'" :style="{'padding': '15px', 'overflow': 'auto'}">
|
||||||
<div style="margin: 5px; background-color: white">
|
<div style="margin: 5px; background-color: white">
|
||||||
|
<template v-for="(_item,index) in workConfObj.chooseWorkLists" :key="index">
|
||||||
<template v-for="(item) in workConfObj.chooseWorkLists" :key="item.id">
|
<div v-if="_item.worktype=='框架梳理'">
|
||||||
<div v-if="item.worktype==workConfObj.worktype">
|
<div style="color: silver; display: flex;align-items: center;">
|
||||||
<div class="choose-work">
|
<div style="flex: 1;">{{ _item.worktype }}</div>
|
||||||
<div class="choose-work-title">{{ item.worktype }}</div>
|
<div style="flex: 1;">分值:{{ _item.score }}</div>
|
||||||
<div class="choose-work-content">
|
<div style="display: flex;align-items: center;flex: 1;justify-content: flex-end;">
|
||||||
<div style="color: silver; display: flex;align-items: center;flex: 1;">
|
<el-button @click="prevRead(_item)">预览</el-button>
|
||||||
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- TODO 课堂展示 、常规作业 预览待开发-->
|
||||||
|
<!-- 常规作业:包含多个格式(图片略缩图展示,点击放大;其他附件跳转另外弹窗查看) -->
|
||||||
|
<div v-if="currentTag=='常规作业'" :style="{'padding': '15px', 'overflow': 'auto'}">
|
||||||
|
<div style="margin: 5px; background-color: white">
|
||||||
|
<div v-if="workConfObj.teacherFeedContentList.length > 0">
|
||||||
|
<div class="image_list">
|
||||||
|
<div v-if="workConfObj.teachImageList.length > 0">
|
||||||
|
<div style="margin-bottom: 5px;text-align: left;">
|
||||||
|
<span style="color: red">温馨提示:点击图片可放大预览 </span>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; flex-wrap: nowrap; flex-direction: row;">
|
||||||
|
<div v-for="(imageItem, index) in workConfObj.teachImageList" :key="index" style="margin: 0 15px;">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px"
|
||||||
|
:src="imageItem.url"
|
||||||
|
:zoom-rate="1.2"
|
||||||
|
:max-scale="7"
|
||||||
|
:min-scale="0.2"
|
||||||
|
:preview-src-list="
|
||||||
|
workConfObj.teachImageList
|
||||||
|
.filter(
|
||||||
|
(item) =>
|
||||||
|
item.name.indexOf('jpg') > -1 ||
|
||||||
|
item.name.indexOf('jpeg') > -1 ||
|
||||||
|
item.name.indexOf('png') > -1
|
||||||
|
)
|
||||||
|
.map((item) => item.url)
|
||||||
|
"
|
||||||
|
:initial-index="4"
|
||||||
|
fit="contain"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<!-- 其他类型附件 -->
|
||||||
|
<div v-if="workConfObj.teachFileList.length > 0">
|
||||||
|
<div style="margin: 10px 0;text-align: left; margin: auto 0; cursor: pointer;">
|
||||||
|
<span style="color: #409eff" @click="openFile">预览其他类型附件!</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="workConfObj.teachFileList.length > 0">
|
||||||
|
<div style="margin: 10px 0;text-align: left; margin: auto 0; cursor: pointer;">
|
||||||
|
<span style="color: #409eff" @click="openFile">预览其他类型附件!</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -250,6 +293,12 @@
|
||||||
<el-button type="primary" @click="handleTaskAssignToAllClassType()" >{{'推送'}}</el-button>
|
<el-button type="primary" @click="handleTaskAssignToAllClassType()" >{{'推送'}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 预览框 -->
|
||||||
|
<prevReadMsgDialog ref="prevReadMsgDialogRef" :bookobj="courseObj"/>
|
||||||
|
<!-- 其他附件预览框 acceptParams-->
|
||||||
|
<prevReadImgFileDialog ref="prevReadImgFileDialogRef"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -268,6 +317,9 @@ import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { processList } from '@/hooks/useProcessList'
|
import { processList } from '@/hooks/useProcessList'
|
||||||
import { uniqBy, groupBy } from 'lodash'
|
import { uniqBy, groupBy } from 'lodash'
|
||||||
import { getCurrentTime } from '@/utils/date'
|
import { getCurrentTime } from '@/utils/date'
|
||||||
|
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
|
||||||
|
import prevReadImgFileDialog from '@/views/classTask/container/classTask/prevReadImgFileDialog.vue'
|
||||||
|
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
@ -284,7 +336,8 @@ const props = defineProps({
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
|
|
||||||
const isCollapse = ref(false)
|
const isCollapse = ref(false)
|
||||||
|
const prevReadMsgDialogRef = ref(null);// 预览框ref
|
||||||
|
const prevReadImgFileDialogRef = ref(null);// 其他附件类型预览框ref
|
||||||
|
|
||||||
const courseObj = reactive({
|
const courseObj = reactive({
|
||||||
// 课程相关参数: 教材id,单元id,章节id,课程名称
|
// 课程相关参数: 教材id,单元id,章节id,课程名称
|
||||||
|
@ -308,9 +361,13 @@ const currentWorkEdit = reactive({
|
||||||
currentIndex: 0,
|
currentIndex: 0,
|
||||||
})// 当前作业编辑
|
})// 当前作业编辑
|
||||||
const currentTag = ref('');// 当前作业类型
|
const currentTag = ref('');// 当前作业类型
|
||||||
|
// 作业列表-详情展示内容
|
||||||
const workConfObj = reactive({
|
const workConfObj = reactive({
|
||||||
quizlist: [], // 习题list
|
quizlist: [], // 习题list
|
||||||
|
chooseWorkLists: [], // 框架梳理
|
||||||
|
teacherFeedContentList: [],//常规作业
|
||||||
|
teachFileList: [], // 常规作业文件list
|
||||||
|
teachImageList: [],// 常规作业图片list
|
||||||
});
|
});
|
||||||
|
|
||||||
// 推送相关
|
// 推送相关
|
||||||
|
@ -391,6 +448,10 @@ const getTaskList = async () => {
|
||||||
let model = [];
|
let model = [];
|
||||||
let mission = [];
|
let mission = [];
|
||||||
|
|
||||||
|
if(res.rows&&res.rows.length > 0){
|
||||||
|
// 根据创建时间 倒序排列一下
|
||||||
|
res.rows.sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp));
|
||||||
|
}
|
||||||
for (let item of res.rows){
|
for (let item of res.rows){
|
||||||
item.taskconfig = [];
|
item.taskconfig = [];
|
||||||
|
|
||||||
|
@ -473,6 +534,7 @@ const getTaskList = async () => {
|
||||||
}
|
}
|
||||||
list.push(item);
|
list.push(item);
|
||||||
}
|
}
|
||||||
|
// 根据 父项、子项 创建时间倒序排列一下
|
||||||
taskList.value = list;
|
taskList.value = list;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
})
|
})
|
||||||
|
@ -503,7 +565,7 @@ let classtaskObj = reactive({
|
||||||
/**
|
/**
|
||||||
* 作业内容-查看详情
|
* 作业内容-查看详情
|
||||||
* */
|
* */
|
||||||
const handleWorkEdit = (row, index) =>{
|
const handleWorkEdit = (row, index) =>{
|
||||||
console.log(row, index)
|
console.log(row, index)
|
||||||
workEdit.value = true
|
workEdit.value = true
|
||||||
currentWorkEdit.currentTask = row;
|
currentWorkEdit.currentTask = row;
|
||||||
|
@ -512,24 +574,27 @@ let classtaskObj = reactive({
|
||||||
// this.attainmentList = row.workcodesList?.attlist;
|
// this.attainmentList = row.workcodesList?.attlist;
|
||||||
// this.courseQualityList = row.workcodesList?.qualist;
|
// this.courseQualityList = row.workcodesList?.qualist;
|
||||||
if (row.worktype == '框架梳理') {
|
if (row.worktype == '框架梳理') {
|
||||||
this.$nextTick(()=>{
|
//包含 entpcourseworklistarray 内容
|
||||||
this.getFlowData()
|
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:entpcoursework里的id 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 == '习题训练') {
|
if (row.worktype == '习题训练') {
|
||||||
|
@ -567,20 +632,23 @@ let classtaskObj = reactive({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 常规作业、课堂展示
|
//TODO 待完善 课堂展示
|
||||||
if(row.worktype == '常规作业' || row.worktype == '课堂展示'){
|
if(row.worktype == '常规作业'){
|
||||||
console.log(row,'常规作业-课堂展示');
|
console.log(row,'常规作业');
|
||||||
// 老师布置的附件 workcodes ?? 与批改哪里这个字段值不一样
|
workConfObj.teacherFeedContentList = [];
|
||||||
|
workConfObj.teachImageList = [];
|
||||||
|
workConfObj.teachFileList = [];
|
||||||
|
|
||||||
if(row.workcodes != ''){
|
if(row.workcodes != ''){
|
||||||
const teachWorkFileList = JSON.parse(row.workcodes);
|
const teachWorkFileList = JSON.parse(row.workcodes);
|
||||||
teachWorkFileList&&teachWorkFileList.forEach(item => {
|
teachWorkFileList&&teachWorkFileList.forEach(item => {
|
||||||
if(item.name.indexOf('jpg') > -1 || item.name.indexOf('jpeg') > -1 || item.name.indexOf('png') > -1){
|
if(item.name.indexOf('jpg') > -1 || item.name.indexOf('jpeg') > -1 || item.name.indexOf('png') > -1){
|
||||||
this.teachImageList.push(item);
|
workConfObj.teachImageList.push(item);
|
||||||
}else{
|
}else{
|
||||||
this.teachFileList.push(item);
|
workConfObj.teachFileList.push(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.teacherFeedContentList.push(teachWorkFileList);
|
workConfObj.teacherFeedContentList.push(teachWorkFileList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -592,12 +660,10 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
|
||||||
listCourseWork.push(row.entpcourseworklistarray[i]);
|
listCourseWork.push(row.entpcourseworklistarray[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (listCourseWork.length > 0) {
|
if (listCourseWork.length > 0) {
|
||||||
classtaskObj.id= row.id; //
|
classtaskObj.id= row.id; //
|
||||||
classtaskObj.bookObj = courseObj; // 教材对象
|
classtaskObj.bookObj = courseObj; // 教材对象
|
||||||
classtaskObj.bookName = row.evaltitle? row.evalparenttitle+'/'+row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元
|
classtaskObj.bookName = row.evaltitle? row.evalparenttitle? row.evalparenttitle+'/'+row.evaltitle : row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元
|
||||||
classtaskObj.uniquekey= row.uniquekey; // 设计中的标题
|
classtaskObj.uniquekey= row.uniquekey; // 设计中的标题
|
||||||
classtaskObj.title= row.title; // 设计中的说明
|
classtaskObj.title= row.title; // 设计中的说明
|
||||||
classtaskObj.worktype= row.worktype; // 设计中的作业类型
|
classtaskObj.worktype= row.worktype; // 设计中的作业类型
|
||||||
|
@ -1062,6 +1128,24 @@ const handleNewClassWorkDialog = () => {
|
||||||
router.push({ path: '/newClassTask' });
|
router.push({ path: '/newClassTask' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预览框
|
||||||
|
*/
|
||||||
|
const prevRead = (item) => {
|
||||||
|
proxy.$refs.prevReadMsgDialogRef.openDialog(item);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 常规作业:其他附件预览
|
||||||
|
*/
|
||||||
|
const openFile = () => {
|
||||||
|
const obj = {
|
||||||
|
teacherFeedContentList: workConfObj.teacherFeedContentList,//常规作业
|
||||||
|
teachFileList: workConfObj.teachFileList, // 常规作业文件list
|
||||||
|
teachImageList: workConfObj.teachImageList,// 常规作业图片list
|
||||||
|
}
|
||||||
|
proxy.$refs.prevReadImgFileDialogRef.acceptParams(obj);
|
||||||
|
}
|
||||||
|
|
||||||
// 作业说明编辑-确认
|
// 作业说明编辑-确认
|
||||||
const submitWorkTitle = () => {
|
const submitWorkTitle = () => {
|
||||||
if(currentWorkEdit.currentTask.title == currentWorkEdit.currentTitle){
|
if(currentWorkEdit.currentTask.title == currentWorkEdit.currentTitle){
|
||||||
|
|
|
@ -196,7 +196,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="teachFileList.length > 0">
|
<div v-if="teachFileList.length > 0">
|
||||||
<div style="margin: 10px 0;text-align: left;">
|
<div style="margin: 10px 0;text-align: left; cursor: pointer;">
|
||||||
<span style="color: red" @click="openFile"
|
<span style="color: red" @click="openFile"
|
||||||
>温馨提示:点击此处 可预览其他类型附件!
|
>温馨提示:点击此处 可预览其他类型附件!
|
||||||
</span>
|
</span>
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="fileList.length > 0">
|
<div v-if="fileList.length > 0">
|
||||||
<div style="margin: 10px 0;text-align: left;">
|
<div style="margin: 10px 0;text-align: left; cursor: pointer;">
|
||||||
<span style="color: red" @click="openFile"
|
<span style="color: red" @click="openFile"
|
||||||
>温馨提示:点击此处 可预览其他类型附件!
|
>温馨提示:点击此处 可预览其他类型附件!
|
||||||
</span>
|
</span>
|
|
@ -0,0 +1,179 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="fileReadopen"
|
||||||
|
title="文件预览"
|
||||||
|
width="80%"
|
||||||
|
:style="{ height: '72vh' }"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<div class="file-read-dialog">
|
||||||
|
<div>
|
||||||
|
<!-- 老师附件 -->
|
||||||
|
<div v-if="teachFileList.length > 0">
|
||||||
|
<el-card style="max-width: 480px">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>文件列表</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div
|
||||||
|
v-for="item in teachFileList"
|
||||||
|
:key="item"
|
||||||
|
style="margin: 10px; display: flex; align-items: center"
|
||||||
|
>
|
||||||
|
<span style="margin-right: 10px">{{ item.name }}</span>
|
||||||
|
<el-button type="primary" @click="onFileRead(item)">预览</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%" :style="{ height: '72vh' }">
|
||||||
|
<div style="margin-left: 10px">
|
||||||
|
预览展示区域<span style="color: red; margin-left: 10px">
|
||||||
|
温馨提示:若预览失败,<span style="margin-left: 10px">{{ props.name }}</span
|
||||||
|
>可点击此处<a
|
||||||
|
:href="fileitem.url ? fileitem.url : ''"
|
||||||
|
target="_blank"
|
||||||
|
style="color: blue"
|
||||||
|
>下载!</a
|
||||||
|
></span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<ReFilePreview
|
||||||
|
:name="fileitem.name"
|
||||||
|
:type="fileitem.type"
|
||||||
|
:file-type="fileitem.type"
|
||||||
|
:file-path="fileitem.url"
|
||||||
|
:text-content="textContent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="prevReadImgFileDialogRef">
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import ReFilePreview from '@/components/refile-preview/index.vue'
|
||||||
|
|
||||||
|
const props = defineProps({})
|
||||||
|
|
||||||
|
const fileReadopen = ref(false)
|
||||||
|
|
||||||
|
// 老师常规作业、课堂展示布置题目附件list
|
||||||
|
const teacherFeedContentList = ref([])
|
||||||
|
const teachImageList = ref([])
|
||||||
|
const teachFileList = ref([])
|
||||||
|
|
||||||
|
|
||||||
|
// 确定的线上图片数据
|
||||||
|
//#region 文件内容相关
|
||||||
|
const fileitem = reactive({
|
||||||
|
name: '',
|
||||||
|
type: '',
|
||||||
|
url: ''
|
||||||
|
})
|
||||||
|
// 文件预览
|
||||||
|
const onFileRead = (file) => {
|
||||||
|
textContent.value = '1'
|
||||||
|
//
|
||||||
|
fileitem.type = file.name.split('.').pop().toLowerCase()
|
||||||
|
fileitem.url = file.url
|
||||||
|
fileitem.name = file.name
|
||||||
|
|
||||||
|
// txt 读取
|
||||||
|
if (fileitem.type == 'txt') {
|
||||||
|
loadFileTextContent(fileitem.url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// txt文件读取
|
||||||
|
const textContent = ref('')
|
||||||
|
const loadFileTextContent = async (url) => {
|
||||||
|
try {
|
||||||
|
const response = await fetch(url)
|
||||||
|
if (!response.ok) {
|
||||||
|
textContent.value = '文件读取失败,您可以点击上方链接跳到另外页面查看'
|
||||||
|
throw new Error('文件读取失败')
|
||||||
|
}
|
||||||
|
textContent.value = await response.text()
|
||||||
|
} catch (error) {
|
||||||
|
console.error('读取文件时出错:', error)
|
||||||
|
textContent.value = '文件读取失败,您可以点击上方链接跳到另外页面查看'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 接收父组件传过来的参数
|
||||||
|
const acceptParams = (params) => {
|
||||||
|
console.log(params)
|
||||||
|
fileReadopen.value = true;
|
||||||
|
teacherFeedContentList.value = params.teacherFeedContentList
|
||||||
|
teachImageList.value = params.teachImageList
|
||||||
|
teachFileList.value = params.teachFileList
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 初始化请求
|
||||||
|
// onMounted(() => {})
|
||||||
|
|
||||||
|
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||||
|
defineExpose({
|
||||||
|
acceptParams
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
|
||||||
|
.card-header{
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image_list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.file-read-dialog {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
/* margin-bottom: 20px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-circle {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: pink;
|
||||||
|
color: red;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-circle.active {
|
||||||
|
background-color: red;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header{
|
||||||
|
align-items: left;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -167,7 +167,7 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
|
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
|
||||||
import { processList } from '@/hooks/useProcessList'
|
import { processList } from '@/hooks/useProcessList'
|
||||||
import ItemDialogScore from '@/views/classTask/container/item-dialog-score.vue'
|
import ItemDialogScore from '@/views/classTask/container/classTask/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'
|
||||||
|
|
|
@ -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>
|
|
@ -222,25 +222,8 @@
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</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>
|
<prevReadMsgDialog ref="prevReadMsgDialogRef" :bookobj="props.bookobj"/>
|
||||||
<!-- <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>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -260,16 +243,16 @@ import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
|
||||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { processList } from '@/hooks/useProcessList'
|
import { processList } from '@/hooks/useProcessList'
|
||||||
import { getCurrentTime } from '@/utils/date'
|
import { getCurrentTime } from '@/utils/date'
|
||||||
import FlowChart from "@/components/Flowchart/index.vue";
|
|
||||||
import FileUpload from "@/components/FileUpload/index.vue";
|
import FileUpload from "@/components/FileUpload/index.vue";
|
||||||
import whiteboard from '@/components/whiteboard/whiteboard.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 { useToolState } from '@/store/modules/tool'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
const userStore = useUserStore().user
|
const userStore = useUserStore().user
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const toolStore = useToolState()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bookobj: {
|
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 classWorkFormRef = ref(null);
|
||||||
const entpCourseWorkTypeList = ref([
|
const entpCourseWorkTypeList = ref([
|
||||||
{value: 0, label: "不限"},
|
{value: 0, label: "不限"},
|
||||||
|
@ -372,12 +351,6 @@ const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常
|
||||||
|
|
||||||
// 课堂展示-------
|
// 课堂展示-------
|
||||||
const boardLoading = ref(false);
|
const boardLoading = ref(false);
|
||||||
const prevReadMsg = reactive({
|
|
||||||
visible: false,
|
|
||||||
type: ""
|
|
||||||
});// 预览msg
|
|
||||||
// 框架梳理----------
|
|
||||||
const flowData = ref({})// 框架梳理
|
|
||||||
//常规作业----------
|
//常规作业----------
|
||||||
const fileLoading = ref(false); // 常规作业loading
|
const fileLoading = ref(false); // 常规作业loading
|
||||||
|
|
||||||
|
@ -388,8 +361,6 @@ const changeFormType = (val) => {
|
||||||
classWorkForm.worktype = val;
|
classWorkForm.worktype = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(props.propsformobj)
|
|
||||||
console.log(classWorkForm,'==============zizujian===================')
|
|
||||||
/**
|
/**
|
||||||
* @desc: 根据查询参数查询试题
|
* @desc: 根据查询参数查询试题
|
||||||
* @return: {*}
|
* @return: {*}
|
||||||
|
@ -565,61 +536,7 @@ const handleClassWorkQuizAdd = (fromsrc, entpcourseworkid) => {
|
||||||
* 预览资源
|
* 预览资源
|
||||||
*/
|
*/
|
||||||
const prevRead = async (item) => {
|
const prevRead = async (item) => {
|
||||||
prevReadMsg.visible = true;
|
proxy.$refs.prevReadMsgDialogRef.openDialog(item);
|
||||||
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;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 添加到作业
|
* 添加到作业
|
||||||
|
@ -831,7 +748,10 @@ const handleClassWorkSave = async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 编辑作业内容
|
||||||
|
* @param cform 表单数据
|
||||||
|
*/
|
||||||
const editWork = async (cform) =>{
|
const editWork = async (cform) =>{
|
||||||
// 基础参数
|
// 基础参数
|
||||||
cform.id= classWorkForm.id;
|
cform.id= classWorkForm.id;
|
||||||
|
|
|
@ -152,7 +152,7 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
|
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
|
||||||
import { processList } from '@/hooks/useProcessList'
|
import { processList } from '@/hooks/useProcessList'
|
||||||
import ItemDialogScore from '@/views/classTask/container/item-dialog-score.vue'
|
import ItemDialogScore from '@/views/classTask/container/classTask/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'
|
||||||
|
|
Loading…
Reference in New Issue