Compare commits

...

33 Commits

Author SHA1 Message Date
baigl 09575b9896 Merge pull request 'baigl' (#328) from baigl into main
Reviewed-on: #328
2024-10-17 13:52:20 +08:00
白了个白 436cde508c Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-10-17 13:51:28 +08:00
白了个白 0e42ce08e1 1 2024-10-17 13:50:21 +08:00
baigl be4f9d2499 Merge pull request 'baigl' (#327) from baigl into main
Reviewed-on: #327
2024-10-17 11:29:35 +08:00
白了个白 6a8b0f82e8 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-10-17 11:28:49 +08:00
白了个白 d290be9320 主页、作业批改 进行结束 时间逻辑修改 2024-10-17 11:28:25 +08:00
yangws 16761d3fc8 Merge pull request 'fix:柱状图展示修改;' (#326) from yangws into main
Reviewed-on: #326
2024-10-17 10:45:32 +08:00
小杨 03b5eccab0 fix:柱状图展示修改; 2024-10-17 10:44:55 +08:00
baigl add2a3e621 Merge pull request 'baigl' (#325) from baigl into main
Reviewed-on: #325
2024-10-17 10:44:08 +08:00
白了个白 f18d0c0e5e 1 2024-10-17 10:42:10 +08:00
白了个白 e57e643f67 教学实践:作业类型ui更改 2024-10-17 10:34:29 +08:00
白了个白 1a9f98e6c9 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-10-17 10:23:37 +08:00
白了个白 e53731ac3f 主页:作业设计、作业布置外链改为pc端 2024-10-17 10:20:16 +08:00
白了个白 a1002a1f40 作业布置:列表逻辑改为usegetHomework里面,新增历史记录查看,新增历史记录的批阅详情查看 2024-10-17 10:19:22 +08:00
白了个白 7c539614fd 教学实践:作业编辑外链改为pc版 2024-10-16 16:11:07 +08:00
朱浩 ae433b7520 Merge pull request 'zhuhao_dev' (#324) from zhuhao_dev into main
Reviewed-on: #324
2024-10-16 14:32:50 +08:00
朱浩 16b574a167 Merge branch 'main' into zhuhao_dev
# Conflicts:
#	src/renderer/src/views/prepare/index.vue
2024-10-16 14:31:55 +08:00
朱浩 8a90da5b64 接入AI生成PPT的功能 2024-10-16 14:29:43 +08:00
白了个白 2b25924213 作业推送:row改为rows组件模式 2024-10-16 14:20:46 +08:00
白了个白 f3d59ca8ee 教学实践:作业-推送布置修改;作业设计外链改为pc端作业设计 2024-10-16 14:19:30 +08:00
白了个白 6163fb06f9 公共组件:布置推送作业,row改为批量rows逻辑;截止日期默认为当前时间3小时之后 2024-10-16 14:16:48 +08:00
zhengdegang 206a81eeee Merge pull request 'zdg' (#323) from zdg into main
Reviewed-on: #323
2024-10-16 12:13:01 +08:00
zdg b68e5c449b Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-16 12:12:06 +08:00
zdg bf7c9839c7 ppt作业布置-加上课堂id 2024-10-16 12:12:00 +08:00
朱浩 d1f3abcc72 #882 V2.1.5 教学实录只记录已结束课程,添加继续上课逻辑 2024-10-16 10:58:42 +08:00
zdg 781a62c137 测试 2024-10-16 10:58:09 +08:00
zouyf 4d9ae0ab90 Merge pull request 'zouyf_dev' (#322) from zouyf_dev into main
Reviewed-on: #322
2024-10-16 09:39:23 +08:00
朱浩 d39d96f733 Merge branch 'main' into zhuhao_dev 2024-10-16 09:33:29 +08:00
朱浩 fe9e0c1fe2 删除沉余代码 2024-10-15 17:47:32 +08:00
朱浩 7fa76e0f7e Merge branch 'main' into zhuhao_dev
# Conflicts:
#	src/renderer/src/views/classManage/reserv-item-apt.vue
#	src/renderer/src/views/prepare/container/kj-list-item.vue
2024-10-15 15:40:08 +08:00
朱浩 b3e75e799e Merge branch 'main' into zhuhao_dev 2024-10-15 09:23:04 +08:00
朱浩 81cd69beb9 暂时取消APT的上课判断 2024-10-11 17:31:12 +08:00
朱浩 0bb03dad5e 暂时取消APT的上课判断 2024-10-11 16:40:07 +08:00
23 changed files with 875 additions and 862 deletions

View File

@ -16,7 +16,7 @@ win:
nsis:
oneClick: false
allowToChangeInstallationDirectory: true
artifactName: ${name}-${version}-setup.${ext}
artifactName: ${name}-${version}-test.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.1.5",
"version": "2.1.9",
"description": "",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -243,6 +243,78 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
})
})
/*创建新的ppt文件*/
ipcMain.on('creat-ai-file-default', (e, { name, url, uploadData, cookie }) => {
createFolder('tempFile').then(async () => {
let path = appTempFilePath + name.replace(/[\\/:*?"<>|]/, '')
let {type,item} = await downloadFile(url,name)
if (type==="成功") {
let fileType = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
let formData = new FormData()
for (let key in uploadData) {
if (Object.prototype.hasOwnProperty.call(uploadData, key)) {
// 检查是否是对象自身的属性
formData.append(key, uploadData[key])
}
}
formData.append('fileFlag', '课件')
uploadFileByFS({
url: uploadUrl,
path,
name,
cookie,
fileType,
formData,
success: (response) => {
e.reply('creat-ai-file-default-reply', response.data)
console.log('File uploaded successfully:', response.data)
},
error: (err) => {
console.error('Error uploading file:', err)
}
})
}else {
e.reply('creat-ai-file-default-reply', type)
}
})
})
function downloadFile(url,fileName) {
return new Promise((resolve, reject)=>{
const browserWindow = BrowserWindow.getFocusedWindow()
const id = manager.download({
window: browserWindow,
url: url,
saveAsFilename: fileName,
directory: appTempFilePath,
callbacks: {
onDownloadStarted: async ({ id, item, webContents }) => {
// Do something with the download id
},
onDownloadProgress: async ({ id, item, percentCompleted }) => {
// console.log(percentCompleted)
},
onDownloadCompleted: async ({ id, item }) => {
console.log('完成')
resolve({type:"成功",item})
},
onDownloadCancelled: async () => {
console.log("取消")
reject({type:"取消了下载"})
},
onDownloadInterrupted: async () => {
console.log('中断')
reject({type:"下载被中断"})
},
onError: (err, data) => {
console.log(err.toString())
reject({type:"下载出错",err})
}
}
})
})
}
//获取应用文件目录
ipcMain.on('get-root-file-path', (e) => {
e.reply('get-root-file-path-reply', appRootFilePath)

View File

@ -55,14 +55,15 @@ import { saveByClassWorkArray } from '@/api/teaching/classwork'
import useUserStore from '@/store/modules/user'
import { getCurrentTime } from '@/utils/date'
import { uniqBy, groupBy } from 'lodash'
import { sessionStore } from '@/utils/store'
const model = defineModel({ type: Boolean, default: false })
const props = defineProps({
entpcourseid: {
default: ''
},
row: {
default: ''
rows: {
default: []
},
title: {
type: String,
@ -211,6 +212,8 @@ const delStudent = (index) => {
const onSubmit = (formEl) => {
if (!formEl) return
// id
const classRoomId = sessionStore.get('curClassRoom.id')
formEl.validate((valid) => {
if (valid) {
/**
@ -222,31 +225,34 @@ const onSubmit = (formEl) => {
let ary = []
for (const value in gradeObj) {
// AIx web
let obj = {
id: 0,
parentid: props.row.id,
classid: value,
classcourseid: 0,
entpcourseid: props.entpcourseid,
studentlist: JSON.stringify(gradeObj[value]),
feedback: form.feedback,
workkey: '',
timelength: form.timelength,
weights: 1,
deaddate: form.deaddate,
workdate: getCurrentTime('YYYY-MM-DD'),
uniquekey: props.row.uniquekey,
entpcourseworklist: '[' + props.row.entpcourseworklist + ']',
needMsgNotifine: 'false',
msgkey: 'newclasswork',
title: '作业任务',
msgcontent: '',
teachername: userInfo.nickName,
unixstamp: new Date().getTime(),
worktype: props.row.worktype,
status: '1'
for (var i = 0; i < props.rows.length; i++) {
let obj = {
id: 0,
parentid: props.rows[i].id,
classid: value,
classcourseid: 0, // id-ppt使
classReservId: classRoomId, // id
entpcourseid: props.entpcourseid,
studentlist: JSON.stringify(gradeObj[value]),
feedback: form.feedback,
workkey: '',
timelength: form.timelength,
weights: 1,
deaddate: form.deaddate,
workdate: getCurrentTime('YYYY-MM-DD'),
uniquekey: props.rows[i].uniquekey,
entpcourseworklist: '[' + props.rows[i].entpcourseworklist + ']',
needMsgNotifine: 'false',
msgkey: 'newclasswork',
title: '作业任务',
msgcontent: '',
teachername: userInfo.nickName,
unixstamp: new Date().getTime(),
worktype: props.rows[i].worktype,
status: '1'
}
ary.push(obj)
}
ary.push(obj)
}
setLoading.value = true
saveByClassWorkArray({
@ -280,8 +286,9 @@ const cloneDialog = (formEl) => {
}
onMounted(() => {
//
form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
// 3
// form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
form.deaddate = `${getCurrentTime('YYYY-MM-DD')} ${getCurrentTime('HH+3')}:${getCurrentTime('mm')}`;
})
</script>

View File

@ -0,0 +1,117 @@
import { listEntpcoursework,getEvaluationclue } from '@/api/classTask';
import { processList } from '@/hooks/useProcessList';
const isJson = (str) => {
if (typeof str == 'string') {
try {
let obj = JSON.parse(str)
if (typeof obj == 'object' && obj) {
return true
} else {
return false
}
} catch (e) {
return false
}
}
}
/**
* @description 编辑作业配置
* @param {*} row
*/
export const editListItem = (row, courseObj) => {
return new Promise((resolve, reject) => {
// 作业内容编辑-跳转到设计界面-传参
let classtaskObj = {
id: '', //
bookName: '', // 课程名称
uniquekey: '', // 设计中的标题
title: '', // 设计中的说明
worktype: '', // 设计中的作业类型
quizlist: [], // 设计中的试题列表
chooseWorkLists: [],// 设计中的框架梳理list
fileHomeworkList: [],// 设计中的常规作业list
whiteboardObj: '',// 设计中的课堂展示对象
};
console.log('编辑的行', row);
//重新更新[新任务]中右侧列表数据
var listCourseWork = [];
for (var i=0; i < row.entpcourseworklistarray.length; i++) {
listCourseWork.push(row.entpcourseworklistarray[i]);
}
if (listCourseWork.length > 0) {
classtaskObj.id= row.id; //
classtaskObj.bookObj = courseObj; // 教材对象
classtaskObj.bookName = row.evaltitle? row.evalparenttitle? row.evalparenttitle+'/'+row.evaltitle : row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元
classtaskObj.uniquekey= row.uniquekey; // 设计中的标题
classtaskObj.title= row.title; // 设计中的说明
classtaskObj.worktype= row.worktype; // 设计中的作业类型
classtaskObj.quizlist= []; // 设计中的试题列表
classtaskObj.chooseWorkLists = []; //设计中的 框架梳理list
classtaskObj.fileHomeworkList = []; //设计中的 常规作业list
classtaskObj.whiteboardObj = ''; //设计中的 课堂展示对象
if (row.worktype == '框架梳理') {
// 框架梳理对应只有一个内容
getEvaluationclue(listCourseWork[0].id).then(res => {
if ( res.data==null || res.data==undefined ) {
return ;
}
res.data.worktype = '框架梳理';
res.data.score = listCourseWork[0].score;
classtaskObj.chooseWorkLists.push(res.data);
//
// console.log('框架梳理', classtaskObj);
return resolve(classtaskObj);
});
}
else if (row.worktype == '习题训练') {
const ids = listCourseWork.map(item => item.id).join(",");
listEntpcoursework({ids: ids, pageSize: 50}).then(idres => {
// for (var i=0; i<idres.rows.length; i++) {
// idres.rows[i].titletext = idres.rows[i].title.replace(/<[^>]+>/g, '');
// }
// 格式化试题
if(idres.rows&&idres.rows.length > 0){
processList(idres.rows);
//重新将task中的分值更新
row.entpcourseworklistarray.forEach(item => {
const quizItem = idres.rows.find(quiz => quiz.id === item.id);
if (quizItem) {
quizItem.score = item.score;
quizItem.scoreOrigin = item.score;
}
});
classtaskObj.quizlist = idres.rows;
//
// console.log('习题训练', classtaskObj);
return resolve(classtaskObj);
}
})
}
else if (row.worktype == '课堂展示') {
console.log('row.课堂展示', row.workcodes);
const workcodes = JSON.parse(row.workcodes);
classtaskObj.whiteboardObj = JSON.stringify(workcodes.json);
//
// console.log('课堂展示', classtaskObj);
return resolve(classtaskObj);
}
else if (row.worktype == '常规作业') {
if(isJson(row.workcodes)){
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
//
// console.log('常规作业', classtaskObj);
return resolve(classtaskObj);
}
}
}
});
}

View File

@ -71,6 +71,7 @@ const getHomeWorkList = async () => {
return await homeworklist({
entpcourseid: chapterId,
edituserid: userStore.user.userId,
orderby: "timestamp DESC",
pageSize: 100,
status: '10'
}).then((res) => {
@ -79,6 +80,24 @@ const getHomeWorkList = async () => {
for (var i = 0; i < res.rows.length; i++) {
res.rows[i].taskconfig = []
// 处理任务类型的UI
// if (res.rows[i].worktype == '学习目标定位') {
// res.rows[i].workclass = 'success';
// res.rows[i].workcodesList = JSON.parse(res.rows[i].workcodes);
// } else
// 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加
if (res.rows[i].worktype == '课堂展示') {
res.rows[i].workclass = 'primary';
} else if (res.rows[i].worktype == '框架梳理') {
res.rows[i].workclass = 'warning';
} else if (res.rows[i].worktype == '常规作业') {
res.rows[i].workclass = 'info';
} else if (res.rows[i].worktype == '习题训练') {
res.rows[i].workclass = 'danger';
} else {
res.rows[i].workclass = 'primary';
}
// 找child
for (var j = 0; j < res.rows.length; j++) {
if (res.rows[j].parentid == res.rows[i].id) {

View File

@ -18,7 +18,7 @@ export const useToolState = defineStore('tool', {
showBoardAll: false, // 全屏画板-是否显示
isPdfWin: false, // pdf窗口是否打开
isToolWin: false, // 工具窗口是否打开
isTaskWin: false, // 批改窗口是否打开
isTaskWin: false, // 批改窗口是否打开
curSubjectNode: {
querySearch: {} // 查询资源所需参数
},

View File

@ -96,3 +96,19 @@ export const creatPPT = (name, uploadData) => {
})
})
}
export const creatAIPPT = (name, url, uploadData) => {
JSON.parse(JSON.stringify(uploadData))
return new Promise((resolve, reject) => {
let cookie = localStorage.getItem('Admin-Token')
ipcRenderer.send('creat-ai-file-default', {
name,
url,
uploadData: JSON.parse(JSON.stringify(uploadData)),
cookie
})
ipcRenderer.once('creat-ai-file-default-reply', (e, res) => {
resolve(res)
})
})
}

View File

@ -27,11 +27,8 @@
<script setup>
import { ref } from 'vue'
import { useToolState } from '@/store/modules/tool'
import useUserStore from '@/store/modules/user'
import { createWindow } from '@/utils/tool'
import { deleteSmartReserv, startClass, endClass } from '@/api/classManage'
import { deleteSmartReserv } from '@/api/classManage'
import { ElMessage } from 'element-plus'
import { listEntpcourse } from '@/api/teaching/classwork'
const emit = defineEmits(['openEdit', 'deleteReserv', 'change'])
const props = defineProps({
item: {

View File

@ -145,63 +145,78 @@ const getClassWorkList = async () => {
edituserid: userStore.userId, // id
edustage: userStore.edustage, //
edusubject: userStore.edusubject,//
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
deaddate: EndDate.value,//
status: '1', // 1-
// orderby: 'concat(deaddate,uniquekey) DESC',
orderby: 'deaddate DESC',
pageSize: 100,
})
for (var i = 0; i < response.rows.length; i++) {
/**
* 2024-10-17 由于 后面截止时间加了 时分特加判断
* 1进行中以前是以明天判断现改为传当天的日期并根据当前日期的时分与截止日期进行判断
* 2已结束以前默认是以明天判断现依然以明天为判断并根据当前日期时分大于截止日期时分判断
*/
let list = [];
if(tabActive.value === '进行中'){
//
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); //
}else{
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); //
}
for (var i = 0; i < list.length; i++) {
//
response.rows[i].workdatalist = []
response.rows[i].workdatacount = 0 //
response.rows[i].workdatalistVisible = false
response.rows[i].workdatafeedbackcount = 0 //
response.rows[i].feedtimelength = 0
response.rows[i].rightAnswerCount = 0
response.rows[i].scoingRate = 0 + '%' //
response.rows[i].averagetime = 0 //
list[i].workdatalist = []
list[i].workdatacount = 0 //
list[i].workdatalistVisible = false
list[i].workdatafeedbackcount = 0 //
list[i].feedtimelength = 0
list[i].rightAnswerCount = 0
list[i].scoingRate = 0 + '%' //
list[i].averagetime = 0 //
// ----------------------------------------------
// UI
if (response.rows[i].worktype == '学习目标定位') {
response.rows[i].workclass = 'success'
response.rows[i].workcodesList = JSON.parse(response.rows[i].workcodes)
} else if (response.rows[i].worktype == '教材研读') {
response.rows[i].workclass = 'primary'
} else if (response.rows[i].worktype == '框架梳理') {
response.rows[i].workclass = 'warning'
} else if (response.rows[i].worktype == '学科定位') {
response.rows[i].workclass = 'info'
} else if (response.rows[i].worktype == '习题训练') {
response.rows[i].workclass = 'danger'
if (list[i].worktype == '学习目标定位') {
list[i].workclass = 'success'
list[i].workcodesList = JSON.parse(response.rows[i].workcodes)
} else if (list[i].worktype == '教材研读') {
list[i].workclass = 'primary'
} else if (list[i].worktype == '框架梳理') {
list[i].workclass = 'warning'
} else if (list[i].worktype == '学科定位') {
list[i].workclass = 'info'
} else if (list[i].worktype == '习题训练') {
list[i].workclass = 'danger'
} else {
response.rows[i].workclass = ''
list[i].workclass = ''
}
//
if (response.rows[i].entpcourseworklist != '') {
response.rows[i].entpcourseworklistarray = JSON.parse(
'[' + response.rows[i].entpcourseworklist + ']'
if (list[i].entpcourseworklist != '') {
list[i].entpcourseworklistarray = JSON.parse(
'[' + list[i].entpcourseworklist + ']'
)
} else {
response.rows[i].entpcourseworklistarray = []
list[i].entpcourseworklistarray = []
}
// classworkdatastudentids
if (
response.rows[i].classworkdatastudentids != '' &&
response.rows[i].classworkdatastudentids != null &&
response.rows[i].classworkdatastudentids != 'null'
list[i].classworkdatastudentids != '' &&
list[i].classworkdatastudentids != null &&
list[i].classworkdatastudentids != 'null'
) {
const stuList = JSON.parse('[' + response.rows[i].classworkdatastudentids + ']')
response.rows[i].workdatacount = stuList.length
const stuList = JSON.parse('[' + list[i].classworkdatastudentids + ']')
list[i].workdatacount = stuList.length
}
}
// (workdatacount)>0
if (response.rows && response.rows.length > 0) {
classWorkList.value = response.rows && response.rows.filter((item) => item.workdatacount > 0)
if (list && list.length > 0) {
classWorkList.value = list && list.filter((item) => item.workdatacount > 0)
//TODO total
total.value = response.total
total.value = 0
}else{
classWorkList.value = []
total.value = 0
@ -222,6 +237,7 @@ const getStudentClassWorkData = async() => {
// classids: classTaskStore.classListIds.join(','),
// edusubject: userStore.edusubject,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
// deaddate: EndDate.value,//
// //status: '1', // 1-
// orderby: "deaddate DESC",// TODO deaddate
// pageSize: 1000,
@ -407,13 +423,28 @@ const getStudentVisible = async () => {
edituserid: userStore.userId, // id
edustage: userStore.edustage,//
edusubject: userStore.edusubject,//
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
deaddate: EndDate.value,//
status: '1', // 1-
// orderby: 'concat(deaddate,uniquekey) DESC',
orderby: 'deaddate DESC',
pageSize: 100
})
const curWorkList = response.rows
/**
* 2024-10-17 由于 后面截止时间加了 时分特加判断
* 1进行中以前是以明天判断现改为传当天的日期并根据当前日期的时分与截止日期进行判断
* 2已结束以前默认是以明天判断现依然以明天为判断并根据当前日期时分大于截止日期时分判断
*/
let list = [];
if(tabActive.value === '进行中'){
//
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); //
}else{
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); //
}
const curWorkList = list
/**
* warn: 这里仅更新了finishpercent(进度条), 且当前作业布置推送新任务时, curWorkList中会查到新的任务与当前页面中this.classWorkList长度不一致,

File diff suppressed because it is too large Load Diff

View File

@ -74,8 +74,8 @@ function initChart() {
position: 'top',
formatter: params => {
const value = dataList.value[params.dataIndex].value;
const percentage = ((value / total) * 100).toFixed(2); //
return `${percentage}%`; //
const percentage = ((value / total) * 100).toFixed(); //
return `${value}${percentage}%`; //
},
color: '#333',
fontSize: 12

View File

@ -125,7 +125,7 @@ onMounted(() => {
watch(() => props.bookobj.levelSecondId, (newVal) => {
console.log(props.bookobj,'课程选择')
// console.log(props.bookobj,'')
})

View File

@ -16,6 +16,7 @@
<span class="name">{{ item.uniquekey }}</span>
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已结束' : '进行中' }}</el-tag>
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
</div>
<div class="class-time">{{ item.classcaption }} | 截止时间{{ item.deaddate }} </div>
</div>
@ -52,9 +53,25 @@ const getHomework = async () => {
try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'uniquekey DESC', pageSize: 500 })
//
// homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate)
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) //
// homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //
homeworkList.value.forEach((item) => {
// UI
if (item.worktype == '学习目标定位') {
item.workclass = 'success'
item.workcodesList = JSON.parse(item.workcodes)
} else if (item.worktype == '教材研读') {
item.workclass = 'primary'
} else if (item.worktype == '框架梳理') {
item.workclass = 'warning'
} else if (item.worktype == '学科定位') {
item.workclass = 'info'
} else if (item.worktype == '习题训练') {
item.workclass = 'danger'
} else {
item.workclass = ''
}
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
//
if (item.entpcourseworklist != '') {

View File

@ -113,17 +113,17 @@ const menuList = [{
{
name: '作业设计',
icon: '#icon-zuoyesheji',
isOuter: true,
path: '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask',
// path: '/newClassTask',
// isOuter: true,
// path: '/teaching/classtaskassign?titleName=&openDialog=newClassTask',
path: '/newClassTask',
id: '2-1'
},
{
name: '作业布置',
icon: '#icon-zuoyebuzhi',
isOuter: true,
path: '/teaching/classtaskassign?titleName=作业布置',
// path: '/classTaskAssign',
// isOuter: true,
// path: '/teaching/classtaskassign?titleName=',
path: '/classTaskAssign',
id: '2-2'
},
{

View File

@ -130,6 +130,7 @@
<script setup>
import { ref, onMounted } from "vue";
import { creatAIPPT } from '@/utils/talkFile'
import { ElMessage } from 'element-plus'
import {
getBackGround,
@ -195,6 +196,18 @@ const outlineData = ref({
}
)
const emit = defineEmits(['addSuccess'])
const props = defineProps({
currentNode: {
type: Object,
default: () => {}
},
uploadData: {
type: Object,
default: () => {}
}
})
//
function updateStagingData(role, newData) {
stagingData.value.push({ role: role, content: newData });
@ -213,7 +226,12 @@ const outlineCreatePPT = () => {
percentage.value = response.data.process;
if (response.data && response.data.pptUrl && response.data.pptUrl.length > 4) {
console.log('PPT',response)
//TODO window.location.href = response.data.pptUrl;
// window.location.href = response.data.pptUrl;
//URLURL
// 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"
creatAIPPT(props.currentNode.itemtitle + '.pptx',response.data.pptUrl, props.uploadData).then((res) => {
emit('addSuccess',res)
})
ElMessage.success("生成成功");
} else {
const sleepTime = 2000;
@ -602,6 +620,10 @@ 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"
// creatAIPPT(props.currentNode.itemtitle + '.pptx',url, props.uploadData).then((res) => {
// emit('addSuccess',res)
// })
connectWebSocket("");
getBackground();
});

View File

@ -22,7 +22,8 @@
<div class="prepare-item-info-message">
<div style="width: 60px">
<template v-if="item.uniquekey">
{{ item.worktype }}
<!-- {{ item.worktype }} -->
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
</template>
<template v-else>
<el-icon

View File

@ -148,8 +148,26 @@ export default {
this.userInfo = useUserStore().user
},
methods: {
getOpenCourse() {
return Promise.all([listClasscourseNew({teacherid: this.userInfo.userId,status:"open",evalid: this.curNode.id,pageSize:1000}), getSelfReserv({ex2:this.curNode.id})]).then(([res1,res2])=>{
let list2 = res1.rows || []
let list = res2.data || []
let one = list.find(item1 => {
if (item1.status === "上课中") {
return true
}
})
if (one) {
return one
}
if (list2.length>0) {
one = list2[0]
}
return one
})
},
//
getOpenCourse(isApt) {
/*getOpenCourse(isApt) {
const curNodeId = this.curNode.id
if (isApt) { // APT
const params = {teacherid: this.userInfo.userId,status:"open",evalid: curNodeId,pageSize:1000}
@ -161,11 +179,12 @@ export default {
return (res.data || []).filter(o => o.status === "上课中")
})
}
},
},*/
clickStartClass(item) {
const isApt = item.fileFlag === 'apt'
this.getOpenCourse(isApt).then(res => {
if(!res || res.length === 0){
console.log(res)
if(!res){
this.$emit('on-start-class', item)
}else{
ElMessageBox.alert('<strong>上次课程尚未结束,是否继续上课?</strong>', '', {
@ -182,33 +201,14 @@ export default {
confirmButtonClass: "el-button--danger",
center: true,
beforeClose: (action, instance, done) => {
const obj = res[0]
// console.log(action, obj, item)
const obj = res
if (action === 'confirm'){
//
this.$emit('change', 'close', obj, { type: 1, instance, done })
// if (obj.bookImg) {
// // //PPT
// // endClass(obj.id).then((res1) => {
// // if (res1.data === true) {
// // ElMessage({
// // message: '',
// // type: 'success'
// // })
// // obj.status = ''
// // done()
// // }
// // })
// }else {
// //APT -
// // this.$emit('change', 'close', obj, { type: 1, instance, done })
// // this.closeCourse(obj, instance, done)
// }
}
if (action === 'cancel'){
//
if (obj.bookImg) {
console.log('PPT')
//PPT
listEntpcourse({
evalid: obj.ex2,
@ -217,6 +217,26 @@ export default {
}).then(async res1=>{
if (res1.rows[0].id) {
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res1.rows[0].id + "&reservId=" + obj.id })
if (obj.ex4) {
getPrepareById(obj.ex4).then(res2=>{
console.log(res2)
this.openFileWin(res2);
})
}else {
ElMessageBox.confirm(
'抱歉版本V2.1.9前创建的课程无法直接打开PPT请自行打开PPT',
'Warning',
{
confirmButtonText: 'OK',
type: 'warning',
center: true,
}
)
.then(() => {
})
.catch(() => {
})
}
done()
}
})
@ -235,27 +255,6 @@ export default {
})
// this.$emit('on-start-class', item)
},
// ()
// async closeCourse(row, instance, done) {
// instance.confirmButtonLoading = true
// instance.confirmButtonText = '...'
// // -
// if (!!row.timgroupid) {
// const msg = { msgKey: 'closed', actor: 'teacher', classcourseid: row.id }
// Chat.sendMsg(row.timgroupid, msg)
// }
// // -
// const params = { id: row.id, status: 'closed', timgroupid: '' }
// await updateClasscourse(params)
// //
// setTimeout(async() => {
// if (!!row.timgroupid) await Chat.dismissGroup(row.timgroupid)
// instance.confirmButtonLoading = false
// instance.confirmButtonText = ''
// done()
// ElMessage({ type: 'success', message: `` })
// }, 1000)
// },
editTalk(item) {
ElMessageBox.prompt('请输入新的标签', '添加标签', {
confirmButtonText: '确认',

View File

@ -7,7 +7,7 @@
<i class="iconfont icon-guanbi" @click="close"></i>
</div>
</template>
<AiPpt/>
<AiPpt @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData"/>
</el-dialog>
</div>
</template>
@ -15,6 +15,20 @@
<script setup>
import AiPpt from './ai-ppt.vue';
const model = defineModel()
const emit = defineEmits(['addSuccess'])
const props = defineProps({
currentNode: {
type: Object,
default: () => {}
},
uploadData: {
type: Object,
default: () => {}
}
})
const addAiPPT = (data) => {
emit('addSuccess', data)
}
</script>
<style lang="scss" scoped>

View File

@ -101,6 +101,12 @@ const props = defineProps({
default: () => {
return {}
}
},
curFile: {
type: Object,
default: () => {
return {}
}
}
})
const ruleFormDialog = ref(null)
@ -292,7 +298,8 @@ const addClassReserv = (formData) => {
classRoom: formData.classRoom,
classSubject: props.currentNode.edusubject,
ex1: props.bookId,
ex2: props.currentNode.id
ex2: props.currentNode.id,
ex4: props.curFile.id
}
addSmartClassReserv(param).then((res) => {
if (res.msg) {

View File

@ -95,7 +95,8 @@
<div class="prepare-body-header">
<div>
<label style="font-size: 15px">{{ currentWorkList.length }}个作业</label>&nbsp;
<el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button>
<!-- <el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button> -->
<el-button size="small" @click="goNewClassTask()">作业设计</el-button>
</div>
</div>
<div class="prepare-work-wrap">
@ -126,23 +127,26 @@
</div>
<MoveFile v-model="isMoveDialogOpen" @on-submit="chooseMoveCata" />
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" />
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :rows="rows" />
</div>
<reserv
ref="reservDialog"
:current-node="currentNode"
:book-id="uploadData.textbookId"
:cur-file="activeClass"
@add-success="initReserv"
@close="closeChange"
></reserv>
<!-- 上课配置 -->
<class-start ref="calssRef" @close="closeChange"/>
<PptDialog v-model="pptDialog"/>
<PptDialog @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData" v-model="pptDialog"/>
<!-- <button @click="test">test</button> -->
</template>
<script setup>
import { Check,Plus } from '@element-plus/icons-vue'
import Reserv from '@/views/prepare/container/reserv.vue'
import { ArrowDown } from '@element-plus/icons-vue'
import PptDialog from '@/views/prepare/container/ppt-dialog.vue'
</script>
<script>
const Remote = require('@electron/remote')
@ -155,7 +159,6 @@ import { useToolState } from '@/store/modules/tool'
import MoveFile from '@/components/move-file/index.vue'
import FileListItem from '@/views/prepare/container/file-list-item.vue'
import KjListItem from '@/views/prepare/container/kj-list-item.vue'
import PptDialog from './container/ppt-dialog.vue'
import { getSmarttalkPage, moveSmarttalk, creatAPT } from '@/api/file'
import { toTimeText } from '@/utils/date'
import { ElMessage } from 'element-plus'
@ -169,12 +172,12 @@ import { delClasswork, listEntpcourse } from '@/api/teaching/classwork'
import { updateClasscourse } from '@/api/teaching/classcourse'
import { getClassInfo, getSelfReserv, endClass } from '@/api/classManage'
import { useGetHomework } from '@/hooks/useGetHomework'
import { editListItem } from '@/hooks/useClassTask'
import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile'
import ClassReserv from '@/views/classManage/classReserv.vue'
import classStart from './container/class-start.vue' //
import MsgEnum from '@/plugins/imChat/msgEnum' // im
import Chat from '@/utils/chat' // im
import msgEnum from '@/plugins/imChat/msgEnum'
if (!Chat.imChat) Chat.init()
const toolStore = useToolState()
@ -228,7 +231,7 @@ export default {
entpcourseid: '',
//
setDialog: false,
row: '',
rows: '',
isOpenHomework: false,
//
activeClass: null,
@ -286,6 +289,14 @@ export default {
// }
// },
methods: {
addAiPPT(item) {
this.currentFileList.unshift(item.resData)
this.pptDialog = false
},
// test() {
// toolStore.resetDef() //
// ipcMsgSend('tool-sphere:close') //
// },
//
startClass(item, classObj) {
// ()
@ -311,7 +322,7 @@ export default {
}
case 'close': { //
const head = MsgEnum.HEADS.MSG_closed // closed
const msgT = msgEnum.TYPES.TEACHER // teacher
const msgT = MsgEnum.TYPES.TEACHER // teacher
const isApt = !row.bookImg // bookImg ppt Apt
row.ex3 == 'undefined' && (row.ex3 = null)
const timgroupid = isApt ? row.timgroupid : row.ex3 // ex3 ppt Apt
@ -647,33 +658,38 @@ export default {
},
//
handleOutLink(key) {
if (key == 'homeWork') {
this.isOpenHomework = true
}
// key linkConfig.js
let configObj = outLink()[key]
let fullPath = configObj.fullPath
// urlunitId ID
if (key != 'standard' && key != 'aiModel') {
let unitId = this.uploadData.levelSecondId
? this.uploadData.levelSecondId
: this.uploadData.levelFirstId
let bookId = this.uploadData.textbookId;
if(fullPath.indexOf('?') == -1){
fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
}
else{
fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
}
}
// handleOutLink(key) {
// if (key == 'homeWork') {
// this.isOpenHomework = true
// }
// // key linkConfig.js
// let configObj = outLink()[key]
// let fullPath = configObj.fullPath
// // urlunitId ID
// if (key != 'standard' && key != 'aiModel') {
// let unitId = this.uploadData.levelSecondId
// ? this.uploadData.levelSecondId
// : this.uploadData.levelFirstId
// let bookId = this.uploadData.textbookId;
// if(fullPath.indexOf('?') == -1){
// fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
// }
// else{
// fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
// }
// }
//
ipcRenderer.send('openWindow', {
key,
fullPath: fullPath,
cookieData: { ...configObj.data }
})
// //
// ipcRenderer.send('openWindow', {
// key,
// fullPath: fullPath,
// cookieData: { ...configObj.data }
// })
// },
//
goNewClassTask(){
// router.push({ path: '/newClassTask' });
this.$router.push({ path: '/newClassTask' });
},
getWeekday1(date) {
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
@ -682,29 +698,51 @@ export default {
},
//
openSet(row) {
this.row = row
// row list
this.rows = [row]
this.setDialog = true
},
//
openReSet(row) {
//
this.isOpenHomework = true;
// key linkConfig.js
let configObj = outLink()['homeWork']
let fullPath = configObj.fullPath
//
const courseObj = {
textbookId: this.uploadData.textbookId,
levelFirstId: this.uploadData.levelFirstId,
levelSecondId: this.uploadData.levelSecondId,
coursetitle: this.currentNode.itemtitle, // (/) ,
node: this.currentNode, //
}
console.log('courseObj', courseObj)
editListItem(row, courseObj).then((obj) => {
if(obj){
//
this.$router.push({
path: '/newClassTask',
query: {
classtaskObj: JSON.stringify(obj),
}
})
}
});
//---------------------
//
// this.isOpenHomework = true;
// // key linkConfig.js
// let configObj = outLink()['homeWork']
// let fullPath = configObj.fullPath
let unitId = this.uploadData.levelSecondId
? this.uploadData.levelSecondId
: this.uploadData.levelFirstId
let bookId = this.uploadData.textbookId;
fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
// let unitId = this.uploadData.levelSecondId
// ? this.uploadData.levelSecondId
// : this.uploadData.levelFirstId
// let bookId = this.uploadData.textbookId;
// fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
//
ipcRenderer.send('openWindow', {
key: 'homeWork',
fullPath: fullPath,
cookieData: { ...configObj.data }
})
// //
// ipcRenderer.send('openWindow', {
// key: 'homeWork',
// fullPath: fullPath,
// cookieData: { ...configObj.data }
// })
},
//
delhomework(item) {

View File

@ -47,7 +47,7 @@
</div>
</div>
</div>
<el-button color="#349d44" @click="sendHomework(item)">推送</el-button>
<el-button color="#349d44" @click="sendHomework(item,'item')">推送</el-button>
</li>
<div class="no-data flex" v-if="!dataList.length && !resourceList.length">
<i class="iconfont icon-zanwushuju"></i>
@ -56,7 +56,7 @@
</ul>
</el-scrollbar>
</div>
<SetHomework v-model="setDialog" :title="'推送作业'" :entpcourseid="entpcourseid" :row="curRow"
<SetHomework v-model="setDialog" :title="'推送作业'" :entpcourseid="entpcourseid" :rows="curRow"
@on-close="closeHomework" @on-success="successHomework"/>
</div>
<div class="homework flex" v-else>
@ -110,8 +110,11 @@ const curNode = reactive({
data: {}
})
const sendHomework = (row) => {
curRow.value = row
const sendHomework = (row,type) => {
if(type == 'item'){
//
curRow.value = [row]
}
setTimeout(() => {
ipcMsgSend('tool-sphere:set:ignore', false)
}, 200)

View File

@ -98,6 +98,7 @@ onMounted(async() => {
const getClassInfo = async () => {
const { data } = await classManageApi.getClassInfo(classObj.id)
classObj.data = data
sessionStore.set('curClassRoom', classObj) // -
// id
let timGroupId = data?.ex3 || ''
console.log('获取群ID:', timGroupId)