|
|
|
@ -8,56 +8,94 @@ |
|
|
|
|
<div class="errorBtn" @click="clickErrorBtn"></div> |
|
|
|
|
<el-row style="display: flex; justify-content: center"> |
|
|
|
|
<el-col> |
|
|
|
|
<el-form :rules="rules" :model="formModel" ref="formRef" size="large" autocomplete="off" v-if="isRegister"> |
|
|
|
|
<el-form |
|
|
|
|
:rules="rules" |
|
|
|
|
:model="formModel" |
|
|
|
|
ref="formRef" |
|
|
|
|
size="large" |
|
|
|
|
autocomplete="off" |
|
|
|
|
v-if="isRegister" |
|
|
|
|
> |
|
|
|
|
<el-form-item prop="username"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<User /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户账号</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
用户账号 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input v-model="formModel.username" placeholder="请输入用户账号"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.username" |
|
|
|
|
placeholder="请输入用户账号" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="password"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Lock /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户密码</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
用户密码 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input type="password" v-model="formModel.password" placeholder="请输入密码" show-password></el-input> |
|
|
|
|
<el-input |
|
|
|
|
type="password" |
|
|
|
|
v-model="formModel.password" |
|
|
|
|
placeholder="请输入密码" |
|
|
|
|
show-password |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="repassword"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Lock /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">确认密码</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
确认密码 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input type="password" v-model="formModel.repassword" style="border-color: #20bec8" |
|
|
|
|
placeholder="请再次输入密码" show-password></el-input> |
|
|
|
|
<el-input |
|
|
|
|
type="password" |
|
|
|
|
v-model="formModel.repassword" |
|
|
|
|
style="border-color: #20bec8" |
|
|
|
|
placeholder="请再次输入密码" |
|
|
|
|
show-password |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="name"> |
|
|
|
|
<div style="display: flex; align-items: center; color: pink"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center;width: 90px;"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Stamp /> |
|
|
|
@ -66,14 +104,21 @@ |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">姓名</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input v-model="formModel.name" style="border-color: #20bec8;" placeholder="请输入姓名"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.name" |
|
|
|
|
style="border-color: #20bec8" |
|
|
|
|
placeholder="请输入姓名" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="clssid"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Avatar /> |
|
|
|
@ -82,15 +127,23 @@ |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">班级</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-cascader placeholder="请选择所属班级" :props="props" style="width: 142%; height: 0.2344rem" |
|
|
|
|
v-model="formModel.clssid" @change="handleChange" /> |
|
|
|
|
<el-cascader |
|
|
|
|
placeholder="请选择所属班级" |
|
|
|
|
:props="props" |
|
|
|
|
style="width: 142%; height: 0.2344rem" |
|
|
|
|
v-model="formModel.clssid" |
|
|
|
|
@change="handleChange" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-cascader :props="props" style="width: 100%; height: 0.2344rem" v-model="formModel.clssid" /> --> |
|
|
|
|
<el-form-item prop="studentNumb"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Avatar /> |
|
|
|
@ -99,39 +152,60 @@ |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">学号</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input v-model="formModel.studentNumb" style="border-color: #20bec8" |
|
|
|
|
placeholder="请输入学号"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.studentNumb" |
|
|
|
|
style="border-color: #20bec8" |
|
|
|
|
placeholder="请输入学号" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="mobile"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Iphone /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">手机号</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
手机号 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input v-model="formModel.mobile" style="border-color: #20bec8" placeholder="请输入手机号"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.mobile" |
|
|
|
|
style="border-color: #20bec8" |
|
|
|
|
placeholder="请输入手机号" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Grid /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">验证码</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
验证码 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<div class="captcha"> |
|
|
|
|
<el-input v-model="formModel.captcha" style="height: 0.2344rem" maxlength="4" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.captcha" |
|
|
|
|
style="height: 0.2344rem" |
|
|
|
|
maxlength="4" |
|
|
|
|
/> |
|
|
|
|
<div class="code" @click="getcodeinfo"> |
|
|
|
|
<img :src="codeUrl" alt="" srcset="" /> |
|
|
|
|
</div> |
|
|
|
@ -140,12 +214,32 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button style="color: #3ad7e2; background-color: #0e2e5e; width: 152px;margin-top: 10px;" |
|
|
|
|
class="button" type="primary" auto-insert-space @click="register"> |
|
|
|
|
<el-button |
|
|
|
|
style=" |
|
|
|
|
color: #3ad7e2; |
|
|
|
|
background-color: #0e2e5e; |
|
|
|
|
width: 152px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
" |
|
|
|
|
class="button" |
|
|
|
|
type="primary" |
|
|
|
|
auto-insert-space |
|
|
|
|
@click="register" |
|
|
|
|
> |
|
|
|
|
注册 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button style="color: #3ad7e2; background-color: #0e2e5e; width: 155px;margin-top: 10px;" |
|
|
|
|
class="button" type="primary" auto-insert-space @click="toLogin"> |
|
|
|
|
<el-button |
|
|
|
|
style=" |
|
|
|
|
color: #3ad7e2; |
|
|
|
|
background-color: #0e2e5e; |
|
|
|
|
width: 155px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
" |
|
|
|
|
class="button" |
|
|
|
|
type="primary" |
|
|
|
|
auto-insert-space |
|
|
|
|
@click="toLogin" |
|
|
|
|
> |
|
|
|
|
返回到登录页 |
|
|
|
|
</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
@ -156,21 +250,37 @@ |
|
|
|
|
</el-link> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
</el-form> |
|
|
|
|
<el-form style="margin-bottom: 80px;" :model="formModel" :rules="rules" ref="formRef" size="large" |
|
|
|
|
autocomplete="off" v-else class="custom-form"> |
|
|
|
|
<el-form-item prop="username" style="margin-bottom: 30px;"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center;width: 90px;"> |
|
|
|
|
<el-form |
|
|
|
|
style="margin-bottom: 80px" |
|
|
|
|
:model="formModel" |
|
|
|
|
:rules="rules" |
|
|
|
|
ref="formRef" |
|
|
|
|
size="large" |
|
|
|
|
autocomplete="off" |
|
|
|
|
v-else |
|
|
|
|
class="custom-form" |
|
|
|
|
> |
|
|
|
|
<el-form-item prop="username" style="margin-bottom: 30px"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<User /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户名</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
用户名 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input v-model="formModel.username" style="height: 0.2344rem ;width: 250px;" |
|
|
|
|
placeholder="请输入用户名"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.username" |
|
|
|
|
style="height: 0.2344rem; width: 250px" |
|
|
|
|
placeholder="请输入用户名" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
@ -190,9 +300,12 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item prop="password" style="margin-bottom: 30px;"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<el-form-item prop="password" style="margin-bottom: 30px"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Lock /> |
|
|
|
@ -201,24 +314,37 @@ |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">密码</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<el-input type="password" v-model="formModel.password" style="height: 0.2344rem;width: 250px;" |
|
|
|
|
placeholder="请输入密码"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
type="password" |
|
|
|
|
v-model="formModel.password" |
|
|
|
|
style="height: 0.2344rem; width: 250px" |
|
|
|
|
placeholder="请输入密码" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item style="margin-bottom: 35px;"> |
|
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
|
<el-form-item style="margin-bottom: 35px"> |
|
|
|
|
<div style="display: flex; align-items: center"> |
|
|
|
|
<div |
|
|
|
|
class="left" |
|
|
|
|
style="display: flex; align-items: center; width: 90px" |
|
|
|
|
> |
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
<Grid /> |
|
|
|
|
</el-icon> |
|
|
|
|
</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">验证码</div> |
|
|
|
|
<div style="padding-right: 10px; color: #2592a1"> |
|
|
|
|
验证码 |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<div class="captcha"> |
|
|
|
|
<el-input v-model="formModel.captcha" style="height: 0.2344rem;width: 250px;" maxlength="4" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="formModel.captcha" |
|
|
|
|
style="height: 0.2344rem; width: 250px" |
|
|
|
|
maxlength="4" |
|
|
|
|
/> |
|
|
|
|
<div class="code" @click="getcodeinfo"> |
|
|
|
|
<img :src="codeUrl" alt="" srcset="" /> |
|
|
|
|
</div> |
|
|
|
@ -235,10 +361,22 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button style="margin:30px 50px 0px 20px;" class="hexagon-button" type="primary" auto-insert-space |
|
|
|
|
@click="login">登录</el-button> |
|
|
|
|
<el-button style="margin:30px 0px 0px 0;" class="hexagon-button" type="primary" auto-insert-space |
|
|
|
|
@click="toRegister">去注册</el-button> |
|
|
|
|
<el-button |
|
|
|
|
style="margin: 30px 50px 0px 20px" |
|
|
|
|
class="hexagon-button" |
|
|
|
|
type="primary" |
|
|
|
|
auto-insert-space |
|
|
|
|
@click="login" |
|
|
|
|
>登录</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
style="margin: 30px 0px 0px 0" |
|
|
|
|
class="hexagon-button" |
|
|
|
|
type="primary" |
|
|
|
|
auto-insert-space |
|
|
|
|
@click="toRegister" |
|
|
|
|
>去注册</el-button |
|
|
|
|
> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</el-col> |
|
|
|
@ -252,14 +390,21 @@ |
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
// import { ref } from "vue" |
|
|
|
|
// import { onMounted, reactive, ref, toRefs, watch } from "vue"; |
|
|
|
|
import { ElMessage} from 'element-plus' |
|
|
|
|
import { ElMessage } from "element-plus"; |
|
|
|
|
import settingStore from "@/store/modules/setting"; |
|
|
|
|
import { User, Lock, Avatar, Stamp, Grid, Iphone } from "@element-plus/icons-vue"; |
|
|
|
|
import { ref,onMounted} from "vue"; |
|
|
|
|
import { |
|
|
|
|
User, |
|
|
|
|
Lock, |
|
|
|
|
Avatar, |
|
|
|
|
Stamp, |
|
|
|
|
Grid, |
|
|
|
|
Iphone, |
|
|
|
|
} from "@element-plus/icons-vue"; |
|
|
|
|
import { ref, onMounted } from "vue"; |
|
|
|
|
import userStore from "@/store/modules/user"; |
|
|
|
|
import { getCode, sturegister, getFaculties } from '@/api/user' |
|
|
|
|
import { getCode, sturegister, getFaculties } from "@/api/user"; |
|
|
|
|
import { useRouter } from "vue-router"; |
|
|
|
|
const router = useRouter() |
|
|
|
|
const router = useRouter(); |
|
|
|
|
const setting = settingStore(); |
|
|
|
|
const user = userStore(); |
|
|
|
|
console.log(setting.title); |
|
|
|
@ -271,19 +416,19 @@ const formModel = ref({ |
|
|
|
|
password: "", |
|
|
|
|
repassword: "", |
|
|
|
|
name: "", |
|
|
|
|
clssid: '', |
|
|
|
|
clssid: "", |
|
|
|
|
studentNumb: "", |
|
|
|
|
mobile: '', |
|
|
|
|
mobile: "", |
|
|
|
|
captcha: "", |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const FacultiesList = ref([]) |
|
|
|
|
const FacultiesList = ref([]); |
|
|
|
|
const getFacultiesList = async (data: any) => { |
|
|
|
|
const res: any = await getFaculties(data) |
|
|
|
|
console.log(res, 'res11') |
|
|
|
|
FacultiesList.value = res.result |
|
|
|
|
} |
|
|
|
|
const deepValues = ref([]) |
|
|
|
|
const res: any = await getFaculties(data); |
|
|
|
|
console.log(res, "res11"); |
|
|
|
|
FacultiesList.value = res.result; |
|
|
|
|
}; |
|
|
|
|
const deepValues = ref([]); |
|
|
|
|
// 配置部门级联选择器 |
|
|
|
|
const props = { |
|
|
|
|
lazy: true, |
|
|
|
@ -291,24 +436,23 @@ const props = { |
|
|
|
|
emitPath: false, |
|
|
|
|
async lazyLoad(node: any, resolve: any) { |
|
|
|
|
console.log(node); |
|
|
|
|
deepValues.value = node.pathValues |
|
|
|
|
deepValues.value = node.pathValues; |
|
|
|
|
await getFacultiesList({ |
|
|
|
|
primaryType: node.level + 1, |
|
|
|
|
pid: node.value, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
const nodes = FacultiesList.value.map((item: any) => ({ |
|
|
|
|
value: item.id, |
|
|
|
|
label: item.name, |
|
|
|
|
})) |
|
|
|
|
resolve(nodes) |
|
|
|
|
})); |
|
|
|
|
resolve(nodes); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleChange = (e: any) => { |
|
|
|
|
console.log(e); |
|
|
|
|
formModel.value.clssid = e |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
formModel.value.clssid = e; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 添加校验规则 |
|
|
|
|
const rules = { |
|
|
|
@ -359,9 +503,7 @@ const rules = { |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
clssid: [ |
|
|
|
|
{ required: true, message: "请选择所属班级", trigger: "blur" }, |
|
|
|
|
], |
|
|
|
|
clssid: [{ required: true, message: "请选择所属班级", trigger: "blur" }], |
|
|
|
|
mobile: [ |
|
|
|
|
{ required: true, message: "请输入手机号", trigger: "blur" }, |
|
|
|
|
{ |
|
|
|
@ -369,7 +511,7 @@ const rules = { |
|
|
|
|
message: "手机号格式不正确", |
|
|
|
|
trigger: ["change", "blur"], |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
const register = async () => { |
|
|
|
|
await formRef.value.validate(); |
|
|
|
@ -383,29 +525,25 @@ const register = async () => { |
|
|
|
|
username: formModel.value.username, |
|
|
|
|
realname: formModel.value.name, |
|
|
|
|
workno: formModel.value.studentNumb, |
|
|
|
|
depid: deepValues.value.slice(0, 2).join(',') |
|
|
|
|
depid: deepValues.value.slice(0, 2).join(","), |
|
|
|
|
}; |
|
|
|
|
try { |
|
|
|
|
const res: any = await sturegister(data) |
|
|
|
|
const res: any = await sturegister(data); |
|
|
|
|
formModel.value = { |
|
|
|
|
username: "", |
|
|
|
|
password: "", |
|
|
|
|
repassword: "", |
|
|
|
|
name: "", |
|
|
|
|
clssid: '', |
|
|
|
|
clssid: "", |
|
|
|
|
studentNumb: "", |
|
|
|
|
mobile: '', |
|
|
|
|
mobile: "", |
|
|
|
|
captcha: "", |
|
|
|
|
} |
|
|
|
|
ElMessage.success(`注册成功`) |
|
|
|
|
isRegister.value = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
ElMessage.success(`注册成功`); |
|
|
|
|
isRegister.value = false; |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log(error); |
|
|
|
|
|
|
|
|
|
getcodeinfo() |
|
|
|
|
|
|
|
|
|
getcodeinfo(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// getcodeinfo() |
|
|
|
@ -426,27 +564,30 @@ const login = async () => { |
|
|
|
|
password: formModel.value.password, |
|
|
|
|
username: formModel.value.username, |
|
|
|
|
}; |
|
|
|
|
try { |
|
|
|
|
const res = await user.logIn(data); |
|
|
|
|
if (res) { |
|
|
|
|
router.push('/studyPage') |
|
|
|
|
router.push("/studyPage"); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
|
getcodeinfo(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
const toRegister = () => { |
|
|
|
|
isRegister.value = true |
|
|
|
|
isRegister.value = true; |
|
|
|
|
getcodeinfo(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
const toLogin = () => { |
|
|
|
|
isRegister.value = false |
|
|
|
|
isRegister.value = false; |
|
|
|
|
getcodeinfo(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const clickErrorBtn=()=>{ |
|
|
|
|
console.log('aaa'); |
|
|
|
|
} |
|
|
|
|
onMounted(()=>{ |
|
|
|
|
const clickErrorBtn = () => { |
|
|
|
|
console.log("aaa"); |
|
|
|
|
}; |
|
|
|
|
onMounted(() => { |
|
|
|
|
getcodeinfo(); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
@ -482,10 +623,10 @@ onMounted(()=>{ |
|
|
|
|
height: 1000px; |
|
|
|
|
min-height: 100vh; |
|
|
|
|
// margin: 0; |
|
|
|
|
.middle-content{ |
|
|
|
|
.middle-content { |
|
|
|
|
position: relative; |
|
|
|
|
width: 60%; |
|
|
|
|
height:80%; |
|
|
|
|
height: 80%; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
@ -494,7 +635,7 @@ onMounted(()=>{ |
|
|
|
|
background-position: 59% -7px; |
|
|
|
|
background-size: 75% auto; |
|
|
|
|
} |
|
|
|
|
.errorBtn{ |
|
|
|
|
.errorBtn { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 30px; |
|
|
|
|
right: 122px; |
|
|
|
@ -555,7 +696,6 @@ onMounted(()=>{ |
|
|
|
|
.el-input { |
|
|
|
|
width: 300px; |
|
|
|
|
height: 36px; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-form-item__error) { |
|
|
|
|