|
@@ -6,21 +6,56 @@
|
|
|
<el-col :span="24" class="one">
|
|
|
<el-col :span="24" class="title">环南湖科创先导区双创服务平台</el-col>
|
|
|
<el-col :span="24" class="info">
|
|
|
- <el-col :span="24" class="infoText">管理登录</el-col>
|
|
|
- <el-col :span="24" class="form">
|
|
|
- <el-form ref="form" :model="form">
|
|
|
- <el-form-item>
|
|
|
- <el-input v-model="form.code_phone" prefix-icon="el-icon-user-solid" maxlength="11" placeholder="请输入账号"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-input v-model="form.passwd" prefix-icon="el-icon-lock" placeholder="请输入账号" show-password></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-col :span="24" class="btn">
|
|
|
- <el-button type="danger" @click="resetBtn">取消登录</el-button>
|
|
|
- <el-button type="primary" @click="onSubmit">提交登录</el-button>
|
|
|
+ <el-tabs v-model="activeName" :stretch="true">
|
|
|
+ <el-tab-pane label="企业登录" name="first">
|
|
|
+ <el-col :span="24" class="form">
|
|
|
+ <el-form ref="form" :model="form">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="form.institution_code" prefix-icon="el-icon-user-solid" maxlength="11" placeholder="请输入企业账号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="form.passwd" prefix-icon="el-icon-lock" placeholder="请输入账号密码" show-password></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-col :span="24" class="btn">
|
|
|
+ <el-button type="danger" @click="resetBtn">取消登录</el-button>
|
|
|
+ <el-button type="primary" @click="oneSubmit">提交登录</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
</el-col>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="中介机构登录" name="second">
|
|
|
+ <el-col :span="24" class="form">
|
|
|
+ <el-form ref="interForm" :model="interForm">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="interForm.phone" prefix-icon="el-icon-user-solid" maxlength="11" placeholder="请输入中介机构账号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="interForm.passwd" prefix-icon="el-icon-lock" placeholder="请输入账号密码" show-password></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-col :span="24" class="btn">
|
|
|
+ <el-button type="danger" @click="resetBtn">取消登录</el-button>
|
|
|
+ <el-button type="primary" @click="twoSubmit">提交登录</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="服务机构登录" name="third">
|
|
|
+ <el-col :span="24" class="form">
|
|
|
+ <el-form ref="adminForm" :model="adminForm">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="adminForm.code_phone" prefix-icon="el-icon-user-solid" maxlength="11" placeholder="请输入服务机构账号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="adminForm.passwd" prefix-icon="el-icon-lock" placeholder="请输入账号密码" show-password></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-col :span="24" class="btn">
|
|
|
+ <el-button type="danger" @click="resetBtn">取消登录</el-button>
|
|
|
+ <el-button type="primary" @click="thrSubmit">提交登录</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -32,27 +67,57 @@
|
|
|
<script>
|
|
|
const _ = require('lodash');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
+const { mapActions: organization } = createNamespacedHelpers('organization');
|
|
|
+const { mapActions: mechanism } = createNamespacedHelpers('mechanism');
|
|
|
+const { mapActions: adminLogin } = createNamespacedHelpers('login');
|
|
|
export default {
|
|
|
name: 'login',
|
|
|
props: {},
|
|
|
components: {},
|
|
|
data: function () {
|
|
|
return {
|
|
|
+ activeName: 'first',
|
|
|
loginBj: require('@a/loginBj.jpg'),
|
|
|
+ // 企业登录
|
|
|
form: {},
|
|
|
+ // 中介机构登录
|
|
|
+ interForm: {},
|
|
|
+ // 服务机构登录
|
|
|
+ adminForm: {},
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
- ...login(['login']),
|
|
|
- async onSubmit() {
|
|
|
+ // 企业
|
|
|
+ ...organization(['login']),
|
|
|
+ // 中介机构
|
|
|
+ ...mechanism({ interLogin: 'login' }),
|
|
|
+ // 服务机构登录
|
|
|
+ ...adminLogin({ adminLogin: 'login' }),
|
|
|
+ // 企业
|
|
|
+ async oneSubmit() {
|
|
|
let data = _.get(this, 'form');
|
|
|
const res = await this.login(data);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$router.push({ path: '/adminCenter/homeIndex' });
|
|
|
}
|
|
|
},
|
|
|
+ // 中介
|
|
|
+ async twoSubmit() {
|
|
|
+ let data = _.get(this, 'interForm');
|
|
|
+ const res = await this.interLogin(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$router.push({ path: '/adminCenter/homeIndex' });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 管理员
|
|
|
+ async thrSubmit() {
|
|
|
+ let data = _.get(this, 'adminForm');
|
|
|
+ const res = await this.adminLogin(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$router.push({ path: '/adminCenter/homeIndex' });
|
|
|
+ }
|
|
|
+ },
|
|
|
resetBtn() {
|
|
|
this.$router.push({ path: '/' });
|
|
|
},
|
|
@@ -91,35 +156,25 @@ export default {
|
|
|
}
|
|
|
.info {
|
|
|
height: 400px;
|
|
|
- padding: 0 50px;
|
|
|
+ padding: 30px 50px;
|
|
|
border-radius: 5px;
|
|
|
box-shadow: 0 0 5px #f1f1f1;
|
|
|
background-color: #ffffff5f;
|
|
|
- .infoText {
|
|
|
- font-size: 28px;
|
|
|
- text-align: center;
|
|
|
- padding: 30px 0;
|
|
|
- font-weight: bold;
|
|
|
- -webkit-text-stroke: 1px #fe950e;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
.form {
|
|
|
+ margin: 20px 0 0 0;
|
|
|
.btn {
|
|
|
text-align: center;
|
|
|
+ margin: 15px 0 0 0;
|
|
|
}
|
|
|
- /deep/.el-form-item {
|
|
|
- margin-bottom: 40px;
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-tabs__item {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 18px;
|
|
|
+ height: 60px;
|
|
|
+ line-height: 60px;
|
|
|
}
|
|
|
}
|
|
|
- // .title {
|
|
|
- // text-align: center;
|
|
|
- // font-size: 30px;
|
|
|
- // color: #ff0000;
|
|
|
- // }
|
|
|
- // .form {
|
|
|
- // padding: 0 10px;
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
</style>
|