parent
6bcb4c6b0d
commit
0937577802
|
@ -2777,4 +2777,88 @@ svg.loading-icon {
|
|||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
.tree-box{
|
||||
width: 330px;
|
||||
height: 300px;
|
||||
background: rgba(0,0,0,0.5);
|
||||
box-shadow: 0 10px 20px -10px #000000;
|
||||
border-radius: 6px;
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0)) 1 1;
|
||||
}
|
||||
|
||||
.tree-line{
|
||||
.white{
|
||||
color: #FFFFFF;
|
||||
}
|
||||
&.el-tree,.el-tree-node__content, .el-upload-list__item{
|
||||
background: transparent;
|
||||
&:hover,&:focus,&:active,&:visited{
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.tree-level-1-icon{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 2px;
|
||||
position: relative;
|
||||
left: -4px;
|
||||
}
|
||||
.el-tree-node {
|
||||
position: relative;
|
||||
padding-left: 16px; // 缩进量
|
||||
}
|
||||
.el-tree-node__children {
|
||||
padding-left: 16px; // 缩进量
|
||||
}
|
||||
|
||||
// 竖线
|
||||
.el-tree-node::before {
|
||||
content: "";
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
left: -3px;
|
||||
top: 0;
|
||||
border-width: 1px;
|
||||
border-left: 1px solid #ffffff;
|
||||
}
|
||||
// 当前层最后一个节点的竖线高度固定
|
||||
.el-tree-node:last-child::before {
|
||||
height: 38px; // 可以自己调节到合适数值
|
||||
}
|
||||
|
||||
// 横线
|
||||
.el-tree-node::after {
|
||||
content: "";
|
||||
width: 24px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
left: -3px;
|
||||
top: 12px;
|
||||
border-width: 1px;
|
||||
border-top: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
// 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
|
||||
& > .el-tree-node::after {
|
||||
border-top: none;
|
||||
}
|
||||
& > .el-tree-node::before {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
// 展开关闭的icon
|
||||
.el-tree-node__expand-icon{
|
||||
font-size: 16px;
|
||||
padding: 0 3px;
|
||||
// 叶子节点(无子节点)
|
||||
&.is-leaf{
|
||||
color: transparent;
|
||||
// display: none; // 也可以去掉
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -98,9 +98,12 @@ export const lineChartData = function () {
|
|||
],
|
||||
|
||||
tooltip: {
|
||||
show: false,
|
||||
alwaysShowContent: false,
|
||||
trigger: 'item'
|
||||
trigger: 'item',
|
||||
backgroundColor:"rgba(0,0,0,0.6)",
|
||||
borderWidth:0,
|
||||
textStyle:{
|
||||
color:"rgba(255,255,255,0.8)",
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
x: 30,
|
||||
|
@ -111,18 +114,23 @@ export const lineChartData = function () {
|
|||
}
|
||||
}
|
||||
|
||||
export const roundChartData = function () {
|
||||
export const radarChartData = function () {
|
||||
return {
|
||||
backgroundColor: "#0A2E5D",
|
||||
tooltip: {},
|
||||
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
backgroundColor:"rgba(0,0,0,0.6)",
|
||||
borderWidth:0,
|
||||
textStyle:{
|
||||
color:"rgba(255,255,255,0.8)",
|
||||
},
|
||||
},
|
||||
radar: {
|
||||
radius: "50%", //大小
|
||||
nameGap: 20, // 图中工艺等字距离图的距离
|
||||
radius: "70%", //大小
|
||||
nameGap: 10, // 图中工艺等字距离图的距离
|
||||
center: ["50%", "50%"], // 图的位置
|
||||
name: {
|
||||
textStyle: {
|
||||
color: "rgba(101, 213, 255, 1)",
|
||||
color: "rgba(255,255,255,0.8)",
|
||||
fontSize: 16
|
||||
},
|
||||
formatter: function(name) {
|
||||
|
@ -130,15 +138,14 @@ export const roundChartData = function () {
|
|||
}
|
||||
},
|
||||
indicator: [
|
||||
{"name":'社会稳定',"max":"100"},
|
||||
{"name":'社会治安',"max":"100"},
|
||||
{"name":'交通安全',"max":"100"},
|
||||
{"name":'消防安全',"max":"100"},
|
||||
{"name":'公共安全',"max":"100"},
|
||||
{"name":'1月',"max":"100"},
|
||||
{"name":'2月',"max":"100"},
|
||||
{"name":'3月',"max":"100"},
|
||||
{"name":'4月',"max":"100"},
|
||||
{"name":'5月',"max":"100"},
|
||||
],
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
|
||||
color: "rgba(153, 409, 246, 0.2)"
|
||||
},
|
||||
show:true,
|
||||
|
@ -163,7 +170,7 @@ export const roundChartData = function () {
|
|||
|
||||
series: [
|
||||
{
|
||||
name: "报警类型分析",
|
||||
name: "物资统计",
|
||||
type: "radar",
|
||||
symbol: "angle",
|
||||
itemStyle: {
|
||||
|
@ -176,16 +183,16 @@ export const roundChartData = function () {
|
|||
symbol: "circle",
|
||||
symbolSize: 5,
|
||||
value: [70,42,63,84,75,34],
|
||||
areaStyle: { color: "rgba(64, 205, 241, 0.2)" },
|
||||
areaStyle: { color: "rgba(125,174,255,0.5)" },
|
||||
itemStyle: {
|
||||
normal: {
|
||||
borderWidth:1,
|
||||
color: "RGBA(0, 34, 66, 1)",
|
||||
borderColor: "rgba(146, 225, 255, 1)"
|
||||
color: "#7FB0FF",
|
||||
borderColor: "#7FB0FF"
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
color: "rgba(146, 225, 255, 1)",
|
||||
color: "#7FB0FF",
|
||||
width: 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,289 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="d-flex align-items-center margin-bottom-20">
|
||||
<span class="cycle-icon blue"></span>
|
||||
<span class="blue-text">确认警情</span>
|
||||
<span class="link"></span>
|
||||
<span class="line-gray"></span>
|
||||
<span class="round-style"></span>
|
||||
<span>事故研判</span>
|
||||
</div>
|
||||
<div class="info-content-text">
|
||||
<span class="label">预警类型:</span>
|
||||
<span class="text">{{info.typeName}}</span>
|
||||
</div>
|
||||
<div class="info-content-text">
|
||||
<span class="label">告警内容:</span>
|
||||
<span class="text">{{info.content}}</span>
|
||||
</div>
|
||||
<div class="info-content-text">
|
||||
<span class="label">告警级别:</span>
|
||||
<span class="text" :class="info.levelClass">{{info.levelName}}</span>
|
||||
<i class="cycle-icon" :class="info.levelClassIcon"></i>
|
||||
</div>
|
||||
<div class="info-content-text">
|
||||
<span class="label">上报时间:</span>
|
||||
<span class="text">{{info.time}}</span>
|
||||
</div>
|
||||
<div class="info-content-text cursor-pointer">
|
||||
<span class="label">上报位置:</span>
|
||||
<span class="text">{{info.address}}</span>
|
||||
<i @click="changePoint(info)" class="position-icon"></i>
|
||||
</div>
|
||||
<div class="info-content-text cursor-pointer">
|
||||
<span class="label">上报人:</span>
|
||||
<span class="text">{{info.reporter}}</span>
|
||||
<span class="phone-btn d-flex align-items-center is-justify-space-center"><img src="~@/assets/img/phone-gray.png" alt="">一健联系</span>
|
||||
</div>
|
||||
|
||||
<div class="info-content-text cursor-pointer">
|
||||
<span class="label">附近摄像头:</span>
|
||||
</div>
|
||||
<div class="plan-head">
|
||||
<span class="span-item">摄像头名称</span>
|
||||
<span class="span-item">类型</span>
|
||||
<span class="span-item">距离 (m)</span>
|
||||
</div>
|
||||
<div class="plan-head-tbody">
|
||||
<div class="tr" :key="i" v-for="(item,i) in info.tableData">
|
||||
<span class="span-item">{{ item.name }}</span>
|
||||
<span class="span-item">{{ item.type }}</span>
|
||||
<span class="span-item">{{ item.distance }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-flex margin-top-30 is-justify-space-center confirm-btn-group">
|
||||
<div class="confirm-btn deal-btn" @click="showJudgmentFlag">事故研判</div>
|
||||
<div class="confirm-btn" @click="hidePop">消警</div>
|
||||
</div>
|
||||
<!-- 报警记录弹窗 -->
|
||||
<div class="pop-box right-position " v-if="showDealMsg">
|
||||
<div class="close" @click="showDealMsg=false">×</div>
|
||||
<div class="border l-t"></div>
|
||||
<div class="border r-t"></div>
|
||||
<div class="border r-b"></div>
|
||||
<div class="border l-b"></div>
|
||||
<div class="title">处理意见</div>
|
||||
<el-form class="margin-top-23" label-width="100px">
|
||||
|
||||
<el-form-item label="处理建议:">
|
||||
<el-input :rows="5" v-model="popObj.content" class="item-radius-style" type="textarea" placeholder="请输入事件描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行人:">
|
||||
<el-select v-model="popObj.typeId" class="item-radius-style">
|
||||
<el-option v-for="(item,i) in typeList" :key="i" :label="item.label" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="d-flex btn-group align-items-center">
|
||||
<div class="btn-style" @click="hideConfirm">确认</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import {Component, Emit, Prop, Vue, Watch} from 'vue-property-decorator';
|
||||
|
||||
@Component
|
||||
export default class ConfirmComponent extends Vue {
|
||||
//传入的报警信息详情
|
||||
@Prop({default: function () {
|
||||
return {
|
||||
type:'人员聚集',
|
||||
content:'人员踩踏事故预警',
|
||||
levelName:'二级',
|
||||
levelClass:'level-2-text',
|
||||
levelClassIcon:'level-2',
|
||||
time:'2023年3月12日 13:56:00',
|
||||
position:'工厂厂房',
|
||||
reporter:'李四',
|
||||
tableHeader:[
|
||||
{
|
||||
prop:'name',
|
||||
label:'摄像头名称'
|
||||
},{
|
||||
prop:'type',
|
||||
label:'类型'
|
||||
},{
|
||||
prop:'distance',
|
||||
label:'距离 (m)'
|
||||
}
|
||||
],
|
||||
tableData : [
|
||||
{
|
||||
type:'简型摄像头',
|
||||
distance:'10',
|
||||
name:'1号摄像头',
|
||||
},{
|
||||
type:'简型摄像头',
|
||||
distance:'20',
|
||||
name:'2号摄像头',
|
||||
},{
|
||||
type:'简型摄像头',
|
||||
distance:'22',
|
||||
name:'3号摄像头',
|
||||
},{
|
||||
type:'简型摄像头',
|
||||
distance:'10',
|
||||
name:'4号摄像头',
|
||||
},{
|
||||
type:'简型摄像头',
|
||||
distance:'20',
|
||||
name:'5号摄像头',
|
||||
},{
|
||||
type:'简型摄像头',
|
||||
distance:'22',
|
||||
name:'6号摄像头',
|
||||
},
|
||||
]
|
||||
}
|
||||
} }) info!: any[];
|
||||
showDealMsg = false
|
||||
popObj:any = {
|
||||
popTitle:'报警记录',
|
||||
type:'',
|
||||
title: '风险点异常',
|
||||
info: '',
|
||||
time: '',
|
||||
address:'',
|
||||
level: '',
|
||||
typeName:"",
|
||||
reporter:"",
|
||||
tel:"",
|
||||
position:[],
|
||||
content:"",
|
||||
typeId:"",
|
||||
id:''
|
||||
|
||||
}
|
||||
typeList = [
|
||||
{
|
||||
label:'张三',
|
||||
value:'张三',
|
||||
},{
|
||||
label:'李四',
|
||||
value:'李四',
|
||||
},{
|
||||
label:'王五',
|
||||
value:'王五',
|
||||
}
|
||||
]
|
||||
//表格添加类
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
if (rowIndex === 1) {
|
||||
return 'blue-row';
|
||||
}
|
||||
if (rowIndex === 2) {
|
||||
return 'yellow-row';
|
||||
}
|
||||
if (rowIndex === 3) {
|
||||
return 'orange-row';
|
||||
}
|
||||
if (rowIndex === 4) {
|
||||
return 'red-row';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
//处理信息
|
||||
@Emit('showJudgmentFlag')
|
||||
showJudgmentFlag() {
|
||||
//
|
||||
}
|
||||
//点击点位
|
||||
@Emit('changePoint')
|
||||
changePoint(item) {
|
||||
console.log(item)
|
||||
//
|
||||
}
|
||||
hidePop(){
|
||||
this.showDealMsg = true
|
||||
}
|
||||
//处理信息
|
||||
@Emit('hideConfirm')
|
||||
hideConfirm(){
|
||||
this.showDealMsg = false
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.font-size-12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tb-info-style {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.confirm-btn{
|
||||
width: 140px;
|
||||
height: 34px;
|
||||
background: transparent;
|
||||
border-radius: 17px;
|
||||
border: 1px solid #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.deal-btn{
|
||||
background: rgba(255,255,255,0.15);
|
||||
margin-right: 20px;
|
||||
}
|
||||
.confirm-btn-group{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.blue{
|
||||
background: #7DAEFF;
|
||||
}
|
||||
.blue-text{
|
||||
color: #7DAEFF;
|
||||
}
|
||||
.overview-container .pop-box {
|
||||
left: -170%;
|
||||
::v-deep{
|
||||
.el-form-item__label{
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.item-radius-style {
|
||||
.el-input__inner {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
color: #d7d7d7;
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
color: #d7d7d7;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 5px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.btn-group {
|
||||
justify-content: space-evenly;
|
||||
|
||||
.btn-style {
|
||||
width: 96px;
|
||||
height: 34px;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border-radius: 17px;
|
||||
border: 1px solid #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
background: rgba(255, 255, 255, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -3,7 +3,8 @@
|
|||
<title-component :imgSrc="imgSrc">
|
||||
能耗统计
|
||||
</title-component>
|
||||
<hbt-echarts className="line-chart-emergency" :options="option" @onChartInit="getEcharts($event,'lineChart')"></hbt-echarts>
|
||||
<hbt-echarts className="line-chart-emergency" :options="option"
|
||||
@onChartInit="getEcharts($event,'lineChart')"></hbt-echarts>
|
||||
</div>
|
||||
<div class="box-content flex-15 margin-top-20 device-box">
|
||||
<title-component :imgSrc="imgSrc">
|
||||
|
@ -13,7 +14,7 @@
|
|||
<div class="d-flex align-items-center">
|
||||
<img src="~@/assets/img/home/security-equipment.png" alt="">
|
||||
<span>安防设备</span>
|
||||
</div>
|
||||
</div>
|
||||
<span>100<span class="grayColor">/300</span></span>
|
||||
</div>
|
||||
<div class="energyRightTitle d-flex is-justify-space-between margin-top-10">
|
||||
|
@ -35,79 +36,8 @@
|
|||
<title-component :imgSrc="imgSrc">
|
||||
物资盘点
|
||||
</title-component>
|
||||
<div class="charts-box">
|
||||
<div class="text">
|
||||
<div class="count">{{count}}%</div>
|
||||
物资完备度
|
||||
</div>
|
||||
<el-progress type="circle" :width="200" define-back-color="rgba(255,255,255,0.16)" :format="textFormat" :stroke-width="20" :percentage="count" :color="colors"></el-progress>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 开启应急演练弹窗 -->
|
||||
<div class="pop-box right-position" v-if="showPop">
|
||||
<div class="close" @click="showPop=false">×</div>
|
||||
<div class="border l-t"></div>
|
||||
<div class="border r-t"></div>
|
||||
<div class="border r-b"></div>
|
||||
<div class="border l-b"></div>
|
||||
<div class="title">{{popTitle}}</div>
|
||||
<el-form class="margin-top-23" label-width="90px">
|
||||
<el-form-item label="事件类型:">
|
||||
<el-select v-model="popObj.typeId" filterable @change="val=>setData(val,'typeName')" class="item-radius-style">
|
||||
<el-option v-for="(item,i) in typeList" :key="i" :label="item.label" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件等级:">
|
||||
<el-select v-model="popObj.level" filterable class="item-radius-style">
|
||||
<el-option v-for="(item,i) in levelList" :key="i" :label="item.label" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练计划:">
|
||||
<el-select v-model="popObj.plan" filterable class="item-radius-style">
|
||||
<el-option v-for="(item,i) in planList" :key="i" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联预案:">
|
||||
<el-select v-model="popObj.linkPlan" filterable class="item-radius-style">
|
||||
<el-option v-for="(item,i) in linkPlanList" :key="i" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="d-flex btn-group">
|
||||
<div class="btn-style" @click="submitWaring">确认</div>
|
||||
<div class="btn-style cancel" @click="showPop=false">取消</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 开启应急演练弹窗 -->
|
||||
<div class="pop-box right-log-position" v-if="showLogPop">
|
||||
<div class="close" @click="showLogPop=false">×</div>
|
||||
<div class="border l-t"></div>
|
||||
<div class="border r-t"></div>
|
||||
<div class="border r-b"></div>
|
||||
<div class="border l-b"></div>
|
||||
<div class="title">报警记录</div>
|
||||
<div class="head">
|
||||
<span>告警类型</span>
|
||||
<span>告警内容</span>
|
||||
<span>报警内容</span>
|
||||
<span>上报人员</span>
|
||||
<span>事故地点</span>
|
||||
<span>处理意见</span>
|
||||
</div>
|
||||
<div class="tbody">
|
||||
<div class="tr" :key="i" v-for="(item,i) in tableData">
|
||||
<span>{{item.type}}</span>
|
||||
<span>{{item.content}}</span>
|
||||
<span>{{item.alarm}}</span>
|
||||
<span>{{item.reporter}}</span>
|
||||
<span>{{item.address}}</span>
|
||||
<span>{{item.suggestion}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="1000">
|
||||
</el-pagination>
|
||||
<hbt-echarts className="line-chart-emergency" :options="radarData"
|
||||
@onChartInit="getEcharts($event,'radar')"></hbt-echarts>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, Emit, Vue} from 'vue-property-decorator';
|
||||
import template from "./homeRight.component.html"
|
||||
import {lineChartData} from "./chartData";
|
||||
import {lineChartData,radarChartData} from "./chartData";
|
||||
import TitleComponent from "@/components/title.component.vue"
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
|
@ -25,15 +25,11 @@ export default class HomeRightComponent extends Vue {
|
|||
option: any = {}
|
||||
//折线图实例
|
||||
lineChart: any = {}
|
||||
// 计数
|
||||
count = 0
|
||||
public colors = [
|
||||
{color: '#FF5959', percentage: 20},
|
||||
{color: '#FFA900', percentage: 40},
|
||||
{color: '#FADFA4', percentage: 60},
|
||||
{color: '#C9FFD7', percentage: 80},
|
||||
{color: '#76c893', percentage: 100}
|
||||
];
|
||||
//雷达图数据
|
||||
radarData: any = {}
|
||||
//折线图实例
|
||||
radar: any = {}
|
||||
|
||||
showPop = false
|
||||
showLogPop = false
|
||||
popTitle = '开启演练'
|
||||
|
@ -216,42 +212,17 @@ export default class HomeRightComponent extends Vue {
|
|||
suggestion:'立即救援',
|
||||
},
|
||||
]
|
||||
//开始演练
|
||||
startDrill(){
|
||||
this.showPop = true
|
||||
}
|
||||
//报警记录
|
||||
showLog(){
|
||||
this.showLogPop = true
|
||||
}
|
||||
submitWaring(){
|
||||
this.showPop = false
|
||||
this.showPlan()
|
||||
}
|
||||
@Emit('showPlan')
|
||||
showPlan(){
|
||||
//
|
||||
}
|
||||
public textFormat(data){
|
||||
return ""
|
||||
}
|
||||
public getCount(data){
|
||||
this.count = 0;
|
||||
setTimeout(()=>{
|
||||
const timer = setInterval(()=>{
|
||||
if(this.count<data){
|
||||
this.count++
|
||||
}else{
|
||||
clearInterval(timer)
|
||||
}
|
||||
},20)
|
||||
},400)
|
||||
|
||||
}
|
||||
|
||||
//获取图表实例
|
||||
getEcharts(e, type) {
|
||||
this[type] = e
|
||||
this.initLineData()
|
||||
if (type === 'lineChart'){
|
||||
this.initLineData()
|
||||
}else{
|
||||
this.radarData = radarChartData()
|
||||
}
|
||||
|
||||
}
|
||||
setData(val,type){
|
||||
if (type === 'typeName'){
|
||||
|
@ -275,7 +246,6 @@ export default class HomeRightComponent extends Vue {
|
|||
this.timerForLineData = setInterval(() => {
|
||||
this.lineChart.clear()
|
||||
this.lineChart.setOption(this.option)
|
||||
this.getCount(this.count)
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
|
@ -287,7 +257,6 @@ export default class HomeRightComponent extends Vue {
|
|||
}
|
||||
|
||||
mounted() {
|
||||
this.getCount(70)
|
||||
this.autoChangeLineData()
|
||||
window.addEventListener("resize", this.resize);
|
||||
}
|
||||
|
|
|
@ -1,269 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="d-flex align-items-center margin-bottom-20">
|
||||
<span class="cycle-icon blue"></span>
|
||||
<span class="blue-text">确认警情</span>
|
||||
<span class="line-blue"></span>
|
||||
<span class="cycle-icon blue"></span>
|
||||
<span class="blue-text">事故研判</span>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap top-border">
|
||||
<div class="judgment-item-2">区域内人数:345</div>
|
||||
<div class="judgment-item-2">区域内车辆:45</div>
|
||||
<div class="judgment-item-2">附近危险源:4</div>
|
||||
<div class="judgment-item-2">附近应急设施:4</div>
|
||||
</div>
|
||||
<div class="top-border">
|
||||
<div class="d-flex align-items-center height-40">
|
||||
<span class="label">事故类型:</span>
|
||||
<el-select v-model="info.typeName" class="item-radius-style">
|
||||
<el-option label="人员聚集" value="人员聚集"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="d-flex align-items-center height-40">
|
||||
<span class="label">事故内容:</span>
|
||||
<span v-if="!contentFlag" >{{info.content}}</span>
|
||||
<el-input v-else @blur="showEdit('contentFlag')" v-model="info.content" class="item-radius-style"></el-input>
|
||||
<span class="edit-con" @click="showEdit('contentFlag')"><i class="el-icon-edit"></i>修改</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center height-40">
|
||||
<span class="label">事故级别:</span>
|
||||
<el-select v-model="info.levelName" class="item-radius-style">
|
||||
<el-option label="一级" value="一级"></el-option>
|
||||
<el-option label="二级" value="二级"></el-option>
|
||||
<el-option label="三级" value="三级"></el-option>
|
||||
<el-option label="四级" value="四级"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="d-flex align-items-center height-40">
|
||||
<span class="label">上报位置:</span>
|
||||
<span v-if="!positionFlag" >{{info.address}}</span>
|
||||
<i @click="changePoint(info)" v-if="!positionFlag" class="position-icon"></i>
|
||||
<el-input v-else @blur="showEdit('positionFlag')" v-model="info.address" class="item-radius-style"></el-input>
|
||||
<span class="edit-con" @click="showEdit('positionFlag')"><i class="el-icon-edit"></i>修改</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center height-40">
|
||||
<span class="label">上报人:</span>
|
||||
<span class="text">{{ info.reporter }}</span>
|
||||
<span class="phone-btn d-flex align-items-center is-justify-space-center"><img src="~@/assets/img/phone-gray.png"
|
||||
alt="">一健联系</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-border">
|
||||
<div><el-radio v-model="radio" label="1">
|
||||
<div class="d-flex align-items-center"> <span>大型活动处理预案</span> <el-rate disabled :max="3"></el-rate></div>
|
||||
|
||||
</el-radio></div>
|
||||
<div><el-radio v-model="radio" label="2">
|
||||
<div class="d-flex align-items-center"> <span>氢气爆炸处理预案</span> <el-rate disabled :max="2"></el-rate></div>
|
||||
</el-radio></div>
|
||||
<div><el-radio v-model="radio" label="3">
|
||||
<div class="d-flex align-items-center"> <span>氯气泄露处理预案</span> <el-rate disabled :max="2"></el-rate></div>
|
||||
</el-radio></div>
|
||||
<div><el-radio v-model="radio" label="4">
|
||||
<div class="d-flex align-items-center"> <span class="text-style">自定义</span> <el-select v-model="info.plan" class="item-radius-style">
|
||||
<el-option label="CO泄露处理预案" value="CO泄露处理预案"></el-option>
|
||||
<el-option label="NO泄露处理预案" value="NO泄露处理预案"></el-option>
|
||||
<el-option label="HCL泄露处理预案" value="HCL泄露处理预案"></el-option>
|
||||
</el-select></div>
|
||||
</el-radio></div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex margin-top-30 is-justify-space-center confirm-btn-group">
|
||||
<div class="confirm-btn deal-btn" @click="deal">确认</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import {Component, Emit, Prop, Vue, Watch} from 'vue-property-decorator';
|
||||
|
||||
@Component
|
||||
export default class JudgmentComponent extends Vue {
|
||||
//传入的报警信息详情
|
||||
@Prop({
|
||||
default: function () {
|
||||
return {
|
||||
}
|
||||
}
|
||||
}) infoData!: any[];
|
||||
info:any = {}
|
||||
contentFlag = false
|
||||
positionFlag = false
|
||||
radio = ''
|
||||
|
||||
@Watch('infoData', {immediate: true, deep: true})
|
||||
onChangeValue(newVal: any, oldVal: any) {
|
||||
if (newVal) {
|
||||
this.info = newVal
|
||||
}
|
||||
}
|
||||
|
||||
//表格添加类
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
if (rowIndex === 1) {
|
||||
return 'blue-row';
|
||||
}
|
||||
if (rowIndex === 2) {
|
||||
return 'yellow-row';
|
||||
}
|
||||
if (rowIndex === 3) {
|
||||
return 'orange-row';
|
||||
}
|
||||
if (rowIndex === 4) {
|
||||
return 'red-row';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
//处理信息
|
||||
@Emit()
|
||||
deal() {
|
||||
|
||||
}
|
||||
|
||||
//处理信息
|
||||
@Emit()
|
||||
cancel() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
showEdit(type){
|
||||
this[type] = !this[type]
|
||||
}
|
||||
//点击点位
|
||||
@Emit('changePoint')
|
||||
changePoint(item) {
|
||||
console.log(item)
|
||||
//
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.font-size-12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tb-info-style {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 140px;
|
||||
height: 34px;
|
||||
background: transparent;
|
||||
border-radius: 17px;
|
||||
border: 1px solid #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.deal-btn {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.confirm-btn-group {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: #7DAEFF;
|
||||
}
|
||||
|
||||
.blue-text {
|
||||
color: #7DAEFF;
|
||||
}
|
||||
|
||||
.judgment-item-2 {
|
||||
width: 50%;
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.top-border {
|
||||
border-top: 1px solid rgba(216, 216, 216, 0.4);
|
||||
padding-top: 20px;
|
||||
font-size: 14px;
|
||||
.label{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
::v-deep{
|
||||
.item-radius-style {
|
||||
width: 202px;
|
||||
.el-input__inner {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
color: #d7d7d7;
|
||||
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
color: #d7d7d7;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 5px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.el-icon-search {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
.el-radio{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.el-rate__icon{
|
||||
margin-right: 2px;
|
||||
}
|
||||
.el-radio__label{
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.phone-btn {
|
||||
width: 90px;
|
||||
height: 24px;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border-radius: 16px;
|
||||
border: 1px solid #FFFFFF;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.label{
|
||||
width: 80px;
|
||||
}
|
||||
.edit-con{
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.height-40{
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.position-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: url("~@/assets/icons/png/point.png");
|
||||
margin-left: 8px;
|
||||
|
||||
}
|
||||
.text-style{
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,98 @@
|
|||
export const pieChartData = {
|
||||
title: {
|
||||
text: '90%',
|
||||
subtext: '在线率',
|
||||
itemGap: 5,
|
||||
x: 105,
|
||||
y: '37%',
|
||||
textStyle: {
|
||||
fontSize: 30,
|
||||
fontWeight: '600',
|
||||
fontStyle: 'italic',
|
||||
color: '#E8E8E8',
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 17,
|
||||
fontWeight: 'normal',
|
||||
align: "center",
|
||||
color: '#E8E8E8'
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
right: '0%',
|
||||
top: 'bottom',
|
||||
height:100,
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
data: [
|
||||
{value: 25, name: '气体'},
|
||||
{value: 25, name: '水质'},
|
||||
{value: 15, name: '特征污染物'},
|
||||
{value: 20, name: '废气'},
|
||||
{value: 15, name: '废水'}
|
||||
],
|
||||
textStyle: {
|
||||
color: '#D4E5FF',
|
||||
padding: [5, 10, 5, 10]
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
selectedOffset: 10,
|
||||
left:-50,
|
||||
radius: [50, 75],
|
||||
data: [
|
||||
{value: 25, name: '气体',num:90},
|
||||
{value: 1, name: '',num:0},
|
||||
{value: 25, name: '水质',num:95},
|
||||
{value: 1, name: '',num:0},
|
||||
{value: 15, name: '特征污染物',num:94},
|
||||
{value: 1, name: '',num:0},
|
||||
{value: 20, name: '废气',num:91},
|
||||
{value: 1, name: '',num:0},
|
||||
{value: 15, name: '废水',num:89},
|
||||
{value: 1, name: '',num:0},
|
||||
],
|
||||
color: ['#7FB0FF', null, '#947FEA', null, '#C9FFD7', null, '#FADFA4', null, '#FFFFFF', null],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
// shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
// borderWidth:5,
|
||||
// borderColor:"rgba(255,255,255,0)",
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
},
|
||||
itemStyle: {},
|
||||
select: {
|
||||
itemStyle: {}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
tooltip:{
|
||||
backgroundColor:'rgba(0,0,0,0.4)',
|
||||
textStyle:{
|
||||
color:'#ffffff'
|
||||
},
|
||||
formatter:function (params) {
|
||||
return params.data.name+' : '+ params.data.num+'%'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
],
|
||||
animationDuration: 0,
|
||||
animationDurationUpdate: 3000,
|
||||
animationEasing: 'linear',
|
||||
animationEasingUpdate: 'linear'
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
<div class="env-left emergency-part">
|
||||
|
||||
<div class="box-content flex-0 height-auto">
|
||||
<title-component :imgSrc="imgSrc">
|
||||
训练设置
|
||||
</title-component>
|
||||
<div class="tree-box margin-top-23">
|
||||
<el-tree
|
||||
class="tree-line"
|
||||
:indent="0"
|
||||
icon-class="none"
|
||||
:data="treeData"
|
||||
>
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<span class="d-flex align-items-center">
|
||||
<!-- 判断是否存在子级数据 -->
|
||||
<div v-if="node.level === 1" class="tree-level-1-icon d-flex align-items-center is-justify-space-center">
|
||||
<img src="~@/assets/img/home/training-devices-B.png" alt="">
|
||||
</div>
|
||||
<!-- 节点展开样式 -->
|
||||
<i v-else-if="node.expanded" class="file_class font_family icon-file_open"></i>
|
||||
<!-- 节点收缩样式 -->
|
||||
<i v-else class="file_class font_family icon-file_close"></i>
|
||||
<span class="white">{{ node.label }}</span>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
v-if="!data.childSubjects || !data.childSubjects.length"
|
||||
size="mini"
|
||||
@click.stop="() => removeData(data)">
|
||||
<i class="el-icon-delete"></i>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@click.stop="() => editData(data)">
|
||||
<i class="el-icon-edit-outline"></i>
|
||||
</el-button>-->
|
||||
</span>
|
||||
</div>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content margin-top-47">
|
||||
<title-component :imgSrc="imgSrc">
|
||||
告警列表
|
||||
</title-component>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,84 @@
|
|||
import {Component, Emit, Vue} from 'vue-property-decorator';
|
||||
import template from "./viewLeft.component.html"
|
||||
import TitleComponent from "@/components/title.component.vue"
|
||||
import WarningListComponent from "@/components/warningList.component.vue"
|
||||
import * as turf from '@turf/turf'
|
||||
import Mock from "mockjs"
|
||||
import moment from "moment"
|
||||
import("@/assets/style/pageCommon.component.scss")
|
||||
|
||||
|
||||
Component.registerHooks([
|
||||
'beforeRouteLeave',
|
||||
]);
|
||||
@Component({
|
||||
template,
|
||||
components: {
|
||||
TitleComponent,
|
||||
WarningListComponent
|
||||
},
|
||||
})
|
||||
export default class ViewLeftComponent extends Vue {
|
||||
//标题左侧图标
|
||||
imgSrc = require("@/assets/icons/png/env/env-title-icon.png");
|
||||
|
||||
treeData = [{
|
||||
label: '一级 1',
|
||||
children: [{
|
||||
label: '二级 1-1',
|
||||
children: []
|
||||
}]
|
||||
}, {
|
||||
label: '一级 2',
|
||||
children: [{
|
||||
label: '二级 2-1',
|
||||
children: []
|
||||
}, {
|
||||
label: '二级 2-2',
|
||||
children: [{
|
||||
label: '三级 2-2-1'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
label: '一级 3',
|
||||
children: [{
|
||||
label: '二级 3-1',
|
||||
children: [{
|
||||
label: '三级 3-1-1'
|
||||
}]
|
||||
}, {
|
||||
label: '二级 3-2',
|
||||
children: [{
|
||||
label: '三级 3-2-1'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
|
||||
|
||||
//点击告警信息
|
||||
@Emit()
|
||||
getItem(item) {
|
||||
// console.log('item', item)
|
||||
}
|
||||
|
||||
count = 1
|
||||
|
||||
|
||||
mounted() {
|
||||
|
||||
}
|
||||
|
||||
destroyed() {
|
||||
|
||||
}
|
||||
|
||||
changeMore() {
|
||||
console.log(1)
|
||||
}
|
||||
|
||||
changeClose() {
|
||||
console.log(1)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
|
||||
export const lineChartData = function () {
|
||||
return {
|
||||
color:['#FADFA4','#947FEA'],
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
type: 'solid'
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
//x轴文字的配置
|
||||
show: true,
|
||||
interval: 0,//使x轴文字显示全
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
}
|
||||
},
|
||||
|
||||
data: ['1月','2月','3月','4月','5月']
|
||||
},
|
||||
legend: {
|
||||
top: 'top',
|
||||
itemGap: 30,
|
||||
itemWidth: 8,
|
||||
itemHeight: 8,
|
||||
textStyle: {
|
||||
// 未单独设置样式的图例(即非上下标)
|
||||
lineHeight: 12,
|
||||
verticalAlign: "middle",
|
||||
fontSize: 10,
|
||||
color: "#fff"
|
||||
},
|
||||
data:[
|
||||
{
|
||||
name:'应急事件',
|
||||
icon:'roundRect'
|
||||
},{
|
||||
name:'应急演练',
|
||||
icon:'roundRect'
|
||||
}
|
||||
]
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
type: 'solid'
|
||||
},
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#999999',
|
||||
}
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name:'应急事件',
|
||||
data: [60,80,140,70,100],
|
||||
type: 'line',
|
||||
symbolSize: 4,
|
||||
symbol: 'circle',
|
||||
lineStyle: {
|
||||
width: 2
|
||||
},
|
||||
smooth: true,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'top',
|
||||
color: '#ffffff',
|
||||
borderWidth: 0
|
||||
},
|
||||
},{
|
||||
name:'应急演练',
|
||||
data: [50,70,130,60,90],
|
||||
type: 'line',
|
||||
symbolSize: 4,
|
||||
symbol: 'circle',
|
||||
lineStyle: {
|
||||
width: 2
|
||||
},
|
||||
smooth: true,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'top',
|
||||
color: '#ffffff',
|
||||
borderWidth: 0
|
||||
},
|
||||
}
|
||||
],
|
||||
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
backgroundColor:"rgba(0,0,0,0.6)",
|
||||
borderWidth:0,
|
||||
textStyle:{
|
||||
color:"rgba(255,255,255,0.8)",
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
x: 30,
|
||||
y: 30,
|
||||
x2: 12,
|
||||
y2: 20,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const radarChartData = function () {
|
||||
return {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
backgroundColor:"rgba(0,0,0,0.6)",
|
||||
borderWidth:0,
|
||||
textStyle:{
|
||||
color:"rgba(255,255,255,0.8)",
|
||||
},
|
||||
},
|
||||
radar: {
|
||||
radius: "70%", //大小
|
||||
nameGap: 10, // 图中工艺等字距离图的距离
|
||||
center: ["50%", "50%"], // 图的位置
|
||||
name: {
|
||||
textStyle: {
|
||||
color: "rgba(255,255,255,0.8)",
|
||||
fontSize: 16
|
||||
},
|
||||
formatter: function(name) {
|
||||
return name;
|
||||
}
|
||||
},
|
||||
indicator: [
|
||||
{"name":'1月',"max":"100"},
|
||||
{"name":'2月',"max":"100"},
|
||||
{"name":'3月',"max":"100"},
|
||||
{"name":'4月',"max":"100"},
|
||||
{"name":'5月',"max":"100"},
|
||||
],
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: "rgba(153, 409, 246, 0.2)"
|
||||
},
|
||||
show:true,
|
||||
symbolSize : [20,15],
|
||||
symbolOffset:[0,15]
|
||||
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
areaStyle: {
|
||||
color: "rgba(255,0,0,0)" // 图表背景的颜色
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: "rgba(153, 209, 246, 0.2)" // 设置网格的颜色
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: "物资统计",
|
||||
type: "radar",
|
||||
symbol: "angle",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
areaStyle: { type: "default" }
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{
|
||||
symbol: "circle",
|
||||
symbolSize: 5,
|
||||
value: [70,42,63,84,75,34],
|
||||
areaStyle: { color: "rgba(125,174,255,0.5)" },
|
||||
itemStyle: {
|
||||
normal: {
|
||||
borderWidth:1,
|
||||
color: "#7FB0FF",
|
||||
borderColor: "#7FB0FF"
|
||||
}
|
||||
},
|
||||
lineStyle: {
|
||||
color: "#7FB0FF",
|
||||
width: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<div class="env-right emergency-part">
|
||||
<div class="box-content">
|
||||
<title-component :imgSrc="imgSrc">
|
||||
能耗统计
|
||||
</title-component>
|
||||
<hbt-echarts className="line-chart-emergency" :options="option"
|
||||
@onChartInit="getEcharts($event,'lineChart')"></hbt-echarts>
|
||||
</div>
|
||||
<div class="box-content flex-15 margin-top-20 device-box">
|
||||
<title-component :imgSrc="imgSrc">
|
||||
设备在线统计
|
||||
</title-component>
|
||||
<div class="energyRightTitle d-flex is-justify-space-between margin-top-23">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~@/assets/img/home/security-equipment.png" alt="">
|
||||
<span>安防设备</span>
|
||||
</div>
|
||||
<span>100<span class="grayColor">/300</span></span>
|
||||
</div>
|
||||
<div class="energyRightTitle d-flex is-justify-space-between margin-top-10">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~@/assets/img/home/training-devices.png" alt="">
|
||||
<span>训练设备</span>
|
||||
</div>
|
||||
<span>100<span class="grayColor">/300</span></span>
|
||||
</div>
|
||||
<div class="energyRightTitle d-flex is-justify-space-between margin-top-10">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~@/assets/img/home/logistics.png" alt="">
|
||||
<span>配套设备</span>
|
||||
</div>
|
||||
<span>100<span class="grayColor">/300</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content margin-top-20 emergency-part">
|
||||
<title-component :imgSrc="imgSrc">
|
||||
物资盘点
|
||||
</title-component>
|
||||
<hbt-echarts className="line-chart-emergency" :options="radarData"
|
||||
@onChartInit="getEcharts($event,'radar')"></hbt-echarts>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,290 @@
|
|||
import {Component, Emit, Vue} from 'vue-property-decorator';
|
||||
import template from "./viewRight.component.html"
|
||||
import {lineChartData,radarChartData} from "./chartData";
|
||||
import TitleComponent from "@/components/title.component.vue"
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
import("@/assets/style/pageCommon.component.scss")
|
||||
|
||||
|
||||
Component.registerHooks([
|
||||
'beforeRouteLeave',
|
||||
]);
|
||||
@Component({
|
||||
template,
|
||||
components: {
|
||||
TitleComponent,
|
||||
},
|
||||
})
|
||||
export default class ViewRightComponent extends Vue {
|
||||
//标题图片
|
||||
imgSrc = require("@/assets/icons/png/env/env-title-icon.png");
|
||||
//定时器
|
||||
timer: any = null;
|
||||
//折线图数据
|
||||
option: any = {}
|
||||
//折线图实例
|
||||
lineChart: any = {}
|
||||
//雷达图数据
|
||||
radarData: any = {}
|
||||
//折线图实例
|
||||
radar: any = {}
|
||||
|
||||
showPop = false
|
||||
showLogPop = false
|
||||
popTitle = '开启演练'
|
||||
popObj:any = {
|
||||
popTitle:'报警记录',
|
||||
type:'',
|
||||
title: '风险点异常',
|
||||
info: '',
|
||||
time: '',
|
||||
address:'',
|
||||
level: '',
|
||||
typeName:"",
|
||||
reporter:"",
|
||||
tel:"",
|
||||
position:[],
|
||||
content:"",
|
||||
typeId:"",
|
||||
plan:"",
|
||||
linkPlan:"化工园区氢气泄露处理预案",
|
||||
id:''
|
||||
|
||||
}
|
||||
typeList =[
|
||||
{
|
||||
label:'气体泄露',
|
||||
value:'normal',
|
||||
level:2,
|
||||
id:1
|
||||
},{
|
||||
label:'火灾爆炸',
|
||||
value:'fire',
|
||||
level:1,
|
||||
id:2
|
||||
},{
|
||||
label:'气液泄露',
|
||||
value:'normal',
|
||||
level:1,
|
||||
id:3
|
||||
},{
|
||||
label:'安全事故',
|
||||
value:'normal',
|
||||
level:2,
|
||||
id:4
|
||||
},{
|
||||
label:'自然灾害',
|
||||
value:'normal',
|
||||
level:3,
|
||||
id:5
|
||||
},
|
||||
]
|
||||
levelList =[
|
||||
{
|
||||
label:'一级',
|
||||
value:'1',
|
||||
id:1
|
||||
},{
|
||||
label:'二级',
|
||||
value:'2',
|
||||
id:2
|
||||
},{
|
||||
label:'三级',
|
||||
value:'3',
|
||||
id:3
|
||||
},{
|
||||
label:'四级',
|
||||
value:'4',
|
||||
id:4
|
||||
}
|
||||
]
|
||||
planList =[
|
||||
{
|
||||
label:'氢气泄露演练',
|
||||
value:'氢气泄露演练',
|
||||
id:1
|
||||
},{
|
||||
label:'氯气泄露演练',
|
||||
value:'氯气泄露演练',
|
||||
id:2
|
||||
},{
|
||||
label:'氯化氢泄露演练',
|
||||
value:'氯化氢泄露演练',
|
||||
id:3
|
||||
},{
|
||||
label:'二氧化硫泄露演练',
|
||||
value:'二氧化硫泄露演练',
|
||||
id:5
|
||||
}
|
||||
]
|
||||
linkPlanList =[
|
||||
{
|
||||
label:'化工园区氢气泄露处理预案',
|
||||
value:'化工园区氢气泄露处理预案',
|
||||
id:1
|
||||
}
|
||||
]
|
||||
tableData = [
|
||||
{
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
},{
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
}, {
|
||||
type:'火灾爆炸',
|
||||
content:'发生火灾',
|
||||
alarm:'发生火灾',
|
||||
reporter:'罗马',
|
||||
address:'A号点位',
|
||||
suggestion:'立即救援',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
//获取图表实例
|
||||
getEcharts(e, type) {
|
||||
this[type] = e
|
||||
if (type === 'lineChart'){
|
||||
this.initLineData()
|
||||
}else{
|
||||
this.radarData = radarChartData()
|
||||
}
|
||||
|
||||
}
|
||||
setData(val,type){
|
||||
if (type === 'typeName'){
|
||||
const find = this.typeList.find(item=>item.id == val) as any
|
||||
this.popObj.title = find.label
|
||||
this.popObj.type = find.value
|
||||
}
|
||||
this.popObj[type] = val
|
||||
}
|
||||
//图表自适应
|
||||
resize() {
|
||||
setTimeout(() => {
|
||||
this.lineChart.resize();
|
||||
}, 300)
|
||||
}
|
||||
|
||||
timerForLineData: any = null;
|
||||
|
||||
//自动切换line图表数据
|
||||
autoChangeLineData() {
|
||||
this.timerForLineData = setInterval(() => {
|
||||
this.lineChart.clear()
|
||||
this.lineChart.setOption(this.option)
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
//获取范围内随机数
|
||||
getRandomInt(min: number, max: number) {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.autoChangeLineData()
|
||||
window.addEventListener("resize", this.resize);
|
||||
}
|
||||
|
||||
//初始化line图表
|
||||
initLineData() {
|
||||
this.option = lineChartData()
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
clearInterval(this.timerForLineData)
|
||||
}
|
||||
|
||||
destroyed() {
|
||||
window.removeEventListener("resize", this.resize)
|
||||
}
|
||||
|
||||
//改变污染物监测颜色
|
||||
changeColor(val) {
|
||||
if (Number(val) <= 30) {
|
||||
return '#ffffff'
|
||||
} else if (Number(val) > 30 && Number(val) <= 50) {
|
||||
return '#F2A183'
|
||||
} else {
|
||||
return '#DD7171'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -4,13 +4,19 @@
|
|||
|
||||
<div class="bg-box left animate__animated">
|
||||
<div class="panel-container">
|
||||
<!-- 首页-->
|
||||
<HomeLeftComponent v-if="currentNav === 'home'" class="animate__animated animate__fadeInLeft"></HomeLeftComponent>
|
||||
<!-- 导览-->
|
||||
<ViewLeftComponent v-if="currentNav === 'view'" class="animate__animated animate__fadeInLeft"></ViewLeftComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-box right main animate__animated">
|
||||
<div class="panel-container">
|
||||
<!-- 首页-->
|
||||
<HomeRightComponent v-if="currentNav === 'home'"
|
||||
class="animate__animated animate__fadeInRight"></HomeRightComponent>
|
||||
<!-- 导览-->
|
||||
<ViewRightComponent v-if="currentNav === 'view' && viewRightShow" class="animate__animated animate__fadeInLeft"></ViewRightComponent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -6,13 +6,17 @@ import layer from "layui-layer"
|
|||
import BaseComponent from "./base.component"
|
||||
import HomeLeftComponent from "@/components/home/left/homeLeft.component";
|
||||
import HomeRightComponent from "@/components/home/right/homeRight.component";
|
||||
import ViewLeftComponent from "@/components/view/left/viewLeft.component";
|
||||
import ViewRightComponent from "@/components/view/right/viewRight.component";
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
HomeLeftComponent,
|
||||
HomeRightComponent
|
||||
HomeRightComponent,
|
||||
ViewLeftComponent,
|
||||
ViewRightComponent,
|
||||
}
|
||||
})
|
||||
export default class OverViewComponent extends BaseComponent {
|
||||
|
@ -25,6 +29,9 @@ export default class OverViewComponent extends BaseComponent {
|
|||
|
||||
// 是否展开图层
|
||||
public openLayerDrawer = false;
|
||||
//展示导览右侧
|
||||
viewRightShow = false
|
||||
|
||||
created(){
|
||||
this.warnTimer = setInterval(()=>{
|
||||
this.upDateEventList()
|
||||
|
|
Loading…
Reference in New Issue