Commit c99279fd by huangqy

适配

parent a01ffe8e
...@@ -12,9 +12,10 @@ ...@@ -12,9 +12,10 @@
"@babel/preset-env": "^7.16.11", "@babel/preset-env": "^7.16.11",
"@jiaminghi/data-view": "^2.10.0", "@jiaminghi/data-view": "^2.10.0",
"@types/echarts": "^4.4.3", "@types/echarts": "^4.4.3",
"autofit.js": "^3.1.0",
"axios": "^0.21.0",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"echarts": "^4.6.0", "echarts": "^4.6.0",
"axios": "^0.21.0",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-awesome": "^4.0.2", "vue-awesome": "^4.0.2",
"vue-router": "^3.1.5", "vue-router": "^3.1.5",
......
...@@ -13,8 +13,14 @@ ...@@ -13,8 +13,14 @@
window._CONFIG['isLTK'] = true window._CONFIG['isLTK'] = true
</script> </script>
<script> <script>
// app.vue
// 解决Echarts dataZoom无法识别window触屏设备的bug
window.ontouchstart = (e) => {
e.preventDefault()
}
let s = true let s = true
document.onclick = function () { document.ondblclick = function () {
s = !s s = !s
if (s) { if (s) {
document.body.requestFullscreen() document.body.requestFullscreen()
...@@ -22,7 +28,7 @@ ...@@ -22,7 +28,7 @@
document.exitFullscreen(); document.exitFullscreen();
} }
} }
document.onclick() document.ondblclick()
</script> </script>
</head> </head>
......
...@@ -9,6 +9,9 @@ body { ...@@ -9,6 +9,9 @@ body {
margin: 0; margin: 0;
} }
#app { #app {
width: 100vw;
height: 100vh;
background-color: #03050C;
font-family: Avenir, Helvetica, Arial, sans-serif; font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
......
#index { .scale-wrap {
color: #d3d6dd; color: #d3d6dd;
background-color: #000000; width: 1920px;
width: 100%; height: 1080px;
height: 100%; overflow: hidden;
.bg { .bg {
width: 100%;
height: 100%;
padding: 0.2rem 0.2rem 0 0.2rem; padding: 0.2rem 0.2rem 0 0.2rem;
background-image: url("../assets/pageBg.png"); background-image: url("../assets/pageBg.png");
background-size: cover; background-size: cover;
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
} }
.host-body { .host-body {
height: 100%;
.title { .title {
position: relative; position: relative;
width: 6.25rem; width: 6.25rem;
......
<template> <template>
<div> <div id="bottomLeftLine" style="width: 100%;height: 90%;"></div>
<div id="bottomLeftLine" style="width: 8rem;height: 3rem;"></div>
</div>
</template> </template>
<script> <script>
......
<template> <template>
<div> <div id="bottomRightBar" style="width: 100%;height: 90%;"></div>
<div id="bottomRightBar" style="width: 9rem;height: 3rem;"></div>
</div>
</template> </template>
<script> <script>
...@@ -44,6 +42,36 @@ export default { ...@@ -44,6 +42,36 @@ export default {
color: '#fff' color: '#fff'
} }
}, },
dataZoom: [
{
show: true,
type: 'slider',
height: 20,//组件高度
realtime: true,
bottom: '32px',
start: data.aisleList[0].length > 10 ? 10 : 0,
end: data.aisleList[0].length > 10 ? 16 : 50,
moveHandleStyle: {
color: '#6680FF',
borderColor: '#6680FF',
shadowColor: '#6680FF',
opacity: 0,
},
emphasis: {
moveHandleStyle: {
color: '#6680FF',
borderColor: '#6680FF',
shadowColor: '#6680FF',
opacity: 1,
},
handleStyle: {
color: '#6680FF',
borderColor: '#6680FF',
shadowColor: '#6680FF',
},
},
}
],
// toolbox: { // toolbox: {
// show: true, // show: true,
// itemSize: 20, // itemSize: 20,
......
<template> <template>
<div> <div id="centerChartLine" style="width: 100%;height: 45%;"></div>
<div id="centerChartLine" style="width: 5.2rem;height: 3rem;"></div>
</div>
</template> </template>
<script> <script>
......
<!--
* @Author: wei
* @description: 大屏自适应容器组件
* @LastEditTime: 2022-09-09 16:42:40
-->
<template>
<!-- <section class="screen-box" :style="boxStyle"> -->
<div class="screen-wrapper" ref="screenWrapper" :style="wrapperStyle">
<slot></slot>
</div>
<!-- </section> -->
</template>
<script>
/**
* 防抖函数
* @param {T} fn
* @param {number} delay
* @return
*/
function debounce(fn, delay) {
let timer = null;
return function (...args) {
timer = setTimeout(
() => {
typeof fn === "function" && fn.apply(null, args);
clearTimeout(timer);
},
delay > 0 ? delay : 100
);
};
}
export default {
name: "VScaleScreen",
props: {
width: {
type: [String, Number],
default: 1920,
},
height: {
type: [String, Number],
default: 1080,
},
fullScreen: {
type: Boolean,
default: false,
},
autoScale: {
type: [Object, Boolean],
default: true,
},
selfAdaption: {
type: Boolean,
default: true,
},
delay: {
type: Number,
default: 500,
},
boxStyle: {
type: Object,
default: () => ({}),
},
wrapperStyle: {
type: Object,
default: () => ({}),
},
},
data() {
return {
currentWidth: 0,
currentHeight: 0,
originalWidth: 0,
originalHeight: 0,
onResize: null,
observer: null,
};
},
watch: {
selfAdaption(val) {
if (val) {
this.resize();
this.addListener();
} else {
this.clearListener();
this.clearStyle();
}
},
},
computed: {
screenWrapper() {
return this.$refs["screenWrapper"];
},
},
methods: {
initSize() {
return new Promise((resolve, reject) => {
// console.log("初始化样式");
//给父元素设置 overflow:hidden
this.screenWrapper.parentNode.style.overflow = "hidden";
this.screenWrapper.parentNode.scrollLeft = 0;
this.screenWrapper.parentNode.scrollTop = 0;
this.$nextTick(() => {
// region 获取大屏真实尺寸
if (this.width && this.height) {
this.currentWidth = this.width;
this.currentHeight = this.height;
} else {
this.currentWidth = this.screenWrapper.clientWidth;
this.currentHeight = this.screenWrapper.clientHeight;
}
// endregion
// region 获取画布尺寸
if (!this.originalHeight || !this.originalWidth) {
this.originalWidth = window.screen.width;
this.originalHeight = window.screen.height;
}
// endregion
resolve();
});
});
},
updateSize() {
if (this.currentWidth && this.currentHeight) {
this.screenWrapper.style.width = `${this.currentWidth}px`;
this.screenWrapper.style.height = `${this.currentHeight}px`;
} else {
this.screenWrapper.style.width = `${this.originalWidth}px`;
this.screenWrapper.style.height = `${this.originalHeight}px`;
}
},
handleAutoScale(scale) {
if (!this.autoScale) return;
const screenWrapper = this.screenWrapper;
const domWidth = screenWrapper.clientWidth;
const domHeight = screenWrapper.clientHeight;
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
screenWrapper.style.transform = `scale(${scale},${scale}) `;
let mx = Math.max((currentWidth - domWidth * scale) / 2, 0);
let my = Math.max((currentHeight - domHeight * scale) / 2, 0);
if (typeof this.autoScale === "object") {
// @ts-ignore
!this.autoScale.x && (mx = 0);
// @ts-ignore
!this.autoScale.y && (my = 0);
}
// console.log({
// mx,
// my,
// currentWidth,
// currentHeight,
// domWidth,
// domHeight,
// scale,
// });
this.screenWrapper.style.margin = `${my}px ${mx}px`;
},
updateScale() {
const screenWrapper = this.screenWrapper;
// 获取真实视口尺寸
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
// 获取大屏最终的宽高onResize
const realWidth = this.currentWidth || this.originalWidth;
const realHeight = this.currentHeight || this.originalHeight;
// 计算缩放比例
const widthScale = currentWidth / realWidth;
const heightScale = currentHeight / realHeight;
// console.log({currentWidth, currentHeight,realWidth,realHeight});
// 若要铺满全屏,则按照各自比例缩放
if (this.fullScreen) {
screenWrapper.style.transform = `scale(${widthScale},${heightScale})`;
return false;
}
// 按照宽高最小比例进行缩放
const scale = Math.min(widthScale, heightScale);
this.handleAutoScale(scale);
},
initMutationObserver() {
const screenWrapper = this.screenWrapper;
const observer = (this.observer = new MutationObserver(() => {
this.onResize();
}));
observer.observe(screenWrapper, {
attributes: true,
attributeFilter: ["style"],
attributeOldValue: true,
});
},
clearListener() {
window.removeEventListener("resize", this.onResize);
},
addListener() {
window.addEventListener("resize", this.onResize);
},
clearStyle() {
// console.log("清除");
const screenWrapper = this.screenWrapper;
screenWrapper.parentNode.style.overflow = "auto";
screenWrapper.style = "";
},
async resize() {
if (!this.selfAdaption) {
return;
}
await this.initSize();
this.updateSize();
this.updateScale();
},
},
mounted() {
this.onResize = debounce(() => {
this.resize();
}, this.delay);
this.$nextTick(() => {
if (this.selfAdaption) {
this.resize();
this.addListener();
}
});
},
beforeDestroy() {
this.clearListener();
// this.observer.disconnect()
},
};
//
</script>
<style scoped>
.screen-box {
overflow: hidden;
background-size: 100% 100%;
background: #000;
width: 100vw;
height: 100vh;
}
.screen-wrapper {
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 500ms;
position: relative;
overflow: hidden;
z-index: 100;
transform-origin: left top;
}
</style>
...@@ -7,7 +7,7 @@ let apiBaseUrl = window._CONFIG['domianURL'] || '/' ...@@ -7,7 +7,7 @@ let apiBaseUrl = window._CONFIG['domianURL'] || '/'
const request = axios.create({ const request = axios.create({
// API 请求的默认前缀 // API 请求的默认前缀
baseURL: apiBaseUrl, baseURL: apiBaseUrl,
timeout: 3000 // 请求超时时间 timeout: 30000 // 请求超时时间
}) })
......
<template> <template>
<div class="bottom-charts"> <div class="bottom-charts">
<div> <div style="flex:1">
<div class="d-flex pt-2 pl-2"> <div class="d-flex pt-2 pl-2">
<span style="color:#5cd9e8"> <span style="color:#5cd9e8">
<icon name="chart-bar"></icon> <icon name="chart-bar"></icon>
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
<span class="fs-xl text mx-2 headerTitle">近一月收发物资统计</span> <span class="fs-xl text mx-2 headerTitle">近一月收发物资统计</span>
</div> </div>
</div> </div>
<div class="bottom-charts-left"> <bottomLeftLine ref="bll"/>
<bottomLeftLine ref="bll"/>
</div>
</div> </div>
<dv-decoration-2 style="height: 3rem;width: 5px;" :reverse="true"/> <dv-decoration-2 style="height: 3rem;width: 5px;" :reverse="true"/>
<div> <div style="flex:1;height: 100%;">
<div class="d-flex pt-2 pl-2"> <div class="d-flex pt-2 pl-2">
<span style="color:#5cd9e8"> <span style="color:#5cd9e8">
<icon name="chart-bar"></icon> <icon name="chart-bar"></icon>
...@@ -23,9 +21,7 @@ ...@@ -23,9 +21,7 @@
<span class="fs-xl text mx-2 headerTitle">区域垛位状态统计</span> <span class="fs-xl text mx-2 headerTitle">区域垛位状态统计</span>
</div> </div>
</div> </div>
<div class="bottom-charts-right"> <bottomRightBar ref="brb" />
<bottomRightBar ref="brb" />
</div>
</div> </div>
</div> </div>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<span class="fs-xl text mx-2 headerTitle">发物计划列表</span> <span class="fs-xl text mx-2 headerTitle">发物计划列表</span>
</div> </div>
</div> </div>
<dv-scroll-board :config="config" style="width: 5.1rem;height: 4.44rem;margin-top: 10px;" /> <dv-scroll-board :config="config" style="width: 100%;height: 4.44rem;margin-top: 10px;" />
</div> </div>
</div> </div>
</template> </template>
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行 oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行
evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行 evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行
columnWidth: [120, 150,150, 100, 150], columnWidth: [120, 150,150, 100, 150],
align: ["center"] align: ["left", "left"]
} }
}) })
} }
......
...@@ -9,37 +9,37 @@ ...@@ -9,37 +9,37 @@
<div class="item" style="height: 1.6rem;margin-top: 0.2rem;"> <div class="item" style="height: 1.6rem;margin-top: 0.2rem;">
<span style="font-size: 0.3875rem;display: block;">本年度收发总数</span> <span style="font-size: 0.3875rem;display: block;">本年度收发总数</span>
<div style="display: flex;"> <div style="display: flex;">
<span style="font-size: 0.3875rem;margin-top: 55px;display: block;width: 20%;text-align: center;">收物:</span> <span style="font-size: 0.3875rem;margin-top: 0.7rem;display: block;width: 20%;text-align: center;">收物:</span>
<dv-digital-flop :config="inAmount" style="height:1.625rem;width: 30%" /> <dv-digital-flop :config="inAmount" style="height:1.625rem;width: 30%" />
<span style="font-size: 0.3875rem;margin-top: 55px;display: block;width: 20%;text-align: center;">发物:</span> <span style="font-size: 0.3875rem;margin-top: 0.7rem;display: block;width: 20%;text-align: center;">发物:</span>
<dv-digital-flop :config="outAmount" style="height:1.625rem;width: 30%" /> <dv-digital-flop :config="outAmount" style="height:1.625rem;width: 30%" />
</div> </div>
</div> </div>
</div> </div>
<div class="extra"> <div class="extra">
<div class="item"> <div class="item" style="height: 100%;display: flex;justify-content: center;align-items: center;">
<span style="font-size: 0.3rem;">垛位总数</span> <div style="height: 100%;width: 50%;">垛位总数</div>
<span style="margin-left: 38px;color: #03a9f4;font-size: 0.32rem;font-weight: 700;">{{ rackAmount }}</span> <div style="color: #03a9f4;font-weight: 700;height: 100%;width: 50%;margin-left: 2.5rem;font-size: 0.35rem;">{{ rackAmount }}</div>
</div> </div>
</div> </div>
<div class="down"> <div class="down">
<div class="leftNm"> <div class="leftNm" style="flex:0.8">
<div class="item"> <div class="item">
<span>工作垛位</span> <span>工作垛位</span>
<span style="margin-left: 55px;font-size: 0.25rem;color: #03a9f4;">{{ workRackAmount }}</span> <span style="margin-left: 55px;font-size: 0.35rem;color: #03a9f4;">{{ workRackAmount }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>有货垛位</span> <span>有货垛位</span>
<span style="margin-left: 55px;font-size: 0.25rem;color: #03a9f4;">{{ usedRackAmount }}</span> <span style="margin-left: 55px;font-size: 0.35rem;color: #03a9f4;">{{ usedRackAmount }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>无货垛位</span> <span>无货垛位</span>
<span style="margin-left: 55px;font-size: 0.25rem;color: #03a9f4;">{{ nullRackAmount }}</span> <span style="margin-left: 55px;font-size: 0.35rem;color: #03a9f4;">{{ nullRackAmount }}</span>
</div> </div>
</div> </div>
<div class="percent"> <div class="percent" style="flex:1.2">
<dv-active-ring-chart :config="config" style="width: 3.775rem;height: 3.775rem;margin-left: -20px;margin-top: -45px;" /> <dv-active-ring-chart :config="config" style="width: 100%;height: 100%;" />
</div> </div>
</div> </div>
</div> </div>
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
number: [res.data.stockVo.inAmount], number: [res.data.stockVo.inAmount],
content: "{nt}件", content: "{nt}件",
style: { style: {
fontSize: 30, fontSize: 20,
fill: '#3de7c9' fill: '#3de7c9'
} }
} }
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
number: [res.data.stockVo.outAmount], number: [res.data.stockVo.outAmount],
content: "{nt}件", content: "{nt}件",
style: { style: {
fontSize: 30, fontSize: 20,
fill: '#3de7c9' fill: '#3de7c9'
} }
} }
...@@ -121,9 +121,9 @@ export default { ...@@ -121,9 +121,9 @@ export default {
value: this.nullRackAmount value: this.nullRackAmount
} }
], ],
lineWidth: 40, lineWidth: 30,
digitalFlopStyle: { digitalFlopStyle: {
fontSize: 20 fontSize: 16
}, },
showOriginValue: true, showOriginValue: true,
animationFrame: 10, animationFrame: 10,
...@@ -154,13 +154,12 @@ export default { ...@@ -154,13 +154,12 @@ export default {
width: 100%; width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
height: 0.6rem;
.item { .item {
width: 100%; width: 100%;
// height: 15%; // height: 15%;
span { div {
// font-size: 0.25rem; font-size: 0.3rem;
line-height: 0.6rem; line-height: 30px;
margin-left: 0.14rem; margin-left: 0.14rem;
} }
} }
...@@ -168,8 +167,8 @@ export default { ...@@ -168,8 +167,8 @@ export default {
.down { .down {
width: 100%; width: 100%;
display: flex; display: flex;
height: 2.6rem;
justify-content: space-between; justify-content: space-between;
flex-grow: 1;
.bg-color-black { .bg-color-black {
border-radius: 0.0625rem; border-radius: 0.0625rem;
} }
...@@ -178,7 +177,6 @@ export default { ...@@ -178,7 +177,6 @@ export default {
} }
} }
.leftNm { .leftNm {
width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around; justify-content: space-around;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<span class="fs-xl text mx-2 headerTitle">收物计划列表</span> <span class="fs-xl text mx-2 headerTitle">收物计划列表</span>
</div> </div>
</div> </div>
<dv-scroll-board :config="config" style="width: 5.1rem;height: 4.44rem;margin-top: 10px;" /> <dv-scroll-board :config="config" style="width: 100%;height: 4.44rem;margin-top: 10px;" />
<dv-decoration-2 style="height:10px;" /> <dv-decoration-2 style="height:10px;" />
</div> </div>
</div> </div>
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行 oddRowBGC: "rgb(15,47,130, 0.5)", //奇数行
evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行 evenRowBGC: "rgb(5,19,104, 0.5)", //偶数行
columnWidth: [120, 150,150, 100, 150], columnWidth: [120, 150,150, 100, 150],
align: ["center"] align: ["left", "left"]
} }
}) })
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<dv-water-level-pond :config="water1" style="width: 1.5rem;height: 1.5rem;margin-left: 30px;" /> <dv-water-level-pond :config="water1" style="width: 1.5rem;height: 1.5rem;margin-left: 30px;" />
</div> </div>
</div> </div>
<div class="percent"> <div class="percent" style="margin-top: 10px;">
<div class="poItem"> <div class="poItem">
<span v-if="currentData && currentData.length > 0">{{ currentData.length == 1 ? currentData[0].name : currentData[1].name}}</span> <span v-if="currentData && currentData.length > 0">{{ currentData.length == 1 ? currentData[0].name : currentData[1].name}}</span>
</div> </div>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
</div> </div>
<div class="d-flex jc-center body-box"> <div class="d-flex jc-center body-box">
<dv-scroll-board :config="config" style="width: 4.6rem;height: 3.2rem"/> <dv-scroll-board :config="config" style="width: 100%;height: 3.2rem"/>
</div> </div>
</div> </div>
<dv-decoration-2 style="height:10px;" /> <dv-decoration-2 style="height:10px;" />
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</span> </span>
<span class="fs-xl text mx-2 headerTitle">库内物资排行</span> <span class="fs-xl text mx-2 headerTitle">库内物资排行</span>
</div> </div>
<dv-capsule-chart :config="config" style="width: 4.2rem;height: 3.4rem" /> <dv-capsule-chart :config="config" style="width: 90%;height: 3.4rem" />
</div> </div>
</div> </div>
</template> </template>
......
<template> <template>
<div id="index"> <ScaleScreen
<dv-full-screen-container class="bg"> :width="1920"
<dv-loading v-if="loading">加载中...</dv-loading> :height="1080"
<div v-else class="host-body"> :selfAdaption="true"
<div class="d-flex jc-center"> class="scale-wrap">
<dv-decoration-10 style="width:33.3%;height:.0425rem;" :color="['#568aea', '#131E88']"/> <div class="bg">
<dv-loading v-if="loading">Loading...</dv-loading>
<div v-else class="host-body">
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<dv-decoration-8 :color="['#568aea', '#131E88']" style="width:2.5rem;height:.425rem;" /> <dv-decoration-10 style="width:33.3%;height:.0425rem;" :color="['#568aea', '#131E88']"/>
<div class="title"> <div class="d-flex jc-center">
<span class="title-text">{{ storeName }}监控平台</span> <dv-decoration-8 :color="['#568aea', '#131E88']" style="width:2.5rem;height:.425rem;" />
<div class="title">
<span class="title-text">{{ storeName }}监控平台</span>
</div>
<dv-decoration-8
:reverse="true"
:color="['#568aea', '#131E88']"
style="width:2.5rem;height:.425rem;"
/>
</div> </div>
<dv-decoration-8 <dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" :color="['#568aea', '#131E88']"/>
:reverse="true" </div>
:color="['#568aea', '#131E88']" <div class="d-flex jc-center">
style="width:2.5rem;height:.425rem;" <dv-decoration-5 style="width: 500px;height: 30px;margin-bottom: 5px;" :color="['#568aea', '#131E88']"/>
/>
</div> </div>
<dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" :color="['#568aea', '#131E88']"/>
</div>
<div class="d-flex jc-center">
<dv-decoration-5 style="width: 500px;height: 30px;margin-bottom: 5px;" :color="['#568aea', '#131E88']"/>
</div>
<dv-border-box-1 class="main-container">
<dv-border-box-10 class="left-chart-container">
<div style="cursor: pointer;font-size: 0.5rem;width: 5.1rem;height: 1.225rem;line-height: 0.645rem; text-align: center;">
<span class="react-before"></span>
<span class="text" style="display: block;">{{dateYear}}</span>
<span class="text" style="display: block;">{{dateDay}}</span>
</div>
<dv-decoration-2 style="height:10px;" />
<centerLeft1 />
<bottomLeft />
</dv-border-box-10>
<div class="right-main-container"> <dv-border-box-1 class="main-container">
<div class="rmc-top-container"> <dv-border-box-10 class="left-chart-container">
<dv-border-box-11 title="库内物资"> <div style="cursor: pointer;font-size: 0.5rem;width: 5.1rem;height: 1.225rem;line-height: 0.645rem; text-align: center;">
<center/> <span class="react-before"></span>
</dv-border-box-11> <span class="text" style="display: block;">{{dateYear}}</span>
<dv-border-box-11 title="库内温湿度"> <span class="text" style="display: block;">{{dateDay}}</span>
<centerLeft2/>
</dv-border-box-11>
<div class="rmctc-right-container">
<dv-border-box-10 class="rmctc-chart-1">
<centerRight1 />
<centerRight2 />
</dv-border-box-10>
</div> </div>
</div> <dv-decoration-2 style="height:10px;" />
<dv-border-box-10 class="rmc-bottom-container"> <centerLeft1 />
<Bottom-Charts /> <bottomLeft />
</dv-border-box-10> </dv-border-box-10>
</div>
</dv-border-box-1> <div class="right-main-container">
<div class="rmc-top-container">
<dv-border-box-11 title="库内物资" style="flex:1">
<center />
</dv-border-box-11>
<dv-border-box-11 title="库内温湿度" style="flex:1">
<centerLeft2/>
</dv-border-box-11>
<div class="rmctc-right-container" style="flex:1">
<dv-border-box-10 class="rmctc-chart-1">
<centerRight1 />
<centerRight2 />
</dv-border-box-10>
</div>
</div>
<dv-border-box-10 class="rmc-bottom-container">
<Bottom-Charts />
</dv-border-box-10>
</div>
</dv-border-box-1>
</div> </div>
</dv-full-screen-container> </div>
</div> </ScaleScreen>
</template> </template>
<script> <script>
...@@ -75,7 +79,8 @@ import bottomLeft from "./bottomLeft"; ...@@ -75,7 +79,8 @@ import bottomLeft from "./bottomLeft";
import bottomRight from "./bottomRight"; import bottomRight from "./bottomRight";
import BottomCharts from "./BottomCharts" import BottomCharts from "./BottomCharts"
import centerChartBar from "../components/echart/center/centerChartBar" import centerChartBar from "../components/echart/center/centerChartBar"
import { postAction } from '@/api/manage' import { postAction,getAction } from '@/api/manage'
import ScaleScreen from '../components/scale-screen/scale-screen.vue'
export default { export default {
data () { data () {
return { return {
...@@ -83,6 +88,7 @@ export default { ...@@ -83,6 +88,7 @@ export default {
dateDay: null, dateDay: null,
dateYear: null, dateYear: null,
dateWeek: null, dateWeek: null,
date: '',
storeName: '', storeName: '',
weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
}; };
...@@ -96,7 +102,11 @@ export default { ...@@ -96,7 +102,11 @@ export default {
bottomLeft, bottomLeft,
bottomRight, bottomRight,
BottomCharts, BottomCharts,
centerChartBar centerChartBar,
ScaleScreen
},
created() {
this.getSysTime()
}, },
mounted () { mounted () {
this.timeFn(); this.timeFn();
...@@ -104,6 +114,11 @@ export default { ...@@ -104,6 +114,11 @@ export default {
this.getStoreName() this.getStoreName()
}, },
methods: { methods: {
getSysTime() {
getAction('/sys/getTimeNow',{}).then(res => {
this.date = res.data
})
},
getStoreName() { getStoreName() {
postAction('/store/list', {}).then(res => { postAction('/store/list', {}).then(res => {
let storeCode = this.$route.query.storeCode let storeCode = this.$route.query.storeCode
...@@ -112,10 +127,12 @@ export default { ...@@ -112,10 +127,12 @@ export default {
}, },
timeFn () { timeFn () {
setInterval(() => { setInterval(() => {
this.dateDay = formatTime(new Date(), 'HH: mm: ss'); this.dateDay = formatTime(new Date(this.date), 'HH: mm: ss');
this.dateYear = formatTime(new Date(), 'yyyy-MM-dd'); this.dateYear = formatTime(new Date(this.date), 'yyyy-MM-dd');
this.dateWeek = this.weekday[new Date().getDay()]; this.dateWeek = this.weekday[new Date(this.date).getDay()];
this.date = new Date(this.date).getTime() + 1000
}, 1000) }, 1000)
}, },
cancelLoading () { cancelLoading () {
setTimeout(() => { setTimeout(() => {
...@@ -142,8 +159,7 @@ export default { ...@@ -142,8 +159,7 @@ export default {
} }
.left-chart-container { .left-chart-container {
width: 24%; width: 25%;
// padding: 10px;
box-sizing: border-box; box-sizing: border-box;
.border-box-content { .border-box-content {
...@@ -152,14 +168,17 @@ export default { ...@@ -152,14 +168,17 @@ export default {
} }
.right-main-container { .right-main-container {
width: 76%; width: 75%;
padding-left: 5px; padding-left: 10px;
box-sizing: border-box; box-sizing: border-box;
display: flex;
flex-direction: column;
} }
.rmc-top-container { .rmc-top-container {
height: 68%;
display: flex; display: flex;
margin-bottom: 20px;
height: 65%;
} }
.rmctc-left-container { .rmctc-left-container {
...@@ -167,12 +186,13 @@ export default { ...@@ -167,12 +186,13 @@ export default {
} }
.rmctc-right-container { .rmctc-right-container {
width: 40%; // width: 40%;
height: 99%; // height: 99%;
} }
.rmc-bottom-container { .rmc-bottom-container {
height: 30%; flex-grow: 1;
height: 35%;
} }
.rmcc-top-center-container { .rmcc-top-center-container {
display: flex; display: flex;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论