dev调整指挥部大屏页面

This commit is contained in:
Vce 2024-04-25 09:09:34 +08:00
parent c5afb17159
commit ac9936d9c3
8 changed files with 29 additions and 883 deletions

View File

@ -13,9 +13,9 @@ NODE_ENV = 'development'
# 沈阳合盈线上
# VITE_API_URL = "http://101.43.164.214:45022"
# 演示平台
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
# 百色七参数线上地址
VITE_API_URL = 'http://101.43.164.214:11111'
# VITE_API_URL = 'http://101.43.164.214:11111'
# 七参数标准版(测试平台)
# VITE_API_URL = 'http://jxj.zhgdyun.com:15551'
# 七参数标准版(测试平台)

View File

@ -24,11 +24,11 @@ export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
// 项目环境标识配置 部署时需更改对应的项目
// export const COMPANY: string = ""; //标准版
export const COMPANY: string = "zhzrf"; //中海·臻如府
// export const COMPANY: string = "zhzrf"; //中海·臻如府
// export const COMPANY: string = "zsbf"; //中水北方
// export const COMPANY: string = "as"; //鞍山项目
// export const COMPANY: string = "agjt"; //鞍钢集团
// export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
// export const COMPANY: string = "slx"; //苏立信项目
// export const COMPANY: string = "hfqc"; //合肥启程项目
// export const COMPANY: string = "jsyc"; // 江苏盐城项目

View File

