|
@@ -46,6 +46,21 @@
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="专家用户" name="third">
|
|
|
+ <el-col :span="24" class="two">
|
|
|
+ <el-form :model="expert" ref="expert" label-width="100px">
|
|
|
+ <el-form-item label="手机号" prop="phone">
|
|
|
+ <el-input v-model="expert.phone" placeholder="请输入手机号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="密码" prop="passwd">
|
|
|
+ <el-input v-model="expert.password" placeholder="请输入密码" show-password></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-col :span="24" class="btn">
|
|
|
+ <el-button type="primary" @click="toExpertLogin('form')">确认登录</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -57,10 +72,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+const _ = require('lodash');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
|
|
|
const { mapActions: personal } = createNamespacedHelpers('personal');
|
|
|
const { mapActions: organization } = createNamespacedHelpers('organization');
|
|
|
+const { mapActions: achieveExpert } = createNamespacedHelpers('achieveExpert');
|
|
|
export default {
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -84,6 +101,8 @@ export default {
|
|
|
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
|
|
type: [{ required: true, message: '请选择用户类别', trigger: 'change' }],
|
|
|
},
|
|
|
+ // 专家登陆
|
|
|
+ expert: {},
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
@@ -91,6 +110,7 @@ export default {
|
|
|
...personal(['perLogin']),
|
|
|
...organization(['orgLogin']),
|
|
|
...adminLogin(['login']),
|
|
|
+ ...achieveExpert({ expertLogin: 'login' }),
|
|
|
// 个人登录
|
|
|
webLogin(formName) {
|
|
|
this.$refs[formName].validate(async valid => {
|
|
@@ -131,6 +151,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 专家登陆
|
|
|
+ async toExpertLogin() {
|
|
|
+ let dup = _.cloneDeep(this.expert);
|
|
|
+ const res = await this.expertLogin(dup);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message.success('登录成功');
|
|
|
+ this.$router.push('/homeIndex');
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
|