Merge branch 'main' into zhuhao_dev
This commit is contained in:
commit
f3619817f9
|
@ -42,7 +42,7 @@
|
||||||
</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'
|
||||||
|
|
||||||
|
@ -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()
|
||||||
})
|
})
|
||||||
|
|
|
@ -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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
listenList: [],
|
listenList: [],
|
||||||
|
@ -267,15 +267,18 @@ export default {
|
||||||
},
|
},
|
||||||
// 文件资源打开web AIX 布置作业
|
// 文件资源打开web AIX 布置作业
|
||||||
openFileLink(item){
|
openFileLink(item){
|
||||||
|
let unitId = item.levelSecondId ? item.levelSecondId : item.levelFirstId
|
||||||
// key 对应的 linkConfig.js 外部链接配置
|
// key 对应的 linkConfig.js 外部链接配置
|
||||||
let key = 'filehomework'
|
let key = 'filehomework'
|
||||||
let configObj = outLink()[key]
|
let configObj = outLink()[key]
|
||||||
// 通知主进程
|
// 通知主进程
|
||||||
ipcRenderer.send('openWindow', {
|
ipcRenderer.send('openWindow', {
|
||||||
key,
|
key,
|
||||||
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`,
|
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}&unitId=${unitId}`,
|
||||||
cookieData: { ...configObj.data }
|
cookieData: { ...configObj.data }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.$emit('on-filearg', item)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -79,6 +79,7 @@
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-set="openSet"
|
@on-set="openSet"
|
||||||
@on-delhomework="delhomework"
|
@on-delhomework="delhomework"
|
||||||
|
@on-filearg="isOpenHomework = true"
|
||||||
>
|
>
|
||||||
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
||||||
</file-list-item>
|
</file-list-item>
|
||||||
|
@ -91,6 +92,7 @@
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-set="openSet"
|
@on-set="openSet"
|
||||||
@on-delhomework="delhomework"
|
@on-delhomework="delhomework"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
||||||
</file-list-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 SetHomework from './container/set-homework.vue'
|
||||||
import outLink from '@/utils/linkConfig'
|
import outLink from '@/utils/linkConfig'
|
||||||
import { createWindow } from '@/utils/tool'
|
import { createWindow } from '@/utils/tool'
|
||||||
import { uniqBy, cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { delClasswork, addEntpcourse } from '@/api/teaching/classwork'
|
import { delClasswork, addEntpcourse } from '@/api/teaching/classwork'
|
||||||
import { getSelfReserv, startClass } from '@/api/classManage'
|
import { getSelfReserv, startClass } from '@/api/classManage'
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
|
@ -227,8 +229,8 @@ export default {
|
||||||
const curWin = Remote.getCurrentWindow()
|
const curWin = Remote.getCurrentWindow()
|
||||||
curWin.on('focus', ()=>{
|
curWin.on('focus', ()=>{
|
||||||
if(!this.isOpenHomework) return
|
if(!this.isOpenHomework) return
|
||||||
console.log(100)
|
|
||||||
this.initHomeWork()
|
this.initHomeWork()
|
||||||
|
this.asyncAllFile()
|
||||||
this.isOpenHomework = false
|
this.isOpenHomework = false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -476,10 +478,21 @@ export default {
|
||||||
}
|
}
|
||||||
// key 对应的 linkConfig.js 外部链接配置
|
// key 对应的 linkConfig.js 外部链接配置
|
||||||
let configObj = outLink()[key]
|
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', {
|
ipcRenderer.send('openWindow', {
|
||||||
key,
|
key,
|
||||||
fullPath: configObj.fullPath,
|
fullPath: fullPath,
|
||||||
cookieData: { ...configObj.data }
|
cookieData: { ...configObj.data }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -552,10 +565,8 @@ export default {
|
||||||
res.rows[i].entpcourseworklistarray = []
|
res.rows[i].entpcourseworklistarray = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 去重
|
|
||||||
let ary = uniqBy([...list], 'id')
|
|
||||||
// 深度克隆
|
// 深度克隆
|
||||||
this.currentWorkList = cloneDeep(ary)
|
this.currentWorkList = cloneDeep(list)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getWeekday1(date) {
|
getWeekday1(date) {
|
||||||
|
|
|
@ -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