|
@@ -101,6 +101,7 @@ export default defineComponent({
|
|
|
// studentRegisterStore.setShoolId(route.query.sId as any);
|
|
|
const countDownRef = ref();
|
|
|
const forms = reactive({
|
|
|
+ isLoginRegister: false, // 是否已经登录或已注册
|
|
|
schoolId: null as any,
|
|
|
schoolAreaId: null, // 学校区域编号
|
|
|
activationCode: null as any, // 互通码
|
|
@@ -390,6 +391,9 @@ export default defineComponent({
|
|
|
tPassword = forms.studentItem.token;
|
|
|
tMultiUser = false;
|
|
|
}
|
|
|
+ if (forms.isLoginRegister) {
|
|
|
+ tAutoRegister = false;
|
|
|
+ }
|
|
|
const result = await request.post('/edu-app/userlogin', {
|
|
|
requestType: 'form',
|
|
|
data: {
|
|
@@ -424,6 +428,7 @@ export default defineComponent({
|
|
|
// forms.showButton = false;
|
|
|
// }
|
|
|
} else {
|
|
|
+ forms.isLoginRegister = true;
|
|
|
studentRegisterStore.setToken(
|
|
|
result.data.token_type + ' ' + result.data.access_token
|
|
|
);
|
|
@@ -678,14 +683,15 @@ export default defineComponent({
|
|
|
if (data.school) {
|
|
|
const schoolInfo = data.school || {};
|
|
|
const schoolInstrumentList = schoolInfo.schoolInstrumentList || [];
|
|
|
- if (schoolInfo.schoolInstrumentSetType === 'SCHOOL') {
|
|
|
+ forms.schoolInstrumentSetType = schoolInfo.instrumentSetType;
|
|
|
+ if (schoolInfo.instrumentSetType === 'SCHOOL') {
|
|
|
const instrumentCode = schoolInstrumentList[0]?.instrumentCode;
|
|
|
forms.gradeList = getGradeList(
|
|
|
schoolInfo.gradeYear,
|
|
|
instrumentCode
|
|
|
);
|
|
|
forms.classList = classList;
|
|
|
- } else if (schoolInfo.schoolInstrumentSetType === 'GRADE') {
|
|
|
+ } else if (schoolInfo.instrumentSetType === 'GRADE') {
|
|
|
schoolInstrumentList.forEach((item: any) => {
|
|
|
forms.gradeList.push({
|
|
|
text: GRADE_ENUM[item.gradeNum],
|
|
@@ -696,7 +702,7 @@ export default defineComponent({
|
|
|
});
|
|
|
forms.gradeList.sort((a: any, b: any) => a.value - b.value);
|
|
|
forms.classList = classList;
|
|
|
- } else if (schoolInfo.schoolInstrumentSetType === 'CLASS') {
|
|
|
+ } else if (schoolInfo.instrumentSetType === 'CLASS') {
|
|
|
// 班级
|
|
|
const tempGradeList: any[] = [];
|
|
|
schoolInstrumentList.forEach((item: any) => {
|
|
@@ -739,6 +745,7 @@ export default defineComponent({
|
|
|
forms.classList = classList;
|
|
|
}
|
|
|
} else {
|
|
|
+ forms.schoolInstrumentSetType = '';
|
|
|
forms.gradeList = getGradeList();
|
|
|
forms.classList = classList;
|
|
|
}
|
|
@@ -783,7 +790,11 @@ export default defineComponent({
|
|
|
forms.classList = classList;
|
|
|
});
|
|
|
return () => (
|
|
|
- <div class={styles['student-register']}>
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ styles['student-register'],
|
|
|
+ browser().isTablet ? styles.registrationContainerTablet : ''
|
|
|
+ ]}>
|
|
|
<div class={styles.studentRegisterContainer}>
|
|
|
<div class={[styles.studentSection]}>
|
|
|
<Form labelAlign="left" class={styles.registerForm}>
|
|
@@ -847,6 +858,7 @@ export default defineComponent({
|
|
|
placeholder="请输入学生姓名"
|
|
|
autocomplete="off"
|
|
|
maxlength={14}
|
|
|
+ readonly={forms.isRegister === 'update'}
|
|
|
v-model={studentInfo.extra.nickname}>
|
|
|
{{
|
|
|
extra: () =>
|
|
@@ -877,7 +889,8 @@ export default defineComponent({
|
|
|
<RadioGroup
|
|
|
checked-color="linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)"
|
|
|
v-model={studentInfo.extra.gender}
|
|
|
- direction="horizontal">
|
|
|
+ direction="horizontal"
|
|
|
+ disabled={forms.isRegister === 'update'}>
|
|
|
<Tag
|
|
|
size="large"
|
|
|
type="primary"
|
|
@@ -1140,7 +1153,7 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
if (forms.schoolInstrumentSetType === 'CLASS') {
|
|
|
- forms.classList = selectedOption.classList;
|
|
|
+ forms.classList = selectedOption.classList || [];
|
|
|
}
|
|
|
if (
|
|
|
['CLASS', 'GRADE'].includes(forms.schoolInstrumentSetType)
|
|
@@ -1330,6 +1343,10 @@ export default defineComponent({
|
|
|
forms.studentItem = val;
|
|
|
forms.isRegister = 'create';
|
|
|
changeTipStatus(false, false);
|
|
|
+ forms.areaName = '';
|
|
|
+ forms.schoolName = '';
|
|
|
+ forms.schoolAreaId = null;
|
|
|
+ forms.schoolId = null;
|
|
|
studentInfo.extra.nickname = '';
|
|
|
studentInfo.extra.currentGradeNum = '';
|
|
|
studentInfo.extra.currentClass = '';
|