feat:重庆海螺水泥有限公司扁鹊设备监测与健康管理平台建设 首页研发

This commit is contained in:
xuyoubin 2023-12-22 15:51:45 +08:00
parent ce5b36b0b3
commit 2866c4d8af
9 changed files with 285 additions and 104 deletions

View File

@ -213,7 +213,7 @@ export default {
"chart2", "chart2",
generateBaseOptions({ generateBaseOptions({
xAxis: { xAxis: {
data:xAxisData, data:xAxisData.reverse(),
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
@ -319,7 +319,7 @@ export default {
} }
initChartStatic('chart4', generateBaseOptions({ initChartStatic('chart4', generateBaseOptions({
xAxis: { xAxis: {
data: xAxisData data: xAxisData.reverse()
}, },
legend: { legend: {
// //

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,27 +1,42 @@
<template> <template>
<div class="app-container main-outer-wrapper"> <div class="app-container main-outer-wrapper">
<div class="top-card-wrapper"> <div class="top-card-wrapper">
<div class="top-card-item-extra" v-for="item in topList"> <div
<div class="top-card-icon"></div> class="top-card-item-extra"
v-for="(item, index) in topList"
:key="index"
>
<div
:class="['top-card-icon', 'top-icon-' + (index + 1).toString()]"
></div>
<div class="top-card-inner"> <div class="top-card-inner">
<div class="top-card-inner-value">25</div> <div class="top-card-inner-value">{{ item.value }}</div>
<div class="top-card-inner-title">设备种类</div> <div class="top-card-inner-title">{{ item.title }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="grid-main-wrapper"> <div class="grid-main-wrapper">
<div class="grid-item-wrapper" style="grid-column: span 2;"> <div class="grid-item-wrapper" style="grid-column: span 2">
<div class="grid-item-title">设备基础信息</div> <div class="grid-item-title">设备基础信息</div>
<div class="grid-item-content device-basic-wrapper"> <div class="grid-item-content device-basic-wrapper">
<div class="device-basic-item"></div> <div class="device-basic-item" v-for="item,index in mainList" :key="index">
<div class="device-basic-item"></div> <div
:class="['top-card-icon', 'top-img-' + (index + 1).toString()]"
></div>
<div style="display: flex;height: 100%; justify-content:space-around; flex-direction:column;">
<div>{{item.name}}</div>
<div>{{item.name2}}</div>
<div>{{item.name3}}</div>
<div>{{item.name4}}</div>
</div> </div>
</div> </div>
<div class="grid-item-wrapper"> </div>
</div>
<div class="grid-item-wrapper footer">
<div class="grid-item-title">XK型油泵输出流量</div> <div class="grid-item-title">XK型油泵输出流量</div>
<div class="grid-item-content" id="chart1"></div> <div class="grid-item-content" id="chart1"></div>
</div> </div>
<div class="grid-item-wrapper"> <div class="grid-item-wrapper footer">
<div class="grid-item-title">重型锤式破碎机进料粒度</div> <div class="grid-item-title">重型锤式破碎机进料粒度</div>
<div class="grid-item-content" id="chart2"></div> <div class="grid-item-content" id="chart2"></div>
</div> </div>
@ -29,47 +44,192 @@
</div> </div>
</template> </template>
<script> <script>
import {
generateBaseOptions,
generatePieOptions,
initChartStatic,
} from "@/utils/bigscreenTool/index.js";
export default { export default {
data() { data() {
return { return {
topList: [ topList: [
{ {
title: '', title: "设备种类",
value: '', value: "25种",
icon: ''
}, },
{ {
title: '', title: "设备总数",
value: '', value: "123台",
icon: ''
}, },
{ {
title: '', title: "运行中设备",
value: '', value: "118台",
icon: ''
}, },
{ {
title: '', title: "停运设备",
value: '', value: "6台",
icon: '' icon: "top4",
}, },
{ {
title: '', title: "对接接口",
value: '', value: "18种",
icon: '' },
],
mainList:[
{
name:'设备名称:齿轮油泵',
name2:'设备型号KCB-200',
name3:'设备状态:良好',
name4:'流量范围1.1~960m³/h',
},
{
name:'设备名称:板式喂料机',
name2:'设备型号XBW150',
name3:'槽板宽度1500mm',
name4:'处理能力61-610t/h',
}, },
] ]
}
};
}, },
mounted() { mounted() {
this.initChart1() this.initChart1();
this.initChart2() this.initChart2();
}, },
methods: { methods: {
initChart1() {}, initChart1() {
initChart2() {}, let time = new Date().getHours();
let xAxisData = [];
for (let i = 0; i < 9; i++) {
xAxisData.push(`${time - i}:00`);
} }
} initChartStatic(
"chart1",
generateBaseOptions({
legend: {
show: false,
top: "bottom",
left: "center",
},
xAxis: {
data: xAxisData.reverse(),
axisLine: {
show: true,
},
},
yAxis: {
type: "value",
max:300,
min:0,
splitNumber : 7.5,
axisLabel: {
show: true,
},
splitLine: {
//线
show: true, //
lineStyle: {
//线
color: "#0735a2", //线
width: 1, //线
type: "dashed", //线
},
},
},
series: [
{
name: "油泵输出流量",
data: [84, 223, 189, 256, 187, 234, 258, 186, 272],
type: "line",
barWidth: 10,
itemStyle: {
normal: {
label: {
show: true, //
position: "top", //
textStyle: {
//
color: "#000",
fontSize: 13,
},
},
},
},
},
],
grid: {
width: "90%",
height: "65%",
},
})
);
},
initChart2() {
initChartStatic(
"chart2",
generateBaseOptions({
legend: {
show: false,
top: "bottom",
left: "center",
},
xAxis: {
data: ["PCZ1308", "PCZ1512", "PCZ1615", "PCZ1802"],
},
// color: ,
yAxis: {
type: "value",
axisLabel: {
show: true,
},
splitLine: {
//线
show: true, //
lineStyle: {
//线
color: "#0735a2", //线
width: 1, //线
type: "dashed", //线
},
},
},
series: [
{
name: "破碎机进料粒度",
data: [800, 1000, 650, 500],
type: "bar",
barWidth: 40,
itemStyle: {
normal: {
color:function(params){
var arr=["#61a4e7", "#7ece51", "#edca5f", "#9470e4"]
return arr[params.dataIndex]
},
label: {
show: true, //
position: "top", //
textStyle: {
//
color: "#000",
fontSize: 13,
},
},
},
},
},
],
grid: {
bottom: "25%",
left: "10%",
width: "78%",
height: "65%",
},
})
);
},
},
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import url(../../../styles/mainPage.scss); @import url(../../../styles/mainPage.scss);
@ -85,11 +245,11 @@ export default {
box-shadow: 2px 2px 2px #25252525, -2px -2px 2px #14141414; box-shadow: 2px 2px 2px #25252525, -2px -2px 2px #14141414;
border-radius: 6px; border-radius: 6px;
background-color: white; background-color: white;
padding: .6rem .8rem; padding: 0.6rem 0.8rem;
.top-card-icon { .top-card-icon {
width: 3rem; width: 3rem;
height: 3rem; height: 3rem;
border: 1px solid #000; background-size: 100% 100%;
} }
.top-card-inner { .top-card-inner {
display: flex; display: flex;
@ -98,10 +258,10 @@ export default {
justify-content: center; justify-content: center;
width: calc(100% - 5rem); width: calc(100% - 5rem);
.top-card-inner-title { .top-card-inner-title {
font-size: .8rem; font-size: 0.8rem;
} }
.top-card-inner-value { .top-card-inner-value {
font-family: 'BiaoTiFont'; font-family: "BiaoTiFont";
} }
} }
} }
@ -111,22 +271,43 @@ export default {
box-shadow: 2px 2px 2px #25252525, -2px -2px 2px #14141414; box-shadow: 2px 2px 2px #25252525, -2px -2px 2px #14141414;
border-radius: 6px; border-radius: 6px;
.grid-item-title { .grid-item-title {
font-family: 'BiaoTiFont'; font-family: "BiaoTiFont";
font-weight: 500 !important; font-weight: 500 !important;
color: #252525B0; color: #252525b0;
} }
} }
} }
.footer{
height: 300px !important;
}
/**设备基础信息 */ /**设备基础信息 */
.device-basic-wrapper { .device-basic-wrapper {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: .8rem; gap: 0.8rem;
.device-basic-item { .device-basic-item {
overflow: hidden;
border: 1px solid #25252529; border: 1px solid #25252529;
min-height: 200px; min-height: 200px;
display: grid;
grid-template-columns:1fr 1fr ;
border-radius: 6px; border-radius: 6px;
.top-card-icon {
width: 15rem;
height: 12.5rem;
background-size: 100% 100%;
}
}
}
@for $i from 1 through 5 {
.top-icon-#{$i} {
background-image: url(./assets/top#{$i}.png);
}
}
@for $i from 1 through 2 {
.top-img-#{$i} {
background-image: url(./assets/img#{$i}.png);
} }
} }
</style> </style>