zdg #105
|
@ -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: {
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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(() => { // 监听
|
||||||
|
|
Loading…
Reference in New Issue