Compare commits
12 Commits
5879f3d5e8
...
fab449cc96
Author | SHA1 | Date |
---|---|---|
“zouyf” | fab449cc96 | |
朱浩 | 4d20a27177 | |
朱浩 | 302c82503a | |
朱浩 | afd1a1dcf9 | |
zhengdegang | 9c1cd2a2fc | |
zdg | dc39486620 | |
zdg | 62881bc052 | |
zouyf | 812e799e2a | |
朱浩 | 521247f817 | |
朱浩 | 79cb126728 | |
朱浩 | 810a734fa5 | |
朱浩 | b43422f389 |
|
@ -18,4 +18,4 @@ VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktx
|
||||||
|
|
||||||
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
||||||
|
|
||||||
VITE_SHOW_DEV_TOOLS = 'true'
|
VITE_SHOW_DEV_TOOLS = 'false'
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.1.14",
|
"version": "2.1.18",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "上海交大重庆人工智能研究院",
|
||||||
"homepage": "https://electron-vite.org",
|
"homepage": "https://electron-vite.org",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
|
|
|
@ -271,12 +271,13 @@ app.on('window-all-closed', () => {
|
||||||
function handleAll() {
|
function handleAll() {
|
||||||
const chatInstance = chat.initialize() // im-chat 实例
|
const chatInstance = chat.initialize() // im-chat 实例
|
||||||
// 新窗口创建-监听
|
// 新窗口创建-监听
|
||||||
ipcMain.on('new-window', (e, data) => {
|
ipcMain.handle('new-window', (e, data) => {
|
||||||
const { id, type } = data
|
const { id, type } = data
|
||||||
const win = BrowserWindow.fromId(id)
|
const win = BrowserWindow.fromId(id)
|
||||||
win.type = type // 绑定独立标识
|
win.type = type // 绑定独立标识
|
||||||
remote.enable(win.webContents) // 开启远程服务
|
remote.enable(win.webContents) // 开启远程服务
|
||||||
chatInstance.enable(win.webContents) // 开启im-chat
|
chatInstance.enable(win.webContents) // 开启im-chat
|
||||||
|
console.log(`主进程 [${type}]: 窗口注册-远程代理-完毕(${Date.now()})`)
|
||||||
})
|
})
|
||||||
// 用于监听-状态管理变化-同步所有窗口
|
// 用于监听-状态管理变化-同步所有窗口
|
||||||
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {
|
ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
|
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
|
||||||
<el-dropdown-item @click="changePage('/classReserv')">课程预约</el-dropdown-item>
|
<!-- <el-dropdown-item @click="changePage('/classReserv')">课程预约</el-dropdown-item>-->
|
||||||
<el-dropdown-item @click="changePage('/class')">班级中心</el-dropdown-item>
|
<el-dropdown-item @click="changePage('/class')">班级中心</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="logout">
|
<el-dropdown-item divided command="logout">
|
||||||
<span>退出登录</span>
|
<span>退出登录</span>
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { getSignature } from "./index";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
let appId = "01ec9aa3";
|
let appId = "a3c84da2";
|
||||||
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
|
let secret = "OTZkZDdhNDQ4MDk0NTZiYjcyY2RjZmYz";
|
||||||
let timestamp = Math.floor(Date.now() / 1000);
|
let timestamp = Math.floor(Date.now() / 1000);
|
||||||
let signature = getSignature(appId, secret, timestamp);
|
let signature = getSignature(appId, secret, timestamp);
|
||||||
let req = (url, type, data)=>{
|
let req = (url, type, data)=>{
|
||||||
|
|
|
@ -131,7 +131,7 @@ export const createWindow = async (type, data) => {
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.isWeb = false // 是否开启web安全
|
data.isWeb = false // 是否开启web安全
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
wins_tool = await toolWindow(data)
|
wins_tool = await toolWindow(type, data)
|
||||||
wins_tool.type = type // 唯一标识
|
wins_tool.type = type // 唯一标识
|
||||||
wins_tool.show()
|
wins_tool.show()
|
||||||
wins_tool.setFullScreen(true) // 设置窗口为全屏
|
wins_tool.setFullScreen(true) // 设置窗口为全屏
|
||||||
|
@ -161,7 +161,7 @@ export const createWindow = async (type, data) => {
|
||||||
}
|
}
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
const win = await toolWindow(data)
|
const win = await toolWindow(type, data)
|
||||||
win.type = type // 唯一标识
|
win.type = type // 唯一标识
|
||||||
win.show()
|
win.show()
|
||||||
win.setFullScreen(true) // 设置窗口为全屏
|
win.setFullScreen(true) // 设置窗口为全屏
|
||||||
|
@ -193,7 +193,7 @@ export const createWindow = async (type, data) => {
|
||||||
}
|
}
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
winChild = await toolWindow(data)
|
winChild = await toolWindow(type, data)
|
||||||
winChild.type = type // 唯一标识
|
winChild.type = type // 唯一标识
|
||||||
winChild.show()
|
winChild.show()
|
||||||
winChild.setFullScreen(false) // 设置窗口为全屏
|
winChild.setFullScreen(false) // 设置窗口为全屏
|
||||||
|
@ -213,7 +213,7 @@ export const createWindow = async (type, data) => {
|
||||||
* @author: zdg
|
* @author: zdg
|
||||||
* @date 2021-07-05 14:07:01
|
* @date 2021-07-05 14:07:01
|
||||||
*/
|
*/
|
||||||
export function toolWindow({url, isConsole, isWeb=true, option={}}) {
|
export function toolWindow(type, {url, isConsole, isWeb=true, option={}}) {
|
||||||
// width = window.screen.width
|
// width = window.screen.width
|
||||||
let width = option?.width || 800
|
let width = option?.width || 800
|
||||||
let height = option?.height || 600
|
let height = option?.height || 600
|
||||||
|
@ -221,7 +221,7 @@ export function toolWindow({url, isConsole, isWeb=true, option={}}) {
|
||||||
const devUrl = `${BaseUrl}${url}`
|
const devUrl = `${BaseUrl}${url}`
|
||||||
const buildUrl = path.join(__dirname, 'index.html')
|
const buildUrl = path.join(__dirname, 'index.html')
|
||||||
const urlAll = isDev ? devUrl : buildUrl
|
const urlAll = isDev ? devUrl : buildUrl
|
||||||
return new Promise((resolve) => {
|
return new Promise(async(resolve) => {
|
||||||
const config = {
|
const config = {
|
||||||
width, height,
|
width, height,
|
||||||
icon: path.join(appPath, '/resources/logo2.ico'),
|
icon: path.join(appPath, '/resources/logo2.ico'),
|
||||||
|
@ -236,6 +236,9 @@ export function toolWindow({url, isConsole, isWeb=true, option={}}) {
|
||||||
}
|
}
|
||||||
// 创建-新窗口
|
// 创建-新窗口
|
||||||
let win = new Remote.BrowserWindow(config)
|
let win = new Remote.BrowserWindow(config)
|
||||||
|
// 新窗口-创建事件(如:主进程加载远程服务)
|
||||||
|
await ipcMsgInvoke('new-window', {id:win.id, type})
|
||||||
|
console.log(`渲染进程 [${type}]: 窗口创建-成功${Date.now()}`)
|
||||||
if (!isDev) win.loadFile(urlAll,{hash: url}) // 加载文件
|
if (!isDev) win.loadFile(urlAll,{hash: url}) // 加载文件
|
||||||
else win.loadURL(urlAll) // 加载url
|
else win.loadURL(urlAll) // 加载url
|
||||||
win.once('ready-to-show', () => { // 窗口加载完成
|
win.once('ready-to-show', () => { // 窗口加载完成
|
||||||
|
@ -281,7 +284,7 @@ const eventHandles = (type, win) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 新窗口-创建事件(如:主进程加载远程服务)
|
// 新窗口-创建事件(如:主进程加载远程服务)
|
||||||
ipcRenderer.send('new-window', {id:win.id, type})
|
// ipcRenderer.send('new-window', {id:win.id, type})
|
||||||
}
|
}
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 'tool-sphere': { // 创建-悬浮球
|
case 'tool-sphere': { // 创建-悬浮球
|
||||||
|
|
|
@ -620,7 +620,7 @@ const changeCursor = (cursorStyle) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFiledf28bf990a4c40ffb7477ed4b65392c27232357022409613439/%E3%80%8A%E9%9D%99%E5%A5%B3%E3%80%8B%E6%B7%B1%E5%BA%A6%E8%A7%A3%E8%AF%BB%E4%B8%8E%E7%A0%94%E7%A9%B6.pptx"
|
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFileba724e0344f74e1480535eedf3ebec661601807661085006275/%E9%87%91%E9%A9%AC%E5%A5%96%E5%B0%B4%E5%B0%AC%E4%BA%8B%E4%BB%B6%E5%88%86%E6%9E%90%E4%B8%8E%E5%BA%94%E5%AF%B9%E7%AD%96%E7%95%A5.pptx"
|
||||||
// creatAIPPT(props.currentNode.itemtitle + '.pptx',url, props.uploadData).then((res) => {
|
// creatAIPPT(props.currentNode.itemtitle + '.pptx',url, props.uploadData).then((res) => {
|
||||||
// emit('addSuccess',res)
|
// emit('addSuccess',res)
|
||||||
// })
|
// })
|
||||||
|
|
|
@ -226,7 +226,7 @@ const getClasscourseList = async type => {
|
||||||
const {classid} = classForm.form
|
const {classid} = classForm.form
|
||||||
const {entpcourseid} = myClassActive.value
|
const {entpcourseid} = myClassActive.value
|
||||||
if (!classid || !entpcourseid) return
|
if (!classid || !entpcourseid) return
|
||||||
const params = {classid, entpcourseid, entpcoursefileid: 0}
|
const params = {classid, entpcourseid, entpcoursefileid: 0, pageSize: 1000}
|
||||||
const res = await Http_Classcourse.listClasscourse(params)
|
const res = await Http_Classcourse.listClasscourse(params)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// zdg: 排序id大的在前(最新的)
|
// zdg: 排序id大的在前(最新的)
|
||||||
|
@ -255,9 +255,9 @@ const createClasscourse = async () => {
|
||||||
entpcourseid, evalid, coursetitle,
|
entpcourseid, evalid, coursetitle,
|
||||||
plandate: curDate, opendate: curDate
|
plandate: curDate, opendate: curDate
|
||||||
}
|
}
|
||||||
await Http_Classcourse.addClasscourseReturnId(params)
|
teacherForm.form.classcourseid = await Http_Classcourse.addClasscourseReturnId(params)
|
||||||
dt.loading = false
|
dt.loading = false
|
||||||
getClasscourseList('update') // 更新列表
|
// getClasscourseList('update') // 更新列表
|
||||||
ElMessage.success('创建课程-成功')
|
ElMessage.success('创建课程-成功')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue