1140 lines
28 KiB
Vue
Raw Normal View History

2023-07-12 09:56:31 +08:00
<template>
2024-11-14 14:34:18 +08:00
<ScaleBox :width="1920" :height="1080" bgc="transparent" :delay="100" :isFlat="false" @scaleChange="scaleChange">
<!-- <div class="container"> -->
<div class="largeScreen" ref="dataScreenRef" style="width: 100%; height: 100%">
2024-10-15 15:36:21 +08:00
<div class="header" :class="!EntityMap.Mapswitch ? 'storeheader' : ''">
<!-- <div class="hearderIcon"><img src="@/assets/images/jxjLogo.png" alt="" /></div> -->
<span class="projectTitle">
<!-- 新建宁波项目要打开 -->
<p v-if="COMPANY === 'xjnb'">智慧工地项目监管平台</p>
<p v-else>数字化项目监管平台</p>
<!-- <p>江坑110kv变电站智慧工地</p> -->
</span>
<span :class="{ projectSmallTitle: true, zsbf: COMPANY === 'zsbf' }">
<p>{{ projectTimeInfo.name || "" }}</p>
</span>
<div class="rightIcon" @click.stop>
<div class="time">{{ nowTime }}</div>
<!-- <div class="Icon">
2023-07-12 09:56:31 +08:00
<img src="@/assets/images/dustNoise/jobIcon.png" alt="" />
</div>
<div class="Icon">
<img src="@/assets/images/dustNoise/ysbfIcon.png" alt="" />
</div>
<div class="Icon">
<img src="@/assets/images/dustNoise/sjzxIcon.png" alt="" />
</div>
<div class="Icon">
<img src="@/assets/images/dustNoise/dpIcon.png" alt="" />
2024-10-15 15:36:21 +08:00
</div>-->
<div class="Icon">
2024-10-15 15:36:21 +08:00
<img src="@/assets/images/dustNoise/tbsjIcon.png" alt />
</div>
<div class="Icon" @click="showUserBox = !showUserBox">
2024-10-15 15:36:21 +08:00
<img src="@/assets/images/dustNoise/ryIcon.png" alt />
</div>
2023-07-28 19:43:56 +08:00
<!-- <el-dropdown trigger="click">
2023-07-28 19:43:56 +08:00
<template #dropdown>
<div class="userDialog" @click="loginOut">退出登录</div>
</template>
2024-10-15 15:36:21 +08:00
</el-dropdown>-->
</div>
<div class="userBox" v-show="showUserBox">
<div class="userItem">
<div class="sanJiao"></div>
<div class="userIcon">
2024-10-15 15:36:21 +08:00
<div class="icon">
<img src="@/assets/images/dustNoise/userIcon.png" />
</div>
<div class="userName">{{ adminName }}</div>
</div>
<div class="loginOut" @click="jumpBgd">
<div class="loginOutIcon">
<img src="@/assets/images/dustNoise/jumpIcon.png" />
</div>
<div class="userName">项目后台</div>
</div>
<div class="loginOut" @click="loginOut">
<div class="loginOutIcon">
<img src="@/assets/images/dustNoise/loginOut.png" />
</div>
<div class="userName">退出登录</div>
</div>
2023-09-04 14:43:33 +08:00
</div>
2023-07-28 19:43:56 +08:00
</div>
2023-07-12 09:56:31 +08:00
</div>
2024-10-15 15:36:21 +08:00
<!-- 原项目 -->
<template v-if="EntityMap.Mapswitch">
<div class="menuList">
<div v-for="(item, index) in menuList" :key="index" class="menStyle">
<div
:index="item.modulePath"
:class="{
subMenu: true,
active: activeTab === item.modulePath,
zsbf: COMPANY === 'zsbf'
}"
2024-10-15 15:36:21 +08:00
>
<span @click="navigateTo(item, 1)">{{ item.moduleName }}</span>
</div>
</div>
<div :class="{ subMenuList: true, zsbf: COMPANY === 'zsbf' }" v-if="itemList != null && itemList.length >= 1">
2024-10-15 15:36:21 +08:00
<el-scrollbar class="scrollItem">
<div class="subMenuItem">
<div
class="subItem"
:style="COMPANY === 'hfqc' ? 'width:120px' : ''"
v-for="(data, i) in itemList"
:key="i"
:index="data.companyPath"
@click="navigateTo(data, 2)"
>
2024-11-14 14:34:18 +08:00
<span style="white-space: nowrap" :class="{ active2: activeTab2 === data.companyPath }">{{
data.menuName
}}</span>
2024-10-15 15:36:21 +08:00
</div>
</div>
2024-10-15 15:36:21 +08:00
</el-scrollbar>
</div>
</div>
<div class="contentDate">
2024-10-15 15:36:21 +08:00
<span>
{{ projectTimeInfo.contractPeriodStartTime }}起开始计算至今日{{ nowDate }}
<span class="numColor"> {{ projectPassDay }} </span>个日历天
2024-10-15 15:36:21 +08:00
</span>
</div>
<div class="dataBoardContent">
<router-view></router-view>
</div>
</template>
<div v-if="!EntityMap.Mapswitch" class="map-box">
<ProjectShow />
2023-07-12 09:56:31 +08:00
</div>
</div>
<!-- </div> -->
</ScaleBox>
2023-07-12 09:56:31 +08:00
</template>
<script lang="ts" setup>
2024-10-15 15:36:21 +08:00
// 大屏模块--
import ProjectShow from "@/views/sevenLargeScreen/projectshow/index.vue";
import { MapViewdata } from "@/stores/modules/map3D";
const EntityMap = MapViewdata();
const toggleMapSwitch = () => {
EntityMap.toggleMapSwitch();
};
// 大屏模块--
import ScaleBox from "vue3-scale-box";
2024-12-30 09:34:23 +08:00
import { ElMessage } from "element-plus";
import { ref, reactive, onMounted, onBeforeUnmount, computed, nextTick } from "vue";
import { getTaskTimeDetail } from "@/api/modules/schedulePlan";
2024-12-30 09:34:23 +08:00
import { jumpLargeUserInfoApi, jumpLargeByUserIdApi, getAllModule, getScreenAuthModuleAndMenuApi } from "@/api/modules/login";
import {
JSYCMenu,
XJNBMenu,
AHSAMenu,
HFQCMenu,
ASMenu,
AGJTMenu,
SLXMenu,
ZSBFMenu,
ZHZRFMenu,
ZKAXMenu,
CQNAMenu,
2024-06-27 18:41:42 +08:00
ZKJCMenu,
2024-07-10 19:20:01 +08:00
CPGSMenu,
2024-07-18 16:11:01 +08:00
TJMenu,
2024-08-09 16:37:07 +08:00
SCWCMenu,
2024-08-09 16:47:35 +08:00
JZJTMenu,
2024-08-20 14:51:14 +08:00
BTHGMenu,
2024-09-23 15:15:35 +08:00
DLJBMenu,
2024-10-15 15:36:21 +08:00
WHZTMenu,
ZTSYJMenu,
2024-11-14 14:34:18 +08:00
XNYZHJJMenu,
GWKJMenu,
2024-12-30 09:54:18 +08:00
JXWJJMenu,
ALLXMMenu,
HBLAMenu,
QYGMenu
} from "@/config/staticMenu";
2023-12-28 18:15:42 +08:00
import { COMPANY } from "@/config/config";
2023-07-12 09:56:31 +08:00
import { useRouter } from "vue-router";
2023-07-28 19:43:56 +08:00
import { GlobalStore } from "@/stores";
const store = GlobalStore();
2024-04-09 20:58:48 +08:00
const BASEURL = import.meta.env.VITE_API_URL;
let nowTime = ref("2023-04-16 09:22:12" as any);
let nowDate = ref("2023.11.16" as any);
let projectPassDay = ref(0 as any);
//获取项目信息
const projectTimeInfo = ref({} as any);
2024-03-25 20:57:41 +08:00
const contentWidth = ref(0);
const contentHeight = ref(0);
const calculateAspectRatio = () => {
const container = document.querySelector(".largeScreen");
2024-03-25 20:57:41 +08:00
// const containerWidth = document.body.offsetWidth;
const containerWidth = document.documentElement.offsetWidth;
// const containerWidth: number = (<HTMLElement>container).offsetWidth;
// const containerHeight = document.body.offsetHeight;
const containerHeight = document.documentElement.offsetHeight;
// const containerHeight: number = (<HTMLElement>container).offsetHeight;
console.log(containerWidth, containerHeight);
const aspectRatio = 16 / 9; // 16:9 比例
const containerAspectRatio = containerWidth / containerHeight;
if (containerAspectRatio > aspectRatio) {
// 以高度为基准,按比例计算宽度
contentHeight.value = containerHeight;
contentWidth.value = Math.floor(containerHeight * aspectRatio);
} else {
// 以宽度为基准,按比例计算高度
contentWidth.value = containerWidth;
contentHeight.value = Math.floor(containerWidth / aspectRatio);
}
console.log("contentWidth", contentWidth.value);
console.log("contentHeight", contentHeight.value);
2024-03-25 20:57:41 +08:00
};
const scaleChange = (data: any) => {
2024-03-28 11:30:42 +08:00
store.globalScale = data;
};
const getProjectInfo = async () => {
getNowDate();
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
console.log("获取项目信息", res);
projectTimeInfo.value = res.result;
projectPassDay.value = calculateDaysPassed(projectTimeInfo.value.contractPeriodStartTime);
};
function calculateDaysPassed(startDate: any) {
const start = new Date(startDate);
const today = new Date();
const timeDiff = today.getTime() - start.getTime();
const daysPassed = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
return daysPassed;
}
function getNowDate() {
const date = new Date();
const year = date.getFullYear();
const month = ("0" + (date.getMonth() + 1)).slice(-2);
const day = ("0" + date.getDate()).slice(-2);
const formattedDate = `${year}-${month}-${day}`;
nowDate.value = formattedDate;
// console.log(formattedDate); // 输出 "2021-06-01"
}
2023-07-28 19:43:56 +08:00
let showUserBox = ref(false as any);
let adminName = ref("" as any);
2024-12-30 09:34:23 +08:00
let menuList = ref([]);
// let menuList = ref([
// {
2024-12-30 09:34:23 +08:00
// moduleName: "综合管理",
// modulePath: "/projectOverview",
// menuList: [
// {
// menuName: "工程概况",
// companyPath: "/projectOverview"
// },
// {
// menuName: "智慧党建",
// companyPath: "/smartPartyBuilding"
// },
// {
// menuName: "双碳管理",
// companyPath: "/projectioter"
// }
// // {
// // menuName: "工程概况-1",
// // companyPath: "/projectOverviewer"
// // }
// ]
// },
// {
2024-12-30 09:34:23 +08:00
// moduleName: "数字工地",
// modulePath: "/videoManagement",
// menuList: [
// {
// menuName: "视频管理",
// companyPath: "/videoManagement"
// },
// {
// menuName: "AI预警",
// companyPath: "/aIEarlyWarning"
// },
// {
// menuName: "地磅管理",
// companyPath: "/loadometerManage"
// },
// {
// menuName: "车辆管理",
// companyPath: "/vehicleManagement"
// },
// {
// menuName: "车辆测速",
// companyPath: "/vehicleManagspeed"
// },
// {
// menuName: "配电箱监测",
// companyPath: "/distributionMonitoring"
// },
// {
// menuName: "标养室监测",
// companyPath: "/standardCureRoom"
// },
// {
// menuName: "车辆定位",
// companyPath: "/carPosition"
// },
// {
// menuName: "机械设备定位",
// companyPath: "/equipmentPosition"
// },
// {
// menuName: "智能安全帽",
// companyPath: "/smartSafeHat"
// },
// {
// menuName: "新智能安全帽",
// companyPath: "/smartSafeHater"
// }
// ]
// },
// {
2024-12-30 09:34:23 +08:00
// moduleName: "劳务管理",
// modulePath: "/laborManagement",
// menuList: [
// {
// menuName: "劳务管理",
// companyPath: "/laborManagement"
// }
// ]
// },
// {
2024-12-30 09:34:23 +08:00
// moduleName: "安全管理",
// modulePath: "/securityManagement",
// menuList: [
// {
// menuName: "安全管理",
// companyPath: "/securityManagement"
// },
// {
// companyPath: "/foundationPitMonitor",
// menuName: "基坑监测"
// },
// {
// menuName: "隧道定位监测",
// companyPath: "/tunnelPosition"
// },
// {
// menuName: "临边防护网",
// companyPath: "/edgeProtection"
// },
// {
// menuName: "有毒气体监测",
// companyPath: "/toxicGasMonitor"
// },
// {
// menuName: "高支模监测",
// companyPath: "/highFormwork"
// },
// {
// menuName: "高边坡监测",
// companyPath: "/highSlope"
// },
// {
// menuName: "烟感监测",
// companyPath: "/smokeSensor"
// },
// {
// menuName: "安全教育",
// companyPath: "/safeEducation"
// },
// {
// menuName: "外墙脚手架",
// companyPath: "/wallScaffold2"
// },
// {
// menuName: "临边防护",
// companyPath: "/newEdgeProtection"
// }
// ]
// },
// {
2024-12-30 09:34:23 +08:00
// moduleName: "质量管理",
// modulePath: "/qualityManagement",
// menuList: [
// {
// menuName: "质量管理",
// companyPath: "/qualityManagement"
// },
// {
// menuName: "混凝土测温",
// companyPath: "/concreteMonitor"
// },
// {
// menuName: "进度计划",
// companyPath: "/schedulePlan"
// }
// ]
// },
// {
2024-12-30 09:34:23 +08:00
// moduleName: "绿色施工",
// modulePath: "/headNoise",
// menuList: [
// {
// menuName: "扬尘噪声",
// companyPath: "/headNoise"
// },
// {
// companyPath: "/electricityMonitor",
// menuName: "用电监测"
// },
// {
// companyPath: "/waterMonitor",
// menuName: "用水监测"
// },
// {
// companyPath: "/sewageMonitor",
// menuName: "污水监测"
// },
// {
// companyPath: "/rainfallMonitoring",
// menuName: "雨量监测"
// }
// ]
// },
// {
2024-12-30 09:34:23 +08:00
// moduleName: "大型机械",
// modulePath: "/towerCraneMonitoring",
// menuList: [
// {
// menuName: "塔吊监测",
// companyPath: "/towerCraneMonitoring"
// },
// {
// menuName: "汽车吊监测",
// companyPath: "/cathangCrane"
// },
// {
// menuName: "履带吊监测",
// companyPath: "/trackCrane"
// },
// {
// menuName: "升降机监测",
// companyPath: "/elevatorMonitoring"
// },
// {
// menuName: "卸料平台",
// companyPath: "/unloadPlatform"
// },
// {
// menuName: "混凝土拌合站",
// companyPath: "/concreteMixingPlant"
// },
// {
// menuName: "龙门吊监测",
// companyPath: "/gantryCrane"
// },
// {
// companyPath: "/erectCrane",
// menuName: "架桥机"
// },
// {
// companyPath: "/hangBasket",
// menuName: "挂篮监测"
// },
// {
// companyPath: "/pressureTestMachine",
// menuName: "压力试验机"
// },
// {
// companyPath: "/universalTestMachine",
// menuName: "万能试验机"
// },
// {
// companyPath: "/compressionIntegrate",
// menuName: "抗压一体机"
// },
// {
// companyPath: "/asphaltMixer",
// menuName: "沥青拌合站"
// },
// {
// companyPath: "/waterStabilizedMixer",
// menuName: "水稳拌合站"
// },
// {
// companyPath: "/intelligentTension",
// menuName: "智能张拉"
// },
// {
// companyPath: "/intelligentGrout",
// menuName: "智能压浆"
// },
// {
// companyPath: "/roadPaving",
// menuName: "路面摊铺"
// },
// {
// companyPath: "/roadCompaction",
// menuName: "路面压实"
// }
// ]
// },
// { moduleName: "BIM模型", modulePath: "/bImModel" }
// ]);
const itemList = ref([]);
const activeTab = ref(0);
const activeTab2 = ref(0);
const router = useRouter();
2024-03-25 20:57:41 +08:00
const getAspectRatioStyle = computed(() => ({
width: `${contentWidth.value}px`,
height: `${contentHeight.value}px`
}));
//获取动态tab
const getAllModelMenu = () => {
let half = store.projectDateAuth.moduleList;
half.forEach((item: any) => {
if (item.moduleType == 4) {
menuList.value.push(item);
return;
}
});
console.log("筛选出的数据看板路由", menuList.value);
};
2024-04-05 17:42:04 +08:00
const navigateTo = (path, type) => {
console.log("点击的路由---", path, type);
if (type == 1) {
activeTab.value = path.modulePath;
2024-12-30 09:34:23 +08:00
activeTab2.value = path.menuList.length ? path.menuList[0].companyPath : path.modulePath;
itemList.value = path.menuList;
2024-12-30 09:34:23 +08:00
router.push({
path: activeTab2.value
});
} else {
activeTab2.value = path.companyPath;
router.push({
path: path.companyPath
});
2023-07-12 09:56:31 +08:00
}
};
2024-07-27 15:45:16 +08:00
// 获取动态菜单
const getModuleMenu = async () => {
2024-12-30 09:34:23 +08:00
const res = await getScreenAuthModuleAndMenuApi();
2024-07-27 15:45:16 +08:00
console.info(res, "allModule");
if (res.code == 200) {
2024-12-30 09:34:23 +08:00
const list = res.result || [];
if (list.length) {
menuList.value = list.map(item => {
let childrenList = item.children?.map(val => {
return {
menuName: val.name,
companyPath: val.routePath
};
});
return {
moduleName: item.name,
modulePath: item.routePath,
menuList: childrenList
};
});
2024-07-27 15:45:16 +08:00
}
}
2024-12-30 09:34:23 +08:00
// const res = await getAllModule({ moduleType: 8, userId: store.userId, projectSn: store.sn });
// console.info(res, "allModule");
// if (res.code == 200) {
// const { moduleList } = res.result;
// if (moduleList.length) {
// menuList.value = moduleList;
// }
// }
2024-07-27 15:45:16 +08:00
};
2023-09-04 14:43:33 +08:00
onMounted(async () => {
if (window.location.href.indexOf("token") != -1) {
console.log("免登录跳转进来了吗----", window.location.href.indexOf("token"));
2024-04-17 20:52:00 +08:00
const newToken = window.location.href.split("token=")[1].split("&")[0];
const data: any = await jumpLargeUserInfoApi({ token: newToken });
console.log("跳转请求的数据----", data.result);
if (data.result.sn) {
2024-04-16 23:17:46 +08:00
store.setSN(data.result.sn);
}
store.setToken(data.result.token);
store.setAccount(data.result.account);
store.setAccountType(data.result.accountType);
store.setProjectDateAuth(data.menuAuthority);
}
2024-07-27 15:45:16 +08:00
if (window.location.href.indexOf("userId") != -1) {
console.log("免登录跳转进来了吗----", window.location.href.indexOf("userId"));
const newUserId = window.location.href.split("userId=")[1].split("&")[0];
2024-09-30 09:12:09 +08:00
const projectSn = window.location.href.split("sn=")[1].split("&")[0];
2024-07-27 15:45:16 +08:00
const data: any = await jumpLargeByUserIdApi({ userId: newUserId });
console.log("跳转请求的数据----", data.result);
if (data.result.sn) {
2024-09-30 09:12:09 +08:00
const accountTypeList = [2, 3, 4, 7];
const sn = accountTypeList.includes(data.result.accountType) ? projectSn : data.result.sn;
store.setSN(sn);
2024-07-27 15:45:16 +08:00
}
store.setToken(data.result.token);
store.setAccount(data.result.account);
store.setAccountType(data.result.accountType);
store.setProjectDateAuth(data.menuAuthority);
}
await getModuleMenu();
2023-12-28 18:15:42 +08:00
if (COMPANY === "jsyc") {
menuList.value = JSYCMenu;
}
if (COMPANY === "xjnb") {
menuList.value = XJNBMenu;
}
if (COMPANY === "ahsa") {
menuList.value = AHSAMenu;
}
2024-03-30 09:02:56 +08:00
if (COMPANY === "hfqc") {
menuList.value = HFQCMenu;
}
2024-04-01 15:03:53 +08:00
if (COMPANY === "as") {
menuList.value = ASMenu;
}
2024-04-05 17:42:04 +08:00
if (COMPANY === "agjt") {
menuList.value = AGJTMenu;
}
2024-04-18 14:21:23 +08:00
if (COMPANY === "slx") {
menuList.value = SLXMenu;
}
2024-04-23 20:20:12 +08:00
if (COMPANY === "zsbf") {
menuList.value = ZSBFMenu;
}
2024-04-24 16:13:44 +08:00
if (COMPANY === "zhzrf") {
menuList.value = ZHZRFMenu;
}
2024-06-05 15:58:24 +08:00
if (COMPANY === "zkax") {
menuList.value = ZKAXMenu;
}
2024-06-17 18:50:14 +08:00
if (COMPANY === "cqna") {
menuList.value = CQNAMenu;
}
2024-06-18 18:28:17 +08:00
if (COMPANY === "zkjc") {
menuList.value = ZKJCMenu;
}
2024-06-27 18:41:42 +08:00
if (COMPANY === "cpgs") {
menuList.value = CPGSMenu;
}
2024-07-10 19:20:01 +08:00
if (COMPANY === "tj") {
menuList.value = TJMenu;
}
2024-08-07 18:33:50 +08:00
if (COMPANY === "scwc") {
menuList.value = SCWCMenu;
}
2024-08-09 16:37:07 +08:00
if (COMPANY === "jzjt") {
menuList.value = JZJTMenu;
}
2024-07-18 16:11:01 +08:00
if (COMPANY === "bthg") {
menuList.value = BTHGMenu;
}
2024-08-20 14:51:14 +08:00
if (COMPANY === "dljb") {
menuList.value = DLJBMenu;
}
2024-09-23 15:15:35 +08:00
if (COMPANY === "whzt") {
menuList.value = WHZTMenu;
}
2024-10-15 15:36:21 +08:00
if (COMPANY === "ztsyj") {
menuList.value = ZTSYJMenu;
}
2024-11-14 14:34:18 +08:00
if (COMPANY === "xnyzhjj") {
menuList.value = XNYZHJJMenu;
}
2024-11-14 14:34:18 +08:00
if (COMPANY === "gwkj") {
menuList.value = GWKJMenu;
}
if(COMPANY === "jxwjj") {
menuList.value = JXWJJMenu;
2024-12-30 09:54:18 +08:00
}
2024-11-15 16:03:04 +08:00
if (COMPANY === "allxm") {
2024-10-31 10:27:38 +08:00
menuList.value = ALLXMMenu;
}
if (COMPANY === "hbla") {
menuList.value = HBLAMenu;
}
if (COMPANY === "qyg") {
menuList.value = QYGMenu;
}
2023-12-28 18:15:42 +08:00
console.log("配置菜单", menuList.value);
console.log("当前跳转的路由", router.currentRoute.value);
2024-12-30 09:34:23 +08:00
adminName.value = store.account;
if (!menuList.value.length) {
// 暂无权限,请联系管理员配置权限
return ElMessage({
message: "暂无权限,请联系管理员配置权限",
type: "warning"
});
}
// await getAllModelMenu();
// activeTab2.value = router.currentRoute.value;
activeTab.value = menuList.value[0].modulePath;
activeTab2.value = menuList.value[0].modulePath;
itemList.value = menuList.value[0].menuList;
2023-09-04 14:43:33 +08:00
//数据看板跳转免登录
2023-12-28 18:15:42 +08:00
navigateTo(menuList.value[0], 1);
2023-07-28 19:43:56 +08:00
// console.log("进入页面, ");
// console.log("store数据", store.account);
// menuClick(menuList.value[0], activeIndex.value);
getNowTime();
2023-07-28 19:43:56 +08:00
document.addEventListener("click", bodyCloseMenus);
2024-12-30 09:34:23 +08:00
nextTick(async () => {
const subMenus = document.querySelectorAll(".menStyle");
const dataBoardContent = document.querySelector(".dataBoardContent");
if (subMenus.length >= 5 && COMPANY !== "hfqc") {
subMenus[4].style.marginLeft = "30%";
}
if (COMPANY === "hfqc") {
subMenus[3].style.marginLeft = "44%";
}
if (COMPANY === "zhzrf") {
// subMenus[4].style.marginLeft = "34%";
}
if (COMPANY === "agjt") {
dataBoardContent.style.height = "85%";
dataBoardContent.style.margin = "30px auto 16px auto";
}
if (COMPANY === "zkjc") {
console.info(subMenus, "==========");
subMenus[1].style.marginLeft = "5%";
subMenus[1].style.marginRight = "auto";
subMenus[2].style.marginRight = "5%";
subMenus[3].style.marginRight = "5%";
}
});
2023-12-28 18:15:42 +08:00
await getProjectInfo();
2024-03-25 20:57:41 +08:00
calculateAspectRatio();
window.addEventListener("resize", calculateAspectRatio);
});
let timer = ref(null as any);
onBeforeUnmount(() => {
clearInterval(timer);
2023-07-28 19:43:56 +08:00
document.removeEventListener("click", bodyCloseMenus);
window.removeEventListener("resize", calculateAspectRatio);
});
2023-07-28 19:43:56 +08:00
function bodyCloseMenus() {
if (showUserBox.value === true) {
showUserBox.value = false;
}
}
function getNowTime() {
let speed = 1000;
let theNowTime = function () {
nowTime.value = timeNumber();
};
timer.value = setInterval(theNowTime, speed);
}
function timeNumber() {
let today = new Date();
let date = today.getFullYear() + "-" + twoDigits(today.getMonth() + 1) + "-" + twoDigits(today.getDate());
let time = twoDigits(today.getHours()) + ":" + twoDigits(today.getMinutes()) + ":" + twoDigits(today.getSeconds());
return date + " " + time;
}
function twoDigits(val: any) {
if (val < 10) return "0" + val;
return val;
}
2023-07-28 19:43:56 +08:00
function loginOut() {
localStorage.removeItem("GlobalState");
location.reload();
router.push("/login");
}
2023-09-04 14:43:33 +08:00
//跳转后台
function jumpBgd() {
2024-09-20 09:06:40 +08:00
const envList = ["agjt", "zkax", "zkjc", "hfqc", "cpgs", "cqna", "jzjt", "tj", "scwc", "bthg", "zmml"]; // 环境标识
// 标准版——跳转演示平台项目后台
2023-12-28 18:15:42 +08:00
if (COMPANY == "") {
2024-12-30 09:34:23 +08:00
// window.location.replace("http://192.168.34.216:8080/#/login?token=" + store.token);
// window.location.replace("http://jxj.zhgdyun.com:100/#/login?token=" + store.token);
window.location.replace(BASEURL + "/#/login?token=" + store.token);
2024-07-10 19:20:01 +08:00
} else if (COMPANY === "tj") {
window.location.replace("http://192.168.110.220:9809/#/login?token=" + store.token);
} else if (COMPANY === "as") {
2024-04-05 18:04:41 +08:00
window.location.replace("http://182.90.224.237:15551/#/login?token=" + store.token);
2024-09-10 17:36:35 +08:00
} else if (COMPANY === "scwc") {
window.location.replace("http://192.168.9.249:9809/#/login?token=" + store.token);
} else if (COMPANY === "jxwjj") {
window.location.replace("http://183.249.224.118:9000/#/login?token=" + store.token); //嘉兴王江泾公用码头
2024-11-14 14:34:18 +08:00
} else if (COMPANY === "xnyzhjj") {
// 内网
// window.location.replace("http://10.30.102.4:9809/#/login?token=" + store.token);
// 外网
window.location.replace("http://117.146.73.156:9809/#/login?token=" + store.token);
2024-11-14 14:34:18 +08:00
} else if (COMPANY === "gwkj") {
2024-11-23 15:46:22 +08:00
window.location.replace("http://10.216.103.99:9809/#/login?token=" + store.token);
2024-11-15 16:03:04 +08:00
} else if (COMPANY === "xnyzhjj") {
window.location.replace("http://121.37.106.37:9809/#/login?token=" + store.token);
} else if (envList.includes(COMPANY)) {
2024-04-09 20:58:48 +08:00
window.location.replace(BASEURL + "/#/login?token=" + store.token);
} else {
2023-12-28 18:15:42 +08:00
// 新项目通用(百色服务器)
2024-04-01 19:00:31 +08:00
window.location.replace("http://101.43.164.214:11111/#/login?token=" + store.token);
// window.location.replace("http://192.168.34.138:8080/#/login?token=" + store.token);
2024-04-02 10:07:31 +08:00
// window.open("http://192.168.34.138:8080/#/login?token=" + store.token);
2023-12-28 18:15:42 +08:00
}
2024-08-09 16:37:07 +08:00
// else if (COMPANY === "jzjt") {
// window.location.replace("http://jxjzw.zhgdyun.com:6089/#/login?token=" + store.token);
// }
2023-09-04 14:43:33 +08:00
}
2023-07-12 09:56:31 +08:00
</script>
2023-07-28 19:43:56 +08:00
<style>
.el-popper__arrow {
background-color: #112d59;
}
</style>
2023-07-12 09:56:31 +08:00
<style lang="scss" scoped>
2024-03-25 20:57:41 +08:00
.container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
2023-07-12 09:56:31 +08:00
.largeScreen {
background: url("@/assets/images/bigImg.gif") no-repeat;
background-size: 100% 100%;
2024-03-25 20:57:41 +08:00
position: relative;
2024-10-15 15:36:21 +08:00
.map-box {
height: 94.5%;
// background: skyblue;
transform: translateY(-8.5%);
position: relative;
z-index: 2;
}
.storeheader {
position: relative;
z-index: 20;
background: url("@/assets/images/backmap.png") no-repeat !important;
}
2023-07-12 09:56:31 +08:00
.header {
2023-09-07 11:27:21 +08:00
width: 100%;
2023-07-12 09:56:31 +08:00
height: 12%;
background: url("@/assets/images/headerImg.webp") no-repeat;
2024-10-15 15:36:21 +08:00
// background: url("@/assets/images/backmap.png") no-repeat;
2023-07-12 09:56:31 +08:00
background-size: 100% 100%;
2024-10-15 15:36:21 +08:00
// position: relative;
// z-index: 6;
2023-12-28 18:15:42 +08:00
// .projectTitle {
// display: flex;
// align-items: center;
// justify-content: center;
// font-size: 44px;
// color: #fff;
// font-family: YouSheBiaoTiHei;
// }
2024-10-15 15:36:21 +08:00
2023-07-12 09:56:31 +08:00
.projectTitle {
2023-12-28 18:15:42 +08:00
display: flex;
justify-content: center;
font-size: 38px;
color: #fff;
font-family: YouSheBiaoTiHei;
}
2023-12-28 18:15:42 +08:00
.projectSmallTitle {
position: absolute;
top: 6%;
width: 100%;
2023-07-12 09:56:31 +08:00
display: flex;
align-items: center;
justify-content: center;
2023-12-28 18:15:42 +08:00
font-size: 20px;
2023-07-12 09:56:31 +08:00
color: #fff;
font-family: YouSheBiaoTiHei;
&.zsbf {
font-size: 28px;
top: 5%;
}
2023-07-12 09:56:31 +08:00
}
2023-07-12 09:56:31 +08:00
.rightIcon {
position: absolute;
display: flex;
width: 30%;
left: 70%;
color: #fff;
top: 1%;
2024-03-25 20:57:41 +08:00
display: flex;
align-items: center;
2023-07-12 09:56:31 +08:00
.time {
2023-09-08 16:53:53 +08:00
font-size: 13px;
2023-07-12 09:56:31 +08:00
font-family: sadigitalNumber;
2024-03-25 20:57:41 +08:00
margin: 0.5% 33% 0 6%;
2023-07-12 09:56:31 +08:00
}
2023-07-12 09:56:31 +08:00
.Icon {
margin-right: 2%;
cursor: pointer;
2023-09-08 09:59:15 +08:00
width: 25px;
margin-top: 1%;
2023-07-12 09:56:31 +08:00
}
}
}
2023-07-12 09:56:31 +08:00
.menuList {
display: flex;
height: 6%;
color: #ccc;
line-height: 55px;
margin: -4% auto 0 2%;
font-family: pmzd;
2024-10-15 15:36:21 +08:00
position: relative;
z-index: 15;
2024-02-21 18:52:31 +08:00
> div {
position: relative;
2023-07-12 09:56:31 +08:00
margin-top: 1%;
height: 60%;
width: 9%;
2023-07-12 09:56:31 +08:00
cursor: pointer;
2024-10-15 15:36:21 +08:00
// &:nth-of-type(2) {
// margin-right: 30%;
// }
2023-07-12 09:56:31 +08:00
}
2023-09-08 09:59:15 +08:00
.subMenu {
width: 100%;
height: 100%;
display: flex;
font-size: 20px;
&.zsbf {
font-size: 24px;
}
2023-09-08 09:59:15 +08:00
span {
width: 90%;
height: 10%;
margin-left: 2%;
line-height: 40px;
text-align: center;
}
}
2023-09-08 09:59:15 +08:00
.subMenuList {
position: absolute;
width: 98%;
height: 4%;
// display: flex;
margin-top: 5%;
2023-09-08 16:53:53 +08:00
font-size: 14px;
font-family: none;
background: url("@/assets/images/subTabImg.gif") no-repeat;
background-size: 100% 35%;
&.zsbf {
font-size: 16px;
}
2024-02-21 18:52:31 +08:00
.scrollItem {
width: 73%;
height: max-content;
margin-top: -2%;
margin-left: 2%;
2024-02-21 18:52:31 +08:00
.subMenuItem {
width: 100%;
display: flex;
2024-02-21 18:52:31 +08:00
.subItem {
width: 100px;
text-align: center;
}
2024-02-21 18:52:31 +08:00
.subItem:not(:last-child) {
margin-right: 0.3%;
}
}
}
// :nth-child(1) {
// margin-left: 2%;
// }
}
2023-07-12 09:56:31 +08:00
}
2023-09-05 14:38:58 +08:00
.contentDate {
color: #fff;
float: right;
margin-right: 2%;
font-size: 14px;
.numColor {
2023-09-05 14:38:58 +08:00
color: #82fbea;
font-family: sadigitalNumber;
font-size: 24px;
font-weight: bold;
2023-09-05 14:38:58 +08:00
}
}
2023-07-12 09:56:31 +08:00
.dataBoardContent {
height: 81%;
2023-07-12 09:56:31 +08:00
// height: calc(100% - 15px - 50px - 60px - 20px);
margin: 75px auto 16px auto;
2023-07-12 09:56:31 +08:00
width: calc(100% - 40px);
// background-color: #01131F;
// opacity: 0.9;
}
}
2023-07-12 09:56:31 +08:00
.active {
display: inline-block;
2023-07-12 09:56:31 +08:00
height: 100%;
width: 90%;
2023-07-12 09:56:31 +08:00
background: url("@/assets/images/dustNoise/menuImg.png") no-repeat;
background-size: 100% 100%;
color: #fff;
}
.active2 {
color: #fff;
font-family: none;
font-size: 16px;
2023-07-12 09:56:31 +08:00
}
2023-07-28 19:43:56 +08:00
.userDialog {
display: flex;
justify-content: center;
align-items: center;
width: 70px;
height: 25px;
text-align: center;
background-color: #112d59;
color: #5d75a0;
2023-09-08 16:53:53 +08:00
font-size: 12px;
2023-07-28 19:43:56 +08:00
cursor: pointer;
}
.userBox {
2024-10-15 15:36:21 +08:00
position: relative;
2023-07-28 19:43:56 +08:00
.userItem {
2024-10-15 15:36:21 +08:00
position: fixed;
2023-09-08 09:59:15 +08:00
width: 110px;
2023-09-04 14:43:33 +08:00
height: 100px;
2024-10-15 15:36:21 +08:00
right: 5%;
top: 5%;
2023-07-28 19:43:56 +08:00
background: #112d59;
border-radius: 0px 0px 0px 0px;
border: 0px solid #405e97;
2024-10-15 15:36:21 +08:00
z-index: 24;
2023-07-28 19:43:56 +08:00
.sanJiao {
position: absolute;
width: 0;
height: 0;
right: 0%;
top: -10%;
border-left: 6px solid transparent;
/* 左边框透明 */
border-right: 6px solid transparent;
/* 右边框透明 */
border-bottom: 6px solid #405e97;
/* 底部边框颜色 */
transform: rotate(0deg);
/* 旋转45度 */
2023-07-28 19:43:56 +08:00
}
2023-07-28 19:43:56 +08:00
.userIcon {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 38px;
border-bottom: 1px solid #405e97;
cursor: pointer;
2023-07-28 19:43:56 +08:00
.icon {
width: 18px;
height: 18px;
2023-07-28 19:43:56 +08:00
img {
width: 100&;
height: 100%;
}
}
2023-07-28 19:43:56 +08:00
.userName {
width: 40px;
2023-09-08 16:53:53 +08:00
font-size: 12px;
2023-07-28 19:43:56 +08:00
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
color: #a9bce6;
2023-09-08 09:59:15 +08:00
white-space: nowrap;
2023-09-08 16:53:53 +08:00
overflow: hidden;
text-overflow: ellipsis;
2023-07-28 19:43:56 +08:00
}
}
.loginOut {
display: flex;
justify-content: space-evenly;
align-items: center;
height: 26px;
2023-09-04 14:43:33 +08:00
padding-left: 5px;
2023-07-28 19:43:56 +08:00
cursor: pointer;
2023-09-04 14:43:33 +08:00
height: 30px;
2023-07-28 19:43:56 +08:00
.loginOutIcon {
width: 12px;
height: 12px;
2023-07-28 19:43:56 +08:00
img {
width: 100&;
height: 100%;
}
}
2023-07-28 19:43:56 +08:00
.userName {
width: 50px;
2023-09-08 16:53:53 +08:00
font-size: 12px;
2023-07-28 19:43:56 +08:00
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
color: #a9bce6;
}
}
}
}
2023-07-28 19:43:56 +08:00
.loginOut:hover {
background-color: #2758c0;
}
2023-09-20 09:37:06 +08:00
.hearderIcon {
left: 1%;
top: 1%;
height: 3%;
width: 8%;
2023-09-20 09:37:06 +08:00
position: absolute;
2023-09-20 09:37:06 +08:00
img {
width: 100%;
height: 100%;
object-fit: contain;
2023-09-20 09:37:06 +08:00
}
2023-09-19 18:47:23 +08:00
}
2023-07-12 09:56:31 +08:00
</style>