Compare commits
No commits in common. "1e52abc17092fda74c0fc2895270742c395f6544" and "62367c13d3a53efef1eba9b5dc7257822c4889b4" have entirely different histories.
1e52abc170
...
62367c13d3
|
@ -9,7 +9,7 @@ VITE_APP_BASE_API = '/dev-api'
|
|||
|
||||
VITE_APP_DOMAIN = 'file.ysaix.com'
|
||||
|
||||
VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
|
||||
VITE_APP_UPLOAD_API = 'http://192.168.2.52:7863'
|
||||
|
||||
VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "aix-win",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.7",
|
||||
"description": "An Electron application with Vue",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "example.com",
|
||||
|
|
|
@ -159,11 +159,11 @@ export function deleteSmartReserv(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
export function startClass(id, ex3) {
|
||||
export function startClass(id) {
|
||||
return request({
|
||||
url: '/smarttalk/classReserv/startClass',
|
||||
method: 'get',
|
||||
params: {id, ex3}
|
||||
params: {id}
|
||||
})
|
||||
}
|
||||
export function endClass(id) {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, nextTick, toRaw, reactive } from 'vue';
|
||||
import { onMounted, ref, nextTick, toRaw, reactive,watch } from 'vue';
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { listEvaluation } from '@/api/subject'
|
||||
|
||||
|
@ -258,7 +258,7 @@ const transData = (data) => {
|
|||
const getSubject = async () => {
|
||||
|
||||
const { rows } = await listEvaluation({ itemkey: "version", pageSize: 500 })
|
||||
subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject && isHaveUnit(item.id))
|
||||
subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
|
||||
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
||||
|
||||
// 默认第一个
|
||||
|
@ -270,11 +270,11 @@ const getSubject = async () => {
|
|||
}
|
||||
|
||||
|
||||
const isHaveUnit = (id) => {
|
||||
return evaluationList.value.some(item => {
|
||||
return item.rootid == id
|
||||
})
|
||||
}
|
||||
// const isHaveUnit = (id) => {
|
||||
// return evaluationList.value.some(item => {
|
||||
// return item.rootid == id
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
const handleNodeClick = (data, node) => {
|
||||
|
@ -305,6 +305,9 @@ const handleNodeClick = (data, node) => {
|
|||
currentNode.data = curData
|
||||
emit('nodeClick', curData)
|
||||
}
|
||||
watch(() => userStore.edusubject, () => {
|
||||
console.log(userStore.edusubject,'userStore.edusubject')
|
||||
})
|
||||
onMounted(() => {
|
||||
getSubjectContent()
|
||||
})
|
||||
|
|
|
@ -20,6 +20,7 @@ export function shareStorePlugin({store}) {
|
|||
function stateSync(store) {
|
||||
const storeName = store.$id
|
||||
const jsonStr = circularSafeStringify(store.$state)
|
||||
console.log('state-change', jsonStr, storeName)
|
||||
// 通知主线程更新
|
||||
ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
|
||||
}
|
||||
|
|
|
@ -82,9 +82,7 @@ export function ipcHandle(fn,key, cb) {
|
|||
* @param {*} data 参数
|
||||
* @returns
|
||||
*/
|
||||
let wins_tool = null
|
||||
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')
|
||||
switch(type) {
|
||||
case 'tool-sphere': { // 创建-悬浮球
|
||||
|
@ -99,16 +97,16 @@ export const createWindow = async (type, data) => {
|
|||
}
|
||||
data.isConsole = true // 是否开启控制台
|
||||
data.option = {...defOption, ...option}
|
||||
wins_tool = await toolWindow(data)
|
||||
wins_tool.type = type // 唯一标识
|
||||
wins_tool.show()
|
||||
wins_tool.setFullScreen(true) // 设置窗口为全屏
|
||||
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
|
||||
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
|
||||
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
||||
const win = await toolWindow(data)
|
||||
win.type = type // 唯一标识
|
||||
win.show()
|
||||
win.setFullScreen(true) // 设置窗口为全屏
|
||||
win.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
|
||||
win.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
|
||||
win.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
||||
// win.webContents.openDevTools() // 打开调试工具
|
||||
eventHandles(type, wins_tool) // 事件监听处理
|
||||
return wins_tool
|
||||
eventHandles(type, win) // 事件监听处理
|
||||
return win
|
||||
}
|
||||
case 'open-PDF': { //课本展示-pdf
|
||||
const option = data.option||{}
|
||||
|
@ -195,7 +193,6 @@ const eventHandles = (type, win) => {
|
|||
win.on('closed', () => {
|
||||
if(onClosed) onClosed() // 自定义关闭事件
|
||||
win = null
|
||||
wins_tool = null
|
||||
})
|
||||
// 新窗口-创建事件(如:主进程加载远程服务)
|
||||
ipcRenderer.send('new-window', {id:win.id, type})
|
||||
|
|
|
@ -68,18 +68,18 @@ const startClassR = (item) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
// const toolStore = useToolState()
|
||||
let wins = null;
|
||||
const toolStore = useToolState()
|
||||
// 上课-工具类悬浮
|
||||
const openLesson = () => {
|
||||
if (toolStore.isToolWin) return ElMessage.error('您当前已开始上课,请勿重复操作')
|
||||
startClass(props.item.id)
|
||||
listEntpcourse({
|
||||
evalid: props.item.ex2,
|
||||
edituserid: useUserStore().user.userId,
|
||||
pageSize: 500
|
||||
}).then(async res=>{
|
||||
}).then(res=>{
|
||||
if (res.rows[0].id) {
|
||||
wins = await createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
|
||||
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
|
||||
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null },
|
||||
data() {
|
||||
return {
|
||||
listenList: [],
|
||||
|
@ -266,18 +266,15 @@ export default {
|
|||
},
|
||||
// 文件资源打开web AIX 布置作业
|
||||
openFileLink(item){
|
||||
let unitId = item.levelSecondId ? item.levelSecondId : item.levelFirstId
|
||||
// key 对应的 linkConfig.js 外部链接配置
|
||||
let key = 'filehomework'
|
||||
let configObj = outLink()[key]
|
||||
// 通知主进程
|
||||
ipcRenderer.send('openWindow', {
|
||||
key,
|
||||
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}&unitId=${unitId}`,
|
||||
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`,
|
||||
cookieData: { ...configObj.data }
|
||||
})
|
||||
|
||||
this.$emit('on-filearg', item)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -79,7 +79,6 @@
|
|||
@on-delete="deleteTalk"
|
||||
@on-set="openSet"
|
||||
@on-delhomework="delhomework"
|
||||
@on-filearg="isOpenHomework = true"
|
||||
>
|
||||
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
||||
</file-list-item>
|
||||
|
@ -92,7 +91,6 @@
|
|||
@on-delete="deleteTalk"
|
||||
@on-set="openSet"
|
||||
@on-delhomework="delhomework"
|
||||
|
||||
>
|
||||
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
||||
</file-list-item>
|
||||
|
@ -147,7 +145,7 @@ import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue'
|
|||
import SetHomework from './container/set-homework.vue'
|
||||
import outLink from '@/utils/linkConfig'
|
||||
import { createWindow } from '@/utils/tool'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { uniqBy, cloneDeep } from 'lodash'
|
||||
import { delClasswork, addEntpcourse } from '@/api/teaching/classwork'
|
||||
import { getSelfReserv, startClass } from '@/api/classManage'
|
||||
const toolStore = useToolState()
|
||||
|
@ -229,8 +227,8 @@ export default {
|
|||
const curWin = Remote.getCurrentWindow()
|
||||
curWin.on('focus', ()=>{
|
||||
if(!this.isOpenHomework) return
|
||||
console.log(100)
|
||||
this.initHomeWork()
|
||||
this.asyncAllFile()
|
||||
this.isOpenHomework = false
|
||||
})
|
||||
|
||||
|
@ -477,21 +475,10 @@ export default {
|
|||
}
|
||||
// key 对应的 linkConfig.js 外部链接配置
|
||||
let configObj = outLink()[key]
|
||||
let fullPath = configObj.fullPath
|
||||
//打开作业 高考 url增加unitId 章节ID
|
||||
if(key != 'standard' && key != 'aiModel'){
|
||||
let unitId = this.uploadData.levelSecondId ? this.uploadData.levelSecondId : this.uploadData.levelFirstId
|
||||
if(key == 'gk'){
|
||||
fullPath += `?unitId=${unitId}`
|
||||
}
|
||||
else{
|
||||
fullPath += `&unitId=${unitId}`
|
||||
}
|
||||
}
|
||||
// 通知主进程
|
||||
ipcRenderer.send('openWindow', {
|
||||
key,
|
||||
fullPath: fullPath,
|
||||
fullPath: configObj.fullPath,
|
||||
cookieData: { ...configObj.data }
|
||||
})
|
||||
},
|
||||
|
@ -564,8 +551,10 @@ export default {
|
|||
res.rows[i].entpcourseworklistarray = []
|
||||
}
|
||||
}
|
||||
// 去重
|
||||
let ary = uniqBy([...this.currentFileList, ...list], 'id')
|
||||
// 深度克隆
|
||||
this.currentWorkList = cloneDeep(list)
|
||||
this.currentWorkList = cloneDeep(ary)
|
||||
})
|
||||
},
|
||||
getWeekday1(date) {
|
||||
|
@ -605,8 +594,11 @@ export default {
|
|||
})
|
||||
},
|
||||
// 上课-工具类悬浮
|
||||
async openLesson() {
|
||||
await startClass(this.curClassReserv.id)
|
||||
openLesson() {
|
||||
const toolStore = useToolState()
|
||||
console.log(toolStore.isToolWin,'toolStore.isToolWin')
|
||||
if (toolStore.isToolWin) return this.$message.error('您当前已开始上课,请勿重复操作')
|
||||
startClass(this.curClassReserv.id)
|
||||
createWindow('tool-sphere', {
|
||||
url:
|
||||
'/tool/sphere?entpcourseid=' +
|
||||
|
|
|
@ -15,15 +15,6 @@
|
|||
<el-radio value="1">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="学段">
|
||||
<el-radio-group v-model="user.edustage" @change="semeterChange">
|
||||
<template v-for="(item,index) in semesterList" :key="index">
|
||||
<el-radio :value="item.title">
|
||||
{{item.title }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="任教学科">
|
||||
<el-radio-group v-model="user.edusubject">
|
||||
<template v-for="(item,index) in subjectList" :key="index">
|
||||
|
@ -41,7 +32,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from 'vue'
|
||||
import {updateUserInfo } from '@/api/system/user'
|
||||
import { updateUserProfile } from '@/api/system/user'
|
||||
import { listEvaluation } from '@/api/subject/index'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import {ElMessage} from 'element-plus'
|
||||
|
@ -55,26 +46,6 @@ const props = defineProps({
|
|||
const { proxy } = getCurrentInstance()
|
||||
const userStore = useUserStore()
|
||||
|
||||
//选择学段
|
||||
const semesterList = ref([
|
||||
{
|
||||
id:1,
|
||||
title:'幼儿园'
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
title:'小学'
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
title:'初中'
|
||||
},
|
||||
{
|
||||
id:4,
|
||||
title:'高中'
|
||||
},
|
||||
])
|
||||
|
||||
const rules = ref({
|
||||
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
||||
email: [
|
||||
|
@ -126,16 +97,15 @@ setTimeout(() => {
|
|||
function submit() {
|
||||
proxy.$refs.userRef.validate((valid) => {
|
||||
if (valid) {
|
||||
updateUserInfo(props.user).then((response) => {
|
||||
console.log(props.user)
|
||||
updateUserProfile(props.user).then((response) => {
|
||||
if(response.code == 200){
|
||||
userStore.login({username:props.user.phonenumber,password:props.user.plainpwd}).then(() => {
|
||||
userStore.getInfo().then(res => {
|
||||
if(res.code === 200){
|
||||
ElMessage.success('修改成功')
|
||||
}else{
|
||||
ElMessage.error(response.msg)
|
||||
}
|
||||
})
|
||||
userStore.getInfo().then(res => {
|
||||
if(res.code === 200){
|
||||
ElMessage.success('修改成功')
|
||||
}else{
|
||||
ElMessage.error(response.msg)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
ElMessage.error(response.msg)
|
||||
|
@ -144,9 +114,4 @@ function submit() {
|
|||
}
|
||||
})
|
||||
}
|
||||
const semeterChange = (item) => {
|
||||
if(item === '幼儿园'){
|
||||
props.user.edusubject = ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-button color="#349d44" @click="openFileLink(item)">推送</el-button>
|
||||
</li>
|
||||
<!--作业-->
|
||||
<li class="item flex" v-for="item in dataList" :key="item.id">
|
||||
|
@ -83,9 +82,8 @@ import { useToolState } from '@/store/modules/tool'
|
|||
import { asyncLocalFile } from '@/utils/talkFile'
|
||||
import Lesson from './lesson.vue';
|
||||
import { parseCataByNode } from '@/utils/talkFile'
|
||||
import outLink from '@/utils/linkConfig'
|
||||
|
||||
import { ipcMsgSend2 } from '@/utils/tool'
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
const route = useRoute();
|
||||
const usertore = useUserStore().user
|
||||
const toolStore = useToolState()
|
||||
|
@ -129,19 +127,6 @@ const changeChapter = async (data)=>{
|
|||
getResource()
|
||||
}
|
||||
|
||||
// 文件资源打开web AIX 布置作业
|
||||
const openFileLink = (item) =>{
|
||||
// key 对应的 linkConfig.js 外部链接配置
|
||||
let key = 'filehomework'
|
||||
let configObj = outLink()[key]
|
||||
ipcMsgSend2('openWindow', {
|
||||
key,
|
||||
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`,
|
||||
cookieData: { ...configObj.data }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取资源数据
|
||||
const getResource = () => {
|
||||
let querySearch = toRaw(toolStore.curSubjectNode).querySearch
|
||||
|
@ -248,7 +233,7 @@ onMounted(() => {
|
|||
getHomework()
|
||||
setTimeout(()=>{
|
||||
getResource()
|
||||
},1000)
|
||||
},5000)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ const sideMouse = e => {
|
|||
mouseChange(type == 'mouseleave')
|
||||
}
|
||||
// 侧边工具栏: 操作变化
|
||||
const sideChange = async o => {
|
||||
const sideChange = o => {
|
||||
// console.log(o)
|
||||
switch(o.prop) {
|
||||
case 'resource': // 资源
|
||||
|
@ -120,7 +120,7 @@ const sideChange = async o => {
|
|||
break
|
||||
case 'over': // 下课
|
||||
toolStore.isToolWin = false
|
||||
await endClass(route.query.reservId)
|
||||
endClass(route.query.reservId)
|
||||
ipcMsgSend('tool-sphere:close')
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue