|
@@ -1,165 +0,0 @@
|
|
|
-<template>
|
|
|
- <div id="login-1">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="main" :style="{ 'background-image': 'url(' + backimage + ')' }">
|
|
|
- <el-col :span="24" class="one">
|
|
|
- <div class="w_1200">
|
|
|
- <el-col :span="11" class="left">
|
|
|
- <el-col :span="24" class="info">
|
|
|
- <el-col :span="24" class="txt">
|
|
|
- <el-col :span="4">
|
|
|
- <el-image :src="logo_url" class="image"></el-image>
|
|
|
- </el-col>
|
|
|
- <el-col :span="20">
|
|
|
- <h1>{{ name }}</h1></el-col
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="form">
|
|
|
- <el-form :model="form" :rules="rules" ref="form">
|
|
|
- <el-form-item prop="account">
|
|
|
- <el-input placeholder="账号" v-model="form.account" suffix-icon="el-icon-user"> </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="password">
|
|
|
- <el-input placeholder="密码" v-model="form.password" type="password" suffix-icon="el-icon-lock"> </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-col :span="24" class="codes">
|
|
|
- <el-col :span="17">
|
|
|
- <el-form-item prop="code">
|
|
|
- <el-input placeholder="验证码" v-model="form.code"> </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" class="code">
|
|
|
- <el-image :src="code" class="image"></el-image>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- <el-form-item class="btn">
|
|
|
- <el-button type="primary" @click="toLogin('form')">登录</el-button>
|
|
|
- <el-button type="warning" @click="toRegister()">注册</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="13" class="right">
|
|
|
- <el-image :src="back" class="image"></el-image>
|
|
|
- </el-col>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-export default {
|
|
|
- name: 'login-1',
|
|
|
- props: {},
|
|
|
- components: {},
|
|
|
- data: function () {
|
|
|
- return {
|
|
|
- // logo
|
|
|
- logo_url: require('@/assets/logo.png'),
|
|
|
- // 验证码
|
|
|
- code: require('@/assets/login/login_1_3.png'),
|
|
|
- // 背景图片
|
|
|
- back: require('@/assets/login/login_1_2.png'),
|
|
|
- // 右侧图片
|
|
|
- backimage: require('@/assets/login/login_1_1.png'),
|
|
|
- name: '长春市福瑞科技有限公司',
|
|
|
- form: {},
|
|
|
- rules: {
|
|
|
- account: [{ required: true, message: '账号不能为空', trigger: 'blur' }],
|
|
|
- password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],
|
|
|
- code: [{ required: true, message: '验证码不能为空', trigger: 'blur' }],
|
|
|
- },
|
|
|
- };
|
|
|
- },
|
|
|
- created() {},
|
|
|
- methods: {
|
|
|
- toLogin(formName) {
|
|
|
- this.$refs[formName].validate(async (valid) => {
|
|
|
- if (valid) {
|
|
|
- this.$emit('toLogin', { data: this.form, formName: formName });
|
|
|
- } else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- toRegister() {
|
|
|
- this.$emit('toRegister');
|
|
|
- },
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapState(['user']),
|
|
|
- },
|
|
|
- metaInfo() {
|
|
|
- return { title: this.$route.meta.title };
|
|
|
- },
|
|
|
- watch: {
|
|
|
- test: {
|
|
|
- deep: true,
|
|
|
- immediate: true,
|
|
|
- handler(val) {},
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less" scoped>
|
|
|
-.w_1200 {
|
|
|
- max-width: 1200px;
|
|
|
- margin: 0 auto;
|
|
|
- padding: 15vh 0;
|
|
|
-}
|
|
|
-.main {
|
|
|
- background-size: 100% 100%;
|
|
|
- height: 100vh;
|
|
|
- background-repeat: no-repeat;
|
|
|
- overflow: hidden;
|
|
|
- .one {
|
|
|
- height: 93vh;
|
|
|
- width: 96vw;
|
|
|
- margin: 2%;
|
|
|
- background: rgba(255, 255, 255, 0.7);
|
|
|
- border-radius: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .left {
|
|
|
- .info {
|
|
|
- border-radius: 20px;
|
|
|
- background: #fff;
|
|
|
- box-shadow: 0 0 10px #bdbdbd;
|
|
|
- padding: 5%;
|
|
|
- .txt {
|
|
|
- margin: 20px 0;
|
|
|
- .image {
|
|
|
- width: 50px;
|
|
|
- height: 50px;
|
|
|
- }
|
|
|
- h1 {
|
|
|
- margin: 3px 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .form {
|
|
|
- .codes {
|
|
|
- margin: 0 0 10px 0;
|
|
|
- .code {
|
|
|
- height: 40px;
|
|
|
- background: rgba(55, 55, 55, 0.5);
|
|
|
- margin: 0 0 0 3%;
|
|
|
- .image {
|
|
|
- height: 40px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .btn {
|
|
|
- margin: 15% 0 0 0;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|