{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\itResources.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\itResources.vue","mtime":1705604912221},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.number.constructor\";\nimport _defineProperty from \"D:/jenkins/workspace/sfz-lh-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport * as echarts from 'echarts';\nimport headline from \"./headline.vue\";\nimport commonAPI from '@/api/bigScreen/common.js';\nimport utils from '@/utils';\nexport default {\n components: {\n headline: headline\n },\n name: 'itResources',\n data: function data() {\n return {\n test: [],\n pageQuery: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n thisMenuValue: '',\n // 主数据\n mainData: {},\n // 数据组\n groupData: [{\n name: 'CPU',\n imgUrl: require(\"../../assets/img/bigScreen/icon-CPU.png\"),\n value: 0\n }, {\n name: '内存',\n imgUrl: require(\"../../assets/img/bigScreen/icon-Memory.png\"),\n value: 0\n }, {\n name: '存储',\n imgUrl: require(\"../../assets/img/bigScreen/icon-storage.png\"),\n value: 0\n }, {\n name: 'CPU使用率',\n imgUrl: require(\"../../assets/img/bigScreen/over-cpu.png\"),\n value: 0\n }, {\n name: '内存使用率',\n imgUrl: require(\"../../assets/img/bigScreen/over-Memory.png\"),\n value: 0\n }, {\n name: '存储使用率',\n imgUrl: require(\"../../assets/img/bigScreen/over-storage.png\"),\n value: 0\n }],\n loadingColor: 'rgba(6, 46, 106, 0.01)',\n loading: {\n CPUChartDataResource: false,\n MemoryChartDataResource: false,\n CloudCPUChartDataResource: false,\n CloudMemoryChartDataResource: false,\n IOChartDataResource: false,\n NetworkChartDataResource: false,\n CloudCPUData: false,\n CPUData: false\n },\n // 总物理机CPU使用率\n CPUChartOptionSource: null,\n CPUChartResource: null,\n CPUChartDataResource: [],\n // 总物理机内存负载\n MemoryChartOptionSource: null,\n MemoryChartResource: null,\n MemoryChartDataResource: [],\n // 云主机CPU使用率\n CloudCPUChartOptionSource: null,\n CloudCPUChartResource: null,\n CloudCPUChartDataResource: [],\n // 云主机内存负载\n CloudMemoryChartOptionSource: null,\n CloudMemoryChartResource: null,\n CloudMemoryChartDataResource: [],\n // 总物理磁盘IO\n IOChartOptionSource: null,\n IOChartResource: null,\n IOChartDataResource: [],\n // 网络吞吐量\n NetworkChartOptionSource: null,\n NetworkChartResource: null,\n NetworkChartDataResource: [],\n // top物理机CPU使用率数据\n CPUData: [],\n // top云主机CPU使用率数据\n CloudCPUData: [],\n tollStationId: ''\n };\n },\n mounted: function mounted() {},\n activated: function activated() {\n this.getData();\n },\n methods: {\n getData: function getData() {\n this.tollStationId = sessionStorage.getItem('tollStationId');\n this.getCpu();\n this.getItData();\n this.getPyCpuData();\n this.getPmRamData();\n this.getVmCpuData();\n this.getVmRamData();\n this.getPhysicalMdIoData();\n this.getNetworkData();\n },\n // 总物理机CPU使用率\n drawCPUChartResource: function drawCPUChartResource() {\n var _this = this;\n\n // chart 已存在则为更新数据\n if (this.CPUChartResource) {\n this.CPUChartOptionResource.xAxis.data = this.CPUChartDataResource.map(function (item) {\n return item.name;\n });\n this.CPUChartOptionResource.series[0].data = this.CPUChartDataResource.map(function (item) {\n return item.value;\n });\n this.CPUChartResource.setOption(this.CPUChartOptionResource);\n } else {\n var _tooltip;\n\n // chart 不存在则为初始化数据和图表\n this.CPUChartResource = echarts.init(document.getElementById('CPU-chart-resource'));\n this.CPUChartOptionResource = {\n color: ['#66B2FF'],\n tooltip: (_tooltip = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip, \"confine\", true), _defineProperty(_tooltip, \"position\", 'bottom'), _defineProperty(_tooltip, \"formatter\", '{b}
' + '总物理机CPU使用率:' + '{c}%'), _tooltip),\n grid: [{\n top: '18%',\n left: '10%',\n right: '6%',\n bottom: '20%'\n }],\n xAxis: {\n type: 'category',\n boundaryGap: false,\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n padding: 5,\n formatter: function formatter(val) {\n return val.slice(11, 16);\n }\n },\n data: this.CPUChartDataResource.map(function (item) {\n return item.name;\n })\n },\n yAxis: {\n name: '单位(%)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'line',\n showBackground: true,\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(102,178,255,0.3)'\n }, {\n offset: 1,\n color: 'rgba(102,178,255,0)'\n }])\n },\n data: this.CPUChartDataResource.map(function (item) {\n return item.value;\n })\n }]\n };\n this.CPUChartOptionResource && this.CPUChartResource.setOption(this.CPUChartOptionResource);\n window.addEventListener('resize', function () {\n return _this.CPUChartResource.resize();\n }); // var i = 1\n // setInterval(() => {\n // i = i + 1\n // let obj = {}\n // obj = {\n // name: i + '月',\n // value: [i + '月', 45 + i],\n // }\n // this.CPUChartDataResource.shift()\n // this.CPUChartDataResource.push(obj)\n // this.CPUChartOptionResource.series[0].data = this.CPUChartDataResource\n // this.CPUChartResource.setOption(this.CPUChartOptionResource)\n // }, 1000)\n }\n },\n // 总物理机内存负载\n drawMemoryChartResource: function drawMemoryChartResource() {\n var _this2 = this;\n\n // chart 已存在则为更新数据\n if (this.MemoryChartResource) {\n this.MemoryChartOptionSource.xAxis.data = this.MemoryChartDataResource.map(function (item) {\n return item.name;\n });\n this.MemoryChartOptionSource.series[0].data = this.MemoryChartDataResource.map(function (item) {\n return item.value;\n });\n this.MemoryChartResource.setOption(this.MemoryChartOptionSource);\n } else {\n var _tooltip2;\n\n // chart 不存在则为初始化数据和图表\n this.MemoryChartResource = echarts.init(document.getElementById('Memory-chart-resource'));\n this.MemoryChartOptionSource = {\n color: ['#55EDB0'],\n tooltip: (_tooltip2 = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip2, \"confine\", true), _defineProperty(_tooltip2, \"position\", 'bottom'), _defineProperty(_tooltip2, \"formatter\", '{b}
' + '总物理机内存负载:' + '{c}%'), _tooltip2),\n grid: [{\n top: '18%',\n left: '10%',\n right: '6%',\n bottom: '20%'\n }],\n xAxis: {\n type: 'category',\n boundaryGap: false,\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n padding: 5,\n formatter: function formatter(val) {\n return val.slice(11, 16);\n }\n },\n data: this.MemoryChartDataResource.map(function (item) {\n return item.name;\n })\n },\n yAxis: {\n max: 100,\n min: 0,\n interval: 25,\n name: '单位(%)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'line',\n showBackground: true,\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(85,237,176,0.3)'\n }, {\n offset: 1,\n color: 'rgba(85,237,176,0)'\n }])\n },\n data: this.MemoryChartDataResource.map(function (item) {\n return item.value;\n })\n }]\n };\n this.MemoryChartOptionSource && this.MemoryChartResource.setOption(this.MemoryChartOptionSource);\n window.addEventListener('resize', function () {\n return _this2.MemoryChartResource.resize();\n });\n }\n },\n // 云主机CPU使用率\n drawCloudCPUChartResource: function drawCloudCPUChartResource() {\n var _this3 = this;\n\n // chart 已存在则为更新数据\n if (this.CloudCPUChartResource) {\n this.CloudCPUChartOptionSource.xAxis.data = this.CloudCPUChartDataResource.map(function (item) {\n return item.name;\n });\n this.CloudCPUChartOptionSource.series[0].data = this.CloudCPUChartDataResource.map(function (item) {\n return item.value;\n });\n this.CloudCPUChartResource.setOption(this.CloudCPUChartOptionSource);\n } else {\n var _tooltip3;\n\n // chart 不存在则为初始化数据和图表\n this.CloudCPUChartResource = echarts.init(document.getElementById('CloudCPU-chart-resource'));\n this.CloudCPUChartOptionSource = {\n color: ['#FFDA81'],\n tooltip: (_tooltip3 = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip3, \"confine\", true), _defineProperty(_tooltip3, \"position\", 'bottom'), _defineProperty(_tooltip3, \"formatter\", '{b}
' + '云主机CPU使用率:' + '{c}%'), _tooltip3),\n grid: [{\n top: '18%',\n left: '10%',\n right: '6%',\n bottom: '20%'\n }],\n xAxis: {\n type: 'category',\n boundaryGap: false,\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n padding: 5,\n formatter: function formatter(val) {\n return val.slice(11, 16);\n }\n },\n data: this.CloudCPUChartDataResource.map(function (item) {\n return item.name;\n })\n },\n yAxis: {\n max: 100,\n min: 0,\n interval: 25,\n name: '单位(%)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'line',\n showBackground: true,\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(255,218,129,0.3)'\n }, {\n offset: 1,\n color: 'rgba(255,218,129,0)'\n }])\n },\n data: this.CloudCPUChartDataResource.map(function (item) {\n return item.value;\n })\n }]\n };\n this.CloudCPUChartOptionSource && this.CloudCPUChartResource.setOption(this.CloudCPUChartOptionSource);\n window.addEventListener('resize', function () {\n return _this3.CloudCPUChartResource.resize();\n });\n }\n },\n // 云主机内存负载\n drawCloudMemoryChartResource: function drawCloudMemoryChartResource() {\n var _this4 = this;\n\n // chart 已存在则为更新数据\n if (this.CloudMemoryChartResource) {\n this.CloudMemoryChartOptionSource.xAxis.data = this.CloudMemoryChartDataResource.map(function (item) {\n return item.name;\n });\n this.CloudMemoryChartOptionSource.series[0].data = this.CloudMemoryChartDataResource.map(function (item) {\n return item.value;\n });\n this.CloudMemoryChartResource.setOption(this.CloudMemoryChartOptionSource);\n } else {\n var _tooltip4;\n\n // chart 不存在则为初始化数据和图表\n this.CloudMemoryChartResource = echarts.init(document.getElementById('CloudMemory-chart-resource'));\n this.CloudMemoryChartOptionSource = {\n color: ['#66B2FF'],\n tooltip: (_tooltip4 = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip4, \"confine\", true), _defineProperty(_tooltip4, \"position\", 'bottom'), _defineProperty(_tooltip4, \"formatter\", '{b}
' + '云主机内存负载:' + '{c}%'), _tooltip4),\n grid: [{\n top: '18%',\n left: '10%',\n right: '6%',\n bottom: '20%'\n }],\n xAxis: {\n type: 'category',\n boundaryGap: false,\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n padding: 5,\n formatter: function formatter(val) {\n return val.slice(11, 16);\n }\n },\n data: this.CloudMemoryChartDataResource.map(function (item) {\n return item.name;\n })\n },\n yAxis: {\n max: 100,\n min: 0,\n interval: 25,\n name: '单位(%)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'line',\n showBackground: true,\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(102,178,255,0.3)'\n }, {\n offset: 1,\n color: 'rgba(102,178,255,0)'\n }])\n },\n data: this.CloudMemoryChartDataResource.map(function (item) {\n return item.value;\n })\n }]\n };\n this.CloudMemoryChartOptionSource && this.CloudMemoryChartResource.setOption(this.CloudMemoryChartOptionSource);\n window.addEventListener('resize', function () {\n return _this4.CloudMemoryChartResource.resize();\n });\n }\n },\n // 总物理机磁盘IO\n drawIOChartResource: function drawIOChartResource() {\n var _this5 = this;\n\n // chart 已存在则为更新数据\n if (this.IOChartResource) {\n this.IOChartOptionSource.dataset.source = this.IOChartDataResource;\n this.IOChartResource.setOption(this.IOChartOptionSource);\n } else {\n var _tooltip5;\n\n // chart 不存在则为初始化数据和图表\n this.IOChartResource = echarts.init(document.getElementById('IO-chart-resource'));\n this.IOChartOptionSource = {\n dataset: {\n source: this.IOChartDataResource\n },\n color: ['#66B2FF', '#55EDB0'],\n tooltip: (_tooltip5 = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip5, \"confine\", true), _defineProperty(_tooltip5, \"axisPointer\", {\n type: 'cross',\n label: {\n backgroundColor: '#6a7985'\n }\n }), _tooltip5),\n grid: [{\n top: '18%',\n left: '16%',\n right: '6%',\n bottom: '20%'\n }],\n legend: {\n data: [{\n name: '读',\n itemStyle: {\n opacity: 0\n }\n }, {\n name: '写',\n itemStyle: {\n opacity: 0\n }\n }],\n textStyle: {\n color: 'rgba(255,255,255,0.8)',\n fontSize: 10\n },\n top: '-2%'\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n padding: 5,\n formatter: function formatter(val) {\n return val.slice(11, 16);\n }\n },\n data: this.IOChartDataResource.map(function (item) {\n return item[0];\n })\n },\n yAxis: {\n name: '单位(M)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n name: '读',\n type: 'line',\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(102,178,255,0.3)'\n }, {\n offset: 1,\n color: 'rgba(102,178,255,0)'\n }])\n }\n }, {\n name: '写',\n type: 'line',\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(85,237,176,0.3)'\n }, {\n offset: 1,\n color: 'rgba(85,237,176,0)'\n }])\n }\n }]\n };\n this.IOChartOptionSource && this.IOChartResource.setOption(this.IOChartOptionSource);\n window.addEventListener('resize', function () {\n return _this5.IOChartResource.resize();\n });\n }\n },\n // 网络吞吐量\n drawNetworkChartResource: function drawNetworkChartResource() {\n var _this6 = this;\n\n // chart 已存在则为更新数据\n if (this.NetworkChartResource) {\n this.NetworkChartOptionSource.dataset.source = this.NetworkChartDataResource;\n this.NetworkChartResource.setOption(this.NetworkChartOptionSource);\n } else {\n var _tooltip6;\n\n // chart 不存在则为初始化数据和图表\n this.NetworkChartResource = echarts.init(document.getElementById('Network-chart-resource'));\n this.NetworkChartOptionSource = {\n dataset: {\n source: this.NetworkChartDataResource\n },\n color: ['#66B2FF', '#55EDB0'],\n tooltip: (_tooltip6 = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip6, \"confine\", true), _defineProperty(_tooltip6, \"axisPointer\", {\n type: 'cross',\n label: {\n backgroundColor: '#6a7985'\n }\n }), _tooltip6),\n grid: [{\n top: '18%',\n left: '16%',\n right: '6%',\n bottom: '20%'\n }],\n legend: {\n data: [{\n name: '发送',\n itemStyle: {\n opacity: 0\n }\n }, {\n name: '接收',\n itemStyle: {\n opacity: 0\n }\n }],\n textStyle: {\n color: 'rgba(255,255,255,0.8)',\n fontSize: 10\n },\n top: '-2%'\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12,\n padding: 5,\n formatter: function formatter(val) {\n return val.slice(11, 16);\n }\n },\n data: this.NetworkChartDataResource.map(function (item) {\n return item[0];\n })\n },\n yAxis: {\n name: '单位(M)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n fontSize: 12\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n name: '发送',\n type: 'line',\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(102,178,255,0.3)'\n }, {\n offset: 1,\n color: 'rgba(102,178,255,0)'\n }])\n }\n }, {\n name: '接收',\n type: 'line',\n smooth: true,\n symbol: 'none',\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(85,237,176,0.3)'\n }, {\n offset: 1,\n color: 'rgba(85,237,176,0)'\n }])\n }\n }]\n };\n this.NetworkChartOptionSource && this.NetworkChartResource.setOption(this.NetworkChartOptionSource);\n window.addEventListener('resize', function () {\n return _this6.NetworkChartResource.resize();\n });\n }\n },\n // 获取物理机cpu使用率\n getRate: function getRate() {\n var _this7 = this;\n\n var _loop = function _loop() {\n var rating = document.getElementsByClassName('CPU-rate')[j];\n var block = document.getElementsByClassName('CPU-block')[j];\n var value = document.getElementsByClassName('CPU-value')[j];\n rating.innerHTML = '';\n\n var _loop2 = function _loop2() {\n var opacity = 1 / Math.floor(_this7.CPUData[j].value * 0.766);\n var blockopacity = opacity * i;\n blockopacity = String(blockopacity);\n\n if (_this7.CPUData[j].value >= 90 && _this7.CPUData[j].value <= 100) {\n setTimeout(function () {\n rating.innerHTML += \"
\");\n value.style.color = '#FD9854';\n }, i * 25);\n } else if (_this7.CPUData[j].value >= 80 && _this7.CPUData[j].value < 90) {\n setTimeout(function () {\n rating.innerHTML += \"
\");\n value.style.color = '#FFDA81';\n }, i * 25);\n } else {\n setTimeout(function () {\n rating.innerHTML += \"
\");\n value.style.color = '#66B2FF';\n }, i * 25);\n }\n };\n\n for (i = 1; i < _this7.CPUData[j].value * 0.766; i++) {\n _loop2();\n }\n };\n\n for (var j = 0; j < this.CPUData.length; j++) {\n var i;\n\n _loop();\n }\n },\n // 获取云主机cpu使用率\n getCloudRate: function getCloudRate() {\n var _this8 = this;\n\n var _loop3 = function _loop3() {\n var rating = document.getElementsByClassName('CloudCPU-rate')[j];\n var block = document.getElementsByClassName('CloudCPU-block')[j];\n var value = document.getElementsByClassName('CloudCPU-value')[j];\n rating.innerHTML = '';\n\n var _loop4 = function _loop4() {\n var opacity = 1 / Math.floor(_this8.CloudCPUData[j].value * 0.833);\n var blockopacity = opacity * i;\n blockopacity = String(blockopacity);\n\n if (_this8.CloudCPUData[j].value >= 90 && _this8.CloudCPUData[j].value <= 100) {\n setTimeout(function () {\n rating.innerHTML += \"
\");\n value.style.color = '#FD9854';\n }, i * 25);\n } else if (_this8.CloudCPUData[j].value >= 80 && _this8.CloudCPUData[j].value < 90) {\n setTimeout(function () {\n rating.innerHTML += \"
\");\n value.style.color = '#FFDA81';\n }, i * 25);\n } else {\n setTimeout(function () {\n rating.innerHTML += \"
\");\n value.style.color = '#66B2FF';\n }, i * 25);\n }\n };\n\n for (i = 1; i < _this8.CloudCPUData[j].value * 0.833; i++) {\n _loop4();\n }\n };\n\n for (var j = 0; j < this.CloudCPUData.length; j++) {\n var i;\n\n _loop3();\n }\n },\n getCpu: function getCpu() {\n var _this9 = this;\n\n this.CPUData = [];\n this.CloudCPUData = [];\n this.loading.CPUData = true;\n this.loading.CloudCPUData = true;\n\n var _loop5 = function _loop5(i) {\n var data = _this9.qs.stringify({\n stationId: _this9.tollStationId,\n type: i\n });\n\n commonAPI.getCpu(data).then(function (res) {\n if (res) {\n for (var j = 0; j < res.length; j++) {\n var obj = {};\n var rate = 0;\n rate = res[j].useRate * 100;\n rate = rate.toFixed(2);\n\n if (rate.length < 4) {\n while (rate.length < 4) {\n rate = rate + '0';\n }\n }\n\n obj = {\n id: res[j].itSourceId,\n name: res[j].name,\n value: rate\n };\n\n if (i == 1) {\n _this9.CPUData.push(obj);\n } else if (i == 2) {\n _this9.CloudCPUData.push(obj);\n }\n }\n }\n\n _this9.$nextTick(function () {\n if (i == 1) {\n _this9.getRate();\n\n _this9.loading.CPUData = false;\n } else {\n _this9.getCloudRate();\n\n _this9.loading.CloudCPUData = false;\n }\n });\n });\n };\n\n for (var i = 1; i < 3; i++) {\n _loop5(i);\n }\n },\n getItData: function getItData() {\n var _this10 = this;\n\n this.mainData = {};\n commonAPI.getItSoutceCount(this.tollStationId, this.pageQuery).then(function (res) {\n if (res) {\n var obj = {};\n obj = {\n pyNum: res.physicalMachineNum,\n pyConnect: res.physicalMachineConnectNum,\n pyUnConnect: res.physicalMachineUnConnectNum,\n pyOther: res.physicalMachineOtherNum,\n CNum: res.cloudHostNum,\n CConnect: res.cloudHostInWorkNum,\n CUnConnect: res.cloudHostStopNum,\n COther: res.cloudHostOtherNum\n };\n _this10.mainData = obj;\n\n for (var i = 0; i < _this10.groupData.length; i++) {\n if (_this10.groupData[i].name == 'CPU使用率') {\n _this10.groupData[i].value = res.cpuRate * 100;\n _this10.groupData[i].value = Number(_this10.groupData[i].value).toFixed(2);\n\n if (_this10.groupData[i].value.length < 4) {\n while (_this10.groupData[i].value.length < 4) {\n _this10.groupData[i].value = _this10.groupData[i].value + '0';\n }\n }\n\n _this10.groupData[i].value = _this10.groupData[i].value + ' %';\n }\n\n if (_this10.groupData[i].name == '内存使用率') {\n _this10.groupData[i].value = res.mirrorServerRate * 100;\n _this10.groupData[i].value = Number(_this10.groupData[i].value).toFixed(2);\n\n if (_this10.groupData[i].value.length < 4) {\n while (_this10.groupData[i].value.length < 4) {\n _this10.groupData[i].value = _this10.groupData[i].value + '0';\n }\n }\n\n _this10.groupData[i].value = _this10.groupData[i].value + ' %';\n }\n\n if (_this10.groupData[i].name == '存储使用率') {\n _this10.groupData[i].value = res.primaryStorageRate * 100;\n _this10.groupData[i].value = Number(_this10.groupData[i].value).toFixed(2);\n\n if (_this10.groupData[i].value.length < 4) {\n while (_this10.groupData[i].value.length < 4) {\n _this10.groupData[i].value = _this10.groupData[i].value + '0';\n }\n }\n\n _this10.groupData[i].value = _this10.groupData[i].value + ' %';\n }\n\n if (_this10.groupData[i].name == 'CPU') {\n _this10.groupData[i].value = res.cpuTotal + ' 核';\n }\n\n if (_this10.groupData[i].name == '内存') {\n _this10.groupData[i].value = res.ramTotal + ' G';\n }\n\n if (_this10.groupData[i].name == '存储') {\n _this10.groupData[i].value = res.primaryStorageTotal + ' G';\n }\n }\n }\n });\n },\n // 物理cpu使用率数据\n getPyCpuData: function getPyCpuData() {\n var _this11 = this;\n\n this.CPUChartDataResource = [];\n this.loading.CPUChartDataResource = true;\n var data = this.qs.stringify({\n endDate: '',\n startDate: '',\n stationId: this.tollStationId\n });\n commonAPI.getPmCPURate(data).then(function (res) {\n if (res) {\n for (var i = 0; i < res.length; i++) {\n var obj = {\n name: res[i].transDate,\n value: (res[i].useRate * 100).toFixed(1)\n };\n\n _this11.CPUChartDataResource.push(obj);\n }\n\n _this11.loading.CPUChartDataResource = false;\n\n _this11.drawCPUChartResource();\n }\n });\n },\n // 物理内存负载数据\n getPmRamData: function getPmRamData() {\n var _this12 = this;\n\n this.MemoryChartDataResource = [];\n this.loading.MemoryChartDataResource = true;\n var data = this.qs.stringify({\n endDate: '',\n startDate: '',\n stationId: this.tollStationId\n });\n commonAPI.getPmRamRate(data).then(function (res) {\n if (res) {\n for (var i = 0; i < res.length; i++) {\n var obj = {\n name: res[i].transDate,\n value: (res[i].useRate * 100).toFixed(1)\n };\n\n _this12.MemoryChartDataResource.push(obj);\n }\n\n _this12.loading.MemoryChartDataResource = false;\n\n _this12.drawMemoryChartResource();\n }\n });\n },\n // 物理磁盘io数据\n getPhysicalMdIoData: function getPhysicalMdIoData() {\n var _this13 = this;\n\n this.IOChartDataResource = [];\n this.loading.IOChartDataResource = true;\n var data = this.qs.stringify({\n endDate: '',\n startDate: '',\n stationId: this.tollStationId\n });\n commonAPI.getPhysicalMdIo(data).then(function (res) {\n if (res) {\n for (var i = 0; i < res.length; i++) {\n var arr = [];\n arr.push(res[i].transDate);\n arr.push(res[i].physicalMdIoRead);\n arr.push(res[i].physicalMdIoWrite);\n\n _this13.IOChartDataResource.push(arr);\n }\n\n _this13.loading.IOChartDataResource = false;\n\n _this13.drawIOChartResource();\n }\n });\n },\n // 云主机cpu使用率数据\n getVmCpuData: function getVmCpuData() {\n var _this14 = this;\n\n this.CloudCPUChartDataResource = [];\n this.loading.CloudCPUChartDataResource = true;\n var data = this.qs.stringify({\n endDate: '',\n startDate: '',\n stationId: this.tollStationId\n });\n commonAPI.getVmCPURate(data).then(function (res) {\n if (res) {\n for (var i = 0; i < res.length; i++) {\n var obj = {\n name: res[i].transDate,\n value: (res[i].useRate * 100).toFixed(1)\n };\n\n _this14.CloudCPUChartDataResource.push(obj);\n }\n\n _this14.loading.CloudCPUChartDataResource = false;\n\n _this14.drawCloudCPUChartResource();\n }\n });\n },\n // 云主机内存负载数据\n getVmRamData: function getVmRamData() {\n var _this15 = this;\n\n this.CloudMemoryChartDataResource = [];\n this.loading.CloudMemoryChartDataResource = true;\n var data = this.qs.stringify({\n endDate: '',\n startDate: '',\n stationId: this.tollStationId\n });\n commonAPI.getVmRamRate(data).then(function (res) {\n if (res) {\n for (var i = 0; i < res.length; i++) {\n var obj = {\n name: res[i].transDate,\n value: (res[i].useRate * 100).toFixed(1)\n };\n\n _this15.CloudMemoryChartDataResource.push(obj);\n }\n\n _this15.loading.CloudMemoryChartDataResource = false;\n\n _this15.drawCloudMemoryChartResource();\n }\n });\n },\n // 网络吞吐量数据\n getNetworkData: function getNetworkData() {\n var _this16 = this;\n\n this.NetworkChartDataResource = [];\n this.loading.NetworkChartDataResource = true;\n var data = this.qs.stringify({\n endDate: '',\n startDate: '',\n stationId: this.tollStationId\n });\n commonAPI.getNetworkThroughput(data).then(function (res) {\n if (res) {\n for (var i = 0; i < res.length; i++) {\n var arr = [];\n arr.push(res[i].transDate);\n arr.push(res[i].networkThroughputSend);\n arr.push(res[i].networkThroughputAccept);\n\n _this16.NetworkChartDataResource.push(arr);\n }\n\n _this16.loading.NetworkChartDataResource = false;\n\n _this16.drawNetworkChartResource();\n }\n });\n }\n }\n};",null]}