zdg #211

Merged
zhengdegang merged 6 commits from zdg into main 2024-09-14 17:34:23 +08:00
3 changed files with 25 additions and 9 deletions
Showing only changes of commit f615efbd88 - Show all commits

View File

@ -19,23 +19,23 @@
ref="ruleFormRef" ref="ruleFormRef"
> >
<el-form-item label="姓名" prop="name" v-if="type==1 && activeIndex==1"> <el-form-item label="姓名" prop="name" v-if="type==1 && activeIndex==1">
<el-input v-model="ruleForm.name" /> <el-input v-model="ruleForm.name" placeholder="请输入姓名" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号" prop="idNumber" v-if="type==1 && activeIndex==1"> <el-form-item label="身份证号" prop="idNumber" v-if="type==1 && activeIndex==1">
<el-input v-model="ruleForm.idNumber" /> <el-input v-model="ruleForm.idNumber" placeholder="请输入身份证号码" />
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="phoneNumber" v-if="activeIndex==1"> <el-form-item label="手机号" prop="phoneNumber" v-if="activeIndex==1">
<el-input v-model="ruleForm.phoneNumber" /> <el-input v-model="ruleForm.phoneNumber" placeholder="请输入手机号" />
</el-form-item> </el-form-item>
<el-form-item label="验证码" prop="Code" v-if="activeIndex==1"> <el-form-item label="验证码" prop="Code" v-if="activeIndex==1">
<el-input style="width:60%" v-model="ruleForm.Code" :disabled="true" /> <el-input style="width:60%" v-model="ruleForm.Code" :disabled="true" placeholder="请输入验证码" />
<el-button type="primary" style="margin-left:10px" @click="sendcaptchaImg">发送验证码</el-button> <el-button type="primary" style="margin-left:10px" @click="sendcaptchaImg">发送验证码</el-button>
</el-form-item> </el-form-item>
<el-form-item label="设置密码" prop="password" v-if="activeIndex==1"> <el-form-item label="设置密码" prop="password" v-if="activeIndex==1">
<el-input v-model="ruleForm.password" type="password" /> <el-input v-model="ruleForm.password" type="password" placeholder="6-30位至少包含数字和字母,允许特殊符号" />
</el-form-item> </el-form-item>
<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" /> <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
@ -54,7 +54,7 @@
:data="gradeTree" :data="gradeTree"
multiple multiple
:render-after-expand="false" :render-after-expand="false"
style="width: 100%" style="width: 100%;-webkit-app-region: no-drag;"
/> />
</el-form-item> </el-form-item>
<el-form-item label="学科" prop="discipline" v-if="activeIndex==2"> <el-form-item label="学科" prop="discipline" v-if="activeIndex==2">
@ -235,6 +235,20 @@ const OpenModel = v =>{
} }
// //
const handleClose = () => { const handleClose = () => {
var restValue={
name: '',
idNumber:'',
phoneNumber: '',
Code:'',
password:'',
confirmPassword:'',
class:[],
discipline:[],
school:[],
}
Object.assign(ruleForm, restValue);
schoolSubject.value=[]
gradeTree.value=[]
if (ruleFormRef.value) ruleFormRef.value.resetFields() if (ruleFormRef.value) ruleFormRef.value.resetFields()
removeToken(); removeToken();
activeIndex.value=1 activeIndex.value=1
@ -337,6 +351,8 @@ const submitForm = async (formEl) => {
discipline:[], discipline:[],
school:[], school:[],
} }
schoolSubject.value=[]
gradeTree.value=[]
Object.assign(ruleForm, restValue); Object.assign(ruleForm, restValue);
activeIndex.value=1 activeIndex.value=1
dialogVisible.value=false dialogVisible.value=false

View File

@ -33,7 +33,7 @@
</el-form-item> </el-form-item>
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;"> <div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a> <a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a>
<!-- | --> |
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a> <a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a>
</div> </div>
</el-form> </el-form>