提交 b53a975c authored 作者: 何宗全's avatar 何宗全

部分数据对接

上级 0eaa94a7
......@@ -14,9 +14,9 @@ import * as echarts from "echarts";
export default {
props: {
alarmLists: {
type: Array,
type: Object,
default: () => {
return [];
return {};
}
}
},
......@@ -25,38 +25,41 @@ export default {
lists: [
{
name: "终端告警",
key: 'terminal',
key: '1',
},
{
name: "应用告警",
key: 'application',
key: '4',
},
{
name: "机房告警",
key: 'computerData',
key: '5',
},
{
name: "网络告警",
key: 'netData',
key: '2',
},
{
name: "数据中心告警",
key: 'dataCenter',
key: '6',
},
{
name: "用户疑似违规",
key: 'userData',
key: '3',
},
],
xData: [],
yData: [],
yData1: [],
yData2: [],
yData3: [],
};
},
computed: {
option() {
let xData = this.xData
let data1 = this.yData[0] || [],
data2 = this.yData[1] || [];
let data1 = this.yData1 || []
let data2 = this.yData2 || []
let data3 = this.yData3 || []
return {
tooltip: {
......@@ -64,6 +67,39 @@ export default {
axisPointer: {
type: "shadow",
},
formatter: (data) => {
let str =
"<div style='font-family: PingFangSC-Medium;font-size: 14px;color: #000000;line-height: 1.5;margin-bottom:8px;'>" +
data[0].axisValue +
"</div>";
data.forEach((item, index) => {
let seriesName = item.seriesName;
str =
str +
"<div style='font-family: PingFangSC-Regular;color: #000000;line-height: 1.5;margin-bottom:8px;font-size:12px'>" +
"<div style='width:90px; display:inline-block;'>" +
item.marker +
seriesName +
" : " +
"</div>" +
"<div style='margin-left:.0833rem; display:inline-block;min-width:40px;text-align: right;'>" +
item.data +
"次" +
"</div>" +
"</div>";
});
str =
str +
"<div style='font-family: PingFangSC-Regular;color: #000000;line-height: 1.5;margin-bottom:8px;font-size:12px'>" +
"<div style='width:90px; display:inline-block;'>环比 : " +
"</div>" +
"<div style='margin-left:.0833rem; display:inline-block;min-width:40px;text-align: right;'>" +
data3[data[0].dataIndex] +
"%</div>" +
"</div>";
return str;
},
},
legend: {
right: "0",
......@@ -106,9 +142,7 @@ export default {
};
},
},
async mounted() {
this.setData(this.alarmLists);
},
methods: {
changeOption() {
// const data = this.option.series[0].data;
......@@ -117,22 +151,27 @@ export default {
// data.splice(index, 1, Math.random() * 40);
// });
},
setData(arr = []){
// x轴
let xData = []
this.lists.forEach((item,i)=>{
xData.push(item.name)
})
// y轴
let yData = []
arr.forEach((item,i)=>{
yData[i] = []
this.lists.forEach(ele=>{
yData[i].push(item?.[ele.key] || 0)
})
})
this.xData = xData
this.yData = yData
setData(obj = {}){
// x轴
let xData = []
this.lists.forEach((item,i)=>{
xData.push(item.name)
})
this.xData = xData
// y轴
let yData1 = [], yData2 = [], yData3 = []
this.lists.forEach(item=>{
Object.keys(obj).forEach(key=>{
if(item.key == key){
yData1.push(obj[key]?.before || 0)
yData2.push(obj[key]?.now || 0)
yData3.push(obj[key]?.hb || "0%")
}
})
})
this.yData1 = yData1
this.yData2 = yData2
this.yData3 = yData3
},
},
......
......@@ -13,9 +13,9 @@
export default {
props: {
warningLists: {
type: Array,
type: Object,
default: () => {
return [];
return {};
},
},
},
......@@ -24,32 +24,32 @@ export default {
lists: [
{
name: "终端",
key: "terminal",
key: "1",
yData: [],
},
{
name: "应用",
key: "application",
key: "4",
yData: [],
},
{
name: "机房",
key: "computerData",
key: "5",
yData: [],
},
{
name: "网络",
key: "netData",
key: "2",
yData: [],
},
{
name: "数据中心",
key: "dataCenter",
key: "6",
yData: [],
},
{
name: "用户疑似违规",
key: "userData",
key: "3",
yData: [],
},
],
......@@ -126,20 +126,20 @@ export default {
// });
},
setData(arr = []) {
let xData = [];
arr.forEach((item, i) => {
xData.push(item.date);
});
this.xData = xData;
this.lists.map((item) => {
let Data = [];
arr.forEach((ele) => {
Data.push(ele[item.key] || 0);
});
item.yData = Data;
});
setData(obj = {}) {
this.xData = Object.keys(obj)
let arr = []
Object.keys(obj).forEach((item,i) => {
arr.push(obj[item])
})
this.lists.map(item=>{
let Data = []
arr.forEach(ele=>{
Data.push(ele[item.key] || 0)
})
item.yData = Data;
})
},
},
watch: {
......
......@@ -14,19 +14,19 @@ export const terminal = [
{
label: "接入",
value: 10,
key: 'terminal_1',
key: 'terminal_biz_type_1',
color: "#1183F5",
},
{
label: "变更",
value: 10,
key: 'terminal_2',
key: 'terminal_biz_type_1_2',
color: "#F39800",
},
{
label: "撤销",
value: 10,
key: 'terminal_3',
key: 'terminal_biz_type_1_3',
color: "#959595",
},
],
......@@ -34,10 +34,10 @@ export const terminal = [
{
label: "个人证书(使用中)",
value: 1364,
key: 'certificates_all',
key: 'key_all',
unit: "个",
upValue: 106,
ratioKey: 'certificates_ratio',
ratioKey: 'key_ratio',
type: "tem1",
span: 8,
path: "/terminalSupervise/terminalStanding/certificateCollect",
......@@ -45,13 +45,13 @@ export const terminal = [
{
label: "接入",
value: 10,
key: 'certificates_1',
key: 'key_biz_type_2_1',
color: "#1183F5",
},
{
label: "撤销",
value: 10,
key: 'certificates_2',
key: 'key_biz_type_2_3',
color: "#959595",
},
],
......@@ -59,29 +59,29 @@ export const terminal = [
{
label: "单位证书(使用中)",
value: 1364,
key: 'key_all',
key: 'deptKey_all',
unit: "个",
upValue: 106,
ratioKey: 'key_ratio',
ratioKey: 'deptKey_ratio',
type: "tem1",
span: 8,
children: [
{
label: "接入",
value: 10,
key: 'key_1',
key: 'deptKey_dept_key_1',
color: "#1183F5",
},
{
label: "变更",
value: 10,
key: 'key_2',
key: 'deptKey_dept_key_2',
color: "#F39800",
},
{
label: "接入",
value: 10,
key: 'key_3',
key: 'deptKey_dept_key_3',
color: "#959595",
},
],
......@@ -92,10 +92,10 @@ export const application = [
{
label: "应用数量(监测中)",
value: 1364,
key: 'application_all',
key: 'app_all',
unit: "套",
upValue: 106,
ratioKey: 'application_ratio',
ratioKey: 'app_ratio',
type: "tem1",
span: 24,
path: "/applySupervise/applyStanding/collect",
......@@ -103,13 +103,13 @@ export const application = [
{
label: "上线",
value: 10,
key: 'application_1',
key: 'app_app_biz_1_1',
color: "#1183F5",
},
{
label: "下线",
value: 10,
key: 'application_2',
key: 'app_app_biz_1_2',
color: "#959595",
},
],
......@@ -120,7 +120,7 @@ export const computerData = [
{
label: "设备资产",
value: 1364,
key: "computerData_all",
key: "computerData_allDevice",
unit: "台",
upValue: 106,
ratioKey: 'computerData_ratio',
......@@ -131,13 +131,13 @@ export const computerData = [
{
label: "进入",
value: 10,
key: "computerData_1",
key: "computerData_sbjrDevice",
color: "#1183F5",
},
{
label: "搬出",
value: 10,
key: "computerData_2",
key: "computerData_sbbcDevice",
color: "#959595",
},
],
......@@ -149,14 +149,14 @@ export const computerData = [
{
label: "机房",
value: 1364,
key: "computerData_3",
key: "assRooms",
unit: "个",
path: "/computerSupervise/assetManagement",
},
{
label: "监测采集器",
value: 1364,
key: "computerData_4",
key: "alaDevices",
unit: "台",
style: "margin-top: 16px;",
path: "/computerSupervise/machineMonitoring/ringMonitoring",
......@@ -170,10 +170,10 @@ export const dataCenter = [
{
label: "资源实例",
value: 1364,
key: "dataCenter_all",
key: "resource_use_all",
unit: "个",
upValue: 106,
ratioKey: 'dataCenter_ratio',
ratioKey: 'resource_ratio',
type: "tem1",
span: 12,
path: "/cloudSupervise/resourceSupervisiorn/resourceMonitoring",
......@@ -181,13 +181,13 @@ export const dataCenter = [
{
label: "申请",
value: 10,
key: "dataCenter_1",
key: "resource_use_1",
color: "#1183F5",
},
{
label: "释放",
value: 10,
key: "dataCenter_2",
key: "resource_use_0",
color: "#959595",
},
],
......@@ -199,20 +199,20 @@ export const dataCenter = [
{
label: "CPU资源余量",
value: 0,
key: "dataCenter_percent_1",
key: "resource_cpuUsage",
unit: "",
},
{
label: "内存资源余量",
value: 20,
key: "dataCenter_percent_2",
key: "resource_memoryUsage",
unit: "",
style: "margin-top: 16px;",
},
{
label: "存储资源余量",
value: 80,
key: "dataCenter_percent_3",
key: "resource_diskUsage",
unit: "",
style: "margin-top: 16px;",
},
......@@ -225,10 +225,10 @@ export const netData = [
{
label: "网络接入单位",
value: 1364,
key: "netData_all",
key: "netWork_node",
unit: "家",
upValue: 106,
ratioKey: 'netData_ratio',
ratioKey: 'netWork_ratio',
type: "tem3",
span: 6,
path: "net",
......@@ -240,28 +240,28 @@ export const netData = [
{
label: "汇聚交换机",
value: 1364,
key: "netData_1",
key: "netWork_0_onlineNum",
unit: "台",
path: "net",
},
{
label: "防火墙",
value: 1364,
key: "netData_2",
key: "netWork_1_onlineNum",
unit: "台",
path: "net",
},
{
label: "核心交换机",
value: 1364,
key: "netData_3",
key: "netWork_2_onlineNum",
unit: "台",
path: "net",
},
{
label: "接入交换机",
value: 1364,
key: "netData_4",
key: "netWork_3_onlineNum",
unit: "台",
path: "net",
style: "margin-top: 16px;",
......@@ -269,15 +269,15 @@ export const netData = [
{
label: "应用服务器",
value: 1364,
key: "netData_5",
key: "netWork_4_onlineNum",
unit: "台",
path: "net",
style: "margin-top: 16px;",
},
{
label: "安全产品服务器",
label: "路由器",
value: 1364,
key: "netData_6",
key: "netWork_5_onlineNum",
unit: "台",
path: "net",
style: "margin-top: 16px;",
......@@ -291,10 +291,10 @@ export const userData = [
{
label: "内网用户",
value: 1364,
key: "userData_all",
key: "user_all",
unit: "人",
upValue: 106,
ratioKey: 'userData_ratio',
ratioKey: 'user_ratio',
type: "tem3",
span: 6,
path: "/userSupervise/userList",
......@@ -302,10 +302,10 @@ export const userData = [
{
label: "涉密用户",
value: 1364,
key: "userData_1",
key: "user_sm",
unit: "人",
upValue: 106,
ratioKey: 'userData_ratio1',
ratioKey: 'user_ratio1',
type: "tem3",
span: 6,
path: "/userSupervise/userList",
......@@ -313,10 +313,10 @@ export const userData = [
{
label: "非涉密用户",
value: 1364,
key: "userData_2",
key: "user_fsm",
unit: "人",
upValue: 106,
ratioKey: 'userData_ratio2',
ratioKey: 'user_ratio2',
type: "tem3",
span: 6,
path: "/userSupervise/userList",
......@@ -327,7 +327,7 @@ export const ywData = [
{
label: "告警派单",
value: 1364,
key: "ywData_1",
key: "alarm_handle",
unit: "单",
type: "tem3",
path: "/operation/accounts/alarm",
......@@ -336,7 +336,7 @@ export const ywData = [
{
label: "人工派单",
value: 1364,
key: "ywData_2",
key: "dispatchCount",
unit: "单",
type: "tem3",
path: "/operation/accounts/ywServer?dispatchType=1",
......@@ -345,7 +345,7 @@ export const ywData = [
{
label: "电话咨询",
value: 1364,
key: "ywData_3",
key: "telCount",
unit: "单",
type: "tem3",
path: "/operation/accounts/ywServer?dispatchType=2",
......@@ -357,7 +357,7 @@ export const fbData = [
{
label: "日常备案",
value: 1364,
key: "fbData_1",
key: "recordManagement_allRecordManagement",
unit: "个",
type: "tem3",
path: "/datas/reinsuranceBusinessManage/ponitRecordManage",
......@@ -366,7 +366,7 @@ export const fbData = [
{
label: "自测任务",
value: 1364,
key: "fbData_2",
key: "recordManagement_zc",
unit: "次",
type: "tem3",
path: "/datas/reinsuranceBusinessManage/FBTaskManage?currentIndex=1",
......@@ -375,320 +375,10 @@ export const fbData = [
{
label: "自查自测",
value: 1364,
key: "fbData_3",
key: "recordManagement_rczc",
unit: "次",
type: "tem3",
path: "/datas/reinsuranceBusinessManage/FBTaskManage?currentIndex=2",
span: 8,
},
];
export const result = {
// 终端数据
terminal: {
all: 3,
ratio: '10', //上升会下降
'1': 1,
'2': 1,
'3': 1,
},
// 个人证书数据
certificates: {
all: 0,
ratio: '-10', //上升会下降
'1': 1,
'2': 1,
},
// 单位证书数据
key: {
all: 0,
ratio: '0', //上升会下降
'1': 1,
'2': 1,
'3': 1,
},
// 应用数据
application: {
all: 0,
ratio: '10', //上升会下降
'1': 1,
'2': 1,
},
// 机房数据
computerData: {
all: 0,
ratio: '10', //上升会下降
'1': 1,
'2': 1,
'3': 3,
'4': 4,
},
// 数据中心数据
dataCenter: {
all: 0,
ratio: '10', //上升会下降
'1': 1,
'2': 1,
percent: {
1: 10,
2: 20,
3: 70
}
},
// 网络数据
netData: {
all: 0,
ratio: '10', //上升会下降
'1': 1,
'2': 1,
'3': 3,
'4': 4,
'5': 3,
'6': 4,
},
// 用户数据
userData: {
all: 0,
ratio: '0', //涉密用户上升会下降
ratio1: '-10', //涉密用户上升会下降
// ratio2: '10', //非涉密用户上升会下降
'1': 1,
'2': 1,
},
// 运维数据
ywData: {
'1': 1,
'2': 1,
'3': 1,
},
// 分保数据
fbData: {
'1': 1,
'2': 1,
'3': 1,
},
// 态势分析研判报告
report:{
value: 88,
mess: {
'analysis': '现状分析',
'problem': '问题识别',
'reason': '原因分析',
'trend': '趋势预测',
'warning': '风险预警',
}
},
// 本月场景告警环比图
alarmLists: [
{
date: '2024-9',
terminal: '1',
application: '12',
computerData: '13',
netData: '14',
dataCenter: '15',
userData: '16',
},
{
date: '2024-9',
terminal: '11',
application: '21',
computerData: '31',
netData: '41',
dataCenter: '51',
userData: '61',
}
],
// 本月场景告警趋势图
warningLists:[
{
date: '10-1',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-2',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-3',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-4',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-5',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-6',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-7',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-8',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-9',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-10',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-11',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-12',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-13',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-14',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-15',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-16',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-17',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-18',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-19',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-20',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},{
date: '10-21',
terminal: '1',
application: '2',
computerData: '3',
netData: '4',
dataCenter: '5',
userData: '6',
},
{
date: '10-22',
terminal: '17',
application: '16',
computerData: '15',
netData: '14',
dataCenter: '13',
userData: '12',
},
]
}
\ No newline at end of file
];
\ No newline at end of file
......@@ -297,7 +297,6 @@ import {
userData,
ywData,
fbData,
result,
} from "./config.js";
export default {
components: {
......@@ -348,9 +347,15 @@ export default {
const result = this.allReport.filter(item => item.data.reportTime == reportTime)[0]
this.detailData = mergeObjectsWithUnderscoreKey(result.data);
// this.detailData = mergeObjectsWithUnderscoreKey(result);
this.detailData.alarmLists = result?.data?.alarm?.hbMap || {}
this.detailData.warningLists = result?.data?.alarm?.tendencyMap || {}
if(result?.data.netWork.onlineStatus){
let arr = JSON.parse(result?.data.netWork.onlineStatus)
arr.forEach((item,i)=>{
this.detailData['netWork_'+i+'_onlineNum'] = item?.['onlineNum'] || 0
this.detailData['netWork_'+i+'_abnormalNum'] = item?.['abnormalNum'] || 0
})
}
},
// 搜索 change
searchChange(val) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论