932 lines
27 KiB
Vue
Raw Normal View History

2024-04-20 17:26:03 +08:00
<template>
2024-04-21 14:15:04 +08:00
<div class="centerTop">
2024-04-27 13:41:36 +08:00
<div class="top-content">
<div class="content-div aq">
2024-06-06 00:19:28 +08:00
<!-- <div class="circle-box">
2024-05-13 20:46:26 +08:00
<span>{{ statScore.hiddenDangerScore }}</span>
2024-06-06 00:19:28 +08:00
</div> -->
2024-06-15 17:58:41 +08:00
<div id="waterAq" style="width: 80%; height: 80%; transform: translateY(-25px)"></div>
<span style="transform: translateY(-50px)">安全隐患治理</span>
2024-04-27 13:41:36 +08:00
</div>
<div class="content-div wd">
2024-06-06 00:19:28 +08:00
<!-- <div class="circle-box">
2024-05-13 20:46:26 +08:00
<span>{{ statScore.dangerEngScore }}</span>
2024-06-06 00:19:28 +08:00
</div> -->
2024-06-15 17:58:41 +08:00
<div id="waterWd" style="width: 80%; height: 80%; transform: translateY(-25px)"></div>
<span style="transform: translateY(-50px)">危大工程</span>
2024-04-27 13:41:36 +08:00
</div>
<div class="content-div jy">
2024-06-06 00:19:28 +08:00
<!-- <div class="circle-box"> -->
2024-06-15 17:58:41 +08:00
<!-- <span>{{statScore}}</span> -->
<!-- <span>25</span>
2024-06-06 00:19:28 +08:00
</div> -->
2024-06-15 17:58:41 +08:00
<div id="waterJy" style="width: 80%; height: 80%; transform: translateY(-25px)"></div>
<span style="transform: translateY(-50px)">安全教育</span>
2024-04-27 13:41:36 +08:00
</div>
<div class="content-div fx">
2024-06-06 00:19:28 +08:00
<!-- <div class="circle-box">
2024-05-13 20:46:26 +08:00
<span>{{ statScore.riskScore }}</span>
2024-06-06 00:19:28 +08:00
</div> -->
2024-06-15 17:58:41 +08:00
<div id="waterFx" style="width: 80%; height: 80%; transform: translateY(-25px)"></div>
<span style="transform: translateY(-50px)">风险管理</span>
2024-04-27 13:41:36 +08:00
</div>
<div class="content-div zn">
2024-06-06 00:19:28 +08:00
<!-- <div class="circle-box">
2024-05-13 20:46:26 +08:00
<span>{{ statScore.aiScore }}</span>
2024-06-06 00:19:28 +08:00
</div> -->
2024-06-15 17:58:41 +08:00
<div id="waterZn" style="width: 80%; height: 80%; transform: translateY(-25px)"></div>
<span style="transform: translateY(-50px)">AI警报</span>
2024-04-27 13:41:36 +08:00
</div>
<div class="count-div">
<div class="count-div-item">
<span>上月安全综合评分</span>
2024-05-13 20:46:26 +08:00
<span>{{ statScore.lastMonthTotal }}</span>
2024-04-27 13:41:36 +08:00
<span></span>
</div>
<div class="count-div-item">
2024-06-03 17:52:59 +08:00
<span
>相较上月{{
statScore.radio > 0
? "上升" + (statScore.radio ? statScore.radio : 0)
: "下降" + (statScore.radio ? statScore.radio.toString().substr(1) : 0)
}}
%</span
>
<span :style="statScore.radio > 0 ? 'color:#0db027' : 'color:#f77c7d'">{{ statScore.radio > 0 ? "↑" : "↓" }} </span>
2024-04-27 13:41:36 +08:00
</div>
</div>
2024-06-15 17:58:41 +08:00
<div
:class="['score-div', statScore.total >= 80 ? 'scoreBg1' : statScore.total >= 60 ? 'scoreBg2' : 'scoreBg3']"
@click="openDialogData({ index: 9, title: '月度安全综合评分' })"
>
2024-04-27 13:41:36 +08:00
<div class="score-part">
2024-05-13 20:46:26 +08:00
<span>{{ statScore.total }}</span>
2024-04-27 13:41:36 +08:00
<span></span>
</div>
<div class="scoreInner scoreTextBg1" v-if="statScore.total >= 80">
2024-06-15 17:58:41 +08:00
<span style="font-size: 18px">安全评分</span>
<div class="scoreReview">优秀</div>
<div class="scoreStar"></div>
</div>
<div class="scoreInner scoreTextBg2" v-if="statScore.total >= 60 && statScore.total < 80">
2024-06-15 17:58:41 +08:00
<span style="font-size: 18px">安全评分</span>
<div class="scoreReview">一般</div>
<div class="scoreStar"></div>
</div>
<div class="scoreInner scoreTextBg3" v-if="statScore.total < 60">
2024-06-15 17:58:41 +08:00
<span style="font-size: 18px">安全评分</span>
<div class="scoreReview"></div>
2024-06-04 21:45:21 +08:00
<div class="scoreStar"></div>
</div>
2024-04-27 13:41:36 +08:00
</div>
<div class="classify-div">
2024-05-13 20:46:26 +08:00
<div class="classify-div-item" @click="openDialogData({ index: 1, title: '危大工程' })">
2024-06-03 17:52:59 +08:00
<span style="font-size: 12px">危大工程&nbsp;&nbsp;{{ statsDirectorateBigScreen.dangerousEngineeringRecordNum }}</span>
2024-04-27 13:41:36 +08:00
</div>
2024-05-13 20:46:26 +08:00
<div class="classify-div-item" @click="openDialogData({ index: 2, title: '安全教育' })">
2024-06-03 17:52:59 +08:00
<span style="font-size: 12px">安全教育&nbsp;&nbsp;{{ statsDirectorateBigScreen.workerInfoAuditRecordNum }}</span>
2024-04-27 13:41:36 +08:00
</div>
2024-06-03 17:52:59 +08:00
<div class="classify-div-item" style="width: 280px" @click="openDialogData({ index: 3, title: '影响进度计划因素' })">
<span style="font-size: 12px">影响进度计划因素&nbsp;&nbsp;{{ statsDirectorateBigScreen.taskProgressContentNum }}</span>
2024-04-27 13:41:36 +08:00
</div>
2024-05-13 20:46:26 +08:00
<div class="classify-div-item" @click="openDialogData({ index: 4, title: '风险统计' })">
2024-06-03 17:52:59 +08:00
<span style="font-size: 12px"
>风险统计&nbsp;&nbsp;{{ statsDirectorateBigScreen.securityQualityInspectionRecordNum }}</span
>
2024-04-27 13:41:36 +08:00
</div>
2024-05-13 20:46:26 +08:00
<div class="classify-div-item" @click="openDialogData({ index: 5, title: '安全隐患' })">
2024-06-03 17:52:59 +08:00
<span style="font-size: 12px"
>安全隐患&nbsp;&nbsp;{{ statsDirectorateBigScreen.securityQualityInspectionRecordNum }}</span
>
2024-04-27 13:41:36 +08:00
</div>
2024-05-13 20:46:26 +08:00
<div class="classify-div-item" @click="openDialogData({ index: 6, title: 'AI警报' })">
2024-06-03 17:52:59 +08:00
<span style="font-size: 12px">AI警报&nbsp;&nbsp;{{ statsDirectorateBigScreen.aiAnalyseHardWareAlarmRecordNum }}</span>
2024-04-27 13:41:36 +08:00
</div>
</div>
2024-05-11 19:15:44 +08:00
<div class="background-title">
2024-05-13 20:46:26 +08:00
<span @click="openDialogData({ index: 9, title: '月度安全综合评分' })">查看月度安全评分报告详情</span>
2024-05-11 19:15:44 +08:00
</div>
2024-04-27 13:41:36 +08:00
</div>
2024-04-20 17:26:03 +08:00
</div>
</template>
<script setup lang="ts">
import Card from "@/components/card.vue";
import { ref, onMounted, watch } from "vue";
import { GlobalStore } from "@/stores";
import { ElMessage } from "element-plus";
2024-06-06 00:19:28 +08:00
import * as echarts from "echarts";
2024-06-15 17:58:41 +08:00
import "echarts-liquidfill";
2024-04-20 17:26:03 +08:00
import { editProjectInfo, eidtProjectShowConfig, queryBySnData } from "@/api/modules/projectOverview";
2024-05-12 01:52:37 +08:00
import { getStatsDirectorateBigScreenApi, getStatScoreApi } from "@/api/modules/agjtCommandApi";
2024-04-20 17:26:03 +08:00
import { selectLiveVideoListApi } from "@/api/modules/video";
import ckplayerComp from "./ckplayerComp.vue";
import { COMPANY } from "@/config/config";
2024-06-03 17:52:59 +08:00
const emits = defineEmits(["openDialog"]);
2024-04-20 17:26:03 +08:00
const store = GlobalStore();
const videoList = ref([] as any);
// ts
type Props = {
projectData?: any; // 传入项目信息
};
// withDefaults 定义默认值(传入的数据类型同默认值)
const props = withDefaults(defineProps<Props>(), {
projectData: {}
});
// 项目信息
const projectData = ref({} as any);
2024-04-27 18:46:11 +08:00
// 打开弹窗
2024-05-13 20:46:26 +08:00
const openDialogData = (obj: any) => {
2024-06-03 17:52:59 +08:00
emits("openDialog", obj);
};
2024-04-20 17:26:03 +08:00
watch(
() => props.projectData,
newVal => {
if (newVal) {
// props.xData = newVal;
projectData.value = newVal;
}
}
);
2024-06-06 00:19:28 +08:00
//绘画安全隐患治理水波图
2024-06-15 17:58:41 +08:00
function drawAqWater() {
2024-06-06 00:19:28 +08:00
type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("waterAq")!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
2024-06-15 17:58:41 +08:00
// 配置项
option = {
2024-06-06 00:19:28 +08:00
series: [
2024-06-15 17:58:41 +08:00
{
type: "liquidFill", //设置图表类型
// data: [0.6], // 设置水位值为0到1之间
data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位
// data: [
// 0.2,
// {
// value: 0.3, // 图形数据写法二
// direction: "left", // 水波运动方向
// itemStyle: {
// color: "blue", // 水波颜色
// opacity: 0.8, // 透明度
// },
// emphasis: {
// itemStyle: {
// color: "lightblue", // 鼠标移入时的水波颜色
// opacity: 1, // 鼠标移入时的透明度
// },
// },
// },
// ],
waveAnimation: true, //是否开启水波动画,
amplitude: 15, // 设置振幅,值越大波形越尖
waveLength: 150, //水波的长度,值越大水波越长
shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom',
radius: "60%", // 设置图的大小 默认为50%
// color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位
color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位
center: ["50%", "50%"], //中心点的位置1E90FF
// animationEasing:'linear',
animationEasing: "easeOut",
outline: {
borderDistance: 4, // 外边框距离
itemStyle: {
borderWidth: 2, // 外边框宽度
borderColor: "#156ACF" // 外边框颜色
}
2024-06-06 00:19:28 +08:00
},
2024-06-15 17:58:41 +08:00
// // 水波样式
// itemStyle:{
// opacity:0.5, // 透明度
// color:'red', // 统一配置水波的颜色
// shadowBlur:10, // 水波阴影大小
// shadowColor:'red', // 阴影颜色
// shadowOffsetX:10, // 阴影水平偏移量
// shadowOffsetY:10, // 阴影竖直偏移量
// },
backgroundStyle: {
color: "rgba(0,0,0,0)" // 背景色
},
label: {
normal: {
formatter: function () {
return statScore.value.hiddenDangerScore + "分";
},
textStyle: {
// color: "#6495ED", //蓝色
color: "#fff",
insideColor: "#fff",
fontSize: 16
}
}
}
}
]
};
// 使用配置项设置图表
myChart.setOption(option);
2024-06-06 00:19:28 +08:00
}
//绘画危大工程水波图
2024-06-15 17:58:41 +08:00
function drawWdWater() {
2024-06-06 00:19:28 +08:00
type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("waterWd")!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
2024-06-15 17:58:41 +08:00
// 配置项
option = {
2024-06-06 00:19:28 +08:00
series: [
2024-06-15 17:58:41 +08:00
{
type: "liquidFill", //设置图表类型
// data: [0.6], // 设置水位值为0到1之间
data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位
// data: [
// 0.2,
// {
// value: 0.3, // 图形数据写法二
// direction: "left", // 水波运动方向
// itemStyle: {
// color: "blue", // 水波颜色
// opacity: 0.8, // 透明度
// },
// emphasis: {
// itemStyle: {
// color: "lightblue", // 鼠标移入时的水波颜色
// opacity: 1, // 鼠标移入时的透明度
// },
// },
// },
// ],
waveAnimation: true, //是否开启水波动画,
amplitude: 15, // 设置振幅,值越大波形越尖
waveLength: 150, //水波的长度,值越大水波越长
shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom',
radius: "60%", // 设置图的大小 默认为50%
// color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位
color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位
center: ["50%", "50%"], //中心点的位置1E90FF
// animationEasing:'linear',
animationEasing: "easeOut",
outline: {
borderDistance: 4, // 外边框距离
itemStyle: {
borderWidth: 2, // 外边框宽度
borderColor: "#156ACF" // 外边框颜色
}
2024-06-06 00:19:28 +08:00
},
2024-06-15 17:58:41 +08:00
// // 水波样式
// itemStyle:{
// opacity:0.5, // 透明度
// color:'red', // 统一配置水波的颜色
// shadowBlur:10, // 水波阴影大小
// shadowColor:'red', // 阴影颜色
// shadowOffsetX:10, // 阴影水平偏移量
// shadowOffsetY:10, // 阴影竖直偏移量
// },
backgroundStyle: {
color: "rgba(0,0,0,0)" // 背景色
},
label: {
normal: {
formatter: function () {
return statScore.value.dangerEngScore + "分";
},
textStyle: {
color: "#fff",
insideColor: "#fff",
fontSize: 16
}
}
}
}
]
};
// 使用配置项设置图表
myChart.setOption(option);
2024-06-06 00:19:28 +08:00
}
//绘画安全隐患治理水波图
2024-06-15 17:58:41 +08:00
function drawJyWater() {
2024-06-06 00:19:28 +08:00
type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("waterJy")!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
2024-06-15 17:58:41 +08:00
// 配置项
option = {
2024-06-06 00:19:28 +08:00
series: [
2024-06-15 17:58:41 +08:00
{
type: "liquidFill", //设置图表类型
// data: [0.6], // 设置水位值为0到1之间
data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位
// data: [
// 0.2,
// {
// value: 0.3, // 图形数据写法二
// direction: "left", // 水波运动方向
// itemStyle: {
// color: "blue", // 水波颜色
// opacity: 0.8, // 透明度
// },
// emphasis: {
// itemStyle: {
// color: "lightblue", // 鼠标移入时的水波颜色
// opacity: 1, // 鼠标移入时的透明度
// },
// },
// },
// ],
waveAnimation: true, //是否开启水波动画,
amplitude: 15, // 设置振幅,值越大波形越尖
waveLength: 150, //水波的长度,值越大水波越长
shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom',
radius: "60%", // 设置图的大小 默认为50%
// color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位
color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位
center: ["50%", "50%"], //中心点的位置1E90FF
// animationEasing:'linear',
animationEasing: "easeOut",
outline: {
borderDistance: 4, // 外边框距离
itemStyle: {
borderWidth: 2, // 外边框宽度
borderColor: "#156ACF" // 外边框颜色
}
2024-06-06 00:19:28 +08:00
},
2024-06-15 17:58:41 +08:00
// // 水波样式
// itemStyle:{
// opacity:0.5, // 透明度
// color:'red', // 统一配置水波的颜色
// shadowBlur:10, // 水波阴影大小
// shadowColor:'red', // 阴影颜色
// shadowOffsetX:10, // 阴影水平偏移量
// shadowOffsetY:10, // 阴影竖直偏移量
// },
backgroundStyle: {
color: "rgba(0,0,0,0)" // 背景色
},
label: {
normal: {
formatter: function () {
// return statScore.value + "分"
return "25分";
},
textStyle: {
color: "#fff",
insideColor: "#fff",
fontSize: 16
}
}
}
}
]
};
// 使用配置项设置图表
myChart.setOption(option);
2024-06-06 00:19:28 +08:00
}
//绘画安全隐患治理水波图
2024-06-15 17:58:41 +08:00
function drawFxWater() {
2024-06-06 00:19:28 +08:00
type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("waterFx")!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
2024-06-15 17:58:41 +08:00
// 配置项
option = {
2024-06-06 00:19:28 +08:00
series: [
2024-06-15 17:58:41 +08:00
{
type: "liquidFill", //设置图表类型
// data: [0.6], // 设置水位值为0到1之间
data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位
// data: [
// 0.2,
// {
// value: 0.3, // 图形数据写法二
// direction: "left", // 水波运动方向
// itemStyle: {
// color: "blue", // 水波颜色
// opacity: 0.8, // 透明度
// },
// emphasis: {
// itemStyle: {
// color: "lightblue", // 鼠标移入时的水波颜色
// opacity: 1, // 鼠标移入时的透明度
// },
// },
// },
// ],
waveAnimation: true, //是否开启水波动画,
amplitude: 15, // 设置振幅,值越大波形越尖
waveLength: 150, //水波的长度,值越大水波越长
shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom',
radius: "60%", // 设置图的大小 默认为50%
// color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位
color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位
center: ["50%", "50%"], //中心点的位置1E90FF
// animationEasing:'linear',
animationEasing: "easeOut",
outline: {
borderDistance: 4, // 外边框距离
itemStyle: {
borderWidth: 2, // 外边框宽度
borderColor: "#156ACF" // 外边框颜色
}
2024-06-06 00:19:28 +08:00
},
2024-06-15 17:58:41 +08:00
// // 水波样式
// itemStyle:{
// opacity:0.5, // 透明度
// color:'red', // 统一配置水波的颜色
// shadowBlur:10, // 水波阴影大小
// shadowColor:'red', // 阴影颜色
// shadowOffsetX:10, // 阴影水平偏移量
// shadowOffsetY:10, // 阴影竖直偏移量
// },
backgroundStyle: {
color: "rgba(0,0,0,0)" // 背景色
},
label: {
normal: {
formatter: function () {
return statScore.value.riskScore + "分";
},
textStyle: {
color: "#fff",
insideColor: "#fff",
fontSize: 16
}
}
}
}
]
};
// 使用配置项设置图表
myChart.setOption(option);
2024-06-06 00:19:28 +08:00
}
//绘画安全隐患治理水波图
2024-06-15 17:58:41 +08:00
function drawZnWater() {
2024-06-06 00:19:28 +08:00
type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("waterZn")!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
2024-06-15 17:58:41 +08:00
// 配置项
option = {
2024-06-06 00:19:28 +08:00
series: [
2024-06-15 17:58:41 +08:00
{
type: "liquidFill", //设置图表类型
// data: [0.6], // 设置水位值为0到1之间
data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位
// data: [
// 0.2,
// {
// value: 0.3, // 图形数据写法二
// direction: "left", // 水波运动方向
// itemStyle: {
// color: "blue", // 水波颜色
// opacity: 0.8, // 透明度
// },
// emphasis: {
// itemStyle: {
// color: "lightblue", // 鼠标移入时的水波颜色
// opacity: 1, // 鼠标移入时的透明度
// },
// },
// },
// ],
waveAnimation: true, //是否开启水波动画,
amplitude: 15, // 设置振幅,值越大波形越尖
waveLength: 150, //水波的长度,值越大水波越长
shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom',
radius: "60%", // 设置图的大小 默认为50%
// color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位
color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位
center: ["50%", "50%"], //中心点的位置1E90FF
// animationEasing:'linear',
animationEasing: "easeOut",
outline: {
borderDistance: 4, // 外边框距离
itemStyle: {
borderWidth: 2, // 外边框宽度
borderColor: "#156ACF" // 外边框颜色
}
2024-06-06 00:19:28 +08:00
},
2024-06-15 17:58:41 +08:00
// // 水波样式
// itemStyle:{
// opacity:0.5, // 透明度
// color:'red', // 统一配置水波的颜色
// shadowBlur:10, // 水波阴影大小
// shadowColor:'red', // 阴影颜色
// shadowOffsetX:10, // 阴影水平偏移量
// shadowOffsetY:10, // 阴影竖直偏移量
// },
backgroundStyle: {
color: "rgba(0,0,0,0)" // 背景色
},
label: {
normal: {
formatter: function () {
return statScore.value.aiScore + "分";
},
textStyle: {
color: "#fff",
insideColor: "#fff",
fontSize: 16
}
}
}
}
]
};
// 使用配置项设置图表
myChart.setOption(option);
2024-06-06 00:19:28 +08:00
}
2024-04-20 17:26:03 +08:00
//效果图
const picUrl = ref("" as any);
const BASEURL = import.meta.env.VITE_API_URL;
// 显示视频
const showVideo = ref(1 as any);
// 显示更换图片
const showChangeImg = ref(false as any);
// 显示更换视频
const showChangeVideo = ref(false as any);
let topText2 = ref([
{ id: 1, title: "现场视频", isActive: true },
{ id: 2, title: "宣传视频", isActive: false },
{ id: 3, title: "效果图", isActive: false }
]);
let topText = ref([
// { id: 1, title: "现场视频", isActive: true },
{ id: 2, title: "宣传视频", isActive: false },
{ id: 3, title: "效果图", isActive: false }
]);
2024-06-05 22:46:23 +08:00
const getVideoList = async (showLoading: boolean) => {
let res: any = await selectLiveVideoListApi(
{
projectSn: store.sn
},
showLoading
);
2024-05-13 20:46:26 +08:00
if (res.result && res.result.extend1) {
2024-04-20 17:26:03 +08:00
videoList.value = JSON.parse(res.result.extend1).result.videoList;
// 为了解决视频播放器渲染,第二个总是会默认显示一半,我动态设置样式让视图刷新,只要设置百分百就有问题,所以只能使用此方法
setTimeout(() => {
// 获取所有的 video 元素
2024-06-03 17:52:59 +08:00
var videos = document.querySelectorAll(".href-content video");
2024-04-20 17:26:03 +08:00
// var videos = document.getElementsByTagName("video");
// 遍历所有的 video 元素
for (var i = 0; i < videos.length; i++) {
// 修改视频元素的样式
videos[i].style.width = "99.9%";
videos[i].style.height = "99.9%";
}
}, 2000);
}
};
2024-05-12 01:52:37 +08:00
let statsDirectorateBigScreen = ref({} as any);
//获取centerTop底部按钮显示数据
2024-06-05 18:31:26 +08:00
const getStatsDirectorateBigScreen = async (showLoading: boolean) => {
const res = await getStatsDirectorateBigScreenApi({ projectSn: store.sn }, showLoading);
2024-06-03 17:52:59 +08:00
statsDirectorateBigScreen.value = res.result;
2024-05-12 01:52:37 +08:00
};
2024-05-13 20:46:26 +08:00
let statScore = ref({
dangerEngScore: 0,
hiddenDangerScore: 0,
aiScore: 0,
riskScore: 0,
2024-06-03 17:52:59 +08:00
total: 0,
lastMonthTotal: 0
2024-05-13 20:46:26 +08:00
} as any);
2024-05-12 01:52:37 +08:00
//获取centerTop底部按钮显示数据
2024-06-05 18:31:26 +08:00
const getStatScore = async (showLoading: boolean) => {
const res = await getStatScoreApi({ projectSn: store.sn }, showLoading);
2024-06-03 17:52:59 +08:00
statScore.value = res.result;
2024-06-06 00:19:28 +08:00
2024-06-15 17:58:41 +08:00
drawAqWater();
drawWdWater();
drawJyWater();
drawFxWater();
drawZnWater();
2024-05-12 01:52:37 +08:00
};
2024-04-20 17:26:03 +08:00
function boxStyle(item: any) {
if (item.isActive) {
let choiseStyle = {
color: "#fff"
};
return choiseStyle;
}
return {};
}
let tabIndex = ref(1 as any);
function activeBtn(item: any) {
let currentState = item.isActive;
if (!currentState) {
topText.value.forEach(el => {
el.isActive = false;
});
item.isActive = !currentState;
tabIndex.value = item.id;
}
showVideo.value = item.id;
}
const uploadFail = () => {
ElMessage({
showClose: true,
message: "上传失败,请重试",
type: "warning"
});
};
const fileTypeFail = (text: any) => {
ElMessage({
showClose: true,
message: text,
type: "warning"
});
};
const uploadSuccess = () => {
ElMessage({
showClose: true,
message: "上传成功",
type: "success"
});
};
// 查询效果图
2024-06-05 18:31:26 +08:00
function getQueryBySnData(showLoading: boolean) {
queryBySnData(
{
projectSn: store.sn,
showType: 3
},
showLoading
).then((res: any) => {
2024-04-20 17:26:03 +08:00
if (res.result) {
picUrl.value = res.result.configValue;
}
});
}
// //保存或删除宣传视频
function saveOrDeleteVideo(url) {
editProjectInfo({
projectSn: store.sn,
videoUrl: url
}).then(res => {
uploadSuccess(); //"上传成功"
projectData.value.videoUrl = url;
});
}
//将方法暴露给父组件
defineExpose({
getQueryBySnData
2024-06-03 17:52:59 +08:00
});
2024-06-05 18:31:26 +08:00
const setIntervalFn = (showLoading: boolean) => {
2024-06-05 22:46:23 +08:00
getVideoList(showLoading);
2024-06-05 18:31:26 +08:00
getQueryBySnData(showLoading);
getStatsDirectorateBigScreen(showLoading);
getStatScore(showLoading);
2024-06-04 19:16:37 +08:00
};
onMounted(async () => {
2024-06-05 18:31:26 +08:00
setIntervalFn(false);
2024-06-04 19:16:37 +08:00
// 定时三十秒刷新
2024-06-04 20:13:38 +08:00
setInterval(() => {
2024-06-05 18:31:26 +08:00
setIntervalFn(true);
2024-06-04 20:13:38 +08:00
}, 30000);
2024-04-20 17:26:03 +08:00
});
</script>
<style lang="scss" scoped>
2024-06-15 17:58:41 +08:00
.scoreBg1 {
background-image: radial-gradient(circle, rgb(46, 200, 49) 0px, rgba(255, 255, 255, 0) 115px);
}
.scoreBg2 {
background-image: radial-gradient(circle, rgb(255, 175, 0) 0px, rgba(255, 255, 255, 0) 115px);
}
.scoreBg3 {
background-image: radial-gradient(circle, rgb(200, 46, 56) 0px, rgba(255, 255, 255, 0) 115px);
}
.scoreTextBg1 {
background-image: radial-gradient(circle, rgb(46, 200, 49) 0px, rgba(255, 255, 255, 0) 40px);
}
.scoreTextBg2 {
background-image: radial-gradient(circle, rgb(255, 175, 0) 0px, rgba(255, 255, 255, 0) 40px);
}
.scoreTextBg3 {
background-image: radial-gradient(circle, rgb(200, 46, 56) 0px, rgba(255, 255, 255, 0) 40px);
}
2024-04-21 14:15:04 +08:00
.centerTop {
2024-04-25 09:09:34 +08:00
// background-color: darkred;
2024-05-13 20:46:26 +08:00
.top-content {
2024-04-27 13:41:36 +08:00
height: 100%;
position: relative;
background-image: url("@/assets/images/commandScreen/top-bg.png");
2024-06-04 21:45:21 +08:00
// background-position: center;
background-position: -28px;
2024-04-27 13:41:36 +08:00
background-repeat: no-repeat;
2024-05-13 20:46:26 +08:00
.content-div {
2024-04-27 19:34:59 +08:00
width: 30%;
height: 30%;
2024-04-27 13:41:36 +08:00
position: absolute;
display: flex;
flex-direction: column;
align-items: center;
2024-05-13 20:46:26 +08:00
.circle-box {
2024-04-27 19:34:59 +08:00
width: 70px;
height: 70px;
2024-04-27 13:41:36 +08:00
color: white;
font-size: 14px;
text-align: center;
2024-05-13 20:46:26 +08:00
2024-04-27 19:34:59 +08:00
// padding: 23px 20px;
// border: 2px solid #318FF7;
background: url("@/assets/images/commandScreen/bg10.png") no-repeat;
background-size: 100% 100%;
2024-04-27 13:41:36 +08:00
border-radius: 50%;
2024-04-27 19:34:59 +08:00
display: flex;
justify-content: center;
2024-05-13 20:46:26 +08:00
span {
2024-04-27 19:34:59 +08:00
margin-top: 10px;
}
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
2024-06-03 17:52:59 +08:00
> span {
2024-04-27 13:41:36 +08:00
margin-top: 10px;
color: white;
}
}
2024-05-13 20:46:26 +08:00
.aq {
2024-04-27 18:46:11 +08:00
// left: 40px;
// top: 180px;
2024-04-27 19:34:59 +08:00
left: 0%;
top: 45%;
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
.wd {
2024-04-27 18:46:11 +08:00
// left: 200px;
// top: 80px;
2024-04-27 19:34:59 +08:00
left: 12%;
top: 20%;
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
.jy {
2024-04-27 18:46:11 +08:00
// left: 400px;
// top: 5px;
2024-04-27 19:34:59 +08:00
left: 35%;
2024-04-27 18:46:11 +08:00
top: 0%;
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
.fx {
2024-04-27 18:46:11 +08:00
// right: 180px;
// top: 80px;
2024-04-27 19:34:59 +08:00
right: 12%;
top: 20%;
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
.zn {
2024-04-27 18:46:11 +08:00
// right: 40px;
// top: 180px;
2024-04-27 19:34:59 +08:00
right: 0%;
top: 45%;
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
.count-div {
2024-04-27 13:41:36 +08:00
width: 60%;
color: white;
position: absolute;
2024-04-27 18:46:11 +08:00
// bottom: 95px;
// left: 170px;
bottom: 19%;
left: 18%;
2024-04-27 13:41:36 +08:00
display: flex;
align-items: center;
justify-content: space-between;
2024-05-13 20:46:26 +08:00
&-item {
2024-04-27 13:41:36 +08:00
font-size: 14px;
2024-05-13 20:46:26 +08:00
2024-06-03 17:52:59 +08:00
> span:nth-child(2) {
color: #2983e1;
2024-04-27 13:41:36 +08:00
}
}
}
2024-06-15 17:58:41 +08:00
2024-05-13 20:46:26 +08:00
.score-div {
2024-04-27 13:41:36 +08:00
color: white;
position: absolute;
2024-04-27 18:46:11 +08:00
// bottom: 210px;
// left: 383px;
2024-05-11 15:11:04 +08:00
width: 30%;
2024-06-04 21:45:21 +08:00
height: 45%;
bottom: 30%;
2024-05-11 15:11:04 +08:00
left: 35.5%;
2024-04-27 13:41:36 +08:00
display: flex;
flex-direction: column;
align-items: center;
2024-05-13 20:46:26 +08:00
.score-part {
2024-06-04 21:45:21 +08:00
margin-top: 60px;
2024-05-13 20:46:26 +08:00
span:nth-child(1) {
2024-04-27 13:41:36 +08:00
font-size: 72px;
}
2024-05-13 20:46:26 +08:00
span:nth-child(2) {
2024-04-27 13:41:36 +08:00
font-size: 18px;
}
}
2024-05-13 20:46:26 +08:00
2024-06-03 17:52:59 +08:00
> span {
2024-04-27 13:41:36 +08:00
color: white;
font-size: 18px;
}
2024-06-15 17:58:41 +08:00
.scoreInner {
2024-06-04 21:45:21 +08:00
text-align: center;
margin-top: -10px;
width: 90%;
2024-06-04 21:45:21 +08:00
// height: 100px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
2024-06-15 17:58:41 +08:00
2024-06-04 21:45:21 +08:00
// background-color: red;
2024-06-15 17:58:41 +08:00
.scoreReview {
2024-06-04 22:06:29 +08:00
opacity: 0.7;
2024-06-04 21:45:21 +08:00
display: flex;
justify-content: center;
align-items: center;
height: 50px;
// background-color: blue;
}
2024-06-15 17:58:41 +08:00
.scoreStar {
2024-06-04 21:45:21 +08:00
// background-color: purple;
// margin-top: 20px;
width: 28%;
height: 40px;
background: url("@/assets/images/green_flag_bg.png") no-repeat;
background-size: 100% 100%;
2024-06-15 17:58:41 +08:00
2024-06-04 21:45:21 +08:00
transform: translateY(-20px);
}
}
2024-04-27 13:41:36 +08:00
}
2024-05-13 20:46:26 +08:00
.classify-div {
2024-04-27 13:41:36 +08:00
width: 100%;
color: white;
position: absolute;
2024-05-11 19:15:44 +08:00
bottom: 10px;
2024-04-27 13:41:36 +08:00
left: 0px;
display: flex;
align-items: center;
justify-content: space-between;
2024-05-13 20:46:26 +08:00
&-item {
2024-04-27 19:34:59 +08:00
width: 180px;
height: 75px;
// background-color: #0090D8;
// padding: 10px 20px;
// border-radius: 24px;
background: url("@/assets/images/commandScreen/bg9.png") no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0 5px;
2024-05-13 20:46:26 +08:00
span {
2024-04-27 19:34:59 +08:00
margin-top: 10px;
}
2024-04-27 13:41:36 +08:00
}
}
2024-05-13 20:46:26 +08:00
.background-title {
2024-05-11 19:15:44 +08:00
width: 100%;
height: 40px;
position: absolute;
text-align: center;
line-height: 50px;
2024-06-03 17:52:59 +08:00
color: #00e2f9;
2024-05-11 19:15:44 +08:00
font-size: 14px;
bottom: -10px;
left: 0px;
background-image: url("@/assets/images/commandScreen/title-bg.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
2024-04-27 13:41:36 +08:00
}
2024-04-20 17:26:03 +08:00
}
</style>