zdg #105

Merged
zhengdegang merged 17 commits from zdg into main 2024-08-07 16:11:14 +08:00
3 changed files with 15 additions and 9 deletions
Showing only changes of commit 6f890843ab - Show all commits

View File

@ -8,6 +8,7 @@ export const useToolState = defineStore('tool', {
model: 'select', // 悬浮球-当前模式 model: 'select', // 悬浮球-当前模式
showBoardAll: false, // 全屏画板-是否显示 showBoardAll: false, // 全屏画板-是否显示
isPdfWin: false, // pdf窗口是否打开 isPdfWin: false, // pdf窗口是否打开
isToolWin: false, // 工具窗口是否打开
}), }),
actions: { actions: {
} }

View File

@ -69,6 +69,7 @@ import uploadDialog from '@/components/upload-dialog/index.vue'
import { Refresh } from '@element-plus/icons-vue' import { Refresh } from '@element-plus/icons-vue'
import uploaderState from '@/store/modules/uploader' import uploaderState from '@/store/modules/uploader'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import { useToolState } from '@/store/modules/tool'
import MoveFile from '@/components/move-file/index.vue' import MoveFile from '@/components/move-file/index.vue'
import FileListItem from '@/views/prepare/container/file-list-item.vue' import FileListItem from '@/views/prepare/container/file-list-item.vue'
import { getSmarttalkPage, moveSmarttalk } from '@/api/file' import { getSmarttalkPage, moveSmarttalk } from '@/api/file'
@ -82,7 +83,6 @@ import outLink from '@/utils/linkConfig'
import { createWindow } from '@/utils/tool' import { createWindow } from '@/utils/tool'
import { uniqBy, cloneDeep } from 'lodash' import { uniqBy, cloneDeep } from 'lodash'
import { delClasswork, addEntpcourse } from '@/api/teaching/classwork' import { delClasswork, addEntpcourse } from '@/api/teaching/classwork'
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
export default { export default {
@ -454,12 +454,14 @@ export default {
}, },
// - // -
openLesson() { openLesson() {
const toolStore = useToolState()
if (toolStore.isToolWin) return this.$message.error('您当前已开始上课,请勿重复操作')
createWindow('tool-sphere', { url: '/tool/sphere' }) createWindow('tool-sphere', { url: '/tool/sphere' })
} }
} }
} }
</script> </script>
<style> <style lang="scss">
.prepare-popper { .prepare-popper {
width: 80px !important; width: 80px !important;
min-width: 80px !important; min-width: 80px !important;

View File

@ -37,7 +37,6 @@ import vDrag from './directive/drag' // 自定义指令-拖拽
import vIgnore from './directive/ignore' // -穿 import vIgnore from './directive/ignore' // -穿
import { useToolState } from '@/store/modules/tool' import { useToolState } from '@/store/modules/tool'
import { ipcMsgSend, ipcHandle, ipcMain } from '@/utils/tool' // import { ipcMsgSend, ipcHandle, ipcMain } from '@/utils/tool' //
import {FabricVue, TYPES} from '@/plugins/fabric'
const tabActive = ref('select') // const tabActive = ref('select') //
const isFold = ref(false) // const isFold = ref(false) //
const isDrag = ref(false) // const isDrag = ref(false) //
@ -81,10 +80,14 @@ const setIgnore = (bool) => { // 忽略鼠标穿透
ipcMsgSend('tool-sphere:set:ignore', bool) ipcMsgSend('tool-sphere:set:ignore', bool)
} }
const resetStatus = () => { // const resetStatus = () => { //
ipcMain.handle('tool-sphere:reset', () => { if (toolStore.isToolWin) return // -
FabricVue.handleMode(tabActive.value) ipcMain?.handle?.('tool-sphere:reset', () => {
setTimeout(() => { mouseChange(1) }, 500) setTimeout(() => {
boardVueRef.value.handleMode(tabActive.value)
mouseChange(1)
}, 500)
}) })
toolStore.isToolWin = true //
} }
watchEffect(() => { // watchEffect(() => { //