跳板机管理web端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.3 KiB

9 years ago
  1. <template>
  2. <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px" class="demo-ruleForm card-box loginform">
  3. <h3 class="title">系统登录</h3>
  4. <el-form-item prop="account">
  5. <el-input type="text" v-model="ruleForm2.account" auto-complete="off" placeholder="账号"></el-input>
  6. </el-form-item>
  7. <el-form-item prop="checkPass">
  8. <el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off" placeholder="密码"></el-input>
  9. </el-form-item>
  10. <el-checkbox v-model="checked" checked style="margin:0px 0px 35px 0px;">记住密码</el-checkbox>
  11. <el-form-item style="width:100%;">
  12. <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2">登录</el-button>
  13. <!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
  14. </el-form-item>
  15. </el-form>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. ruleForm2: {
  22. account: '',
  23. checkPass: ''
  24. },
  25. rules2: {
  26. account: [
  27. { required: true, message: '请输入账号', trigger: 'blur' },
  28. //{ validator: validaePass }
  29. ],
  30. checkPass: [
  31. { required: true, message: '请输入密码', trigger: 'blur' },
  32. //{ validator: validaePass2 }
  33. ]
  34. },
  35. checked: true
  36. };
  37. },
  38. methods: {
  39. handleReset2() {
  40. this.$refs.ruleForm2.resetFields();
  41. },
  42. handleSubmit2(ev) {
  43. var _this=this;
  44. this.$refs.ruleForm2.validate((valid) => {
  45. if (valid) {
  46. //_this.$router.push('/page1');
  47. _this.$router.replace('/page1');
  48. } else {
  49. console.log('error submit!!');
  50. return false;
  51. }
  52. });
  53. }
  54. }
  55. }
  56. </script>
  57. <style scoped>
  58. .card-box {
  59. padding: 20px;
  60. /*box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);*/
  61. -webkit-border-radius: 5px;
  62. border-radius: 5px;
  63. -moz-border-radius: 5px;
  64. background-clip: padding-box;
  65. margin-bottom: 20px;
  66. background-color: #F9FAFC;
  67. margin: 120px auto;
  68. width: 400px;
  69. border: 2px solid #8492A6;
  70. }
  71. .title {
  72. margin: 0px auto 40px auto;
  73. text-align: center;
  74. color: #505458;
  75. }
  76. .loginform {
  77. width: 350px;
  78. padding: 35px 35px 15px 35px;
  79. }
  80. </style>