Merge branch 'main' into zouyf_dev
This commit is contained in:
commit
92f23a35f9
|
@ -15,3 +15,5 @@ VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
|
|||
VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'
|
||||
|
||||
VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/'
|
||||
|
||||
VITE_SHOW_DEV_TOOLS = 'true'
|
||||
|
|
|
@ -17,3 +17,5 @@ VITE_BUILD_COMPRESS = gzip
|
|||
VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktxt/'
|
||||
|
||||
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
||||
|
||||
VITE_SHOW_DEV_TOOLS = 'true'
|
||||
|
|
|
@ -73,8 +73,7 @@ function createLoginWindow() {
|
|||
loginWindow.loadFile(join(__dirname, '../renderer/index.html'), { hash: 'login' })
|
||||
updateInit(loginWindow)
|
||||
}
|
||||
|
||||
loginWindow.webContents.openDevTools()
|
||||
if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') loginWindow.webContents.openDevTools()
|
||||
loginWindow.once('ready-to-show', () => {
|
||||
loginWindow.show()
|
||||
})
|
||||
|
@ -96,7 +95,6 @@ function createMainWindow() {
|
|||
frame: false, // 无边框
|
||||
autoHideMenuBar: true,
|
||||
maximizable: false,
|
||||
fullscreen: true,
|
||||
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
webPreferences: {
|
||||
|
@ -129,7 +127,7 @@ function createMainWindow() {
|
|||
shell.openExternal(details.url)
|
||||
return { action: 'deny' }
|
||||
})
|
||||
mainWindow.webContents.openDevTools()
|
||||
if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') mainWindow.webContents.openDevTools()
|
||||
|
||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
||||
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
||||
|
@ -139,6 +137,7 @@ function createMainWindow() {
|
|||
|
||||
// mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口
|
||||
// mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
||||
mainWindow.maximize();
|
||||
// 第三步: 开启remote服务
|
||||
remote.enable(mainWindow.webContents)
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -138,7 +138,7 @@ export const createWindow = async (type, data) => {
|
|||
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
|
||||
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
|
||||
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
||||
wins_tool.webContents.openDevTools() // 打开调试工具
|
||||
if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') wins_tool.webContents.openDevTools() // 打开调试工具
|
||||
eventHandles(type, wins_tool) // 事件监听处理
|
||||
return wins_tool
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ export const createWindow = async (type, data) => {
|
|||
win.type = type // 唯一标识
|
||||
win.show()
|
||||
win.setFullScreen(true) // 设置窗口为全屏
|
||||
win.webContents.openDevTools() // 打开调试工具
|
||||
if (import.meta.env.VITE_SHOW_DEV_TOOLS === 'true') win.webContents.openDevTools() // 打开调试工具
|
||||
eventHandles(type, win) // 事件监听处理
|
||||
winPdf=win
|
||||
break
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
:collapse="isCollapse"
|
||||
>
|
||||
<!--左侧 教材 目录-->
|
||||
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
|
||||
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
|
||||
<ChooseTextbook @change-book="getData" @node-click="getData" />
|
||||
</div>
|
||||
</el-menu>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<!-- 作业类型:内容 -->
|
||||
<div style="flex: 1;overflow: hidden;">
|
||||
<div style="flex: 1;overflow: hidden;">
|
||||
<el-table
|
||||
ref="taskTable"
|
||||
v-loading="loading"
|
||||
|
@ -140,7 +140,7 @@
|
|||
<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;">
|
||||
<div style="display: flex;align-items: center;flex: 1;justify-content: flex-end;">
|
||||
<el-button @click="prevRead(_item)">预览</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -188,7 +188,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<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>
|
||||
|
@ -220,7 +220,7 @@
|
|||
|
||||
<!-- 已推送历史 -->
|
||||
<el-dialog v-model="pushRecordsOpen" title="推送历史记录" width="80%" append-to-body>
|
||||
<div style="flex: 1;overflow: hidden; min-height: 400px;">
|
||||
<div style="flex: 1;overflow: hidden; min-height: 400px;">
|
||||
<el-table
|
||||
ref="pushRecordsRef"
|
||||
:data="pushRecordsList"
|
||||
|
@ -287,7 +287,7 @@
|
|||
<prevReadMsgDialog ref="prevReadMsgDialogRef" :bookobj="courseObj"/>
|
||||
<!-- 其他附件预览框 acceptParams-->
|
||||
<prevReadImgFileDialog ref="prevReadImgFileDialogRef"/>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -309,7 +309,7 @@ import SetHomework from '@/components/set-homework/index.vue'
|
|||
import {sessionStore} from '@/utils/store'
|
||||
import {createWindow} from '@/utils/tool'
|
||||
import { useToolState } from '@/store/modules/tool'
|
||||
import {throttle,debounce } from '@/utils/comm'
|
||||
import {throttle,debounce } from '@/utils/comm'
|
||||
|
||||
|
||||
const toolState = useToolState();
|
||||
|
@ -343,7 +343,7 @@ const courseObj = reactive({
|
|||
})
|
||||
|
||||
const taskList = ref([]); // 作业列表
|
||||
const loading = ref(false);
|
||||
const loading = ref(false);
|
||||
const pushRecordsList = ref([]); // 作业推送历史
|
||||
const pushRecordsOpen = ref(false); // 推送历史记录弹窗
|
||||
const pushRecordsLoading = ref(false); // 推送历史记录loading
|
||||
|
@ -415,7 +415,7 @@ const initHomeWork = async()=> {
|
|||
}
|
||||
/**
|
||||
* 查看推送历史
|
||||
*
|
||||
*
|
||||
*/
|
||||
const queryPushRecords = (row) => {
|
||||
// 获取已推送历史
|
||||
|
@ -438,7 +438,7 @@ const queryPushRecords = (row) => {
|
|||
// if (res.rows[i].worktype == '学习目标定位') {
|
||||
// res.rows[i].workclass = 'success';
|
||||
// res.rows[i].workcodesList = JSON.parse(res.rows[i].workcodes);
|
||||
// } else
|
||||
// } else
|
||||
// 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加
|
||||
if (res.rows[i].worktype == '课堂展示') {
|
||||
res.rows[i].workclass = 'primary';
|
||||
|
@ -477,12 +477,12 @@ const debounceOpenWin = debounce(() => {
|
|||
// 批改作业
|
||||
const onClickItem = (item) => {
|
||||
console.log('防抖开启弹窗')
|
||||
// sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||
// sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
|
||||
debounceOpenWin();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 删除按钮操作 TODO 待完善
|
||||
* */
|
||||
const handleDelete =() => {
|
||||
|
@ -620,8 +620,8 @@ const handleWorkTitleEdit = (row, index, type) => {
|
|||
};
|
||||
|
||||
/**
|
||||
* 作业内容-查看详情
|
||||
* */
|
||||
* 作业内容-查看详情
|
||||
* */
|
||||
const handleWorkEdit = (row, index) =>{
|
||||
console.log(row, index)
|
||||
workEdit.value = true
|
||||
|
@ -639,7 +639,7 @@ const handleWorkTitleEdit = (row, index, type) => {
|
|||
if ( res.data==null || res.data==undefined ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
res.data.worktype = '框架梳理';
|
||||
res.data.score = listCourseWork[0].score;
|
||||
|
||||
|
@ -708,7 +708,7 @@ const handleWorkTitleEdit = (row, index, type) => {
|
|||
};
|
||||
/**
|
||||
* 作业内容-前往作业设计 编辑页面
|
||||
* @param row
|
||||
* @param row
|
||||
*/
|
||||
const handleWorkEditItem = (row) => {
|
||||
editListItem(row, courseObj).then((obj) => {
|
||||
|
@ -780,11 +780,11 @@ const handleTaskAssignToAllClass = () => {
|
|||
*/
|
||||
const handleNewClassWorkDialog = () => {
|
||||
// 打开作业设计页面
|
||||
router.push({
|
||||
router.push({
|
||||
path: '/newClassTask',
|
||||
query: {
|
||||
isBack: true,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -880,18 +880,20 @@ watch(() => courseObj.node, (newVal,oldVal) => {
|
|||
|
||||
</script>
|
||||
|
||||
<!--
|
||||
<style>
|
||||
.el-table .hidden-row {
|
||||
display: none !important;
|
||||
/* color: #ccc !important; */
|
||||
}
|
||||
.el-table .father-row {
|
||||
--el-table-tr-bg-color: #fff;
|
||||
--el-table-tr-bg-color: #fff;
|
||||
}
|
||||
.el-table .son-row {
|
||||
--el-table-tr-bg-color: #f0f0f08a;
|
||||
--el-table-tr-bg-color: #f0f0f08a;
|
||||
}
|
||||
</style>
|
||||
-->
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-classTaskAssign {
|
||||
|
@ -935,4 +937,4 @@ watch(() => courseObj.node, (newVal,oldVal) => {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="common-layout" style="width: 100%; height: 73vh;">
|
||||
<div class="common-layout" style="width: 100%">
|
||||
<el-container>
|
||||
<el-container>
|
||||
<el-header style="height: auto">
|
||||
|
@ -7,7 +7,7 @@
|
|||
<el-card>
|
||||
<template #header>
|
||||
<div style="font-size: 20px;font-weight: bold">
|
||||
学情分布
|
||||
等级分布
|
||||
</div>
|
||||
</template>
|
||||
<Distribution></Distribution>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<el-card>
|
||||
<template #header>
|
||||
<div style="font-size: 20px;font-weight: bold">
|
||||
时长分析
|
||||
用时分析
|
||||
</div>
|
||||
</template>
|
||||
<TimeAnalyse></TimeAnalyse>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<el-card>
|
||||
<template #header>
|
||||
<div style="font-size: 20px;font-weight: bold">
|
||||
知识点概览
|
||||
价值透析
|
||||
</div>
|
||||
</template>
|
||||
<Konwledge></Konwledge>
|
||||
|
@ -43,12 +43,12 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import Distribution from '@/views/classTask/container/classOverview/distribution.vue'
|
||||
import Konwledge from '@/views/classTask/container/classOverview/knowledge.vue'
|
||||
import TimeAnalyse from '@/views/classTask/container/classOverview/timeAnalyse.vue'
|
||||
import {ref,watchEffect,provide } from 'vue'
|
||||
import Distribution from './classOverview/distribution.vue'
|
||||
import Konwledge from './classOverview/knowledge.vue'
|
||||
import TimeAnalyse from './classOverview/timeAnalyse.vue'
|
||||
import {defineProps,watch} from 'vue'
|
||||
import overviewStore from "@/store/modules/overview";
|
||||
// import {getBindlist} from "@/api/education/knowledgePoint";
|
||||
const useOverview = overviewStore()
|
||||
const props = defineProps({
|
||||
tableList: {
|
||||
|
@ -57,12 +57,185 @@ const props = defineProps({
|
|||
return []
|
||||
}
|
||||
},
|
||||
// evalId:{
|
||||
// type: Number,
|
||||
// default: 0
|
||||
// }
|
||||
evalId:{
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
activeData: { // 数据
|
||||
type: Object,
|
||||
// required: true, // 必传
|
||||
default: () => ({
|
||||
quizlist: [], // 当前习题列表
|
||||
studentList: [], // 当前课程-所有学生
|
||||
workFeedList: [] // 当前课程-所有学生反馈数据
|
||||
})
|
||||
},
|
||||
})
|
||||
let studentList = ref([]) // 学生数据
|
||||
const stuHasAnswers = ref([]) // 已经答过题的学生不管对错
|
||||
|
||||
// 初始-数据处理
|
||||
const initData = () => {
|
||||
console.log('xxx', props)
|
||||
// window.test = activeCourse
|
||||
studentList.value = props.activeData.studentList || []
|
||||
const activeWorkFeedList = props.activeData.workFeedList || []
|
||||
const quizlist = props.activeData.quizlist || []
|
||||
// 习题特殊处理
|
||||
let data = quizlist.map(o => {
|
||||
// 解析题选项
|
||||
const workdesc = o.workdesc || ''
|
||||
let accSum = 0 // 该题总人数
|
||||
let activeIds = [] // 已做答学生
|
||||
let rightIds = [] // 正确学生
|
||||
let hasAnswers= [] // 答过题的学生
|
||||
let timeAnalyse = [] // 平均时长和编号
|
||||
const quizFeedList = activeWorkFeedList.filter(f => f.entpcourseworkid == o.id) // 做该题的列表
|
||||
let children = []
|
||||
const allStudents = [];
|
||||
if (o.worktype == '单选题') { // '单选题','多选题'
|
||||
const list = workdesc.includes('#&') ? workdesc.split('#&') : isJson(workdesc)?JSON.parse(workdesc):[];
|
||||
children = list.map((v,i) => {
|
||||
const code = toCode(i) // 转换 A-Z
|
||||
const isOk = (isJson(workdesc)?JSON.parse(o.workanswer):o.workanswer||'').includes(i+'') // 是否(包含)正确答案
|
||||
// 改选项的学生id
|
||||
const studentIds = quizFeedList.filter(f => f.feedcontent==v&&f.finishtimelength!='0').map(f => f.studentid)||[];
|
||||
accSum += studentIds.length;
|
||||
if (isOk) {
|
||||
activeIds.push(...studentIds)
|
||||
}
|
||||
hasAnswers.push(...studentIds)
|
||||
return { def: v, code, isOk, studentIds }
|
||||
})
|
||||
}
|
||||
else if (o.worktype == '多选题') {
|
||||
// 多选题的正确率单独处理
|
||||
rightIds = quizFeedList.filter(f => {
|
||||
const workanswer = (isJson(o.workanswer)) ? JSON.parse(o.workanswer) : o.workanswer || [];
|
||||
const res = isSame((f.feedcontent||'').split(','), workanswer);
|
||||
return f.entpcourseworkid == o.id && f.finishtimelength!='0' && res;
|
||||
});
|
||||
|
||||
const list = workdesc.includes('#&') ? workdesc.split('#&') : isJson(workdesc)?JSON.parse(workdesc):[];
|
||||
children = list.map((v,i) => {
|
||||
const isOne = o.worktype == '单选题'
|
||||
const code = toCode(i) // 转换 A-Z
|
||||
// const isOk = isOne ? i == o.workanswer : o.workanswer.includes(i) // 是否(包含)正确答案
|
||||
const isOk = (isJson(workdesc)?JSON.parse(o.workanswer):o.workanswer||'').includes(i+'') // 是否(包含)正确答案
|
||||
// 改选项的学生id
|
||||
const studentIds = quizFeedList.filter(f => f.feedcontent.includes(i)&&f.finishtimelength!='0').map(f => f.studentid)||[];
|
||||
accSum += studentIds.length;
|
||||
if (studentIds.length>0) {
|
||||
allStudents.push(...studentIds);
|
||||
}
|
||||
if(isOk) {
|
||||
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
||||
}
|
||||
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
||||
return { def: v, code, isOk, studentIds }
|
||||
})
|
||||
}
|
||||
else if (o.worktype == '填空题') { // 填空题
|
||||
const regex = /<!--BA-->(.*?)<!--EA-->/g // 定义正则表达式,匹配 <!--BA-->xxx<!--EA--> 格式的内容
|
||||
children = (o.title||'').match(regex).map((v,i) => {
|
||||
const def = `填空项 ${i+1}`
|
||||
//const code = '( )'
|
||||
const code = '(略)', txt=v
|
||||
// 改选项的学生id
|
||||
const studentIds = quizFeedList.filter(f => !!(f.feedcontent||'').replace(/#$/,'').split('#')[i] && f.finishtimelength!='0').map(f => f.studentid)||[]
|
||||
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
||||
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
||||
accSum = activeIds.length
|
||||
return { def, code, txt, isOk:true, studentIds }
|
||||
})
|
||||
} else if (o.worktype == '判断题') { // 判断题
|
||||
const list = ['正确', '错误'];
|
||||
children = list.map((v,i) => {
|
||||
const workanswer = o.workanswer
|
||||
.replace('×', '0')
|
||||
.replace('√', '1')
|
||||
.replace('错误', '0')
|
||||
.replace('正确', '1')
|
||||
.replace('正确。', '1')
|
||||
.replace('F', '0')
|
||||
.replace('T', '1')
|
||||
.replace('错', '0')
|
||||
.replace('对', '1');
|
||||
const workanswerFormat = isJson(workanswer) ? JSON.parse(workanswer) : workanswer||''
|
||||
const code = v=='正确' ? '1' : '0'
|
||||
let isOk = (workanswerFormat).includes(code)
|
||||
// warn: 看是否需要转为回答正常的显示, 当前为学生实际回答字面的正确和错误
|
||||
// if (workanswerFormat == '0') {
|
||||
// isOk = !isOk;
|
||||
// }
|
||||
// 改选项的学生id
|
||||
const studentIds = quizFeedList.filter(f => {
|
||||
const feedcontent = f.feedcontent
|
||||
.replace('×', '0')
|
||||
.replace('√', '1')
|
||||
.replace('错误', '0')
|
||||
.replace('正确', '1')
|
||||
.replace('正确。', '1')
|
||||
.replace('F', '0')
|
||||
.replace('T', '1')
|
||||
.replace('错', '0')
|
||||
.replace('对', '1');
|
||||
if(feedcontent == code&&f.finishtimelength!='0'){
|
||||
return f
|
||||
}
|
||||
}).map(f => f.studentid)||[];
|
||||
accSum += studentIds.length;
|
||||
if(isOk) activeIds.push(...studentIds)
|
||||
hasAnswers.push(...studentIds)
|
||||
return { def: v, code: v, isOk, studentIds }
|
||||
})
|
||||
} else { // 论述题
|
||||
// code = '( )'
|
||||
const code = '(略)', def = '解答内容'
|
||||
const studentIds = quizFeedList.filter(f => !!(f.feedcontent||'').replace(/#$/,'')&&f.finishtimelength!='0').map(f => f.studentid)||[]
|
||||
activeIds=[...new Set(activeIds.concat(studentIds))] // 多选去重
|
||||
hasAnswers=[...new Set(hasAnswers.concat(studentIds))]
|
||||
accSum = activeIds.length
|
||||
children = [{ def, code, isOk:true, studentIds }]
|
||||
}
|
||||
|
||||
const studentSum = studentList.value.length || 0 // 当前推送答题人数
|
||||
let points = percent((activeIds.length / (studentSum||1)).toFixed(2)) // 计算得分率
|
||||
let rightSum = activeIds.length; // 回答正确人数
|
||||
|
||||
// 多选题单独处理
|
||||
if (o.worktype == '多选题') {
|
||||
// 单独重新处理人数问题
|
||||
const uniqueTmpStuents = [...new Set(allStudents)];
|
||||
accSum = uniqueTmpStuents.length;
|
||||
// 单独处理得分率
|
||||
points = percent((rightIds.length / (studentSum||1)).toFixed(2)) // 计算得分率
|
||||
// 回答正确人数
|
||||
rightSum = rightIds.length;
|
||||
}
|
||||
|
||||
// def: 原始题数据 type 类型 active: 选中 points: 得分率, accSum 题解答人数
|
||||
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers }
|
||||
})
|
||||
console.log('获取数据: ', data)
|
||||
stuHasAnswers.value = [...data[0].hasAnswers]
|
||||
provide('hasAnswer', stuHasAnswers.value)
|
||||
}
|
||||
// 百分比现在 0-100
|
||||
const percent = v => v > 1 ? 1 : v < 0 ? 0 : Math.round(v * 100)
|
||||
// Unicode 转 字符 差值65
|
||||
const toCode = (v, b) => b ? v.charCodeAt() - 65 : String.fromCharCode(v + 65)
|
||||
// 判断是否为json字符串
|
||||
const isJson = str => {if(typeof str == 'string'){
|
||||
try {
|
||||
const res = JSON.parse(str)
|
||||
if(typeof res == 'object' && res) return true
|
||||
} catch (error) {}}return false
|
||||
}
|
||||
|
||||
watch(() => props.tableList,() => {
|
||||
useOverview.getTableList(props.tableList)
|
||||
},{deep:true})
|
||||
// === 监听器 ===
|
||||
watchEffect(() => { initData() })
|
||||
</script>
|
||||
|
|
|
@ -1,32 +1,40 @@
|
|||
<template>
|
||||
<div className="chart-container">
|
||||
<div ref="chartRef" className="chart"></div>
|
||||
<div class="chart-container">
|
||||
<div ref="chartRef" class="chart"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref,nextTick,watch} from 'vue';
|
||||
import { ref, nextTick, watch, inject,watchEffect } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
import overviewStore from '@/store/modules/overview'
|
||||
const useOverview = overviewStore()
|
||||
import overviewStore from '@/store/modules/overview';
|
||||
const useOverview = overviewStore();
|
||||
|
||||
// 获取图表容器的引用
|
||||
const chartRef = ref(null);
|
||||
|
||||
// 数据源
|
||||
const dataList = ref([
|
||||
{name: '完美', value: 0,rating:1,max:100,min:100,},
|
||||
{name: '优秀', value: 0,rating:2,max:99,min:80,},
|
||||
{name: '良好', value: 0,rating:3,max:79,min:70,},
|
||||
{name: '及格', value: 0,rating:4,max:69,min:60,},
|
||||
{name: '不及格', value: 0,rating:5,max:59,min:0,},
|
||||
{ name: '完美', value: 0, rating: 1, max: 100, min: 100 },
|
||||
{ name: '优秀', value: 0, rating: 2, max: 99, min: 80 },
|
||||
{ name: '良好', value: 0, rating: 3, max: 79, min: 70 },
|
||||
{ name: '及格', value: 0, rating: 4, max: 69, min: 60 },
|
||||
{ name: '不及格', value: 0, rating: 5, max: 59, min: 0 },
|
||||
]);
|
||||
// 答过题的学生才进行统计
|
||||
const hasAnswersData = ref([]);
|
||||
const hasStudents = ref([])
|
||||
|
||||
// 根据数据生成不同的颜色
|
||||
function getColor(index) {
|
||||
// 这里可以根据值生成不同的颜色
|
||||
const colors = ['#d14a61','#675bba', '#e89110','#008c8c','#5793f3'];
|
||||
return colors[index];
|
||||
function getColor(name) {
|
||||
const colorMap = {
|
||||
'完美': '#d14a61',
|
||||
'优秀': '#675bba',
|
||||
'良好': '#e89110',
|
||||
'及格': '#008c8c',
|
||||
'不及格': '#5793f3'
|
||||
};
|
||||
return colorMap[name];
|
||||
}
|
||||
|
||||
// 初始化图表
|
||||
|
@ -34,75 +42,81 @@ function initChart() {
|
|||
const myChart = echarts.init(chartRef.value);
|
||||
const total = dataList.value.reduce((acc, cur) => acc + cur.value, 0); // 计算总数
|
||||
|
||||
// 过滤掉值为0的数据项
|
||||
const filteredData = dataList.value.filter(item => item.value > 0);
|
||||
|
||||
const options = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
trigger: 'item',
|
||||
formatter: params => {
|
||||
const value = params.value;
|
||||
const percentage = value ? ((value / total) * 100).toFixed(2) : 0; // 计算百分比并保留两位小数
|
||||
return `${params.name}: ${value}人 (${percentage}%)`; // 显示为百分比形式
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: dataList.value.map(item => item.name),
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
name: '数据',
|
||||
type: 'bar',
|
||||
barWidth: '30%',
|
||||
data: dataList.value.map(item => item.value),
|
||||
itemStyle: {
|
||||
color: function (params) {
|
||||
// 确保这里返回正确的颜色
|
||||
return getColor(params.dataIndex);
|
||||
type: 'pie',
|
||||
radius: '50%', // 设置饼图的半径为实心
|
||||
data: filteredData.map(item => ({
|
||||
name: item.name,
|
||||
value: item.value,
|
||||
itemStyle: {
|
||||
color: getColor(item.name)
|
||||
}
|
||||
},
|
||||
// 显示柱子顶部的值
|
||||
})),
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
position: 'inside', // 将标签显示在饼图内部
|
||||
formatter: params => {
|
||||
const value = dataList.value[params.dataIndex].value;
|
||||
const percentage = value ? ((value / total) * 100).toFixed() : 0; // 计算百分比并保留两位小数
|
||||
return `${value}人 ${percentage}%`; // 显示为百分比形式
|
||||
const value = params.value;
|
||||
const percentage = value ? ((value / total) * 100).toFixed(2) : 0; // 计算百分比并保留两位小数
|
||||
return `${params.name}\n${value}人 (${percentage}%)`; // 显示为百分比形式,换行显示
|
||||
},
|
||||
color: '#333',
|
||||
fontSize: 12
|
||||
},
|
||||
labelLine: {
|
||||
show: false // 不显示标签线
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
myChart.setOption(options);
|
||||
}
|
||||
|
||||
// 获取表的数据
|
||||
const showEcharts =() => {
|
||||
useOverview.tableList.forEach((item,index) => {
|
||||
if(item.rating === 0) return // 没批改不计数
|
||||
dataList.value.forEach((item1,index1) => {
|
||||
if(item1.min <= Number(item.scoingRate) && Number(item.scoingRate) <= item1.max ){
|
||||
item1.value ++
|
||||
}
|
||||
})
|
||||
})
|
||||
const showEcharts = () => {
|
||||
hasStudents.value.forEach((item, index) => {
|
||||
if (item.rating === 0) {
|
||||
dataList.value.forEach((item1, index1) => {
|
||||
if (item1.min <= Number(item.scoingRate) && Number(item.scoingRate) <= item1.max) {
|
||||
item1.value++;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
dataList.value.forEach((item1, index1) => {
|
||||
if (item1.rating === item.rating) {
|
||||
item1.value++;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
watch(() => useOverview.tableList,() => {
|
||||
showEcharts()
|
||||
//执行
|
||||
watch(() => useOverview.tableList, () => {
|
||||
hasStudents.value = useOverview.tableList.filter(item => hasAnswersData.value.includes(item.studentid)).map(item => item);
|
||||
showEcharts();
|
||||
nextTick(() => {
|
||||
initChart();
|
||||
})
|
||||
})
|
||||
|
||||
});
|
||||
},{deep: true})
|
||||
//监听
|
||||
watchEffect(() => {
|
||||
const stus = inject('hasAnswer');
|
||||
if (!stus) return;
|
||||
hasAnswersData.value = [...stus]
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -115,4 +129,4 @@ watch(() => useOverview.tableList,() => {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
|
@ -16,11 +16,14 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {nextTick, ref, watch} from 'vue'
|
||||
import {nextTick, ref, watch,inject,watchEffect} from 'vue'
|
||||
import overviewStore from '@/store/modules/overview'
|
||||
|
||||
const useOverview = overviewStore()
|
||||
const tabPosition = ref('left')
|
||||
//答过题的学生才进行统计
|
||||
const hasAnswersData = ref([])
|
||||
const hasStudents = ref([])
|
||||
const leftList = ref([
|
||||
{
|
||||
label:'完美',
|
||||
|
@ -65,17 +68,27 @@ const handelChange = (item) => {
|
|||
}
|
||||
//取区域的学生
|
||||
const showStudents = (index) => {
|
||||
leftList.value[index].stuList = useOverview.tableList.filter(item => {
|
||||
if(item.rating > 0){
|
||||
leftList.value[index].stuList = hasStudents.value.filter(item => {
|
||||
if(item.rating === 0){
|
||||
if(leftList.value[index].min <= Number(item.scoingRate || 0) && Number(item.scoingRate || 0) <= leftList.value[index].max ){
|
||||
return item
|
||||
}
|
||||
}else{
|
||||
if(item.rating == leftList.value[index].rating){
|
||||
return item
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
watch(() => useOverview.tableList,() => {
|
||||
watch(() => useOverview.tableList, () => {
|
||||
hasStudents.value = useOverview.tableList.filter(item => hasAnswersData.value.includes(item.studentid)).map(item => item);
|
||||
showStudents(0)
|
||||
})
|
||||
},{deep: true})
|
||||
watchEffect(() => {
|
||||
const stus = inject('hasAnswer')
|
||||
if(!stus) return
|
||||
hasAnswersData.value = [...stus]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
@ -318,6 +318,7 @@
|
|||
<div
|
||||
v-for="(score, index) in teacherRatingList"
|
||||
:key="index"
|
||||
style="white-space: nowrap;"
|
||||
:class="[
|
||||
'score-circle',
|
||||
{ active: classWorkFormScore.rating == score.ratingKey }
|
||||
|
@ -501,11 +502,11 @@ const classWorkFormScore = reactive({
|
|||
teacherremark: '' //评分说明
|
||||
})
|
||||
const teacherRatingList = ref([
|
||||
{ ratingKey: '1', ratingValue: '优' },
|
||||
{ ratingKey: '2', ratingValue: '优-' },
|
||||
{ ratingKey: '3', ratingValue: '良' },
|
||||
{ ratingKey: '4', ratingValue: '良-' },
|
||||
{ ratingKey: '5', ratingValue: '差' }
|
||||
{ ratingKey: '1', ratingValue: '完美' },
|
||||
{ ratingKey: '2', ratingValue: '优秀' },
|
||||
{ ratingKey: '3', ratingValue: '良好' },
|
||||
{ ratingKey: '4', ratingValue: '及格' },
|
||||
{ ratingKey: '5', ratingValue: '不及格' }
|
||||
])
|
||||
// 确定的线上图片数据
|
||||
//#region 文件内容相关
|
||||
|
|
|
@ -94,19 +94,19 @@
|
|||
</template>
|
||||
<!-- 1-优 2-优减 3-良 4-良减 5-差 -->
|
||||
<template v-if="scope.row.teacherRating == 1"
|
||||
><el-tag type="danger">优</el-tag></template
|
||||
><el-tag type="danger">完美</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 2"
|
||||
><el-tag type="danger">优-</el-tag></template
|
||||
><el-tag type="danger">优秀</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 3"
|
||||
><el-tag type="warning">良</el-tag></template
|
||||
><el-tag type="warning">良好</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 4"
|
||||
><el-tag type="info">良-</el-tag></template
|
||||
><el-tag type="info">及格</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 5"
|
||||
><el-tag type="info">差</el-tag></template
|
||||
><el-tag type="info">不及格</el-tag></template
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -656,8 +656,6 @@ defineExpose({
|
|||
})
|
||||
</script>
|
||||
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/*:deep(.reserv-date-pick) {
|
||||
width: 140px;
|
||||
|
@ -765,3 +763,4 @@ defineExpose({
|
|||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<whiteboard ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="classWorkForm.whiteboardObj"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="el-form-work-list">
|
||||
<div v-else class="el-form-work-list">
|
||||
<el-form-item label="作业资源:" class="el-form-work-list">
|
||||
<!-- 左侧作业资源 -->
|
||||
<el-col :span="15" class="work-left">
|
||||
|
@ -54,7 +54,7 @@
|
|||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="知识点" label-width="70">
|
||||
<el-cascader
|
||||
<el-cascader
|
||||
v-model="entpCourseWorkQueryParams.point"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
|
@ -80,8 +80,8 @@
|
|||
<el-col :span="15">
|
||||
<el-form-item label="关键词" label-width="70">
|
||||
<el-input
|
||||
v-model="entpCourseWorkQueryParams.keyWord"
|
||||
style="width: 70%" type="text"
|
||||
v-model="entpCourseWorkQueryParams.keyWord"
|
||||
style="width: 70%" type="text"
|
||||
placeholder="请输入关键词"
|
||||
/>
|
||||
<el-button @click="handleQueryParamFromEntpCourseWork(1)"><el-icon><Search /></el-icon> 查找</el-button>
|
||||
|
@ -89,7 +89,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<!-- 习题表格 -->
|
||||
<div class="middle" >
|
||||
<div class="middle" >
|
||||
<el-table :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column align="left" >
|
||||
|
@ -119,10 +119,10 @@
|
|||
<!-- 分页 这里不用-->
|
||||
<!-- <div style="height: 55px;">
|
||||
<pagination
|
||||
v-show="entpCourseWorkTotal > 0"
|
||||
v-model:page="paginationParams.pageNum"
|
||||
v-show="entpCourseWorkTotal > 0"
|
||||
v-model:page="paginationParams.pageNum"
|
||||
v-model:limit="paginationParams.pageSize"
|
||||
:total="entpCourseWorkTotal"
|
||||
:total="entpCourseWorkTotal"
|
||||
:style="{ position: 'relative', 'margin-top': '5px' }"
|
||||
@pagination="getPaginationList" />
|
||||
</div> -->
|
||||
|
@ -189,7 +189,7 @@
|
|||
<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;">
|
||||
<div style="display: flex;align-items: center;flex: 1;justify-content: flex-end;">
|
||||
<el-button @click="prevRead(item)">预览</el-button>
|
||||
<el-button type="danger" @click="deleteClassWorkAddOfResource(item)">删除</el-button>
|
||||
</div>
|
||||
|
@ -364,7 +364,7 @@ const fileLoading = ref(false); // 常规作业loading
|
|||
* 作业类型切换
|
||||
*/
|
||||
const changeFormType = (val) => {
|
||||
classWorkForm.worktype = val;
|
||||
classWorkForm.worktype = val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -373,7 +373,7 @@ const changeFormType = (val) => {
|
|||
* @param {*} queryType
|
||||
* 1 - 按条件查询
|
||||
* 2 - 按关键词查询
|
||||
*/
|
||||
*/
|
||||
const handleQueryParamFromEntpCourseWork = (queryType) => {
|
||||
// 确保更改了搜索参数后从第一页开始查询
|
||||
// this.paginationParams = {pageNum: 1,pageSize: 10}; 分页这里展示弃用了
|
||||
|
@ -412,7 +412,7 @@ const handleQueryFromEntpCourseWork= (queryType) => {
|
|||
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 分页参数
|
||||
// pageNum: paginationParams.pageNum,
|
||||
// pageSize: paginationParams.pageSize,
|
||||
|
@ -422,7 +422,7 @@ const handleQueryFromEntpCourseWork= (queryType) => {
|
|||
// // [初中+政治]需改为[初中+道德与法治]
|
||||
// queryForm.edusubject = '道德与法治';
|
||||
// }
|
||||
|
||||
|
||||
listEntpcourseworkNew(queryForm).then(entpcourseworkres => {
|
||||
// if (queryType == 1 && this.entpCourseWorkQueryParams.worktype == '主观题') {
|
||||
// // 因菁优网题型因学科而不固定, 故非常规题重定义定为【主观题】
|
||||
|
@ -433,7 +433,7 @@ const handleQueryFromEntpCourseWork= (queryType) => {
|
|||
// } else {
|
||||
// workResource.entpCourseWorkList = entpcourseworkres.rows;
|
||||
// }
|
||||
|
||||
|
||||
if(entpcourseworkres.data&&entpcourseworkres.data.length>0){
|
||||
workResource.entpCourseWorkList = entpcourseworkres.data;
|
||||
workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
|
||||
|
@ -511,7 +511,7 @@ const getEntpCourseWorkPointList = () => {
|
|||
/**
|
||||
* 添加资源
|
||||
* @param fromsrc - 试题来源
|
||||
* @param entpcourseworkid
|
||||
* @param entpcourseworkid
|
||||
*/
|
||||
const handleClassWorkQuizAdd = (fromsrc, entpcourseworkid) => {
|
||||
var exist = false;
|
||||
|
@ -610,11 +610,11 @@ const handleClassWorkSave = async () => {
|
|||
uniquekey: classWorkForm.uniquekey,// 作业名称、编码
|
||||
classid: 0,
|
||||
classcourseid: 0,
|
||||
entpcourseid: chapterId, // 这个字段很特别
|
||||
entpcourseid: chapterId, // 这个字段很特别
|
||||
slideid: 0,
|
||||
title: classWorkForm.title, // 作业说明?
|
||||
workcodes: JSON.stringify(classWorkForm.workcodes), // 作业内容?
|
||||
edusubject: userStore.edusubject, // 学科 语文 数学
|
||||
edusubject: userStore.edusubject, // 学科 语文 数学
|
||||
evalid: props.bookobj.levelSecondId, //userStore.evalid, // // 单元下的课ID
|
||||
edustage: userStore.edustage, // 学段 年纪 高中,初中,小学
|
||||
status: '10', //2024-09-11 作业布置分离后的 新模版数据; 之前老版本为空
|
||||
|
@ -630,17 +630,17 @@ const handleClassWorkSave = async () => {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (classWorkForm.worktype === "课堂展示") {
|
||||
boardLoading.value = true
|
||||
let canvasJson = proxy.$refs.boardref.getCanvasJson()
|
||||
let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64()
|
||||
// 课堂展示提交内容
|
||||
cform.worktag = classWorkForm.question;
|
||||
cform.title = classWorkForm.title;
|
||||
cform.worktag = classWorkForm.question;
|
||||
cform.title = classWorkForm.title;
|
||||
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
|
||||
cform.entpcourseworklist = JSON.stringify([{'id':-1, 'score': '10'}]);
|
||||
try {
|
||||
|
@ -656,13 +656,13 @@ const handleClassWorkSave = async () => {
|
|||
// 情况选择的资源缓存
|
||||
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||
|
||||
|
||||
boardLoading.value = false
|
||||
})
|
||||
} finally {
|
||||
boardLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(classWorkForm.worktype === "常规作业"){
|
||||
fileLoading.value = true
|
||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||
|
@ -710,7 +710,7 @@ const handleClassWorkSave = async () => {
|
|||
}
|
||||
console.log(cform,'提交的数据');
|
||||
if(cform.entpcourseworklist == '') return ElMessage({ type: 'warning', message: '请先添加作业资源!'});
|
||||
|
||||
|
||||
addClassworkReturnId(cform).then(workres => {
|
||||
ElMessage({ type: 'success', message: '作业设计成功!'});
|
||||
// 重置提交表单
|
||||
|
@ -728,7 +728,7 @@ const handleClassWorkSave = async () => {
|
|||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if(props.isback){
|
||||
// 其他页面进入的 返回上一页
|
||||
router.back();
|
||||
|
@ -767,20 +767,20 @@ const editWork = async (cform) =>{
|
|||
|
||||
// 根据作业类型分类处理
|
||||
if (classWorkForm.worktype=='习题训练'){
|
||||
|
||||
|
||||
// 1.判断当前添加的作业是否与原来不同(跟父组件传来的值对比)
|
||||
let needUplEval = false;
|
||||
if (classWorkForm.quizlist.length != props.propsformobj.quizlist.length) {
|
||||
needUplEval = true;
|
||||
}else {
|
||||
// 只要有一个不一致则说明需要更新
|
||||
needUplEval = classWorkForm.quizlist.some(cur =>
|
||||
!props.propsformobj.quizlist.some(last =>
|
||||
needUplEval = classWorkForm.quizlist.some(cur =>
|
||||
!props.propsformobj.quizlist.some(last =>
|
||||
last.id === cur.id && last.score === cur.score
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// 2.需要重新更新eval的数据
|
||||
if (needUplEval) {
|
||||
// 说明: 因试题分值也需修改, 故无法通过按钮的增长删除来处理, 故将原作业全部删除后再重新添加
|
||||
|
@ -791,7 +791,7 @@ const editWork = async (cform) =>{
|
|||
arrEvalids.push(element.id);
|
||||
});
|
||||
const ids = arrEvalids.join(',');
|
||||
|
||||
|
||||
// 2.2.删除原作业
|
||||
const delRes = await delClassworkeval(ids);
|
||||
|
||||
|
@ -822,8 +822,8 @@ const editWork = async (cform) =>{
|
|||
needUplEval = true;
|
||||
}else {
|
||||
// 只要有一个不一致则说明需要更新
|
||||
needUplEval = classWorkForm.chooseWorkLists.some(cur =>
|
||||
!props.propsformobj.chooseWorkLists.some(last =>
|
||||
needUplEval = classWorkForm.chooseWorkLists.some(cur =>
|
||||
!props.propsformobj.chooseWorkLists.some(last =>
|
||||
last.id === cur.id && last.score === cur.score
|
||||
)
|
||||
);
|
||||
|
@ -888,15 +888,15 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
|
|||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.top, .bottom {
|
||||
flex: 0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.middle {
|
||||
flex: 1;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -923,8 +923,8 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
|
|||
|
||||
.work-right {
|
||||
height: 100%;
|
||||
padding: 0 0 0 5px;
|
||||
overflow: auto;
|
||||
padding: 0 0 0 5px;
|
||||
overflow: auto;
|
||||
line-height: 26px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -935,19 +935,19 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: 5px;
|
||||
|
||||
.choose-work-title{
|
||||
font-size: 1.2em;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
margin-right: 5px
|
||||
}
|
||||
|
||||
.choose-work-content{
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
:deep(.el-form-item__label){
|
||||
width: 50px !important;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
:collapse="isCollapse"
|
||||
>
|
||||
<!--左侧 教材 目录-->
|
||||
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
|
||||
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
|
||||
<ChooseTextbook @change-book="getData" @node-click="getData" />
|
||||
</div>
|
||||
</el-menu>
|
||||
|
|
|
@ -84,19 +84,19 @@
|
|||
</template>
|
||||
<!-- 1-优 2-优减 3-良 4-良减 5-差 -->
|
||||
<template v-if="scope.row.teacherRating == 1"
|
||||
><el-tag type="danger">优</el-tag></template
|
||||
><el-tag type="danger">完美</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 2"
|
||||
><el-tag type="danger">优-</el-tag></template
|
||||
><el-tag type="danger">优秀</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 3"
|
||||
><el-tag type="warning">良</el-tag></template
|
||||
><el-tag type="warning">良好</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 4"
|
||||
><el-tag type="info">良-</el-tag></template
|
||||
><el-tag type="info">及格</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 5"
|
||||
><el-tag type="info">差</el-tag></template
|
||||
><el-tag type="info">不及格</el-tag></template
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -139,7 +139,7 @@
|
|||
<!-- 训练报告-->
|
||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="width: 100%;overflow-y: scroll">
|
||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||
<ClassOverview :table-list="overviewData" style="width: 100%;"></ClassOverview>
|
||||
<ClassOverview :active-data="classWorkActiveData" :table-list="overviewData" style="width: 100%;"></ClassOverview>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -633,7 +633,7 @@ const closeDialog = () => {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
|
||||
// const data = sessionStore.get('teachClassWorkItem');
|
||||
// const data = localStorage.getItem('teachClassWorkItem');
|
||||
|
@ -658,8 +658,6 @@ onUnmounted(() => {
|
|||
// })
|
||||
</script>
|
||||
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.teachClassTask{
|
||||
height: 100%;
|
||||
|
@ -705,94 +703,6 @@ onUnmounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// .clwk_dialog {
|
||||
|
||||
// }
|
||||
|
||||
// .clwk_dialog {
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// overflow: hidden;
|
||||
// }
|
||||
// .clwk_dialog .el-dialog {
|
||||
// margin: 0 auto !important;
|
||||
// height: 85%!important;
|
||||
// overflow: hidden;
|
||||
// }
|
||||
// .clwk_dialog .el-dialog__header {
|
||||
// /* position: absolute;
|
||||
// top: 0;
|
||||
// left: 0; */
|
||||
// width: 100%!important;
|
||||
// }
|
||||
// .clwk_dialog .el-dialog__body {
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// top: 15px;
|
||||
// bottom: 1px;
|
||||
// right:0;
|
||||
// padding:5px;
|
||||
// z-index:1;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// overflow: hidden;
|
||||
// /* overflow:hidden;
|
||||
// overflow-y: auto; */
|
||||
// }
|
||||
// .clwk_dialog .el-dialog__footer{
|
||||
// position: absolute;
|
||||
// bottom: 10px;
|
||||
// right: 10px;
|
||||
// }
|
||||
// .clwk_dialog .classwork-score{
|
||||
// overflow-y: auto;
|
||||
// }
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
/* .clwk_dialog {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.clwk_dialog .el-dialog {
|
||||
margin: 0 auto !important;
|
||||
height: 85%!important;
|
||||
overflow: hidden;
|
||||
}
|
||||
.clwk_dialog .el-dialog__header {
|
||||
/* position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%!important;
|
||||
}
|
||||
.clwk_dialog .el-dialog__body {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 15px;
|
||||
bottom: 1px;
|
||||
right:0;
|
||||
padding:5px;
|
||||
z-index:1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
/* overflow:hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.clwk_dialog .el-dialog__footer{
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
.clwk_dialog .classwork-score{
|
||||
overflow-y: auto;
|
||||
} */
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</template>
|
||||
</el-popover>
|
||||
<div style="margin-top: 7px"> <el-icon><ArrowRight /></el-icon> </div>
|
||||
|
||||
|
||||
<el-popover disabled placement="top-start" title="考点分析" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习">
|
||||
<template #reference>
|
||||
<el-button-group>
|
||||
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
</el-popover>
|
||||
<div style="margin-top: 7px"> <el-icon><ArrowRight /></el-icon> </div>
|
||||
|
||||
|
||||
<el-popover disabled placement="top-start" title="模拟命题" trigger="hover" content="勾画、圈点,添加标记等,整理出本课的重点与难点,用于老师讲解和学生自主预习">
|
||||
<template #reference>
|
||||
<el-button-group>
|
||||
|
@ -51,15 +51,15 @@
|
|||
<examReview
|
||||
:loading="loading"
|
||||
:listExamQuestion="listExamQuestion"
|
||||
v-if="curTask.viewkey=='真题回顾' "
|
||||
v-if="curTask.viewkey=='真题回顾' "
|
||||
/>
|
||||
|
||||
<pointAnalysis
|
||||
v-else-if="curTask.viewkey=='考点分析' "
|
||||
<pointAnalysis
|
||||
v-else-if="curTask.viewkey=='考点分析' "
|
||||
/>
|
||||
|
||||
<examMocks
|
||||
v-else
|
||||
<examMocks
|
||||
v-else
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -88,9 +88,9 @@ const sourceStore = useResoureStore();
|
|||
const viewportHeight = ref(0);
|
||||
const viewportWidth = ref(0);
|
||||
// 当前选中的章节或单元
|
||||
const curNode = ref({});
|
||||
// 试题集合
|
||||
const listExamQuestion = ref([]);
|
||||
const curNode = ref({});
|
||||
// 试题集合
|
||||
const listExamQuestion = ref([]);
|
||||
const loading = ref(false);
|
||||
const curTask = reactive({
|
||||
viewkey: '真题回顾',
|
||||
|
@ -299,4 +299,4 @@ onMounted(() => {
|
|||
}
|
||||
</style>
|
||||
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
||||
|
|
|
@ -98,7 +98,7 @@ import FileImage from '@/components/file-image/index.vue'
|
|||
import { asyncLocalFile } from '@/utils/talkFile'
|
||||
import { toTimeText } from '@/utils/date'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
|
||||
import { deleteSmarttalk, updateSmarttalk, getPrepareById, getSmarttalkPage } from '@/api/file'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import outLink from '@/utils/linkConfig'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
|
@ -208,6 +208,7 @@ export default {
|
|||
}
|
||||
if (action === 'cancel'){
|
||||
// 继续上课
|
||||
console.log(obj.bookImg)
|
||||
if (obj.bookImg) {
|
||||
//PPT
|
||||
listEntpcourse({
|
||||
|
@ -241,9 +242,20 @@ export default {
|
|||
}
|
||||
})
|
||||
}else {
|
||||
//APT
|
||||
this.$emit('on-start-class', item, obj)
|
||||
done()
|
||||
console.log(obj)
|
||||
getSmarttalkPage({fileId: obj.entpcoursefileid}).then(res2=>{
|
||||
console.log(res2)
|
||||
//APT
|
||||
if (res2&&res2.rows.length>0) {
|
||||
this.$emit('on-start-class', res2.rows[0], obj)
|
||||
}else {
|
||||
ElMessage({
|
||||
message: '该文件未关联PPT,无法打开!',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
done()
|
||||
})
|
||||
}
|
||||
}
|
||||
if (action === 'close') {
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
:item="item"
|
||||
:index="index"
|
||||
@on-set="openSet"
|
||||
@on-reSet="openReSet"
|
||||
@on-reSet="openReSet"
|
||||
@on-delhomework="delhomework"
|
||||
>
|
||||
</file-list-item>
|
||||
|
@ -291,6 +291,7 @@ export default {
|
|||
methods: {
|
||||
addAiPPT(item) {
|
||||
this.currentFileList.unshift(item.resData)
|
||||
KjListItem.methods.openFileWin(item.resData);
|
||||
this.pptDialog = false
|
||||
},
|
||||
// test() {
|
||||
|
@ -657,7 +658,7 @@ export default {
|
|||
this.$refs['reservDialog'].openDialog()
|
||||
},
|
||||
|
||||
// 打开外部链接
|
||||
// 打开外部链接
|
||||
// handleOutLink(key) {
|
||||
// if (key == 'homeWork') {
|
||||
// this.isOpenHomework = true
|
||||
|
@ -689,11 +690,11 @@ export default {
|
|||
// 前往作业设计页面
|
||||
goNewClassTask(){
|
||||
// router.push({ path: '/newClassTask' });
|
||||
this.$router.push({
|
||||
this.$router.push({
|
||||
path: '/newClassTask',
|
||||
query: {
|
||||
isBack: true,
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getWeekday1(date) {
|
||||
|
@ -730,7 +731,7 @@ export default {
|
|||
}
|
||||
});
|
||||
//---------------------
|
||||
// 暂时弃用 外链 新窗口打开标识
|
||||
// 暂时弃用 外链 新窗口打开标识
|
||||
// this.isOpenHomework = true;
|
||||
// // key 对应的 linkConfig.js 外部链接配置
|
||||
// let configObj = outLink()['homeWork']
|
||||
|
|
Loading…
Reference in New Issue