baigl #325
|
@ -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
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -55,6 +55,7 @@ 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({
|
||||||
|
@ -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) {
|
||||||
/**
|
/**
|
||||||
|
@ -227,7 +230,8 @@ const onSubmit = (formEl) => {
|
||||||
id: 0,
|
id: 0,
|
||||||
parentid: props.rows[i].id,
|
parentid: props.rows[i].id,
|
||||||
classid: value,
|
classid: value,
|
||||||
classcourseid: 0,
|
classcourseid: 0, // 课堂id-ppt为字符串不能使用
|
||||||
|
classReservId: classRoomId, // 课堂id
|
||||||
entpcourseid: props.entpcourseid,
|
entpcourseid: props.entpcourseid,
|
||||||
studentlist: JSON.stringify(gradeObj[value]),
|
studentlist: JSON.stringify(gradeObj[value]),
|
||||||
feedback: form.feedback,
|
feedback: form.feedback,
|
||||||
|
|
|
@ -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: {} // 查询资源所需参数
|
||||||
},
|
},
|
||||||
|
|
|
@ -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)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
|
//发消息到主进程,携带名称和URL,将URL下载下来后复制到文件列表并上传到服务
|
||||||
|
// 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();
|
||||||
});
|
});
|
||||||
|
|
|
@ -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: '确认',
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<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>
|
||||||
|
@ -15,6 +15,20 @@
|
||||||
<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>
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -133,17 +133,20 @@
|
||||||
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')
|
||||||
|
@ -156,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'
|
||||||
|
@ -176,7 +178,6 @@ 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()
|
||||||
|
@ -288,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) {
|
||||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||||
|
@ -313,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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue