Compare commits

..

No commits in common. "e6a0859f877baabe82ac7aec027a71fdaaf5a468" and "59be0c07d10667bafac32742472d203c6e1d1b78" have entirely different histories.

12 changed files with 29 additions and 75 deletions

View File

@ -13,6 +13,11 @@ asarUnpack:
win:
executableName: AIx
icon: resources/logo2.ico
extraFiles:
- from: ./node_modules/im_electron_sdk/lib/
to: ./resources
filter:
- '**/*'
nsis:
oneClick: false
allowToChangeInstallationDirectory: true
@ -45,9 +50,3 @@ publish:
url: https://file.ysaix.com:7868/src/assets/smarttalk/
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
# 额外依赖打包到输出目录
extraFiles:
- from: ./node_modules/im_electron_sdk/lib/
to: ./resources
filter:
- '**/*'

View File

@ -30,7 +30,6 @@
"crypto-js": "^4.2.0",
"electron-dl-manager": "^3.0.0",
"electron-log": "^5.1.7",
"electron-store": "8.0.0",
"electron-updater": "^6.1.7",
"element-plus": "^2.7.6",
"fabric": "^5.3.0",
@ -64,5 +63,18 @@
"vite-plugin-windicss": "^1.9.3",
"vue": "^3.4.30",
"windicss": "^3.5.6"
},
"build": {
"win": {
"extraFiles": [
{
"from": "./node_modules/im_electron_sdk/lib/",
"to": "./resources",
"filter": [
"**/*"
]
}
]
}
}
}

View File

@ -4,16 +4,12 @@ import { electronApp, optimizer, is } from '@electron-toolkit/utils'
import icon from '../../resources/icon.png?asset'
import File from './file'
import chat from './chat' // chat封装
import Store from './store' // Store封装
import updateInit from './update'
// 代理 electron/remote
// 第一步引入remote
import remote from '@electron/remote/main'
// 第二步: 初始化remote
remote.initialize()
// 持久化数据-初始化
Store.initialize()
import updateInit from './update'
File({ app, shell, BrowserWindow, ipcMain })
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

View File

@ -1,32 +0,0 @@
/**
* @description 解决 主进程|渲染进程 数据共享
*/
import Store from 'electron-store' // 持久化存储
// 设置ipc与渲染器通信
Store.initRenderer()
// 默认共享数据
const defaultData = {
model: 'select', // 悬浮球-当前模式
showBoardAll: false, // 全屏画板-是否显示
isPdfWin: false, // pdf窗口是否打开
isToolWin: false, // 工具窗口是否打开
curSubjectNode: {
data: {}, // 当前教材节点 (包含当前教材 单元)
querySearch: {} // 查询资源所需参数
}
}
// 初始化
export function initialize(){
const store = new Store({
name: 'cache-store', // 存储文件名
fileExtension: 'ini', // 文件后缀名
encryptionKey: 'Eihrjwi7h104h2Kub423' // 数据加密-防止用户直接改配置
})
store.clear() // 先清除-所有缓存数据
store.set(defaultData) // 初始化-默认数据
return store
}
export default { initialize }

View File

@ -163,10 +163,6 @@ const handleNodeClick = (data,node) => {
onMounted(() => {
titleName.value = `${useStore.user.edustage}-${useStore.user.edusubject}`
treeLoading.value = true
//loading
setTimeout(() => {
treeLoading.value = false
},2000)
})
//
watch(() => useThird,() => {

View File

@ -34,7 +34,6 @@ const getSubject = (value) => {
const currentIndex = gradeList.findIndex(item => item.value === value)
getSubjects({stage:value}).then(res => {
if(res.code === 200){
if(res.data.length === 0) return
subjectList.value = res.data.map(item => {
return {
...item,

View File

@ -250,10 +250,10 @@ const onSubmit = (formEl) => {
saveByClassWorkArray({
classworkarray: JSON.stringify(ary)
})
.then((res) => {
.then(() => {
setLoading.value = false
ElMessage.success('操作成功')
emit('on-success', res.data)
emit('on-success')
cloneDialog(formEl)
})
.catch(() => {

View File

@ -10,7 +10,7 @@
class="flex"
:style="{'color' : item.color}"
:class="currentRoute === item.url ? 'active-li' : ''"
@click="handleOutLink(item.url,item.type, item.name)"
@click="handleOutLink(item.url,item.type)"
>
<i :class="item.img"></i>
<span class="text">{{ item.name }}</span>
@ -57,7 +57,6 @@ import WindowTools from '@/components/window-tools/index.vue'
import useUserStore from '@/store/modules/user'
import routerStore from '@/store/modules/route'
import outLink from '@/utils/linkConfig'
const routeHeader = routerStore()
const { ipcRenderer } = window.electron || {}
const userStore = useUserStore()
@ -65,7 +64,7 @@ const router = useRouter()
const currentRoute = ref('')
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
const handleOutLink = (path, type, name) => {
const handleOutLink = (path, type) => {
if (!path) return
if (type === 'hash') {
router.push(path)
@ -74,11 +73,6 @@ const handleOutLink = (path, type, name) => {
let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/')
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
let unitId = levelSecondId ? levelSecondId :levelFirstId
if(name == '教材分析' || name == '高考研究'){
fullPath += `?unitId=${unitId}`
}
//
ipcRenderer.send('openWindow', {
key: path,

View File

@ -12,8 +12,6 @@ const Remote = isNode?require('@electron/remote'):{}
const { ipcRenderer } = isNode?require('electron'):window.electron || {}
const API = isNode?window.api:{} // preload-api
import { useToolState } from '@/store/modules/tool' // 获取store状态
const Store = isNode?require('electron-store'):null // 持久化存储
// 常用变量
const BaseUrl = isNode?process.env['ELECTRON_RENDERER_URL']+'/#':''
const isDev = isNode?process.env.NODE_ENV !== 'production':''
@ -21,12 +19,6 @@ const toolState = useToolState() // 获取store状态
// 暴露Remote中的属性
export const ipcMain = Remote?.ipcMain || {}
// 暴露Store存储对象
export const store = Store ? new Store({
name: 'cache-store', // 存储文件名
fileExtension: 'ini', // 文件后缀名
encryptionKey: 'Eihrjwi7h104h2Kub423' // 数据加密-防止用户直接改配置
}) : {}
/**
* 获取静态资源开发和生产环境
* @param {*} url

View File

@ -422,6 +422,7 @@ export default {
this.uploadData.levelSecondId = cata[1]
this.uploadData.levelThirdId = cata[2]
this.uploadData.textbookId = data.textBook.curBookId
const toolStore = useToolState()
toolStore.curSubjectNode.data = data
toolStore.curSubjectNode.querySearch = this.uploadData
this.initHomeWork()

View File

@ -70,8 +70,6 @@ const getData = (data) => {
levelSecondId
}
sourceStore.handleQuery()
// ID
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
}
const getDataOther = (data) => {
sourceStore.thirdQuery.chapterId = data.chapterId

View File

@ -111,10 +111,9 @@ const closeHomework = async() => {
ipcMsgSend('tool-sphere:set:ignore', true)
}
//
const successHomework = (data)=>{
// console.log('', data)
const successHomework = ()=>{
// im-(app|)
ipcMsgInvoke('im-chat:msg', data, MsgEnum.HEADS.MSG_0016)
ipcMsgInvoke('im-chat:msg', curRow.value.id, MsgEnum.HEADS.MSG_0016)
}
// change
const changeChapter = async (data)=>{