Compare commits

..

19 Commits

Author SHA1 Message Date
小杨 7e71af0cb7 add:表格自动批阅; 2024-10-25 10:52:42 +08:00
zouyf bdc508a0fa Merge pull request 'zouyf_dev' (#364) from zouyf_dev into main
Reviewed-on: #364
2024-10-25 10:23:59 +08:00
“zouyf” fab449cc96 Merge branch 'main' into zouyf_dev 2024-10-25 10:21:33 +08:00
“zouyf” 5879f3d5e8 [作业批改] - 逐题字体修改 2024-10-25 10:20:48 +08:00
朱浩 4d20a27177 Merge pull request 'zhuhao_dev' (#363) from zhuhao_dev into main
Reviewed-on: #363
2024-10-24 17:04:45 +08:00
朱浩 302c82503a Merge branch 'main' into zhuhao_dev 2024-10-24 17:03:31 +08:00
朱浩 afd1a1dcf9 版本管理 2024-10-24 17:03:18 +08:00
zhengdegang 9c1cd2a2fc Merge pull request 'zdg' (#362) from zdg into main
Reviewed-on: #362
2024-10-24 17:03:03 +08:00
zdg dc39486620 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-24 17:02:21 +08:00
zdg 62881bc052 修复部分ppt上课无效 2024-10-24 17:02:11 +08:00
zouyf 812e799e2a Merge pull request 'zouyf_dev' (#361) from zouyf_dev into main
Reviewed-on: #361
2024-10-24 14:49:33 +08:00
“zouyf” b5b6272141 Merge branch 'main' into zouyf_dev 2024-10-24 14:45:07 +08:00
“zouyf” 027d0ebe07 [ppt上课] - 增加作业回答消息检测 2024-10-24 14:44:53 +08:00
yangws a731dff62c Merge pull request 'fix:url地址更改;' (#360) from yangws into main
Reviewed-on: #360
2024-10-24 14:38:02 +08:00
yangws b574464a1e Merge pull request 'add:用时分析改为柱状图;' (#359) from yangws into main
Reviewed-on: #359
2024-10-24 14:37:04 +08:00
朱浩 521247f817 Merge branch 'main' into zhuhao_dev 2024-10-23 17:45:37 +08:00
朱浩 79cb126728 Merge branch 'main' into zhuhao_dev 2024-10-21 17:21:41 +08:00
朱浩 810a734fa5 上课APT错误修复,去除课程预约 2024-10-21 17:21:12 +08:00
朱浩 b43422f389 生成PPT秘钥更新 2024-10-21 10:41:43 +08:00
13 changed files with 191 additions and 69 deletions

View File

@ -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_SHOW_DEV_TOOLS = 'true'
VITE_SHOW_DEV_TOOLS = 'false'

View File

@ -1,9 +1,9 @@
{
"name": "aix-win",
"version": "2.1.14",
"version": "2.1.18",
"description": "",
"main": "./out/main/index.js",
"author": "example.com",
"author": "上海交大重庆人工智能研究院",
"homepage": "https://electron-vite.org",
"scripts": {
"format": "prettier --write .",

View File

@ -271,12 +271,13 @@ app.on('window-all-closed', () => {
function handleAll() {
const chatInstance = chat.initialize() // im-chat 实例
// 新窗口创建-监听
ipcMain.on('new-window', (e, data) => {
ipcMain.handle('new-window', (e, data) => {
const { id, type } = data
const win = BrowserWindow.fromId(id)
win.type = type // 绑定独立标识
remote.enable(win.webContents) // 开启远程服务
chatInstance.enable(win.webContents) // 开启im-chat
console.log(`主进程 [${type}]: 窗口注册-远程代理-完毕(${Date.now()})`)
})
// 用于监听-状态管理变化-同步所有窗口
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {

View File

@ -33,7 +33,7 @@
<template #dropdown>
<el-dropdown-menu>
<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 divided command="logout">
<span>退出登录</span>

View File

@ -18,13 +18,13 @@ export class Chat {
}
return Chat.instance;
}
/**
* 初始化 获取IM签名
* @param {*} isInit : 是否初始化IM
* @param {*} isLogin : 是否登录IM
* @param {*} callback: 监听消息回调函数
* @returns Promise<ImChat>
*/
/**
* 初始化 获取IM签名
* @param {*} isInit : 是否初始化IM
* @param {*} isLogin : 是否登录IM
* @param {*} callback: 监听消息回调函数
* @returns Promise<ImChat>
*/
async init(isInit = true, isLogin = true, callback) {
// 特殊处理只传1个参数且为函数则默认为callbackisInit和isLogin默认为true
if (typeof isInit == 'function'){

View File

@ -3,8 +3,8 @@ import { getSignature } from "./index";
import { ElMessage } from "element-plus";
import request from '@/utils/request'
let appId = "01ec9aa3";
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
let appId = "a3c84da2";
let secret = "OTZkZDdhNDQ4MDk0NTZiYjcyY2RjZmYz";
let timestamp = Math.floor(Date.now() / 1000);
let signature = getSignature(appId, secret, timestamp);
let req = (url, type, data)=>{

View File

@ -131,7 +131,7 @@ export const createWindow = async (type, data) => {
data.isConsole = true // 是否开启控制台
data.isWeb = false // 是否开启web安全
data.option = {...defOption, ...option}
wins_tool = await toolWindow(data)
wins_tool = await toolWindow(type, data)
wins_tool.type = type // 唯一标识
wins_tool.show()
wins_tool.setFullScreen(true) // 设置窗口为全屏
@ -161,7 +161,7 @@ export const createWindow = async (type, data) => {
}
data.isConsole = true // 是否开启控制台
data.option = {...defOption, ...option}
const win = await toolWindow(data)
const win = await toolWindow(type, data)
win.type = type // 唯一标识
win.show()
win.setFullScreen(true) // 设置窗口为全屏
@ -193,7 +193,7 @@ export const createWindow = async (type, data) => {
}
data.isConsole = true // 是否开启控制台
data.option = {...defOption, ...option}
winChild = await toolWindow(data)
winChild = await toolWindow(type, data)
winChild.type = type // 唯一标识
winChild.show()
winChild.setFullScreen(false) // 设置窗口为全屏
@ -213,7 +213,7 @@ export const createWindow = async (type, data) => {
* @author: zdg
* @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
let width = option?.width || 800
let height = option?.height || 600
@ -221,7 +221,7 @@ export function toolWindow({url, isConsole, isWeb=true, option={}}) {
const devUrl = `${BaseUrl}${url}`
const buildUrl = path.join(__dirname, 'index.html')
const urlAll = isDev ? devUrl : buildUrl
return new Promise((resolve) => {
return new Promise(async(resolve) => {
const config = {
width, height,
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)
// 新窗口-创建事件(如:主进程加载远程服务)
await ipcMsgInvoke('new-window', {id:win.id, type})
console.log(`渲染进程 [${type}]: 窗口创建-成功${Date.now()}`)
if (!isDev) win.loadFile(urlAll,{hash: url}) // 加载文件
else win.loadURL(urlAll) // 加载url
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) {
case 'tool-sphere': { // 创建-悬浮球

View File

@ -619,13 +619,13 @@ const checkWorkType = (params) => {
//
const score = extractedNumber(params.studentObj.scoingRate)
if(0<=score<=59){
if(0<=score && score<=59){
classWorkFormScore.rating = 5
}else if(60<=score<=69){
}else if(60<=score && score<=69){
classWorkFormScore.rating = 4
}else if(70<=score<=79){
}else if(70<=score && score<=79){
classWorkFormScore.rating = 3
}else if(80<=score<=99){
}else if(80<=score && score<=99){
classWorkFormScore.rating = 2
}else{
classWorkFormScore.rating = 1

View File

@ -149,7 +149,7 @@
<!-- 训练报告-->
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
<ClassOverview :table-list="overviewData"></ClassOverview>
<ClassOverview :active-data="classWorkActiveData" :table-list="overviewData"></ClassOverview>
</div>
<!-- <template #footer>
@ -393,11 +393,46 @@ const getClassWorkStudentList = (rowId) => {
tableRadio.value = '1'
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
tableRadio.num1 = tableRadio.list.length
tableRadio.list = tableRadio.list.map((item) => {
return {
...item,
teacherRating : checkWorkType(item)
}
})
})
.catch(() => {
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、查看某一个学生的学习任务完成详情*/
const getStudentClassWorkDataDetail = (row) => {
//

View File

@ -74,28 +74,28 @@
<div class="title">试题详情</div>
<!-- 习题训练 -->
<el-card style="max-width: 100%; margin-bottom: 10px; text-align: left;">
<el-card class="item-card">
<el-row>
<el-col :span="24" style="padding: 10px">
<!-- 题源题目标题题目选项 -->
<span>{{ activeExam.worktag }}</span>
<span style="margin-left: 4px" v-html="activeExam.titleFormat"></span>
<div :span="24" style="padding: 6px" v-html="activeExam.workdescFormat"></div>
<span v-html="activeExam.titleFormat"></span>
<div :span="24" style="padding: 12px 6px 2px" v-html="activeExam.workdescFormat"></div>
<!-- 折叠 详情分析解答 -->
<div class="demo-collapse">
<el-collapse v-model="activeExamFlag">
<el-collapse v-model="activeExamFlag" class="custom-collapse">
<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">
<el-col :span="2" style="padding: 6px 0px"><em>答案</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.workanswerFormat"></el-col>
<el-col :span="2" style="padding: 6px 0px"><em>分析</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.method"></el-col>
<el-col :span="2" style="padding: 6px 0px"><em>解答</em></el-col>
<el-col :span="21" style="padding: 6px 0px" v-html="activeExam.analyse"></el-col>
<el-col :span="2" style="padding: 6px 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: 6px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
<el-col :span="3" style="padding: 4px 0px"><em>答案</em></el-col>
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.workanswerFormat"></el-col>
<el-col :span="3" style="padding: 4px 0px"><em>分析</em></el-col>
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.method"></el-col>
<el-col :span="3" style="padding: 4px 0px"><em>解答</em></el-col>
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.analyse"></el-col>
<el-col :span="3" style="padding: 4px 0px"><em>点评</em></el-col>
<el-col :span="21" style="padding: 4px 0px" v-html="activeExam.discuss"></el-col>
<!-- <el-col :span="21" style="padding: 4px 0px" v-html="dataList[activeTopic-1].def.discuss"></el-col> -->
</template>
</el-row>
</el-collapse-item>
@ -433,6 +433,17 @@ watchEffect(() => { initData() })
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>

View File

@ -157,6 +157,7 @@ import ItemDialogScore from '@/views/classTask/container/classTask/item-dialog-s
import quizStats from '@/views/classTask/container/quizStats.vue'
import ClassOverview from '@/views/classTask/container/classOverview.vue'
import {sessionStore} from '@/utils/store'
import Chat from '@/utils/chat' // im
const { proxy } = getCurrentInstance()
@ -204,35 +205,38 @@ const classWorkAnalysisScore = reactive({
// form.name = newValue.label
// }
// )
const openDialog = (data) => {
const openDialog = (data, isInit=true) => {
console.log(data, '点击的item完成情况')
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
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.open = true
//
classWorkAnalysis.view = 'studentview'
// ID
classWorkAnalysis.entpcourseworklistarray = data.entpcourseworklistarray
//
classWorkAnalysis.activeStudentQuizlist = []
//
classWorkAnalysis.activeQuizAnalysisData = []
classWorkAnalysis.open = true
//
classWorkAnalysis.view = 'studentview'
// ID
classWorkAnalysis.entpcourseworklistarray = data.entpcourseworklistarray
//
classWorkAnalysis.activeStudentQuizlist = []
//
classWorkAnalysis.activeQuizAnalysisData = []
classWorkAnalysis.row = data
window.test = this
// zdg:
const studentArr = data.classworkdatastudentids
? JSON.parse(`[${data.classworkdatastudentids}]`)
: []
classWorkActiveData.studentList = studentArr
}
classWorkAnalysis.row = data
window.test = this
// zdg:
const studentArr = data.classworkdatastudentids
? JSON.parse(`[${data.classworkdatastudentids}]`)
: []
classWorkActiveData.studentList = studentArr
/** 学生完成情况分析--获取作业学生list数据 */
getClassWorkStudentList(data.id)
@ -386,11 +390,46 @@ const getClassWorkStudentList = (rowId) => {
tableRadio.value = '1'
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
tableRadio.num1 = tableRadio.list.length
tableRadio.list = tableRadio.list.map((item) => {
return {
...item,
teacherRating : checkWorkType(item)
}
})
})
.catch(() => {
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、查看某一个学生的学习任务完成详情*/
const getStudentClassWorkDataDetail = (row) => {
//
@ -638,6 +677,32 @@ const closeDialog = () => {
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 cutid = ref(0); // id
onMounted(() => {
@ -649,6 +714,13 @@ onMounted(() => {
//
cutid.value = data.id;
isReloadTimer();
// im
if (!Chat.imChat) {
Chat.init(true, true, msgHandle);
} else {
Chat.listenMsg(msgHandle);
}
})
const isReloadTimer = () =>{
clearInterval(reloadTimer.value) //

View File

@ -620,7 +620,7 @@ const changeCursor = (cursorStyle) => {
};
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) => {
// emit('addSuccess',res)
// })

View File

@ -226,7 +226,7 @@ const getClasscourseList = async type => {
const {classid} = classForm.form
const {entpcourseid} = myClassActive.value
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)
if (res.code == 200) {
// zdg: id()
@ -255,9 +255,9 @@ const createClasscourse = async () => {
entpcourseid, evalid, coursetitle,
plandate: curDate, opendate: curDate
}
await Http_Classcourse.addClasscourseReturnId(params)
teacherForm.form.classcourseid = await Http_Classcourse.addClasscourseReturnId(params)
dt.loading = false
getClasscourseList('update') //
// getClasscourseList('update') //
ElMessage.success('创建课程-成功')
}