大屏修改

This commit is contained in:
wuyy 2026-09-02 17:56:38 +08:00
parent 1c6983f3bb
commit fe7bc00f03
3 changed files with 50 additions and 17 deletions

View File

@ -5,7 +5,7 @@
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: url(../images/bg2.jpg) no-repeat; background: url(../images/bg1.jpg) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding-top: 0rem; padding-top: 0rem;
padding: 0rem 1.25rem 0 1.875rem; padding: 0rem 1.25rem 0 1.875rem;
@ -19,7 +19,7 @@
.title { .title {
width: 100%; width: 100%;
font-size: 1.875rem; font-size: 2.375rem;
line-height: 4.6875rem; line-height: 4.6875rem;
color: #0efdff; color: #0efdff;
text-align: center; text-align: center;
@ -105,6 +105,7 @@
padding: 0; padding: 0;
} }
.leftMain_top ul li .liIn { .leftMain_top ul li .liIn {
border: 0.125rem solid rgba(14, 253, 255, 0.5); border: 0.125rem solid rgba(14, 253, 255, 0.5);
width: 100%; width: 100%;

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

View File

@ -139,7 +139,16 @@ const sourceYear = ref([
]) ])
const dayCounts = ref([]) const dayCounts = ref([
{ dict_name: '检验申请', sl: 0, percent: '0%' },
{ dict_name: '标本采集', sl: 0, percent: '0%' },
{ dict_name: '标本签收', sl: 0, percent: '0%' },
{ dict_name: '标本送检', sl: 0, percent: '0%' },
{ dict_name: '上机检测', sl: 0, percent: '0%' },
{ dict_name: '结果审核', sl: 0, percent: '0%' },
{ dict_name: '申请作废', sl: 0, percent: '0%' },
{ dict_name: '标本退回', sl: 0, percent: '0%' },
])
const listData: any = ref([]) const listData: any = ref([])
@ -154,7 +163,7 @@ const getEcharts1 = (data) => {
if (!echarts1Instance) { if (!echarts1Instance) {
echarts1Instance = echarts.init(dom); echarts1Instance = echarts.init(dom);
} }
var dataAxis = data.map((item: any) => item.daynum + '日') var dataAxis = data.map((item: any) => item.daynum)
var data = data.map((item: any) => item.sl) var data = data.map((item: any) => item.sl)
const option = { const option = {
title: { text: '' }, title: { text: '' },
@ -174,6 +183,12 @@ const getEcharts1 = (data) => {
position: 'top', position: 'top',
fontSize: 14, fontSize: 14,
fontWeight: 700, fontWeight: 700,
formatter: function (params) {
if (params.value == 0) {
return '';
}
return params.value;
}
}, },
xAxis: { xAxis: {
data: dataAxis, data: dataAxis,
@ -238,7 +253,15 @@ const getEcharts3 = (data) => {
name: item.groupname, name: item.groupname,
type: 'line', type: 'line',
symbol: 'circle', symbol: 'circle',
data: item.dayline.map((v: any) => v.sl), symbolSize: 7,
// 无数据转为 null,线条自动断开
data: item.dayline.map(v => {
if (!v.sl || v.sl <= 0) {
return null
}
return v.sl
}),
connectNulls: false, // 遇到null不连线
itemStyle: { itemStyle: {
color: colors[i], color: colors[i],
}, },
@ -354,19 +377,28 @@ const getDataInfo = () => {
// 当日送检样本情况 // 当日送检样本情况
// 匹配流程数量&百分比 // 匹配流程数量&百分比
const baseNum = res.data.regStatStatusTotal['检验申请'] || 0 const baseNum = res.data.regStatStatusTotal['检验申请'] || 0
dayCounts.value = Object.entries(res.data.regStatStatusTotal).map(([dict_name, sl]) => { // dayCounts.value = Object.entries(res.data.regStatStatusTotal).map(([dict_name, sl]) => {
if (dict_name === '检验申请') { // if (dict_name === '检验申请') {
return { dict_name, sl, percent: '100%' } // return { dict_name, sl, percent: '100%' }
} // }
let p = 0 // let p = 0
if (baseNum > 0) { // if (baseNum > 0) {
p = (sl as number) / baseNum * 100 // p = (sl as number) / baseNum * 100
} // }
return { // return {
dict_name, // dict_name,
sl, // sl,
percent: p.toFixed(2) + '%' // percent: p.toFixed(2) + '%'
// }
// })
dayCounts.value.forEach(item => {
item.sl = res.data.regStatStatusTotal[item.dict_name] || 0
//检验申请占比显示100%
if (item.dict_name == '检验申请') {
item.percent = '100%'
return
} }
item.percent = (item.sl / baseNum * 100).toFixed(2) + '%'
}) })
getEcharts1(res.data.regStatMonth || []) getEcharts1(res.data.regStatMonth || [])
getEcharts3(res.data.regStatHospYear || []) getEcharts3(res.data.regStatHospYear || [])