Compare commits
11 Commits
4754ed641c
...
2a84455f05
Author | SHA1 | Date |
---|---|---|
lyc | 2a84455f05 | |
lyc | ba9b381b69 | |
朱浩 | 6616ac640e | |
朱浩 | f3619817f9 | |
yangws | c64fbe49e9 | |
yangws | 3c2dbb722a | |
yangws | acbd36ca88 | |
yangws | 1e52abc170 | |
yangws | 1a1f20d175 | |
朱浩 | 1aded1d50a | |
yangws | f6bf811ee5 |
|
@ -146,7 +146,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
|
||||||
//使用默认应用打开本地文件
|
//使用默认应用打开本地文件
|
||||||
ipcMain.on('open-path-app', (e, destination) => {
|
ipcMain.on('open-path-app', (e, destination) => {
|
||||||
let path = appRootFilePath + destination
|
let path = appRootFilePath + destination
|
||||||
shell.openExternal(path).catch((error) => {
|
shell.openPath(path).catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,6 +28,7 @@ function createLoginWindow() {
|
||||||
icon: join(__dirname, '../../resources/logo2.ico'),
|
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
defaultEncoding: 'utf-8',
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
@ -67,6 +68,7 @@ function createMainWindow() {
|
||||||
icon: join(__dirname, '../../resources/logo2.ico'),
|
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
defaultEncoding: 'utf-8',
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
// nodeIntegration: true,
|
// nodeIntegration: true,
|
||||||
|
@ -115,6 +117,7 @@ async function createLinkWin(data) {
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
defaultEncoding: 'utf-8',
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
worldSafeExecuteJavaScript: true,
|
worldSafeExecuteJavaScript: true,
|
||||||
|
@ -143,6 +146,8 @@ async function createLinkWin(data) {
|
||||||
|
|
||||||
// 初始化完成
|
// 初始化完成
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
|
process.env.LANG = 'en_US.UTF-8'
|
||||||
|
process.env['ELECTRON_DISABLE_SANDBOX'] = true;
|
||||||
// 设置应用程序用户模型标识符
|
// 设置应用程序用户模型标识符
|
||||||
electronApp.setAppUserModelId('com.electron')
|
electronApp.setAppUserModelId('com.electron')
|
||||||
|
|
||||||
|
|
|
@ -42,11 +42,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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 useUserStore from '@/store/modules/user'
|
||||||
import { listEvaluation } from '@/api/subject'
|
import { listEvaluation } from '@/api/subject'
|
||||||
|
|
||||||
const BaseUrl = 'https://prev.ysaix.com:7868/'
|
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['nodeClick', 'changeBook'])
|
const emit = defineEmits(['nodeClick', 'changeBook'])
|
||||||
// store
|
// store
|
||||||
|
@ -258,7 +258,7 @@ const transData = (data) => {
|
||||||
const getSubject = async () => {
|
const getSubject = async () => {
|
||||||
|
|
||||||
const { rows } = await listEvaluation({ itemkey: "version", pageSize: 500 })
|
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))
|
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
|
||||||
|
|
||||||
// 默认第一个
|
// 默认第一个
|
||||||
|
@ -270,11 +270,11 @@ const getSubject = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// const isHaveUnit = (id) => {
|
const isHaveUnit = (id) => {
|
||||||
// return evaluationList.value.some(item => {
|
return evaluationList.value.some(item => {
|
||||||
// return item.rootid == id
|
return item.rootid == id
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleNodeClick = (data, node) => {
|
const handleNodeClick = (data, node) => {
|
||||||
|
@ -305,9 +305,6 @@ const handleNodeClick = (data, node) => {
|
||||||
currentNode.data = curData
|
currentNode.data = curData
|
||||||
emit('nodeClick', curData)
|
emit('nodeClick', curData)
|
||||||
}
|
}
|
||||||
watch(() => userStore.edusubject, () => {
|
|
||||||
console.log(userStore.edusubject,'userStore.edusubject')
|
|
||||||
})
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubjectContent()
|
getSubjectContent()
|
||||||
})
|
})
|
||||||
|
|
|
@ -230,6 +230,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
|
if (!items||!items.fileSuffix) return;
|
||||||
getPrepareById(items.id).then((item) => {
|
getPrepareById(items.id).then((item) => {
|
||||||
Object.assign(items, item)
|
Object.assign(items, item)
|
||||||
asyncLocalFile(items).then(() => {
|
asyncLocalFile(items).then(() => {
|
||||||
|
|
|
@ -416,6 +416,7 @@ export default {
|
||||||
this.curBookImg = data.textBook.curBookImg
|
this.curBookImg = data.textBook.curBookImg
|
||||||
this.curBookPath = data.textBook.curBookPath
|
this.curBookPath = data.textBook.curBookPath
|
||||||
this.checkFileList = []
|
this.checkFileList = []
|
||||||
|
this.currentWorkList = []
|
||||||
let cata = parseCataByNode(data.node)
|
let cata = parseCataByNode(data.node)
|
||||||
this.currentNode = data.node
|
this.currentNode = data.node
|
||||||
this.uploadData.levelFirstId = cata[0]
|
this.uploadData.levelFirstId = cata[0]
|
||||||
|
|
|
@ -15,6 +15,15 @@
|
||||||
<el-radio value="1">女</el-radio>
|
<el-radio value="1">女</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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-form-item label="任教学科">
|
||||||
<el-radio-group v-model="user.edusubject">
|
<el-radio-group v-model="user.edusubject">
|
||||||
<template v-for="(item,index) in subjectList" :key="index">
|
<template v-for="(item,index) in subjectList" :key="index">
|
||||||
|
@ -32,7 +41,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, getCurrentInstance } from 'vue'
|
import { ref, getCurrentInstance } from 'vue'
|
||||||
import { updateUserProfile } from '@/api/system/user'
|
import {updateUserInfo } from '@/api/system/user'
|
||||||
import { listEvaluation } from '@/api/subject/index'
|
import { listEvaluation } from '@/api/subject/index'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
|
@ -46,6 +55,26 @@ const props = defineProps({
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
//选择学段
|
||||||
|
const semesterList = ref([
|
||||||
|
{
|
||||||
|
id:1,
|
||||||
|
title:'幼儿园'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:2,
|
||||||
|
title:'小学'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:3,
|
||||||
|
title:'初中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:4,
|
||||||
|
title:'高中'
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
||||||
email: [
|
email: [
|
||||||
|
@ -97,15 +126,17 @@ setTimeout(() => {
|
||||||
function submit() {
|
function submit() {
|
||||||
proxy.$refs.userRef.validate((valid) => {
|
proxy.$refs.userRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(props.user)
|
props.user.avatar = userStore.user.avatar
|
||||||
updateUserProfile(props.user).then((response) => {
|
updateUserInfo(props.user).then((response) => {
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
userStore.getInfo().then(res => {
|
userStore.login({username:props.user.phonenumber,password:props.user.plainpwd}).then(() => {
|
||||||
if(res.code === 200){
|
userStore.getInfo().then(res => {
|
||||||
ElMessage.success('修改成功')
|
if(res.code === 200){
|
||||||
}else{
|
ElMessage.success('修改成功')
|
||||||
ElMessage.error(response.msg)
|
}else{
|
||||||
}
|
ElMessage.error(response.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
ElMessage.error(response.msg)
|
ElMessage.error(response.msg)
|
||||||
|
@ -114,4 +145,9 @@ function submit() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const semeterChange = (item) => {
|
||||||
|
if(item === '幼儿园'){
|
||||||
|
props.user.edusubject = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue