七参数页面调整提交

This commit is contained in:
jxj_yjl 2023-09-04 14:43:33 +08:00
parent 31f1fe1ecf
commit b244ea805e
15 changed files with 621 additions and 489 deletions

View File

@ -3,9 +3,9 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用) # 本地环境接口地址(/api/index.ts文件中使用)
# VITE_API_URL = 'http://121.196.214.246/api' # VITE_API_URL = 'http://121.196.214.246/api'
# VITE_API_URL = 'http://182.90.224.147:100' VITE_API_URL = 'http://182.90.224.147:100'
# VITE_API_URL = 'http://192.168.34.221:12360' # VITE_API_URL = 'http://192.168.34.221:12360'
VITE_API_URL = 'http://192.168.34.221:30002' # VITE_API_URL = 'http://192.168.34.221:30002'
# 上传 # 上传

View File

@ -18,7 +18,7 @@
// console.log('取到的token',token); // console.log('取到的token',token);
let viewer3D; let viewer3D;
let app; let app;
let viewToken = "f8b70c0a02244f89be38229da2302f09"; let viewToken = "29a730ca254548e18d441293f13d5720";
console.log('viewToken',viewToken); console.log('viewToken',viewToken);
let loaderConfig = new BimfaceSDKLoaderConfig(); let loaderConfig = new BimfaceSDKLoaderConfig();
loaderConfig.viewToken = viewToken; loaderConfig.viewToken = viewToken;

View File

