Compare commits
No commits in common. "7a18c1927a66f336a2b3c56fb53c7065f8acb4dc" and "a8dbd41bdbab6baf25634c98b6c20561232b9eec" have entirely different histories.
7a18c1927a
...
a8dbd41bdb
|
@ -18,5 +18,6 @@ const size = ref('default')
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
/* height: 100vh; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 4723712 */
|
font-family: "iconfont"; /* Project id 4723712 */
|
||||||
src: url('iconfont.woff2?t=1730255375658') format('woff2'),
|
src: url('iconfont.woff2?t=1730189025078') format('woff2'),
|
||||||
url('iconfont.woff?t=1730255375658') format('woff'),
|
url('iconfont.woff?t=1730189025078') format('woff'),
|
||||||
url('iconfont.ttf?t=1730255375658') format('truetype');
|
url('iconfont.ttf?t=1730189025078') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
@ -13,10 +13,6 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-yanhouke-shengyinyichang:before {
|
|
||||||
content: "\e672";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-renzheng-:before {
|
.icon-renzheng-:before {
|
||||||
content: "\e623";
|
content: "\e623";
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,13 +5,6 @@
|
||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
{
|
|
||||||
"icon_id": "5257347",
|
|
||||||
"name": "咽喉科-声音异常",
|
|
||||||
"font_class": "yanhouke-shengyinyichang",
|
|
||||||
"unicode": "e672",
|
|
||||||
"unicode_decimal": 58994
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"icon_id": "7447571",
|
"icon_id": "7447571",
|
||||||
"name": "认证-01",
|
"name": "认证-01",
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,10 +4,7 @@
|
||||||
<div>
|
<div>
|
||||||
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
|
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<div class="user-info">
|
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
|
||||||
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
|
|
||||||
<span>{{ userStore.user.nickName }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="head-aside">
|
<div class="head-aside">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -16,10 +13,9 @@
|
||||||
<span class="mlr-5">学校认证</span>
|
<span class="mlr-5">学校认证</span>
|
||||||
<span class="gray">未认证</span>
|
<span class="gray">未认证</span>
|
||||||
</li>
|
</li>
|
||||||
<li>加入学校</li>
|
|
||||||
<li @click="onUserTo('/profile')">个人中心</li>
|
<li @click="onUserTo('/profile')">个人中心</li>
|
||||||
<li @click="onUserTo('/class')">班级中心</li>
|
<li @click="onUserTo('/class')">班级中心</li>
|
||||||
<li @click="logout">退出登录</li>
|
<li @click="logout">退出登录</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -92,15 +88,9 @@ const headerMenus = [
|
||||||
]
|
]
|
||||||
|
|
||||||
const sideBottomMenu = [
|
const sideBottomMenu = [
|
||||||
{
|
|
||||||
name: '算力',
|
|
||||||
id: 4,
|
|
||||||
icon: 'icon-yanhouke-shengyinyichang',
|
|
||||||
path: '/hashrate'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: '设置',
|
name: '设置',
|
||||||
id: 5,
|
id: 4,
|
||||||
icon: 'icon-set',
|
icon: 'icon-set',
|
||||||
path: '/setting'
|
path: '/setting'
|
||||||
},
|
},
|
||||||
|
@ -209,19 +199,11 @@ const logout = () => {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.user-info{
|
.user-img{
|
||||||
display: flex;
|
width: 56px;
|
||||||
flex-direction: column;
|
height: 56px;
|
||||||
color: #fff;
|
border-radius: 50%;
|
||||||
align-items: center;
|
cursor: pointer;
|
||||||
font-size: 12px;
|
|
||||||
.user-img{
|
|
||||||
width: 56px;
|
|
||||||
height: 56px;
|
|
||||||
border-radius: 50%;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.aside-tab {
|
.aside-tab {
|
||||||
|
@ -234,12 +216,12 @@ const logout = () => {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 8px 0;
|
padding: 5px 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 12px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
@ -273,6 +255,6 @@ const logout = () => {
|
||||||
.verson{
|
.verson{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-top: 5px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,4 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
|
<!-- <el-container>
|
||||||
|
<el-header>
|
||||||
|
<Header />
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<AppMain />
|
||||||
|
</el-main>
|
||||||
|
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
|
||||||
|
<AiChart/>
|
||||||
|
</el-container> -->
|
||||||
<div class="common-layout">
|
<div class="common-layout">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="70px">
|
<el-aside width="70px">
|
||||||
|
@ -20,21 +30,27 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import Header from './components/Header.vue'
|
import Header from './components/Header.vue'
|
||||||
import Aside from './components/Aside.vue'
|
import Aside from './components/Aside.vue'
|
||||||
import AppMain from './components/AppMain.vue'
|
import AppMain from './components/AppMain.vue'
|
||||||
import Uploader from './components/Uploader.vue'
|
import Uploader from './components/Uploader.vue'
|
||||||
import AiChart from '@/components/ai-chart/index.vue'
|
import AiChart from '@/components/ai-chart/index.vue'
|
||||||
import uploaderState from '@/store/modules/uploader'
|
import uploaderState from '@/store/modules/uploader'
|
||||||
|
// import Chat from '@/utils/chat'
|
||||||
|
|
||||||
let uploaderStore = ref(uploaderState())
|
let uploaderStore = ref(uploaderState())
|
||||||
|
// window.test = Chat
|
||||||
|
// Chat.init()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.el-container {
|
.el-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: linear-gradient(#E5EEF5, #F2F2F2);
|
// background: url(@/assets/images/login/login-bg.png) no-repeat center;
|
||||||
|
// background: #fff;
|
||||||
|
background: linear-gradient(to bottom right, #cce6ff 0%, #79d0fc 100%);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.common-layout{
|
.common-layout{
|
||||||
|
|
|
@ -128,12 +128,6 @@ export const constantRoutes = [
|
||||||
name: 'examReport',
|
name: 'examReport',
|
||||||
meta: {title: '考试分析'}
|
meta: {title: '考试分析'}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/hashrate',
|
|
||||||
component: () => import('@/views/hashrate/index.vue'),
|
|
||||||
name: 'hashrate',
|
|
||||||
meta: {title: '算力'}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/setting',
|
path: '/setting',
|
||||||
component: () => import('@/views/setting/index.vue'),
|
component: () => import('@/views/setting/index.vue'),
|
||||||
|
|
|
@ -146,7 +146,7 @@ watch(
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
|
|
||||||
.class-item {
|
.class-item {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -282,7 +282,6 @@ onMounted(async ()=>{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
|
|
||||||
.con-ul{
|
.con-ul{
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
算力
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -1,157 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog v-model="dialogVisible" title="加入班级" width="50%" append-to-body>
|
|
||||||
<el-form
|
|
||||||
style="width: 100%"
|
|
||||||
label-width="auto"
|
|
||||||
:model="classForm"
|
|
||||||
:rules="rules"
|
|
||||||
ref="myForm"
|
|
||||||
>
|
|
||||||
<el-form-item label="老师" style="margin-right: 10px; width: 50%">
|
|
||||||
<el-text>
|
|
||||||
{{ userStore.nickName }}
|
|
||||||
</el-text>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="班级">
|
|
||||||
<el-tree-select
|
|
||||||
v-model="classids"
|
|
||||||
:data="gradeTree"
|
|
||||||
multiple
|
|
||||||
:render-after-expand="false"
|
|
||||||
style="width: 240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="btnSave">确 定</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, defineExpose,reactive } from 'vue'
|
|
||||||
import { listClassmain, addClasses } from '@/api/classManage/index'
|
|
||||||
import { ElMessage } from 'element-plus'
|
|
||||||
import useUserStore from '@/store/modules/user'
|
|
||||||
|
|
||||||
// 打开班级
|
|
||||||
const dialogVisible = ref(false)
|
|
||||||
const userStore = useUserStore().user
|
|
||||||
const classids = ref([])
|
|
||||||
//获取班级信息
|
|
||||||
const classList = ref([])
|
|
||||||
//班级列表
|
|
||||||
const gradeTree = ref([])
|
|
||||||
// 未加入的班级
|
|
||||||
const classesNotAMemberOf = ref([])
|
|
||||||
// 当前选中的班级
|
|
||||||
const currentIndex = ref(0)
|
|
||||||
const newGradeList = reactive([
|
|
||||||
[
|
|
||||||
{ label: '一年级', agekey: 1, checked: false, current: 1 },
|
|
||||||
{ label: '二年级', agekey: 2, checked: false, current: 1 },
|
|
||||||
{ label: '三年级', agekey: 3, checked: false, current: 1 },
|
|
||||||
{ label: '四年级', agekey: 4, checked: false, current: 1 },
|
|
||||||
{ label: '五年级', agekey: 5, checked: false, current: 1 },
|
|
||||||
{ label: '六年级', agekey: 6, checked: false, current: 1 },
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{ label: '初一', agekey: 7, checked: false, current: 2 },
|
|
||||||
{ label: '初二', agekey: 8, checked: false, current: 2 },
|
|
||||||
{ label: '初三', agekey: 9, checked: false, current: 2 },
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{ label: '高一', agekey: 10, checked: false, current: 3 },
|
|
||||||
{ label: '高二', agekey: 11, checked: false, current: 3 },
|
|
||||||
{ label: '高三', agekey: 12, checked: false, current: 3 },
|
|
||||||
],
|
|
||||||
])
|
|
||||||
|
|
||||||
// 打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
dialogVisible.value = true
|
|
||||||
getClassInfo()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增班级
|
|
||||||
const btnSave = () => {
|
|
||||||
addClasses({ classIds: classids.value.join(','), userId: userStore.userId }).then(res => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
dialogVisible.value = false
|
|
||||||
ElMessage({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
// 清空所选中的值
|
|
||||||
classids.value = []
|
|
||||||
} else {
|
|
||||||
ElMessage({
|
|
||||||
message: res.msg,
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 获取班级信息
|
|
||||||
const getClassInfo = () => {
|
|
||||||
classList.value = []
|
|
||||||
listClassmain({ classuserid: userStore.userId, pageSize: 100, status: 'open' }).then(response => {
|
|
||||||
classList.value = [...response.rows]
|
|
||||||
if(classList.value.length > 0){
|
|
||||||
currentIndex.value = 0
|
|
||||||
}
|
|
||||||
});
|
|
||||||
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
|
||||||
//清除已有的班级
|
|
||||||
classesNotAMemberOf.value = [...response.rows]
|
|
||||||
classList.value.forEach(item => {
|
|
||||||
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
|
|
||||||
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
|
|
||||||
})
|
|
||||||
//这里获取组装所有班级
|
|
||||||
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//将所有班级筛选成二级的数组
|
|
||||||
function groupByCondition(arr, condition) {
|
|
||||||
// 分组结果存储为对象
|
|
||||||
const groups = arr.reduce((groups, item) => {
|
|
||||||
const groupKey = condition(item);
|
|
||||||
item.label = item.caption
|
|
||||||
item.value = item.id
|
|
||||||
groups[groupKey] = groups[groupKey] || [];
|
|
||||||
groups[groupKey].push(item);
|
|
||||||
return groups;
|
|
||||||
}, {});
|
|
||||||
// 构建新的数据结构
|
|
||||||
const formattedGroups = Object.keys(groups).map(key => ({
|
|
||||||
label: gradeName(key),
|
|
||||||
value:key,
|
|
||||||
children: groups[key]
|
|
||||||
}));
|
|
||||||
return formattedGroups;
|
|
||||||
}
|
|
||||||
//key对应学段年级
|
|
||||||
function gradeName(key){
|
|
||||||
//先把二级数组转化为一级数组,用于筛选
|
|
||||||
const flatGradeDataList = newGradeList.flat();
|
|
||||||
const currentIndex = flatGradeDataList.findIndex(item => item.agekey === Number(key));
|
|
||||||
if(currentIndex !== -1){
|
|
||||||
return flatGradeDataList[currentIndex].label;
|
|
||||||
}else{
|
|
||||||
//社团的处理
|
|
||||||
const defaultLabel = '社团';
|
|
||||||
flatGradeDataList[currentIndex] = { ...flatGradeDataList[currentIndex], label: defaultLabel };
|
|
||||||
return defaultLabel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open
|
|
||||||
})
|
|
||||||
</script>
|
|
|
@ -1,15 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="display: flex;flex-wrap: wrap;align-items: center;">
|
<div v-for="(item,index) in classList" :key="index">
|
||||||
<div v-for="(item,index) in classList" :key="index" style="margin-right: 10px;cursor: pointer;">
|
<div>{{item.caption}}、</div>
|
||||||
<el-tag type="primary">{{item.caption}}</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" link @click="addClass">加入班级</el-button>
|
<el-button type="primary" link>加入班级</el-button>
|
||||||
<AddClass ref="addClassRef" />
|
</template>
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
import AddClass from './addClass.vue'
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
classList:{
|
classList:{
|
||||||
type:Array,
|
type:Array,
|
||||||
|
@ -18,10 +15,6 @@
|
||||||
type:Array,
|
type:Array,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const addClassRef = ref()
|
|
||||||
const addClass = () => {
|
|
||||||
addClassRef.value.open()
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,41 +1,39 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="display: flex;">
|
<div style="margin-left: 15px">
|
||||||
<div style="margin-left: 15px">
|
<el-dropdown @command="handleUserEduStage">
|
||||||
<el-dropdown @command="handleUserEduStage">
|
<span class="el-dropdown-link">
|
||||||
<span class="el-dropdown-link">
|
<el-button class="custom-button" type="default" round >{{ userStore.edustage }}
|
||||||
<el-button class="custom-button" type="default" round >{{ userStore.edustage }}
|
<el-icon><ArrowDown /></el-icon>
|
||||||
<el-icon><ArrowDown /></el-icon>
|
</el-button>
|
||||||
</el-button>
|
</span>
|
||||||
</span>
|
<template #dropdown>
|
||||||
<template #dropdown>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-item command="幼儿园">幼儿园</el-dropdown-item>
|
||||||
<el-dropdown-item command="幼儿园">幼儿园</el-dropdown-item>
|
<el-dropdown-item command="小学">小学</el-dropdown-item>
|
||||||
<el-dropdown-item command="小学">小学</el-dropdown-item>
|
<el-dropdown-item command="初中">初中</el-dropdown-item>
|
||||||
<el-dropdown-item command="初中">初中</el-dropdown-item>
|
<el-dropdown-item command="高中">高中</el-dropdown-item>
|
||||||
<el-dropdown-item command="高中">高中</el-dropdown-item>
|
</el-dropdown-menu>
|
||||||
</el-dropdown-menu>
|
</template>
|
||||||
</template>
|
</el-dropdown>
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
|
||||||
<div style="margin-left: 15px">
|
|
||||||
<el-dropdown @command="handleUserEduSubject">
|
|
||||||
<span class="el-dropdown-link">
|
|
||||||
<el-button class="custom-button" type="default" round>{{ userStore.edusubject }}
|
|
||||||
<el-icon><ArrowDown /></el-icon>
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
<template #dropdown>
|
|
||||||
<el-dropdown-menu>
|
|
||||||
<template v-for="(item, index) in subjectList">
|
|
||||||
<el-dropdown-item :command="item.itemtitle">{{
|
|
||||||
item.itemtitle }}</el-dropdown-item>
|
|
||||||
</template>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</template>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<div style="margin-left: 15px">
|
||||||
|
<el-dropdown @command="handleUserEduSubject">
|
||||||
|
<span class="el-dropdown-link">
|
||||||
|
<el-button class="custom-button" type="default" round>{{ userStore.edusubject }}
|
||||||
|
<el-icon><ArrowDown /></el-icon>
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<template v-for="(item, index) in subjectList">
|
||||||
|
<el-dropdown-item v-if="item.edustage == userStore.edustage" :command="item.itemtitle">{{
|
||||||
|
item.itemtitle }}</el-dropdown-item>
|
||||||
|
</template>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
@ -53,13 +51,6 @@ const getSubject = () => {
|
||||||
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 选择学段
|
|
||||||
const handleUserEduStage = (item) => {
|
|
||||||
userStore.edustage = item
|
|
||||||
}
|
|
||||||
const handleUserEduSubject = (item) => {
|
|
||||||
userStore.edusubject = item
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
console.log(userStore,'123')
|
console.log(userStore,'123')
|
||||||
|
|
|
@ -80,6 +80,9 @@ onMounted(() => {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.infomation{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.list-group-item {
|
.list-group-item {
|
||||||
|
|
|
@ -131,7 +131,7 @@ const getSubject = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (userStore.user.edudegree != '') {
|
if (props.user.edudegree != '') {
|
||||||
var upcaseName = [
|
var upcaseName = [
|
||||||
'一年级',
|
'一年级',
|
||||||
'二年级',
|
'二年级',
|
||||||
|
@ -146,15 +146,15 @@ setTimeout(() => {
|
||||||
'高二',
|
'高二',
|
||||||
'高三'
|
'高三'
|
||||||
]
|
]
|
||||||
var d = parseInt(userStore.user.edudegree.replace('年级', ''))
|
var d = parseInt(props.user.edudegree.replace('年级', ''))
|
||||||
if (d <= 6) {
|
if (d <= 6) {
|
||||||
userStore.user.edustage = '小学'
|
props.user.edustage = '小学'
|
||||||
} else if (d >= 7 && d <= 9) {
|
} else if (d >= 7 && d <= 9) {
|
||||||
userStore.user.edustage = '初中'
|
props.user.edustage = '初中'
|
||||||
} else if (d >= 9 && d <= 12) {
|
} else if (d >= 9 && d <= 12) {
|
||||||
userStore.user.edustage = '高中'
|
props.user.edustage = '高中'
|
||||||
}
|
}
|
||||||
userStore.user.stagelabel = upcaseName[d - 1]
|
props.user.stagelabel = upcaseName[d - 1]
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
|
@ -162,10 +162,10 @@ setTimeout(() => {
|
||||||
function submit() {
|
function submit() {
|
||||||
proxy.$refs.userRef.validate((valid) => {
|
proxy.$refs.userRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
userStore.user.avatar = userStore.user.avatar
|
props.user.avatar = userStore.user.avatar
|
||||||
updateUserInfo(userStore.user).then((response) => {
|
updateUserInfo(props.user).then((response) => {
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => {
|
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
|
||||||
userStore.getInfo().then(res => {
|
userStore.getInfo().then(res => {
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
let sessionSubject = {
|
let sessionSubject = {
|
||||||
|
@ -191,20 +191,21 @@ function submit() {
|
||||||
}
|
}
|
||||||
const semeterChange = (item) => {
|
const semeterChange = (item) => {
|
||||||
if(item === '幼儿园'){
|
if(item === '幼儿园'){
|
||||||
userStore.user.edusubject = ''
|
props.user.edusubject = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取班级信息
|
// 获取班级信息
|
||||||
const getClassInfo = () => {
|
const getClassInfo = () => {
|
||||||
classList.value = []
|
classList.value = []
|
||||||
listClassmain({ classuserid: userStore.user.userId, pageSize: 100, status: 'open' }).then(response => {
|
debugger
|
||||||
|
listClassmain({ classuserid: props.user.userId, pageSize: 100, status: 'open' }).then(response => {
|
||||||
classList.value = [...response.rows]
|
classList.value = [...response.rows]
|
||||||
if(classList.value.length > 0){
|
if(classList.value.length > 0){
|
||||||
currentIndex.value = 0
|
currentIndex.value = 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
listClassmain({entpid: userStore.user.deptId, status: 'open', pageSize: 100}).then(response => {
|
listClassmain({entpid: props.user.deptId, status: 'open', pageSize: 100}).then(response => {
|
||||||
//清除已有的班级
|
//清除已有的班级
|
||||||
classesNotAMemberOf.value = [...response.rows]
|
classesNotAMemberOf.value = [...response.rows]
|
||||||
classList.value.forEach(item => {
|
classList.value.forEach(item => {
|
||||||
|
@ -248,6 +249,9 @@ function groupByCondition(arr, condition) {
|
||||||
return defaultLabel;
|
return defaultLabel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const addClass = () => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
getClassInfo()
|
getClassInfo()
|
||||||
|
|
Loading…
Reference in New Issue