fix:2.0.4bug修改;
This commit is contained in:
parent
df1f8737bd
commit
a64ba24742
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card style="width: 100%;height: 100%;overflow: auto">
|
<el-card style="width: 100%;height: 100%;overflow: auto">
|
||||||
<!-- <template #header>-->
|
<template #header>
|
||||||
<!-- <div class="card-header" style="text-align: left">-->
|
<div class="card-header" style="text-align: left">
|
||||||
<!-- <el-button type="primary" @click="addGroup">新建分组</el-button>-->
|
<el-button type="primary" @click="addGroup">新建分组</el-button>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </template>-->
|
</template>
|
||||||
<template v-if="groupList.length > 0">
|
<template v-if="groupList.length > 0">
|
||||||
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
|
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
|
||||||
<div class="groupList">
|
<div class="groupList">
|
||||||
|
|
|
@ -186,7 +186,8 @@
|
||||||
])
|
])
|
||||||
//选择的班级
|
//选择的班级
|
||||||
const classids = ref('')
|
const classids = ref('')
|
||||||
|
// 未加入的班级
|
||||||
|
const classesNotAMemberOf = ref([])
|
||||||
// 获取班级信息
|
// 获取班级信息
|
||||||
const getClassInfo = () => {
|
const getClassInfo = () => {
|
||||||
classList.value = []
|
classList.value = []
|
||||||
|
@ -199,13 +200,13 @@
|
||||||
});
|
});
|
||||||
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
|
||||||
//清除已有的班级
|
//清除已有的班级
|
||||||
let arr = [...response.rows]
|
classesNotAMemberOf.value = [...response.rows]
|
||||||
classList.value.forEach(item => {
|
classList.value.forEach(item => {
|
||||||
const currentIndex = arr.findIndex(items => items.id === item.id)
|
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
|
||||||
if(currentIndex) arr.splice(currentIndex, 1)
|
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
|
||||||
})
|
})
|
||||||
//这里获取组装所有班级
|
//这里获取组装所有班级
|
||||||
gradeTree.value = groupByCondition(arr, item => item.agekey);
|
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//将所有班级筛选成二级的数组
|
//将所有班级筛选成二级的数组
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="left-align">
|
<div class="left-align">
|
||||||
<Message class="Message"/>
|
<Message class="Message"/>
|
||||||
<span>用户邮箱</span>
|
<span>身份证号</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-align">{{ state.user.email }}</div>
|
<div class="right-align">{{ state.user.identity }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="left-align">
|
<div class="left-align">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<Avatar class="Avatar"/>
|
<Avatar class="Avatar"/>
|
||||||
<span>所属角色</span>
|
<span>所属角色</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-align">{{ state.roleGroup }}</div>
|
<div class="right-align">{{ state.roleGroup || '教师' }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="left-align">
|
<div class="left-align">
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<el-form-item label="手机号码" prop="phonenumber">
|
<el-form-item label="手机号码" prop="phonenumber">
|
||||||
<el-input v-model="user.phonenumber" maxlength="11" />
|
<el-input v-model="user.phonenumber" maxlength="11" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="身份证号" prop="identity">
|
||||||
<el-input v-model="user.email" maxlength="50" />
|
<el-input v-model="user.identity" maxlength="50" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别">
|
<el-form-item label="性别" style="display: none">
|
||||||
<el-radio-group v-model="user.sex">
|
<el-radio-group v-model="user.sex">
|
||||||
<el-radio value="0">男</el-radio>
|
<el-radio value="0">男</el-radio>
|
||||||
<el-radio value="1">女</el-radio>
|
<el-radio value="1">女</el-radio>
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
<el-form-item label="学段">
|
<el-form-item label="学段">
|
||||||
<el-radio-group v-model="user.edustage" @change="semeterChange">
|
<el-radio-group v-model="user.edustage" @change="semeterChange">
|
||||||
<template v-for="(item,index) in semesterList" :key="index">
|
<template v-for="(item,index) in semesterList" :key="index">
|
||||||
<el-radio :value="item.title">
|
<el-radio :value="item.label">
|
||||||
{{item.title }}
|
{{item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, getCurrentInstance,onMounted } from 'vue'
|
import { ref, getCurrentInstance,onMounted } from 'vue'
|
||||||
import {updateUserInfo } from '@/api/system/user'
|
import {updateUserInfo } from '@/api/system/user'
|
||||||
|
import {getDept } from '@/api/login'
|
||||||
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'
|
||||||
|
@ -60,21 +61,30 @@ const userStore = useUserStore()
|
||||||
const semesterList = ref([
|
const semesterList = ref([
|
||||||
{
|
{
|
||||||
id:1,
|
id:1,
|
||||||
title:'幼儿园'
|
label:'幼儿园'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:2,
|
id:2,
|
||||||
title:'小学'
|
label:'小学'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:3,
|
id:3,
|
||||||
title:'初中'
|
label:'初中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:4,
|
id:4,
|
||||||
title:'高中'
|
label:'高中'
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
// 获取学校所存在的学段
|
||||||
|
|
||||||
|
const getTheSection = () => {
|
||||||
|
getDept({deptId:userStore.user.deptId}).then(res => {
|
||||||
|
//获取该学校可以选择的学科
|
||||||
|
const arr = res.data.studying.split(',')
|
||||||
|
semesterList.value = semesterList.value.filter(items => {return arr.includes(items.label)}).map(item => item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
||||||
|
@ -159,5 +169,6 @@ const semeterChange = (item) => {
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubject()
|
getSubject()
|
||||||
|
getTheSection()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue