七参数页面调整提交
This commit is contained in:
parent
31f1fe1ecf
commit
b244ea805e
@ -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'
|
||||||
|
|
||||||
|
|
||||||
# 上传
|
# 上传
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
19
src/App.vue
19
src/App.vue
@ -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就会导致地图搜索失效
|
||||||
|
|||||||
@ -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 + ``);
|
||||||
|
// };
|
||||||
|
|||||||
BIN
src/assets/images/dustNoise/jumpIcon.png
Normal file
BIN
src/assets/images/dustNoise/jumpIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 613 B |
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
@ -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) => {
|
||||||
|
|||||||
@ -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%;
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -18,7 +18,12 @@
|
|||||||
</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 = {
|
||||||
@ -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>
|
||||||
|
|||||||
@ -24,12 +24,15 @@
|
|||||||
</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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -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">
|
||||||
@ -101,7 +101,9 @@
|
|||||||
<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>
|
||||||
<!-- 司机信息 -->
|
<!-- 司机信息 -->
|
||||||
@ -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>
|
||||||
@ -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,7 +250,7 @@ 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); //司机信息
|
||||||
@ -267,14 +258,13 @@ 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() {
|
||||||
@ -332,7 +322,7 @@ const getTowerData = async () => {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user