| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="密码:" prop="password"> |
| | | <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="重复密码:" prop="confirmPassword"> |
| | | <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> |
| | |
| | | |
| | | |
| | | 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)=>{ |