From e4a65709cd18723fde63f3ad980484d974fcc354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=89=91=E8=B1=AA?= <764439554@qq.com> Date: Wed, 24 Aug 2022 23:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/componets/jsError/dataShow.vue | 2 - src/componets/jsError/jsDetailed.vue | 4 +- src/componets/jsError/jsRecord.vue | 1 - src/componets/jsError/mainContent.vue | 4 +- src/componets/jsError/topRight1.vue | 213 +++++++++++++------------- src/componets/leftMenu.vue | 2 + src/views/JsErrorView.vue | 9 +- 7 files changed, 115 insertions(+), 120 deletions(-) diff --git a/src/componets/jsError/dataShow.vue b/src/componets/jsError/dataShow.vue index b3e50c5..06e09fd 100644 --- a/src/componets/jsError/dataShow.vue +++ b/src/componets/jsError/dataShow.vue @@ -20,7 +20,6 @@ > -
JS错误概况
@@ -39,7 +38,6 @@ export default { data () { return { channel: "全部组件", - value1: '', value: '' } diff --git a/src/componets/jsError/jsDetailed.vue b/src/componets/jsError/jsDetailed.vue index f99dd72..a31731b 100644 --- a/src/componets/jsError/jsDetailed.vue +++ b/src/componets/jsError/jsDetailed.vue @@ -189,8 +189,6 @@ export default { } } }, - - } @@ -202,7 +200,7 @@ export default { background: linear-gradient(10deg, #081f37 0%, #123251 100%); opacity: 0.7; border: 1px solid #275079; - margin: 0 -5vw 0 4vw; + margin: 0 -5vw 0 2vw; display: flex; } .jsDetailed-left { diff --git a/src/componets/jsError/jsRecord.vue b/src/componets/jsError/jsRecord.vue index 7be1e75..2cfc711 100644 --- a/src/componets/jsError/jsRecord.vue +++ b/src/componets/jsError/jsRecord.vue @@ -31,7 +31,6 @@ export default { name: 'jsRecord', data () { return { - } }, methods: { diff --git a/src/componets/jsError/mainContent.vue b/src/componets/jsError/mainContent.vue index 342db76..74a8506 100644 --- a/src/componets/jsError/mainContent.vue +++ b/src/componets/jsError/mainContent.vue @@ -80,12 +80,12 @@ export default { padding-left: 60px; display: flex; height: 53vh; - width: 76vw; + width: 74vw; } .footerComtent { padding-left: 60px; height: 40vh; - width: 76vw; + width: 74vw; display: flex; } .title { diff --git a/src/componets/jsError/topRight1.vue b/src/componets/jsError/topRight1.vue index 41ec844..4fb3906 100644 --- a/src/componets/jsError/topRight1.vue +++ b/src/componets/jsError/topRight1.vue @@ -24,132 +24,135 @@ export default { name: 'topRight', data () { return { - health: 100 + } }, - created () { - jshealth().then(res => { - this.health = res.data.health - }) - }, + mounted () { - var chartDom = document.getElementById('heathStatus'); - var myChart = this.$echarts.init(chartDom, 'dark'); - //反方向剩下部分的样式 - - var options = { - title: { - // 图形标题(如果想要换行则使用ES6 `` 模板字符串) - // 例如: `示例 - // 这里的文字会变为第二行(因为会保留格式) - // ` - text: this.health, - subtext: '分', - left: "center",//对齐方式居中 - top: "35%",//距离顶部 - textStyle: {//文字配置 - color: "#FFFF",//文字颜色 - fontSize: 40,//字号 - align: "center"//对齐方式 - }, - subtextStyle: {//副标题文本样式{"color": "#aaa"} - color: "#FFFF",//文字颜色 - fontSize: 15,//字号 - align: "center"//对齐方式 - }, - }, - - backgroundColor: ' ', - series: [{ - type: 'pie', - clockWise: true, //顺时加载 - hoverAnimation: false, //鼠标移入变大 - //饼图半径的调节,第一个是内半径,第二个是外半径 - radius: [50, 50], - itemStyle: { - normal: { - label: { - show: false, - position: 'outside' - }, - - borderWidth: 1, - borderColor: "#A2C2C0", - } - }, - data: [{ - value: this.health, + jshealth().then(res => { + let health = res.data.health + + + var chartDom = document.getElementById('heathStatus'); + var myChart = this.$echarts.init(chartDom, 'dark'); + //反方向剩下部分的样式 + + var options = { + title: { + // 图形标题(如果想要换行则使用ES6 `` 模板字符串) + // 例如: `示例 + // 这里的文字会变为第二行(因为会保留格式) + // ` + text: health, + subtext: '分', + left: "center",//对齐方式居中 + top: "35%",//距离顶部 + textStyle: {//文字配置 + color: "#FFFF",//文字颜色 + fontSize: 40,//字号 + align: "center"//对齐方式 + }, + subtextStyle: {//副标题文本样式{"color": "#aaa"} + color: "#FFFF",//文字颜色 + fontSize: 15,//字号 + align: "center"//对齐方式 + }, }, - { - value: (100 - this.health), - name: '', + + backgroundColor: ' ', + series: [{ + type: 'pie', + clockWise: true, //顺时加载 + hoverAnimation: false, //鼠标移入变大 + //饼图半径的调节,第一个是内半径,第二个是外半径 + radius: [50, 50], itemStyle: { normal: { label: { show: false, - position: "center" + position: 'outside' }, - labelLine: { - show: false + + borderWidth: 1, + borderColor: "#A2C2C0", + + } + }, + data: [{ + value: health, + }, + { + value: (100 - health), + name: '', + itemStyle: { + normal: { + label: { + show: false, + position: "center" + }, + labelLine: { + show: false + }, + color: "rgba(0,0,0,0)", + borderColor: "rgba(0,0,0,0)", + borderWidth: 0 }, - color: "rgba(0,0,0,0)", - borderColor: "rgba(0,0,0,0)", - borderWidth: 0 - }, - emphasis: { - color: "#dedede", - borderColor: "#dedede", - borderWidth: 0 + emphasis: { + color: "#dedede", + borderColor: "#dedede", + borderWidth: 0 + } } } - } - ] - }, { - type: 'pie', - clockWise: true, - hoverAnimation: false, - radius: [65, 65], - itemStyle: { - normal: { - label: { - show: false - }, - borderWidth: 10, - borderColor: "#BA1DEF", - } - }, - data: [{ - value: this.health, - }, - { - value: (100 - this.health), - name: '', + ] + }, { + type: 'pie', + clockWise: true, + hoverAnimation: false, + radius: [65, 65], itemStyle: { normal: { label: { - show: false, - position: "center" - }, - labelLine: { show: false }, - color: "rgba(0,0,0,0)", - borderColor: "rgba(0,0,0,0)", - borderWidth: 0 - }, - emphasis: { - color: "#dedede", - borderColor: "#dedede", - borderWidth: 0 + borderWidth: 10, + borderColor: "#BA1DEF", + } + }, + data: [{ + value: health, + }, + { + value: (100 - health), + name: '', + itemStyle: { + normal: { + label: { + show: false, + position: "center" + }, + labelLine: { + show: false + }, + color: "rgba(0,0,0,0)", + borderColor: "rgba(0,0,0,0)", + borderWidth: 0 + }, + emphasis: { + color: "#dedede", + borderColor: "#dedede", + borderWidth: 0 + } } } - } - ] - },] - }; - myChart.setOption(options); + ] + },] + }; + myChart.setOption(options); + }) + } } diff --git a/src/componets/leftMenu.vue b/src/componets/leftMenu.vue index ebae4fb..e98ce2f 100644 --- a/src/componets/leftMenu.vue +++ b/src/componets/leftMenu.vue @@ -55,6 +55,8 @@ export default {