Compare commits

..

19 Commits

Author SHA1 Message Date
yangws 1e52abc170 fix:新加个人中心修改学段; 2024-08-14 15:58:06 +08:00
yangws 1a1f20d175 Merge remote-tracking branch 'origin/main' into yangws 2024-08-14 15:57:20 +08:00
lyc 22f35a6638 Merge pull request 'lyc-dev' (#130) from lyc-dev into main 2024-08-14 14:08:52 +08:00
lyc bf783cf940 作业 2024-08-14 14:07:53 +08:00
lyc b255e48be5 冲突 2024-08-14 14:06:02 +08:00
lyc 41b0660559 打开外部链接 url 增加参数 2024-08-14 14:03:06 +08:00
朱浩 0964cc0965 Merge pull request 'zhuhao_dev' (#129) from zhuhao_dev into main
Reviewed-on: #129
2024-08-14 11:00:45 +08:00
朱浩 219e4abdc0 Merge branch 'main' into zhuhao_dev 2024-08-14 11:00:13 +08:00
朱浩 c3709bf0c7 二期:BUG修复 2024-08-14 11:00:01 +08:00
朱浩 e6a06a67b8 Merge pull request 'zhuhao_dev' (#128) from zhuhao_dev into main
Reviewed-on: #128
2024-08-14 10:00:47 +08:00
朱浩 ea4afb409f Merge branch 'main' into zhuhao_dev
# Conflicts:
#	src/renderer/src/views/prepare/index.vue
2024-08-14 10:00:16 +08:00
朱浩 79055dc1c2 二期:BUG修复 2024-08-14 09:58:14 +08:00
yangws e3a04c0add Merge pull request 'fix:修改个人中心宽度,预约课件删除及时回应;' (#127) from yangws into main
Reviewed-on: #127
2024-08-14 09:56:10 +08:00
yangws f6bf811ee5 Merge remote-tracking branch 'origin/main' into yangws 2024-08-14 09:54:34 +08:00
朱浩 3b872f371f Merge branch 'main' into zhuhao_dev 2024-08-13 17:43:49 +08:00
朱浩 7fc04faad1 二期:BUG修复 2024-08-13 17:43:34 +08:00
lyc d18c47994a Merge pull request '作业' (#126) from lyc-dev into main 2024-08-13 17:39:38 +08:00
lyc 7b804f9e62 作业 2024-08-13 17:39:23 +08:00
朱浩 8f50174595 二期:BUG修复 2024-08-13 16:46:47 +08:00
12 changed files with 114 additions and 54 deletions

View File

@ -9,7 +9,7 @@ VITE_APP_BASE_API = '/dev-api'
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/'

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "1.0.7",
"version": "1.1.0",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -159,11 +159,11 @@ export function deleteSmartReserv(id) {
method: 'delete'
})
}
export function startClass(id) {
export function startClass(id, ex3) {
return request({
url: '/smarttalk/classReserv/startClass',
method: 'get',
params: {id}
params: {id, ex3}
})
}
export function endClass(id) {

View File

@ -42,7 +42,7 @@
</template>
<script setup>
import { onMounted, ref, nextTick, toRaw, reactive,watch } from 'vue';
import { onMounted, ref, nextTick, toRaw, reactive } 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)
subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject && isHaveUnit(item.id))
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,9 +305,6 @@ const handleNodeClick = (data, node) => {
currentNode.data = curData
emit('nodeClick', curData)
}
watch(() => userStore.edusubject, () => {
console.log(userStore.edusubject,'userStore.edusubject')
})
onMounted(() => {
getSubjectContent()
})

View File

@ -20,7 +20,6 @@ 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)
}

View File

@ -82,7 +82,9 @@ 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': { // 创建-悬浮球
@ -97,16 +99,16 @@ export const createWindow = async (type, data) => {
}
data.isConsole = true // 是否开启控制台
data.option = {...defOption, ...option}
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) // 如果窗口在所有工作区都可见
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) // 如果窗口在所有工作区都可见
// win.webContents.openDevTools() // 打开调试工具
eventHandles(type, win) // 事件监听处理
return win
eventHandles(type, wins_tool) // 事件监听处理
return wins_tool
}
case 'open-PDF': { //课本展示-pdf
const option = data.option||{}
@ -193,6 +195,7 @@ const eventHandles = (type, win) => {
win.on('closed', () => {
if(onClosed) onClosed() // 自定义关闭事件
win = null
wins_tool = null
})
// 新窗口-创建事件(如:主进程加载远程服务)
ipcRenderer.send('new-window', {id:win.id, type})

View File

@ -68,18 +68,18 @@ const startClassR = (item) => {
}
})
}
const toolStore = useToolState()
// const toolStore = useToolState()
let wins = null;
// -
const openLesson = () => {
if (toolStore.isToolWin) return ElMessage.error('您当前已开始上课,请勿重复操作')
startClass(props.item.id)
listEntpcourse({
evalid: props.item.ex2,
edituserid: useUserStore().user.userId,
pageSize: 500
}).then(res=>{
}).then(async res=>{
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 })
}
})
}

