Compare commits

...

31 Commits

Author SHA1 Message Date
小杨 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
“zouyf” 26c388f31c Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk 2024-10-16 09:23:28 +08:00
“zouyf” d9ddb1982b [作业批改] - 重新优化常规作业逻辑 2024-10-16 09:22:18 +08:00
朱浩 3942f894b0 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk 2024-10-15 18:40:07 +08:00
朱浩 ec8f7b5727 无法上课PPT的问题解决 2024-10-15 18:39:50 +08:00
朱浩 fe9e0c1fe2 删除沉余代码 2024-10-15 17:47:32 +08:00
yangws 1a447b30fb Merge pull request 'fix:作业批阅柱状图改为百分比显示;' (#321) from yangws into main
Reviewed-on: #321
2024-10-15 16:36:21 +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
27 changed files with 838 additions and 864 deletions

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "aix-win", "name": "aix-win",
"version": "2.1.5", "version": "2.1.9",
"description": "", "description": "",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "example.com", "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) => { ipcMain.on('get-root-file-path', (e) => {
e.reply('get-root-file-path-reply', appRootFilePath) e.reply('get-root-file-path-reply', appRootFilePath)

View File

@ -18,6 +18,14 @@ export function listClassworkdataByDeadDate(query) {
}) })
} }
// 查询classworkdata详细
export function getClassworkdata(id) {
return request({
url: '/education/classworkdata/' + id,
method: 'get'
})
}
// 查询classworkdata列表 班级作业列表 // 查询classworkdata列表 班级作业列表
export function listClassworkdata(query) { export function listClassworkdata(query) {
return request({ return request({

View File

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

View File

@ -10,12 +10,12 @@
<li class="flex" :class="[activeId == menu.path ? 'active-li' : '', menu.disabled ? 'disabled' : '']" <li class="flex" :class="[activeId == menu.path ? 'active-li' : '', menu.disabled ? 'disabled' : '']"
v-for="menu in headerMenus" :key="menu.id" @click="clickMenu(menu)"> v-for="menu in headerMenus" :key="menu.id" @click="clickMenu(menu)">
<div class="icon-box"> <div class="icon-box">
<svg class="icon iconfont" aria-hidden="true"> <svg class="icon iconfont" aria-hidden="true">
<use :xlink:href="menu.icon"></use> <use :xlink:href="menu.icon"></use>
</svg> </svg>
</div> </div>
<span class="text">{{ menu.name }}</span> <span class="text">{{ menu.name }}</span>
</li> </li>
@ -80,8 +80,8 @@ import { updateUserInfo } from '@/api/system/user'
import logoIco from '@/assets/images/logo.png' import logoIco from '@/assets/images/logo.png'
import { listEvaluation } from '@/api/classManage/index' import { listEvaluation } from '@/api/classManage/index'
import { sessionStore } from '@/utils/store' import { sessionStore } from '@/utils/store'
import Chat from '@/utils/chat' // im // import Chat from '@/utils/chat' // im
if (!Chat.imChat) Chat.init() // if (!Chat.imChat) Chat.init()
let homeTitle = ref(import.meta.env.VITE_APP_TITLE) let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
@ -145,7 +145,7 @@ function handleCommand(command) {
break break
case 'logout': case 'logout':
logout() logout()
Chat?.logout() // im 退 // Chat?.logout() // im 退
break break
default: default:
break break
@ -161,7 +161,9 @@ function logout() {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(async () => {
const Chat = (await import('@/utils/chat')).default
if (!!Chat.imChat) Chat.logout()
userStore userStore
.logOut() .logOut()
.then(() => { .then(() => {
@ -172,8 +174,7 @@ function logout() {
// router.replace('/login') // router.replace('/login')
ipcRenderer && ipcRenderer.send('openLoginWindow') ipcRenderer && ipcRenderer.send('openLoginWindow')
}) })
}) }).catch(()=>{})
.catch(() => { })
} }
const emits = defineEmits(['setLayout']) const emits = defineEmits(['setLayout'])
@ -183,10 +184,10 @@ function setLayout() {
// //
const changeSubject = async (command) =>{ const changeSubject = async (command) =>{
let sessionSubject = { let sessionSubject = {
bookList: null, bookList: null,
curBook: null, curBook: null,
curNode: null, curNode: null,
defaultExpandedKeys: [], defaultExpandedKeys: [],
subjectTree: [] subjectTree: []
} }
sessionStore.set( 'subject', sessionSubject) sessionStore.set( 'subject', sessionSubject)

View File

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

View File

@ -20,9 +20,9 @@ export class Chat {
} }
/** /**
* 初始化 获取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) {
@ -69,7 +69,6 @@ export class Chat {
async logout() { async logout() {
if (!this.imChat) return if (!this.imChat) return
await this.imChat?.logout() await this.imChat?.logout()
imChat = null
this.imChat = null this.imChat = null
} }
// 发群消息 // 发群消息
@ -95,4 +94,4 @@ export class Chat {
} }
} }
export default new Chat() export default new Chat()

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -460,12 +460,13 @@ import useUserStore from '@/store/modules/user'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
// import { Plus } from '@element-plus/icons-vue' // import { Plus } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import { updateClassworkeval, updateClassworkdata } from '@/api/classTask' import { updateClassworkeval, updateClassworkdata, getClassworkdata } from '@/api/classTask'
import { getTimeDate } from '@/utils/date' import { getTimeDate } from '@/utils/date'
import ReFilePreview from '@/components/refile-preview/index.vue' import ReFilePreview from '@/components/refile-preview/index.vue'
import { quizStrToList } from '@/utils/comm'; import { quizStrToList } from '@/utils/comm';
const userStore = useUserStore() const userStore = useUserStore()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
@ -644,7 +645,7 @@ const selectScore = (score) => {
} }
// //
const acceptParams = (params) => { const acceptParams = async (params) => {
console.log(params) console.log(params)
console.log(dialogProps, 'dialogProps') console.log(dialogProps, 'dialogProps')
// //
@ -709,8 +710,9 @@ const acceptParams = (params) => {
if (params.studentObj.worktype == '常规作业') { if (params.studentObj.worktype == '常规作业') {
try { try {
// datacontent TODO // datacontent TODO
if (params.studentObj.datacontent != '') { const res = await getClassworkdata(params.studentObj.id);
const teachWorkFileList = JSON.parse(params.studentObj.datacontent) if(res.data.datacontent != ''){
const teachWorkFileList = JSON.parse(res.data.datacontent);
console.log(teachWorkFileList, '老师filelist-------------') console.log(teachWorkFileList, '老师filelist-------------')
teachWorkFileList && teachWorkFileList &&
teachWorkFileList.forEach((item) => { teachWorkFileList.forEach((item) => {
@ -727,7 +729,6 @@ const acceptParams = (params) => {
teacherFeedContentList.value.push(teachWorkFileList) teacherFeedContentList.value.push(teachWorkFileList)
} }
dialogProps.value.studentObj.datacontent = dialogProps.value.studentObj.datacontent
} catch (error) { } catch (error) {
console.error('Invalid JSON:', error) console.error('Invalid JSON:', error)
} }

View File

@ -418,15 +418,15 @@ const getStudentClassWorkDataDetail = (row) => {
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0 wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
// html // html
wevalres.rows[w].rightanswer = // wevalres.rows[w].rightanswer =
wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null // wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '') // ? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
: wevalres.rows[w].rightanswer // : wevalres.rows[w].rightanswer
// html // // html
wevalres.rows[w].feedcontent = // wevalres.rows[w].feedcontent =
wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null // wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '') // ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
: wevalres.rows[w].feedcontent // : wevalres.rows[w].feedcontent
if (classWorkAnalysis.row.worktype == '常规作业') { if (classWorkAnalysis.row.worktype == '常规作业') {
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent) wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)

View File

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

View File

@ -410,15 +410,15 @@ const getStudentClassWorkDataDetail = (row) => {
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0 wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
// html // html
wevalres.rows[w].rightanswer = // wevalres.rows[w].rightanswer =
wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null // wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '') // ? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
: wevalres.rows[w].rightanswer // : wevalres.rows[w].rightanswer
// html // // html
wevalres.rows[w].feedcontent = // wevalres.rows[w].feedcontent =
wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null // wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '') // ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
: wevalres.rows[w].feedcontent // : wevalres.rows[w].feedcontent
if (classWorkAnalysis.row.worktype == '常规作业') { if (classWorkAnalysis.row.worktype == '常规作业') {
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent) wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)

View File

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

View File

@ -47,7 +47,7 @@
<el-card class="card2" v-if="activeStep == 1"> <el-card class="card2" v-if="activeStep == 1">
<div class="paragraphs"> <div class="paragraphs">
{{ outputText }} {{ outputText }}
</div> </div>
</el-card> </el-card>
<el-card class="card3" v-if="activeStep == 2"> <el-card class="card3" v-if="activeStep == 2">
<div class="outline"> <div class="outline">
@ -130,6 +130,7 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { creatAIPPT } from '@/utils/talkFile'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { import {
getBackGround, 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) { function updateStagingData(role, newData) {
stagingData.value.push({ role: role, content: newData }); stagingData.value.push({ role: role, content: newData });
@ -213,7 +226,12 @@ const outlineCreatePPT = () => {
percentage.value = response.data.process; percentage.value = response.data.process;
if (response.data && response.data.pptUrl && response.data.pptUrl.length > 4) { if (response.data && response.data.pptUrl && response.data.pptUrl.length > 4) {
console.log('PPT',response) 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("生成成功"); ElMessage.success("生成成功");
} else { } else {
const sleepTime = 2000; const sleepTime = 2000;
@ -602,6 +620,10 @@ 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"
// creatAIPPT(props.currentNode.itemtitle + '.pptx',url, props.uploadData).then((res) => {
// emit('addSuccess',res)
// })
connectWebSocket(""); connectWebSocket("");
getBackground(); getBackground();
}); });

View File

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

View File

@ -148,8 +148,26 @@ export default {
this.userInfo = useUserStore().user this.userInfo = useUserStore().user
}, },
methods: { 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 const curNodeId = this.curNode.id
if (isApt) { // APT if (isApt) { // APT
const params = {teacherid: this.userInfo.userId,status:"open",evalid: curNodeId,pageSize:1000} 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 === "上课中") return (res.data || []).filter(o => o.status === "上课中")
}) })
} }
}, },*/
clickStartClass(item) { clickStartClass(item) {
const isApt = item.fileFlag === 'apt' const isApt = item.fileFlag === 'apt'
this.getOpenCourse(isApt).then(res => { this.getOpenCourse(isApt).then(res => {
if(!res || res.length === 0){ console.log(res)
if(!res){
this.$emit('on-start-class', item) this.$emit('on-start-class', item)
}else{ }else{
ElMessageBox.alert('<strong>上次课程尚未结束,是否继续上课?</strong>', '', { ElMessageBox.alert('<strong>上次课程尚未结束,是否继续上课?</strong>', '', {
@ -182,33 +201,14 @@ export default {
confirmButtonClass: "el-button--danger", confirmButtonClass: "el-button--danger",
center: true, center: true,
beforeClose: (action, instance, done) => { beforeClose: (action, instance, done) => {
const obj = res[0] const obj = res
// console.log(action, obj, item)
if (action === 'confirm'){ if (action === 'confirm'){
// //
this.$emit('change', 'close', obj, { type: 1, instance, done }) 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 (action === 'cancel'){
// //
if (obj.bookImg) { if (obj.bookImg) {
console.log('PPT')
//PPT //PPT
listEntpcourse({ listEntpcourse({
evalid: obj.ex2, evalid: obj.ex2,
@ -217,6 +217,26 @@ export default {
}).then(async res1=>{ }).then(async res1=>{
if (res1.rows[0].id) { if (res1.rows[0].id) {
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res1.rows[0].id + "&reservId=" + obj.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() done()
} }
}) })
@ -235,27 +255,6 @@ export default {
}) })
// this.$emit('on-start-class', item) // 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) { editTalk(item) {
ElMessageBox.prompt('请输入新的标签', '添加标签', { ElMessageBox.prompt('请输入新的标签', '添加标签', {
confirmButtonText: '确认', confirmButtonText: '确认',

View File

@ -7,14 +7,28 @@
<i class="iconfont icon-guanbi" @click="close"></i> <i class="iconfont icon-guanbi" @click="close"></i>
</div> </div>
</template> </template>
<AiPpt/> <AiPpt @add-success="addAiPPT" :currentNode="currentNode" :uploadData="uploadData"/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script setup> <script setup>
import AiPpt from './ai-ppt.vue'; import AiPpt from './ai-ppt.vue';
const model = defineModel() 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -30,4 +44,4 @@
cursor: pointer; cursor: pointer;
} }
} }
</style> </style>

View File

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

View File

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

View File

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

View File

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