|
|
|
@ -6,12 +6,6 @@
|
|
|
|
|
<div >
|
|
|
|
|
<Aside :menuItems="menuItems" :classList="classList" @handleSelect="handleSelect"></Aside>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 隐藏操作按钮-->
|
|
|
|
|
<!-- <template #footer>-->
|
|
|
|
|
<!-- <div>-->
|
|
|
|
|
<!-- <el-button @click="addClass" type="primary" :icon="Plus" >新增班级</el-button>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button @click="addClass" type="primary" :icon="Plus" >加入班级</el-button>
|
|
|
|
@ -41,29 +35,6 @@
|
|
|
|
|
:rules="rules"
|
|
|
|
|
ref="myForm"
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-form-item label="班级名称" style="margin-right: 10px;width: 50%" prop="caption">-->
|
|
|
|
|
<!-- <el-input v-model="classForm.caption" placeholder="请输入班级名称"></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="任选学科" style="margin-right: 10px;">-->
|
|
|
|
|
<!-- <el-radio-group v-model="classForm.edusubject" class="ml-4">-->
|
|
|
|
|
<!-- <template v-for="(item, index) in courseList" :key="index">-->
|
|
|
|
|
<!-- <el-radio v-if="item.edustage == userStore.edustage" :value="item.itemtitle">{{ item.itemtitle }}</el-radio>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="年级" style="margin-right: 10px;" prop="agekey">-->
|
|
|
|
|
<!-- <el-radio-group v-model="classForm.edudegree">-->
|
|
|
|
|
<!-- <template v-for="(item,index) in gradeList" :key="index">-->
|
|
|
|
|
<!-- <el-radio v-if="item.edustage == userStore.edustage" :value="item.value">{{ item.label }}</el-radio>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="老师" prop="teacherid">-->
|
|
|
|
|
<!-- {{ userStore.nickName }}-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="简要说明" style="margin-right: 10px;" prop="classdesc">-->
|
|
|
|
|
<!-- <el-input v-model="classForm.classdesc" placeholder="请输入简要说明"></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="老师" style="margin-right: 10px;width: 50%">
|
|
|
|
|
<el-text>
|
|
|
|
|
{{userStore.nickName}}
|
|
|
|
@ -242,61 +213,9 @@
|
|
|
|
|
return defaultLabel;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//获取所有学科
|
|
|
|
|
// const getCourseList = () => {
|
|
|
|
|
// // 获取基础的学科
|
|
|
|
|
// listEvaluation({ itemkey: "subject", pageSize: 500 }).then((res) => {
|
|
|
|
|
// courseList.value = [...res.rows];
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// 新增班级
|
|
|
|
|
const addClass = () => {
|
|
|
|
|
dialogVisible.value = true
|
|
|
|
|
// getCourseList()
|
|
|
|
|
}
|
|
|
|
|
// const btnSave = () => {
|
|
|
|
|
// myForm.value.validate((valid) => {
|
|
|
|
|
// if (valid) {
|
|
|
|
|
// //查看班级是否重名
|
|
|
|
|
// listClassmain({ entpid: userStore.deptId, status: 'open', pageSize: 500 }).then(response => {
|
|
|
|
|
// const data = [...response.rows]
|
|
|
|
|
// const existList = [];
|
|
|
|
|
// data.forEach(item => {
|
|
|
|
|
// if (parseInt(textSimilar(item.caption, classForm.caption, 2)) > 80) {
|
|
|
|
|
// existList.push(item);
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
//
|
|
|
|
|
// if (existList.length == 0) {
|
|
|
|
|
// const age = classForm.edudegree;
|
|
|
|
|
// const index = gradeList.value.findIndex(item => item.label === age);
|
|
|
|
|
// classForm.agekey = gradeList.value[index].agekey
|
|
|
|
|
// classForm.edudegree = `${gradeList.value[index].agekey}年级`
|
|
|
|
|
// classForm.entpid = userStore.deptId;
|
|
|
|
|
// classForm.status = 'open';
|
|
|
|
|
// classForm.teachername = userStore.nickName;
|
|
|
|
|
// classForm.teacherid = userStore.userId;
|
|
|
|
|
// classForm.teacherSubject = classForm.edusubject;
|
|
|
|
|
// addClassmain(classForm).then(response => {
|
|
|
|
|
// if (response.code === 200) {
|
|
|
|
|
// dialogVisible.value = false
|
|
|
|
|
// ElMessage({
|
|
|
|
|
// message: '新增成功',
|
|
|
|
|
// type: 'success',
|
|
|
|
|
// })
|
|
|
|
|
// getClassInfo()
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }else{
|
|
|
|
|
// ElMessage({
|
|
|
|
|
// message: '班级名称重复',
|
|
|
|
|
// type: 'warning',
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
//新增班级
|
|
|
|
|
const btnSave = () => {
|
|
|
|
|
addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => {
|
|
|
|
|