@ -5,7 +5,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, computed, nextTick, provide } from "vue"; import { ref, reactive, computed, nextTick, provide, onMounted } from "vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { getBrowserLang } from "@/utils/util"; import { getBrowserLang } from "@/utils/util";
import { ElConfigProvider } from "element-plus"; import { ElConfigProvider } from "element-plus";
@ -37,6 +37,23 @@ const i18nLocale = computed(() => {
// //
const assemblySize = computed(() => globalStore.assemblySize); const assemblySize = computed(() => globalStore.assemblySize);
onMounted(() => {
window.onload = function () {
if (!window.sessionStorage["login"]) {
//
//window.localStorage.removeItem("userInfo");
//window.localStorage.removeItem("token");
globalStore.setToken("");
globalStore.setUserInfo("");
}
};
window.onunload = function () {
window.sessionStorage["login"] = true;
};
window.onbeforeunload = function () {
window.sessionStorage["login"] = true;
};
});
</script> </script>
<style lang="scss"> <style lang="scss">
// scope // scope

View File

@ -40,3 +40,8 @@ export const getAuthMenuListApi = (params?: any) => {
export const logoutApi = () => { export const logoutApi = () => {
return http.post(BASEURL + `/xmgl/systemUser/logout`); return http.post(BASEURL + `/xmgl/systemUser/logout`);
}; };
// * 页面跳转免登录
// export const jumpLoginApi = () => {
// return http.post(BASEURL + ``);
// };

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

View File

@ -37,6 +37,7 @@ const router = createRouter({
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
const globalStore = GlobalStore(); const globalStore = GlobalStore();
console.log("路由拦截 beforeEach:", to); console.log("路由拦截 beforeEach:", to);
console.log("路由拦截 to.path:", to.path);
// 1.NProgress 开始 // 1.NProgress 开始
NProgress.start(); NProgress.start();
@ -49,9 +50,10 @@ router.beforeEach(async (to, from, next) => {
// 3.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由并放行到登陆页 // 3.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由并放行到登陆页
if (to.path === LOGIN_URL) { if (to.path === LOGIN_URL) {
console.log("判断是访问登陆页,有:", from.fullPath); console.log("判断是访问登陆页,有:", from.fullPath);
console.log("判断是访问登陆页globalStore.token有:", globalStore.token);
if (globalStore.token) return next(from.fullPath); if (globalStore.token) return next(from.fullPath);
resetRouter(); // resetRouter();//重置路由
return next(); return next();
} }

View File

@ -12,14 +12,14 @@ export const staticRouter: RouteRecordRaw[] = [
// path: "/", // path: "/",
// redirect: HOME_URL[0] // redirect: HOME_URL[0]
// }, // },
{ // {
path: "/", // path: "/",
name: "login", // name: "login",
component: () => import("@/views/login/index.vue"), // component: () => import("@/views/login/index.vue"),
meta: { // meta: {
title: "登录" // title: "登录"
} // }
}, // },
{ {
path: "/login", path: "/login",
name: "login", name: "login",

View File

@ -45,7 +45,7 @@ import { ref, reactive, onMounted, onBeforeUnmount } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { Login } from "@/api/interface"; import { Login } from "@/api/interface";
import { ElMessage, ElNotification } from "element-plus"; import { ElMessage, ElNotification } from "element-plus";
import { loginApi } from "@/api/modules/login"; import { loginApi, jumpLoginApi } from "@/api/modules/login";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { TabsStore } from "@/stores/modules/tabs"; import { TabsStore } from "@/stores/modules/tabs";
import { KeepAliveStore } from "@/stores/modules/keepAlive"; import { KeepAliveStore } from "@/stores/modules/keepAlive";
@ -118,8 +118,8 @@ const resetForm = (formEl: FormInstance | undefined) => {
formEl.resetFields(); formEl.resetFields();
}; };
onMounted(() => { onMounted(async () => {
// console.log(import.meta.env.VITE_API_URL);
// enter // enter
document.onkeydown = (e: any) => { document.onkeydown = (e: any) => {

View File

@ -2,12 +2,16 @@
<div class="bottomRightBox"> <div class="bottomRightBox">
<div class="title"><i>设备监控台</i></div> <div class="title"><i>设备监控台</i></div>
<div class="content"> <div class="content">
<div class="equipmentMonitoring" v-for="item in deviceData.list" :key="item.id"> <div class="equipmentMonitoring" v-for="item in deviceData" :key="item.id" v-if="deviceData.length > 0">
<div class="equipmentList" :class="item.isClosed == 1 ? 'offline' : 'online'"> <div class="equipmentList" :class="item.isClosed == 1 ? 'offline' : 'online'">
<p>{{ item.isClosed == 1 ? "离线" : "在线" }}</p> <p>{{ item.isClosed == 1 ? "离线" : "在线" }}</p>
<p class="bottomText">{{ item.devName }}</p> <p class="bottomText">{{ item.devName }}</p>
</div> </div>
</div> </div>
<div class="notoDta" v-else>
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -28,7 +32,9 @@ const getDevStatisticsList = async () => {
projectSn: store.sn projectSn: store.sn
}); });
if (res.result) { if (res.result) {
deviceData.value = res.result; deviceData.value = res.result.list;
} else {
deviceData.value = [];
} }
console.log("配电箱实时数据", res); console.log("配电箱实时数据", res);
}; };
@ -83,6 +89,22 @@ onMounted(() => {
} }
} }
} }
.notoDta {
width: 20%;
height: 20%;
margin-left: 40%;
margin-top: 8%;
img {
width: 38%;
margin: 6% 36%;
}
p {
width: 100%;
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -5% 38%;
}
}
.online { .online {
background: url("@/assets/images/distributionMonitoring/sbjkOpen.webp") no-repeat; background: url("@/assets/images/distributionMonitoring/sbjkOpen.webp") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="topCenterBox" v-if="realTimeData"> <div class="topCenterBox">
<div class="title"><i>配电箱实时数据</i></div> <div class="title"><i>配电箱实时数据</i></div>
<div class="content"> <div class="content">
@ -101,9 +101,17 @@ const getDevOption = async () => {
console.log("电相option", noiseList.value); console.log("电相option", noiseList.value);
} }
}; };
// let devSn = ref("" as any); // let devSn = ref("" as any);
let realTimeData = ref(null as any); let realTimeData = ref({
ambientTemperature: 0,
voltageA: 0,
cableTemperatureA: 0,
phaseCurrentA: 0,
electricLeakage: 0,
phaseCurrentB: 0,
cableTemperatureB: 0,
voltageB: 0
} as any);
const getRealTimeList = async () => { const getRealTimeList = async () => {
const res: any = await getRealTimeDataApi({ const res: any = await getRealTimeDataApi({
projectSn: store.sn, projectSn: store.sn,

View File

@ -17,8 +17,13 @@
</div> </div>
</div> </div>
<div class="decivList"> <div class="decivList">
<el-scrollbar style="height:90%"> <el-scrollbar style="height: 90%">
<div class="menuDev" v-for="item in deviceData.list" :key="item.id" :class="item.isClosed != 0 ? 'online' : 'offline'"> <div
class="menuDev"
v-for="item in deviceData.list"
:key="item.id"
:class="item.isClosed != 0 ? 'online' : 'offline'"
>
<div class="decName"> <div class="decName">
<span v-if="item.isClosed === 1"><img src="@/assets/images/dustNoise/offImg.png" alt="" /></span> <span v-if="item.isClosed === 1"><img src="@/assets/images/dustNoise/offImg.png" alt="" /></span>
<span v-else><img src="@/assets/images/dustNoise/onlineImg.png" alt="" /></span> <span v-else><img src="@/assets/images/dustNoise/onlineImg.png" alt="" /></span>
@ -26,9 +31,11 @@
</div> </div>
<div class="status">{{ item.isClosed === 1 ? "离线" : "在线" }}</div> <div class="status">{{ item.isClosed === 1 ? "离线" : "在线" }}</div>
</div> </div>
<!-- <div class="notoDta" v-else>
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div> -->
</el-scrollbar> </el-scrollbar>
</div> </div>
</div> </div>
</div> </div>
@ -45,7 +52,6 @@ const store = GlobalStore();
const analysisData = ref(0 as any); const analysisData = ref(0 as any);
const posCenter = reactive(["50%", "64%"]); const posCenter = reactive(["50%", "64%"]);
function drawChart() { function drawChart() {
let leftTopEcharts = echarts.init(document.getElementById("topLeftEcharts")); let leftTopEcharts = echarts.init(document.getElementById("topLeftEcharts"));
let option = { let option = {
@ -317,7 +323,7 @@ function drawChart() {
width: 26, width: 26,
color: [ color: [
[ [
analysisData.value/100, analysisData.value / 100,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [ new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ {
offset: 0.5, offset: 0.5,
@ -427,7 +433,7 @@ function drawChart() {
] ]
} }
] ]
}; };
leftTopEcharts.setOption(option); leftTopEcharts.setOption(option);
} }
// //
@ -442,7 +448,7 @@ const getDevStatisticsList = async () => {
analysisData.value = res.result.grade; analysisData.value = res.result.grade;
drawChart(); drawChart();
} }
console.log("配电箱实时数据", res); console.log("配电箱实时数据123", res);
}; };
onMounted(() => { onMounted(() => {
@ -527,6 +533,22 @@ onMounted(() => {
margin-left: 60%; margin-left: 60%;
} }
} }
.notoDta {
width: 20%;
height: 20%;
margin-left: 40%;
margin-top: 8%;
img {
width: 38%;
margin: 6% 36%;
}
p {
width: 100%;
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -5% 38%;
}
}
} }
.online { .online {
.status { .status {
@ -540,6 +562,5 @@ onMounted(() => {
} }
} }
} }
} }
</style> </style>

View File

@ -22,14 +22,17 @@
<div class="tabTwo">报警时间</div> <div class="tabTwo">报警时间</div>
<div class="tabThree">报警类型</div> <div class="tabThree">报警类型</div>
</div> </div>
<el-scrollbar style="height:85%"> <el-scrollbar style="height: 85%">
<div class="listBox"> <div class="listBox">
<div v-for="item in boxAlarmData.list" class="listStyle" :key="item.id"> <div v-for="item in boxAlarmData.list" class="listStyle" :key="item.id" v-if="boxAlarmData.list.length > 0">
<div class="dev" style="margin-left: 5%">{{ item.devName }}</div> <div class="dev" style="margin-left: 5%">{{ item.devName }}</div>
<div class="time">{{ item.creatTime }}</div> <div class="time">{{ item.creatTime }}</div>
<div class="type" style="margin-right: 5%">{{ item.alarmType }}</div> <div class="type" style="margin-right: 5%">{{ item.alarmType }}</div>
</div> </div>
<div class="notoDta" v-else>
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -176,6 +179,19 @@ onMounted(async () => {
background: #091f3f; background: #091f3f;
} }
} }
.notoDta {
margin-left: 10%;
margin-top: 8%;
img {
width: 16%;
margin: 6% 36%;
}
p {
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -5% 38%;
}
}
} }
} }
} }

