Compare commits
No commits in common. "27c7033522c76bd51923e7eb75ae660d7369d014" and "cafea2d7190980837c7973cbb54910bac2f74b7c" have entirely different histories.
27c7033522
...
cafea2d719
|
@ -302,7 +302,7 @@
|
||||||
addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => {
|
addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
ElMessage({x
|
ElMessage({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
:before-close="handleClose"
|
: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-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" style="cursor:pointer"/>
|
<el-step title="1.基本信息" @click="activeIndex=1" />
|
||||||
<el-step title="2.在校信息" />
|
<el-step title="2.在校信息" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -37,14 +37,12 @@
|
||||||
<el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1">
|
<el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1">
|
||||||
<el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" />
|
<el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" />
|
||||||
</el-form-item>
|
</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
|
<el-cascader
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
popper-class="aix-regist-address"
|
|
||||||
v-model="ruleForm.address"
|
v-model="ruleForm.address"
|
||||||
:options="regionData"
|
:options="regionData"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
:props="{checkStrictly: true}"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学校" prop="school" v-if="activeIndex==2">
|
<el-form-item label="学校" prop="school" v-if="activeIndex==2">
|
||||||
|
@ -62,7 +60,7 @@
|
||||||
<el-form-item label="学科" prop="discipline" v-if="activeIndex==2">
|
<el-form-item label="学科" prop="discipline" v-if="activeIndex==2">
|
||||||
<div v-for="item in schoolSubject" style="display: flex;">
|
<div v-for="item in schoolSubject" style="display: flex;">
|
||||||
<span style="width:50px">{{ item.name }}:</span>
|
<span style="width:50px">{{ item.name }}:</span>
|
||||||
<el-checkbox-group style="width:100%" v-model="ruleForm.discipline">
|
<el-checkbox-group style="width:100%" v-model="ruleForm.discipline">
|
||||||
<el-checkbox style="margin-right:10px" v-for="el in item.children" :key="el.id" :label="el.itemtitle" :value="el" />
|
<el-checkbox style="margin-right:10px" v-for="el in item.children" :key="el.id" :label="el.itemtitle" :value="el" />
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,7 +72,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="activeIndex==2">
|
<el-form-item v-if="activeIndex==2">
|
||||||
<div class="centerDiv">
|
<div class="centerDiv">
|
||||||
<el-button type="default" @click="activeIndex=1">上一步</el-button>
|
|
||||||
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
|
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -107,7 +104,7 @@
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -219,7 +216,7 @@ const rules = reactive({
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择学科',
|
message: '请选择学科',
|
||||||
trigger: 'change',
|
trigger: 'change',
|
||||||
},]
|
},]
|
||||||
})
|
})
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
|
|
||||||
|
@ -297,6 +294,7 @@ const nextStep = (formEl) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getSubject()
|
getSubject()
|
||||||
|
console.log(res)
|
||||||
})
|
})
|
||||||
console.log('submit!')
|
console.log('submit!')
|
||||||
}
|
}
|
||||||
|
@ -310,8 +308,7 @@ const getSubject = async ()=>{
|
||||||
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
|
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
|
||||||
console.log(rows,'所有学科')
|
console.log(rows,'所有学科')
|
||||||
allSubjectList.value = rows.data
|
allSubjectList.value = rows.data
|
||||||
accessToDisciplines()
|
|
||||||
getClassmain()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const submitForm = async (formEl) => {
|
const submitForm = async (formEl) => {
|
||||||
|
@ -412,53 +409,46 @@ const sbmitImg=()=>{
|
||||||
ruleForm.Code=res.data
|
ruleForm.Code=res.data
|
||||||
isImg.value=false
|
isImg.value=false
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
ElMessage.error('请根据图片输入验证码')
|
ElMessage.error('请根据图片输入验证码')
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
const handleChange = (value) => {
|
const handleChange = (value) => {
|
||||||
console.log('选中的地址值:', value);
|
console.log('选中的地址值:', value);
|
||||||
};
|
};
|
||||||
const handleSchoolChange= ()=>{
|
const handleSchoolChange= async ()=>{
|
||||||
ruleForm.discipline=[];
|
ruleForm.discipline=[];
|
||||||
ruleForm.class=[];
|
ruleForm.class=[];
|
||||||
//获取学科班级
|
|
||||||
accessToDisciplines()
|
|
||||||
getClassmain()
|
|
||||||
}
|
|
||||||
// 获取学科
|
|
||||||
const accessToDisciplines = () => {
|
|
||||||
getDept({deptId:ruleForm.school[2]}).then(res =>{
|
getDept({deptId:ruleForm.school[2]}).then(res =>{
|
||||||
if(res.data.studying && res.data.studying.length){
|
if(res.data.studying && res.data.studying.length){
|
||||||
let studying = res.data.studying.split(',')
|
let studying = res.data.studying.split(',')
|
||||||
let ary = []
|
let ary = []
|
||||||
studying.forEach(item =>{
|
studying.forEach(item =>{
|
||||||
let obj = {
|
let obj = {
|
||||||
name: item,
|
name: item,
|
||||||
children: []
|
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)
|
||||||
})
|
})
|
||||||
ary.push(obj)
|
schoolSubject.value = ary
|
||||||
})
|
}
|
||||||
schoolSubject.value = ary
|
else{
|
||||||
}
|
schoolSubject.value = []
|
||||||
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,'班级')
|
||||||
})
|
})
|
||||||
}
|
|
||||||
// 获取班级
|
|
||||||
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)=>{
|
const groupByCondition = (arr, condition)=>{
|
||||||
|
@ -494,11 +484,8 @@ const gradeName = (key) =>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
//默认给到地区重庆
|
|
||||||
ruleForm.address = ['50']
|
})
|
||||||
//默认给到学校的值
|
|
||||||
ruleForm.school = [100,255,279]
|
|
||||||
})
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
OpenModel,
|
OpenModel,
|
||||||
})
|
})
|
||||||
|
@ -511,17 +498,4 @@ defineExpose({
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
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>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue