diff --git a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/declareCpu/index.js b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/declareCpu/index.js index 9dbf1c7..9ce6374 100644 --- a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/declareCpu/index.js +++ b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/declareCpu/index.js @@ -13,7 +13,7 @@ export default { allData: { polyline: { title: "申报库CPU监控", - unit: "cpu使用率%", + unit: "使用率%", data: [{ name: "80.12.97.3", datas: ["12","15","21","18","20","37","45","23","12","5","7","14"] @@ -109,8 +109,15 @@ export default { } that.allData.polyline.data.push(resData.series[0]) - that.updateChart() + that.allData.polyline.data.map((item,index)=>{ + if(index==0){ + item.name="80.12.97.3" + }else{ + item.name="80.12.97.2" + } + }) + that.updateChart() }); }, @@ -143,7 +150,7 @@ export default { that.allData = { polyline: { title: "申报库CPU监控", - unit: "cpu使用率%", + unit: "使用率%", data: seriesData1 }, xAxis: { @@ -251,7 +258,8 @@ export default { }, legend: { - data: ["80.12.97.3","80.12.97.2"], + // data: ["80.12.97.3","80.12.97.2"], + data: legendArr, itemHeight:0,//图例圆圈大小设置 right: '5%', top: '5%', @@ -286,7 +294,7 @@ export default { }, yAxis: { type: 'value', - name:'cpu使用率%', + name:unit, nameTextStyle:{ color:'#ffffff', padding:[0,0,0,-20] diff --git a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/documentCpu/index.js b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/documentCpu/index.js index 9f9a604..8f8ae55 100644 --- a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/documentCpu/index.js +++ b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/dp/components/documentCpu/index.js @@ -12,7 +12,7 @@ export default { allData: { polyline: { title: "文书库CPU监控", - unit: "cpu使用率%", + unit: "使用率%", data: [{ name: "80.12.97.7", data: ["12","15","21","18","20","37","45","23","12","5","7","14"] @@ -104,6 +104,14 @@ export default { resData=that.res2.data } that.allData.polyline.data.push(resData.series[0]) + that.allData.polyline.data.map((item,index)=>{ + if(index==0){ + item.name="80.12.97.7" + }else{ + item.name="80.12.97.8" + + } + }) that.updateChart() }); }, @@ -135,7 +143,7 @@ export default { that.allData = { polyline: { title: "文书库CPU监控", - unit: "cpu使用率%", + unit: "使用率%", data: seriesData1 }, xAxis: { @@ -237,7 +245,8 @@ export default { }, legend: { - data: ["80.12.97.7","80.12.97.8"], + // data: ["80.12.97.7","80.12.97.8"], + data: legendArr, itemHeight:0,//图例圆圈大小设置 right: '5%', top: '5%',