关闭自动同步文件,超过150M文件不允许加入课程

This commit is contained in:
朱浩 2024-11-21 17:20:10 +08:00
parent 1417919f74
commit 36f3018269
5 changed files with 15 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.1.30",
"version": "2.1.33",
"description": "",
"main": "./out/main/index.js",
"author": "上海交大重庆人工智能研究院",

View File

@ -280,14 +280,14 @@ export default {
cookie,
fileType: item.fileType
})
ipcRenderer.on('listen-file-change-on' + item.fileNewName, () => {
/*ipcRenderer.on('listen-file-change-on' + item.fileNewName, () => {
items.async = 'on'
})
ipcRenderer.on('listen-file-change-success' + item.fileNewName, (e, { data, md5 }) => {
items.fileSize = data.fileSize
items.md5 = md5
items.async = true
})
})*/
}
})
})

View File

@ -357,14 +357,14 @@ export default {
cookie,
fileType: item.fileType
})
ipcRenderer.on('listen-file-change-on' + item.fileNewName, () => {
/*ipcRenderer.on('listen-file-change-on' + item.fileNewName, () => {
items.async = 'on'
})
ipcRenderer.on('listen-file-change-success' + item.fileNewName, (e, { data, md5 }) => {
items.fileSize = data.fileSize
items.md5 = md5
items.async = true
})
})*/
}
})
})

View File

@ -161,7 +161,11 @@ const delRow = (item) => {
}
//
const addLesson = ({ id }) => {
const addLesson = ({ id, fileSize }) => {
if (fileSize>1024*1024*150) {
ElMessage.warning('文件超过150M暂停超过150M资源的下载请重新选择')
return
}
let data = {
id,
fileRoot: '备课',

View File

@ -121,6 +121,10 @@ const handleRow = (item) => {
thirdPreview.value.init(item.itemId)
}
const openChapter = (item)=>{
if (item.size>1024*1024*150) {
ElMessage.warning('文件超过150M暂停超过150M资源的下载请重新选择')
return
}
currentItem.value = item
//
treelogRef.value.openDialog()