|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
:before-close="handleClose"
|
|
|
|
|
>
|
|
|
|
|
<el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple>
|
|
|
|
|
<el-step title="1.基本信息" @click="activeIndex=1" />
|
|
|
|
|
<el-step title="1.基本信息" @click="activeIndex=1" style="cursor:pointer"/>
|
|
|
|
|
<el-step title="2.在校信息" />
|
|
|
|
|
</el-steps>
|
|
|
|
|
<el-form
|
|
|
|
@ -37,12 +37,14 @@
|
|
|
|
|
<el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1">
|
|
|
|
|
<el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="所属地区" prop="address" v-if="activeIndex==2">
|
|
|
|
|
<el-form-item label="所属地区" prop="address" v-if="activeIndex==2">
|
|
|
|
|
<el-cascader
|
|
|
|
|
style="width:100%"
|
|
|
|
|
popper-class="aix-regist-address"
|
|
|
|
|
v-model="ruleForm.address"
|
|
|
|
|
:options="regionData"
|
|
|
|
|
@change="handleChange"
|
|
|
|
|
:props="{checkStrictly: true}"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="学校" prop="school" v-if="activeIndex==2">
|
|
|
|
@ -72,6 +74,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="activeIndex==2">
|
|
|
|
|
<div class="centerDiv">
|
|
|
|
|
<el-button type="default" @click="activeIndex=1">上一步</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -294,7 +297,6 @@ const nextStep = (formEl) => {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
getSubject()
|
|
|
|
|
console.log(res)
|
|
|
|
|
})
|
|
|
|
|
console.log('submit!')
|
|
|
|
|
}
|
|
|
|
@ -308,7 +310,8 @@ const getSubject = async ()=>{
|
|
|
|
|
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
|
|
|
|
|
console.log(rows,'所有学科')
|
|
|
|
|
allSubjectList.value = rows.data
|
|
|
|
|
|
|
|
|
|
accessToDisciplines()
|
|
|
|
|
getClassmain()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const submitForm = async (formEl) => {
|
|
|
|
@ -419,36 +422,43 @@ const sbmitImg=()=>{
|
|
|
|
|
const handleChange = (value) => {
|
|
|
|
|
console.log('选中的地址值:', value);
|
|
|
|
|
};
|
|
|
|
|
const handleSchoolChange= async ()=>{
|
|
|
|
|
const handleSchoolChange= ()=>{
|
|
|
|
|
ruleForm.discipline=[];
|
|
|
|
|
ruleForm.class=[];
|
|
|
|
|
//获取学科班级
|
|
|
|
|
accessToDisciplines()
|
|
|
|
|
getClassmain()
|
|
|
|
|
}
|
|
|
|
|
// 获取学科
|
|
|
|
|
const accessToDisciplines = () => {
|
|
|
|
|
getDept({deptId:ruleForm.school[2]}).then(res =>{
|
|
|
|
|
if(res.data.studying && res.data.studying.length){
|
|
|
|
|
let studying = res.data.studying.split(',')
|
|
|
|
|
let ary = []
|
|
|
|
|
studying.forEach(item =>{
|
|
|
|
|
let obj = {
|
|
|
|
|
name: item,
|
|
|
|
|
children: []
|
|
|
|
|
if(res.data.studying && res.data.studying.length){
|
|
|
|
|
let studying = res.data.studying.split(',')
|
|
|
|
|
let ary = []
|
|
|
|
|
studying.forEach(item =>{
|
|
|
|
|
let obj = {
|
|
|
|
|
name: item,
|
|
|
|
|
children: []
|
|
|
|
|
}
|
|
|
|
|
allSubjectList.value.forEach(el =>{
|
|
|
|
|
if(item == el.edustage){
|
|
|
|
|
obj.children.push(el)
|
|
|
|
|
}
|
|
|
|
|
allSubjectList.value.forEach(el =>{
|
|
|
|
|
if(item == el.edustage){
|
|
|
|
|
obj.children.push(el)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
ary.push(obj)
|
|
|
|
|
})
|
|
|
|
|
schoolSubject.value = ary
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
schoolSubject.value = []
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'}).then(res=>{
|
|
|
|
|
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
|
|
|
|
|
console.log(gradeTree.value,'班级')
|
|
|
|
|
ary.push(obj)
|
|
|
|
|
})
|
|
|
|
|
schoolSubject.value = ary
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
schoolSubject.value = []
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 获取班级
|
|
|
|
|
const getClassmain = async ()=>{
|
|
|
|
|
console.log(ruleForm.school)
|
|
|
|
|
const res = await listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'})
|
|
|
|
|
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
|
|
|
|
|
}
|
|
|
|
|
//将所有班级筛选成二级的数组
|
|
|
|
|
const groupByCondition = (arr, condition)=>{
|
|
|
|
@ -484,7 +494,10 @@ const gradeName = (key) =>{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
|
|
|
|
|
//默认给到地区重庆
|
|
|
|
|
ruleForm.address = ['50']
|
|
|
|
|
//默认给到学校的值
|
|
|
|
|
ruleForm.school = [100,255,279]
|
|
|
|
|
})
|
|
|
|
|
defineExpose({
|
|
|
|
|
OpenModel,
|
|
|
|
@ -498,4 +511,17 @@ defineExpose({
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.aix-regist-address{
|
|
|
|
|
.el-cascader-node{
|
|
|
|
|
position: relative!important;
|
|
|
|
|
.el-radio{
|
|
|
|
|
position: absolute!important;
|
|
|
|
|
width: 90%!important;
|
|
|
|
|
left:5px!important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|