|
|
@ -6,68 +6,146 @@ |
|
|
|
<div class="main-content"> |
|
|
|
<div class="main-content"> |
|
|
|
<el-row style="display: flex; justify-content: center"> |
|
|
|
<el-row style="display: flex; justify-content: center"> |
|
|
|
<el-col> |
|
|
|
<el-col> |
|
|
|
<el-form |
|
|
|
<el-form :rules="rules" :model="formModel" ref="formRef" size="large" autocomplete="off" v-if="isRegister"> |
|
|
|
:rules="rules" |
|
|
|
<el-form-item prop="username" class="custom-form-item"> |
|
|
|
:model="formModel" |
|
|
|
<div style="display: flex; align-items: center; color: pink"> |
|
|
|
ref="formRef" |
|
|
|
<div class="left" style="display: flex; align-items: center;width: 90px;"> |
|
|
|
size="large" |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
autocomplete="off" |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
v-if="isRegister" |
|
|
|
<User /> |
|
|
|
> |
|
|
|
</el-icon> |
|
|
|
<el-form-item prop="username"> |
|
|
|
</div> |
|
|
|
<el-input |
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户账号</div> |
|
|
|
v-model="formModel.username" |
|
|
|
</div> |
|
|
|
:prefix-icon="User" |
|
|
|
<div class="right"> |
|
|
|
placeholder="请输入账号" |
|
|
|
<el-input v-model="formModel.username" style="border-color: #20bec8;" |
|
|
|
></el-input> |
|
|
|
placeholder="请输入用户账号"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<el-form-item prop="studentNumb"> |
|
|
|
</div> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="formModel.studentNumb" |
|
|
|
|
|
|
|
:prefix-icon="Avatar" |
|
|
|
|
|
|
|
placeholder="请输入学号" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="name"> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="formModel.name" |
|
|
|
|
|
|
|
:prefix-icon="Stamp" |
|
|
|
|
|
|
|
placeholder="请输入姓名" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="password"> |
|
|
|
<el-form-item prop="password"> |
|
|
|
<el-input |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
v-model="formModel.password" |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
:prefix-icon="Lock" |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
type="password" |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
placeholder="请输入密码" |
|
|
|
<Lock /> |
|
|
|
></el-input> |
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户密码</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="right"> |
|
|
|
|
|
|
|
<el-input type="password" v-model="formModel.password" style="border-color: #20bec8" |
|
|
|
|
|
|
|
placeholder="请输入密码" show-password></el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="repassword"> |
|
|
|
<el-form-item prop="repassword"> |
|
|
|
<el-input |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
v-model="formModel.repassword" |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
:prefix-icon="Lock" |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
type="password" |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
placeholder="请输入再次密码" |
|
|
|
<Lock /> |
|
|
|
></el-input> |
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</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> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item prop="name" class="custom-form-item"> |
|
|
|
|
|
|
|
<div style="display: flex; align-items: center; color: pink"> |
|
|
|
|
|
|
|
<div class="left" style="display: flex; align-items: center;width: 90px;"> |
|
|
|
|
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
|
|
|
<Stamp /> |
|
|
|
|
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
</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="padding-right: 10px; color: #1084c1"> |
|
|
|
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
|
|
|
<Avatar /> |
|
|
|
|
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<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" /> |
|
|
|
|
|
|
|
</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="padding-right: 10px; color: #1084c1"> |
|
|
|
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
|
|
|
<Avatar /> |
|
|
|
|
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
</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="padding-right: 10px; color: #1084c1"> |
|
|
|
|
|
|
|
<el-icon class="bold-icon"> |
|
|
|
|
|
|
|
<Iphone /> |
|
|
|
|
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</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> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
style="color: #3ad7e2; background-color: #0e2e5e; width: 150px" |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
class="button" |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
type="primary" |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
auto-insert-space |
|
|
|
<Grid /> |
|
|
|
@click="register" |
|
|
|
</el-icon> |
|
|
|
> |
|
|
|
</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" /> |
|
|
|
|
|
|
|
<div class="code" @click="getcodeinfo"> |
|
|
|
|
|
|
|
<img :src="codeUrl" alt="" srcset="" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item style="margin-bottom: -30px;"> |
|
|
|
|
|
|
|
<el-button style="color: #3ad7e2; background-color: #0e2e5e; width: 165px" class="button" type="primary" |
|
|
|
|
|
|
|
auto-insert-space @click="register"> |
|
|
|
注册 |
|
|
|
注册 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
<el-button style="color: #3ad7e2; background-color: #0e2e5e; width: 165px" class="button" type="primary" |
|
|
|
style="color: #3ad7e2; background-color: #0e2e5e; width: 150px" |
|
|
|
auto-insert-space @click="toLogin"> |
|
|
|
class="button" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
auto-insert-space |
|
|
|
|
|
|
|
@click="isRegister = false" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
返回到登录页 |
|
|
|
返回到登录页 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -78,77 +156,87 @@ |
|
|
|
</el-link> |
|
|
|
</el-link> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<el-form |
|
|
|
<el-form :model="formModel" :rules="rules" ref="formRef" size="large" autocomplete="off" v-else |
|
|
|
:model="formModel" |
|
|
|
class="custom-form"> |
|
|
|
:rules="rules" |
|
|
|
<el-form-item prop="username" class="custom-form-item"> |
|
|
|
ref="formRef" |
|
|
|
|
|
|
|
size="large" |
|
|
|
|
|
|
|
autocomplete="off" |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
class="custom-form" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-form-item prop="username"> |
|
|
|
|
|
|
|
<div style="display: flex; align-items: center; color: pink"> |
|
|
|
<div style="display: flex; align-items: center; color: pink"> |
|
|
|
<div class="left" style="display: flex; align-items: center"> |
|
|
|
<div class="left" style="display: flex; align-items: center;width: 90px;"> |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
<user /> |
|
|
|
<User /> |
|
|
|
</el-icon> |
|
|
|
</el-icon> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户名</div> |
|
|
|
<div style="padding-right: 10px; color: #2592a1">用户名</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="right"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="formModel.username" style="border-color: #20bec8;" placeholder="请输入用户名"></el-input> |
|
|
|
v-model="formModel.username" |
|
|
|
|
|
|
|
style="border-color: #20bec8; background-color: pink" |
|
|
|
|
|
|
|
placeholder="请输入用户名" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="学号" prop="studentNumb"> |
|
|
|
<el-form-item prop="studentNumb"> |
|
|
|
<el-input |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
v-model="formModel.studentNumb" |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
:prefix-icon="Avatar" |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
placeholder="请输入学号" |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
></el-input> |
|
|
|
<Avatar /> |
|
|
|
|
|
|
|
</el-icon> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="密码" prop="password"> |
|
|
|
<el-form-item prop="password"> |
|
|
|
<el-input |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
name="password" |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
:prefix-icon="Lock" |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
type="password" |
|
|
|
<el-icon class="bold-icon"> |
|
|
|
placeholder="请输入密码" |
|
|
|
<Lock /> |
|
|
|
v-model="formModel.password" |
|
|
|
</el-icon> |
|
|
|
></el-input> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="padding-right: 10px; color: #2592a1">密码</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="right"> |
|
|
|
|
|
|
|
<el-input type="password" v-model="formModel.password" style="border-color: #20bec8" |
|
|
|
|
|
|
|
placeholder="请输入密码"></el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="验证码"> |
|
|
|
<el-form-item> |
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
<div class="right"> |
|
|
|
<div class="captcha"> |
|
|
|
<div class="captcha"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="formModel.captcha" style="height: 0.2344rem" maxlength="4" /> |
|
|
|
v-model="formModel.captcha" |
|
|
|
|
|
|
|
style="height: 0.2344rem" |
|
|
|
|
|
|
|
maxlength="4" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<div class="code" @click="getcodeinfo"> |
|
|
|
<div class="code" @click="getcodeinfo"> |
|
|
|
<img :src="codeUrl" alt="" srcset="" /> |
|
|
|
<img :src="codeUrl" alt="" srcset="" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="验证码"> |
|
|
|
|
|
|
|
<div class="captcha"> |
|
|
|
|
|
|
|
<el-input v-model="formModel.captcha" style="height: 0.2344rem" maxlength="4" /> |
|
|
|
|
|
|
|
<div class="code" @click="getcodeinfo"> |
|
|
|
|
|
|
|
<img :src="codeUrl" alt="" srcset="" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button |
|
|
|
<el-button class="hexagon-button" type="primary" auto-insert-space @click="login">登录</el-button> |
|
|
|
class="hexagon-button" |
|
|
|
<el-button class="hexagon-button" type="primary" auto-insert-space @click="toRegister">去注册</el-button> |
|
|
|
type="primary" |
|
|
|
|
|
|
|
auto-insert-space |
|
|
|
|
|
|
|
@click="login" |
|
|
|
|
|
|
|
>登录</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
class="hexagon-button" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
auto-insert-space |
|
|
|
|
|
|
|
@click="isRegister = true" |
|
|
|
|
|
|
|
>去注册</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -161,11 +249,12 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
// import { ref } from "vue" |
|
|
|
// import { ref } from "vue" |
|
|
|
// import { onMounted, reactive, ref, toRefs, watch } from "vue"; |
|
|
|
// import { onMounted, reactive, ref, toRefs, watch } from "vue"; |
|
|
|
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
|
import settingStore from "@/store/modules/setting"; |
|
|
|
import settingStore from "@/store/modules/setting"; |
|
|
|
import { User, Lock, Avatar, Stamp } from "@element-plus/icons-vue"; |
|
|
|
import { User, Lock, Avatar, Stamp, Grid, Iphone } from "@element-plus/icons-vue"; |
|
|
|
import { ref } from "vue"; |
|
|
|
import { ref } from "vue"; |
|
|
|
import userStore from "@/store/modules/user"; |
|
|
|
import userStore from "@/store/modules/user"; |
|
|
|
import { getCode } from "@/api"; |
|
|
|
import { getCode, sturegister, getFaculties } from '@/api/user' |
|
|
|
import { useRouter } from "vue-router"; |
|
|
|
import { useRouter } from "vue-router"; |
|
|
|
const router = useRouter() |
|
|
|
const router = useRouter() |
|
|
|
const setting = settingStore(); |
|
|
|
const setting = settingStore(); |
|
|
@ -176,12 +265,48 @@ const isRegister = ref(false); |
|
|
|
const formRef = ref(); |
|
|
|
const formRef = ref(); |
|
|
|
const formModel = ref({ |
|
|
|
const formModel = ref({ |
|
|
|
username: "", |
|
|
|
username: "", |
|
|
|
studentNumb: "", |
|
|
|
|
|
|
|
name: "", |
|
|
|
|
|
|
|
password: "", |
|
|
|
password: "", |
|
|
|
repassword: "", |
|
|
|
repassword: "", |
|
|
|
|
|
|
|
name: "", |
|
|
|
|
|
|
|
clssid: '', |
|
|
|
|
|
|
|
studentNumb: "", |
|
|
|
|
|
|
|
mobile: '', |
|
|
|
captcha: "", |
|
|
|
captcha: "", |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 props = { |
|
|
|
|
|
|
|
lazy: true, |
|
|
|
|
|
|
|
checkStrictly: true, |
|
|
|
|
|
|
|
emitPath: false, |
|
|
|
|
|
|
|
async lazyLoad(node: any, resolve: any) { |
|
|
|
|
|
|
|
console.log(node); |
|
|
|
|
|
|
|
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) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleChange = (e: any) => { |
|
|
|
|
|
|
|
console.log(e); |
|
|
|
|
|
|
|
formModel.value.clssid = e |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加校验规则 |
|
|
|
// 添加校验规则 |
|
|
|
const rules = { |
|
|
|
const rules = { |
|
|
|
username: [ |
|
|
|
username: [ |
|
|
@ -198,7 +323,7 @@ const rules = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
min: 5, |
|
|
|
min: 5, |
|
|
|
max: 11, |
|
|
|
max: 11, |
|
|
|
message: "学号长度最小五位最大三十位", |
|
|
|
message: "学号长度最小五位最大十一位", |
|
|
|
trigger: ["change", "blur"], |
|
|
|
trigger: ["change", "blur"], |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
@ -231,10 +356,64 @@ const rules = { |
|
|
|
trigger: "blur", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
clssid: [ |
|
|
|
|
|
|
|
{ required: true, message: "请选择所属班级", trigger: "blur" }, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
mobile: [ |
|
|
|
|
|
|
|
{ required: true, message: "请输入手机号", trigger: "blur" }, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pattern: /^1[3-9]\d{9}$/, |
|
|
|
|
|
|
|
message: "手机号格式不正确", |
|
|
|
|
|
|
|
trigger: ["change", "blur"], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
}; |
|
|
|
}; |
|
|
|
const register = async () => { |
|
|
|
const register = async () => { |
|
|
|
await formRef.value.validate(); |
|
|
|
await formRef.value.validate(); |
|
|
|
console.log("开始注册i请求"); |
|
|
|
console.log("开始注册请求"); |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
clssid: formModel.value.clssid, |
|
|
|
|
|
|
|
mobile: formModel.value.mobile, |
|
|
|
|
|
|
|
captcha: formModel.value.captcha, |
|
|
|
|
|
|
|
checkKey: 1629428467008, |
|
|
|
|
|
|
|
password: formModel.value.password, |
|
|
|
|
|
|
|
username: formModel.value.username, |
|
|
|
|
|
|
|
realname: formModel.value.name, |
|
|
|
|
|
|
|
workno: formModel.value.studentNumb, |
|
|
|
|
|
|
|
depid: deepValues.value.slice(0, 2).join(',') |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const res: any = await sturegister(data) |
|
|
|
|
|
|
|
formModel.value = { |
|
|
|
|
|
|
|
username: "", |
|
|
|
|
|
|
|
password: "", |
|
|
|
|
|
|
|
repassword: "", |
|
|
|
|
|
|
|
name: "", |
|
|
|
|
|
|
|
clssid: '', |
|
|
|
|
|
|
|
studentNumb: "", |
|
|
|
|
|
|
|
mobile: '', |
|
|
|
|
|
|
|
captcha: "", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ElMessage.success(`注册成功`) |
|
|
|
|
|
|
|
isRegister.value = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
console.log(error); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getcodeinfo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// getcodeinfo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(11111); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ElMessage.warning(res.message) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(res) |
|
|
|
}; |
|
|
|
}; |
|
|
|
const codeUrl = ref(""); |
|
|
|
const codeUrl = ref(""); |
|
|
|
const getcodeinfo = async () => { |
|
|
|
const getcodeinfo = async () => { |
|
|
@ -263,6 +442,14 @@ const login = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const toRegister = () => { |
|
|
|
|
|
|
|
isRegister.value = true |
|
|
|
|
|
|
|
getcodeinfo(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const toLogin = () => { |
|
|
|
|
|
|
|
isRegister.value = false |
|
|
|
|
|
|
|
getcodeinfo(); |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
@ -299,11 +486,14 @@ const login = async () => { |
|
|
|
margin: 0; |
|
|
|
margin: 0; |
|
|
|
background: url("../assets/images/login.png") no-repeat; |
|
|
|
background: url("../assets/images/login.png") no-repeat; |
|
|
|
background-position: center; |
|
|
|
background-position: center; |
|
|
|
|
|
|
|
background-size: 50% auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.captcha { |
|
|
|
.captcha { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
height: 100%; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
|
|
.code { |
|
|
|
.code { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
height: 100%; |
|
|
@ -315,11 +505,13 @@ const login = async () => { |
|
|
|
// background-color: pink; |
|
|
|
// background-color: pink; |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
img { |
|
|
|
img { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
}} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.hexagon-button { |
|
|
|
.hexagon-button { |
|
|
@ -337,17 +529,17 @@ const login = async () => { |
|
|
|
font-size: 18px; |
|
|
|
font-size: 18px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// .custom-form .el-form-item__label { |
|
|
|
// .el-form-item__label { |
|
|
|
// color: #409eff; |
|
|
|
// color: #0e2e5e; |
|
|
|
// /* 标签颜色 */ |
|
|
|
|
|
|
|
// font-size: 14px; |
|
|
|
|
|
|
|
// font-weight: bold; |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
// .bold-icon svg { |
|
|
|
// .el-form-item__error { |
|
|
|
// stroke-width: 9; |
|
|
|
// left: 80px; |
|
|
|
// /* 加粗效果 */ |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
.el-form-item__label { |
|
|
|
.el-input { |
|
|
|
color: #0e2e5e; |
|
|
|
width: 300px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-form-item__error) { |
|
|
|
|
|
|
|
left: 110px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|