Compare commits
19 Commits
dac36e611d
...
7e71af0cb7
Author | SHA1 | Date |
---|---|---|
小杨 | 7e71af0cb7 | |
zouyf | bdc508a0fa | |
“zouyf” | fab449cc96 | |
“zouyf” | 5879f3d5e8 | |
朱浩 | 4d20a27177 | |
朱浩 | 302c82503a | |
朱浩 | afd1a1dcf9 | |
zhengdegang | 9c1cd2a2fc | |
zdg | dc39486620 | |
zdg | 62881bc052 | |
zouyf | 812e799e2a | |
“zouyf” | b5b6272141 | |
“zouyf” | 027d0ebe07 | |
yangws | a731dff62c | |
yangws | b574464a1e | |
朱浩 | 521247f817 | |
朱浩 | 79cb126728 | |
朱浩 | 810a734fa5 | |
朱浩 | b43422f389 |
|
@ -18,4 +18,4 @@ VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktx
|
||||||
|
|
||||||
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
||||||
|
|
||||||
VITE_SHOW_DEV_TOOLS = 'true'
|
VITE_SHOW_DEV_TOOLS = 'false'
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.1.14",
|
"version": "2.1.18",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "上海交大重庆人工智能研究院",
|
||||||
"homepage": "https://electron-vite.org",
|
"homepage": "https://electron-vite.org",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
|
|
|
@ -271,12 +271,13 @@ app.on('window-all-closed', () => {
|
||||||
function handleAll() {
|
function handleAll() {
|
||||||
const chatInstance = chat.initialize() // im-chat 实例
|
const chatInstance = chat.initialize() // im-chat 实例
|
||||||
// 新窗口创建-监听
|
// 新窗口创建-监听
|
||||||
ipcMain.on('new-window', (e, data) => {
|
ipcMain.handle('new-window', (e, data) => {
|
||||||
const { id, type } = data
|
const { id, type } = data
|
||||||
const win = BrowserWindow.fromId(id)
|
const win = BrowserWindow.fromId(id)
|
||||||
win.type = type // 绑定独立标识
|
win.type = type // 绑定独立标识
|
||||||
remote.enable(win.webContents) // 开启远程服务
|
remote.enable(win.webContents) // 开启远程服务
|
||||||
chatInstance.enable(win.webContents) // 开启im-chat
|
chatInstance.enable(win.webContents) // 开启im-chat
|
||||||
|
console.log(`主进程 [${type}]: 窗口注册-远程代理-完毕(${Date.now()})`)
|
||||||
})
|
})
|
||||||
// 用于监听-状态管理变化-同步所有窗口
|
// 用于监听-状态管理变化-同步所有窗口
|
||||||
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {
|
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
|
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
|
||||||
<el-dropdown-item @click="changePage('/classReserv')">课程预约</el-dropdown-item>
|
<!-- <el-dropdown-item @click="changePage('/classReserv')">课程预约</el-dropdown-item>-->
|
||||||
<el-dropdown-item @click="changePage('/class')">班级中心</el-dropdown-item>
|
<el-dropdown-item @click="changePage('/class')">班级中心</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="logout">
|
<el-dropdown-item divided command="logout">
|
||||||
<span>退出登录</span>
|
<span>退出登录</span>
|
||||||
|
|
|
@ -18,13 +18,13 @@ export class Chat {
|
||||||
}
|
}
|
||||||
return Chat.instance;
|
return Chat.instance;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化 获取IM签名
|
* 初始化 获取IM签名
|
||||||
* @param {*} isInit : 是否初始化IM
|
* @param {*} isInit : 是否初始化IM
|
||||||
* @param {*} isLogin : 是否登录IM
|
* @param {*} isLogin : 是否登录IM
|
||||||
* @param {*} callback: 监听消息回调函数
|
* @param {*} callback: 监听消息回调函数
|
||||||
* @returns Promise<ImChat>
|
* @returns Promise<ImChat>
|
||||||
*/
|
*/
|
||||||
async init(isInit = true, isLogin = true, callback) {
|
async init(isInit = true, isLogin = true, callback) {
|
||||||
// 特殊处理,只传1个参数且为函数,则默认为callback,isInit和isLogin默认为true
|
// 特殊处理,只传1个参数且为函数,则默认为callback,isInit和isLogin默认为true
|
||||||
if (typeof isInit == 'function'){
|
if (typeof isInit == 'function'){
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { getSignature } from "./index";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
let appId = "01ec9aa3";
|
let appId = "a3c84da2";
|
||||||
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
|
let secret = "OTZkZDdhNDQ4MDk0NTZiYjcyY2RjZmYz";
|
||||||
let timestamp = Math.floor(Date.now() / 1000);
|
let timestamp = Math.floor(Date.now() / 1000);
|
||||||
let signature = getSignature(appId, secret, timestamp);
|
let signature = getSignature(appId, secret, timestamp);
|
||||||
let req = (url, type, data)=>{
|
let req = (url, type, data)=>{
|
||||||
|
|
|
@ -131,7 +131,7 @@ export const createWindow = async (type, data) => {
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.isWeb = false // 是否开启web安全
|
data.isWeb = false // 是否开启web安全
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
wins_tool = await toolWindow(data)
|
wins_tool = await toolWindow(type, data)
|
||||||
wins_tool.type = type // 唯一标识
|
wins_tool.type = type // 唯一标识
|
||||||
wins_tool.show()
|
wins_tool.show()
|
||||||
wins_tool.setFullScreen(true) // 设置窗口为全屏
|
wins_tool.setFullScreen(true) // 设置窗口为全屏
|
||||||
|
@ -161,7 +161,7 @@ export const createWindow = async (type, data) => {
|
||||||
}
|
}
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
const win = await toolWindow(data)
|
const win = await toolWindow(type, data)
|
||||||
win.type = type // 唯一标识
|
win.type = type // 唯一标识
|
||||||
win.show()
|
win.show()
|
||||||
win.setFullScreen(true) // 设置窗口为全屏
|
win.setFullScreen(true) // 设置窗口为全屏
|
||||||
|
@ -193,7 +193,7 @@ export const createWindow = async (type, data) => {
|
||||||
}
|
}
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
winChild = await toolWindow(data)
|
winChild = await toolWindow(type, data)
|
||||||
winChild.type = type // 唯一标识
|
winChild.type = type // 唯一标识
|
||||||
winChild.show()
|
winChild.show()
|
||||||
winChild.setFullScreen(false) // 设置窗口为全屏
|
winChild.setFullScreen(false) // 设置窗口为全屏
|
||||||
|
@ -213,7 +213,7 @@ export const createWindow = async (type, data) => {
|
||||||
* @author: zdg
|
* @author: zdg
|
||||||
* @date 2021-07-05 14:07:01
|
* @date 2021-07-05 14:07:01
|
||||||
*/
|
*/
|
||||||
export function toolWindow({url, isConsole, isWeb=true, option={}}) {
|
export function toolWindow(type, {url, isConsole, isWeb=true, option={}}) {
|
||||||
// width = window.screen.width
|
// width = window.screen.width
|
||||||
let width = option?.width || 800
|
let width = option?.width || 800
|
||||||
let height = option?.height || 600
|
let height = option?.height || 600
|
||||||
|
@ -221,7 +221,7 @@ export function toolWindow({url, isConsole, isWeb=true, option={}}) {
|
||||||
const devUrl = `${BaseUrl}${url}`
|
const devUrl = `${BaseUrl}${url}`
|
||||||
const buildUrl = path.join(__dirname, 'index.html')
|
const buildUrl = path.join(__dirname, 'index.html')
|
||||||
const urlAll = isDev ? devUrl : buildUrl
|
const urlAll = isDev ? devUrl : buildUrl
|
||||||
return new Promise((resolve) => {
|
return new Promise(async(resolve) => {
|
||||||
const config = {
|
const config = {
|
||||||
width, height,
|
width, height,
|
||||||
icon: path.join(appPath, '/resources/logo2.ico'),
|
icon: path.join(appPath, '/resources/logo2.ico'),
|
||||||
|
@ -236,6 +236,9 @@ export function toolWindow({url, isConsole, isWeb=true, option={}}) {
|
||||||
}
|
}
|
||||||
// 创建-新窗口
|
// 创建-新窗口
|
||||||
let win = new Remote.BrowserWindow(config)
|
let win = new Remote.BrowserWindow(config)
|
||||||
|
// 新窗口-创建事件(如:主进程加载远程服务)
|
||||||
|
await ipcMsgInvoke('new-window', {id:win.id, type})
|
||||||
|
console.log(`渲染进程 [${type}]: 窗口创建-成功${Date.now()}`)
|
||||||
if (!isDev) win.loadFile(urlAll,{hash: url}) // 加载文件
|
if (!isDev) win.loadFile(urlAll,{hash: url}) // 加载文件
|
||||||
else win.loadURL(urlAll) // 加载url
|
else win.loadURL(urlAll) // 加载url
|
||||||
win.once('ready-to-show', () => { // 窗口加载完成
|
win.once('ready-to-show', () => { // 窗口加载完成
|
||||||
|
@ -281,7 +284,7 @@ const eventHandles = (type, win) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 新窗口-创建事件(如:主进程加载远程服务)
|
// 新窗口-创建事件(如:主进程加载远程服务)
|
||||||
ipcRenderer.send('new-window', {id:win.id, type})
|
// ipcRenderer.send('new-window', {id:win.id, type})
|
||||||
}
|
}
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 'tool-sphere': { // 创建-悬浮球
|
case 'tool-sphere': { // 创建-悬浮球
|
||||||
|
|
|
@ -619,13 +619,13 @@ const checkWorkType = (params) => {
|
||||||
// 获取学生答题列表
|
// 获取学生答题列表
|
||||||
|
|
||||||
const score = extractedNumber(params.studentObj.scoingRate)
|
const score = extractedNumber(params.studentObj.scoingRate)
|
||||||
if(0<=score<=59){
|
if(0<=score && score<=59){
|
||||||
classWorkFormScore.rating = 5
|
classWorkFormScore.rating = 5
|
||||||
}else if(60<=score<=69){
|
}else if(60<=score && score<=69){
|
||||||
classWorkFormScore.rating = 4
|
classWorkFormScore.rating = 4
|
||||||
}else if(70<=score<=79){
|
}else if(70<=score && score<=79){
|
||||||
classWorkFormScore.rating = 3
|
classWorkFormScore.rating = 3
|
||||||
}else if(80<=score<=99){
|
}else if(80<=score && score<=99){
|
||||||
classWorkFormScore.rating = 2
|
classWorkFormScore.rating = 2
|
||||||
}else{
|
}else{
|
||||||
classWorkFormScore.rating = 1
|
classWorkFormScore.rating = 1
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
<!-- 训练报告-->
|
<!-- 训练报告-->
|
||||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
||||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||||
<ClassOverview :table-list="overviewData"></ClassOverview>
|
<ClassOverview :active-data="classWorkActiveData" :table-list="overviewData"></ClassOverview>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <template #footer>
|
<!-- <template #footer>
|
||||||
|
@ -393,11 +393,46 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.value = '1'
|
tableRadio.value = '1'
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
|
tableRadio.list = tableRadio.list.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
teacherRating : checkWorkType(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading_dt_table.value = false
|
loading_dt_table.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const checkWorkType = (item) => {
|
||||||
|
//这里判断题目类型
|
||||||
|
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
||||||
|
const objectiveQuestion = ['单选题','多选题','判断题']
|
||||||
|
let rating = 0
|
||||||
|
//判断题目是不是客观题
|
||||||
|
if(subType.every(item => objectiveQuestion.includes(item))){
|
||||||
|
// 获取学生答题列表
|
||||||
|
const score = extractedNumber(item.scoingRate)
|
||||||
|
if(0<=score && score<=59){
|
||||||
|
rating = 5
|
||||||
|
}else if(60<=score && score<=69){
|
||||||
|
rating = 4
|
||||||
|
}else if(70<=score && score<=79){
|
||||||
|
rating = 3
|
||||||
|
}else if(80<=score && score<=99){
|
||||||
|
rating = 2
|
||||||
|
}else{
|
||||||
|
rating = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rating
|
||||||
|
|
||||||
|
}
|
||||||
|
// 获取百分比的数字
|
||||||
|
const extractedNumber = (score) => {
|
||||||
|
const match = score.match(/\d+/);
|
||||||
|
return match ? parseInt(match[0], 10) : null;
|
||||||
|
}
|
||||||
/** 2、查看某一个学生的学习任务完成详情*/
|
/** 2、查看某一个学生的学习任务完成详情*/
|
||||||
const getStudentClassWorkDataDetail = (row) => {
|
const getStudentClassWorkDataDetail = (row) => {
|
||||||
// 这里取出的是学生完成情况
|
// 这里取出的是学生完成情况
|
||||||
|
|
|
@ -74,28 +74,28 @@
|
||||||
|
|
||||||
<div class="title">试题详情</div>
|
<div class="title">试题详情</div>
|
||||||
<!-- 习题训练 -->
|
<!-- 习题训练 -->
|
||||||
<el-card style="max-width: 100%; margin-bottom: 10px; text-align: left;">
|
<el-card class="item-card">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" style="padding: 10px">
|
<el-col :span="24" style="padding: 10px">
|
||||||
<!-- 题源、题目标题、题目选项 -->
|
<!-- 题源、题目标题、题目选项 -->
|
||||||
<span>{{ activeExam.worktag }}</span>
|
<span>{{ activeExam.worktag }}</span>
|
||||||
<span style="margin-left: 4px" v-html="activeExam.titleFormat"></span>
|
<span v-html="activeExam.titleFormat"></span>
|
||||||
<div :span="24" style="padding: 6px" v-html="activeExam.workdescFormat"></div>
|
<div :span="24" style="padding: 12px 6px 2px" v-html="activeExam.workdescFormat"></div>
|
||||||
<!-- 折叠: 详情分析解答 -->
|
<!-- 折叠: 详情分析解答 -->
|
||||||
<div class="demo-collapse">
|
<div class="demo-collapse">
|
||||||
<el-collapse v-model="activeExamFlag">
|
<el-collapse v-model="activeExamFlag" class="custom-collapse">
|
||||||
<el-collapse-item title="详情分析解答" name="1">
|
<el-collapse-item title="详情分析解答" name="1">
|
||||||
<el-row style=" padding: 6px 10px; border: 2px dotted;">
|
<el-row style=" padding: 4px; border: 2px dotted;">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-col :span="2" style="padding: 6px 0px"><em>【答案】</em></el-col>
|
<el-col :span="3" style="padding: 4px 0px"><em>【答案】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.workanswerFormat"></el-col>
|
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.workanswerFormat"></el-col>
|
||||||
<el-col :span="2" style="padding: 6px 0px"><em>【分析】</em></el-col>
|
<el-col :span="3" style="padding: 4px 0px"><em>【分析】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.method"></el-col>
|
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.method"></el-col>
|
||||||
<el-col :span="2" style="padding: 6px 0px"><em>【解答】</em></el-col>
|
<el-col :span="3" style="padding: 4px 0px"><em>【解答】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.analyse"></el-col>
|
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.analyse"></el-col>
|
||||||
<el-col :span="2" style="padding: 6px 0px"><em>【点评】</em></el-col>
|
<el-col :span="3" style="padding: 4px 0px"><em>【点评】</em></el-col>
|
||||||
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.discuss"></el-col>
|
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.discuss"></el-col>
|
||||||
<!-- <el-col :span="21" style="padding: 6px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
|
<!-- <el-col :span="21" style="padding: 4px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
|
||||||
</template>
|
</template>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
|
@ -433,6 +433,17 @@ watchEffect(() => { initData() })
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-card {
|
||||||
|
max-width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
:deep(.el-collapse-item__content){
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -157,6 +157,7 @@ import ItemDialogScore from '@/views/classTask/container/classTask/item-dialog-s
|
||||||
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/store'
|
import {sessionStore} from '@/utils/store'
|
||||||
|
import Chat from '@/utils/chat' // im 登录初始化
|
||||||
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
@ -204,35 +205,38 @@ const classWorkAnalysisScore = reactive({
|
||||||
// form.name = newValue.label
|
// form.name = newValue.label
|
||||||
// }
|
// }
|
||||||
// )
|
// )
|
||||||
const openDialog = (data) => {
|
const openDialog = (data, isInit=true) => {
|
||||||
console.log(data, '点击的item完成情况')
|
console.log(data, '点击的item完成情况')
|
||||||
|
|
||||||
|
if (isInit) {
|
||||||
|
classWorkAnalysis.title = data.uniquekey ? data.uniquekey + '--' : ''
|
||||||
|
classWorkAnalysis.worktype = data.worktype
|
||||||
|
classWorkAnalysis.workclass = data.workclass
|
||||||
|
// 重置学生列表
|
||||||
|
tableRadio.list = []
|
||||||
|
tableRadio.value = '1'
|
||||||
|
tableRadio.num0 = 0
|
||||||
|
tableRadio.num1 = 0
|
||||||
|
|
||||||
classWorkAnalysis.title = data.uniquekey ? data.uniquekey + '--' : ''
|
classWorkAnalysis.open = true
|
||||||
classWorkAnalysis.worktype = data.worktype
|
// 默认显示是学生作业反馈
|
||||||
classWorkAnalysis.workclass = data.workclass
|
classWorkAnalysis.view = 'studentview'
|
||||||
// 重置学生列表
|
// 当前学习任务所包含的试题ID
|
||||||
tableRadio.list = []
|
classWorkAnalysis.entpcourseworklistarray = data.entpcourseworklistarray
|
||||||
tableRadio.value = '1'
|
// 默认选中的学生
|
||||||
tableRadio.num0 = 0
|
classWorkAnalysis.activeStudentQuizlist = []
|
||||||
tableRadio.num1 = 0
|
// 默认选中的试题
|
||||||
|
classWorkAnalysis.activeQuizAnalysisData = []
|
||||||
|
|
||||||
classWorkAnalysis.open = true
|
classWorkAnalysis.row = data
|
||||||
// 默认显示是学生作业反馈
|
window.test = this
|
||||||
classWorkAnalysis.view = 'studentview'
|
// zdg: 学生列表
|
||||||
// 当前学习任务所包含的试题ID
|
const studentArr = data.classworkdatastudentids
|
||||||
classWorkAnalysis.entpcourseworklistarray = data.entpcourseworklistarray
|
? JSON.parse(`[${data.classworkdatastudentids}]`)
|
||||||
// 默认选中的学生
|
: []
|
||||||
classWorkAnalysis.activeStudentQuizlist = []
|
classWorkActiveData.studentList = studentArr
|
||||||
// 默认选中的试题
|
}
|
||||||
classWorkAnalysis.activeQuizAnalysisData = []
|
|
||||||
|
|
||||||
classWorkAnalysis.row = data
|
|
||||||
window.test = this
|
|
||||||
// zdg: 学生列表
|
|
||||||
const studentArr = data.classworkdatastudentids
|
|
||||||
? JSON.parse(`[${data.classworkdatastudentids}]`)
|
|
||||||
: []
|
|
||||||
classWorkActiveData.studentList = studentArr
|
|
||||||
/** 学生完成情况分析--获取作业学生list数据 */
|
/** 学生完成情况分析--获取作业学生list数据 */
|
||||||
getClassWorkStudentList(data.id)
|
getClassWorkStudentList(data.id)
|
||||||
|
|
||||||
|
@ -386,11 +390,46 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.value = '1'
|
tableRadio.value = '1'
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
|
tableRadio.list = tableRadio.list.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
teacherRating : checkWorkType(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading_dt_table.value = false
|
loading_dt_table.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const checkWorkType = (item) => {
|
||||||
|
//这里判断题目类型
|
||||||
|
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
||||||
|
const objectiveQuestion = ['单选题','多选题','判断题']
|
||||||
|
let rating = 0
|
||||||
|
//判断题目是不是客观题
|
||||||
|
if(subType.every(item => objectiveQuestion.includes(item))){
|
||||||
|
// 获取学生答题列表
|
||||||
|
const score = extractedNumber(item.scoingRate)
|
||||||
|
if(0<=score && score<=59){
|
||||||
|
rating = 5
|
||||||
|
}else if(60<=score && score<=69){
|
||||||
|
rating = 4
|
||||||
|
}else if(70<=score && score<=79){
|
||||||
|
rating = 3
|
||||||
|
}else if(80<=score && score<=99){
|
||||||
|
rating = 2
|
||||||
|
}else{
|
||||||
|
rating = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rating
|
||||||
|
|
||||||
|
}
|
||||||
|
// 获取百分比的数字
|
||||||
|
const extractedNumber = (score) => {
|
||||||
|
const match = score.match(/\d+/);
|
||||||
|
return match ? parseInt(match[0], 10) : null;
|
||||||
|
}
|
||||||
/** 2、查看某一个学生的学习任务完成详情*/
|
/** 2、查看某一个学生的学习任务完成详情*/
|
||||||
const getStudentClassWorkDataDetail = (row) => {
|
const getStudentClassWorkDataDetail = (row) => {
|
||||||
// 这里取出的是学生完成情况
|
// 这里取出的是学生完成情况
|
||||||
|
@ -638,6 +677,32 @@ const closeDialog = () => {
|
||||||
emit('cle-click')
|
emit('cle-click')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// im监听消息回调
|
||||||
|
const msgHandle = (msg) => {
|
||||||
|
const { type, data } = msg
|
||||||
|
switch(type) {
|
||||||
|
case 'TIMAddRecvNewMsgCallback': // 收到新消息 data=[]
|
||||||
|
{
|
||||||
|
(data||[]).forEach(o => {
|
||||||
|
const msgArr = o?.message_elem_array||[]
|
||||||
|
msgArr.forEach(info => {
|
||||||
|
const msgType = info?.elem_type // 消息类型 TIMElemType
|
||||||
|
const msgData = !!info.text_elem_content ? JSON.parse(info.text_elem_content)||'' : ''
|
||||||
|
// 处理学生端反馈得消息
|
||||||
|
//console.log('msgData->', msgData);
|
||||||
|
if (msgData.msgKey == "finishHomework"){
|
||||||
|
// 刷新
|
||||||
|
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
|
||||||
|
//console.log('data->', data);
|
||||||
|
openDialog(data, false);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const reloadTimer = ref(0); // 开启定时查询,作业id是否刷新了,刷新了就重新获取
|
const reloadTimer = ref(0); // 开启定时查询,作业id是否刷新了,刷新了就重新获取
|
||||||
const cutid = ref(0); // 当前初始化的作业id
|
const cutid = ref(0); // 当前初始化的作业id
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -649,6 +714,13 @@ onMounted(() => {
|
||||||
// 开始定时查询
|
// 开始定时查询
|
||||||
cutid.value = data.id;
|
cutid.value = data.id;
|
||||||
isReloadTimer();
|
isReloadTimer();
|
||||||
|
|
||||||
|
// im监听消息
|
||||||
|
if (!Chat.imChat) {
|
||||||
|
Chat.init(true, true, msgHandle);
|
||||||
|
} else {
|
||||||
|
Chat.listenMsg(msgHandle);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const isReloadTimer = () =>{
|
const isReloadTimer = () =>{
|
||||||
clearInterval(reloadTimer.value) // 关闭定时器
|
clearInterval(reloadTimer.value) // 关闭定时器
|
||||||
|
|
|
@ -620,7 +620,7 @@ const changeCursor = (cursorStyle) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFiledf28bf990a4c40ffb7477ed4b65392c27232357022409613439/%E3%80%8A%E9%9D%99%E5%A5%B3%E3%80%8B%E6%B7%B1%E5%BA%A6%E8%A7%A3%E8%AF%BB%E4%B8%8E%E7%A0%94%E7%A9%B6.pptx"
|
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFileba724e0344f74e1480535eedf3ebec661601807661085006275/%E9%87%91%E9%A9%AC%E5%A5%96%E5%B0%B4%E5%B0%AC%E4%BA%8B%E4%BB%B6%E5%88%86%E6%9E%90%E4%B8%8E%E5%BA%94%E5%AF%B9%E7%AD%96%E7%95%A5.pptx"
|
||||||
// creatAIPPT(props.currentNode.itemtitle + '.pptx',url, props.uploadData).then((res) => {
|
// creatAIPPT(props.currentNode.itemtitle + '.pptx',url, props.uploadData).then((res) => {
|
||||||
// emit('addSuccess',res)
|
// emit('addSuccess',res)
|
||||||
// })
|
// })
|
||||||
|
|
|
@ -226,7 +226,7 @@ const getClasscourseList = async type => {
|
||||||
const {classid} = classForm.form
|
const {classid} = classForm.form
|
||||||
const {entpcourseid} = myClassActive.value
|
const {entpcourseid} = myClassActive.value
|
||||||
if (!classid || !entpcourseid) return
|
if (!classid || !entpcourseid) return
|
||||||
const params = {classid, entpcourseid, entpcoursefileid: 0}
|
const params = {classid, entpcourseid, entpcoursefileid: 0, pageSize: 1000}
|
||||||
const res = await Http_Classcourse.listClasscourse(params)
|
const res = await Http_Classcourse.listClasscourse(params)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// zdg: 排序id大的在前(最新的)
|
// zdg: 排序id大的在前(最新的)
|
||||||
|
@ -255,9 +255,9 @@ const createClasscourse = async () => {
|
||||||
entpcourseid, evalid, coursetitle,
|
entpcourseid, evalid, coursetitle,
|
||||||
plandate: curDate, opendate: curDate
|
plandate: curDate, opendate: curDate
|
||||||
}
|
}
|
||||||
await Http_Classcourse.addClasscourseReturnId(params)
|
teacherForm.form.classcourseid = await Http_Classcourse.addClasscourseReturnId(params)
|
||||||
dt.loading = false
|
dt.loading = false
|
||||||
getClasscourseList('update') // 更新列表
|
// getClasscourseList('update') // 更新列表
|
||||||
ElMessage.success('创建课程-成功')
|
ElMessage.success('创建课程-成功')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue