fix:2.0.4bug修改; #245

Merged
yangws merged 1 commits from yangws into main 2024-09-22 12:52:55 +08:00
4 changed files with 34 additions and 22 deletions
Showing only changes of commit a64ba24742 - Show all commits

View File

@ -1,10 +1,10 @@
<template>
<el-card style="width: 100%;height: 100%;overflow: auto">
<!-- <template #header>-->
<!-- <div class="card-header" style="text-align: left">-->
<!-- <el-button type="primary" @click="addGroup">新建分组</el-button>-->
<!-- </div>-->
<!-- </template>-->
<template #header>
<div class="card-header" style="text-align: left">
<el-button type="primary" @click="addGroup">新建分组</el-button>
</div>
</template>
<template v-if="groupList.length > 0">
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
<div class="groupList">

View File

@ -186,7 +186,8 @@
])
//
const classids = ref('')
//
const classesNotAMemberOf = ref([])
//
const getClassInfo = () => {
classList.value = []
@ -199,13 +200,13 @@
});
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
//
let arr = [...response.rows]
classesNotAMemberOf.value = [...response.rows]
classList.value.forEach(item => {
const currentIndex = arr.findIndex(items => items.id === item.id)
if(currentIndex) arr.splice(currentIndex, 1)
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
})
//
gradeTree.value = groupByCondition(arr, item => item.agekey);
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
})
}
//

View File

@ -30,9 +30,9 @@
<li class="list-group-item">
<div class="left-align">
<Message class="Message"/>
<span>用户邮箱</span>
<span>身份证号</span>
</div>
<div class="right-align">{{ state.user.email }}</div>
<div class="right-align">{{ state.user.identity }}</div>
</li>
<li class="list-group-item">
<div class="left-align">
@ -48,7 +48,7 @@
<Avatar class="Avatar"/>
<span>所属角色</span>
</div>
<div class="right-align">{{ state.roleGroup }}</div>
<div class="right-align">{{ state.roleGroup || '教师' }}</div>
</li>
<li class="list-group-item">
<div class="left-align">

View File

@ -6,10 +6,10 @@
<el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="user.phonenumber" maxlength="11" />
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="user.email" maxlength="50" />
<el-form-item label="身份证号" prop="identity">
<el-input v-model="user.identity" maxlength="50" />
</el-form-item>
<el-form-item label="性别">
<el-form-item label="性别" style="display: none">
<el-radio-group v-model="user.sex">
<el-radio value="0"></el-radio>
<el-radio value="1"></el-radio>
@ -18,8 +18,8 @@
<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 :value="item.label">
{{item.label }}
</el-radio>
</template>
</el-radio-group>
@ -42,6 +42,7 @@
<script setup>
import { ref, getCurrentInstance,onMounted } from 'vue'
import {updateUserInfo } from '@/api/system/user'
import {getDept } from '@/api/login'
import { listEvaluation } from '@/api/subject/index'
import useUserStore from '@/store/modules/user'
import {ElMessage} from 'element-plus'
@ -60,21 +61,30 @@ const userStore = useUserStore()
const semesterList = ref([
{
id:1,
title:'幼儿园'
label:'幼儿园'
},
{
id:2,
title:'小学'
label:'小学'
},
{
id:3,
title:'初中'
label:'初中'
},
{
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({
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
@ -159,5 +169,6 @@ const semeterChange = (item) => {
}
onMounted(() => {
getSubject()
getTheSection()
})
</script>