@ -24,8 +24,8 @@ export const staticRouter: RouteRecordRaw[] = [
{
path: "/large",
name: "大屏",
component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
// component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏
// component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏
// component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页)
children: [
{

View File

@ -230,6 +230,6 @@ onMounted(async () => {
<style lang="scss" scoped>
.centerTop {
background-color: darkred;
// background-color: darkred;
}
</style>

View File

@ -9,7 +9,7 @@
<centerBottom class="centerBottom"></centerBottom>
</div>
<div class="right">
<rightTop class="rightTop"></rightTop>
<rightAll class="rightAll"></rightAll>
<rightCenter class="rightCenter"></rightCenter>
<rightBottom class="rightBottom"></rightBottom>
</div>
@ -21,9 +21,7 @@ import leftTop from "@/views/commandScreen/commandCenter/leftTop.vue";
import leftBottom from "@/views/commandScreen/commandCenter/leftBottom.vue";
import centerTop from "@/views/commandScreen/commandCenter/centerTop.vue";
import centerBottom from "@/views/commandScreen/commandCenter/centerBottom.vue";
import rightTop from "@/views/commandScreen/commandCenter/rightTop.vue";
import rightCenter from "@/views/commandScreen/commandCenter/rightCenter.vue";
import rightBottom from "@/views/commandScreen/commandCenter/rightBottom.vue";
import rightAll from "@/views/commandScreen/commandCenter/rightAll.vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
import { getWorkerStatisticsCountApi, getProjectDetail } from "@/api/modules/projectOverview";
@ -63,17 +61,17 @@ const projectData = ref(null as any);
}
.right {
width: 26%;
.rightTop {
height: 32%;
}
.rightCenter {
height: 33%;
margin: 3% 0 3% 0;
}
.rightBottom {
height: 32%;
}
height: 100%;
// .rightAll {
// height: 32%;
// }
// .rightCenter {
// height: 33%;
// margin: 3% 0 3% 0;
// }
// .rightBottom {
// height: 32%;
// }
}
}
</style>

View File

@ -1,8 +1,8 @@
<template>
<div class="leftTop">
<Card title="安全管理">
<div class="rightAll">
<!-- <Card title="安全管理"> -->
<div id="echartsSafe" style="width: 100%; height: 100%"></div>
</Card>
<!-- </Card> -->
</div>
</template>
@ -355,10 +355,13 @@ onMounted(async () => {
});
</script>
<style scoped>
.leftTop {
<style lang="scss" scoped>
.rightAll {
background: url("@/assets/images/commandScreen/card-right-all.png") no-repeat;
// background-color: #fff;
background-size: 100% 100%;
width: 100%;
height: 100%;
height: 102.1%;
}
::v-deep .h-card .content {
height: 80%;

View File

@ -1,531 +0,0 @@
<template>
<div class="leftTop">
<Card title="环境监测">
<div class="box">
<div id="echartsHjjc" ref="leftTopEcharts" style="width: 100%; height: 100%"></div>
<div class="footerData">{{ analysisData }}</div>
<div class="colour">
<div class="colour_content">
<div class="bg" style="background: #65d7f9; border-top-left-radius: 8px; border-bottom-left-radius: 8px"></div>
<div class="size"></div>
</div>
<div class="colour_content">
<div class="bg" style="background: #ffbb38"></div>
<div class="size"></div>
</div>
<div class="colour_content">
<div class="bg" style="background: #fe7a18"></div>
<div class="size">轻度污染</div>
</div>
<div class="colour_content">
<div class="bg" style="background: #7718fe"></div>
<div class="size">中度污染</div>
</div>
<div class="colour_content">
<div class="bg" style="background: #890ea1"></div>
<div class="size">重度污染</div>
</div>
<div class="colour_content">
<div class="bg" style="background: #970c0c; border-top-right-radius: 8px; border-bottom-right-radius: 8px"></div>
<div class="size">严重污染</div>
</div>
</div>
</div>
</Card>
</div>
</template>
<script lang="ts" setup>
import { GlobalStore } from "@/stores";
import { getCurrentDayAirQualityApi } from "@/api/modules/projectOverview";
import { ref, onMounted, reactive } from "vue";
import * as echarts from "echarts";
import Card from "@/components/card.vue";
const store = GlobalStore();
const analysisData = ref(10 as any);
const posCenter = ref(["50%", "64%"]);
function drawChart() {
let leftTopEcharts = echarts.init(document.getElementById("echartsHjjc"));
let option = {
series: [
{
//
type: "gauge",
radius: "100%",
center: posCenter.value,
splitNumber: 10,
min: 0,
max: 500,
startAngle: 180,
endAngle: 0,
axisLine: {
show: true,
lineStyle: {
width: 18,
shadowBlur: 0,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
// {
// offset: 0,
// color: "rgba(151, 12, 12, 1)"
// },
// {
// offset: 0.2,
// color: "rgba(137, 14, 161, 1)"
// },
// {
// offset: 0.4,
// color: "rgba(119, 24, 254, 1)"
// },
// {
// offset: 0.5,
// color: "rgba(254, 122, 24, 1)"
// },
// {
// offset: 0.8,
// color: "rgba(255, 187, 56, 1)"
// },
// {
// offset: 1,
// color: "rgba(101, 215, 249, 1)"
// }
{
offset: 0,
color: "rgba(101, 215, 249, 1)"
},
{
offset: 0.2,
color: "rgba(255, 187, 56, 1)"
},
{
offset: 0.4,
color: "rgba(254, 122, 24, 1)"
},
{
offset: 0.5,
color: "rgba(119, 24, 254, 1)"
},
{
offset: 0.8,
color: "rgba(137, 14, 161, 1)"
},
{
offset: 1,
color: "rgba(151, 12, 12, 1)"
}
])
]
]
}
},
axisTick: {
show: false
},
splitLine: {
show: false
},
axisLabel: {
show: true,
color: "#fff",
fontSize: 10,
distance: -40
},
pointer: {
show: 0
}
},
{
//
name: "",
type: "gauge",
radius: "95%",
center: posCenter.value,
startAngle: 180,
endAngle: 0,
min: 0, //
max: 500, //
splitNumber: 100, //
axisLine: {
show: false
},
axisLabel: {
show: false
}, //
axisTick: {
show: false
}, //
splitLine: {
show: true,
length: 5,
lineStyle: {
color: "#87E0FB",
width: 1
}
},
detail: {
show: false
},
itemStyle: {
normal: {
color: "#fff"
}
},
data: [
{
value: analysisData.value
}
],
z: 9
},
//
{
type: "gauge",
radius: "70%",
center: posCenter.value,
splitNumber: 4,
min: 0,
max: 100,
startAngle: 180,
endAngle: 0,
axisLine: {
show: true,
lineStyle: {
width: 2,
shadowBlur: 0,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "rgb(1,192,229)"
},
{
offset: 1,
color: "#87E0FB "
}
])
]
]
}
},
axisTick: {
show: false
},
splitLine: {
show: false
},
axisLabel: {
show: false
},
pointer: {
show: 0
},
detail: {
show: 0
}
},
//
{
type: "gauge",
radius: "45%",
center: posCenter.value,
splitNumber: 4,
min: 0,
max: 100,
startAngle: 180,
endAngle: 0,
axisLine: {
show: true,
lineStyle: {
width: 2,
shadowBlur: 0,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "rgb(1,192,229)"
},
{
offset: 1,
color: "#87E0FB "
}
])
]
]
}
},
axisTick: {
show: false
},
splitLine: {
show: false
},
axisLabel: {
show: false
},
pointer: {
show: 0
},
detail: {
show: 0
}
},
//
{
type: "gauge",
radius: "25%",
center: posCenter.value,
splitNumber: 4,
min: 0,
max: 100,
startAngle: 180,
endAngle: 0,
axisLine: {
show: true,
lineStyle: {
width: 200,
shadowBlur: 0,
color: [
[
1,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 1,
color: "rgba(135, 224, 251, 0.2)"
},
{
offset: 0.2,
color: "rgba(135, 224, 251, 0.7)"
}
])
],
[1, "transparent"]
]
}
},
axisTick: {
show: false
},
splitLine: {
show: false
},
axisLabel: {
show: false
},
pointer: {
show: 0
},
detail: {
show: 0
}
},
{
type: "gauge",
radius: "70%",
center: posCenter.value,
splitNumber: 0, //
startAngle: 180,
endAngle: 0,
axisLine: {
show: true,
lineStyle: {
width: 26,
color: [
[
analysisData.value / 500,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.5,
color: "rgba(135, 224, 251, 1)"
},
{
offset: 1,
color: "#fff"
}
])
],
[1, "transparent"]
]
}
},
//线
splitLine: {
show: false
},
axisLabel: {
show: false
},
axisTick: {
show: false
},
pointer: {
show: false
},
title: {
show: false
},
//
detail: {
show: false
},
data: [
{
value: analysisData.value,
itemStyle: {
color: "red"
}
}
]
},
{
//
type: "pie",
hoverAnimation: false,
legendHoverLink: false,
center: posCenter.value,
radius: ["8%", "6%"],
// width:5,
z: 10,
label: {
normal: {
show: false
}
},
labelLine: {
normal: {
show: false
}
},
data: [
{
value: analysisData.value,
itemStyle: {
normal: {
color: "#87E0FB"
}
}
}
]
},
{
//
type: "pie",
hoverAnimation: false,
legendHoverLink: false,
center: posCenter.value,
radius: ["-2%", "4%"],
z: 10,
axisLine: {
show: true
},
label: {
normal: {
show: false
}
},
labelLine: {
normal: {
show: false
}
},
data: [
{
value: analysisData.value,
itemStyle: {
normal: {
color: "rgba(7, 31, 60) "
}
}
}
]
}
]
};
leftTopEcharts.setOption(option);
// window.addEventListener("resize", () => {
// console.log(666)
// leftTopEcharts.resize();
// })
// window.onresize = function () {
// myEchart.resize();
// }
}
//
const getList = async () => {
const res = await getCurrentDayAirQualityApi({ projectSn: store.sn });
console.log("获取环境监测数据", res);
if (res.result) {
analysisData.value = res.result.analysisData;
}
drawChart();
};
//
defineExpose({
getList
})
onMounted( async () => {
getList();
// drawChart();
});
</script>
<style lang="scss" scoped>
.leftTop {
width: 100%;
height: 100%;
}
.box {
width: 100%;
height: 100%;
position: relative;
}
.footerData {
position: absolute;
top: 69%;
left: 48%;
font-family: sadigitalNumber;
font-size: 14px;
color: #fff;
}
.colour {
position: absolute;
bottom: 0;
width: 100%;
font-size: 10px;
left: 8%;
top: 80%;
color: #fff;
.colour_content {
width: 14%;
text-align: center;
float: left;
.bg {
width: 100%;
height: 8px;
margin-bottom: 10px;
}
.size {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
::v-deep .h-card .content {
height: 80%;
}
</style>

View File

@ -1,324 +0,0 @@
<template>
<div class="leftTop">
<Card title="质量管理">
<div id="echartsQuity" style="width: 100%; height: 100%"></div>
</Card>
</div>
</template>
<script setup lang="ts">
import Card from "@/components/card.vue";
import { onMounted, ref } from "vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
import * as echarts from "echarts";
import { selectQualityStatisticsApi } from "@/api/modules/projectOverview";
let questionTotal = ref(0 as any);
let dataList = ref([
{
value: 30,
show: true,
name: "未整改质量问题",
itemStyle: {
normal: {
color: "#4CC4F8",
borderWidth: 20
}
}
},
{
value: 70,
show: true,
name: "已整改质量问题",
itemStyle: {
normal: {
color: "#82FBEA",
borderWidth: 20
}
}
}
]);
function Pie() {
let dataArr = [];
for (var i = 0; i < 150; i++) {
if (i % 2 === 0) {
dataArr.push({
name: (i + 1).toString(),
value: 10,
itemStyle: {
normal: {
color: "#7cf4f1",
borderWidth: 0,
borderColor: "#7f6546"
}
}
});
} else {
dataArr.push({
name: (i + 1).toString(),
value: 10,
itemStyle: {
normal: {
color: "rgba(0,0,0,0)",
borderWidth: 0,
borderColor: "rgba(0,0,0,0)"
}
}
});
}
}
return dataArr;
}
onMounted(() => {
drawEchart();
});
function drawEchart() {
let echartsTest = echarts.init(document.getElementById("echartsQuity"));
let option = {
tooltip: {
trigger: "item"
},
title: {
text: questionTotal.value,
subtext: "质量问题数",
x: "24%",
y: "center",
textAlign: "center",
textStyle: {
color: "#fff",
fontSize: 26,
fontWeight: "normal",
// align: "center",
// width: "200px",
fontFamily: "sadigitalNumber"
},
subtextStyle: {
color: "#ccc",
fontSize: 12,
fontWeight: "normal"
// align: "center",
}
},
legend: {
selectedMode: false, //
icon: "rect",
type: "plain",
orient: "vertical",
left: "50%",
top: "40%",
align: "left",
itemGap: 30,
itemWidth: 8, //
itemHeight: 7, //
symbolKeepAspect: false,
textStyle: {
color: "#000",
rich: {
name: {
verticalAlign: "right",
align: "left",
fontSize: 14,
color: "#FFFFFF"
},
value: {
align: "left",
fontSize: 14,
color: "#FFFFFF"
}
}
},
data: dataList.value.map(item => {
if (item.show) {
return item.name;
}
}),
formatter: function (data) {
if (dataList.value && dataList.value.length) {
for (var i = 0; i < dataList.value.length; i++) {
if (data === dataList.value[i].name) {
var value = dataList.value[i].value;
var percentage = value + "%";
return "{name| " + data + "} {gap| }" + "{value|" + value + " " + "}";
}
}
}
}
},
series: [
// 线
{
name: "",
type: "gauge",
center: ["25%", "55%"],
radius: "90%",
startAngle: 235,
endAngle: -50,
min: 0,
max: 100,
axisLine: {
show: true,
lineStyle: {
width: 2,
color: [
[
100 / 100,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#526277"
},
{
offset: 0.25,
color: "rgba(4, 14, 54,0.4)"
},
{
offset: 0.7,
color: "rgba(4, 14, 54,0.4)"
},
{
offset: 1,
color: "#526277"
}
])
],
[1, "rgba(255,255,255,0)"]
]
}
},
axisTick: {
show: 0
},
splitLine: {
show: 0
},
axisLabel: {
show: 0
},
pointer: {
show: 0
},
detail: {
show: 0
}
},
{
name: "",
type: "gauge",
center: ["25%", "55%"],
radius: "80%",
startAngle: 245,
endAngle: -115,
min: 0,
max: 100,
axisLine: {
show: true,
lineStyle: {
width: 2,
color: [
[
200 / 100,
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0.8,
color: "#52bef0"
},
{
offset: 0.5,
color: "#13356b"
}
])
],
[1, "rgba(255,255,255,0)"]
]
}
},
axisTick: {
show: 0
},
splitLine: {
show: 0
},
axisLabel: {
show: 0
},
pointer: {
show: 0
},
detail: {
show: 0
}
},
{
name: "",
type: "pie",
radius: [65, 75],
center: ["25%", "55%"],
hoverAnimation: true,
itemStyle: {
borderRadius: 10,
borderWidth: 10
},
label: {
show: false,
position: "center"
},
emphasis: {
label: {
show: false
}
},
labelLine: {
show: false
},
data: dataList.value
},
{
type: "pie",
radius: ["57", "60"],
center: ["25%", "55%"],
label: {
show: false
},
data: Pie()
}
]
};
echartsTest.setOption(option, true);
// window.addEventListener("resize", () => {
// console.log(666)
// echartsTest.resize();
// })
}
//
// const safeData = ref(null as any);
const qualityInfo = async () => {
const res: any = await selectQualityStatisticsApi({ projectSn: store.sn });
dataList.value[0].value = res.result.total.rectificationNum;
dataList.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum;
questionTotal.value = res.result.total.totalNum;
drawEchart();
};
//
defineExpose({
qualityInfo
})
onMounted( async () => {
qualityInfo();
});
</script>
<style scoped>
.leftTop {
width: 100%;
height: 100%;
}
::v-deep .h-card .content {
height: 80%;
}
</style>