鲁班七号
2023-05-22 83d52c58d6717a2233e1b04e22769f58afcbf20b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<template>
    <div class='bd'>
    <div class="hedaer">
      <h2>新疆维吾尔自治区自然灾害综合监测预警中心</h2>
      <h1>自然灾害综合风险预警发布及响应联动系统</h1>
    </div>
  <div class="login">
 
    <a-form
      layout="horizontal"
      :form="form"
      @submit="handleSubmit"
      class="login-form"
    >
      <a-tabs default-active-key="1" @change="callback">
        <a-tab-pane key="1" tab="用户名登录">
          <a-form-item>
            <a-input
              placeholder="请输入用户"
              size="large"
            >
              <a-icon slot="prefix" type="user" style="color:rgba(0,0,0,.25)" />
            </a-input>
          </a-form-item>
          <a-form-item>
            <a-input-password
              type="password"
              placeholder="请输入密码"
              size="large"
            >
              <a-icon slot="prefix" type="lock" style="color:rgba(0,0,0,.25)" />
            </a-input-password>
          </a-form-item>
        </a-tab-pane>
        <a-tab-pane key="2" tab="验证码登录" force-render>
          <a-form-item>
            <a-input
              placeholder="手机号"
              size="large"
            >
              <a-icon slot="prefix" type="mobile" style="color:rgba(0,0,0,.25)" />
            </a-input>
          </a-form-item>
          <a-form-item>
            <a-row :gutter="8">
              <a-col :span="17">
                <a-input placeholder="验证码">
                  <a-icon slot="prefix" type="mobile" style="color:rgba(0,0,0,.25)" />
                </a-input>
              </a-col>
              <a-col :span="7">
                <a-button style="width: 100%">获取验证码</a-button>
              </a-col>
            </a-row>
          </a-form-item>
        </a-tab-pane>
      </a-tabs>
      <div style="margin-bottom: 20px">
        <a-checkbox :checked="true" style="color:#fff;">自动登录</a-checkbox>
        <a style="float: right">忘记密码</a>
      </div>
      <a-form-item style="text-align: center">
        <a-button
          type="primary"
          html-type="submit"
          style="width: 100%"
          size="large"
        >
          登录
        </a-button>
      </a-form-item>
      <center><p>技术支持:中国科学院</p></center>
    </a-form>
  </div>
  </div>
</template>
 
<script>
export default {
  name: "login",
  data() {
    return {
      // hasErrors,
      form: this.$form.createForm(this),
    };
  },
  mounted() {
    this.$nextTick(() => {
      this.form.validateFields();
    });
  },
  methods: {
    handleSubmit(e) {
      e.preventDefault();
      this.form.validateFields((err, values) => {
        if (!err) {
          console.log("Received values of form: ", values);
          this.$router.push({ name: "default" });
        }
      });
    },
    callback(key) {
      console.log(key);
    },
  },
};
</script>
 
<style lang="less" scoped>
    p{
        color:#fff;
        margin-top: 55px;
    }
h2{
    font-size: 30px;
}
.bd {
    width: 100%;
    height: 100vh;
    background: url('../assets/img/bg.jpeg') no-repeat;
    background-size: 100% 100%;
    background-attachment: fixed;/* 不设置的话页面滑动时,背景会不铺满*/
}
 
 
/deep/ .ant-tabs-bar {
  border-bottom: 0px;
  text-align: center;
}
  .hedaer {
    margin: 0px auto;
    padding-top:100px;
    width: 1000px;
    text-align: center;
    text-shadow:0 0 1px #000;
    h2{font-size: 36px;color:#fff;}
    h1{font-size: 48px;color:#fff;}
    }
.login {
  
  .login-form {
    width: 400px;
    margin: 60px auto 0px;    
    
  }
}
.ant-tabs{
    color:#fff;
    }
</style>