检验申请

This commit is contained in:
wuyy 2026-09-18 09:16:54 +08:00
parent fe7bc00f03
commit 2f88d8356b
3 changed files with 95 additions and 74 deletions

View File

@ -311,8 +311,10 @@ const saveHandle = () => {
amount: item.amount, amount: item.amount,
applyid: labpat.value.applyid, applyid: labpat.value.applyid,
uid: item.uid uid: item.uid
})) })),
barCodeList: [...new Set(sqxmCzList.value.map(item => item.barcode).filter(Boolean))]
} }
saveLoading.value = true saveLoading.value = true
saveReqInfo(data).then(res => { saveReqInfo(data).then(res => {
if (res.code == 0) { if (res.code == 0) {

View File

@ -220,6 +220,9 @@
height: 68vh; height: 68vh;
} */ } */
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li {
margin-bottom: 15px;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn { .leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn {
display: flex; display: flex;
@ -228,7 +231,6 @@
color: #fff; color: #fff;
font-size: 1.125rem; font-size: 1.125rem;
font-weight: 700; font-weight: 700;
height: 2.5rem;
} }
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_left { .leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_left {
@ -250,25 +252,7 @@
margin: auto 0; margin: auto 0;
} }
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn2 .liIn_left .bot {
background: #e7feb8;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn3 .liIn_left .bot {
background: #fdea8a;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn4 .liIn_left .bot {
background: #8ff9f8;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn5 .liIn_left .bot {
background: #d890fa;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn6 .liIn_left .bot {
background: #05d1fc;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_left zi {} .leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_left zi {}
@ -289,36 +273,30 @@
-webkit-animation: widthMove1 2s ease-in-out; -webkit-animation: widthMove1 2s ease-in-out;
} }
.leftMain_middle .line_lineIn_sy {
width: 100%;
height: 1.25rem;
background: #fcae05;
border-radius: 125rem;
-webkit-animation: widthMove2 2s ease-in-out;
}
.line_lineIn .per { .line_lineIn .per {
position: absolute; position: absolute;
top: 0; top: 0;
left: 50%; left: 50%;
} }
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn2 .liIn_line .line_lineIn { .line_lineIn_sy .per {
background: #e7feb8; position: absolute;
-webkit-animation: widthMove2 2s ease-in-out; top: -1px;
left: 30%;
font-size: 17px;
} }
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn3 .liIn_line .line_lineIn {
background: #fdea8a;
-webkit-animation: widthMove3 2s ease-in-out;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn4 .liIn_line .line_lineIn {
background: #8ff9f8;
-webkit-animation: widthMove4 2s ease-in-out;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn5 .liIn_line .line_lineIn {
background: #d890fa;
-webkit-animation: widthMove5 2s ease-in-out;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn6 .liIn_line .line_lineIn {
background: #05d1fc;
-webkit-animation: widthMove6 2s ease-in-out;
}
@-webkit-keyframes widthMove1 { @-webkit-keyframes widthMove1 {
0% { 0% {
@ -326,17 +304,17 @@
} }
100% { 100% {
width: 98.5%; width: 100%;
} }
} }
@-webkit-keyframes widthMove2 { @-webkit-keyframes widthMove2 {
0% { 0% {
width: 0%; width: 100%;
} }
100% { 100% {
width: 88.5%; width: 0%;
} }
} }
@ -437,7 +415,7 @@
font-size: 1.125rem; font-size: 1.125rem;
font-weight: 700; font-weight: 700;
margin-bottom: .625rem; margin-bottom: .625rem;
} }
.proportion ul li .liIn .liIn_left { .proportion ul li .liIn .liIn_left {
width: 50%; width: 50%;
@ -628,7 +606,7 @@
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, background: linear-gradient(to bottom,
#00d4ff, #00d4ff,
/* 顶部亮青色,和你的条形颜色呼应 */ /* 顶部亮青色,和你的条形颜色呼应 */
#0099cc #0099cc
/* 底部深蓝色,和背景协调 */ /* 底部深蓝色,和背景协调 */
); );

View File

@ -51,7 +51,7 @@
<span class="border_bg_rightBottom"></span> <span class="border_bg_rightBottom"></span>
</div> </div>
<div class="leftMain_middle_leftIn leftMain_middle_leftIn_zhe"> <div class="leftMain_middle_leftIn leftMain_middle_leftIn_zhe">
<h3>近一年送检标本数量趋势图</h3> <h3>当年送检标本数量趋势图</h3>
<div class="biaoge" style="width:100%; " ref="chartmain_zhe" id="chartmain_zhe"></div> <div class="biaoge" style="width:100%; " ref="chartmain_zhe" id="chartmain_zhe"></div>
<span class="border_bg_leftTop"></span> <span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span> <span class="border_bg_rightTop"></span>
@ -77,6 +77,16 @@
</div> </div>
<p class="num">{{ item.sl }}</p> <p class="num">{{ item.sl }}</p>
</div> </div>
<div class="liIn" v-if="item.flag">
<div class="liIn_left"> </div>
<div class="liIn_line">
<div class="line_lineIn_sy" :style="{ width: ` ${item.remainPer}` }">
<div class="per">剩余 {{ item.remain }}</div>
</div>
</div>
<p class="num"> </p>
</div>
</li> </li>
<!-- </Vue3SeamlessScroll> --> <!-- </Vue3SeamlessScroll> -->
</ul> </ul>
@ -140,14 +150,14 @@ const sourceYear = ref([
const dayCounts = ref([ const dayCounts = ref([
{ dict_name: '检验申请', sl: 0, percent: '0%' }, { dict_name: '检验申请', sl: 0, percent: '0%', flag: false },
{ dict_name: '标本采集', sl: 0, percent: '0%' }, { dict_name: '标本采集', sl: 0, percent: '0%', remain: 0, remainPer: '0%', flag: true },
{ dict_name: '标本签收', sl: 0, percent: '0%' }, { dict_name: '标本送检', sl: 0, percent: '0%', remain: 0, remainPer: '0%', flag: true },
{ dict_name: '标本送检', sl: 0, percent: '0%' }, { dict_name: '标本签收', sl: 0, percent: '0%', remain: 0, remainPer: '0%', flag: true },
{ dict_name: '上机检测', sl: 0, percent: '0%' }, { dict_name: '上机检测', sl: 0, percent: '0%', remain: 0, remainPer: '0%', flag: true },
{ dict_name: '结果审核', sl: 0, percent: '0%' }, { dict_name: '结果审核', sl: 0, percent: '0%', remain: 0, remainPer: '0%', flag: true },
{ dict_name: '申请作废', sl: 0, percent: '0%' }, { dict_name: '申请作废', sl: 0, percent: '0%', flag: false },
{ dict_name: '标本退回', sl: 0, percent: '0%' }, { dict_name: '标本退回', sl: 0, percent: '0%', flag: false },
]) ])
const listData: any = ref([]) const listData: any = ref([])
@ -277,6 +287,33 @@ const getEcharts3 = (data) => {
}, },
tooltip: { tooltip: {
trigger: 'axis', // 或 'item',根据图表类型选择 trigger: 'axis', // 或 'item',根据图表类型选择
formatter: function (params: any[]) {
let total = 0;
params.forEach(p => {
// 兼容 null / undefined,全部转为0参与求和
const val = p.value ?? 0;
const num = Number(val);
if (!isNaN(num)) {
total += num;
}
})
// 头部:月份居左,总数居右
let res = `<div style="display:flex;justify-content:space-between;color:#333;font-weight:700;margin-bottom:4px">
<span>${params[0].axisValue}</span>
<span>总数:${total}</span>
</div>`;
params.forEach(p => {
const val = p.value;
// null / undefined 显示 "-",否则显示原始数值
const showVal = (val === null || val === undefined) ? '0' : val;
res += `<div style="display:flex;justify-content:space-between;margin:3px 0;color:#333">
<span>${p.marker}${p.seriesName}</span>
<span style="margin-left: 45px;">${showVal}</span>
</div>`;
})
return res;
}
}, },
legend: { legend: {
type: 'scroll', // 开启滚动 type: 'scroll', // 开启滚动
@ -377,29 +414,33 @@ 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]) => {
// if (dict_name === '检验申请') {
// return { dict_name, sl, percent: '100%' }
// }
// let p = 0
// if (baseNum > 0) {
// p = (sl as number) / baseNum * 100
// }
// return {
// dict_name,
// sl,
// percent: p.toFixed(2) + '%'
// }
// })
dayCounts.value.forEach(item => { dayCounts.value.forEach(item => {
item.sl = res.data.regStatStatusTotal[item.dict_name] || 0 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) + '%' item.percent = (item.sl / baseNum * 100).toFixed(2) + '%'
if (item.percent.endsWith('.00%')) {
item.percent = item.percent.replace('.00%', '%')
}
}) })
const flowOrder = dayCounts.value.map(item => item.dict_name).filter(name => name !== '申请作废' && name !== '标本退回');
//初始化全部remain=0
dayCounts.value.forEach(d => d.remain = 0);
for (let i = 1; i < flowOrder.length; i++) {
const prevName = flowOrder[i - 1];
const currName = flowOrder[i];
const prevItem = dayCounts.value.find(x => x.dict_name === prevName);
const currItem = dayCounts.value.find(x => x.dict_name === currName);
if (prevItem && currItem) {
currItem.remain = prevItem.sl - currItem.sl;
if (currItem.remain < 0) currItem.remain = 0;
if (prevItem.sl > 0) {
currItem.remainPer = (currItem.remain / prevItem.sl * 100).toFixed(2) + '%';
} else {
currItem.remainPer = "0%";
}
}
}
getEcharts1(res.data.regStatMonth || []) getEcharts1(res.data.regStatMonth || [])
getEcharts3(res.data.regStatHospYear || []) getEcharts3(res.data.regStatHospYear || [])