Compare commits
6 Commits
923006eab1
...
0ccde18f00
Author | SHA1 | Date |
---|---|---|
朱浩 | 0ccde18f00 | |
朱浩 | 274c80ad0a | |
朱浩 | 622cdfe0fe | |
朱浩 | 78b795bf4f | |
朱浩 | 3cced30959 | |
朱浩 | ef9fe838a3 |
|
@ -3,7 +3,14 @@ import path from 'path'
|
||||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import WindiCSS from "vite-plugin-windicss"
|
import WindiCSS from "vite-plugin-windicss"
|
||||||
|
/*import electron from 'vite-plugin-electron'
|
||||||
|
plugins: [electron({
|
||||||
|
main: {
|
||||||
|
builderOptions: {
|
||||||
|
asar: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})],*/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
main: {
|
main: {
|
||||||
plugins: [externalizeDepsPlugin()]
|
plugins: [externalizeDepsPlugin()]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"description": "An Electron application with Vue",
|
"description": "An Electron application with Vue",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
|
@ -45,10 +45,12 @@
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
"jsondiffpatch": "0.6.0",
|
"jsondiffpatch": "0.6.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
"node-addon-api": "^8.1.0",
|
||||||
"pdfjs-dist": "4.4.168",
|
"pdfjs-dist": "4.4.168",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"pinia-plugin-persistedstate": "^3.2.1",
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
"spark-md5": "^3.0.2",
|
"spark-md5": "^3.0.2",
|
||||||
|
"vite-plugin-electron": "^0.28.8",
|
||||||
"vue-qr": "^4.0.9",
|
"vue-qr": "^4.0.9",
|
||||||
"vue-router": "^4.4.0",
|
"vue-router": "^4.4.0",
|
||||||
"xgplayer": "^3.0.19",
|
"xgplayer": "^3.0.19",
|
||||||
|
|
|
@ -21,6 +21,27 @@ File({ app, shell, BrowserWindow, ipcMain })
|
||||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
||||||
let mainWindow, loginWindow
|
let mainWindow, loginWindow
|
||||||
|
|
||||||
|
const additionalData = {myKey:'ys_axi_smarttalk'}
|
||||||
|
const gotTheLock = app.requestSingleInstanceLock(additionalData)
|
||||||
|
|
||||||
|
if(!gotTheLock){
|
||||||
|
app.quit()
|
||||||
|
}else{
|
||||||
|
app.on('second-instance',(event,commandLine,workingDirectory,additionalData)=>{
|
||||||
|
//输入从第二个实例中接收到的数据
|
||||||
|
console.log(additionalData)
|
||||||
|
//有人试图运行第二个实例,我们应该关注我们的窗口
|
||||||
|
if(mainWindow){
|
||||||
|
if(mainWindow.isMinimized()) mainWindow.restore()
|
||||||
|
mainWindow.focus()
|
||||||
|
}
|
||||||
|
if(loginWindow){
|
||||||
|
if(loginWindow.isMinimized()) loginWindow.restore()
|
||||||
|
loginWindow.focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//登录窗口
|
//登录窗口
|
||||||
function createLoginWindow() {
|
function createLoginWindow() {
|
||||||
if (loginWindow) return
|
if (loginWindow) return
|
||||||
|
@ -53,7 +74,7 @@ function createLoginWindow() {
|
||||||
updateInit(loginWindow)
|
updateInit(loginWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
loginWindow.webContents.openDevTools()
|
// loginWindow.webContents.openDevTools()
|
||||||
loginWindow.once('ready-to-show', () => {
|
loginWindow.once('ready-to-show', () => {
|
||||||
loginWindow.show()
|
loginWindow.show()
|
||||||
})
|
})
|
||||||
|
@ -101,7 +122,7 @@ function createMainWindow() {
|
||||||
shell.openExternal(details.url)
|
shell.openExternal(details.url)
|
||||||
return { action: 'deny' }
|
return { action: 'deny' }
|
||||||
})
|
})
|
||||||
mainWindow.webContents.openDevTools()
|
// mainWindow.webContents.openDevTools()
|
||||||
|
|
||||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
||||||
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
||||||
|
|
|
@ -108,6 +108,12 @@ export default {
|
||||||
name: 'FileListItem',
|
name: 'FileListItem',
|
||||||
components: { FileImage },
|
components: { FileImage },
|
||||||
props: {
|
props: {
|
||||||
|
curNode: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function () {
|
default: function () {
|
||||||
|
@ -201,8 +207,8 @@ export default {
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
if (items.fileFlag === 'apt') {
|
if (items.fileFlag === 'apt') {
|
||||||
console.log(items);
|
console.log(this.curNode);
|
||||||
const path="/teaching/aptindex?id="+items.fileId
|
const path="/teaching/aptindex?id="+items.fileId + "&cataId=" + this.curNode.id;
|
||||||
let configObj = outLink().getBaseData()
|
let configObj = outLink().getBaseData()
|
||||||
let fullPath = configObj.fullPath + path
|
let fullPath = configObj.fullPath + path
|
||||||
fullPath = fullPath.replaceAll('//', '/')
|
fullPath = fullPath.replaceAll('//', '/')
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
:index="index"
|
:index="index"
|
||||||
|
:curNode="currentNode"
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-start-class="startClass"
|
@on-start-class="startClass"
|
||||||
>
|
>
|
||||||
|
@ -115,13 +116,13 @@
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="作业" name="作业">
|
<el-tab-pane label="作业" name="作业">
|
||||||
<div class="prepare-body-header">
|
<!-- <div class="prepare-body-header">
|
||||||
<div>
|
<div>
|
||||||
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
||||||
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
|
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
|
||||||
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
|
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="prepare-work-wrap">
|
<div class="prepare-work-wrap">
|
||||||
<file-list-item
|
<file-list-item
|
||||||
v-for="(item, index) in currentWorkList"
|
v-for="(item, index) in currentWorkList"
|
||||||
|
|
Loading…
Reference in New Issue