标题:
-
-
+
+
.{{ getFileSuffix(item.name) }}
类别:
-
+
@@ -58,6 +60,7 @@ const props = defineProps({
},
})
const dialogValue = ref(false)
+const limit = ref(5)
// 定义要发送的emit事件
const emit = defineEmits(['update:modelValue', 'submitFile'])
// 文件列表
@@ -68,7 +71,7 @@ watch(() => props.modelValue, (newVal) => {
})
const hanleFileChange = (file) => {
- console.log(file)
+ console.log(file)
//音频 类型
const audioTypes = ['audio/mpeg', 'audio/wav', 'audio/ogg', 'audio/aac']
@@ -81,9 +84,9 @@ const hanleFileChange = (file) => {
// pdf 类型
const pdfTypes = ['application/pdf']
// zip 类型
- const zipTypes = ['application/x-zip-compressed','application/x-compressed']
+ const zipTypes = ['application/x-zip-compressed', 'application/x-compressed']
// 图片 类型
- const imgTypes = ['image/jpeg','image/gif', 'image/png']
+ const imgTypes = ['image/jpeg', 'image/gif', 'image/png']
// text 类型
const textTypes = ['text/plain']
@@ -93,22 +96,39 @@ const hanleFileChange = (file) => {
return false
}
// 验证文件大小
+ // B < KB < MB < GB
+ // file.raw.size 单位是B
const fileSize = file.raw.size / 1024 / 1024 > 100
if (fileSize) {
ElMessage.error('文件大小错误! 请上传小于100M的文件!')
return false
}
if (file.status === 'ready') {
-
+
// 给一个默认的fileData
file.fileData = {
- fileFlag: '课件',
+ fileFlag: '素材',
name: getFileName(file.name),
}
fileList.value.push(file)
+ console.log(fileList.value)
}
}
+// 检查文件类型
+const checkFile = (item, file) => {
+ const type = file.raw.type
+ const pptTypes = ['application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation']
+ let isPpt = pptTypes.includes(type)
+ if(!isPpt && item.value == '教案'){
+ return true
+ }
+ else{
+ return false
+ }
+
+}
+
// 删除
const delFile = (index) => {
fileList.value.splice(index, 1)
@@ -133,7 +153,7 @@ const submitFile = () => {
item.fileData.fileShowName = item.fileData.name + '.' + suffix
delete item.fileData.name
})
- emit('submitFile',fileList.value)
+ emit('submitFile', fileList.value)
closeDialog()
}
@@ -203,24 +223,28 @@ const submitFile = () => {
}
}
}
+
.file-input {
border-bottom: solid #dfdfdf 1px;
+
&:hover {
border-color: #409EFF;
}
- &:focus{
+
+ &:focus {
border-color: #409EFF;
}
}
-:deep(.el-input__wrapper){
- box-shadow: none
-}
-:deep(.el-input__wrapper.is-focus){
- box-shadow: none
-}
-:deep(.el-input__wrapper:hover){
+:deep(.el-input__wrapper) {
box-shadow: none
}
+:deep(.el-input__wrapper.is-focus) {
+ box-shadow: none
+}
+
+:deep(.el-input__wrapper:hover) {
+ box-shadow: none
+}
diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue
index 8c96268..40c49c2 100644
--- a/src/renderer/src/layout/components/Header.vue
+++ b/src/renderer/src/layout/components/Header.vue
@@ -25,6 +25,7 @@
个人中心
+ 班级中心
退出登录
@@ -214,6 +215,7 @@ function setLayout() {
height: 30px;
border-radius: 10px;
margin-top: 8px;
+ margin-right: 10px;
}
.user-avatar:hover {
diff --git a/src/renderer/src/store/modules/delClass.js b/src/renderer/src/store/modules/delClass.js
new file mode 100644
index 0000000..cd91643
--- /dev/null
+++ b/src/renderer/src/store/modules/delClass.js
@@ -0,0 +1,22 @@
+/*
+ author: yangws
+ time: 2024-20-24 17:20:50
+ function: 用于删除班级更新主页面
+*/
+import { defineStore } from "pinia"
+
+const delClassDemo = defineStore(
+ 'del',
+ {
+ state: () => ({
+ idDelete: false
+ }),
+ actions: {
+ //删除提醒
+ isDelClass(){
+ this.idDelete = true
+ }
+ }
+ })
+
+export default delClassDemo
diff --git a/src/renderer/src/utils/linkConfig.js b/src/renderer/src/utils/linkConfig.js
index 54e03ea..09c7aa1 100644
--- a/src/renderer/src/utils/linkConfig.js
+++ b/src/renderer/src/utils/linkConfig.js
@@ -33,8 +33,15 @@ const standard = {
fullPath: `${baseConfig.url}/teaching/chatwithstandard`
}
+// 教学大模型
+const aiModel = {
+ data: { ...baseConfig},
+ fullPath: `${baseConfig.url}/platofai`
+}
+
export default {
homeWork,
gk,
- standard
+ standard,
+ aiModel
}
\ No newline at end of file
diff --git a/src/renderer/src/views/classManage/aside.vue b/src/renderer/src/views/classManage/aside.vue
new file mode 100644
index 0000000..a6c4370
--- /dev/null
+++ b/src/renderer/src/views/classManage/aside.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/classManage/basicGroup.vue b/src/renderer/src/views/classManage/basicGroup.vue
new file mode 100644
index 0000000..791b6ff
--- /dev/null
+++ b/src/renderer/src/views/classManage/basicGroup.vue
@@ -0,0 +1,417 @@
+
+
+
+
+
+
+ 可用分组
+
+
+
+
+
+ 小组名称:
+
+ {{item.groupname}}
+
+
+
+
+ 共{{item.studentcount}}名学生
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userStore.edusubject }}
+
+
+ 请首先创建小组,完成后再点击进入添加学生
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+
+
+
+
+ 已选学生:
+
+
+ {{stuItem.studentname}}
+ {{!stuItem.choose?'设置组长':''}}
+
+
+
+
+
+ 未选学生:
+
+
+ {{stuItem.name || stuItem.studentname}}
+
+
+
+
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/classManage/classInfo.vue b/src/renderer/src/views/classManage/classInfo.vue
new file mode 100644
index 0000000..f15d02b
--- /dev/null
+++ b/src/renderer/src/views/classManage/classInfo.vue
@@ -0,0 +1,80 @@
+
+
+
+
+ 删除班级
+
+
+
+ {{ classInfo.className }}
+
+
+ {{item.name}}
+
+ 暂无
+
+ {{ classInfo.student.length }}人
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/classManage/index.vue b/src/renderer/src/views/classManage/index.vue
new file mode 100644
index 0000000..4ba11ad
--- /dev/null
+++ b/src/renderer/src/views/classManage/index.vue
@@ -0,0 +1,292 @@
+
+
+
+
+
+
+
+
+ 新增班级
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.itemtitle }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ {{ userStore.nickName }}
+
+
+
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/classManage/studentList.vue b/src/renderer/src/views/classManage/studentList.vue
new file mode 100644
index 0000000..9bc1402
--- /dev/null
+++ b/src/renderer/src/views/classManage/studentList.vue
@@ -0,0 +1,454 @@
+
+
+
+
+
+
+ 新增学生
+ 导入学生
+
+
点击学生头像查看学生信息
+
+
+
+
+
+
+
+
+
+
{{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 空缺
+ 男生
+ 女生
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 系统自动创建
+
+
+
+
+ 系统自动创建,默认为123123
+
+
+
+
+
+
+ 移出班级
+ 删除学生
+ 取 消
+ 确 定
+
+
+
+
+
+
+ 下载学生名单的Excel模板
+
+
+ 打开下载到本地的Excel,填写学生的姓名等数据。
+
+
+
+
+ 将Excel文件拖到此处,或点击上传
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue
index a485a49..865ed60 100644
--- a/src/renderer/src/views/prepare/index.vue
+++ b/src/renderer/src/views/prepare/index.vue
@@ -10,7 +10,7 @@
课标研读
电子课本
高考研读
- 教学大模型
+ 教学大模型
+
删除
@@ -65,11 +65,15 @@ import FileImage from '@/components/file-image/index.vue'
import { deleteSmarttalk, updateSmarttalk } from '@/api/file'
import { addFileToPrepare } from '@/api/subject'
import { getFileSuffix } from '@/utils/ruoyi'
+import useUserStore from '@/store/modules/user'
import useResoureStore from '../store'
const { ipcRenderer } = window.electron || {}
+const userstore = useUserStore()
const sourceStore = useResoureStore()
+const userInfo = userstore.user
+
// 分页change
const handleSizeChange = (limit) => {
sourceStore.query.pageSize = limit
diff --git a/src/renderer/src/views/resource/index.vue b/src/renderer/src/views/resource/index.vue
index 8550e42..ecae1b5 100644
--- a/src/renderer/src/views/resource/index.vue
+++ b/src/renderer/src/views/resource/index.vue
@@ -64,14 +64,13 @@ const submitFile = (data) => {
let fileList = toRaw(data)
const { textbookId, levelFirstId, levelSecondId, fileSource, fileRoot } = sourceStore.query
// 给每个文件添加属性
- let fileData = { textbookId, levelFirstId, levelSecondId, fileSource, fileRoot }
fileList.forEach(item => {
+ let fileData = { textbookId, levelFirstId, levelSecondId, fileSource, fileRoot }
fileData.fileShowName = item.fileData.fileShowName
fileData.fileFlag = item.fileData.fileFlag
item.fileData = fileData
item.callback = fileCallBack
})
- // console.log(fileList)
uploaderState().pushFile(fileList)
}