Compare commits
No commits in common. "f3619817f9fc3e6230746bc97092b13651538536" and "219e4abdc04b24f714e2b5c7bfcbdcebcb0d7470" have entirely different histories.
f3619817f9
...
219e4abdc0
|
@ -146,7 +146,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
|
|||
//使用默认应用打开本地文件
|
||||
ipcMain.on('open-path-app', (e, destination) => {
|
||||
let path = appRootFilePath + destination
|
||||
shell.openPath(path).catch((error) => {
|
||||
shell.openExternal(path).catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -28,7 +28,6 @@ function createLoginWindow() {
|
|||
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
webPreferences: {
|
||||
defaultEncoding: 'utf-8',
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
sandbox: false,
|
||||
nodeIntegration: true,
|
||||
|
@ -68,7 +67,6 @@ function createMainWindow() {
|
|||
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
webPreferences: {
|
||||
defaultEncoding: 'utf-8',
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
sandbox: false,
|
||||
// nodeIntegration: true,
|
||||
|
@ -117,7 +115,6 @@ async function createLinkWin(data) {
|
|||
autoHideMenuBar: true,
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
webPreferences: {
|
||||
defaultEncoding: 'utf-8',
|
||||
sandbox: false,
|
||||
nodeIntegration: true,
|
||||
worldSafeExecuteJavaScript: true,
|
||||
|
@ -146,8 +143,6 @@ async function createLinkWin(data) {
|
|||
|
||||
// 初始化完成
|
||||
app.on('ready', () => {
|
||||
process.env.LANG = 'en_US.UTF-8'
|
||||
process.env['ELECTRON_DISABLE_SANDBOX'] = true;
|
||||
// 设置应用程序用户模型标识符
|
||||
electronApp.setAppUserModelId('com.electron')
|
||||
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
|
|
|
@ -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: [],
|
||||
|
@ -230,7 +230,6 @@ export default {
|
|||
}
|
||||
},
|
||||
openFileWin(items) {
|
||||
if (!items||!items.fileSuffix) return;
|
||||
getPrepareById(items.id).then((item) => {
|
||||
Object.assign(items, item)
|
||||
asyncLocalFile(items).then(() => {
|
||||
|
@ -267,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
|
||||
})
|
||||
|
||||
|
@ -416,7 +414,6 @@ export default {
|
|||
this.curBookImg = data.textBook.curBookImg
|
||||
this.curBookPath = data.textBook.curBookPath
|
||||
this.checkFileList = []
|
||||
this.currentWorkList = []
|
||||
let cata = parseCataByNode(data.node)
|
||||
this.currentNode = data.node
|
||||
this.uploadData.levelFirstId = cata[0]
|
||||
|
@ -478,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 }
|
||||
})
|
||||
},
|
||||
|
@ -565,8 +551,10 @@ export default {
|
|||
res.rows[i].entpcourseworklistarray = []
|
||||
}
|
||||
}
|
||||
// 去重
|
||||
let ary = uniqBy([...list], 'id')
|
||||
// 深度克隆
|
||||
this.currentWorkList = cloneDeep(list)
|
||||
this.currentWorkList = cloneDeep(ary)
|
||||
})
|
||||
},
|
||||
getWeekday1(date) {
|
||||
|
|
|
@ -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,17 +97,15 @@ setTimeout(() => {
|
|||
function submit() {
|
||||
proxy.$refs.userRef.validate((valid) => {
|
||||
if (valid) {
|
||||
props.user.avatar = userStore.user.avatar
|
||||
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)
|
||||
|
@ -145,9 +114,4 @@ function submit() {
|
|||
}
|
||||
})
|
||||
}
|
||||
const semeterChange = (item) => {
|
||||
if(item === '幼儿园'){
|
||||
props.user.edusubject = ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue