| | |
| | | <!-- placeholder="请选择离职时间"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="密码:" prop="password"> |
| | | <el-input v-model.trim="state.form.password" type="password" show-password placeholder="请输入密码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="重复密码:" prop="confirmPassword"> |
| | | <el-input v-model.trim="state.form.confirmPassword" type="password" show-password placeholder="请输入确认密码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="手机号:" prop="phone" v-if="state.title !== '修改密码'" > |
| | | <el-input v-model.trim="state.form.phone" :maxlength="11" :disabled="disabled" placeholder="请输入手机号"></el-input> |
| | | </el-form-item> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="密码:" prop="password" v-if="state.title == '新增' || state.title == '修改密码'"> |
| | | <el-input v-model.trim="state.form.password" type="password" show-password placeholder="请输入密码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="密码:" v-else> |
| | | <el-input v-model.trim="state.form.password" type="password" show-password placeholder="请输入密码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="重复密码:" prop="confirmPassword" v-if="state.title == '新增' || state.title == '修改密码'"> |
| | | <el-input v-model.trim="state.form.confirmPassword" type="password" show-password placeholder="请输入确认密码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="重复密码:" v-else> |
| | | <el-input v-model.trim="state.form.confirmPassword" type="password" show-password placeholder="请输入确认密码"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer v-if="state.title !='查看'"> |
| | | <span class="dialog-footer"> |
| | |
| | | |
| | | |
| | | const equalToPassword = (rule, value, callback) => { |
| | | if(state.title == '修改密码' || state.form.password !== ''){ |
| | | if (state.form.password !== value) { |
| | | callback(new Error("两次输入的密码不一致")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }else{ |
| | | callback(); |
| | | } |
| | | }; |
| | | |
| | | const validateUserPhone = (rule, value, callback)=>{ |
| | |
| | | } |
| | | |
| | | let validatePwd = (rule, value, callback)=>{ |
| | | if(state.title == '修改密码'){ |
| | | if(value === ''){ |
| | | callback(new Error('请输入密码')) |
| | | }else{ |
| | |
| | | callback() |
| | | } |
| | | } |
| | | }else{ |
| | | callback(); |
| | | } |
| | | |
| | | } |
| | | const startUsername = ref(''); |
| | | const validateUsername = (rule, value, callback)=>{ |