各扇区通话饱和度

2024-03-21 09:20
文章标签 扇区 通话 饱和度

本文主要是介绍各扇区通话饱和度,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1、打开前端Vue项目kongguan_web,完成前端src/components/echart/SectorCallChart.vue页面设计

  • 在SectorCallChart.vue页面添加div设计
<template><div class="home"><div style="margin-left:17px;margin-top: 18px; text-align:left;"> <b>各扇区通话饱和度</b></div><el-row><el-col :span="12"><div id="G_GaugeChart" class="chart" style="margin-left: 30px"/></el-col><el-col :span="12"><div id="K_GaugeChart" class="chart" style="margin-right: 30px"/></el-col></el-row><el-row><el-col :span="12"><div id="E_GaugeChart" class="chart" style="margin-left: 30px"/></el-col><el-col :span="12"><div id="P_GaugeChart" class="chart" style="margin-right: 30px"/></el-col></el-row> <el-row><el-col :span="12"><div id="S_GaugeChart" class="chart" style="margin-left: 30px"/></el-col><el-col :span="12"><div id="kong_GaugeChart" class="chart" style="margin-right: 30px"/></el-col></el-row></div>
</template>
... 接下文 ...
  • 初始化报表数据
... 接上文 ...
<script>import {findCallSaturation} from "../../api/chartdata/chartdata"export default {name: "SectorCallChart",data() {return {data: [],e_SectorNum: 0,k_SectorNum: 0,s_SectorNum: 0,g_SectorNum: 0,p_SectorNum: 0,e_sec_chart: {},k_sec_chart: {},s_sec_chart: {},g_sec_chart: {},p_sec_chart: {},}},mounted() {this.drawSectorChart();this.loadData();},
... 接下文 ...
  • 加载数据,并初始化报表
... 接上文 ...methods: {//加载数据loadData() {findCallSaturation().then(data => {if (data.isSuccess) {this.formatData(data.result);} else {this.$message.error("数据获取失败");}});},formatData(param) {let e_SectorNum = param.Elet k_SectorNum = param.Klet s_SectorNum = param.Slet g_SectorNum = param.Glet p_SectorNum = param.Plet e_opt = this.initSectorOption({text: "E扇区", value: e_SectorNum})let k_opt = this.initSectorOption({text: "K扇区", value: k_SectorNum})let s_opt = this.initSectorOption({text: "S扇区", value: s_SectorNum})let g_opt = this.initSectorOption({text: "G扇区", value: g_SectorNum})let p_opt = this.initSectorOption({text: "P扇区", value: p_SectorNum})this.e_sec_chart.setOption(e_opt);this.k_sec_chart.setOption(k_opt);this.s_sec_chart.setOption(s_opt);this.g_sec_chart.setOption(g_opt);this.p_sec_chart.setOption(p_opt);},drawSectorChart() {this.e_sec_chart = this.$echarts.init(document.getElementById("E_GaugeChart"));this.k_sec_chart = this.$echarts.init(document.getElementById("K_GaugeChart"));this.s_sec_chart = this.$echarts.init(document.getElementById("S_GaugeChart"));this.g_sec_chart = this.$echarts.init(document.getElementById("G_GaugeChart"));this.p_sec_chart = this.$echarts.init(document.getElementById("P_GaugeChart"));},
... 接下文 ...
  • 在加载数据后,需要将数据转换为EChart所需的Option格式,所以在上面的代码中调用了initSectorOption方法,代码如下:
... 接上文 ...initSectorOption(ChartObj) {let option = {title: [{text: ChartObj.text,top: '140',x: 'center',borderColor: '#fff',backgroundColor: '#337cde',borderWidth: 1,borderRadius: 15,padding: [7, 14],textStyle: {fontWeight: 'normal',fontSize: 12,color: '#fff'}}],angleAxis: {show: false,max: 100 * 360 / 270, //-45度到225度,二者偏移值是270度除360度type: 'value',startAngle: 225, //极坐标初始角度splitLine: {show: false}},barMaxWidth: 14, //圆环宽度radiusAxis: {show: false,type: 'category',},//圆环位置和大小polar: {center: ['50%', '50%'],radius: '150'},series: [{type: "gauge",// center: t.pos,radius: "56%",// splitNumber: t.splitNum || 10,min: 0,max: 100,startAngle: 225,endAngle: -45,axisLine: {show: !0, lineStyle: {width: 1, color: [[1, "rgba(0,0,0,0)"]]}},axisTick: {show: !0, lineStyle: {color: "rgba(53,125,224,0.6)", width: 1}, length: -5},splitLine: {show: !1, length: -20, lineStyle: {color: "rgba(53,125,224,0.6)"}},axisLabel: {show: !1, distance: -20, textStyle: {fontSize: "14", fontWeight: "bold"}},pointer: {show: 0},detail: {show: 0}}, {// name: t.name,type: "gauge",// center: t.pos,radius: "75%",startAngle: 225,endAngle: -45,min: 0,max: 100,axisLine: {show: !0,lineStyle: {width: 9,color: [[ChartObj.value[0] * 10 / 100, new this.$echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: "#5ce07e"}, {offset: .5, color: "#558ed7"}, {offset: 1, color: "#fec16b"}])], [1, "#dde8fe"]]}},axisTick: {show: 0},splitLine: {show: 0},axisLabel: {show: 0},pointer: {show: !0, width: "8%", length: "50%"},itemStyle: {normal: {color: "#357de0"}},detail: {show: !0,offsetCenter: [0, "60%"],textStyle: {fontSize: 14, color: "#44d96b"},formatter: ["{value} %" ].join("\n"),rich: {name: {fontSize: 14, lineHeight: 30, color: "#ddd"},score: {backgroundColor: "#357de0",padding: [2, 10, 5, 10],lineHeight: 30,borderRadius: 10,color: "#fff",fontFamily: "微软雅黑",fontSize: 12}}},data: [ChartObj.value[0] * 10]}]};return option;}}}
</script>
... 接下文 ...
  • 页面的样式
... 接上文 ...
<style scoped>.home {height: 700px;overflow: auto;background-color: #ffffff;border: 1px solid #ebedf2;border-radius: 10px;box-shadow: 3px 3px 3px 3px #ebedf2;}.home::-webkit-scrollbar {display: none;}.chart {height: 181px;}
</style>
  • 加载数据时,会调用src/api/chartdata/chartdata.js中定义的findCallSaturation()方法,向服务端发送GET请求,获取各个扇区通话饱和度,chartdata.js的完整代码如下:
import request from '../../utils/request'
const baseUrl = "/api"
/*** 扇区架次数动态统计*/
export function findATCTime() {return request({url: baseUrl + "/atc/findATCTime",method: "GET"})
}
/*** 获取各个扇区通话饱和度*/
export function findCallSaturation() {return request({url: baseUrl + "/callSaturation/findCallSaturation",method: "GET"})
}
export function annualWarningStatisticsByCategory() {return request({url: baseUrl + "/warnFlightHistory/annualWarningStatisticsByCategory",method: "GET"})
}
export function getAirPortCount() {return request({url: baseUrl + "/company/getAirPortCount",method: "GET"})
}
/*** 获取从青岛起飞航班数前十的航线* @returns {AxiosPromise}*/
export function findByLimit() {return request({url: baseUrl + "/airLine/findByLimit",method: "GET"})
}

2、后端服务开发

  • 打开后端项目 BigData-KongGuan,编写实体类src/main/java/com/qrsoft/entity/Callsaturation.java,用于保存通话饱和度信息
package com.qrsoft.entity;import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;import java.io.Serializable;@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("callsaturation_number")
public class Callsaturation implements Serializable {@TableId(value = "id",type = IdType.AUTO)private Integer id;@TableField(value = "SEND_TIME")private String sendTime;@TableField(value = "AREA_SOURCE")private String areaSource;@TableField(value = "THBH_TIME")private String thbhTime;@TableField(value = "THBH_SECT")private String thbhSect;@TableField(value = "THBH_VALUE")private String thbhValue;
}
  • 编写数据访问类src/main/java/com/qrsoft/mapper/CallsaturationMapper.java,查询各扇区通话饱和度
package com.qrsoft.mapper;import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qrsoft.entity.Callsaturation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;import java.util.List;@Mapper
public interface CallsaturationMapper extends BaseMapper<Callsaturation> {@Select("select THBH_SECT,THBH_VALUE from callsaturation_number group by THBH_SECT;")List<Callsaturation> findCallSaturation();
}
  • 编写Service层接口类src/main/java/com/qrsoft/service/CallsaturationService.java,查询各扇区通话饱和度
package com.qrsoft.service;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qrsoft.common.Result;
import com.qrsoft.common.ResultConstants;
import com.qrsoft.entity.Callsaturation;
import com.qrsoft.mapper.CallsaturationMapper;
import org.springframework.stereotype.Service;import java.util.HashMap;
import java.util.List;
import java.util.Map;@Service
public class CallsaturationService extends ServiceImpl<CallsaturationMapper, Callsaturation> {/*** 查询各扇区通话饱和度* @return*/public Result findCallSaturation(){Map<String,String> map = new HashMap<>();List<Callsaturation> callSaturation = baseMapper.findCallSaturation();for (Callsaturation c:callSaturation ) {map.put(c.getThbhSect(),String.valueOf((Double.parseDouble(c.getThbhValue())*100)));}return new Result(ResultConstants.SUCCESS, ResultConstants.C_SUCCESS,map);}
}
  • 编写控制器类src/main/java/com/qrsoft/controller/CallSaturationController.java,查询各扇区通话饱和度
package com.qrsoft.controller;import com.qrsoft.common.Result;
import com.qrsoft.service.CallsaturationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@Api(tags = "扇区饱和度")
@RestController
@RequestMapping("/api/callSaturation")
public class CallSaturationController {@Autowiredprivate CallsaturationService service;@ApiOperation(value = "获取各个扇区通话饱和度")@GetMapping("/findCallSaturation")public Result findCallSaturation(){return service.findCallSaturation();}
}

3、前后端整合,实现设计效果

  • 打开前端Vue项目kongguan_web,在src/views/Home/Index.vue引入SectorCallChart组件
... 略 ...import AirLine from "../../components/AirLine";import Section from "../../components/Section";import Delay from "../../components/Delay";import WarnStatistice from "../../components/WarnStatistice";import SectorFlightChart from "../../components/echart/SectorFlightChart";import SectorCallChart from "../../components/echart/SectorCallChart";import {hasPermission} from "../../utils/permission";export default {data() {return {};},mounted() {},components: {AirLine,Section,Delay,WarnStatistice,SectorFlightChart,SectorCallChart},methods: {isShow(permission){return hasPermission(permission);   }}
... 略 ...
  • 在src/views/Home/Index.vue添加“扇区通话饱和度”组件,代码如下:
<el-row :gutter="30" v-show="isShow('/section/detail')"><el-col :span="16" align="center"><SectorFlightChart/></el-col><el-col :span="8" align="center"><SectorCallChart/></el-col>
</el-row>
  • src/views/Home/Index.vue的完整代码如下:
<template><div class="index"><el-row :gutter="30" v-show="isShow('/flight/airline')"><el-col :span=24 align="center"><AirLine/></el-col></el-row> <el-row :gutter="30"  v-show="isShow('/flight/section')"><el-col :span="24" align="center"><Section/></el-col></el-row><el-row :gutter="30" v-show="isShow('/flight/delay')"><el-col :span="16" align="center"><Delay/></el-col><el-col :span="8" align="center"><year-warning-chart/></el-col></el-row><el-row :gutter="30" v-show="isShow('/section/warning')"><el-col :span="12" align="center"><air-port-count-chart/></el-col><el-col :span="12" align="center"><WarnStatistice/></el-col></el-row><el-row :gutter="30" v-show="isShow('/section/detail')"><el-col :span="16" align="center"><SectorFlightChart/></el-col><el-col :span="8" align="center"><SectorCallChart/></el-col></el-row></div>
</template><script>import AirLine from "../../components/AirLine";import Section from "../../components/Section";import Delay from "../../components/Delay";import WarnStatistice from "../../components/WarnStatistice";import SectorFlightChart from "../../components/echart/SectorFlightChart";import SectorCallChart from "../../components/echart/SectorCallChart";import {hasPermission} from "../../utils/permission";export default {data() {return {};},mounted() {},components: {AirLine,Section,Delay,WarnStatistice,SectorFlightChart,SectorCallChart},methods: {isShow(permission){return hasPermission(permission);   }}};
</script><style scoped>.index {height: 100%;overflow: auto;padding-left: 44px;padding-right: 44px}.index::-webkit-scrollbar {display: none;}.caseClass {background: url('../../assets/images/index-bg.png') no-repeat;background-size: cover;margin-top: 20px;height: 284px;}.el-button {background: transparent;}
</style>
  • 确保Hadoop、Spark、Kafka、Redis、MySQL等服务均已经正常启动,如果没有正常启动,请参照前面的安装部署任务,完成这些服务的启动。

例如:查看MySQL是否正常启动。

  • 启动后端项目 BigData-KongGuan,如图启动src/main/java/com/qrsoft/BigDataKongGuanApplication.java类

  • 启动前端项目 kongguan_web,代码如下
kongguan_web@0.1.0 dev /root/kongguan_web
vue-cli-service serve --open

  • 报表的最终展示效果如下图所示:

这篇关于各扇区通话饱和度的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/832317

相关文章

ubuntu 18.04 server源码编译安装freeswitch 1.10.7支持音视频通话、收发短信——筑梦之路

软件版本说明 ubuntu版本18.04:https://releases.ubuntu.com/18.04.6/ubuntu-18.04.6-live-server-amd64.iso freeswitch 版本1.10.7:https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.7.-release.tar.gz s

Sip协议(三)- 通话接听流程

Sip协议(三)- 通话接听流程 本文主要记录下sip通信下接听的流程. 一: 接听流程 agent接听电话远端在未接听情况下主动挂断电话. 接听流程涉及到的请求有: INVITE,CANCEL,ACK,BYE 具体的过程如下: 二: sip过程 agent收到INVITE INVITE sip:1000@10.0.0.1:10000;transport=tcp SIP/2.0V

在客户自己的smarteye server上如何测试使用公网对讲PoC集群通话功能

创建用户对讲群组,可以在WEB调度台上操作,也可以在执法记录仪或者手机上操作,当然,前提是当前登录的用户有创建集群通话对讲组的权限,一般的推荐用管理员帐号去创建这些对讲组,这样最简单。 总体说明 用管理员帐号(或者有创建群组角色的用户帐号)在平台侧创建集群对讲的组,可邀请用户CU(MCP)、设备PU/MPU加入会议集群通话,然后管理员开始会议,这样,PC侧可以发言,设备侧发言需要按PTT按键发

多扇区轮询存储提高FLASH使用寿命

/********************************************************************************* @brief flash 多扇区轮询存储(用于提高flash使用寿命)******************************************************************************1.

软硬中断区别,磁盘块、扇区、页区别与之间的关系

软硬中断: 软中断是执行中断指令产生的,而硬中断是由外设引发的。 硬中断的中断号是由中断控制器提供的,软中断的中断号由指令直接指出,无需使用中断控制器。 硬中断是可屏蔽的,软中断不可屏蔽。 硬中断处理程序要确保它能快速地完成任务,这样程序执行时才不会等待较长时间,称为上半部。 软中断处理硬中断未完成的工作,是一种推后执行的机制,属于下半部。   扇区、块区、页: 扇区:硬盘的读写以

激活函数原函数和导数的绘制及饱和度-- 021

微信公众号:python宝关注可了解更多的python相关知识。若有问题或建议,请公众号留言; 内容目录 一、激活函数简介二、Sigmoid三、tanh四、ReLU      五、其它激活函数及饱和度 一、激活函数简介     深度学习的发展一般分为三个阶段,感知机-->三层神经网络-->深度学习(表示学习)。早先的感知机由于采用线性模型,无法解决异或问题,表示能力受到限制。为此三层神经网络

lotus 32GB 扇区 v0.2.6 存储时间

lotus 32GB 扇区 v0.2.6 存储时间 1,v0.2.6 存储时间2,16核32线程CPU 1,v0.2.6 存储时间 Empty Unsealed precommitted precommit Proving 用时40分钟 用时6小时33分钟 用时1小

lotus 64GB 扇区 复制证明参数

下载64GB扇区复制证明参数 设置环境变量 export IPFS_GATEWAY=https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/ lotus fetch-params 64GiB # du -sh *103G filecoin-proof-parameters 创建64GB扇区矿工号 lotus-min

lotus v1.10.0 扇区消息上链设置不聚合

lotus v1.10.0 扇区消息上链设置不聚合 [Sealing]# MaxWaitDealsSectors = 2# MaxSealingSectors = 0# MaxSealingSectorsForDeals = 0# WaitDealsDelay = "6h0m0s"# AlwaysKeepUnsealedCopy = true# Finali

lotus 扇区状态 RecoverDealIDs

miner 日志 deal may not have completed sealing before deal proposal start epoch, or deal may have been slashed # lotus-miner sectors list --fast | grep RecoverDealIDs10 RecoverDealIDs NO NO