diff --git a/package.json b/package.json index 38a2e3a..a28764f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "1.2.2", + "version": "1.2.3", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", diff --git a/src/main/file.js b/src/main/file.js index ddabb2c..58ee5ec 100644 --- a/src/main/file.js +++ b/src/main/file.js @@ -224,7 +224,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) { formData.append(key, uploadData[key]) } } - formData.append('fileFlag', '教案') + formData.append('fileFlag', '课件') uploadFileByFS({ url: uploadUrl, path, diff --git a/src/main/index.js b/src/main/index.js index a4875ac..a7a18bf 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -68,7 +68,7 @@ function createLoginWindow() { function createMainWindow() { mainWindow = new BrowserWindow({ width: 1200, - minWidth: 1200, + minWidth: 1350, height: 700, show: false, frame: false, // 无边框 @@ -142,9 +142,9 @@ async function createLinkWin(data) { .catch((error) => {}) data.fullPath = data.fullPath.replaceAll('//', '/') if (data.fullPath.indexOf('?') !== -1) { - data.fullPath += '&urlSource=smarttalk' + data.fullPath += '&urlSource=smarttalk&t' + Date.now() }else { - data.fullPath += '?urlSource=smarttalk' + data.fullPath += '?urlSource=smarttalk&t' + Date.now() } linkWin[data.key].loadURL(data.fullPath) diff --git a/src/renderer/src/components/file-image/index.vue b/src/renderer/src/components/file-image/index.vue index efe374e..4cc856a 100644 --- a/src/renderer/src/components/file-image/index.vue +++ b/src/renderer/src/components/file-image/index.vue @@ -34,7 +34,7 @@ const getFileTypeIcon = () => { gif: 'icon-gif', txt: 'icon-txt', rar: 'icon-rar', - + apt: 'icon-lunwen' } if (iconObj[name]) { return '#' + iconObj[name] @@ -47,4 +47,4 @@ const getFileTypeIcon = () => { - \ No newline at end of file + diff --git a/src/renderer/src/layout/components/AppMain.vue b/src/renderer/src/layout/components/AppMain.vue index 5e4720d..d57eab4 100644 --- a/src/renderer/src/layout/components/AppMain.vue +++ b/src/renderer/src/layout/components/AppMain.vue @@ -9,7 +9,7 @@ --> -
+
diff --git a/src/renderer/src/views/prepare/container/kj-list-item.vue b/src/renderer/src/views/prepare/container/kj-list-item.vue new file mode 100644 index 0000000..05f068b --- /dev/null +++ b/src/renderer/src/views/prepare/container/kj-list-item.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/renderer/src/views/prepare/container/reserv.vue b/src/renderer/src/views/prepare/container/reserv.vue index c76c36f..623a217 100644 --- a/src/renderer/src/views/prepare/container/reserv.vue +++ b/src/renderer/src/views/prepare/container/reserv.vue @@ -2,7 +2,7 @@ @@ -105,7 +105,7 @@ const userStore = useUserStore().user const centerDialogVisible = ref(false) const form = reactive({ name: '', - type: '常规课', + type: '互动课', day: '', time: [], resource: [], @@ -126,12 +126,6 @@ const ruleForm = reactive({ resource: [{ required: true, message: '请选择授课对象', trigger: 'change' }] }) const locationOptions = [ - { - label: '常规课', - value: '常规课', - disabled: false, - message: '现场公屏授课,学生无需长时间打开平板上。' - }, { label: '互动课', value: '互动课', @@ -288,13 +282,13 @@ const addClassReserv = (formData) => { ex2: props.currentNode.id } addSmartClassReserv(param).then((res) => { - if (res.data === true) { + if (res.msg) { closeDialog() ElMessage({ type: 'success', message: '预约成功!' }) - emit('addSuccess') + emit('addSuccess',res.msg) } else { ElMessage({ type: 'error', diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index b00a3ce..14f3a1a 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -1,8 +1,38 @@ - - -
-
- 作业反馈 - 布置作业 - 上传资料 - - - 新建课件 - - - -
+
+ + + + + + + +
+
+   + 作业反馈 + 布置作业 +
+
+
+ + +
+
+ - - - - - - - - - @@ -149,6 +175,7 @@ import useUserStore from '@/store/modules/user' import { useToolState } from '@/store/modules/tool' import MoveFile from '@/components/move-file/index.vue' import FileListItem from '@/views/prepare/container/file-list-item.vue' +import KjListItem from '@/views/prepare/container/kj-list-item.vue' import { getSmarttalkPage, moveSmarttalk, creatAPT } from '@/api/file' import { toTimeText } from '@/utils/date' import { ElMessage } from 'element-plus' @@ -159,10 +186,10 @@ import outLink from '@/utils/linkConfig' import { createWindow, sessionStore } from '@/utils/tool' import { cloneDeep } from 'lodash' import { delClasswork, listEntpcourse } from '@/api/teaching/classwork' -import { getSelfReserv } from '@/api/classManage' +import { getClassInfo, getSelfReserv } from '@/api/classManage' import { useGetHomework } from '@/hooks/useGetHomework' import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile' - +import ClassReserv from '@/views/classManage/classReserv.vue' const toolStore = useToolState() const fs = require('fs') @@ -175,9 +202,11 @@ export default { Refresh, uploadDialog, FileListItem, + KjListItem, FileOperBatch, MoveFile, - SetHomework + SetHomework, + ClassReserv }, data() { return { @@ -196,6 +225,8 @@ export default { curClassReserv: {}, downloadNum: 0, lastAsyncAllTime: '', + activeTab: "素材", + activeAptTab: "教学课件", uploadData: { textbookId: null, levelFirstId: 39103, @@ -219,6 +250,12 @@ export default { return ( this.checkFileList.length > 0 && this.checkFileList.length === this.currentFileList.length ) + }, + currentKJFileList() { + return this.currentFileList.filter((item) => item.fileFlag === 'apt' || item.fileFlag === '课件') + }, + currentSCFileList() { + return this.currentFileList.filter((item) => item.fileFlag !== 'apt' && item.fileFlag !== '课件') } }, @@ -230,13 +267,13 @@ export default { this.callback(param) }) this.lastAsyncAllTime = localStorage.getItem('lastAsyncAllTime') - this.initReserv() + // this.initReserv() }, mounted() { this.$watch( () => toolStore.isToolWin, (newD, oldD) => { - setTimeout(this.initReserv, 500) + // setTimeout(this.initReserv, 500) } ) // electron 当前窗口 @@ -256,16 +293,19 @@ export default { // } // }, methods: { - initReserv() { - getSelfReserv().then((res) => { - let list = res.data.filter((item) => { - return item.status !== '已结束' - }) - if (list.length > 0) { - this.curClassReserv = list[list.length - 1] - } else { - this.curClassReserv = {} - } + startClass(item) { + console.log(item) + if(item.fileFlag === '课件') { + this.openReserv() + } + if(item.fileFlag === 'apt') { + //TODO 打开apt + } + }, + initReserv(id) { + getClassInfo(id).then((res) => { + this.curClassReserv = res.data + this.openLesson(res.data.id); }) }, getBookPathFromServer() { @@ -312,7 +352,7 @@ export default { }, createAptFile() { listEntpcourse({ - evalid: this.uploadData.levelSecondId, + evalid: this.currentNode.id, edituserid: this.userStore.userId, pageSize: 500 }).then((response) => { @@ -596,7 +636,7 @@ export default { }) }, // 上课-工具类悬浮 - async openLesson() { + async openLesson(id) { // await startClass(this.curClassReserv.id) createWindow('tool-sphere', { url: @@ -605,7 +645,7 @@ export default { '&label=' + this.currentNode.label + '&reservId=' + - this.curClassReserv.id + id }) } } @@ -643,20 +683,78 @@ export default { user-select: none; padding-top: 10px; height: 100%; - + :deep(.el-tabs__nav) { + .el-tabs__item{ + font-weight: bold; + font-size: 18px; + } + } + .page-center-wrap{ + flex: 1; + height: 100%; + padding: 0 10px; + .prepare-center-jxkj{ + height: 100%; + display: flex; + flex-direction: column; + .prepare-center-header{ + display: flex; + cursor: pointer; + .center-create-btn{ + cursor: pointer; + margin: 5px; + flex: 1; + height: 60px; + border-radius: 5px; + .create-btn-title{ + font-weight: 900; + display: flex; + align-items: center; + justify-content: center; + font-size: 15px; + color: #ffffff; + height: 15px; + margin-top: 15px; + label{ + cursor: pointer; + } + } + .create-btn-info{ + cursor: pointer; + font-size: 12px; + color: #ffffff; + margin-top: 5px; + } + } + } + .prepare-center-body{ + flex: 1; + overflow: auto; + } + } + .prepare-center-jxsl{ + height: 100%; + } + } .page-right { overflow: hidden; position: relative; - min-width: 0; - flex: 1; - margin-left: 20px; + min-width: 375px; + width: 375px; height: 100%; background: #ffffff; border-radius: 10px; box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06); display: flex; flex-direction: column; - + .prepare-tabs{ + height: 100%; + :deep(.el-tab-pane) { + height: 100%; + display: flex; + flex-direction: column; + } + } .header-top { height: 150px; align-items: center; @@ -742,20 +840,24 @@ export default { } .prepare-body-header { - height: 60px; + //height: 60px; width: 100%; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; - padding: 0 20px; + //padding: 0 20px; + } + .prepare-work-wrap{ + width: 100%; + flex: 1; + overflow: auto; } - .prepare-body-main { flex: 1; width: 100%; overflow: auto; - padding: 0 30px; + //padding: 0 30px; line-height: normal; } }