This commit is contained in:
commit
b255e48be5
|
@ -9,7 +9,7 @@ VITE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
VITE_APP_DOMAIN = 'file.ysaix.com'
|
VITE_APP_DOMAIN = 'file.ysaix.com'
|
||||||
|
|
||||||
VITE_APP_UPLOAD_API = 'http://192.168.2.52:7863'
|
VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
|
||||||
|
|
||||||
VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'
|
VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "1.0.7",
|
"version": "1.1.0",
|
||||||
"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",
|
||||||
|
|
|
@ -159,11 +159,11 @@ export function deleteSmartReserv(id) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function startClass(id) {
|
export function startClass(id, ex3) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smarttalk/classReserv/startClass',
|
url: '/smarttalk/classReserv/startClass',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {id}
|
params: {id, ex3}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function endClass(id) {
|
export function endClass(id) {
|
||||||
|
|
|
@ -20,7 +20,6 @@ export function shareStorePlugin({store}) {
|
||||||
function stateSync(store) {
|
function stateSync(store) {
|
||||||
const storeName = store.$id
|
const storeName = store.$id
|
||||||
const jsonStr = circularSafeStringify(store.$state)
|
const jsonStr = circularSafeStringify(store.$state)
|
||||||
console.log('state-change', jsonStr, storeName)
|
|
||||||
// 通知主线程更新
|
// 通知主线程更新
|
||||||
ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
|
ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,9 @@ export function ipcHandle(fn,key, cb) {
|
||||||
* @param {*} data 参数
|
* @param {*} data 参数
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
let wins_tool = null
|
||||||
export const createWindow = async (type, data) => {
|
export const createWindow = async (type, data) => {
|
||||||
|
if (wins_tool) return console.error('createWindow: win is have')
|
||||||
if (!type) return console.error('createWindow: type is null')
|
if (!type) return console.error('createWindow: type is null')
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 'tool-sphere': { // 创建-悬浮球
|
case 'tool-sphere': { // 创建-悬浮球
|
||||||
|
@ -97,16 +99,16 @@ 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)
|
wins_tool = await toolWindow(data)
|
||||||
win.type = type // 唯一标识
|
wins_tool.type = type // 唯一标识
|
||||||
win.show()
|
wins_tool.show()
|
||||||
win.setFullScreen(true) // 设置窗口为全屏
|
wins_tool.setFullScreen(true) // 设置窗口为全屏
|
||||||
win.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
|
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
|
||||||
win.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
|
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
|
||||||
win.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
||||||
// win.webContents.openDevTools() // 打开调试工具
|
// win.webContents.openDevTools() // 打开调试工具
|
||||||
eventHandles(type, win) // 事件监听处理
|
eventHandles(type, wins_tool) // 事件监听处理
|
||||||
return win
|
return wins_tool
|
||||||
}
|
}
|
||||||
case 'open-PDF': { //课本展示-pdf
|
case 'open-PDF': { //课本展示-pdf
|
||||||
const option = data.option||{}
|
const option = data.option||{}
|
||||||
|
@ -193,6 +195,7 @@ const eventHandles = (type, win) => {
|
||||||
win.on('closed', () => {
|
win.on('closed', () => {
|
||||||
if(onClosed) onClosed() // 自定义关闭事件
|
if(onClosed) onClosed() // 自定义关闭事件
|
||||||
win = null
|
win = null
|
||||||
|
wins_tool = null
|
||||||
})
|
})
|
||||||
// 新窗口-创建事件(如:主进程加载远程服务)
|
// 新窗口-创建事件(如:主进程加载远程服务)
|
||||||
ipcRenderer.send('new-window', {id:win.id, type})
|
ipcRenderer.send('new-window', {id:win.id, type})
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
v-show="tabActive === '已结束'"
|
v-show="tabActive === '已结束'"
|
||||||
:key="index"
|
:key="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
|
@open-edit="reservDialog.openDialog(item)"
|
||||||
|
@delete-reserv="deleteReserv(item)"
|
||||||
></reserv-item>
|
></reserv-item>
|
||||||
</div>
|
</div>
|
||||||
<reserv ref="reservDialog"></reserv>
|
<reserv ref="reservDialog"></reserv>
|
||||||
|
@ -51,8 +53,8 @@ const doneDataList = computed(() => {
|
||||||
})
|
})
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
watch(
|
watch(
|
||||||
() => toolStore.isToolWin,
|
() => [dataList,toolStore.isToolWin],
|
||||||
(newD, oldD) => {
|
() => {
|
||||||
getSelfReserv().then((res) => {
|
getSelfReserv().then((res) => {
|
||||||
dataList.value = [...res.data]
|
dataList.value = [...res.data]
|
||||||
})
|
})
|
||||||
|
|
|
@ -68,18 +68,18 @@ const startClassR = (item) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const toolStore = useToolState()
|
// const toolStore = useToolState()
|
||||||
|
let wins = null;
|
||||||
// 上课-工具类悬浮
|
// 上课-工具类悬浮
|
||||||
const openLesson = () => {
|
const openLesson = () => {
|
||||||
if (toolStore.isToolWin) return ElMessage.error('您当前已开始上课,请勿重复操作')
|
|
||||||
startClass(props.item.id)
|
startClass(props.item.id)
|
||||||
listEntpcourse({
|
listEntpcourse({
|
||||||
evalid: props.item.ex2,
|
evalid: props.item.ex2,
|
||||||
edituserid: useUserStore().user.userId,
|
edituserid: useUserStore().user.userId,
|
||||||
pageSize: 500
|
pageSize: 500
|
||||||
}).then(res=>{
|
}).then(async res=>{
|
||||||
if (res.rows[0].id) {
|
if (res.rows[0].id) {
|
||||||
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
|
wins = await createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -605,10 +605,8 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 上课-工具类悬浮
|
// 上课-工具类悬浮
|
||||||
openLesson() {
|
async openLesson() {
|
||||||
const toolStore = useToolState()
|
await startClass(this.curClassReserv.id)
|
||||||
if (toolStore.isToolWin) return this.$message.error('您当前已开始上课,请勿重复操作')
|
|
||||||
startClass(this.curClassReserv.id)
|
|
||||||
createWindow('tool-sphere', {
|
createWindow('tool-sphere', {
|
||||||
url:
|
url:
|
||||||
'/tool/sphere?entpcourseid=' +
|
'/tool/sphere?entpcourseid=' +
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20" style="display: flex;flex-wrap: nowrap;justify-content: start">
|
||||||
<el-col :span="6" :xs="24">
|
<el-col :xs="24" style="min-width: 260px;max-width: 260px">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
|
|
|
@ -109,7 +109,7 @@ const sideMouse = e => {
|
||||||
mouseChange(type == 'mouseleave')
|
mouseChange(type == 'mouseleave')
|
||||||
}
|
}
|
||||||
// 侧边工具栏: 操作变化
|
// 侧边工具栏: 操作变化
|
||||||
const sideChange = o => {
|
const sideChange = async o => {
|
||||||
// console.log(o)
|
// console.log(o)
|
||||||
switch(o.prop) {
|
switch(o.prop) {
|
||||||
case 'resource': // 资源
|
case 'resource': // 资源
|
||||||
|
@ -120,7 +120,7 @@ const sideChange = o => {
|
||||||
break
|
break
|
||||||
case 'over': // 下课
|
case 'over': // 下课
|
||||||
toolStore.isToolWin = false
|
toolStore.isToolWin = false
|
||||||
endClass(route.query.reservId)
|
await endClass(route.query.reservId)
|
||||||
ipcMsgSend('tool-sphere:close')
|
ipcMsgSend('tool-sphere:close')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue