import vhead from "@/components/header";
import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
-import { getGroupListByCompanyApi, jumpLargeUserInfoApi } from "@/assets/js/api/loginSign.js";
+import {
+ getGroupListByCompanyApi,
+ jumpLargeUserInfoApi,
+} from "@/assets/js/api/loginSign.js";
import {
getAllModuleApi,
getNewUserAllModulePageApi,
@@ -83,6 +86,9 @@ export default {
// this.selectGroupDialog = true;
// }
this.getGroupTreeData();
+ if (!this.$store.state.userInfo.personMail) {
+ this.checkInfoComplete();
+ }
},
mounted() {
// 挂载后来给iframe传递菜单数据
@@ -96,19 +102,39 @@ export default {
iframe.removeEventListener("load", this.onIframeLoad);
},
methods: {
+ checkInfoComplete() {
+ this.$confirm(
+ "系统检测到您未完善邮箱,请去后台中心完善,以免忘记密码时无法通过邮箱验证,导致重置密码失败!",
+ "温馨提示",
+ {
+ confirmButtonText: "用户中心",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ )
+ .then(() => {
+ this.$router.push("/userCenter/userConfig");
+ })
+ .catch(() => {
+ this.$message({
+ type: "info",
+ message: "已取消",
+ });
+ });
+ },
// 查询全部模块
getModuleMenuList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
- console.log(res,'我爱你测试')
+ console.log(res, "我爱你测试");
this.$store.commit("setUserInfo", {
...this.$store.state.userInfo,
menuAuthority: {
menuList: res.result.menuList,
- moduleList: res.result.moduleList
- }
+ moduleList: res.result.moduleList,
+ },
});
});
},
@@ -146,7 +172,7 @@ export default {
// console.error("================发消息之前的userInfo==================")
// console.error(this.$store.state.userInfo)
// console.error("================发消息之前的userInfo==================")
-
+
// console.error("================发消息之前的projectSn==================")
// console.error(this.$store.state.projectSn)
// console.error("================发消息之前的projectSn==================")
@@ -208,7 +234,7 @@ export default {
this.$nextTick(() => {
let iframe = this.$refs.myIframeRef;
iframe.addEventListener("load", this.onIframeLoad);
- })
+ });
});
},
// 默认选中已选中组织的第一个项目
@@ -223,24 +249,24 @@ export default {
// 加判断是为了在循环中只选中第一个
this.projectSn = obj.sn;
// 修改全局projectSn
- console.log(obj.sn,'我爱你测试')
+ console.log(obj.sn, "我爱你测试");
this.$store.commit("setProjectSn", obj.sn);
}
- this.getModuleMenuList();
- this.getDataDateils();
+ this.getModuleMenuList();
+ this.getDataDateils();
}
},
// 点击选中组织
selectedGroupData(item) {
let data = {
token: this.$store.state.userInfo.token,
- headquartersSn: item.companySn
+ headquartersSn: item.companySn,
};
jumpLargeUserInfoApi(data).then((res) => {
- console.log(res,'重新获取信息');
- if(res.result){
+ console.log(res, "重新获取信息");
+ if (res.result) {
this.$store.commit("setUserInfo", res.result);
- console.log(item,123456789)
+ console.log(item, 123456789);
if (item) {
this.selectedDataSn = item.companySn;
this.$store.commit("setSelectedGroupSn", item.companySn); // 存储选中的组织Sn
@@ -266,11 +292,11 @@ export default {
// console.log(res);
if (res.code == 200 && res.result) {
this.groupListData = res.result;
- console.log("this.groupListData",this.groupListData)
- if(this.groupListData.length==1){
+ console.log("this.groupListData", this.groupListData);
+ if (this.groupListData.length == 1) {
this.selectedGroupData(this.groupListData[0]);
- }else{
- this.selectGroupDialog = true
+ } else {
+ this.selectGroupDialog = true;
}
this.$store.commit("setGroupTreeList", res.result); // 存储组织树数据
}