diff --git a/src/components/account.vue b/src/components/account.vue index 8b2c4a72..eae1165b 100644 --- a/src/components/account.vue +++ b/src/components/account.vue @@ -60,7 +60,7 @@ class="width_100" @click="goto5()" v-if=" - $route.path.indexOf('/firm/projectManage') == -1 && + $route.path.indexOf('/firm/') == -1 && ![5, 6, 10].includes($store.state.userInfo.accountType) " :title="enterpriseFront" diff --git a/src/views/userCenter/layout.vue b/src/views/userCenter/layout.vue index 37a04b5b..4780597a 100644 --- a/src/views/userCenter/layout.vue +++ b/src/views/userCenter/layout.vue @@ -4,24 +4,47 @@
- - - {{systemInfo.platformName}} + + + {{ systemInfo.platformName }} + - - {{$t('message.companyDiagram.pageTitle')}} + {{ + $t("message.companyDiagram.pageTitle") + }} - {{$t('message.companyDiagram.pageTitle')}} + {{ $t("message.companyDiagram.pageTitle") }}
-
+
-
+
@@ -34,24 +57,20 @@ active-text-color="#5181F6" router > - @@ -83,45 +103,43 @@ import account from "@/components/account.vue"; import userChange from "@/components/userChange.vue"; import centerChange from "@/components/centerChange.vue"; -import { - getNewUserAllModulePageApi, -} from "@/assets/js/api/jxjadmin.js"; +import { getNewUserAllModulePageApi } from "@/assets/js/api/jxjadmin.js"; export default { data() { return { - LOGO_white:LOGO_white, - currentUrl:'', - menuList:[ - { moduleName: '用户中心', modulePath: "/userCenter/userConfig" } + LOGO_white: LOGO_white, + currentUrl: "", + menuList: [ + { moduleName: "用户中心", modulePath: "/userCenter/userConfig" }, ], - systemInfo:{ - "loginBackgroundImage": "", - "loginLogo": "", - "platformLogo": "", - "platformName": "智慧工地云平台" - }, - workSpaceShow: false + systemInfo: { + loginBackgroundImage: "", + loginLogo: "", + platformLogo: "", + platformName: "智慧工地云平台", + }, + workSpaceShow: false, }; }, - components:{ + components: { account, userChange, - centerChange + centerChange, }, created() { this.company = COMPANY; - console.log(COMPANY) - if(this.$store.state.projectSn){ + console.log(COMPANY); + if (this.$store.state.projectSn) { this.getModuleList(); } }, - mounted(){ + mounted() { // this.getAllModule() - if(localStorage.getItem('systemInfo')){ - this.systemInfo=JSON.parse(localStorage.getItem('systemInfo')) + if (localStorage.getItem("systemInfo")) { + this.systemInfo = JSON.parse(localStorage.getItem("systemInfo")); } // document.title='企业后台' - console.log('mounted',this.$route.path) + console.log("mounted", this.$route.path); }, methods: { // 查询全部模块(拿到工作流的模块菜单) @@ -140,7 +158,7 @@ export default { } }); }, - backTo(){ + backTo() { this.$router.push("/workSpace"); // this.$router.back(); }, @@ -159,36 +177,36 @@ export default { // console.log("onoff", onoff); return onoff; }, - getAllModule(){ - var half = this.$store.state.userInfo.menuAuthority.moduleList - half.forEach(element => { - if(element.moduleType==3){ - this.menuList.push(element) - } - }); - // getAllModuleApi({moduleType:4}).then(res => { - // if (res.success) { - // var all = res.result - // all.forEach((element,index) => { - // all[index].operation=false - // half.forEach(element2 => { - // if(element2.moduleId==element.moduleId){ - // all[index].operation=true - // all[index].menuList=element2.menuList - // } - // }); - // }); - // this.menuList=all - // } - // }) + getAllModule() { + var half = this.$store.state.userInfo.menuAuthority.moduleList; + half.forEach((element) => { + if (element.moduleType == 3) { + this.menuList.push(element); + } + }); + // getAllModuleApi({moduleType:4}).then(res => { + // if (res.success) { + // var all = res.result + // all.forEach((element,index) => { + // all[index].operation=false + // half.forEach(element2 => { + // if(element2.moduleId==element.moduleId){ + // all[index].operation=true + // all[index].menuList=element2.menuList + // } + // }); + // }); + // this.menuList=all + // } + // }) }, handleSelect(url) { // this.$store.commit('setCurrentUrl',url) // this.$store.dispatch('currentUrl',url) }, back() { - this.$router.push("/firm/projectManage") - } + this.$router.push("/firm/projectManage"); + }, }, }; @@ -217,13 +235,14 @@ export default { } } } -/deep/.el-submenu__title{ - padding-right: 20px!important; - .el-submenu__icon-arrow{ +/deep/.el-submenu__title { + padding-right: 20px !important; + .el-submenu__icon-arrow { right: 0px; } } -.el-menu--horizontal .firstLevelMenu.is-active,/deep/.is-active .el-submenu__title { +.el-menu--horizontal .firstLevelMenu.is-active, +/deep/.is-active .el-submenu__title { border-bottom: 3px solid #409eff; } .menuInnerBox { @@ -258,7 +277,7 @@ export default { // .menuInnerBox { // display: inline-block; // } -.menuBox{ +.menuBox { position: relative; display: flex; align-items: center; @@ -273,7 +292,7 @@ export default { height: 61px; display: flex; align-items: center; - justify-content: flex-end + justify-content: flex-end; } .title_l { font-family: PingFangSC-Semibold; @@ -285,14 +304,14 @@ export default { margin-right: 14px; } } -.title_near{ +.title_near { margin-right: 50px; } -.title_near-tow{ - .divider-line{ +.title_near-tow { + .divider-line { width: 1px; height: 16px; - background: #FFFFFF; + background: #ffffff; margin-right: 50px; } } diff --git a/src/views/userCenter/userCenter/componentsModule/dataListData.vue b/src/views/userCenter/userCenter/componentsModule/dataListData.vue index f396c3ff..2480f330 100644 --- a/src/views/userCenter/userCenter/componentsModule/dataListData.vue +++ b/src/views/userCenter/userCenter/componentsModule/dataListData.vue @@ -175,7 +175,7 @@ export default { }, exportFn() { let requestData = { - sn: this.$store.state.projectSn, + sn: this.$store.state.projectSn || this.$store.state.userInfo.sn, // sn: this.$store.state.userInfo.sn || this.$store.state.userInfo.headquartersSn, pageNo: this.pageInfo.pageNo, pageSize: this.pageInfo.pageSize, @@ -230,7 +230,7 @@ export default { //查询列表 getList() { let requestData = { - sn: this.$store.state.projectSn, + sn: this.$store.state.projectSn || this.$store.state.userInfo.sn || this.$store.state.userInfo.headquartersSn, // sn: this.$store.state.userInfo.sn || this.$store.state.userInfo.headquartersSn, pageNo: this.pageInfo.pageNo, pageSize: this.pageInfo.pageSize,