diff --git a/src/api/index.js b/src/api/index.js
index 1bfae20..644d405 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -32,6 +32,7 @@ export default {
saveOrg: `${host}occupationlab/architecture/save`, // 新增组织架构
updateOrg: `${host}occupationlab/architecture/update`, // 编辑组织架构
deleteOrg: `${host}occupationlab/architecture/delete`, // 删除组织架构
+ studentTemplate: `http://39.108.250.202/template/职站学生导入模板.xlsx`, // 职站学生导入模板
// 测评管理
questionsList: `${host}occupationlab/questions/list`, // 题库列表查询
@@ -40,7 +41,7 @@ export default {
questionsDetail: `${host}occupationlab/questions/detail`, // 查看当前题库信息
questionsDelete: `${host}occupationlab/questions/delete`, // 根据主键删除
questionsIsDisable: `${host}occupationlab/questions/isDisable`, // 是否禁用试题
- questionsTemplate: `${Setting.apiBaseURL}template/试题导入模板.xlsx`, //excel模板文件下载
+ questionsTemplate: `http://39.108.250.202/template/职站试题导入模板.xlsx`, //excel模板文件下载
questionsImport: `${host}occupationlab/questions/importQuestion`, // 批量导入题库
questionsExportFailure: `${host}occupationlab/questions/exportFailure`, // 批量导入题库失败数据导出
questionsInfo: `${host}occupationlab/questions/info`, // 测评规则信息的展示
@@ -171,7 +172,8 @@ export default {
bindPhoneOrEmail: `${host}/users/users/userAccount/bindPhoneOrEmail`,// 绑定手机或邮箱
sendPhoneOrEmailCode: `${host}/users/users/userAccount/sendPhoneOrEmailCode`,// 更换手机号或邮箱--发送手机验证码
-
+ // 系统设置
+ staffTemplate: `http://39.108.250.202/template/职站员工用户导入模板.xlsx`, //职站员工用户导入模板
@@ -211,7 +213,6 @@ export default {
// resetPwd: `${host}evaluation/tms/system/resetPwd`,
dalStaffByStaffGradeId: `${host}evaluation/tms/system/dalStaffByStaffGradeId`,
dalStaffByProfessionalId: `${host}evaluation/tms/system/dalStaffByProfessionalId`,
- staffTemplate: `${host}template/staff.xlsx`,
// 角色权限
rolePermissionList: `${host}evaluation/sys-permission/rolePermissionList`,
diff --git a/src/components/quill/index.vue b/src/components/quill/index.vue
index c8e58c6..195825c 100644
--- a/src/components/quill/index.vue
+++ b/src/components/quill/index.vue
@@ -9,7 +9,7 @@
:on-success="editorUploadSuccess"
style="display: none"
>
- 点击上传
+ 点击上传
diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue
index bfceb33..6b48fee 100644
--- a/src/pages/account/login/index.vue
+++ b/src/pages/account/login/index.vue
@@ -7,62 +7,58 @@
+
+
+
+
+
+
+
+
+ {{ phoneBtnText }}
+
+
+
+
+
+
@@ -77,52 +73,130 @@ export default {
data: function() {
return {
isHh: Setting.isHh,
- tabName: "1",
- param: {
- account: "zh",
- password: "111aaa",
+ activeName: "1",
+ loginForm: {
+ account: "",
+ password: "",
code: "", // 验证码
random: "", // 随机数
- distinguish: null, // 区分手机号账号登录,1为账号登录,2为手机号或邮箱登录
- platform: 1 // 平台标识,1职站,2数据平台,3中台
+ distinguish: 1, // 区分手机号账号登录,1为账号登录,2为手机号或邮箱登录
+ platform: Setting.platformId
},
- rules: {
+ loginRules: {
account: [{ required: true, message: "请输入账号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }]
},
- verificationIMG: ""
+ verificationIMG: "",
+ phoneVisible: false, // 绑定手机号对话框
+ phone: "",
+ phoneCode: "",
+ phoneDisabled: false,
+ phoneTimer: null,
+ phoneBtnText: "发送验证码"
};
},
components: {
vFooter
},
+ created() {
+ this.getVerImg();
+ },
+ mounted() {
+ // 页面离开的时候销毁手机和邮箱验证码定时器
+ this.$once("hook:beforeDestroy", function() {
+ clearInterval(this.phoneTimer);
+ this.phoneTimer = null;
+ });
+ },
methods: {
...mapActions("user", [
"login"
]),
- submitForm(form) {
- this.$refs[form].validate(valid => {
+ getVerImg() { // 获取验证码图片
+ this.loginForm.random = Math.floor(Math.random() * 999999999);
+ this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`;
+ },
+ handleClick(tab, event) { // 切换标签
+ this.loginForm.account = "";
+ this.$refs.loginForm.clearValidate();
+ this.loginRules.account[0].message = tab.index === "1" ? "请输入账号" : "请输入手机号/邮箱";
+ },
+ submitFormLogin() { // 提交登录
+ this.$refs.loginForm.validate(valid => {
if (valid) {
- this.param.distinguish = this.tabName === "1" ? 1 : 2;
- this.login(this.param).then(() => {
+ this.loginForm.distinguish = Number(this.activeName);
+ this.login(this.loginForm).then(() => {
let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
this.$router.replace(redirect);
- console.log(redirect)
}).catch(res => {
+ if (res && res.status == 30001) {
+ this.phoneVisible = true;
+ }
+ this.getVerImg();
+ this.loginForm.code = "";
});
} else {
return util.errorMsg("请检查表单数据");
}
});
},
- blur() {
- this.param.random = Math.floor(Math.random() * 999999999);
- this.verificationIMG = this.api.verification + "?random=" + `${this.param.random}`;
+ phoneCountdown() {
+ let count = 60;
+ if (!this.phoneTimer) {
+ this.phoneDisabled = true;
+ this.phoneTimer = setInterval(() => {
+ console.log("倒计时中");
+ if (count > 0) {
+ count--;
+ this.phoneBtnText = `${count}秒后重试`;
+ } else {
+ this.phoneDisabled = false;
+ clearInterval(this.phoneTimer);
+ this.phoneTimer = null;
+ this.phoneBtnText = `发送验证码`;
+ }
+ }, 1000);
+ }
+ },
+ sendPhoneCode() {
+ if (!this.phone) return util.warningMsg("请输入手机号");
+ if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号");
+ let data = {
+ platform: Setting.platformId,
+ phone: this.phone,
+ types: 2
+ };
+ this.$post(this.api.sendPhoneOrEmailCode, data).then(res => {
+ if (res.message.opener) {
+ this.phoneCountdown();
+ this.phoneOpener = res.message.opener;
+ } else {
+ util.errorMsg(res.message);
+ }
+
+ }).catch(res => {
+ });
+ },
+ phoneSubmit() {
+ if (!this.phone) return util.warningMsg("请输入手机号");
+ if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号");
+ if (!this.phoneCode) return util.warningMsg("请输入验证码");
+ let data = {
+ phone: this.phone,
+ types: 2,
+ code: this.phoneCode,
+ opener: this.phoneOpener,
+ platform: Setting.platformId,
+ account: this.loginForm.account
+ };
+ this.$post(this.api.bindPhoneOrEmail, data).then(res => {
+ util.successMsg("绑定成功");
+ this.loginForm.phone = this.phone;
+ this.phoneVisible = false;
+ }).catch(res => {
+ });
}
- },
- created() {
- this.blur();
}
};
@@ -221,7 +295,7 @@ export default {
cursor: pointer;
}
- .btn {
+ .submit {
width: 100%;
height: 88px;
margin-bottom: 50px;
diff --git a/src/pages/achievement/ass/index.vue b/src/pages/achievement/ass/index.vue
index b17a0fd..958754f 100644
--- a/src/pages/achievement/ass/index.vue
+++ b/src/pages/achievement/ass/index.vue
@@ -34,8 +34,8 @@
@@ -76,7 +76,6 @@