View File

@ -39,6 +39,10 @@
<div class="icon"><img src="@/assets/images/dustNoise/userIcon.png" /></div> <div class="icon"><img src="@/assets/images/dustNoise/userIcon.png" /></div>
<div class="userName">{{ adminName }}</div> <div class="userName">{{ adminName }}</div>
</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="loginOut" @click="loginOut">
<div class="loginOutIcon"><img src="@/assets/images/dustNoise/loginOut.png" /></div> <div class="loginOutIcon"><img src="@/assets/images/dustNoise/loginOut.png" /></div>
<div class="userName">退出登录</div> <div class="userName">退出登录</div>
@ -48,11 +52,11 @@
</div> </div>
<div class="menuList"> <div class="menuList">
<div <div
v-for="(item, index) in menuData.menuList" v-for="(item, index) in menuList"
:key="index" :key="index"
:class="{ :class="{
right: index > (menuData.menuList.length - 1) / 2, right: index > (menuList.length - 1) / 2,
active: menuData.activeIndex == index ? 'active' : '' active: activeIndex == index ? 'active' : ''
}" }"
@click="menuClick(item, index)" @click="menuClick(item, index)"
> >
@ -73,8 +77,7 @@ const store = GlobalStore();
let nowTime = ref("2023-04-16 09:22:12" as any); let nowTime = ref("2023-04-16 09:22:12" as any);
let showUserBox = ref(false as any); let showUserBox = ref(false as any);
let adminName = ref("" as any); let adminName = ref("" as any);
let menuData = reactive({ let menuList = ref([
menuList: [
{ moduleName: "扬尘噪声", modulePath: "/headNoise" }, { moduleName: "扬尘噪声", modulePath: "/headNoise" },
{ moduleName: "劳务管理", modulePath: "/laborManagement" }, { moduleName: "劳务管理", modulePath: "/laborManagement" },
{ moduleName: "视频管理", modulePath: "/videoManagement" }, { moduleName: "视频管理", modulePath: "/videoManagement" },
@ -83,23 +86,48 @@ let menuData = reactive({
{ moduleName: "塔吊监测", modulePath: "/towerCraneMonitoring" }, { moduleName: "塔吊监测", modulePath: "/towerCraneMonitoring" },
{ moduleName: "升降机监测", modulePath: "/elevatorMonitoring" }, { moduleName: "升降机监测", modulePath: "/elevatorMonitoring" },
{ moduleName: "BIM模型", modulePath: "/bImModel" } { moduleName: "BIM模型", modulePath: "/bImModel" }
], ]);
activeIndex: 0 const activeIndex=ref(0)
});
const router = useRouter(); const router = useRouter();
const menuClick = (item, index) => { const menuClick = (item, index) => {
menuData.activeIndex = index; activeIndex.value = index;
console.log("点击了tab", item); console.log("点击了tab", item);
if (item.modulePath.includes("/")) { if (item.modulePath.includes("/")) {
router.push(item.modulePath); router.push(item.modulePath);
} }
}; };
onMounted(() => { const moduleListData = ref([] as any);//
onMounted(async () => {
//
if (window.location.href.indexOf("token") != -1) {
const token = window.location.href.split("token=")[1];
const res = await fetch(import.meta.env.VITE_API_URL + "/xmgl/base/getLoginInfoByToken", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ token: token })
});
const data = await res.json();
console.log("调用免登录接口返回的数据", data);
// let arr = data.result.menuAuthority.moduleList;
// arr.forEach((item: any) => {
// if (item.moduleType == 4) {
// moduleListData.value.push(item);
// return;
// }
// });
// console.log("", moduleListData.value);
store.setSN(data.result.sn);
store.setToken(data.result.token);
store.setAccount(data.result.account);
store.setAccountType(data.result.accountType);
}
// console.log(" "); // console.log(" ");
adminName.value = store.account; adminName.value = store.account;
// console.log("store", store.account); // console.log("store", store.account);
menuClick(menuData.menuList[0], menuData.activeIndex); menuClick(menuList.value[0], activeIndex.value);
getNowTime(); getNowTime();
document.addEventListener("click", bodyCloseMenus); document.addEventListener("click", bodyCloseMenus);
}); });
@ -139,6 +167,10 @@ function loginOut() {
location.reload(); location.reload();
router.push("/login"); router.push("/login");
} }
//
function jumpBgd() {
window.location.replace("http://192.168.34.226:8081/#/projectIndex");
}
</script> </script>
<style> <style>
@ -240,7 +272,7 @@ function loginOut() {
.userItem { .userItem {
position: absolute; position: absolute;
width: 100px; width: 100px;
height: 64px; height: 100px;
right: 3%; right: 3%;
top: 4%; top: 4%;
background: #112d59; background: #112d59;
@ -285,8 +317,9 @@ function loginOut() {
justify-content: space-evenly; justify-content: space-evenly;
align-items: center; align-items: center;
height: 26px; height: 26px;
padding-left: 8px; padding-left: 5px;
cursor: pointer; cursor: pointer;
height: 30px;
.loginOutIcon { .loginOutIcon {
width: 12px; width: 12px;
height: 12px; height: 12px;

View File

@ -259,7 +259,6 @@ function _pie3() {
let dataName = ref([] as any); let dataName = ref([] as any);
let towerAlarmData = ref(null as any); let towerAlarmData = ref(null as any);
const getTowerNumAndAlarmList = async (type: any) => { const getTowerNumAndAlarmList = async (type: any) => {
if (type == 1) { if (type == 1) {
// //
var currentDate = new Date(); var currentDate = new Date();

View File

@ -17,7 +17,7 @@
/> />
</el-select> </el-select>
</div> </div>
<div class="contentSmall" v-if="towerDetailData"> <div class="contentSmall" v-if="towerDetailData != null">
<div class="top"> <div class="top">
<div class="leftTowerImg"> <div class="leftTowerImg">
<div class="titleData"> <div class="titleData">
@ -96,16 +96,18 @@
</div> </div>
<div class="rightInfo"> <div class="rightInfo">
<div class="titleStatus"> <div class="titleStatus">
<span style="color:#fff;cursor: pointer" v-if="isShow==false" @click="infoBtn">司机信息</span> <span style="color: #fff; cursor: pointer" v-if="isShow == false" @click="infoBtn">司机信息</span>
<span style="color:#ccc;cursor: pointer" v-else @click="infoBtn">司机信息</span> <span style="color: #ccc; cursor: pointer" v-else @click="infoBtn">司机信息</span>
<span <span
><img style="margin-left: 4%; width: 6%" src="@/assets/images/towerCraneMonitoring/setUp.png" alt="" /> ><img style="margin-left: 4%; width: 6%" src="@/assets/images/towerCraneMonitoring/setUp.png" alt="" />
</span> </span>
<span v-if="isShow==true" style="margin-left: 6%; color: #fff; cursor: pointer" @click="deviceInf">设备信息</span> <span v-if="isShow == true" style="margin-left: 6%; color: #fff; cursor: pointer" @click="deviceInf"
>设备信息</span
>
<span v-else style="margin-left: 6%; color: #ccc; cursor: pointer" @click="deviceInf">设备信息</span> <span v-else style="margin-left: 6%; color: #ccc; cursor: pointer" @click="deviceInf">设备信息</span>
</div> </div>
<!-- 司机信息 --> <!-- 司机信息 -->
<div class="infoBox" v-show="isShowTime==true"> <div class="infoBox" v-show="isShowTime == true">
<div><span class="textColor"> 姓名</span>{{ driverInfo.workerName || "未知" }}</div> <div><span class="textColor"> 姓名</span>{{ driverInfo.workerName || "未知" }}</div>
<div> <div>
<span class="textColor"> 性别</span>{{ driverInfo.sex == 1 ? "男" : driverInfo.sex == 2 ? "女" : "未知" }} <span class="textColor"> 性别</span>{{ driverInfo.sex == 1 ? "男" : driverInfo.sex == 2 ? "女" : "未知" }}
@ -113,18 +115,12 @@
<div><span class="textColor"> 年龄</span>{{ driverInfo.age || "未知" }}</div> <div><span class="textColor"> 年龄</span>{{ driverInfo.age || "未知" }}</div>
<div><span class="textColor"> 本次连续工作时长</span>{{ driverInfo.continuousWorkingTimeName || 0 }}</div> <div><span class="textColor"> 本次连续工作时长</span>{{ driverInfo.continuousWorkingTimeName || 0 }}</div>
<div style="width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"> <div style="width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
<span <span class="textColor" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
class="textColor"
style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"
>
身份证号:</span 身份证号:</span
>{{ driverInfo.idCard || "未知" }} >{{ driverInfo.idCard || "未知" }}
</div> </div>
<div style="width: 96%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"> <div style="width: 96%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
<span <span class="textColor" style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
class="textColor"
style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"
>
特种资格证书编号:</span 特种资格证书编号:</span
>{{ driverInfo.specialCertificateNumber || "未知" }} >{{ driverInfo.specialCertificateNumber || "未知" }}
</div> </div>
@ -135,7 +131,7 @@
</div> </div>
<div class="driverPhoto"><img :src="BASEURL + '/image/' + driverInfo.imageUrl" alt="" /></div> <div class="driverPhoto"><img :src="BASEURL + '/image/' + driverInfo.imageUrl" alt="" /></div>
<!-- 设备信息 --> <!-- 设备信息 -->
<div class="infoBox" v-show="isShow==true"> <div class="infoBox" v-show="isShow == true">
<div style="width: 98%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"> <div style="width: 98%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
<span class="textColor" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap"> <span class="textColor" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
出厂日期</span 出厂日期</span
@ -147,26 +143,17 @@
<div><span class="textColor"> 规格型号</span>{{ towerDetailData.devModel || "未知" }}</div> <div><span class="textColor"> 规格型号</span>{{ towerDetailData.devModel || "未知" }}</div>
<div><span class="textColor"> 产权单位</span>{{ towerDetailData.propertyUnit || "未知" }}</div> <div><span class="textColor"> 产权单位</span>{{ towerDetailData.propertyUnit || "未知" }}</div>
<div> <div>
<span <span class="textColor" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
class="textColor"
style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; "
>
安装单位</span 安装单位</span
>{{ towerDetailData.installationUnit || "未知" }} >{{ towerDetailData.installationUnit || "未知" }}
</div> </div>
<div> <div>
<span <span class="textColor" style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
class="textColor"
style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
>
制造厂家</span 制造厂家</span
>{{ towerDetailData.factoryName || "未知" }} >{{ towerDetailData.factoryName || "未知" }}
</div> </div>
<div> <div>
<span <span class="textColor" style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
class="textColor"
style="width: 10%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap"
>
拆除单位</span 拆除单位</span
>{{ towerDetailData.demolitionUnit || "未知" }} >{{ towerDetailData.demolitionUnit || "未知" }}
</div> </div>
@ -193,22 +180,22 @@
</div> </div>
<div class="bottomList"> <div class="bottomList">
<p>高度限位</p> <p>高度限位</p>
<p class="number">{{ list.heightAlarm==0?'正常':list.heightAlarm==1?'报警':'预警'}}</p> <p class="number">{{ list.heightAlarm == 0 ? "正常" : list.heightAlarm == 1 ? "报警" : "预警" }}</p>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<div class="bottomList"> <div class="bottomList">
<p>幅度限位</p> <p>幅度限位</p>
<p class="number">{{ list.minRangeAlarm ==0?'正常':list.minRangeAlarm==1?'报警':'预警'}}</p> <p class="number">{{ list.minRangeAlarm == 0 ? "正常" : list.minRangeAlarm == 1 ? "报警" : "预警" }}</p>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<div class="bottomList"> <div class="bottomList">
<p>回转限位</p> <p>回转限位</p>
<p class="number">{{ list.posAngleAlarm==0?'正常':list.posAngleAlarm0==1?'报警':'预警'}}</p> <p class="number">{{ list.posAngleAlarm == 0 ? "正常" : list.posAngleAlarm0 == 1 ? "报警" : "预警" }}</p>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<div class="bottomList"> <div class="bottomList">
<p>多机防撞</p> <p>多机防撞</p>
<p class="number">{{ list.multiAlarmAll ==0?'正常':list.multiAlarmAll==1?'报警':'预警' }}</p> <p class="number">{{ list.multiAlarmAll == 0 ? "正常" : list.multiAlarmAll == 1 ? "报警" : "预警" }}</p>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<!-- <div class="bottomList"> <!-- <div class="bottomList">
@ -218,12 +205,12 @@
</div> --> </div> -->
<div class="bottomList"> <div class="bottomList">
<p>禁入区</p> <p>禁入区</p>
<p class="number">{{ list.forbidEntryAlarm==0?'正常':list.forbidEntryAlarm==1?'报警':'预警' }}</p> <p class="number">{{ list.forbidEntryAlarm == 0 ? "正常" : list.forbidEntryAlarm == 1 ? "报警" : "预警" }}</p>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<div class="bottomList"> <div class="bottomList">
<p>传感器故障</p> <p>传感器故障</p>
<p class="number">{{ list.weightError==0?'无故障':'有故障' }}</p> <p class="number">{{ list.weightError == 0 ? "无故障" : "有故障" }}</p>
<div class="bg"></div> <div class="bg"></div>
</div> </div>
<div class="bottomList"> <div class="bottomList">
@ -238,6 +225,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="notoDta" v-else>
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -259,22 +250,21 @@ import {
} from "@/api/modules/tower"; } from "@/api/modules/tower";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
const store = GlobalStore(); const store = GlobalStore();
let towerValue = ref("" as any); let towerValue = ref("暂无数据" as any);
let dataShow = ref(false); let dataShow = ref(false);
let noiseList = ref([]); let noiseList = ref([]);
let isShowTime = ref(true); // let isShowTime = ref(true); //
let isShow = ref(false); // let isShow = ref(false); //
// //
const infoBtn=()=>{ const infoBtn = () => {
isShowTime.value=true isShowTime.value = true;
isShow.value=false isShow.value = false;
} };
// //
const deviceInf = () => { const deviceInf = () => {
isShow.value=true isShow.value = true;
isShowTime.value=false isShowTime.value = false;
}; };
// //
function moveAnimation() { function moveAnimation() {
@ -329,10 +319,10 @@ const getTowerData = async () => {
const res = await getNewestTowerApi({ const res = await getNewestTowerApi({
devSn: towerDevSn.value devSn: towerDevSn.value
}); });
if (res.result !=null) { if (res.result != null) {
towerDetail.value = res.result; towerDetail.value = res.result;
}else{ } else {
towerDetail.value=[] towerDetail.value = [];
} }
console.log("获取塔吊实时数据", res); console.log("获取塔吊实时数据", res);
}; };
@ -343,6 +333,8 @@ const getTowerNumAndAlarmList = async () => {
projectSn: store.sn projectSn: store.sn
}); });
if (res.result) { if (res.result) {
console.log("获取塔吊列表", res);
if (res.result.deviceList.length > 0) {
towerValue.value = res.result.deviceList[0].id; towerValue.value = res.result.deviceList[0].id;
towerDevSn.value = res.result.deviceList[0].devSn; towerDevSn.value = res.result.deviceList[0].devSn;
noiseList.value = res.result.deviceList; noiseList.value = res.result.deviceList;
@ -354,6 +346,7 @@ const getTowerNumAndAlarmList = async () => {
await getDriverInfoList(); await getDriverInfoList();
await getNewestData(); await getNewestData();
} }
}
}; };
// //
@ -653,7 +646,7 @@ onMounted(async () => {
} }
} }
.driverPhoto { .driverPhoto {
top: 64%; top: 59%;
position: absolute; position: absolute;
left: 94%; left: 94%;
img { img {
@ -694,6 +687,22 @@ onMounted(async () => {
} }
} }
} }
.notoDta {
width: 20%;
height: 20%;
margin-top: 20%;
margin-left: 40%;
img {
width: 30%;
margin: 6% 36%;
}
p {
width: 100%;
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -5% 41%;
}
}
::v-deep .el-input__wrapper { ::v-deep .el-input__wrapper {
background: #112d59; background: #112d59;
} }