View File

@ -168,7 +168,7 @@ export default {
}
}
},
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null },
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {
listenList: [],
@ -266,15 +266,18 @@ 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}`,
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}&unitId=${unitId}`,
cookieData: { ...configObj.data }
})
this.$emit('on-filearg', item)
}
},
mounted() {

View File

@ -79,6 +79,7 @@
@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>
@ -91,6 +92,7 @@
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
>
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item>
@ -145,7 +147,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 { uniqBy, cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash'
import { delClasswork, addEntpcourse } from '@/api/teaching/classwork'
import { getSelfReserv, startClass } from '@/api/classManage'
const toolStore = useToolState()
@ -227,8 +229,8 @@ export default {
const curWin = Remote.getCurrentWindow()
curWin.on('focus', ()=>{
if(!this.isOpenHomework) return
console.log(100)
this.initHomeWork()
this.asyncAllFile()
this.isOpenHomework = false
})
@ -475,10 +477,21 @@ export default {
}
// key linkConfig.js
let configObj = outLink()[key]
let fullPath = configObj.fullPath
// urlunitId 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: configObj.fullPath,
fullPath: fullPath,
cookieData: { ...configObj.data }
})
},
@ -551,10 +564,8 @@ export default {
res.rows[i].entpcourseworklistarray = []
}
}
//
let ary = uniqBy([...this.currentFileList, ...list], 'id')
//
this.currentWorkList = cloneDeep(ary)
this.currentWorkList = cloneDeep(list)
})
},
getWeekday1(date) {
@ -594,11 +605,8 @@ export default {
})
},
// -
openLesson() {
const toolStore = useToolState()
console.log(toolStore.isToolWin,'toolStore.isToolWin')
if (toolStore.isToolWin) return this.$message.error('您当前已开始上课,请勿重复操作')
startClass(this.curClassReserv.id)
async openLesson() {
await startClass(this.curClassReserv.id)
createWindow('tool-sphere', {
url:
'/tool/sphere?entpcourseid=' +

View File

@ -15,6 +15,15 @@
<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">
@ -32,7 +41,7 @@
<script setup>
import { ref, getCurrentInstance } from 'vue'
import { updateUserProfile } from '@/api/system/user'
import {updateUserInfo } from '@/api/system/user'
import { listEvaluation } from '@/api/subject/index'
import useUserStore from '@/store/modules/user'
import {ElMessage} from 'element-plus'
@ -46,6 +55,26 @@ 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: [
@ -97,15 +126,16 @@ setTimeout(() => {
function submit() {
proxy.$refs.userRef.validate((valid) => {
if (valid) {
console.log(props.user)
updateUserProfile(props.user).then((response) => {
updateUserInfo(props.user).then((response) => {
if(response.code == 200){
userStore.getInfo().then(res => {
if(res.code === 200){
ElMessage.success('修改成功')
}else{
ElMessage.error(response.msg)
}
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)
}
})
})
}else{
ElMessage.error(response.msg)
@ -114,4 +144,9 @@ function submit() {
}
})
}
const semeterChange = (item) => {
if(item === '幼儿园'){
props.user.edusubject = ''
}
}
</script>

View File

@ -25,6 +25,7 @@
</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">
@ -82,8 +83,9 @@ 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'
const { ipcRenderer } = window.electron || {}
import { ipcMsgSend2 } from '@/utils/tool'
const route = useRoute();
const usertore = useUserStore().user
const toolStore = useToolState()
@ -127,6 +129,19 @@ 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
@ -233,7 +248,7 @@ onMounted(() => {
getHomework()
setTimeout(()=>{
getResource()
},5000)
},1000)
})
</script>

View File

@ -109,7 +109,7 @@ const sideMouse = e => {
mouseChange(type == 'mouseleave')
}
// :
const sideChange = o => {
const sideChange = async o => {
// console.log(o)
switch(o.prop) {
case 'resource': //
@ -120,7 +120,7 @@ const sideChange = o => {
break
case 'over': //
toolStore.isToolWin = false
endClass(route.query.reservId)
await endClass(route.query.reservId)
ipcMsgSend('tool-sphere:close')
break
}