Compare commits

...

16 Commits

Author SHA1 Message Date
baigl 388fc2b2b4 Merge pull request 'baigl' (#333) from baigl into main
Reviewed-on: #333
2024-10-19 15:07:35 +08:00
白了个白 1a671d7dd2 作业批改:session缓存出现莫名缓存数据bug修改 2024-10-19 15:04:51 +08:00
白了个白 0d21b1de53 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-10-19 14:38:29 +08:00
zhengdegang e8763793a7 Merge pull request 'zdg' (#332) from zdg into main
Reviewed-on: #332
2024-10-18 17:08:45 +08:00
zdg a3b940f138 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-18 17:06:14 +08:00
zdg 548442f278 作业推送注释掉im消息发送 2024-10-18 17:06:08 +08:00
朱浩 e02f67e3e5 Merge pull request 'zhuhao_dev' (#331) from zhuhao_dev into main
Reviewed-on: #331
2024-10-18 16:34:01 +08:00
朱浩 6de43cbab3 Merge branch 'main' into zhuhao_dev 2024-10-18 16:32:42 +08:00
朱浩 9552e75f18 解决ppt生成失败的问题 2024-10-18 16:31:57 +08:00
zdg d7f17c253d im 日志 2024-10-18 16:09:55 +08:00
zdg ea6c56a401 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-18 16:09:24 +08:00
白了个白 2bcf780b7b 1 2024-10-18 10:16:25 +08:00
朱浩 670c457a9f 解决ppt生成失败的问题 2024-10-17 11:18:35 +08:00
朱浩 39aa3b157d 解决教材课标切换名字问题 2024-10-17 10:25:55 +08:00
zdg 6be26f19cd Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-17 09:58:37 +08:00
zdg d40873d198 ppt上课发送多次 2024-10-17 09:55:42 +08:00
15 changed files with 88 additions and 70 deletions

View File

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

View File

@ -246,8 +246,10 @@ 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 lastname = decodeURIComponent(url);
name = lastname.substring(lastname.lastIndexOf("/")+1)
let path = appTempFilePath + name.replace(/[\\/:*?"<>|]/, '')
let {type,item} = await downloadFile(url,name)
let {type,item} = await downloadFiles(url,name)
if (type==="成功") {
let fileType = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
let formData = new FormData()
@ -279,7 +281,8 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
})
})
function downloadFile(url,fileName) {
function downloadFiles(url,fileName) {
console.log(url,fileName)
return new Promise((resolve, reject)=>{
const browserWindow = BrowserWindow.getFocusedWindow()
const id = manager.download({

View File

@ -285,8 +285,11 @@ export class ImChat {
// callback: (data) => {}
}
// console.log('发送消息', option)
this.setConsole('%cim-chat: 发送消息', option)
return this.timChat.TIMMsgSendMessageV2(option)
this.setConsole('%cim-chat: 发送消息【req】', conv_id, msg)
return this.timChat.TIMMsgSendMessageV2(option).then(res => {
this.setConsole('%cim-chat: 发送消息【res】', JSON.stringify(res))
return res
})
}
/**
* @description 发送群消息

View File

@ -1,27 +1,49 @@
import axios from "axios";
import { getSignature } from "./index";
import { ElMessage } from "element-plus";
import request from '@/utils/request'
let appId = "01ec9aa3";
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
let timestamp = Math.floor(Date.now() / 1000);
let signature = getSignature(appId, secret, timestamp);
let req = (url, type, data)=>{
let config = {
headers: {
"Content-Type": "application/json",
appId: appId,
timestamp: timestamp,
signature: signature,
},
url: url,
method: type,
}
if (type === "GET") {
config.params = data;
} else {
config.data = data;
}
return request(config)
}
const instance = axios.create({
baseURL: "",
/*const instance = axios.create({
// baseURL: import.meta.env.VITE_APP_ENV === "development"?"/parth":import.meta.env.VITE_APP_BASE_API,
baseURL: "/dev-api",
headers: {
"Content-Type": "application/json",
'Authorization': 'Bearer ' + getToken(),
appId: appId,
timestamp: timestamp,
signature: signature,
},
});
});*/
const createOutline = async (data) => {
console.log("createOutline data:", data);
try {
const response = await instance.post(
"/parth/api/aippt/createOutline",
const response = await req(
"/api/aippt/createOutline",
"POST",
data
);
console.log("createOutline response:", response);
@ -36,7 +58,7 @@ const createOutline = async (data) => {
};
const getBackGround = async () => {
try {
const response = await instance.get("/parth/api/aippt/themeList");
const response = await req("/api/aippt/themeList", "GET");
return response.data;
} catch (error) {
console.error("请求失败:", error);
@ -45,7 +67,7 @@ const getBackGround = async () => {
};
const createPPT = async (data) => {
try {
const response = await instance.post("/parth/api/aippt/create", data);
const response = await req("/api/aippt/create", "POST", data);
console.log("createOutline response:", response);
return response.data;
@ -56,7 +78,7 @@ const createPPT = async (data) => {
};
const createByOutline = async (data) => {
try {
const response = await instance.post("/parth/api/aippt/createByOutline", data);
const response = await req("/api/aippt/createByOutline","POST", data);
console.log("createByOutline response:", response);
return response.data;
@ -67,7 +89,7 @@ const createByOutline = async (data) => {
};
const getProgress = async (id) => {
try {
const response = await instance.get(`/parth/api/aippt/progress?sid=${id}`);
const response = await req(`/api/aippt/progress?sid=${id}`, "GET");
return response.data;
} catch (error) {
console.error("请求失败:", error);
@ -75,4 +97,4 @@ const getProgress = async (id) => {
}
};
export { instance, createOutline, getBackGround, createPPT, getProgress, createByOutline };
export { createOutline, getBackGround, createPPT, getProgress, createByOutline };

View File

@ -237,7 +237,7 @@ const getStudentClassWorkData = async() => {
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
// deaddate: EndDate.value,//
// //status: '1', // 1-
// orderby: "deaddate DESC",// TODO deaddate
// orderby: "deaddate DESC",//
// pageSize: 1000,
// })
@ -401,7 +401,8 @@ const onClickItem = (item) => {
clearInterval(pollingST.value)
console.log('防抖开启弹窗')
sessionStore.set('teachClassWorkItem', item); // item
// sessionStore.set('teachClassWorkItem', item); // item
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
debounceOpenWin();
}

View File

@ -147,7 +147,7 @@
</template>
</div>
</div>
<!-- TODO 课堂展示 常规作业 预览待开发-->
<!-- TODO 课堂展示 预览待开发-->
<!-- 常规作业包含多个格式图片略缩图展示点击放大其他附件跳转另外弹窗查看 -->
<div v-if="currentTag=='常规作业'" :style="{'padding': '15px', 'overflow': 'auto'}">
<div style="margin: 5px; background-color: white">
@ -476,7 +476,8 @@ const debounceOpenWin = debounce(() => {
//
const onClickItem = (item) => {
console.log('防抖开启弹窗')
sessionStore.set('teachClassWorkItem', item); // item
// sessionStore.set('teachClassWorkItem', item); // item
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
debounceOpenWin();
}

View File

@ -652,16 +652,7 @@ const handleClassWorkSave = async () => {
//
classWorkForm.chooseWorkLists = []; // list
classWorkForm.whiteboardObj = ''; // ? //
// refresh the list
//
// this.getClassWorkAllList();
// TODO
//TODO 3
// this.newWorkSpace = false;
// this.newWorkSpaceEdit = false;
// this.workEdit = false;
boardLoading.value = false
})
} finally {
@ -685,16 +676,6 @@ const handleClassWorkSave = async () => {
classWorkForm.chooseWorkLists = []; // list
classWorkForm.whiteboardObj = ''; // ? //
classWorkForm.fileHomeworkList = []; // list
// refresh the list
//
// this.getClassWorkAllList();
// TODO
//TODO 3
// this.newWorkSpace = false;
// this.newWorkSpaceEdit = false;
// this.workEdit = false;
fileLoading.value = false
})

View File

@ -634,8 +634,9 @@ const closeDialog = () => {
onMounted(() => {
// const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
const data = sessionStore.get('teachClassWorkItem');
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
// const data = sessionStore.get('teachClassWorkItem');
// const data = localStorage.getItem('teachClassWorkItem');
console.log(data,'????????????????????' )
if(data){
openDialog(data)

View File

@ -96,7 +96,8 @@ const debounceOpenWin = debounce(() => {
//
const onClickItem = (item) => {
console.log('防抖开启弹窗')
sessionStore.set('teachClassWorkItem', item); // item
// sessionStore.set('teachClassWorkItem', item); // item
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
debounceOpenWin();
}

View File

@ -178,7 +178,7 @@ const getBackground = () => {
treeData.value = [];
getBackGround().then((res) => {
console.log(res);
backGroundList.value = res.data;
backGroundList.value = res;
});
};
@ -222,14 +222,14 @@ const outlineCreatePPT = () => {
activeStep.value = 4
const checkProgress = () => {
getProgress(res.data.sid).then((response) => {
percentage.value = response.data.process;
if (response.data && response.data.pptUrl && response.data.pptUrl.length > 4) {
getProgress(res.sid).then((response) => {
percentage.value = response.process;
if (response && response.pptUrl && response.pptUrl.length > 4) {
console.log('PPT',response)
// 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) => {
creatAIPPT(props.currentNode.itemtitle + '.pptx',response.pptUrl, props.uploadData).then((res) => {
emit('addSuccess',res)
})
ElMessage.success("生成成功");

View File

@ -7,7 +7,7 @@
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
</div>
<div class="stand-head-right">
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.bookName : ''}}</div>
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.itemtitle : ''}}</div>
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
<div class="stand-head-right-row">
<div class="stand-head-right-row-time">更新2024.9.10</div>
@ -72,7 +72,7 @@
<div class="booklist">
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
<el-image class="bookimg" :src="item.avartar" />
<div class="bookname">{{item.bookName}}</div>
<div class="bookname">{{item.itemtitle}}</div>
</div>
</div>
</el-dialog>
@ -173,7 +173,7 @@ const selectHandel = (value) => {
}
//json
const saveJSON = (data) => {
let filename = ''
// const data = {
// name: 'txt',
@ -247,11 +247,12 @@ const getAllSubject = async () => {
rows && rows.map(item => {
if(edustage === item.edustage && item.edusubject === edusubject){
bookInfo.value = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)}
}
if(item.fileurl !== ''){
bookList.value.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)})
if(item.fileurl !== ''){
bookList.value.push(bookInfo.value)
}
}
})
console.log(bookList)
const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
booksel.value = textselidx
const filePath = import.meta.env.VITE_APP_RES_FILE_PATH + bookList.value[textselidx].fileurl.replace('.txt','.pdf')
@ -282,7 +283,7 @@ onMounted(async () => {
const searchh = searchref.value.offsetHeight;
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
}
window.addEventListener('resize', () => {
if(cardref.value && headref.value){
const cardH = cardref.value.offsetHeight;
@ -333,9 +334,9 @@ onMounted(async () => {
console.log('转换后整体文字------',StartStr + midStr + EndStr);
}
})
// const isDev = process.env.NODE_ENV == 'development'
// if (isDev)
// if (isDev)
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
// else
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
@ -552,4 +553,4 @@ onMounted(async () => {
color: #ffffff;
}
}
</style>
</style>

View File

@ -7,7 +7,7 @@
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
</div>
<div class="stand-head-right">
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.bookName: ''}}</div>
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.itemtitle: ''}}</div>
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
<div class="stand-head-right-row">
<div class="stand-head-right-row-time">更新2024.9.10</div>
@ -72,7 +72,7 @@
<div class="booklist">
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
<el-image class="bookimg" :src="item.avartar" />
<div class="bookname">{{item.bookName}}</div>
<div class="bookname">{{item.itemtitle}}</div>
</div>
</div>
</el-dialog>
@ -175,7 +175,7 @@ const selectHandel = (value) => {
}
//json
const saveJSON = (data) => {
let filename = ''
// const data = {
// name: 'txt',
@ -249,7 +249,11 @@ const getAllSubject = async () => {
const dataList = [];
rows && rows.map((item,idx) => {
if(item.fileurl !== ''){
dataList.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: item.fileurl.replace('.txt','')})
let infos = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: item.fileurl.replace('.txt','')}
if(infos.itemgroup==="校本课程") {
infos.avartar = item.avartar
}
dataList.push(infos)
}
})
bookList.value = dataList
@ -265,7 +269,7 @@ const getAllSubject = async () => {
bookInfo.value = {...dataList[0]}
filePath += dataList[0].fileurl.replace('.txt','.pdf')
}
await loadPdfAnimation(filePath)
await loadPdfAnimation(filePath)
}else{
bookInfo.value = {...dataList[0]}
filePath += dataList[0].fileurl.replace('.txt','.pdf')
@ -295,7 +299,7 @@ onMounted(async () => {
const searchh = searchref.value.offsetHeight;
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
}
window.addEventListener('resize', () => {
if(cardref.value && headref.value){
const cardH = cardref.value.offsetHeight;
@ -346,9 +350,9 @@ onMounted(async () => {
console.log('转换后整体文字------',StartStr + midStr + EndStr);
}
})
// const isDev = process.env.NODE_ENV == 'development'
// if (isDev)
// if (isDev)
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
// else
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
@ -570,4 +574,4 @@ onMounted(async () => {
color: #ffffff;
}
}
</style>
</style>

View File

@ -128,7 +128,7 @@ const closeHomework = async() => {
const successHomework = (data)=>{
// console.log('', data)
// im-(app|)
ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016)
// ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016)
}
// change
const changeChapter = async (data)=>{

View File

@ -12,7 +12,7 @@ const props = defineProps({
})
const imChatObj = reactive({imChat:null})
onMounted(() => {
ipcMainHandle() // -ipcMain im
// ipcMainHandle() // -ipcMain im
})
// im-chat
const initImChat = async (timGroupId) => {

View File

@ -105,7 +105,7 @@ const getClassInfo = async () => {
const chat = await imChatRef.value?.initImChat(timGroupId) // im-chat
if (!timGroupId) timGroupId = chat?.timGroupId
if (!timGroupId) return ElMessage.error('房间创建-失败')
classManageApi.startClass(classObj.id, timGroupId) //
if (data.status != '上课中') classManageApi.startClass(classObj.id, timGroupId) //
}
// tab-change
const tabChange = (val) => {
@ -158,7 +158,7 @@ const touchChange = (e) => {
const chatChange = (type, data, ...args) => {
if (type == 'createGroup') { // -
console.log('创建群:', data)
!!data && classManageApi.startClass(classObj.id, data)
// !!data && classManageApi.startClass(classObj.id, data)
} else if (type == 'msg') { // im-chat
if (!data) return // msg message_msg_id
const msgId = (args||[])[0].message_msg_id