Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/smartBuilding
| | |
| | | |
| | | <script> |
| | | import autofit from "autofit.js"; |
| | | import { getLoginInfo } from "./view/login/service"; |
| | | |
| | | export default { |
| | | name: "app", |
| | |
| | | let projectId = ""; |
| | | let projectName = ""; |
| | | const hash = window.location.hash; |
| | | let queryPart = null; |
| | | let params = null; |
| | | if (hash && hash.indexOf("?") !== -1) { |
| | | const queryPart = hash.split("?")[1]; |
| | | const params = new URLSearchParams(queryPart); |
| | | queryPart = hash.split("?")[1]; |
| | | params = new URLSearchParams(queryPart); |
| | | token = params.get("token"); |
| | | type = params.get("type"); |
| | | if (type == 2) { |
| | |
| | | projectName = params.get("projectName"); |
| | | } |
| | | } |
| | | |
| | | if (token) { |
| | | localStorage.setItem("token", token); |
| | | if (type == 1) { |
| | | this.$router.replace({ |
| | | path: "/home", |
| | | }); |
| | | return; |
| | | } |
| | | if (type == 2) { |
| | | this.$router.replace({ |
| | | path: "/projectHome", |
| | | query: { |
| | | projectId, |
| | | projectName, |
| | | }, |
| | | }); |
| | | return; |
| | | } |
| | | getLoginInfo({ |
| | | id: type == 1 ? params.get("clientId") : params.get("projectId"), |
| | | type, |
| | | }).then((r) => { |
| | | localStorage.setItem( |
| | | "permissionClient", |
| | | JSON.stringify( |
| | | r.permissionClient ? r.permissionClient.split(",") : [] |
| | | ) |
| | | ); |
| | | localStorage.setItem( |
| | | "permissionProject", |
| | | JSON.stringify( |
| | | r.permissionProject ? r.permissionProject.split(",") : [] |
| | | ) |
| | | ); |
| | | if (type == 1) { |
| | | localStorage.setItem("clientId", params.get("clientId")); |
| | | localStorage.setItem("clientName", params.get("clientName")); |
| | | localStorage.setItem("clientLogo", r.logo); |
| | | this.$router.replace({ |
| | | path: "/home", |
| | | }); |
| | | return; |
| | | } else if (type == 2) { |
| | | this.$router.replace({ |
| | | path: "/projectHome", |
| | | query: { |
| | | projectId, |
| | | projectName, |
| | | }, |
| | | }); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | if (!localStorage.getItem("token")) { |
| | | this.$router.replace("/"); |
| | |
| | | class="flex a-center c-fff absolute adress1 cursor-pointer" |
| | | > |
| | | <img |
| | | :src=" |
| | | clientLogo |
| | | ? VUE_APP_IMAGE_BASE_URL + clientLogo |
| | | : '../../assets/img/logo.png' |
| | | " |
| | | :src="clientLogo || '../../assets/img/logo.png'" |
| | | class="w--30 h--30 shrink0 mr--10" |
| | | /> |
| | | <div class="color2 lh--30 fs--30 SHSBold"> |
| | |
| | | <template> |
| | | <div class="relative"> |
| | | <div> |
| | | <HeaderBox /> |
| | | <div |
| | | id="container" |
| | |
| | | </div> |
| | | <!-- 左下角隐患 --> |
| | | <div |
| | | v-if="(activeTab == 1 && permissionClient.includes('4')) || (activeTab == 1 && permissionClient.includes('6'))" |
| | | v-if=" |
| | | (activeTab == 1 && permissionClient.includes('4')) || |
| | | (activeTab == 1 && permissionClient.includes('6')) |
| | | " |
| | | class="flex a-center absolute left--14 bottom--14" |
| | | > |
| | | <img |
| | |
| | | <div class="ripple-wave wave-2"></div> |
| | | <div class="ripple-wave wave-3"></div> |
| | | </div> |
| | | <div class="fs--15 lh--15 ml--10">重大隐患数</div> |
| | | <div class="fs--15 lh--15 ml--25">重大隐患数</div> |
| | | <div class="color5 ml--13 fs--30 lh--30 zh_tr"> |
| | | {{ screenData.majorHazardTotal }} |
| | | </div> |
| | |
| | | </div> |
| | | <!-- 地图legend --> |
| | | <div |
| | | class="absolute bottom--30 h--120 w--250 py--29 px--37 bgimg5" |
| | | class="fixed bottom--30 h--120 w--250 py--29 px--37 bgimg5" |
| | | style="right: 505px" |
| | | > |
| | | <div |
| | |
| | | <div class="btn" @click="handleSearch">搜索</div> |
| | | </div> |
| | | </div> |
| | | <div v-if="(activeTab == 1 && permissionClient.includes('2')) || (activeTab == 1 && permissionClient.includes('5'))" class="mt--33 relative"> |
| | | <div |
| | | v-if=" |
| | | (activeTab == 1 && permissionClient.includes('2')) || |
| | | (activeTab == 1 && permissionClient.includes('5')) |
| | | " |
| | | class="mt--33 relative" |
| | | > |
| | | <TitleBox> |
| | | <template #title> 项目数据总览 </template> |
| | | <template #content> |
| | |
| | | </div> |
| | | </template> |
| | | <template #content> |
| | | <div class="px--19 pt--16 pb--9"> |
| | | <div class="px--19 pt--5 pb--9"> |
| | | <el-carousel |
| | | height="366px" |
| | | indicator-position="none" |
| | |
| | | <div class="flex a-center justify-center mt--9"> |
| | | <div class="flex a-center gap--3"> |
| | | <img |
| | | v-for="(item,index) in workListData" |
| | | v-for="(item, index) in workListData" |
| | | :key="item.id" |
| | | :src=" |
| | | activeIndex === index |
| | |
| | | key: "232929db1cb31f26d42b3645a7456154", |
| | | version: "2.0", |
| | | }); |
| | | this.getScreenData(); |
| | | this.getStoryData(); |
| | | getProjectSelect({ clientId: localStorage.getItem("clientId") }).then( |
| | | (res) => { |
| | |
| | | projectCategory: ["ongoing", "fixed"][this.activeTab - 1], |
| | | startDate: "", |
| | | endDate: "", |
| | | clientId: localStorage.getItem("clientId"), |
| | | }; |
| | | if (this.dateRange.length) { |
| | | params.startDate = moment(this.dateRange[0]).format("YYYY-MM-DD"); |
| | |
| | | if (!this.projectId) { |
| | | return; |
| | | } |
| | | const target = this.projectList.find( |
| | | const target = this.screenData.projectMapPoints.find( |
| | | (item) => item.id === this.projectId |
| | | ); |
| | | if (!target) return; |
| | | |
| | | if (!target) { |
| | | this.$message.warning("无此项目地图点位"); |
| | | return; |
| | | } |
| | | |
| | | let position = null; |
| | | if (target.addressInfo) { |
| | |
| | | |
| | | .leftBox { |
| | | width: 380px; |
| | | position: absolute; |
| | | position: fixed; |
| | | top: 109px; |
| | | left: 23px; |
| | | |
| | |
| | | } |
| | | |
| | | .ripple { |
| | | position: relative; |
| | | position: fixed; |
| | | width: 14px; |
| | | height: 14px; |
| | | margin-right: 14px; |
| | |
| | | |
| | | .rightBox { |
| | | width: 462px; |
| | | position: absolute; |
| | | position: fixed; |
| | | top: 85px; |
| | | right: 20px; |
| | | } |
| | |
| | | r.permissionClient ? r.permissionClient.split(",") : [] |
| | | ) |
| | | ); |
| | | localStorage.setItem("clientName", r.name); |
| | | localStorage.setItem("clientLogo", r.logo); |
| | | localStorage.setItem("clientId", re[0].id); |
| | | localStorage.setItem( |
| | | "permissionProject", |
| | | JSON.stringify( |
| | |
| | | }, |
| | | }); |
| | | } else { |
| | | localStorage.setItem("clientName", r.name); |
| | | localStorage.setItem("clientLogo", r.logo); |
| | | localStorage.setItem("clientId", re[0].id); |
| | | this.$router.replace({ |
| | | path: "/home", |
| | | }); |
| | |
| | | color: #ffc500; |
| | | line-height: 24px; |
| | | text-shadow: 0px 0px 10px #612b00; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |