Compare commits

..

4 Commits

Author SHA1 Message Date
朱浩 27c7033522 Merge pull request 'yangws' (#249) from yangws into main
Reviewed-on: #249
2024-09-22 16:47:12 +08:00
朱浩 4c66cc90c0 BUG修复 2024-09-22 16:46:37 +08:00
lyc c2b54714ac Merge pull request '跳转增加bookid' (#248) from lyc-dev into main 2024-09-22 16:41:45 +08:00
yangws d5afede36c fix:2.0.4bug修改; 2024-09-22 16:28:10 +08:00
2 changed files with 62 additions and 36 deletions

View File

@ -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({ ElMessage({x
message: res.msg, message: res.msg,
type: 'success', type: 'success',
}) })

View File

@ -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" /> <el-step title="1.基本信息" @click="activeIndex=1" style="cursor:pointer"/>
<el-step title="2.在校信息" /> <el-step title="2.在校信息" />
</el-steps> </el-steps>
<el-form <el-form
@ -40,9 +40,11 @@
<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">
@ -72,6 +74,7 @@
</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>
@ -294,7 +297,6 @@ const nextStep = (formEl) => {
} }
}) })
getSubject() getSubject()
console.log(res)
}) })
console.log('submit!') console.log('submit!')
} }
@ -308,7 +310,8 @@ 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) => {
@ -419,9 +422,15 @@ const sbmitImg=()=>{
const handleChange = (value) => { const handleChange = (value) => {
console.log('选中的地址值:', value); console.log('选中的地址值:', value);
}; };
const handleSchoolChange= async ()=>{ const handleSchoolChange= ()=>{
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(',')
@ -444,11 +453,12 @@ const handleSchoolChange= async ()=>{
schoolSubject.value = [] schoolSubject.value = []
} }
}) })
listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'}).then(res=>{ }
//
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); gradeTree.value = groupByCondition(res.rows, item => item.agekey);
console.log(gradeTree.value,'班级')
})
} }
// //
const groupByCondition = (arr, condition)=>{ const groupByCondition = (arr, condition)=>{
@ -484,7 +494,10 @@ const gradeName = (key) =>{
} }
} }
onMounted(()=>{ onMounted(()=>{
//
ruleForm.address = ['50']
//
ruleForm.school = [100,255,279]
}) })
defineExpose({ defineExpose({
OpenModel, OpenModel,
@ -498,4 +511,17 @@ 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>