diff --git a/package.json b/package.json index 2e8e464..0828206 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "pinia-plugin-persistedstate": "^3.2.1", "spark-md5": "^3.0.2", "vue-router": "^4.4.0", + "xgplayer": "^3.0.19", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/src/main/index.js b/src/main/index.js index da96c0b..b482f43 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -150,7 +150,6 @@ async function createLinkWin(data) { // 初始化完成 app.on('ready', () => { process.env.LANG = 'en_US.UTF-8' - process.env['ELECTRON_DISABLE_SANDBOX'] = true; // 设置应用程序用户模型标识符 electronApp.setAppUserModelId('com.electron') diff --git a/src/renderer/index.html b/src/renderer/index.html index 3441296..8ee7d0b 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -8,7 +8,7 @@ http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:" /> --> - + diff --git a/src/renderer/src/components/file-preview/index.vue b/src/renderer/src/components/file-preview/index.vue new file mode 100644 index 0000000..350695b --- /dev/null +++ b/src/renderer/src/components/file-preview/index.vue @@ -0,0 +1,124 @@ + + + + \ No newline at end of file diff --git a/src/renderer/src/components/set-homework/index.vue b/src/renderer/src/components/set-homework/index.vue new file mode 100644 index 0000000..233bf99 --- /dev/null +++ b/src/renderer/src/components/set-homework/index.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/renderer/src/views/prepare/container/set-homework.vue b/src/renderer/src/views/prepare/container/set-homework.vue deleted file mode 100644 index 5aa5d35..0000000 --- a/src/renderer/src/views/prepare/container/set-homework.vue +++ /dev/null @@ -1,332 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index c08bf5b..9ecdac4 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -114,7 +114,6 @@ v-model="setDialog" :entpcourseid="entpcourseid" :row="row" - @on-close="closeHomework" /> + @on-close="closeHomework" @on-success="successHomework"/>
@@ -73,13 +73,12 @@ import { ref, onMounted, toRaw } from 'vue'; import { useRoute } from 'vue-router'; import useUserStore from '@/store/modules/user' -import { getSmarttalkPage, getPrepareById } from '@/api/file' -import SetHomework from '@/views/prepare/container/set-homework.vue' +import { getSmarttalkPage } from '@/api/file' +import SetHomework from '@/components/set-homework/index.vue' import FileImage from '@/components/file-image/index.vue' import { useGetHomework } from '@/hooks/useGetHomework' import { ipcMsgSend, ipcMsgSend2, ipcMsgInvoke } from '@/utils/tool' import { useToolState } from '@/store/modules/tool' -import { asyncLocalFile } from '@/utils/talkFile' import Lesson from './lesson.vue'; import { parseCataByNode } from '@/utils/talkFile' import outLink from '@/utils/linkConfig' @@ -97,11 +96,9 @@ const dataList = ref([]) const setDialog = ref(false) // 资源数据 const resourceList = ref([]) - -// +//当前点击的数据 const curRow = ref('') - const sendHomework = (row) => { curRow.value = row setTimeout(() => { @@ -112,13 +109,13 @@ const sendHomework = (row) => { // const closeHomework = async() => { ipcMsgSend('tool-sphere:set:ignore', true) - // 发送im消息-推送作业(app|平板) - console.log('发送im消息-推送作业(app|平板)', curRow.value.id) - await ipcMsgInvoke('im-chat:msg', curRow.value.id, MsgEnum.HEADS.MSG_0016) - setDialog.value = false } - - +// 推送成功 +const successHomework = ()=>{ + // 发送im消息-推送作业(app|平板) + ipcMsgInvoke('im-chat:msg', curRow.value.id, MsgEnum.HEADS.MSG_0016) +} +// 章节目录change const changeChapter = async (data)=>{ const { res } = await useGetHomework(data) dataList.value = res diff --git a/src/renderer/src/views/tool/components/lesson.vue b/src/renderer/src/views/tool/components/lesson.vue index e6f7914..75241ae 100644 --- a/src/renderer/src/views/tool/components/lesson.vue +++ b/src/renderer/src/views/tool/components/lesson.vue @@ -13,9 +13,8 @@