From 9dca34b089802355a813f57f1e8898af4aefb87d Mon Sep 17 00:00:00 2001 From: Mr.Shi <1878285526@qq.com> Date: 星期三, 23 八月 2023 10:13:33 +0800 Subject: [PATCH] 大屏 --- screen_standard/src/views/index.vue | 144 ++++++++++++++++++------------------------------ 1 files changed, 54 insertions(+), 90 deletions(-) diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue index 5c46b9c..20954e7 100644 --- a/screen_standard/src/views/index.vue +++ b/screen_standard/src/views/index.vue @@ -261,36 +261,6 @@ init() } }) - // router.afterEach((to) => { - // if (to.fullPath === '/') { - // if (!departId.value) return - // // data.production = [] - // // data.marginStatistics = [] - // // data.plannedProgress = [] - // // data.processProgress = [] - // // data.log = [] - // // init() - // } else { - // clearTimeout(timer.value) - // clearTimeout(timer1.value) - // clearTimeout(timer2.value) - // clearTimeout(timer3.value) - // clearTimeout(timer4.value) - // } - // }) - // router.beforeEach((to) => { - // console.log(to); - // if (to.fullPath === '/') { - // if (!departId.value) return - // init() - // } else { - // clearTimeout(timer.value) - // clearTimeout(timer1.value) - // clearTimeout(timer2.value) - // clearTimeout(timer3.value) - // clearTimeout(timer4.value) - // } - // }) start1() @@ -314,6 +284,9 @@ // 鎴愬搧璁″垝杩涘害 getWorkPlansList(companyId.value, departId.value) .then(res => { + res.forEach(item => { + item.rate = Math.trunc(item.rate) + }) data.plannedProgress = res nextTick(() => { start1() @@ -493,76 +466,67 @@ // formatter: '{a} <br/>{b} : {c} ({d}%)' // }, legend: { - show: false, - type: 'scroll', - orient: 'vertical', - right: 10, - top: 20, - bottom: 20, - data: legendData + show: false, + type: 'scroll', + orient: 'vertical', + right: 10, + top: 20, + bottom: 20, + data: legendData }, series: [ - { - // name: '濮撳悕', - type: 'pie', - - radius: ['60%', '70%'], - // avoidLabelOverlap: false, - itemStyle: { - borderRadius: 4, - borderColor: 'rgba(52, 88, 159, 0.4)', - borderWidth: 4 - }, - center: ['50%', '50%'], - labelLine: { - show: false - }, - label: { - formatter:'{dot| } {title|{b} {c}}\n\n{per|{d}%}', - rich: { - title: { - color: '#fff' + { + // name: '濮撳悕', + type: 'pie', + radius: ['60%', '70%'], + // avoidLabelOverlap: false, + itemStyle: { + borderRadius: 4, + borderColor: 'rgba(52, 88, 159, 0.4)', + borderWidth: 4 }, - per: { - color: '#01D9FE' + center: ['50%', '50%'], + labelLine: { + show: false }, - dot: { - backgroundColor: 'inherit', - width: 8, - height: 8, - borderRadius: 4 + label: { + formatter:'{dot| } {title|{b} {c}}\n\n{per|{d}%}', + rich: { + title: { + color: '#fff' + }, + per: { + color: '#01D9FE' + }, + dot: { + backgroundColor: 'inherit', + width: 8, + height: 8, + borderRadius: 4 + } + } + }, + // labelLayout: { + // hideOverlap: true + // }, + endLabel: { + show: true, + distance: 5, + color: "red" + }, + data: seriesData, + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 1)' + } } } - }, - // labelLayout: { - // hideOverlap: true - // }, - endLabel: { - show: true, - distance: 5, - color: "red" - }, - data: seriesData, - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 1)' - } - } - } ] } option && myChart.setOption(option); } - - // onBeforeUnmount(()=>{ - // clearTimeout(timer.value) - // clearTimeout(timer1.value) - // clearTimeout(timer2.value) - // clearTimeout(timer3.value) - // clearTimeout(timer4.value) - // }) onUnmounted(()=>{ clearTimeout(timer.value) clearTimeout(timer1.value) -- Gitblit v1.9.3