2022-08-08 19:02:56 +08:00
|
|
|
|
<template>
|
2022-08-09 11:56:36 +08:00
|
|
|
|
<div class="dataBoardPage">
|
2022-08-08 19:02:56 +08:00
|
|
|
|
<div class="headerBox">
|
|
|
|
|
|
<div class="topTit">
|
|
|
|
|
|
<div class="time">
|
2022-08-09 11:56:36 +08:00
|
|
|
|
<span>{{currentDate}}</span>
|
|
|
|
|
|
<span>{{currentWeek}}</span>
|
|
|
|
|
|
<span>{{currentTime}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="title">
|
|
|
|
|
|
<h1 class="title">{{'金林湾项目监管平台'}}</h1>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<img class="wetherImg" src="../../../assets/images/projectImg/sun.png" alt />
|
|
|
|
|
|
<span>多云 32℃</span>
|
|
|
|
|
|
<img
|
|
|
|
|
|
class="backImg"
|
|
|
|
|
|
@click="toBack()"
|
|
|
|
|
|
src="../../../assets/images/projectImg/back.png"
|
|
|
|
|
|
alt
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
2022-08-08 19:02:56 +08:00
|
|
|
|
</div>
|
2022-08-09 11:56:36 +08:00
|
|
|
|
<div style="height: 40px" class="menuBox">
|
|
|
|
|
|
<ul class="left">
|
|
|
|
|
|
<li
|
|
|
|
|
|
v-for="(item, index) in menuList"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
:class="{
|
2022-08-08 19:02:56 +08:00
|
|
|
|
right: index > (menuList.length - 1) / 2,
|
|
|
|
|
|
active: $route.path == item.modulePath,
|
|
|
|
|
|
}"
|
2022-08-09 11:56:36 +08:00
|
|
|
|
@click="menuClick(item, index)"
|
|
|
|
|
|
>{{ item.moduleName }}</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
2022-08-08 19:02:56 +08:00
|
|
|
|
</div>
|
2022-08-09 11:56:36 +08:00
|
|
|
|
<div class="dataBoardContent">
|
2022-08-08 19:02:56 +08:00
|
|
|
|
<router-view></router-view>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
|
export default {
|
2022-08-09 11:56:36 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
menuList: [],
|
|
|
|
|
|
currentDate: "",
|
|
|
|
|
|
currentTime: "",
|
|
|
|
|
|
currentWeek: ""
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
this.getAllModule();
|
|
|
|
|
|
this.getCurrentTime();
|
|
|
|
|
|
this.getTime();
|
|
|
|
|
|
this.getWeek();
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
getTime() {
|
2022-08-08 19:02:56 +08:00
|
|
|
|
this.currentDate = moment().format("yyyy-MM-DD");
|
|
|
|
|
|
this.currentTime = moment().format("HH:mm:ss");
|
2022-08-09 11:56:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
getCurrentTime() {
|
2022-08-08 19:02:56 +08:00
|
|
|
|
const timer = setInterval(() => {
|
|
|
|
|
|
this.getTime();
|
|
|
|
|
|
}, 500);
|
|
|
|
|
|
// 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
|
|
|
|
|
|
this.$once("hook:beforeDestroy", () => {
|
|
|
|
|
|
clearInterval(timer);
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2022-08-09 11:56:36 +08:00
|
|
|
|
getWeek() {
|
|
|
|
|
|
var dt = new Date();
|
|
|
|
|
|
let weekDay = [
|
|
|
|
|
|
"星期天",
|
|
|
|
|
|
"星期一",
|
|
|
|
|
|
"星期二",
|
|
|
|
|
|
"星期三",
|
|
|
|
|
|
"星期四",
|
|
|
|
|
|
"星期五",
|
|
|
|
|
|
"星期六"
|
|
|
|
|
|
];
|
|
|
|
|
|
this.currentWeek = weekDay[dt.getDay()];
|
|
|
|
|
|
},
|
|
|
|
|
|
getAllModule() {
|
|
|
|
|
|
var half = this.$store.state.userInfo.menuAuthority.moduleList;
|
|
|
|
|
|
console.log(half);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
half.forEach(element => {
|
2022-08-09 11:56:36 +08:00
|
|
|
|
console.log(element.moduleName);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
if (element.moduleType == 4) {
|
2022-08-09 11:56:36 +08:00
|
|
|
|
console.log(element);
|
|
|
|
|
|
this.menuList.push(element);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
toBack() {
|
2022-08-09 11:56:36 +08:00
|
|
|
|
this.$router.push({ path: "/projectIndex" });
|
2022-08-08 19:02:56 +08:00
|
|
|
|
},
|
|
|
|
|
|
menuClick(item, index) {
|
2022-08-09 11:56:36 +08:00
|
|
|
|
console.log("item", item);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
this.menuIndex = index;
|
|
|
|
|
|
|
2022-08-09 11:56:36 +08:00
|
|
|
|
if (
|
|
|
|
|
|
item.modulePath.includes("http://") ||
|
|
|
|
|
|
item.modulePath.includes("https://")
|
|
|
|
|
|
) {
|
|
|
|
|
|
return window.open(item.modulePath);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$router.push(item.modulePath);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-08-09 11:56:36 +08:00
|
|
|
|
if (item.moduleName == "智能安全帽") {
|
2022-08-08 19:02:56 +08:00
|
|
|
|
let NodeRSA = require("node-rsa");
|
|
|
|
|
|
//请求参数
|
|
|
|
|
|
let params = JSON.stringify({
|
|
|
|
|
|
// account: '妇幼保健院',
|
|
|
|
|
|
account: this.$store.state.userInfo.account,
|
2022-08-09 11:56:36 +08:00
|
|
|
|
page_flag: 3
|
2022-08-08 19:02:56 +08:00
|
|
|
|
});
|
|
|
|
|
|
//公钥
|
|
|
|
|
|
const pubKey = `
|
|
|
|
|
|
-----BEGIN PUBLIC KEY-----
|
|
|
|
|
|
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcmP0ug4NTHwW2oeHxheZjmYPDxVGFP770eECdLwRtaH0pPWvsXG6MSO/kCzgjEVEo1K1bvRxkkasQRu02fhI+gsZa8wvVeo3s4zJDA48Oj99JAXsx56/WN1RlNh+tsXcH9oQWy3gbX5cDkheuVZj8gsV7Ez59Ucj4e78zNJrUDwIDAQAB
|
|
|
|
|
|
-----END PUBLIC KEY-----`;
|
|
|
|
|
|
|
|
|
|
|
|
var publicKey = new NodeRSA(pubKey);
|
2022-08-09 11:56:36 +08:00
|
|
|
|
var async_key = publicKey.encrypt(params, "base64");
|
|
|
|
|
|
window.open(
|
|
|
|
|
|
"http://58.210.96.206:91/async_danzhou.html?async_key=" + async_key
|
|
|
|
|
|
);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
// window.location.href = "http://58.210.96.206:91/async_danzhou.html?async_key="+async_key;
|
|
|
|
|
|
} else {
|
2022-08-09 11:56:36 +08:00
|
|
|
|
this.$router.push(item.modulePath);
|
2022-08-08 19:02:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-08-09 11:56:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
2022-08-08 19:02:56 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
2022-08-09 11:56:36 +08:00
|
|
|
|
@import url("./style.less");
|
2022-08-08 19:02:56 +08:00
|
|
|
|
|
|
|
|
|
|
</style>
|