diff --git a/src/main/file.js b/src/main/file.js index 5637a23..d10cb59 100644 --- a/src/main/file.js +++ b/src/main/file.js @@ -238,7 +238,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) { //下载文件 ipcMain.on('download-file-default', (e, { url, fileName }) => { createFolder('selfFile').then(async () => { - const browserWindow = BrowserWindow.fromId(e.sender.id) + const browserWindow = BrowserWindow.getFocusedWindow() const id = await manager.download({ window: browserWindow, url: url, diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index 26f5c42..de22482 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -61,11 +61,11 @@ const menus = ref([ name: '备课', path: '/prepare' }, - { + /*{ icon: 'icon-jiangke1 icon-teach', name: '授课', path: '/teach' - } + }*/ ]) // 监听当前路由 diff --git a/src/renderer/src/layout/components/Uploader.vue b/src/renderer/src/layout/components/Uploader.vue index 1dd3c9a..ce9c275 100644 --- a/src/renderer/src/layout/components/Uploader.vue +++ b/src/renderer/src/layout/components/Uploader.vue @@ -25,15 +25,6 @@
-
{{ item.raw.name }}
diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index e568161..d6f641e 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -19,7 +19,7 @@ export const constantRoutes = [ path: '/resource', component: () => import('@/views/resource/index.vue'), name: 'resource', - meta: {title: '资源',keepAlive:true} + meta: {title: '资源'} }, { path: '/prepare', diff --git a/src/renderer/src/utils/resourceDict.js b/src/renderer/src/utils/resourceDict.js index eb9275c..a1a1a61 100644 --- a/src/renderer/src/utils/resourceDict.js +++ b/src/renderer/src/utils/resourceDict.js @@ -20,6 +20,10 @@ export const resourceFormat = [ label: 'ppt', value: 'ppt' }, + { + label: 'pptx', + value: 'pptx' + }, { label: 'mp3', value: 'mp3' @@ -62,4 +66,4 @@ export const resourceType = [ label: '教案', value: '教案' } -] \ 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 80ac306..35743ab 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -14,6 +14,7 @@
上课 +
@@ -117,10 +118,15 @@ export default { this.callback(param) }) this.lastAsyncAllTime = localStorage.getItem('lastAsyncAllTime') - + }, mounted() { }, + activated() { + if (this.uploadData.textbookId !== null) { + this.asyncAllFile() + } + }, methods: { createFile() { creatPPT(this.currentNode.label + '.pptx', this.uploadData).then((res) => { @@ -252,9 +258,9 @@ export default { }, // 打开外部链接 handleOutLink(key){ - // key 对应的 linkConfig.js 外部链接配置 + // key 对应的 linkConfig.js 外部链接配置 let configObj = outLink[key] - // 通知主进程 + // 通知主进程 ipcRenderer.send('openWindow', { fullPath: configObj.fullPath, cookieData: {...(configObj.data)} @@ -321,8 +327,16 @@ export default { height: 150px; align-items: center; justify-content: center; - background: linear-gradient(#97c4ed, #7aa8e5); - padding-right: 20px; + position: relative; + background: linear-gradient(#b0d1ef, #3e7bcb); + .top-zoom-style{ + position: absolute; + width: 90%; + height: 30px; + background: linear-gradient(#b0d1ef, #5283c4); + bottom: 0; + clip-path: polygon(3% 0%, 97% 0%, 100% 100%, 0% 100%); + } .textbook-img{ height: 120px; background-color: #ffffff; @@ -330,11 +344,13 @@ export default { border-radius: 6px; overflow: hidden; margin-right: 20px; + z-index: 1; } .top-item{ width: 230px; - + position: relative; flex-wrap: wrap; + z-index: 1; .btn{ width: 102px; background: none; @@ -358,6 +374,7 @@ export default { height: 80px; margin-left: 25px; font-size: 18px; + z-index: 1; .icon-lingdang{ margin-right: 5px; color: #ffffff;