Merge branch 'shenzhen-dev' into cjw-dev
This commit is contained in:
commit
2cc24bda61
@ -452,6 +452,10 @@ function drawChart() {
|
||||
]
|
||||
};
|
||||
leftTopEcharts.setOption(option);
|
||||
// window.addEventListener("resize", () => {
|
||||
// console.log(666)
|
||||
// leftTopEcharts.resize();
|
||||
// })
|
||||
// window.onresize = function () {
|
||||
// myEchart.resize();
|
||||
// }
|
||||
|
||||
@ -290,6 +290,10 @@ function drawEchart() {
|
||||
]
|
||||
};
|
||||
echartsTest.setOption(option, true);
|
||||
// window.addEventListener("resize", () => {
|
||||
// console.log(666)
|
||||
// echartsTest.resize();
|
||||
// })
|
||||
}
|
||||
//获取质量管理
|
||||
// const safeData = ref(null as any);
|
||||
|
||||
@ -13,7 +13,7 @@ import { GlobalStore } from "@/stores";
|
||||
const store = GlobalStore();
|
||||
import { getProjectInspectRecordCountApi } from "@/api/modules/projectOverview";
|
||||
import * as echarts from "echarts";
|
||||
|
||||
const echartsTest = ref();
|
||||
let questionTotal = ref(0 as any);
|
||||
|
||||
let dataList = ref([
|
||||
@ -74,7 +74,7 @@ function Pie() {
|
||||
}
|
||||
|
||||
function drawEchart() {
|
||||
let echartsTest = echarts.init(document.getElementById("echartsSafe"));
|
||||
echartsTest.value = echarts.init(document.getElementById("echartsSafe"));
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: "item"
|
||||
@ -281,12 +281,53 @@ function drawEchart() {
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
|
||||
data: Pie()
|
||||
}
|
||||
]
|
||||
};
|
||||
echartsTest.setOption(option, true);
|
||||
// let option = {
|
||||
// tooltip: {
|
||||
// trigger: 'item'
|
||||
// },
|
||||
// legend: {
|
||||
// top: '5%',
|
||||
// left: 'center'
|
||||
// },
|
||||
// series: [
|
||||
// {
|
||||
// name: 'Access From',
|
||||
// type: 'pie',
|
||||
// radius: ['40%', '70%'],
|
||||
// avoidLabelOverlap: false,
|
||||
// label: {
|
||||
// show: false,
|
||||
// position: 'center'
|
||||
// },
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: 40,
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
// labelLine: {
|
||||
// show: false
|
||||
// },
|
||||
// data: [
|
||||
// { value: 1048, name: 'Search Engine' },
|
||||
// { value: 735, name: 'Direct' },
|
||||
// { value: 580, name: 'Email' },
|
||||
// { value: 484, name: 'Union Ads' },
|
||||
// { value: 300, name: 'Video Ads' }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// };
|
||||
echartsTest.value.setOption(option, true);
|
||||
window.addEventListener("resize", () => {
|
||||
console.log(echartsTest)
|
||||
echartsTest.value.resize();
|
||||
})
|
||||
}
|
||||
|
||||
//获取安全管理
|
||||
@ -301,8 +342,13 @@ const getSafeInfo = async () => {
|
||||
drawEchart();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getSafeInfo();
|
||||
onMounted(async () => {
|
||||
await getSafeInfo();
|
||||
// window.onresize = function(){
|
||||
// if(echartsTest.value){
|
||||
// echartsTest.value.resize();
|
||||
// }
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ onBeforeUnmount(() => {
|
||||
oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
|
||||
// 断开与插件服务连接
|
||||
oWebControl.JS_Disconnect();
|
||||
|
||||
})
|
||||
const initPlugin = () => {
|
||||
oWebControl = new WebControl({
|
||||
szPluginContainer: "playWnd", // 指定容器id
|
||||
|
||||
@ -1,21 +1,22 @@
|
||||
<template>
|
||||
<ScaleBox :width="1920" :height="1080" bgc="transparent" :delay="100" :isFlat="false" @scaleChange="scaleChange">
|
||||
<div class="largeScreen" ref="dataScreenRef">
|
||||
<div class="header">
|
||||
<!-- <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>
|
||||
<!-- <div class="container"> -->
|
||||
<div class="largeScreen" ref="dataScreenRef" style="width: 100%;height: 100%;">
|
||||
<div class="header">
|
||||
<!-- <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">
|
||||
<p>{{ projectTimeInfo.name || "" }}</p>
|
||||
</span>
|
||||
<div class="rightIcon" @click.stop>
|
||||
<div class="time">{{ nowTime }}</div>
|
||||
<!-- <div class="Icon">
|
||||
<span class="projectSmallTitle">
|
||||
<p>{{ projectTimeInfo.name || "" }}</p>
|
||||
</span>
|
||||
<div class="rightIcon" @click.stop>
|
||||
<div class="time">{{ nowTime }}</div>
|
||||
<!-- <div class="Icon">
|
||||
<img src="@/assets/images/dustNoise/jobIcon.png" alt="" />
|
||||
</div>
|
||||
<div class="Icon">
|
||||
@ -27,72 +28,73 @@
|
||||
<div class="Icon">
|
||||
<img src="@/assets/images/dustNoise/dpIcon.png" alt="" />
|
||||
</div> -->
|
||||
<div class="Icon">
|
||||
<img src="@/assets/images/dustNoise/tbsjIcon.png" alt="" />
|
||||
</div>
|
||||
<div class="Icon" @click="showUserBox = !showUserBox">
|
||||
<img src="@/assets/images/dustNoise/ryIcon.png" alt="" />
|
||||
</div>
|
||||
<div class="Icon">
|
||||
<img src="@/assets/images/dustNoise/tbsjIcon.png" alt="" />
|
||||
</div>
|
||||
<div class="Icon" @click="showUserBox = !showUserBox">
|
||||
<img src="@/assets/images/dustNoise/ryIcon.png" alt="" />
|
||||
</div>
|
||||
|
||||
<!-- <el-dropdown trigger="click">
|
||||
<!-- <el-dropdown trigger="click">
|
||||
|
||||
<template #dropdown>
|
||||
<div class="userDialog" @click="loginOut">退出登录</div>
|
||||
</template>
|
||||
</el-dropdown> -->
|
||||
</div>
|
||||
<div class="userBox" v-show="showUserBox">
|
||||
<div class="userItem">
|
||||
<div class="sanJiao"></div>
|
||||
<div class="userIcon">
|
||||
<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>
|
||||
</div>
|
||||
<div class="userBox" v-show="showUserBox">
|
||||
<div class="userItem">
|
||||
<div class="sanJiao"></div>
|
||||
<div class="userIcon">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menuList">
|
||||
<div v-for="(item, index) in menuList" :key="index" class="menStyle">
|
||||
<div class="subMenu" :index="item.modulePath" :class="{ active: activeTab === item.modulePath }">
|
||||
<span @click="navigateTo(item, 1)">{{ item.moduleName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subMenuList" v-if="itemList != null && itemList.length >= 1">
|
||||
<el-scrollbar class="scrollItem">
|
||||
<div class="subMenuItem">
|
||||
<div class="subItem" v-for="(data, i) in itemList" :key="i" :index="data.companyPath" @click="navigateTo(data, 2)">
|
||||
<span style="white-space: nowrap" :class="{ active2: activeTab2 === data.companyPath }">{{ data.menuName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentDate" v-if="itemList != null && itemList.length >= 1">
|
||||
<span
|
||||
>自{{ projectTimeInfo.contractPeriodStartTime }}起开始计算,至今日{{ nowDate }}为<span class="numColor">{{
|
||||
projectPassDay
|
||||
}}</span
|
||||
>个日历天</span
|
||||
>
|
||||
</div>
|
||||
<div class="dataBoardContent">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menuList">
|
||||
<div v-for="(item, index) in menuList" :key="index" class="menStyle">
|
||||
<div class="subMenu" :index="item.modulePath" :class="{ active: activeTab === item.modulePath }">
|
||||
<span @click="navigateTo(item, 1)">{{ item.moduleName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subMenuList" v-if="itemList != null && itemList.length >= 1">
|
||||
<el-scrollbar class="scrollItem">
|
||||
<div class="subMenuItem">
|
||||
<div class="subItem" v-for="(data, i) in itemList" :key="i" :index="data.companyPath" @click="navigateTo(data, 2)">
|
||||
<span style="white-space: nowrap" :class="{ active2: activeTab2 === data.companyPath }">{{ data.menuName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentDate" v-if="itemList != null && itemList.length >= 1">
|
||||
<span
|
||||
>自{{ projectTimeInfo.contractPeriodStartTime }}起开始计算,至今日{{ nowDate }}为<span class="numColor">{{
|
||||
projectPassDay
|
||||
}}</span
|
||||
>个日历天</span
|
||||
>
|
||||
</div>
|
||||
<div class="dataBoardContent">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</ScaleBox>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import ScaleBox from "vue3-scale-box";
|
||||
import { ref, reactive, onMounted, onBeforeUnmount } from "vue";
|
||||
import { ref, reactive, onMounted, onBeforeUnmount, computed } from "vue";
|
||||
import { getTaskTimeDetail } from "@/api/modules/schedulePlan";
|
||||
import { jumpLargeUserInfoApi } from "@/api/modules/login";
|
||||
import { JSYCMenu, XJNBMenu, AHSAMenu } from "@/config/staticMenu";
|
||||
@ -109,6 +111,31 @@ let projectPassDay = ref(0 as any);
|
||||
//获取项目信息
|
||||
const projectTimeInfo = ref({} as any);
|
||||
const scaleValue = ref(1);
|
||||
const contentWidth = ref(0);
|
||||
const contentHeight = ref(0);
|
||||
const calculateAspectRatio = () => {
|
||||
const container = document.querySelector('.largeScreen');
|
||||
// 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)
|
||||
};
|
||||
const scaleChange = (data:any) => {
|
||||
scaleValue.value = data;
|
||||
}
|
||||
@ -395,7 +422,10 @@ const itemList = ref([]);
|
||||
const activeTab = ref(0);
|
||||
const activeTab2 = ref(0);
|
||||
const router = useRouter();
|
||||
|
||||
const getAspectRatioStyle = computed(() => ({
|
||||
width: `${contentWidth.value}px`,
|
||||
height: `${contentHeight.value}px`
|
||||
}))
|
||||
//获取动态tab
|
||||
const getAllModelMenu = () => {
|
||||
let half = store.projectDateAuth.moduleList;
|
||||
@ -462,12 +492,17 @@ onMounted(async () => {
|
||||
subMenus[4].style.marginLeft = "30%";
|
||||
}
|
||||
await getProjectInfo();
|
||||
|
||||
|
||||
calculateAspectRatio();
|
||||
window.addEventListener('resize', calculateAspectRatio);
|
||||
});
|
||||
|
||||
let timer = ref(null as any);
|
||||
onBeforeUnmount(() => {
|
||||
clearInterval(timer);
|
||||
document.removeEventListener("click", bodyCloseMenus);
|
||||
window.removeEventListener('resize', calculateAspectRatio);
|
||||
});
|
||||
|
||||
function bodyCloseMenus() {
|
||||
@ -518,11 +553,17 @@ function jumpBgd() {
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.largeScreen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("@/assets/images/bigImg.gif") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
.header {
|
||||
width: 100%;
|
||||
height: 12%;
|
||||
@ -561,10 +602,12 @@ function jumpBgd() {
|
||||
left: 70%;
|
||||
color: #fff;
|
||||
top: 1%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.time {
|
||||
font-size: 13px;
|
||||
font-family: sadigitalNumber;
|
||||
margin: 1% 40% 0 10%;
|
||||
margin: 0.5% 33% 0 6%;
|
||||
}
|
||||
.Icon {
|
||||
margin-right: 2%;
|
||||
|
||||
@ -50,10 +50,10 @@ import Card from "@/components/card.vue";
|
||||
import CardBig from "@/components/cardBig.vue";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { GlobalStore } from "@/stores";
|
||||
|
||||
import moment from "moment";
|
||||
const store = GlobalStore();
|
||||
const value = ref("周计划14");
|
||||
let rangeTime = ref([new Date(new Date().getFullYear(), new Date().getMonth(), 1), new Date()] as any);
|
||||
let rangeTime = ref([moment(new Date(new Date().getFullYear(), new Date().getMonth(), 1)).format("YYYY-MM-DD"), moment(new Date()).format("YYYY-MM-DD")] as any);
|
||||
|
||||
const noiseList = [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user