This commit is contained in:
jiangs 2025-11-14 09:09:35 +08:00
commit 3af5775112
49 changed files with 9118 additions and 438 deletions

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询诊断列表
export function listdiagnosis(query) {
return request({
url: '/transitdict/diagnosis/list',
method: 'get',
params: query
})
}
// 查询诊断详细
export function getdiagnosis(diagnosisId) {
return request({
url: '/transitdict/diagnosis/' + diagnosisId,
method: 'get'
})
}
// 新增诊断
export function adddiagnosis(data) {
return request({
url: '/transitdict/diagnosis',
method: 'post',
data: data
})
}
// 修改诊断
export function updatediagnosis(data) {
return request({
url: '/transitdict/diagnosis',
method: 'put',
data: data
})
}
// 删除诊断
export function deldiagnosis(diagnosisId) {
return request({
url: '/transitdict/diagnosis/' + diagnosisId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询医疗机构列表
export function listhospital(query) {
return request({
url: '/transitdict/hospital/list',
method: 'get',
params: query
})
}
// 查询医疗机构详细
export function gethospital(hospitalId) {
return request({
url: '/transitdict/hospital/' + hospitalId,
method: 'get'
})
}
// 新增医疗机构
export function addhospital(data) {
return request({
url: '/transitdict/hospital',
method: 'post',
data: data
})
}
// 修改医疗机构
export function updatehospital(data) {
return request({
url: '/transitdict/hospital',
method: 'put',
data: data
})
}
// 删除医疗机构
export function delhospital(hospitalId) {
return request({
url: '/transitdict/hospital/' + hospitalId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询诊断列表
export function listitemclass(query) {
return request({
url: '/transitdict/itemclass/list',
method: 'get',
params: query
})
}
// 查询诊断详细
export function getitemclass(itemclassId) {
return request({
url: '/transitdict/itemclass/' + itemclassId,
method: 'get'
})
}
// 新增诊断
export function additemclass(data) {
return request({
url: '/transitdict/itemclass',
method: 'post',
data: data
})
}
// 修改诊断
export function updateitemclass(data) {
return request({
url: '/transitdict/itemclass',
method: 'put',
data: data
})
}
// 删除诊断
export function delitemclass(itemclassId) {
return request({
url: '/transitdict/itemclass/' + itemclassId,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询字典列表
export function listregdict(query) {
return request({
url: '/transitdict/regdict/list',
method: 'get',
params: query
})
}
// 查询字典详细
export function getregdict(regdictId) {
return request({
url: '/transitdict/regdict/' + regdictId,
method: 'get'
})
}
// 新增字典
export function addregdict(data) {
return request({
url: '/transitdict/regdict',
method: 'post',
data: data
})
}
// 修改字典
export function updateregdict(data) {
return request({
url: '/transitdict/regdict',
method: 'put',
data: data
})
}
// 删除字典
export function delregdict(regdictId) {
return request({
url: '/transitdict/regdict/' + regdictId,
method: 'delete'
})
}

51
src/api/regional/index.ts Normal file
View File

@ -0,0 +1,51 @@
// @ts-ignore
import request from '@/utils/request'
// 获取流转数据
export function querySample(query?: Object) {
return request({
url: '/transit/querySample',
method: 'get',
params: query
})
}
// 获取未签收的标本
export function querySampleSign(query?: Object) {
return request({
url: '/transit/querySampleSign',
method: 'get',
params: query
})
}
// 签收标本
export function sampleSign(query?: Object) {
return request({
url: '/transit/sampleSign',
method: 'post',
data: query
})
}
// 退回的标本
export function querySampleSignBack(query?: Object) {
return request({
url: '/transit/querySampleSignBack',
method: 'get',
params: query
})
}
// 标本报表
export function sampleTypeCount(query?: Object) {
return request({
url: '/transitReport/sampleTypeCount',
method: 'get',
params: query
})
}
// 标本报表费用
export function sampleitemCount(query?: Object) {
return request({
url: '/transitReport/itemCount',
method: 'get',
params: query
})
}

View File

@ -189,7 +189,7 @@ aside {
.el-form-item__label {
padding-bottom: 0px;
color: #08355E;
font-size: 12px;
font-size: .75rem;
}
// pointer-events: none;
@ -213,4 +213,77 @@ aside {
.flex-between {
display: flex;
justify-content: space-between;
}
.time-line-box {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: .35rem;
background-color: #f0f3f8;
padding: .3rem 2.5rem;
.time-line-item {
display: flex;
align-items: center;
justify-content: space-around;
width: 16.6%;
.timeline-content {
display: flex;
flex-direction: column;
align-items: center;
.index {
width: 1.875rem;
height: 1.875rem;
line-height: 1.875rem;
background: #E1E9F7;
border-radius: 50%;
text-align: center;
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 500;
font-size: 1.125rem;
color: #4767A3;
}
.active {
background-color: #4096ff;
box-shadow: 0 0 0 .25rem rgba(64, 150, 255, 0.2);
color: #FFF;
}
.timeline-title {
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 500;
font-size: 1rem;
color: #4767A3;
}
.timeline-time {
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
font-size: .875rem;
color: #4767A3;
height: 1rem;
}
}
.no_active {
.index,
.timeline-title {
color: #9b9999 !important;
}
}
.timg {
width: 3.125rem;
}
}
}

View File

@ -162,6 +162,11 @@
line-height: 30px;
}
.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
background-color: #a4beef !important;
color: #000 !important;
}
.cell.el-tooltip {
padding: 0 !important;
height: 30px;

View File

@ -61,7 +61,7 @@
<!-- 分页组件 -->
<div v-if="pagination.show" class="pagination-wrapper">
<el-pagination v-model:current-page="currentPage" v-model:page-size="currentPageSize" :total="pagination.total"
:page-sizes="pagination.pageSizes || [10, 20, 50, 100]"
:size="aotuSize" :page-sizes="pagination.pageSizes || [10, 20, 50, 100]"
:layout="pagination.layout || 'total, sizes, prev, pager, next, jumper'"
:background="pagination.background !== false" :small="pagination.small || false"
:disabled="pagination.disabled || false" @size-change="handleSizeChange"
@ -72,6 +72,8 @@
<script setup lang="ts">
import { computed, ref, watch, PropType, onMounted } from "vue";
import { TableColumnCtx } from 'element-plus';
import { classCom } from "@/utils/classCom";
const aotuSize = classCom.useAutoSize();
// @ts-ignore
import Sortable from 'sortablejs'; // 引入sortablejs
interface TableColumn {
@ -395,8 +397,7 @@ defineExpose({
display: flex;
align-items: center;
justify-content: flex-end;
padding: 12px 0;
margin-top: 16px;
padding: .3125rem 0;
margin-right: 20px;
}

View File

@ -1,17 +1,10 @@
<template>
<div id="tags-view-container" class="tags-view-container">
<scroll-pane ref="scrollPaneRef" class="tags-view-wrapper" @scroll="handleScroll">
<router-link
v-for="tag in visitedViews"
:key="tag.path"
:data-path="tag.path"
:class="isActive(tag) ? 'active' : ''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
class="tags-view-item"
:style="activeStyle(tag)"
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent="openMenu(tag, $event)"
>
<router-link v-for="tag in visitedViews" :key="tag.path" :data-path="tag.path"
:class="isActive(tag) ? 'active' : ''" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
class="tags-view-item" :style="activeStyle(tag)" @click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent="openMenu(tag, $event)">
{{ tag.title }}
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
<close class="el-icon-close" style="width: 1em; height: 1em;vertical-align: middle;" />
@ -133,7 +126,7 @@ function initTags() {
for (const tag of res) {
// Must have tag name
if (tag.name) {
useTagsViewStore().addVisitedView(tag)
useTagsViewStore().addVisitedView(tag)
}
}
}
@ -243,73 +236,91 @@ function handleScroll() {
<style lang='scss' scoped>
.tags-view-container {
height: 34px; /* 稍微增加高度,让立体效果更明显 */
height: 2.125rem;
/* 稍微增加高度,让立体效果更明显 */
width: 100%;
background: #f5f7fa; /* 标签栏整体背景(浅灰,与标签区分) */
background: #f5f7fa;
/* 标签栏整体背景(浅灰,与标签区分) */
/* 1. 去掉底部边框(关键:消除物理边框导致的缝隙) */
border-bottom: none;
/* 2. 弱化或去掉标签栏的底部阴影(避免阴影造成视觉缝隙) */
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02); /* 仅保留极浅的顶部阴影 */
box-shadow: 0 .0625rem .125rem rgba(0, 0, 0, 0.02);
/* 仅保留极浅的顶部阴影 */
/* 标签栏底部加一条浅线,区分标签栏和下方页面 */
border-bottom: 1px solid #e0e0e0;
border-bottom: .0625rem solid #e0e0e0;
.tags-view-wrapper {
.tags-view-item {
/* 未激活标签:灰色渐变+立体阴影 */
display: inline-block;
position: relative;
cursor: pointer;
height: 28px;
line-height: 28px;
padding: 0 12px;
font-size: 12px;
margin-left: 4px;
margin-top: 4px;
border-radius: 4px 4px 0 0; /* 底部圆角去掉,与下方无缝感 */
border: 1px solid #d0d0d0; /* 浅灰边框 */
border-bottom-color: transparent; /* 底部边框透明,避免与标签栏线重叠 */
/* 未激活标签:灰色渐变+立体阴影 */
display: inline-block;
position: relative;
cursor: pointer;
height: 1.75rem;
line-height: 1.75rem;
padding: 0 .75rem;
font-size: .75rem;
margin-left: .25rem;
margin-top: .25rem;
border-radius: .25rem .25rem 0 0;
/* 底部圆角去掉,与下方无缝感 */
border: 1px solid #d0d0d0;
/* 浅灰边框 */
border-bottom-color: transparent;
/* 底部边框透明,避免与标签栏线重叠 */
/* 灰色渐变:从上到下浅灰→深灰(模拟轻微凸起) */
/* 灰色渐变:从上到下浅灰→深灰(模拟轻微凸起) */
background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
/* 立体阴影:底部轻微阴影+顶部内高光 */
box-shadow:
0 2px 4px rgba(0, 0, 0, 0.1),
/* 底部阴影加深,突出悬浮感 */
inset 0 1px 1px rgba(255, 255, 255, 0.8);
/* 顶部内高光,增强凸起感 */
color: #777;
/* 文字灰色,不抢眼 */
transition: all 0.2s ease;
/* 过渡动画 */
/* 鼠标悬停时增强效果(未激活状态) */
&:hover:not(.active) {
background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
box-shadow:
0 2px 4px rgba(0, 0, 0, 0.1), /* 底部阴影加深,突出悬浮感 */
inset 0 1px 1px rgba(255, 255, 255, 0.8); /* 顶部内高光,增强凸起感 */
color: #777; /* 文字灰色,不抢眼 */
transition: all 0.2s ease; /* 过渡动画 */
/* 鼠标悬停时增强效果(未激活状态) */
&:hover:not(.active) {
background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
box-shadow:
0 3px 4px rgba(0, 0, 0, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.9);
border-color: #d0d0d0;
color: #333; /* hover时文字略深 */
}
0 3px 4px rgba(0, 0, 0, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.9);
border-color: #d0d0d0;
color: #333;
/* hover时文字略深 */
}
/* 激活标签样式:深色渐变+强阴影,突出当前页 */
&.active {
/* 激活标签:从左到右的主题色渐变(示例用蓝紫色) */
background: linear-gradient(90deg, #409eff 0%, #6b7aff 100%);
color: #ffffff; /* 文字白色,与渐变背景对比 */
border-color: #409eff; /* 边框与渐变颜色匹配 */
box-shadow: 0 3px 6px rgba(64, 158, 255, 0.25), /* 外阴影(带颜色倾向,增强立体感) */
inset 0 1px 0 rgba(255, 255, 255, 0.2); /* 内阴影(顶部亮边,模拟高光) */
transform: translateY(-1px); /* 轻微上浮,与其他标签区分 */
color: #ffffff;
/* 文字白色,与渐变背景对比 */
border-color: #409eff;
/* 边框与渐变颜色匹配 */
box-shadow: 0 3px 6px rgba(64, 158, 255, 0.25),
/* 外阴影(带颜色倾向,增强立体感) */
inset 0 1px 0 rgba(255, 255, 255, 0.2);
/* 内阴影(顶部亮边,模拟高光) */
transform: translateY(-1px);
/* 轻微上浮,与其他标签区分 */
&::before {
content: "";
background: #fff;
display: inline-block;
width: 8px;
height: 8px;
width: .5rem;
height: .5rem;
border-radius: 50%;
position: relative;
margin-right: 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 小圆圈阴影,增强立体 */
margin-right: .3125rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
/* 小圆圈阴影,增强立体 */
}
}
}
@ -327,16 +338,20 @@ function handleScroll() {
font-size: 12px;
font-weight: 400;
color: #333;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), /* 外阴影 */
inset 0 1px 0 rgba(255, 255, 255, 0.8); /* 内阴影 */
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15),
/* 外阴影 */
inset 0 1px 0 rgba(255, 255, 255, 0.8);
/* 内阴影 */
border: 1px solid #e5e7eb;
li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
&:hover {
background: #f0f5ff; /* hover 时浅蓝色背景,与整体风格呼应 */
background: #f0f5ff;
/* hover 时浅蓝色背景,与整体风格呼应 */
}
}
}
@ -348,23 +363,25 @@ function handleScroll() {
.tags-view-wrapper {
.tags-view-item {
.el-icon-close {
width: 16px;
height: 16px;
vertical-align: 2px;
width: 1rem;
height: 1rem;
vertical-align: .125rem;
border-radius: 50%;
text-align: center;
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transform-origin: 100% 50%;
&:before {
transform: scale(0.6);
display: inline-block;
vertical-align: -3px;
vertical-align: -0.1875rem;
}
&:hover {
background-color: #b4bccc;
color: #fff;
width: 12px !important;
height: 12px !important;
width: .75rem !important;
height: .75rem !important;
}
}
}

View File

@ -9,11 +9,11 @@
value-format="YYYY-MM-DD HH:mm:ss" @change="handletime" style="width: 25rem;" />
</el-form-item>
<el-form-item label="医疗机构:" prop="yljg">
<!-- <el-form-item label="医疗机构:" prop="yljg">
<el-select v-model="queryParams.yljg" placeholder="请选择" style="width: 9.37rem;">
<el-option v-for="item in dictData.HOS" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="条码状态:" prop="zt">
<el-select v-model="queryParams.zt" placeholder="请选择" style="width: 6.25rem;">
<el-option v-for="item in dictData.ST" :key="item.value" :label="item.label" :value="item.value" />
@ -113,10 +113,10 @@
<!-- 样本流程 -->
<div class="time-line-box">
<div v-for="(item, i) in timelineItems" :key="i" class="time-line-item">
<div v-if="i != 0 && item.time" class="timeline-connector">
<div v-if="i != 0" class="timeline-connector">
<img class="timg" src="@/assets/images/yjt.png" alt="">
</div>
<div class="timeline-content">
<div :class="['timeline-content', i > lastTimeIndex ? 'no_active' : '']">
<div :class="['index', lastTimeIndex == i ? 'active' : '']">{{ i + 1 }}</div>
<div class="timeline-title">{{ item.title }}</div>
<div class="timeline-time">{{ item.time }}</div>

View File

@ -133,10 +133,10 @@
<!-- 样本流程 -->
<div class="time-line-box">
<div v-for="(item, i) in timelineItems" :key="i" class="time-line-item">
<div v-if="i != 0 && item.time" class="timeline-connector">
<div v-if="i != 0" class="timeline-connector">
<img class="timg" src="@/assets/images/yjt.png" alt="">
</div>
<div class="timeline-content">
<div :class="['timeline-content', i > lastTimeIndex ? 'no_active' : '']">
<div :class="['index', lastTimeIndex == i ? 'active' : '']">{{ i + 1 }}</div>
<div class="timeline-title">{{ item.title }}</div>
<div class="timeline-time">{{ item.time }}</div>

View File

@ -0,0 +1,11 @@
<template>
<div>
<!-- 微生物检验录入界面 -->
</div>
</template>
<script setup lang="ts">
</script>
<style scoped></style>

View File

@ -14,8 +14,9 @@
<el-table-column prop="sflbdh" label="分单类别代号" width="110">
<template #default="scope">
<template v-if="isEditing(scope.row, 'sflbdh')">
<el-input v-model="scope.row.sflbdh" size="small" @blur="handleSave(scope.row, 'sflbdh')"
@keyup.enter="handleSave(scope.row, 'sflbdh')" auto-focus :ref="getInputRef(scope.row.id, 'sflbdh')" />
<el-input v-model="scope.row.sflbdh" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'sflbdh')" @keyup.enter="handleSave(scope.row, 'sflbdh')" auto-focus
:ref="getInputRef(scope.row.id, 'sflbdh')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'sflbdh' })">
@ -29,8 +30,9 @@
<el-table-column prop="sflbmc" label="类别名称" width="150">
<template #default="scope">
<template v-if="isEditing(scope.row, 'sflbmc')">
<el-input v-model="scope.row.sflbmc" size="small" @blur="handleSave(scope.row, 'sflbmc')"
@keyup.enter="handleSave(scope.row, 'sflbmc')" auto-focus :ref="getInputRef(scope.row.id, 'sflbmc')" />
<el-input v-model="scope.row.sflbmc" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'sflbmc')" @keyup.enter="handleSave(scope.row, 'sflbmc')" auto-focus
:ref="getInputRef(scope.row.id, 'sflbmc')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'sflbmc' })">
@ -44,8 +46,9 @@
<el-table-column prop="sflbjc" label="类别简称" width="120">
<template #default="scope">
<template v-if="isEditing(scope.row, 'sflbjc')">
<el-input v-model="scope.row.sflbjc" size="small" @blur="handleSave(scope.row, 'sflbjc')"
@keyup.enter="handleSave(scope.row, 'sflbjc')" auto-focus :ref="getInputRef(scope.row.id, 'sflbjc')" />
<el-input v-model="scope.row.sflbjc" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'sflbjc')" @keyup.enter="handleSave(scope.row, 'sflbjc')" auto-focus
:ref="getInputRef(scope.row.id, 'sflbjc')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'sflbjc' })">
@ -59,8 +62,9 @@
<el-table-column prop="txmlb" label="条码类别" width="110">
<template #default="scope">
<template v-if="isEditing(scope.row, 'txmlb')">
<el-input v-model="scope.row.txmlb" size="small" @blur="handleSave(scope.row, 'txmlb')"
@keyup.enter="handleSave(scope.row, 'txmlb')" auto-focus :ref="getInputRef(scope.row.id, 'txmlb')" />
<el-input v-model="scope.row.txmlb" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'txmlb')" @keyup.enter="handleSave(scope.row, 'txmlb')" auto-focus
:ref="getInputRef(scope.row.id, 'txmlb')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'txmlb' })">
@ -74,8 +78,8 @@
<el-table-column prop="yblx" label="标本类型" width="140">
<template #default="scope">
<template v-if="isEditing(scope.row, 'yblx')">
<el-select v-model="scope.row.yblx" size="small" @change="handleSave(scope.row, 'yblx')"
@blur="handleSave(scope.row, 'yblx')" auto-focus filterable>
<el-select v-model="scope.row.yblx" size="small" class="full-width-input"
@change="handleSave(scope.row, 'yblx')" @blur="handleSave(scope.row, 'yblx')" auto-focus filterable>
<el-option v-for="item in dictData.BT" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</template>
@ -91,9 +95,9 @@
<el-table-column prop="sampletips" label="标本采集说明" width="220">
<template #default="scope">
<template v-if="isEditing(scope.row, 'sampletips')">
<el-input v-model="scope.row.sampletips" size="small" @blur="handleSave(scope.row, 'sampletips')"
@keyup.enter.ctrl="handleSave(scope.row, 'sampletips')" auto-focus
:ref="getInputRef(scope.row.id, 'sampletips')" />
<el-input v-model="scope.row.sampletips" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'sampletips')" @keyup.enter.ctrl="handleSave(scope.row, 'sampletips')"
auto-focus :ref="getInputRef(scope.row.id, 'sampletips')" />
</template>
<template v-else>
<div class="multi-line-text" @click.stop="handleCellClick(scope.row, { property: 'sampletips' })">
@ -107,8 +111,8 @@
<el-table-column prop="bglqdh" label="报告领取规则" width="160">
<template #default="scope">
<template v-if="isEditing(scope.row, 'bglqdh')">
<el-select v-model="scope.row.bglqdh" size="small" @change="handleSave(scope.row, 'bglqdh')" filterable
@blur="handleSave(scope.row, 'bglqdh')" auto-focus>
<el-select v-model="scope.row.bglqdh" size="small" class="full-width-input"
@change="handleSave(scope.row, 'bglqdh')" filterable @blur="handleSave(scope.row, 'bglqdh')" auto-focus>
<el-option v-for="item in reportRuleOptions" :key="item.bglqdh" :label="item.bglqmc"
:value="item.bglqdh" />
</el-select>
@ -125,7 +129,7 @@
<el-table-column prop="printcnt" label="打印份数" width="120" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'printcnt')">
<el-input-number v-model="scope.row.printcnt" :min="1" :max="9" size="small"
<el-input-number v-model="scope.row.printcnt" class="full-width-input" :min="1" :max="9" size="small"
@blur="handleSave(scope.row, 'printcnt')" @keyup.enter="handleSave(scope.row, 'printcnt')" auto-focus
:ref="getInputRef(scope.row.id, 'printcnt')" />
</template>
@ -141,8 +145,9 @@
<el-table-column prop="lisgroup1" label="专业组(样本数)" width="140" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'lisgroup1')">
<el-select v-model="scope.row.lisgroup1" size="small" @change="handleSave(scope.row, 'lisgroup1')"
@blur="handleSave(scope.row, 'lisgroup1')" auto-focus filterable>
<el-select v-model="scope.row.lisgroup1" size="small" class="full-width-input"
@change="handleSave(scope.row, 'lisgroup1')" @blur="handleSave(scope.row, 'lisgroup1')" auto-focus
filterable>
<el-option v-for="item in dictData.LISGROUP1" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</template>
@ -158,8 +163,9 @@
<el-table-column prop="lisgroup2" label="专业组(周转时间)" width="160" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'lisgroup2')">
<el-select v-model="scope.row.lisgroup2" size="small" @change="handleSave(scope.row, 'lisgroup2')"
@blur="handleSave(scope.row, 'lisgroup2')" auto-focus filterable>
<el-select v-model="scope.row.lisgroup2" size="small" class="full-width-input"
@change="handleSave(scope.row, 'lisgroup2')" @blur="handleSave(scope.row, 'lisgroup2')" auto-focus
filterable>
<el-option v-for="item in dictData.LISGROUP2" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</template>
@ -203,9 +209,9 @@
</template>
</el-table-column>
<!-- 操作列 -->
<el-table-column label="操作" align="center" fixed="right">
<el-table-column label="操作" align="center" fixed="right" width="100">
<template #default="scope">
<el-button size="small" type="danger" @click="handleDelete(scope.row)">删除</el-button>
<el-button text type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -1,28 +1,30 @@
<template>
<div class="app-container">
<div class="cate_container">
<!-- 左侧表格 -->
<div style="flex:1">
<el-input v-model="leftSearchValue" placeholder="请输入类别名称或代号" />
<el-table :data="filteredLeftTableData" @row-click="handleLeftRowClick" highlight-current-row
:cell-style="cellStyle" height="80vh">
<div class="left_box">
<el-input v-model="leftSearchValue" placeholder="请输入类别名称或代号" class="mb10" />
<el-table :data="filteredLeftTableData" @row-click="handleLeftRowClick" highlight-current-row border
:row-style="cellStyle" height="80vh" style="width: 100%;">
<el-table-column prop="sflbdh" label="分单类别代号" width="110" />
<el-table-column prop="sflbmc" label="类别名称" />
</el-table>
</div>
<!-- 中间表格 -->
<div style="flex:2">
<el-input v-model="middleSearchValue" placeholder="请输入项目名称或代号" />
<el-table :data="filteredMiddleTableData" @row-dblclick="handleMiddleRowDblClick" height="80vh">
<div class="m_box">
<el-input v-model="middleSearchValue" placeholder="请输入项目名称或代号" class="mb10" />
<el-table :data="filteredMiddleTableData" @row-dblclick="handleMiddleRowDblClick" highlight-current-row
style="width: 100%;" height="80vh" border>
<el-table-column prop="sfxmdh" label="项目代号" />
<el-table-column prop="sfxmmc" label="当前类别包含门诊项目" />
</el-table>
</div>
<!-- 右侧表格 -->
<div style="flex:3">
<el-input v-model="rightSearchValue" placeholder="请输入项目名称、代号或助记符" />
<el-table :data="filteredRightTableData" @row-dblclick="handleRightRowDblClick" height="80vh">
<div class="right_box">
<el-input v-model="rightSearchValue" placeholder="请输入项目名称、代号或助记符" class="mb10" />
<el-table :data="filteredRightTableData" @row-dblclick="handleRightRowDblClick" highlight-current-row
height="80vh" border style="width: 100%;">
<el-table-column prop="sfxmdh" label="门诊项目代号" />
<el-table-column prop="sfxmmc" label="门诊项目名称" />
<el-table-column prop="zjf" label="助记符" />
@ -153,16 +155,34 @@ const cellStyle = ({ row, column, rowIndex, columnIndex }: {
const textColor = classCom.getContrastTextColor(bgColor);
return {
backgroundColor: `${bgColor} !important`,
color: textColor,
color: '#000',
};
}
</script>
<style scoped>
.app-container {
.cate_container {
display: flex;
padding: 20px;
gap: 35px;
justify-content: space-between;
padding: 10px;
}
.left_box {
width: 20%;
padding: 10px;
background-color: rgb(214, 240, 252);
}
.m_box {
width: 30%;
padding: 10px;
background-color: rgb(214, 240, 252);
}
.right_box {
width: 49%;
padding: 10px;
background-color: rgb(214, 240, 252);
}
</style>

View File

@ -16,8 +16,9 @@
<el-table-column prop="sfxmdh" label="收费项目代号" width="110">
<template #default="scope">
<template v-if="isEditing(scope.row, 'sfxmdh')">
<el-input v-model="scope.row.sfxmdh" size="small" @blur="handleSave(scope.row, 'sfxmdh')"
@keyup.enter="handleSave(scope.row, 'sfxmdh')" auto-focus :ref="getInputRef(scope.row.id, 'sfxmdh')" />
<el-input v-model="scope.row.sfxmdh" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'sfxmdh')" @keyup.enter="handleSave(scope.row, 'sfxmdh')" auto-focus
:ref="getInputRef(scope.row.id, 'sfxmdh')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'sfxmdh' })">
@ -31,8 +32,9 @@
<el-table-column prop="sfxmmc" label="收费项目名称" width="150">
<template #default="scope">
<template v-if="isEditing(scope.row, 'sfxmmc')">
<el-input v-model="scope.row.sfxmmc" size="small" @blur="handleSave(scope.row, 'sfxmmc')"
@keyup.enter="handleSave(scope.row, 'sfxmmc')" auto-focus :ref="getInputRef(scope.row.id, 'sfxmmc')" />
<el-input v-model="scope.row.sfxmmc" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'sfxmmc')" @keyup.enter="handleSave(scope.row, 'sfxmmc')" auto-focus
:ref="getInputRef(scope.row.id, 'sfxmmc')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'sfxmmc' })">
@ -46,7 +48,7 @@
<el-table-column prop="bz" label="简称" width="120">
<template #default="scope">
<template v-if="isEditing(scope.row, 'bz')">
<el-input v-model="scope.row.bz" size="small" @blur="handleSave(scope.row, 'bz')"
<el-input v-model="scope.row.bz" size="small" class="full-width-input" @blur="handleSave(scope.row, 'bz')"
@keyup.enter="handleSave(scope.row, 'bz')" auto-focus :ref="getInputRef(scope.row.id, 'bz')" />
</template>
<template v-else>
@ -61,8 +63,9 @@
<el-table-column prop="dj" label="价格" width="150" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'dj')">
<el-input-number v-model="scope.row.dj" :min="1" :max="100" size="small" @blur="handleSave(scope.row, 'dj')"
@keyup.enter="handleSave(scope.row, 'dj')" auto-focus :ref="getInputRef(scope.row.id, 'dj')" />
<el-input-number v-model="scope.row.dj" :min="1" :max="100" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'dj')" @keyup.enter="handleSave(scope.row, 'dj')" auto-focus
:ref="getInputRef(scope.row.id, 'dj')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'dj' })">
@ -75,8 +78,9 @@
<el-table-column prop="spec" label="规格" width="120">
<template #default="scope">
<template v-if="isEditing(scope.row, 'spec')">
<el-input v-model="scope.row.spec" size="small" @blur="handleSave(scope.row, 'spec')"
@keyup.enter="handleSave(scope.row, 'spec')" auto-focus :ref="getInputRef(scope.row.id, 'spec')" />
<el-input v-model="scope.row.spec" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'spec')" @keyup.enter="handleSave(scope.row, 'spec')" auto-focus
:ref="getInputRef(scope.row.id, 'spec')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'spec' })">
@ -89,8 +93,9 @@
<el-table-column prop="dept" label="科室" width="150">
<template #default="scope">
<template v-if="isEditing(scope.row, 'dept')">
<el-select v-model="scope.row.dept" size="small" @change="handleSave(scope.row, 'dept')"
@blur="handleSave(scope.row, 'dept')" auto-focus filterable style="width: 100%;">
<el-select v-model="scope.row.dept" size="small" class="full-width-input"
@change="handleSave(scope.row, 'dept')" @blur="handleSave(scope.row, 'dept')" auto-focus filterable
style="width: 100%;">
<el-option v-for="item in dictData.DP" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</template>
@ -106,8 +111,8 @@
<el-table-column prop="yblx" label="采集样本" width="140">
<template #default="scope">
<template v-if="isEditing(scope.row, 'yblx')">
<el-select v-model="scope.row.yblx" size="small" @change="handleSave(scope.row, 'yblx')"
@blur="handleSave(scope.row, 'yblx')" auto-focus filterable>
<el-select v-model="scope.row.yblx" size="small" class="full-width-input"
@change="handleSave(scope.row, 'yblx')" @blur="handleSave(scope.row, 'yblx')" auto-focus filterable>
<el-option v-for="item in dictData.BT" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</template>
@ -122,8 +127,9 @@
<el-table-column prop="bgts" label="报告天数" width="120" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'bgts')">
<el-input-number v-model="scope.row.bgts" size="small" @blur="handleSave(scope.row, 'bgts')"
@keyup.enter="handleSave(scope.row, 'bgts')" auto-focus :ref="getInputRef(scope.row.id, 'bgts')" />
<el-input-number v-model="scope.row.bgts" size="small" class="full-width-input"
@blur="handleSave(scope.row, 'bgts')" @keyup.enter="handleSave(scope.row, 'bgts')" auto-focus
:ref="getInputRef(scope.row.id, 'bgts')" />
</template>
<template v-else>
<span @click.stop="handleCellClick(scope.row, { property: 'bgts' })">
@ -137,7 +143,7 @@
<el-table-column prop="zjf" label="助记符" width="150" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'zjf')">
<el-input v-model="scope.row.zjf" size="small" @blur="handleSave(scope.row, 'zjf')"
<el-input v-model="scope.row.zjf" size="small" class="full-width-input" @blur="handleSave(scope.row, 'zjf')"
@keyup.enter.ctrl="handleSave(scope.row, 'zjf')" auto-focus :ref="getInputRef(scope.row.id, 'zjf')" />
</template>
<template v-else>
@ -152,8 +158,8 @@
<el-table-column prop="bglqdh" label="报告领取规则" width="160">
<template #default="scope">
<template v-if="isEditing(scope.row, 'bglqdh')">
<el-select v-model="scope.row.bglqdh" size="small" @change="handleSave(scope.row, 'bglqdh')" filterable
@blur="handleSave(scope.row, 'bglqdh')" auto-focus>
<el-select v-model="scope.row.bglqdh" size="small" class="full-width-input"
@change="handleSave(scope.row, 'bglqdh')" filterable @blur="handleSave(scope.row, 'bglqdh')" auto-focus>
<el-option v-for="item in reportRuleOptions" :key="item.bglqdh" :label="item.bglqmc"
:value="item.bglqdh" />
</el-select>
@ -182,8 +188,9 @@
<el-table-column prop="lisgroup1" label="专业组(样本数)" width="140" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'lisgroup1')">
<el-select v-model="scope.row.lisgroup1" size="small" @change="handleSave(scope.row, 'lisgroup1')"
@blur="handleSave(scope.row, 'lisgroup1')" auto-focus filterable>
<el-select v-model="scope.row.lisgroup1" size="small" class="full-width-input"
@change="handleSave(scope.row, 'lisgroup1')" @blur="handleSave(scope.row, 'lisgroup1')" auto-focus
filterable>
<el-option v-for="item in dictData.LISGROUP1" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</template>
@ -199,8 +206,9 @@
<el-table-column prop="lisgroup2" label="专业组(周转时间)" width="160" align="center">
<template #default="scope">
<template v-if="isEditing(scope.row, 'lisgroup2')">
<el-select v-model="scope.row.lisgroup2" size="small" @change="handleSave(scope.row, 'lisgroup2')"
@blur="handleSave(scope.row, 'lisgroup2')" auto-focus filterable>
<el-select v-model="scope.row.lisgroup2" size="small" class="full-width-input"
@change="handleSave(scope.row, 'lisgroup2')" @blur="handleSave(scope.row, 'lisgroup2')" auto-focus
filterable>
<el-option v-for="item in dictData.LISGROUP2" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</template>
@ -216,7 +224,7 @@
<el-table-column prop="indication" label="适应症" width="220">
<template #default="scope">
<template v-if="isEditing(scope.row, 'indication')">
<el-input v-model="scope.row.indication" size="small" type="textarea" :rows="2"
<el-input v-model="scope.row.indication" size="small" class="full-width-input" type="textarea" :rows="2"
@blur="handleSave(scope.row, 'indication')" @keyup.enter.ctrl="handleSave(scope.row, 'indication')"
auto-focus :ref="getInputRef(scope.row.id, 'indication')" />
</template>
@ -232,7 +240,7 @@
<el-table-column prop="affect" label="作用" width="220">
<template #default="scope">
<template v-if="isEditing(scope.row, 'affect')">
<el-input v-model="scope.row.affect" size="small" type="textarea" :rows="2"
<el-input v-model="scope.row.affect" size="small" class="full-width-input" type="textarea" :rows="2"
@blur="handleSave(scope.row, 'affect')" @keyup.enter.ctrl="handleSave(scope.row, 'affect')" auto-focus
:ref="getInputRef(scope.row.id, 'affect')" />
</template>
@ -248,7 +256,7 @@
<el-table-column prop="attention" label="采集要求" width="220">
<template #default="scope">
<template v-if="isEditing(scope.row, 'attention')">
<el-input v-model="scope.row.attention" size="small" type="textarea" :rows="2"
<el-input v-model="scope.row.attention" size="small" class="full-width-input" type="textarea" :rows="2"
@blur="handleSave(scope.row, 'attention')" @keyup.enter.ctrl="handleSave(scope.row, 'attention')"
auto-focus :ref="getInputRef(scope.row.id, 'attention')" />
</template>
@ -261,9 +269,9 @@
</el-table-column>
<!-- 操作列 -->
<el-table-column label="操作" align="center" fixed="right">
<el-table-column label="操作" align="center" fixed="right" width="100">
<template #default="scope">
<el-button size="small" type="danger" @click="handleDelete(scope.row)">删除</el-button>
<el-button text type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -34,7 +34,7 @@ import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
// 组件参数
const props = defineProps({
pidValue: { type: [String, Number], default: '' },
PatType: { type: String, required: true },
PatType: { type: String },
placeholder: { type: String, default: '请输入或双击选择' },
clearable: { type: Boolean, default: true },
disabled: { type: Boolean, default: false },

View File

@ -1,47 +1,47 @@
<template>
<div class="app-container">
<el-row :gutter="5" class="compact-form" :span="24">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-position="left">
<el-col :span="24" :xs="24">
<el-form-item label="" label-width="0px" prop="brdh">
<!-- <el-row :gutter="5" class="compact-form"> -->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-position="left">
<el-col :span="24" :xs="24">
<el-form-item label="" label-width="0px" prop="brdh">
<el-col :span="6">
<div> 就诊卡号/病历号/磁卡号: </div>
<el-input v-model="queryParams.brdh" placeholder="就诊卡号/病历号/磁卡号" clearable @keyup.enter="handleQuery" />
</el-col>
<el-col :span="2">
<el-radio-group v-model="queryParams.zt" size="default">
<el-radio v-for="(item, index) in showconfirmOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="1">
<div> 申请获取期限: </div>
</el-col>
<el-col :span="6">
<el-col :span="6">
<div> 就诊卡号/病历号/磁卡号: </div>
<el-input v-model="queryParams.brdh" placeholder="就诊卡号/病历号/磁卡号" clearable @keyup.enter="handleQuery" />
</el-col>
<el-col :span="2">
<el-radio-group v-model="queryParams.zt" size="default">
<el-radio v-for="(item, index) in showconfirmOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="1">
<div> 申请获取期限: </div>
</el-col>
<el-col :span="6">
<el-radio-group v-model="queryParams.subday" size="default">
<el-radio v-for="(item, index) in subdayOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="2">
<el-select v-model="queryParams.cardtype" placeholder="卡类型" clearable :style="{ width: '100%' }">
<el-option v-for="(item, index) in cardtypeOptions" :key="index" :label="item.label" :value="item.value"
:disabled="item.disabled"></el-option>
</el-select>
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="Search" @click="readCard">读卡</el-button>
</el-col>
<el-col :span="1.5">
<PatSearchDialog @select="handlePatientSelect" />
</el-col>
</el-form-item>
</el-col>
<el-radio-group v-model="queryParams.subday" size="default">
<el-radio v-for="(item, index) in subdayOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="2">
<el-select v-model="queryParams.cardtype" placeholder="卡类型" clearable :style="{ width: '100%' }">
<el-option v-for="(item, index) in cardtypeOptions" :key="index" :label="item.label" :value="item.value"
:disabled="item.disabled"></el-option>
</el-select>
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="Search" @click="readCard">读卡</el-button>
</el-col>
<el-col :span="1.5">
<PatSearchDialog @select="handlePatientSelect" />
</el-col>
</el-form-item>
</el-col>
</el-form>
</el-row>
</el-form>
<!-- </el-row> -->
<el-row :gutter="5" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Search" @click="handleQuery"

View File

@ -20,7 +20,7 @@
<el-table-column prop="bz" label="备注" />
<el-table-column label="操作" align="center" fixed="right" width="100">
<template #default="scope">
<el-button size="small" type="danger" @click="handleDelete(scope.row)">删除</el-button>
<el-button text type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -46,10 +46,11 @@
<span>规则明细</span>
</div>
<el-table :data="detailList" border style="width: 100%;" class="detail-table" :cell-class-name="cellClassName">
<el-table :data="detailList" border style="width: 100%;" class="detail-table" :cell-class-name="cellClassName"
height="48vh">
<el-table-column prop="weekday" label="起始日期" width="100">
<template #default="scope">
<el-select v-model="scope.row.weekday" placeholder="选择星期" size="small" class="week-select"
<el-select v-model="scope.row.weekday" class="full-width-input" placeholder="选择星期" size="small"
@change="handleDetailChange(scope.row)">
<el-option v-for="day in weekDays" :key="day.value" :label="day.label" :value="day.value" />
</el-select>
@ -57,7 +58,7 @@
</el-table-column>
<el-table-column prop="weekday1" label="截止日期" width="100">
<template #default="scope">
<el-select v-model="scope.row.weekday1" placeholder="选择星期" size="small" class="week-select"
<el-select v-model="scope.row.weekday1" placeholder="选择星期" size="small" class="full-width-input"
@change="handleDetailChange(scope.row)">
<el-option v-for="day in weekDays" :key="day.value" :label="day.label" :value="day.value" />
</el-select>
@ -66,32 +67,32 @@
<el-table-column prop="kssj" label="起始时间" width="100">
<template #default="scope">
<el-input v-model="scope.row.kssj" placeholder="HH:mm" size="small"
@input="handleTimeInput(scope.row, 'kssj')" maxlength="5" class="time-input" @focus="handleInputFocus"
@blur="handleInputBlur(scope.row, 'kssj')" />
@input="handleTimeInput(scope.row, 'kssj')" maxlength="5" class="full-width-input"
@focus="handleInputFocus" @blur="handleInputBlur(scope.row, 'kssj')" />
</template>
</el-table-column>
<el-table-column prop="jssj" label="截止时间" width="100">
<template #default="scope">
<el-input v-model="scope.row.jssj" placeholder="HH:mm" size="small"
@input="handleTimeInput(scope.row, 'jssj')" maxlength="5" class="time-input" @focus="handleInputFocus"
@blur="handleInputBlur(scope.row, 'jssj')" />
@input="handleTimeInput(scope.row, 'jssj')" maxlength="5" class="full-width-input"
@focus="handleInputFocus" @blur="handleInputBlur(scope.row, 'jssj')" />
</template>
</el-table-column>
<el-table-column prop="bglqsm" label="报告领取声明">
<template #default="scope">
<el-input v-model="scope.row.bglqsm" size="small" class="statement-input" @focus="handleInputFocus" />
<el-input v-model="scope.row.bglqsm" size="small" class="full-width-input" @focus="handleInputFocus" />
</template>
</el-table-column>
<el-table-column prop="bgxss" label="所需小时数" width="100">
<template #default="scope">
<el-input v-model="scope.row.bgxss" placeholder="0" size="small"
@input="handleNumberInput(scope.row, 'bgxss')" class="number-input" @focus="handleInputFocus" />
@input="handleNumberInput(scope.row, 'bgxss')" class="full-width-input" @focus="handleInputFocus" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template #default="scope">
<el-button size="small" type="danger" @click="delDetail(scope.row)">删除</el-button>
<el-button type="danger" text @click="delDetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -479,7 +480,7 @@ const flag = computed(() => {
flex: 1;
display: flex;
gap: 10px;
height: calc(100% - 100px);
height: calc(100% - 3.75rem);
}
.left-table-area {
@ -497,7 +498,7 @@ const flag = computed(() => {
background-color: #e6f7ff;
border: 1px solid #91d5ff;
border-radius: 4px;
padding: 15px;
padding: 10px;
display: flex;
flex-direction: column;
}
@ -515,7 +516,7 @@ const flag = computed(() => {
font-weight: 500;
color: #1890ff;
border-bottom: 1px solid #91d5ff;
margin-bottom: 5px;
margin-bottom: 10px;
}
::v-deep .custom-table th {
@ -549,13 +550,4 @@ const flag = computed(() => {
::v-deep .no-edit-cell .el-select {
pointer-events: auto;
}
::v-deep .time-input,
::v-deep .number-input {
width: 100%;
}
::v-deep .statement-input {
width: 100%;
}
</style>

View File

@ -1,180 +1,112 @@
<template>
<div class="app-container">
<el-row :gutter="5" class="compact-form" :span="24" >
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-position="left"
>
<el-col :span="24" :xs="24">
<el-form-item label="执行时间:" label-width="75px" prop="stime">
<el-date-picker
style="width: 130px;"
v-model="queryParams.st"
type="date"
placeholder="起始"
value-format="YYYY-MM-DD"
:clearable="false"
></el-date-picker>
</el-form-item>
<el-form-item label="--" label-width="30px" prop="etime">
<el-date-picker
style="width: 130px;"
v-model="queryParams.et"
type="date"
placeholder="结束"
value-format="YYYY-MM-DD"
:clearable="false"
></el-date-picker>
</el-form-item>
<el-form-item label="病人代号:" label-width="75px" prop="brdh">
<el-input
style="width: 150px;"
v-model="queryParams.brdh"
placeholder="病人代号"
/>
</el-form-item>
<el-form-item label="病人姓名:" label-width="75px" prop="brxm">
<el-input
style="width: 150px;"
v-model="queryParams.brxm"
placeholder="病人姓名"
/>
</el-form-item>
<el-form-item label="状态:" label-width="50px" prop="zt">
<el-select
v-model="queryParams.zt"
placeholder="状态"
clearable
style="width: 100px;"
>
<el-option
v-for="(item, index) in ztOptions"
:key="index"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="病人类型:" label-width="75px" prop="brly">
<el-select
v-model="queryParams.brly"
placeholder="病人类型"
clearable
style="width: 100px;"
>
<el-option
v-for="(item, index) in pattypeOptions"
:key="index"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
<!-- <el-row :gutter="5" class="compact-form" :span="24"> -->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-position="left">
<el-col :span="24" :xs="24">
<el-form-item label="执行时间:" label-width="75px" prop="stime">
<el-date-picker style="width: 130px;" v-model="queryParams.st" type="date" placeholder="起始"
value-format="YYYY-MM-DD" :clearable="false"></el-date-picker>
</el-form-item>
<el-form-item label="--" label-width="30px" prop="etime">
<el-date-picker style="width: 130px;" v-model="queryParams.et" type="date" placeholder="结束"
value-format="YYYY-MM-DD" :clearable="false"></el-date-picker>
</el-form-item>
<el-form-item label="病人代号:" label-width="75px" prop="brdh">
<el-input style="width: 150px;" v-model="queryParams.brdh" placeholder="病人代号" />
</el-form-item>
<el-form-item label="病人姓名:" label-width="75px" prop="brxm">
<el-input style="width: 150px;" v-model="queryParams.brxm" placeholder="病人姓名" />
</el-form-item>
<el-form-item label="状态:" label-width="50px" prop="zt">
<el-select v-model="queryParams.zt" placeholder="状态" clearable style="width: 100px;">
<el-option v-for="(item, index) in ztOptions" :key="index" :label="item.label" :value="item.value"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
<el-form-item label="病人类型:" label-width="75px" prop="brly">
<el-select v-model="queryParams.brly" placeholder="病人类型" clearable style="width: 100px;">
<el-option v-for="(item, index) in pattypeOptions" :key="index" :label="item.label" :value="item.value"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-row>
<el-row :gutter="5" class="mb8">
<!-- </el-row> -->
<el-row :gutter="5" class="mb8 mt10">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Search"
@click="handleQuery"
v-hasPermi="['system:reqmain:Search']"
>查询</el-button>
<el-button type="primary" plain icon="Search" @click="handleQuery"
v-hasPermi="['system:reqmain:Search']">查询</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Printer"
:disabled="single"
@click="printAll"
v-hasPermi="['system:reqmain:add']"
>打印</el-button>
<el-button type="success" plain icon="Printer" :disabled="single" @click="printAll"
v-hasPermi="['system:reqmain:add']">打印</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Printer"
:disabled="freesingle"
@click="printSigne"
v-hasPermi="['system:reqmain:edit']"
>单打条码</el-button>
<el-button type="success" plain icon="Printer" :disabled="freesingle" @click="printSigne"
v-hasPermi="['system:reqmain:edit']">单打条码</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Printer"
:disabled="freesingle"
@click="printBackpaper"
v-hasPermi="['system:reqmain:edit']"
>单打回单</el-button>
<el-button type="danger" plain icon="Printer" :disabled="freesingle" @click="printBackpaper"
v-hasPermi="['system:reqmain:edit']">单打回单</el-button>
</el-col>
</el-row>
<el-row :gutter="5" class="table-container">
<el-table ref="tableRef" class="compact-form my-table" :data="reqmainList" @selection-change="handleSelectionChange" @select="handleSelect" height="100%" :cell-style="tableCellStyle">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="项目名称" align="center" prop="sqxmmc" width="200" show-overflow-tooltip/>
<el-table-column label="项目代码" align="center" prop="sqxmdh" width="100" show-overflow-tooltip/>
<el-table-column label="项目类别" align="center" prop="cp_xmlb" />
<el-table-column label="样本类型" align="center" prop="yblx" />
<el-table-column label="条码号" align="center" prop="sqh" width="150" show-overflow-tooltip/>
<el-table-column label="申请时间" align="center" prop="sqsj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.sqsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="病人姓名" align="center" prop="brxm" show-overflow-tooltip/>
<el-table-column label="申请医生" align="center" prop="sqys" :formatter="formatDict('SRD')" show-overflow-tooltip/>
<el-table-column label="序号" align="center" prop="xh" show-overflow-tooltip/>
<el-table-column label="数量" align="center" prop="sl" show-overflow-tooltip/>
<el-table-column label="单价" align="center" prop="dj" show-overflow-tooltip/>
<el-table-column label="状态" align="center" prop="zt" show-overflow-tooltip/>
<el-table-column label="计价" align="center" prop="jjzt" >
<template #default="scope">
<el-checkbox :model-value="scope.row.jjzt === '1'" disabled>
</el-checkbox>
</template>
</el-table-column>
<el-table-column label="病人代号" align="center" prop="brdh" show-overflow-tooltip/>
<el-table-column label="执行时间" align="center" prop="zxsj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.sqsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="执行医生" align="center" prop="zxys" :formatter="formatDict('SRD')" show-overflow-tooltip/>
<el-table-column label="备注1" align="center" prop="detailBZ1" show-overflow-tooltip/>
<el-table-column label="备注2" align="center" prop="detailBZ2" show-overflow-tooltip/>
<el-table-column label="颜色" align="center" prop="cp_color" v-if="false" show-overflow-tooltip/>
<el-table-column label="确认标识" align="center" prop="cp_cflag" v-if="false" show-overflow-tooltip/>
<el-table-column label="科室" align="center" prop="ksdh" :formatter="formatDict('DP')" show-overflow-tooltip/>
<el-table-column label="病人类型" align="center" prop="brly" :formatter="formatDict('PT')" show-overflow-tooltip/>
<el-table-column label="性别" align="center" prop="brxb" :formatter="formatDict('SX')" show-overflow-tooltip/>
<el-table-column label="生日" align="center" prop="brsr" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.brsr, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="床号" align="center" prop="ch" width="50" show-overflow-tooltip/>
<el-table-column label="诊断" align="center" prop="zd" width="150" show-overflow-tooltip/>
<el-table-column label="条码类别" align="center" prop="bgddh" v-if="false" show-overflow-tooltip/>
<el-table-column label="年龄" align="center" prop="nl" show-overflow-tooltip/>
<el-table-column label="年龄单位" align="center" prop="nldw" :formatter="formatDict('AU')" show-overflow-tooltip/>
<el-table-column label="采样时间" align="center" prop="cysj" width="180"show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.cysj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
<el-table ref="tableRef" class="compact-form my-table" :data="reqmainList"
@selection-change="handleSelectionChange" @select="handleSelect" height="100%" :cell-style="tableCellStyle">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="项目名称" align="center" prop="sqxmmc" width="200" show-overflow-tooltip />
<el-table-column label="项目代码" align="center" prop="sqxmdh" width="100" show-overflow-tooltip />
<el-table-column label="项目类别" align="center" prop="cp_xmlb" />
<el-table-column label="样本类型" align="center" prop="yblx" />
<el-table-column label="条码号" align="center" prop="sqh" width="150" show-overflow-tooltip />
<el-table-column label="申请时间" align="center" prop="sqsj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.sqsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="病人姓名" align="center" prop="brxm" show-overflow-tooltip />
<el-table-column label="申请医生" align="center" prop="sqys" :formatter="formatDict('SRD')" show-overflow-tooltip />
<el-table-column label="序号" align="center" prop="xh" show-overflow-tooltip />
<el-table-column label="数量" align="center" prop="sl" show-overflow-tooltip />
<el-table-column label="单价" align="center" prop="dj" show-overflow-tooltip />
<el-table-column label="状态" align="center" prop="zt" show-overflow-tooltip />
<el-table-column label="计价" align="center" prop="jjzt">
<template #default="scope">
<el-checkbox :model-value="scope.row.jjzt === '1'" disabled>
</el-checkbox>
</template>
</el-table-column>
<el-table-column label="病人代号" align="center" prop="brdh" show-overflow-tooltip />
<el-table-column label="执行时间" align="center" prop="zxsj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.sqsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="执行医生" align="center" prop="zxys" :formatter="formatDict('SRD')" show-overflow-tooltip />
<el-table-column label="备注1" align="center" prop="detailBZ1" show-overflow-tooltip />
<el-table-column label="备注2" align="center" prop="detailBZ2" show-overflow-tooltip />
<el-table-column label="颜色" align="center" prop="cp_color" v-if="false" show-overflow-tooltip />
<el-table-column label="确认标识" align="center" prop="cp_cflag" v-if="false" show-overflow-tooltip />
<el-table-column label="科室" align="center" prop="ksdh" :formatter="formatDict('DP')" show-overflow-tooltip />
<el-table-column label="病人类型" align="center" prop="brly" :formatter="formatDict('PT')" show-overflow-tooltip />
<el-table-column label="性别" align="center" prop="brxb" :formatter="formatDict('SX')" show-overflow-tooltip />
<el-table-column label="生日" align="center" prop="brsr" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.brsr, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="床号" align="center" prop="ch" width="50" show-overflow-tooltip />
<el-table-column label="诊断" align="center" prop="zd" width="150" show-overflow-tooltip />
<el-table-column label="条码类别" align="center" prop="bgddh" v-if="false" show-overflow-tooltip />
<el-table-column label="年龄" align="center" prop="nl" show-overflow-tooltip />
<el-table-column label="年龄单位" align="center" prop="nldw" :formatter="formatDict('AU')" show-overflow-tooltip />
<el-table-column label="采样时间" align="center" prop="cysj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.cysj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
</div>
</template>
@ -204,7 +136,7 @@ const idsnew = computed(() => {
});
const single = ref(true);
const freesingle = ref(true);
const ztOptions = ref([{"label": "全部", "value": 0},{"label": "未打印", "value": 1},{"label": "已打印", "value": 11},{"label": "签收", "value": 2},{"label": "完成", "value": 4},{"label": "剔回", "value": 8},{"label": "作废", "value": 9}])
const ztOptions = ref([{ "label": "全部", "value": 0 }, { "label": "未打印", "value": 1 }, { "label": "已打印", "value": 11 }, { "label": "签收", "value": 2 }, { "label": "完成", "value": 4 }, { "label": "剔回", "value": 8 }, { "label": "作废", "value": 9 }])
let pattypeOptions = ref([]);
const data = reactive({
@ -217,7 +149,7 @@ const data = reactive({
etime: null,
brly: null,
zt: 0,
brxm:null
brxm: null
}
});
@ -240,7 +172,7 @@ const handleSelect = (selection, row, selected) => {
// 先收集需要自动勾选的行(避免在循环中修改数据)
const rowsToSelect = reqmainList.value.filter(
item => item.sqh === targetSqh && item.xh !== targetxh
item => item.sqh === targetSqh && item.xh !== targetxh
);
// 如果有需要自动勾选的行,才开启标志位
@ -254,10 +186,10 @@ const handleSelect = (selection, row, selected) => {
}
};
// 字典格式化方法
const formatDict =(dictType) => {
const formatDict = (dictType) => {
return (row, column, value) => {
// 从全局字典中获取映射值
return dictData.value[dictType].find(item => String(item.value) === String(value).trim())?.label||value ;
return dictData.value[dictType].find(item => String(item.value) === String(value).trim())?.label || value;
};
};
// 定义“空数据”的判断函数
@ -285,40 +217,40 @@ function getDateOffset(days) {
const year = targetDate.getFullYear();
const month = String(targetDate.getMonth() + 1).padStart(2, '0');
const day = String(targetDate.getDate()).padStart(2, '0');
// const hours = String(targetDate.getHours()).padStart(2, '0');
// const minutes = String(targetDate.getMinutes()).padStart(2, '0');
// const hours = String(targetDate.getHours()).padStart(2, '0');
// const minutes = String(targetDate.getMinutes()).padStart(2, '0');
//const seconds = String(targetDate.getSeconds()).padStart(2, '0');
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
return `${year}-${month}-${day}`;
}
function getSubday() {
queryParams.value.stime=`${queryParams.value.st} 00:00:00`
queryParams.value.etime=`${queryParams.value.et} 23:59:59`
queryParams.value.stime = `${queryParams.value.st} 00:00:00`
queryParams.value.etime = `${queryParams.value.et} 23:59:59`
}
/** 查询采样登记列表 */
function getList() {
loading.value = true;
getSubday();
querySQD(queryParams.value).then(response => {
if (isEmptyData(response.data)) proxy.$modal.alert("没有检索的数据!");
reqmainList.value = response.data;
// console.log('response:', response.data);
loading.value = false;
single.value=false;
// 新增:数据加载完成后触发全选
// 延迟执行(确保DOM已更新)
setTimeout(() => {
if (tableRef.value) {
tableRef.value.toggleAllSelection(); // 调用全选方法
}
}, 0);
});
loading.value = true;
getSubday();
querySQD(queryParams.value).then(response => {
if (isEmptyData(response.data)) proxy.$modal.alert("没有检索的数据!");
reqmainList.value = response.data;
// console.log('response:', response.data);
loading.value = false;
single.value = false;
// 新增:数据加载完成后触发全选
// 延迟执行(确保DOM已更新)
setTimeout(() => {
if (tableRef.value) {
tableRef.value.toggleAllSelection(); // 调用全选方法
}
}, 0);
});
}
// 取消按钮
function cancel() {
// open.value = false;
// reset();
// open.value = false;
// reset();
}
// 表单重置
@ -363,8 +295,8 @@ function reset() {
zd: null,
cysj: null
};
freesingle.value=false;
single.value=false;
freesingle.value = false;
single.value = false;
proxy.resetForm("reqmainRef");
}
@ -379,8 +311,8 @@ function readCard() {
// 处理病人选择事件
const handlePatientSelect = (patient) => {
// console.log('选中的病人:', patient);
queryParams.value.brdh=patient
// console.log('选中的病人:', patient);
queryParams.value.brdh = patient
// 处理选中的病人数据
handleQuery();
};
@ -397,13 +329,13 @@ function handleSelectionChange(selection) {
/** 打印选择 */
function printAll(row) {
console.log('idsnew:', idsnew.value);
if (idsnew.value.length=== 0) {
if (idsnew.value.length === 0) {
return;
}
printBarcodeall(idsnew.value).then(response => {
proxy.$modal.msgSuccess("打印成功");
open.value = false;
freesingle.value=false;
freesingle.value = false;
}).catch(() => {
});
}
@ -415,7 +347,7 @@ function printSigne(row) {
apiprintAll(idsnew.value).then(response => {
proxy.$modal.msgSuccess("打印成功");
open.value = false;
freesingle.value=false;
freesingle.value = false;
}).catch(() => {
});
}
@ -423,15 +355,15 @@ function printSigne(row) {
/** 打印回单 */
function printBackpaper(row) {
if (idsnew.value.length === 0) {
return;
}
apiprintAll(idsnew.value).then(response => {
proxy.$modal.msgSuccess("打印成功");
open.value = false;
}).catch(() => {
});
if (idsnew.value.length === 0) {
return;
}
apiprintAll(idsnew.value).then(response => {
proxy.$modal.msgSuccess("打印成功");
open.value = false;
}).catch(() => {
});
}
const totalRows = computed(() => {
@ -449,8 +381,8 @@ const totalPrice = computed(() => {
// 组件挂载时加载字典
onMounted(async () => {
// 加载病人来源字典
const dictRefs = await comDict('PT', 'DP', 'SRD','BT','SX','AU');
// 从 ref 中获取实际数据
const dictRefs = await comDict('PT', 'DP', 'SRD', 'BT', 'SX', 'AU');
// 从 ref 中获取实际数据
dictData.value = {
PT: toRaw(dictRefs.PT.value) || [],
DP: toRaw(dictRefs.DP.value) || [],
@ -459,10 +391,10 @@ onMounted(async () => {
SX: toRaw(dictRefs.SX.value) || [],
AU: toRaw(dictRefs.AU.value) || []
};
pattypeOptions=dictData.value.PT;
queryParams.value.brly="1";
queryParams.value.st=getDateOffset(0);
queryParams.value.et=getDateOffset(0);
pattypeOptions = dictData.value.PT;
queryParams.value.brly = "1";
queryParams.value.st = getDateOffset(0);
queryParams.value.et = getDateOffset(0);
});
@ -526,18 +458,26 @@ const getContrastTextColor = (bgColor) => {
.app-container {
display: flex;
flex-direction: column;
height: 90vh; /* 容器高度等于窗口高度 */
height: 90vh;
/* 容器高度等于窗口高度 */
overflow: hidden;
}
.compact-form {
height: 40px; /* 固定高度 */
height: 40px;
/* 固定高度 */
}
.mb8 {
height: 30px; /* 固定高度 */
height: 30px;
/* 固定高度 */
}
.table-container {
flex: 1; /* 占满剩余高度 */
overflow: hidden; /* 避免表格超出容器 */
flex: 1;
/* 占满剩余高度 */
overflow: hidden;
/* 避免表格超出容器 */
}
.compact-form .el-form-item {
@ -548,22 +488,32 @@ const getContrastTextColor = (bgColor) => {
.compact-form .el-form-item__label {
padding-bottom: 0px;
}
:deep(.my-table .el-table__row td) {
padding: 1px 0; /* 减小行高 */
padding: 1px 0;
/* 减小行高 */
}
:deep(.my-table .el-table__header-wrapper th) {
padding: 6px 0; /* 表头内边距 */
background-color: #b3d8ff !important; /* 表头背景色(保留之前的设置) */
color: #333; /* 文字颜色加深,提升可读性 */
font-weight: 500; /* 文字加粗 */
padding: 6px 0;
/* 表头内边距 */
background-color: #b3d8ff !important;
/* 表头背景色(保留之前的设置) */
color: #333;
/* 文字颜色加深,提升可读性 */
font-weight: 500;
/* 文字加粗 */
}
:deep(.my-table .el-table__cell) {
padding: 0 2px; /* 减小列间距 */
padding: 0 2px;
/* 减小列间距 */
}
/* 可选:调整表格整体样式 */
:deep(.my-table) {
font-size: 13px; /* 适当减小字体 */
font-size: 13px;
/* 适当减小字体 */
}
:deep(.my-table .el-table__cell),
@ -571,19 +521,26 @@ const getContrastTextColor = (bgColor) => {
border-width: 1px;
border-color: #ebeef5;
}
.card-content {
max-height: 450px; /* 设置最大高度 */
overflow-y: auto; /* 超出高度时显示垂直滚动条 */
padding: 5px; /* 保持与卡片默认一致的内边距 */
max-height: 450px;
/* 设置最大高度 */
overflow-y: auto;
/* 超出高度时显示垂直滚动条 */
padding: 5px;
/* 保持与卡片默认一致的内边距 */
}
.clickable:hover {
cursor: pointer; /* 鼠标悬停时显示手型 */
transition: all 0.3s; /* 平滑过渡效果 */
cursor: pointer;
/* 鼠标悬停时显示手型 */
transition: all 0.3s;
/* 平滑过渡效果 */
color: blue;
}
/* 消除inline表单中表单项的右侧间距(主要间距来源) */
/* 消除inline表单中表单项的右侧间距(主要间距来源) */
/* 消除表单项之间的间距 */
:deep(.el-form--inline .el-form-item) {
margin-right: 0 !important;
@ -599,6 +556,7 @@ const getContrastTextColor = (bgColor) => {
:deep(.el-form-item) {
margin-left: 5px !important;
}
/* 汇总行样式 */
.table-summary {
display: flex;
@ -610,7 +568,9 @@ const getContrastTextColor = (bgColor) => {
border: 1px solid #ebeef5;
border-radius: 4px;
font-weight: 500;
line-height: 24px; /* 汇总行文字行高 */
line-height: 24px;
/* 汇总行文字行高 */
.summary-item {
display: flex;
align-items: center;
@ -624,12 +584,16 @@ const getContrastTextColor = (bgColor) => {
.summary-value {
color: #303133;
min-width: 40px;
text-align: left;/* 核心:数值左对齐 */
text-align: left;
/* 核心:数值左对齐 */
}
/* 单独设置"单价合计"的值为红色 */
&:nth-child(3) .summary-value {
color: #f56c6c; /* Element UI 红色主题色 */
font-weight: 600; /* 可选:加粗字体 */
color: #f56c6c;
/* Element UI 红色主题色 */
font-weight: 600;
/* 可选:加粗字体 */
}
}
}

View File

@ -0,0 +1,265 @@
<template>
<div class="app-container">
<div class="compact-form">
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="委托机构:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="条码号:" prop="Barcode">
<el-input v-model="queryParams.Barcode" placeholder="请输入条码号" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="姓名:" prop="PatName">
<el-input v-model="queryParams.PatName" placeholder="请输入姓名" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="申请项目:" prop="checkPUR">
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="标本状态:" prop="Status">
<el-select v-model="queryParams.Status" placeholder="请选择" clearable>
<el-option v-for="item in regdictList" :label="item.dictName" :value="item.dictCode" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="采样人:" prop="AffirmUserName">
<el-input v-model="queryParams.AffirmUserName" placeholder="请输入采样人" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="签收人:" prop="SignInUserName">
<el-input v-model="queryParams.SignInUserName" placeholder="请输入签收人" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="时间类型:" prop="DateType">
<el-select v-model="queryParams.DateType" placeholder="请选择">
<el-option label="登记时间" value="登记时间" />
<el-option label="采样时间" value="采样时间" />
<el-option label="送出时间" value="送出时间" />
<el-option label="签收时间" value="签收时间" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-col>
</el-row>
</el-form>
</div>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@size-change="sizeChange" @page-change="currentChange" @row-click="rowHandle">
<template #patAge="{ row }">
{{ row.patAge }}{{ row.ageUnit }}
</template>
<template #status="{ row }">
{{ formatDict(row.status, regdictList) }}
</template>
<template #patSex="{ row }">
{{ row.patSex == 1 ? '男' : '女' }}
</template>
</CustomTable>
<!-- 样本流程 -->
<div class="time-line-box">
<div v-for="(item, i) in timelineItems" :key="i" class="time-line-item">
<div v-if="i != 0" class="timeline-connector">
<img class="timg" src="@/assets/images/yjt.png" alt="">
</div>
<div :class="['timeline-content', i > lastTimeIndex ? 'no_active' : '']">
<div :class="['index', lastTimeIndex == i ? 'active' : '']">{{ i + 1 }}
</div>
<div class="timeline-title">{{ item.title }}</div>
<div class="timeline-time">{{ item.time }}</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { querySample } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
const aotuSize = classCom.useAutoSize();
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.js";
const queryParams: any = ref({
pageSize: 50,
pageNum: 1,
})
const tableData: any = ref([])
const columns: any = ref([
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, width: 150 },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 70 },
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
{ prop: 'sampleTypeName', label: '标本类型', align: 'center', visible: true, },
{ prop: 'tubeName', label: '采集容器', align: 'center', visible: true, },
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
// { prop: 'moveStateName', label: '流转状态', align: 'center', visible: true, },
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
{ prop: 'signInUserName', label: '签收人', align: 'center', visible: true, },
{ prop: 'signInTime', label: '签收时间', align: 'center', visible: true, width: 150 },
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, width: 150 },
])
const tableConfig = ref({
border: true, // 边框
height: '65vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// fit: true, // 列宽自适应
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
// 时间线数据
const timelineItems = ref(
[
{ title: '检验申请', time: '' },
{ title: '标本采集', time: '' },
{ title: '标本送检', time: '' },
{ title: '标本外送', time: '' },
{ title: '标本签收', time: '' },
{ title: '上机检测', time: '' },
{ title: '结果审核', time: '' },
{ title: '报告发布', time: '' },
]
);
// 计算最后一个有时间的节点索引
const lastTimeIndex = computed(() => {
const lastIndex = timelineItems.value.findLastIndex(item => item.time);
if (lastIndex === -1) {
return -1
} else {
return lastIndex;
}
});
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
}
getList()
}
const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
}
handleQuery()
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageSize = page.pageSize
handleQuery()
}
const rowHandle = (row: any) => {
timelineItems.value =
[
{ title: '检验申请', time: row.orderTime },
{ title: '标本采集', time: row.affirmTime },
{ title: '标本送检', time: row.signInDate },
{ title: '标本外送', time: row.sendPackTime },
{ title: '标本签收', time: row.signInTime },
{ title: '上机检测', time: row.testDate },
{ title: '结果审核', time: row.auditTime },
{ title: '报告发布', time: row.reportTime },
]
}
const tableRefs = ref()
const getList = () => {
querySample(queryParams.value).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
tableRefs.value.setCurrentRow(res.rows[0])
rowHandle(res.rows[0])
})
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
regdictList.value = res.rows;
})
})
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};
</script>
<style scoped lang="scss">
.compact-form {
.el-form-item {
margin-bottom: 5px;
}
}
</style>

View File

@ -0,0 +1,247 @@
<template>
<div class="app-container">
<div class="compact-form">
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="委托机构:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="条码号:" prop="Barcode">
<el-input v-model="queryParams.Barcode" placeholder="请输入条码号" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="PatName">
<el-input v-model="queryParams.PatName" placeholder="请输入姓名" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="申请项目:" prop="checkPUR">
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="时间类型:" prop="DateType">
<el-select v-model="queryParams.DateType" placeholder="请选择">
<el-option label="登记时间" value="登记时间" />
<el-option label="采样时间" value="采样时间" />
<el-option label="送出时间" value="送出时间" />
<el-option label="签收时间" value="签收时间" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="mb10">
<el-button type="primary" @click="qsHandle(50)">标本签收</el-button>
<el-button type="primary" @click="qsHandle(110)">标本拒签</el-button>
<el-button type="primary" plain @click="bbThHandle">标本退回</el-button>
</div>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
<template #patAge="{ row }">
{{ row.patAge }}{{ row.ageUnit }}
</template>
<template #status="{ row }">
{{ formatDict(row.status, regdictList) }}
</template>
<template #patSex="{ row }">
{{ row.patSex == 1 ? '男' : '女' }}
</template>
</CustomTable>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { querySampleSign, sampleSign } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.js";
import { classCom } from '@/utils/classCom';
import { ElMessage, ElMessageBox } from 'element-plus';
const aotuSize = classCom.useAutoSize();
import { useRouter } from 'vue-router'
const router = useRouter()
const queryParams: any = ref({
pageSize: 50,
pageNum: 1
})
const tableData: any = ref([])
const columns: any = ref([
{ type: 'selection', align: 'center', visible: true, width: 40 },
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, width: 150 },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 250 },
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 70 },
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 250 },
{ prop: 'sampleTypeName', label: '标本类型', align: 'center', visible: true, },
{ prop: 'tubeName', label: '采集容器', align: 'center', visible: true, },
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
// { prop: 'moveStateName', label: '流转状态', align: 'center', visible: true, },
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, width: 150 },
])
const tableConfig = ref({
border: true, // 边框
height: '68vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// fit: true, // 列宽自适应
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const barcodes = ref([])
const tableRefs = ref(null)
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
}
const backReasons = ref('')
const bbThHandle = () => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
ElMessageBox.prompt('请输入退回理由:', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
inputPattern: /\S+/,
inputErrorMessage: '请输入退回理由',
})
.then(({ value }) => {
backReasons.value = value
qsHandle(100)
}).catch(() => {
backReasons.value = ''
});
}
//标本签收
const qsHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
sampleSign({ status: val, barcode: barcodes.value, backReasons: backReasons.value }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
backReasons.value = ''
handleQuery()
}
})
}
const goThPage = () => {
router.push('/regional/circulation/bbth')
}
const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
}
handleQuery()
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
console.log('page==>', page);
queryParams.value.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageSize = page.pageSize
handleQuery()
}
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
}
getList()
}
const getList = () => {
querySampleSign(queryParams.value).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
})
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
regdictList.value = res.rows;
})
})
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};
</script>
<style scoped lang="scss">
.compact-form {
.el-form-item {
margin-bottom: 5px;
}
}
.btns {
display: flex;
flex-direction: column;
justify-content: space-around;
&>button {
width: 100%;
margin-left: 0;
margin-bottom: 5px;
}
}
</style>

View File

@ -0,0 +1,219 @@
<template>
<div class="app-container">
<div class="compact-form">
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="委托机构:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="条码号:" prop="Barcode">
<el-input v-model="queryParams.Barcode" placeholder="请输入条码号" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="PatName">
<el-input v-model="queryParams.PatName" placeholder="请输入姓名" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="申请项目:" prop="checkPUR">
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="时间类型:" prop="DateType">
<el-select v-model="queryParams.DateType" placeholder="请选择">
<el-option label="登记时间" value="登记时间" />
<el-option label="采样时间" value="采样时间" />
<el-option label="送出时间" value="送出时间" />
<el-option label="签收时间" value="签收时间" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="mb10">
<el-button type="primary" @click="thHandle(20)">重新采集</el-button>
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
<el-button type="primary" @click="thHandle(90)">申请作废</el-button>
</div>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
<template #patAge="{ row }">
{{ row.patAge }}{{ row.ageUnit }}
</template>
<template #status="{ row }">
{{ formatDict(row.status, regdictList) }}
</template>
<template #patSex="{ row }">
{{ row.patSex == 1 ? '男' : '女' }}
</template>
</CustomTable>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { querySampleSignBack, sampleSign } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.js";
import { ElMessage } from 'element-plus';
const aotuSize = classCom.useAutoSize();
const queryParams: any = ref({
pageSize: 50,
pageNum: 1,
})
const tableData: any = ref([])
const columns: any = ref([
{ type: 'selection', align: 'center', visible: true, width: 40 },
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 60 },
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
{ prop: 'srcHospName', label: '检测机构', align: 'center', visible: true, width: 200 },
{ prop: 'Status', label: '标本状态', align: 'center', visible: true, slot: "status" },
{ prop: 'backReasons', label: '退回理由', align: 'center', visible: true, width: 150 },
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
{ prop: 'backUserName', label: '操作人', align: 'center', visible: true, },
{ prop: 'backTime', label: '操作时间', align: 'center', visible: true, width: 150 },
])
const tableConfig = ref({
border: true, // 边框
height: '68vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// fit: true, // 列宽自适应
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const barcodes = ref([])
const tableRefs = ref(null)
const thHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
sampleSign({ status: val, barcode: barcodes.value }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
handleQuery()
}
})
}
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageSize = page.pageSize
handleQuery()
}
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
}
getList()
}
const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
}
handleQuery()
}
const getList = () => {
querySampleSignBack(queryParams.value).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
})
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
regdictList.value = res.rows;
})
})
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};
</script>
<style scoped lang="scss">
.compact-form {
.el-form-item {
margin-bottom: 5px;
}
}
.btns {
display: flex;
flex-direction: column;
justify-content: space-around;
&>button {
width: 100%;
margin-left: 0;
margin-bottom: 5px;
}
}
</style>

View File

@ -0,0 +1,543 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-position="left">
<el-row :gutter="5">
<el-form-item label="" label-width="0px" prop="brdh">
<el-col :span="6">
<div> 就诊卡号/病历号/磁卡号: </div>
<el-input v-model="queryParams.brdh" placeholder="就诊卡号/病历号/磁卡号" clearable @keyup.enter="handleQuery" />
</el-col>
<el-col :span="2">
<el-radio-group v-model="queryParams.zt" size="default">
<el-radio v-for="(item, index) in showconfirmOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="1">
<div> 申请获取期限: </div>
</el-col>
<el-col :span="6">
<el-radio-group v-model="queryParams.subday" size="default">
<el-radio v-for="(item, index) in subdayOptions" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="3">
<el-select v-model="queryParams.cardtype" placeholder="卡类型" clearable :style="{ width: '100%' }">
<el-option v-for="(item, index) in cardtypeOptions" :key="index" :label="item.label" :value="item.value"
:disabled="item.disabled"></el-option>
</el-select>
</el-col>
<el-col :span="2">
<el-button type="primary" icon="Search" @click="readCard">读卡</el-button>
</el-col>
<el-col :span="2">
<PatSearchDialog @select="handlePatientSelect" />
</el-col>
</el-form-item>
</el-row>
</el-form>
<el-row :gutter="5" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Printer" :disabled="single" @click="printAll">打印</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Printer" :disabled="single" @click="printSigne">单打条码</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Printer" :disabled="freesingle" @click="printBack">单打回单</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Delete" @click="cancel">取消采样</el-button>
</el-col>
</el-row>
<el-row :gutter="5" class="table-container">
<el-table ref="tableRef" :data="reqmainList" @selection-change="handleSelectionChange" @select="handleSelect"
height="100%" :cell-style="tableCellStyle">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="项目名称" align="center" prop="sqxmmc" width="200" show-overflow-tooltip />
<el-table-column label="项目代码" align="center" prop="sqxmdh" width="100" show-overflow-tooltip />
<el-table-column label="项目类别" align="center" prop="cp_xmlb" />
<el-table-column label="样本类型" align="center" prop="yblx" />
<el-table-column label="条码号" align="center" prop="sqh" width="150" show-overflow-tooltip />
<el-table-column label="申请时间" align="center" prop="sqsj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.sqsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="病人姓名" align="center" prop="brxm" show-overflow-tooltip />
<el-table-column label="申请医生" align="center" prop="sqys" :formatter="formatDict('SRD')" show-overflow-tooltip />
<el-table-column label="序号" align="center" prop="xh" show-overflow-tooltip />
<el-table-column label="数量" align="center" prop="sl" show-overflow-tooltip />
<el-table-column label="单价" align="center" prop="dj" show-overflow-tooltip />
<el-table-column label="状态" align="center" prop="zt" show-overflow-tooltip />
<el-table-column label="计价" align="center" prop="jjzt">
<template #default="scope">
<el-checkbox :model-value="scope.row.jjzt === '1'" disabled>
</el-checkbox>
</template>
</el-table-column>
<el-table-column label="病人代号" align="center" prop="brdh" show-overflow-tooltip />
<el-table-column label="备注1" align="center" prop="detailBZ1" show-overflow-tooltip />
<el-table-column label="备注2" align="center" prop="detailBZ2" show-overflow-tooltip />
<el-table-column label="颜色" align="center" prop="cp_color" v-if="false" show-overflow-tooltip />
<el-table-column label="确认标识" align="center" prop="cp_cflag" v-if="false" show-overflow-tooltip />
<el-table-column label="科室" align="center" prop="ksdh" :formatter="formatDict('DP')" show-overflow-tooltip />
<el-table-column label="病人类型" align="center" prop="brly" :formatter="formatDict('PT')" show-overflow-tooltip />
<el-table-column label="性别" align="center" prop="brxb" :formatter="formatDict('SX')" show-overflow-tooltip />
<el-table-column label="生日" align="center" prop="brsr" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.brsr, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="床号" align="center" prop="ch" width="50" show-overflow-tooltip />
<el-table-column label="诊断" align="center" prop="zd" width="150" show-overflow-tooltip />
<el-table-column label="条码类别" align="center" prop="bgddh" v-if="false" show-overflow-tooltip />
<el-table-column label="年龄" align="center" prop="nl" show-overflow-tooltip />
<el-table-column label="年龄单位" align="center" prop="nldw" :formatter="formatDict('AU')" show-overflow-tooltip />
<el-table-column label="采样时间" align="center" prop="cysj" width="180" show-overflow-tooltip>
<template #default="scope">
<span>{{ parseTime(scope.row.cysj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<!-- 汇总行 -->
<div class="table-summary">
<div class="summary-item">
<span class="summary-label">条码数:</span>
<span class="summary-value">{{ idsnew.length }}</span>
</div>
<div class="summary-item">
<span class="summary-label">项目数:</span>
<span class="summary-value">{{ totalRows }}</span>
</div>
<div class="summary-item">
<span class="summary-label">合计金额:</span>
<span class="summary-value">{{ totalPrice.toFixed(2) }}</span>
</div>
</div>
</div>
</template>
<script setup>
import {
querySQD,
queryPatList,
printBackpaper,
printBarcodeall
} from "@/api/mzcx/cydj.js";
import { querySample } from '@/api/regional/index'
import PatSearchDialog from '../../../mzcx/cydj/components/OutPatList.vue'
// import PatSearchDialog from './components/OutPatList.vue'
import { classCom } from '@/utils/classCom';
const comDict = inject('comDict');
// 字典数据存储
const dictData = ref({});
const tableRef = ref(null);
const { proxy } = getCurrentInstance();
// 选中的行
const selectedRows = ref([]);
const reqmainList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
// 新增:计算属性,返回去重后的ids数组
const idsnew = computed(() => {
return [...new Set(ids.value)];
});
const single = ref(true);
const freesingle = ref(true);
const cardtypeOptions = ref([{ "label": "就诊卡", "value": 1 }, { "label": "医保卡", "value": 2 }, { "label": "电子医保卡", "value": 3 }, { "label": "身份证", "value": 4 }])
const showconfirmOptions = ref([{ "label": "未打印", "value": 1 }, { "label": "已打印", "value": 11 }])
const subdayOptions = ref([{ "label": "1天", "value": 1 }, { "label": "3天", "value": 3 }, { "label": "1周", "value": 7 }, { "label": "2周", "value": 14 }, { "label": "1月", "value": 30 }, { "label": "3月", "value": 90 }, { "label": "1年", "value": 365 }, { "label": "2年", "value": 730 }])
const data = reactive({
form: {},
queryParams: {
brdh: null,
stime: null,
etime: null,
klx: null,
zt: 1,
subday: 3000,
cardtype: null,
Status: '10'
},
rules: {
brdh: [
{ required: true, message: "病人代码不能为空", trigger: "blur" }
],
subday: [],
}
});
const { queryParams, form, rules } = toRefs(data);
// 标志位:是否是程序自动勾选(避免循环触发事件)
const isAutoSelect = ref(false);
/**
* 监听单选勾选/取消事件
* @param {Array} selection 目前已选中的行
* @param {Object} row 当前操作的行数据
* @param {Boolean} selected 是否勾选(true=勾选,false=取消)
*/
const handleSelect = (selection, row, selected) => {
if (isAutoSelect.value) return;
const targetSqh = row.sqh;
const targetxh = row.xh;
if (!targetSqh) return;
// 先收集需要自动勾选的行(避免在循环中修改数据)
const rowsToSelect = reqmainList.value.filter(
item => item.sqh === targetSqh && item.xh !== targetxh
);
// 如果有需要自动勾选的行,才开启标志位
if (rowsToSelect.length > 0) {
rowsToSelect.forEach(item => {
tableRef.value.toggleRowSelection(item, selected);
isAutoSelect.value = true;
});
setTimeout(() => isAutoSelect.value = false, 0);
}
};
// 字典格式化方法
const formatDict = (dictType) => {
return (row, column, value) => {
// 从全局字典中获取映射值
return dictData.value[dictType].find(item => String(item.value) === String(value).trim())?.label || value;
};
};
// 定义“空数据”的判断函数
const isEmptyData = (data) => {
// 处理 null/undefined
if (data === null || data === undefined) return true;
// 处理空数组
if (Array.isArray(data) && data.length === 0) return true;
// 处理空对象(无任何属性)
if (typeof data === 'object' && Object.keys(data).length === 0) return true;
// 处理空字符串
if (typeof data === 'string' && data.trim() === '') return true;
return false;
};
/**
* 获取指定天数偏移后的日期时间字符串
* @param {number} days 偏移天数(正数表示未来,负数表示过去)
* @returns {string} 格式化的日期时间字符串 'yyyy-mm-dd HH:MM:SS'
*/
function getDateOffset(days) {
const now = new Date();
const offsetTimestamp = now.getTime() + days * 24 * 60 * 60 * 1000;
const targetDate = new Date(offsetTimestamp);
const year = targetDate.getFullYear();
const month = String(targetDate.getMonth() + 1).padStart(2, '0');
const day = String(targetDate.getDate()).padStart(2, '0');
// const hours = String(targetDate.getHours()).padStart(2, '0');
// const minutes = String(targetDate.getMinutes()).padStart(2, '0');
//const seconds = String(targetDate.getSeconds()).padStart(2, '0');
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
return `${year}-${month}-${day} 00:00:00`;
}
function getSubday() {
const days = 0 - queryParams.value.subday;
queryParams.value.stime = getDateOffset(days);
queryParams.value.etime = getDateOffset(1);
}
/** 查询采样登记列表 */
function getList() {
freesingle.value = true;
if (isEmptyData(queryParams.value.brdh)) proxy.$modal.alert("请刷卡或输入门诊号!");
else {
loading.value = true;
getSubday();
querySample(queryParams.value).then(response => {
if (isEmptyData(response.data)) proxy.$modal.alert("没有检索的数据!");
reqmainList.value = response.data;
// console.log('response:', response.data);
loading.value = false;
single.value = false;
// 新增:数据加载完成后触发全选
// 延迟执行(确保DOM已更新)
setTimeout(() => {
if (tableRef.value) {
tableRef.value.toggleAllSelection(); // 调用全选方法
}
}, 0);
});
}
}
// 取消按钮
function cancel() {
// open.value = false;
// reset();
}
// 表单重置
function reset() {
form.value = {
sqh: null,
xh: null,
sqxmdh: null,
sqxmmc: null,
sl: null,
dj: null,
detailZT: null,
detailJJZT: null,
ksdh: null,
sqys: null,
sqsj: null,
jsys: null,
jssj: null,
brly: null,
brdh: null,
brxm: null,
zt: null,
jjzt: null,
brxb: null,
brsr: null,
jzbz: null,
cp_xmlb: null,
cp_color: null,
cp_cflag: null,
detailBZ1: null,
ch: null,
detailBZ2: null,
bz1: null,
bz2: null,
bz3: null,
yblx: null,
zxys: null,
zxsj: null,
bgddh: null,
nl: null,
nldw: null,
zd: null,
cysj: null
};
freesingle.value = false;
single.value = false;
proxy.resetForm("reqmainRef");
}
/** 搜索按钮操作 */
function handleQuery() {
getList();
}
function readCard() {
//getList();
}
// 处理病人选择事件
const handlePatientSelect = (patient) => {
// console.log('选中的病人:', patient);
queryParams.value.brdh = patient
// 处理选中的病人数据
handleQuery();
};
// 多选框选中数据
function handleSelectionChange(selection) {
if (isAutoSelect.value) return;
selectedRows.value = selection;
ids.value = selection.map(item => item.sqh);
}
/** 打印选择 */
function printAll(row) {
printSigne();
printBack();
}
/** 单打条码*/
function printSigne(row) {
if (idsnew.value.length === 0) {
return;
}
printBarcodeall(idsnew.value).then(response => {
proxy.$modal.msgSuccess("打印成功");
open.value = false;
freesingle.value = false;
}).catch(() => {
});
}
/** 打印回单 */
function printBack(row) {
if (idsnew.value.length === 0) {
return;
}
//console.log('idsnew:', idsnew.value)
printBackpaper(idsnew.value).then(response => {
proxy.$modal.msgSuccess("打印成功");
open.value = false;
}).catch(() => {
});
}
const totalRows = computed(() => {
return reqmainList.value.length || 0;
});
const totalPrice = computed(() => {
return reqmainList.value.reduce((sum, row) => {
const price = parseFloat(row.dj) || 0;
return sum + price;
}, 0);
});
// 组件挂载时加载字典
onMounted(async () => {
// 加载病人来源字典
const dictRefs = await comDict('PT', 'DP', 'SRD', 'BT', 'SX', 'AU');
// 从 ref 中获取实际数据
dictData.value = {
PT: toRaw(dictRefs.PT.value) || [],
DP: toRaw(dictRefs.DP.value) || [],
SRD: toRaw(dictRefs.SRD.value) || [],
BT: toRaw(dictRefs.BT.value) || [],
SX: toRaw(dictRefs.SX.value) || [],
AU: toRaw(dictRefs.AU.value) || []
};
});
// 表格单元格样式(仅作用于“项目类别”列)
const tableCellStyle = ({ row, column }) => {
// 只对“项目类别”列生效
if (column.label === '项目类别') {
// 1. 转换颜色(十进制→十六进制)
const bgColor = classCom.decimalToHexColor(row.cp_color);
// 2. 自动计算文字颜色(确保和背景色对比度足够)
const textColor = classCom.getContrastTextColor(bgColor);
return {
backgroundColor: bgColor, // 背景色(转换后的值)
color: textColor, // 文字色(自动适配)
textAlign: 'center', // 文字居中
fontWeight: '500' // 文字加粗(提升可读性)
};
}
return {}; // 其他列保持默认样式
};
</script>
<style scoped lang="scss">
.app-container {
display: flex;
flex-direction: column;
height: 90vh;
/* 容器高度等于窗口高度 */
overflow: hidden;
}
.compact-form {
height: 75px;
/* 固定高度 */
}
.mb8 {
height: 30px;
/* 固定高度 */
}
.table-summary {
height: 10px;
/* 固定高度 */
}
.table-container {
flex: 1;
/* 占满剩余高度 */
overflow: hidden;
/* 避免表格超出容器 */
}
.compact-form .el-form-item {
padding: 5px;
margin-bottom: 5px;
}
.compact-form .el-form-item__label {
padding-bottom: 0px;
}
.card-content {
max-height: 450px;
/* 设置最大高度 */
overflow-y: auto;
/* 超出高度时显示垂直滚动条 */
padding: 5px;
/* 保持与卡片默认一致的内边距 */
}
.clickable:hover {
cursor: pointer;
/* 鼠标悬停时显示手型 */
transition: all 0.3s;
/* 平滑过渡效果 */
color: blue;
}
/* 汇总行样式 */
.table-summary {
display: flex;
align-items: center;
justify-content: flex-start;
padding: 6px 16px;
margin-top: 8px;
background-color: #f5f7fa;
border: 1px solid #ebeef5;
border-radius: 4px;
font-weight: 500;
line-height: 24px;
/* 汇总行文字行高 */
.summary-item {
display: flex;
align-items: center;
margin-left: 24px;
.summary-label {
color: #606266;
margin-right: 8px;
}
.summary-value {
color: #303133;
min-width: 40px;
text-align: left;
/* 核心:数值左对齐 */
}
/* 单独设置"单价合计"的值为红色 */
&:nth-child(3) .summary-value {
color: #f56c6c;
/* Element UI 红色主题色 */
font-weight: 600;
/* 可选:加粗字体 */
}
}
}
</style>

View File

@ -0,0 +1,253 @@
<template>
<div class="app-container">
<div class="compact-form">
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="委托机构:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="条码号:" prop="Barcode">
<el-input v-model="queryParams.Barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="PatName">
<el-input v-model="queryParams.PatName" placeholder="请输入姓名" clearable @change="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="申请项目:" prop="checkPUR">
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable @change="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="时间类型:" prop="DateType">
<el-select v-model="queryParams.DateType" placeholder="请选择">
<el-option label="登记时间" value="登记时间" />
<el-option label="采样时间" value="采样时间" />
<el-option label="送出时间" value="送出时间" />
<el-option label="签收时间" value="签收时间" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="cz_box">
<el-row :gutter="10">
<el-col :span="1.5"> 送检医院:</el-col>
<el-col :span="4">
<SelectTable v-model:data="dstHospCode" :fields="ksdhFields" :tableData="hosList" label="label"
:size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择" @get-data-value="getValue" />
</el-col>
<el-col :span="1.5"> <el-button type="primary" :size="aotuSize" @click="sjHandle(30)">标本送检</el-button></el-col>
<el-col :span="1.5"> <el-button type="primary" :size="aotuSize" @click="sjHandle(20)">取消送检</el-button></el-col>
</el-row>
</div>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@selection-change="handleSelectionChange" @size-change="sizeChange" @page-change="currentChange">
<template #patAge="{ row }">
{{ row.patAge }}{{ row.ageUnit }}
</template>
<template #status="{ row }">
{{ formatDict(row.status, regdictList) }}
</template>
<template #patSex="{ row }">
{{ row.patSex == 1 ? '男' : '女' }}
</template>
</CustomTable>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { querySample, sampleSign } from '@/api/regional/index'
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.js";
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
import { ElMessage } from 'element-plus';
const aotuSize = classCom.useAutoSize();
const queryParams: any = ref({
pageSize: 50,
pageNum: 1,
Status: '30'
})
const tableData: any = ref([])
const columns: any = ref([
{ type: 'selection', align: 'center', visible: true, width: 40 },
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 250 },
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 60 },
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 250 },
{ prop: 'sampleTypeName', label: '标本类型', align: 'center', visible: true, },
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
{ prop: 'affirmTime', label: '送检时间', align: 'center', visible: true, },
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
])
const tableConfig = ref({
border: true, // 边框
height: '70vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// fit: true, // 列宽自适应
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const dstHospName = ref('')
const dstHospCode = ref('')
const barcodes = ref([])
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
}
const getValue = (val: any) => {
console.log('val==>', val);
dstHospName.value = val.label
}
const sjHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
if (!dstHospCode.value) return ElMessage.warning('请选择送检医院!')
const params = {
barcode: barcodes.value,
dstHospName: dstHospName.value,
dstHospCode: dstHospCode.value,
status: val
}
sampleSign(params).then((res: any) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
handleQuery()
dstHospCode.value = ''
}
})
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageSize = page.pageSize
handleQuery()
}
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
}
getList()
}
const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
Status: '30'
}
handleQuery()
}
const getList = () => {
querySample(queryParams.value).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
})
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
regdictList.value = res.rows;
})
})
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};
</script>
<style scoped lang="scss">
.compact-form {
.el-form-item {
margin-bottom: 5px;
}
}
.btns {
display: flex;
flex-direction: column;
justify-content: space-around;
&>button {
width: 100%;
margin-left: 0;
margin-bottom: 5px;
}
}
.cz_box {
padding: .3125rem 0;
border-top: 1px solid #ccc;
}
</style>

View File

@ -0,0 +1,763 @@
<template>
<div class="app-container ">
<div ref="compactForm">
<el-row :gutter="10" class="compact-form" v-show="showSearch">
<el-form :model="queryParams" ref="queryRef" :inline="true" :size="aotuSize" :rules="queryRules">
<el-form-item label="日期:" prop="failed1">
<el-date-picker v-model="queryParams.times" type="datetimerange" range-separator="-"
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" @change="handletime" style="width: 25rem;" />
</el-form-item>
<el-form-item label="委托机构:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList" label="label"
width="12.5rem" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择委托机构" />
</el-form-item>
<el-form-item label="条码状态:" prop="zt">
<el-select v-model="queryParams.zt" placeholder="请选择" style="width: 6.25rem;">
<el-option v-for="item in dictData.ST" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="" prop="failed4">
<el-select v-model="queryParams.failed4" placeholder="请选择" style="width:8.75rem">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="" prop="failed5">
<el-input v-model="queryParams.failed5" clearable placeholder="条件搜索" @keyup.enter="handleQuery"
@clear="handleQuery" />
</el-form-item>
<el-form-item label="">
<el-button icon="search" type="primary" @click="handleQuery" :size="aotuSize"> 搜索 </el-button>
<el-button icon="Refresh" @click="resetQuery" :size="aotuSize">重置</el-button>
</el-form-item>
</el-form>
</el-row>
</div>
<el-row :gutter="10">
<el-col :span="16" class="right-table">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" :size="aotuSize" plain icon="Plus" @click="printHandle">生成条码</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" :size="aotuSize" plain icon="Edit" @click="selectStatusRows">选中所有未打印</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" :size="aotuSize" plain @click="printPdf">打印</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" :size="aotuSize" plain icon="Upload" @click="openBlock('采样登记')">采样登记</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain @click="openBlock('送检登记')">送检登记</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain @click="goReport">报告查询</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain @click="cancelHandle">条码作废</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain>打印机设置</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain>清单打印</el-button>
</el-col>
<!-- <right-toolbar v-model:showSearch="showSearch" @updateColumns="updateColumns" @queryTable="handleQuery"
:columns="columns"></right-toolbar> -->
</el-row>
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
@row-click="rowHandle" @selection-change="selectionChange" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
<template #dy="{ row }">
<svg-icon v-if="row.zt != 1" icon-class="lvgou" />
</template>
<template #srcHospName="{ row }">
武汉市汉阳区江堤街社区卫生服务中心
</template>
<template #jzbz="{ row }">
{{ row.jzbz == '1' ? '急' : '' }}
</template>
<template #jjzt="{ row }">
{{ row.jjzt == '1' ? '计价' : '无' }}
</template>
<template #brly="{ row }">
{{ formatDict(row.brly, 'PT') }}
</template>
<template #zt="{ row }">
{{ formatDict(row.zt.trim(), 'ST') }}
</template>
<template #yljg="{ row }">
{{ formatDict(row.yljg, 'HOS') }}
</template>
</CustomTable>
</el-col>
<el-col :span="8" class="right-table">
<!-- <div class="title"> 项目 </div> -->
<el-button type="primary" plain class="mb8" :size="aotuSize">拆分选中项目</el-button>
<CustomTable :data="rightTableData" :columns="rightColumns" :config="rightTableConfig">
<template #jjzt="{ row }">
{{ row.jjzt == '1' ? '计价' : '无' }}
</template>
<template #zt="{ row }">
{{ formatDict(row.zt, 'ST') }}
</template>
</CustomTable>
</el-col>
</el-row>
<!-- 样本流程 -->
<div class="time-line-box">
<div v-for="(item, i) in timelineItems" :key="i" class="time-line-item">
<div v-if="i != 0" class="timeline-connector">
<img class="timg" src="@/assets/images/yjt.png" alt="">
</div>
<div :class="['timeline-content', i > lastTimeIndex ? 'no_active' : '']">
<div :class="['index', lastTimeIndex == i ? 'active' : '']">{{ i + 1 }}</div>
<div class="timeline-title">{{ item.title }}</div>
<div class="timeline-time">{{ item.time }}</div>
</div>
</div>
</div>
<!-- 采样登记 -->
<el-dialog v-model="dialogVisible" :title="title" draggable :close-on-click-modal="false" width="70vw"
@close="closeDialog">
<div class="flex-between">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-input v-model="sqhText" clearable placeholder="条形码" @keyup.enter="sqdQuery" @clear="sqdQuery" />
</el-col>
<el-col :span="1.5">
<el-button type="primary" @click="sqdQuery" plain>读取</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="delete">删除选中行</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain>打印</el-button>
</el-col>
</el-row>
<!-- <el-button type="primary" plain>保存</el-button> -->
</div>
<CustomTable :data="cyTableData" :columns="cyColumns" :config="cyTableConfig">
<template #zt="{ row }">
{{ formatDict(row.zt, 'ST') }}
</template>
</CustomTable>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, toRaw, computed, watch, nextTick, onMounted, } from 'vue';
import { HiprintPrinter } from '@/utils/hiprintPrinter';
import { classCom } from '@/utils/classCom';
import CustomTable from '@/components/elTable/index.vue'
import { useRouter } from 'vue-router'
import { usePrintStore } from '@/store/modules/printStore'
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain } from '@/api/checkCode/index'
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
const aotuSize = classCom.useAutoSize();
//@ts-ignore
import { comDict } from '@/utils/dict'
import SelectTable from '@/components/SelectTable/index.vue';
import { ElMessage, ElMessageBox } from 'element-plus'
const router = useRouter()
const printStore = usePrintStore();
const compactForm = ref<HTMLElement | null>(null);
const heightForm = ref(90);
const dialogVisible = ref(false)
const title = ref('采样登记')
const sqhText = ref('')
const tableRef = ref()
interface QueryParams {
times: string[]; // 明确类型为字符串元组
yljg: string;
zt: string;
failed4: string;
failed5: string;
SrcHospName: string;
}
// 提交表单数据
const queryParams = reactive<QueryParams>({
times: ['2025-07-18 00:00:00', '2025-07-18 23:59:59'],
// times: [],
yljg: '1',
zt: '',
SrcHospName: '',
failed4: '',
failed5: '',
});
const showSearch = ref(true);
const queryRef = ref()
// 定义校验规则
const queryRules = ref({
// clientId: [
// { required: true, message: '编号不能为空', trigger: 'blur' },
// ],
// failed3: [
// { required: true, message: '条码状态不能为空', trigger: 'change' },
// ],
})
const options = [
{
value: '1',
label: '通过姓名搜索',
},
{
value: '2',
label: '通过病人号搜索',
},
{
value: '3',
label: '通过床号搜索',
},
]
interface DictData {
SX?: Array<any>;
HOS?: Array<any>;
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
}
// 字典数据存储
const dictData = ref<DictData>({});
const handleQuery = async () => {
const valid = await queryRef.value.validate().catch(() => { });
if (!valid) return false;
getList()
}
// 重置
const resetQuery = () => {
queryRef.value?.resetFields();
getList()
}
const loading = ref(true);
// 数据源
const tableData = ref([])
// 配置项
const columns = ref([
{ type: 'selection', visible: true, align: 'center', width: 40, label: '多选框' },
{ prop: 'srcHospName', label: '委托机构', visible: true, align: 'center', width: 200, slot: 'srcHospName' },
{ prop: 'zt', label: '打印', visible: true, align: 'center', slot: 'dy', width: 40 },
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 30 },
{ prop: 'ch', label: '床号', visible: true, align: 'center', width: 40 },//sortable: true,
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, width: 50 },
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 30 },
{ prop: 'jymd', label: '项目名称', visible: true, width: 130 },
{ prop: 'bgddhname', label: '类别', align: 'center', visible: true, width: 80 },
{ prop: 'sampletips', label: '采样提示', align: 'center', visible: true, width: 60 },
{ prop: 'yblx', label: '样本类型', align: 'center', visible: true, width: 60 },
{ prop: 'brdh', label: '病人号', align: 'center', visible: true, width: 90 },
{ prop: 'ksname', label: '科室名称', align: 'center', visible: true, width: 100 },
{ prop: 'sqh', label: '申请号/条码', align: 'center', visible: true, width: 100 },
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt', width: 40 },
{ prop: 'brly', label: '病人来源', align: 'center', visible: true, slot: 'brly', width: 60 },
{ prop: 'sqysname', label: '申请医生', align: 'center', visible: true, width: 60 },
{ prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 150 },
{ prop: 'jjzt', label: '计价标志', align: 'center', visible: true, slot: 'jjzt', width: 60 },
{ prop: 'zxysname', label: '执行医生', align: 'center', visible: true, width: 60 },
{ prop: 'bbsjrname', label: '送检人', align: 'center', visible: true, width: 50 },
{ prop: 'yljg', label: '检验机构', align: 'center', visible: true, slot: 'yljg', width: 150 },
])
const single = ref(true);
const multiple = ref(true);
const sqhs = ref([]);
// 单元格样式
const cellStyleHd = ({ row, column, rowIndex, columnIndex }: {
row: any;
column: any;
rowIndex: number;
columnIndex: number;
}) => {
// console.log(row, column, rowIndex, columnIndex);
if (column.label == "急" && row.jzbz == "1") {
return { color: '#f00' };
}
if (column.label == "类别") {
const bgColor = classCom.decimalToHexColor(row.bkcolor);
const textColor = classCom.getContrastTextColor(bgColor);
return {
backgroundColor: `${bgColor} !important`,
color: textColor,
};
}
};
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const rowClassNameHd = ({ row, rowIndex }: {
row: any;
rowIndex: number;
}) => {
return 'custom-row-class'; // 返回自定义类名
};
// 时间线数据
const timelineItems = ref(
[
{ title: '检验申请', time: '' },
{ title: '标本采集', time: '' },
{ title: '上机检验', time: '' },
{ title: '标本送检', time: '' },
// { title: '检验接收', time: '' },
{ title: '标本签收', time: '' },
{ title: '结果审核', time: '' },
]
);
// 计算最后一个有时间的节点索引
const lastTimeIndex = computed(() => {
const lastIndex = timelineItems.value.findLastIndex(item => item.time);
if (lastIndex === -1) {
return -1
} else {
return lastIndex;
}
});
// 点击行
const rowHandle = (row: any) => {
timelineItems.value =
[
{ title: '检验申请', time: row.sqsj },
{ title: '标本采集', time: row.cysj },
{ title: '上机检验', time: row.zxsj },
{ title: '标本送检', time: row.bbsjsj },
// { title: '检验接收', time: row.jssj},
{ title: '标本签收', time: row.jssj },
{ title: '结果审核', time: row.confirmtime },
]
getRightTable(row)
};
const selectionChange = (selection: any) => {
sqhs.value = selection;
single.value = selection.length != 1;
multiple.value = !selection.length;
}
const handleColumnDragEnd = (data: any) => {
// 更新列配置
columns.value = data.columns;
// 可以在这里保存列顺序到本地存储等
// localStorage.setItem('tableColumnOrder', JSON.stringify(data.columns));
};
// 左侧表格配置
const tableConfig = ref({
// stripe: true, // 斑马纹
border: true, // 边框
index: true, // 序号
height: '', // 高度
highlightCurrentRow: true, // 高亮当前行
cellStyle: cellStyleHd,
rowClassName: rowClassNameHd,
fit: true
})
// 右侧数据源
const rightTableData = ref([])
// 配置项
const rightColumns = ref([
{ prop: 'sqxmdh', label: '项目代号', visible: true, sortable: true, width: '110px' },
{ prop: 'sqxmmc', label: '项目名称', visible: true, width: '120px' },
{ prop: 'dj', label: '单价', align: 'center', visible: true, },
{ prop: 'sl', label: '数量', align: 'center', visible: true, },
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt', },
{ prop: 'jjzt', label: '计价标志', align: 'center', visible: true, slot: 'jjzt', },
])
// 表格配置
const rightTableConfig = ref({
// stripe: true, // 斑马纹
border: true, // 边框
height: '', // 高度
highlightCurrentRow: true, // 高亮当前行
})
// 采样数据源
const cyTableData = ref([])
// 配置项
const cyColumns = ref([
{ prop: 'sqh', label: '申请号/条形码', align: 'center', visible: true, sortable: true, width: 140 },
{ prop: 'ksdh', label: '科室病区', align: 'center', visible: true, width: 120 },
{ prop: 'ch', label: '床号', align: 'center', visible: true, sortable: true, },
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, },
{ prop: 'brdh', label: '病人号', align: 'center', visible: true, },
{ prop: 'brxb', label: '性别', align: 'center', visible: true, },
{ prop: 'yblx', label: '样本类型', align: 'center', visible: true, },
{ prop: 'zt', label: '状态', align: 'center', visible: true, slot: 'zt', },
{ prop: 'jzbz', label: '急诊', align: 'center', visible: true, },
{ prop: 'jjzt', label: '采样人', align: 'center', visible: true, },
{ prop: 'cysj', label: '采样时间', align: 'center', visible: true, },
{ prop: 'zxysname', label: '执行医生', align: 'center', visible: true, },
{ prop: 'zxsj', label: '执行时间', align: 'center', visible: true, },
])
// 表格配置
const cyTableConfig = ref({
border: true, // 边框
height: '100%', // 高度
highlightCurrentRow: true, // 高亮当前行
})
// 采样登记
const openBlock = (value: string) => {
if (sqhs.value.length > 0) {
ElMessageBox.confirm(`确定操作选中的数据吗?`, "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
beforeClose: async (action, instance, done) => {
if (action === "confirm") {
// 生成请求Promise数组
const requests = sqhs.value.map((item: any) => { return item.sqh });
fetchCodeExec({
sqh: requests.join(','),
userid: 'lis',
status: value == '采样登记' ? 12 : 13,
yljg: 1
}).then((res: any) => {
if (res.code == 0) {
ElMessage.success('调用成功');
done();
getList()
} else {
ElMessage.error('调用失败');
}
})
} else {
done();
}
},
}).catch(() => { });
} else {
title.value = value
dialogVisible.value = true
}
}
// 采样读取
const sqdQuery = () => {
const index = cyTableData.value.findIndex((item: any) => item.sqh == sqhText.value)
if (index !== -1) return ElMessage.warning('该申请单数据已存在!')
fetchCodeReqmain({ sqh: sqhText.value }).then((res: any) => {
if (res.code == 0 && res.data.sqh) {
fetchCodeExec({
sqh: res.data.sqh,
userid: 'lis',
status: 12,
yljg: 1
})
cyTableData.value = cyTableData.value.concat(res.data)
}
})
}
// 关闭弹窗清空
const closeDialog = () => {
cyTableData.value = []
sqhText.value = ''
}
interface ColumnItem {
prop: string;
label: string;
visible: boolean;
key: number;
align: string;
slot: string;
width: string;
}
// 更新列
// const updateColumns = (arr: Array<ColumnItem>) => {
// columns.value = arr
// };
const getRightTable = (row: any) => {
fetchCodeDetail({ sqh: row.sqh }).then((res: any) => {
if (res.code == 0) {
rightTableData.value = res.data
}
})
}
const goReport = () => {
// 跳转到报告查询页面
router.push('/regional/inspectionReport/report?startdate=2025-08-19&endate=2025-08-19&deptcode=0210&userid=00910&brdh=')
};
const cancelHandle = () => {
if (sqhs.value.length <= 0) return ElMessage.warning('请选择数据!')
ElMessageBox.confirm(`确定作废选中的数据吗?`, "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
beforeClose: async (action, instance, done) => {
if (action === "confirm") {
const requests = sqhs.value.map((item: any) => { return item.sqh });
fetchCodeExec({
sqh: requests.join(','),
userid: 'lis',
status: 9,
yljg: 1
}).then((res: any) => {
if (res.code == 0) {
ElMessage.success('调用成功');
done();
getList()
} else {
ElMessage.error('调用失败');
}
})
} else {
done();
}
},
}).catch(() => { });
}
const hosList = ref([])
onMounted(async () => {
// 初始化3天区间(今天-前两天)
// const end = dayjs().format('YYYY-MM-DD HH:mm:ss');
// const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD HH:mm:ss'); //add 时间往后
// queryParams.times = [start, end];
// console.log(queryParams.times);
getList()
adjustTableHeight();
// 加载病人来源字典
const dictRefs = await comDict('PT', 'HOS', 'ST');
// 从 ref 中获取实际数据
dictData.value = {
PT: toRaw(dictRefs.PT.value) || [],
HOS: toRaw(dictRefs.HOS.value) || [],
ST: toRaw(dictRefs.ST.value) || [],
};
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
});
})
// 字典格式化方法
const formatDict = (v: string, dictType: string) => {
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
};
// 计算table高度
watch(showSearch, () => {
nextTick(() => {
adjustTableHeight();
})
}, { immediate: true });
function adjustTableHeight() {
if (compactForm.value) {
// 获取高度
heightForm.value = compactForm.value.offsetHeight;
tableConfig.value.height = `calc(74vh - ${heightForm.value}px)`; // 设置表格容器的高度
rightTableConfig.value.height = `calc(74vh - ${heightForm.value}px)`;
}
}
const handletime = (val: Array<string>) => {
// console.log('时间', val);
}
// 生成条码
const printHandle = () => {
const data = {
dept: '0235',
userid: 'lis',
st: '',
et: '',
yljg: queryParams.yljg
}
if (queryParams.times && queryParams.times.length) {
data.st = queryParams.times[0]
data.et = queryParams.times[1]
}
addObj(data).then((res: any) => {
if (res.code == 0) {
getList()
}
})
}
// 查询申请单
const getList = () => {
loading.value = true;
const data = {
dept: '0235',
userid: 'lis',
st: queryParams.times[0],
et: queryParams.times[1],
yljg: queryParams.yljg
}
fetchCodeList(data).then((response: any) => {
if (response.code == 0) {
loading.value = false;
tableData.value = response.data
if (tableData.value.length > 0) {
rowHandle(response.data[0])
getRightTable(response.data[0])
tableRef.value.setCurrentRow(response.data[0])
}
}
})
}
const selectStatusRows = () => {
tableRef.value.clearSelection()
tableData.value.forEach((item: any) => {
if (item.zt == 1) {
tableRef.value.toggleRowSelection(item, true)
}
})
}
// 打印pdf
const printPdf = () => {
if (sqhs.value.length <= 0) return ElMessage.warning('请选择数据!')
ElMessageBox.confirm(`确定打印选中的数据吗?`, "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
beforeClose: async (action, instance, done) => {
if (action === "confirm") {
const requests = sqhs.value.map((item: any) => { return item.sqh });
fetchCodeExec({
sqh: requests.join(','),
userid: 'lis',
status: 11,
yljg: 1
}).then((res: any) => {
if (res.code == 0) {
done();
getList()
HiprintPrinter.silentPrint(res.data);
}
})
} else {
done();
}
},
}).catch(() => { });
}
</script>
<style scoped lang="scss">
.custom-row-class {
background-color: #c6c3ff !important;
/* 设置行背景色 */
}
.right-table {
border: 1px solid #E1E9F7;
padding-top: .3125rem;
}
.title {
border-bottom: 1px solid #E1E9F7;
margin-bottom: .625rem;
padding: .625rem;
font-weight: 700;
}
.time-line-box {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: .35rem;
background-color: #f0f3f8;
padding: .3rem 2.5rem;
}
.time-line-item {
display: flex;
align-items: center;
justify-content: space-around;
width: 16.6%;
// padding: 0 30px;
.timeline-content {
display: flex;
flex-direction: column;
align-items: center;
.index {
width: 1.875rem;
height: 1.875rem;
line-height: 1.875rem;
background: #E1E9F7;
border-radius: 50%;
text-align: center;
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 500;
font-size: 1.125rem;
color: #4767A3;
}
.active {
background-color: #4096ff;
box-shadow: 0 0 0 .25rem rgba(64, 150, 255, 0.2);
color: #FFF;
}
.timeline-title {
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 500;
font-size: 1rem;
color: #4767A3;
}
.timeline-time {
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
font-size: .875rem;
color: #4767A3;
}
}
.timg {
width: 3.125rem;
}
}
</style>

View File

@ -0,0 +1,273 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="诊断编码" prop="diagCode">
<el-input
v-model="queryParams.diagCode"
placeholder="请输入诊断编码"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="诊断名称" prop="diagName">
<el-input
v-model="queryParams.diagName"
placeholder="请输入诊断名称"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="诊断状态" clearable style="width: 200px">
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="diagnosisList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="诊断编号" align="center" prop="diagId" />
<el-table-column label="诊断编码" align="center" prop="diagCode" />
<el-table-column label="诊断名称" align="center" prop="diagName" />
<el-table-column label="诊断排序" align="center" prop="diagSort" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改诊断对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="diagnosisRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="诊断名称" prop="diagName">
<el-input v-model="form.diagName" placeholder="请输入诊断名称" />
</el-form-item>
<el-form-item label="诊断编码" prop="diagCode">
<el-input v-model="form.diagCode" placeholder="请输入编码名称" />
</el-form-item>
<el-form-item label="诊断顺序" prop="diagSort">
<el-input-number v-model="form.diagSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="诊断状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="diagnosis">
import { listdiagnosis, adddiagnosis, deldiagnosis, getdiagnosis, updatediagnosis } from "@/api/regional/dict/diagnosis";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const diagnosisList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 15,
diagCode: undefined,
diagName: undefined,
status: undefined
},
rules: {
diagName: [{ required: true, message: "诊断名称不能为空", trigger: "blur" }],
diagCode: [{ required: true, message: "诊断编码不能为空", trigger: "blur" }],
diagSort: [{ required: true, message: "诊断顺序不能为空", trigger: "blur" }],
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询诊断列表 */
function getList() {
loading.value = true;
listdiagnosis(queryParams.value).then(response => {
diagnosisList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
diagId: undefined,
diagCode: undefined,
diagName: undefined,
diagSort: 0,
status: "0",
remark: undefined
};
proxy.resetForm("diagnosisRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.diagId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加诊断";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const diagId = row.diagId || ids.value;
getdiagnosis(diagId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改诊断";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["diagnosisRef"].validate(valid => {
if (valid) {
if (form.value.diagId != undefined) {
updatediagnosis(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
adddiagnosis(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const diagIds = row.diagId || ids.value;
proxy.$modal.confirm('是否确认删除诊断编号为"' + diagIds + '"的数据项?').then(function() {
return deldiagnosis(diagIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/diagnosis/export", {
...queryParams.value
}, `diag_${new Date().getTime()}.xlsx`);
}
getList();
</script>

View File

@ -0,0 +1,272 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="医疗机构编码" prop="hospitalCode">
<el-input
v-model="queryParams.hospitalCode"
placeholder="请输入医疗机构编码"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="医疗机构名称" prop="hospitalName">
<el-input
v-model="queryParams.hospitalName"
placeholder="请输入医疗机构名称"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="有效状态" clearable style="width: 200px">
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="hospitalId" />
<el-table-column label="医疗机构编码" align="center" prop="hospitalCode" />
<el-table-column label="医疗机构名称" align="center" prop="hospitalName" />
<el-table-column label="接口平台密钥" align="center" prop="hospitalUserinfo" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改医疗机构对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="postRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="医疗机构名称" prop="hospitalName">
<el-input v-model="form.hospitalName" placeholder="请输入医疗机构名称" />
</el-form-item>
<el-form-item label="医疗机构编码" prop="hospitalCode">
<el-input v-model="form.hospitalCode" placeholder="请输入编码名称" />
</el-form-item>
<el-form-item label="医疗机构密钥" prop="hospitalUserinfo">
<el-input v-model="form.hospitalUserinfo" placeholder="请输入编码密钥" />
</el-form-item>
<el-form-item label="医疗机构状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="hospital">
import { listhospital, addhospital, delhospital, gethospital, updatehospital } from "@/api/regional/dict/hospital.js";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const postList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
hospitalCode: undefined,
hospitalName: undefined,
status: undefined
},
rules: {
hospitalName: [{ required: true, message: "医疗机构名称不能为空", trigger: "blur" }],
hospitalCode: [{ required: true, message: "医疗机构编码不能为空", trigger: "blur" }],
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询医疗机构列表 */
function getList() {
loading.value = true;
listhospital(queryParams.value).then(response => {
postList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
hospitalId: undefined,
hospitalCode: undefined,
hospitalName: undefined,
hospitalUserinfo: undefined,
status: "0",
remark: undefined
};
proxy.resetForm("postRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.hospitalId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加医疗机构";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const hospitalId = row.hospitalId || ids.value;
gethospital(hospitalId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改医疗机构";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.hospitalId != undefined) {
updatehospital(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addhospital(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const hospitalIds = row.hospitalId || ids.value;
proxy.$modal.confirm('是否确认删除医疗机构编号为"' + hospitalIds + '"的数据项?').then(function() {
return delhospital(hospitalIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("transitdict/hospital/export", {
...queryParams.value
}, `hospital_${new Date().getTime()}.xlsx`);
}
getList();
</script>

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped lang="scss">
</style>

View File

@ -0,0 +1,321 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="项目类别编码" prop="itemclassCode">
<el-input
v-model="queryParams.itemclassCode"
placeholder="请输入项目类别编码"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="项目类别名称" prop="itemclassName">
<el-input
v-model="queryParams.itemclassName"
placeholder="请输入项目类别名称"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="有效状态" clearable style="width: 200px">
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" :cell-style="tableCellStyle">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="itemclassId" />
<el-table-column label="项目类别编码" align="center" prop="itemclassCode" />
<el-table-column label="项目类别名称" align="center" prop="itemclassName" show-overflow-tooltip/>
<el-table-column label="试管名称" align="center" prop="itemclassTips" show-overflow-tooltip/>
<el-table-column label="试管颜色" align="center" prop="itemclassBkcolor" show-overflow-tooltip/>
<el-table-column label="默认样本类型" align="center" prop="itemclassYblx" show-overflow-tooltip/>
<el-table-column label="打印次数" align="center" prop="itemclassPrintcnt" />
<el-table-column label="抗凝样本" width="80" align="center" prop="itemclassKn">
<template #default="scope">
<el-checkbox
:checked="scope.row.itemclassKn === 1 || scope.row.itemclassKn === '1'"
disabled
/>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="itemclassSort" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改项目类别对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="postRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目类别名称" prop="itemclassName">
<el-input v-model="form.itemclassName" placeholder="请输入类别名称" />
</el-form-item>
<el-form-item label="项目类别编码" prop="itemclassCode">
<el-input v-model="form.itemclassCode" placeholder="请输入类别编码" />
</el-form-item>
<el-form-item label="试管名称" prop="itemclassTips">
<el-input v-model="form.itemclassUserinfo" placeholder="请输入试管名称" />
</el-form-item>
<el-form-item label="试管颜色" prop="itemclassBkcolor">
<el-input-number v-model="form.itemclassBkcolor" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="默认样本类型" prop="itemclassYblx">
<el-input v-model="form.itemclassYblx" placeholder="请输入默认样本类型" />
</el-form-item>
<el-form-item label="打印次数" prop="itemclassPrintcnt">
<el-input-number v-model="form.itemclassPrintcnt" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="抗凝样本" prop="itemclassKn">
<el-checkbox v-model="form.itemclassKn" true-label="1" false-label="0" />
</el-form-item>
<el-form-item label="类别顺序" prop="itemclassSort">
<el-input-number v-model="form.itemclassSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="项目类别状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="itemclass">
import { listitemclass, additemclass, delitemclass, getitemclass, updateitemclass } from "@/api/regional/dict/itemclass.js";
import { classCom } from '@/utils/classCom';
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const postList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 15,
itemclassCode: undefined,
itemclassName: undefined,
status: undefined
},
rules: {
itemclassName: [{ required: true, message: "项目类别名称不能为空", trigger: "blur" }],
itemclassCode: [{ required: true, message: "项目类别编码不能为空", trigger: "blur" }],
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询项目类别列表 */
function getList() {
loading.value = true;
listitemclass(queryParams.value).then(response => {
postList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
itemclassId: undefined,
itemclassCode: undefined,
itemclassName: undefined,
itemclassUserinfo: undefined,
itemclassTips: undefined,
itemclassBkcolor:255,
itemclassYblx:undefined,
itemclassPrintcnt:1,
itemclassKn:0,
status: "0",
remark: undefined
};
proxy.resetForm("postRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.itemclassId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加项目类别";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const itemclassId = row.itemclassId || ids.value;
getitemclass(itemclassId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改项目类别";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.itemclassId != undefined) {
updateitemclass(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
additemclass(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const itemclassIds = row.itemclassId || ids.value;
proxy.$modal.confirm('是否确认删除项目类别编号为"' + itemclassIds + '"的数据项?').then(function() {
return delitemclass(itemclassIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("transitdict/itemclass/export", {
...queryParams.value
}, `itemclass_${new Date().getTime()}.xlsx`);
}
const tableCellStyle = ({ row, column }) => {
// 只对“项目类别”列生效
if (column.label === '试管颜色') {
// 1. 转换颜色(十进制→十六进制)
const bgColor = classCom.decimalToHexColor(row.itemclassBkcolor);
// 2. 自动计算文字颜色(确保和背景色对比度足够)
const textColor = classCom.getContrastTextColor(bgColor);
return {
backgroundColor: bgColor, // 背景色(转换后的值)
color: textColor, // 文字色(自动适配)
textAlign: 'center', // 文字居中
fontWeight: '500' // 文字加粗(提升可读性)
};
}
return {}; // 其他列保持默认样式
};
getList();
</script>

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped lang="scss">
</style>

View File

@ -0,0 +1,283 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item :label="menuname + '编码'" prop="dictCode">
<el-input
v-model="queryParams.dictCode"
:placeholder="`请输入${menuname}编码`"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item :label="`${menuname}名称`" prop="dictName">
<el-input
v-model="queryParams.dictName"
:placeholder="`请输入${menuname}名称`"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 200px">
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="`${menuname}编号`" align="center" prop="dictId" v-if="false"/>
<el-table-column :label="`${menuname}编码`" align="center" prop="dictCode" />
<el-table-column :label="`${menuname}名称`" align="center" prop="dictName" />
<el-table-column label="排序" align="center" prop="dictSort" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" >修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" >删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改字典对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="regdictRef" :model="form" :rules="rules" label-width="150px">
<el-form-item :label="`${menuname}编码`" prop="dictCode">
<el-input v-model="form.dictCode" :placeholder="`请输入${menuname}编码名称`" />
</el-form-item>
<el-form-item :label="`${menuname}名称`" prop="dictName">
<el-input v-model="form.dictName" :placeholder="`请输入${menuname}名称`" />
</el-form-item>
<el-form-item label="顺序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="regdict">
import { listregdict, addregdict, delregdict, getregdict, updateregdict } from "@/api/regional/dict/regdict.js";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const route = useRoute();
const regdictList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const menuname = ref("字典");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 15,
dictCode: undefined,
dictName: undefined,
dictType:undefined,
status: undefined
},
rules: {
dictName: [{ required: true, message: menuname.value+"名称不能为空", trigger: "blur" }],
dictCode: [{ required: true, message: menuname.value+"编码不能为空", trigger: "blur" }],
dictSort: [{ required: true, message: menuname.value+"顺序不能为空", trigger: "blur" }],
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询字典列表 */
function getList() {
loading.value = true;
listregdict(queryParams.value).then(response => {
regdictList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
dictId: undefined,
dictCode: undefined,
dictName: undefined,
dictType:queryParams.value.dictType,
dictSort: 0,
status: "0",
remark: undefined
};
proxy.resetForm("regdictRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.dictId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加"+menuname.value;
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const dictId = row.dictId || ids.value;
getregdict(dictId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改"+menuname.value;
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["regdictRef"].validate(valid => {
if (valid) {
if (form.value.dictId != undefined) {
updateregdict(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addregdict(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const dictIds = row.dictId || ids.value;
proxy.$modal.confirm('是否确认删除"' + menuname + '"编号为"' + dictIds + '"的数据项?').then(function() {
return delregdict(dictIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/regdict/export", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getTypes(route.query && route.query.dictType,route.query && route.query.typeName);
/** 查询字典类型详细 */
function getTypes(dictType,typeName) {
queryParams.value.dictType =dictType;
menuname.value =typeName;
getList();
}
</script>

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped lang="scss">
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,238 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="参数代号" prop="dictCode">
<el-input v-model="queryParams.dictCode" placeholder="请输入" clearable style="width: 200px"
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="参数名称" prop="dictName">
<el-input v-model="queryParams.dictName" placeholder="请输入" clearable style="width: 200px"
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 200px">
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="regdictList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="参数代号" align="center" prop="dictCode" />
<el-table-column label="参数名称" align="center" prop="dictName" />
<el-table-column label="参数值" align="center" prop="remark" />
<el-table-column label="排序" align="center" prop="dictSort" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改字典对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="regdictRef" :model="form" :rules="rules" label-width="150px">
<el-form-item label="参数代号" prop="dictCode">
<el-input v-model="form.dictCode" placeholder="请输入参数代号" />
</el-form-item>
<el-form-item label="参数名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入参数名称" />
</el-form-item>
<el-form-item label="顺序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="参数值" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="regdict">
import { listregdict, addregdict, delregdict, getregdict, updateregdict } from "@/api/regional/dict/regdict.js";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const route = useRoute();
const regdictList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const menuname = ref("字典");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 15,
dictCode: undefined,
dictName: undefined,
dictType: undefined,
status: undefined
},
rules: {
dictName: [{ required: true, message: "参数名称不能为空", trigger: "blur" }],
dictCode: [{ required: true, message: "参数代号不能为空", trigger: "blur" }],
dictSort: [{ required: true, message: "顺序不能为空", trigger: "blur" }],
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询字典列表 */
function getList() {
loading.value = true;
listregdict(queryParams.value).then(response => {
regdictList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
dictId: undefined,
dictCode: undefined,
dictName: undefined,
dictType: queryParams.value.dictType,
dictSort: 0,
status: "0",
remark: undefined
};
proxy.resetForm("regdictRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.dictId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加参数"
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const dictId = row.dictId || ids.value;
getregdict(dictId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改参数"
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["regdictRef"].validate(valid => {
if (valid) {
if (form.value.dictId != undefined) {
updateregdict(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addregdict(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const dictIds = row.dictId || ids.value;
proxy.$modal.confirm('是否确认删除参数编号为' + dictIds + '"的数据项?').then(function () {
return delregdict(dictIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => { });
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/regdict/export", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getTypes(route.query && route.query.dictType, route.query && route.query.typeName);
/** 查询字典类型详细 */
function getTypes(dictType, typeName) {
queryParams.value.dictType = dictType;
menuname.value = typeName;
getList();
}
</script>

View File

@ -0,0 +1,172 @@
<template>
<div class="app-container">
<div class="compact-form">
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="所属医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="标本类型:" prop="SampleTypeName">
<el-select v-model="queryParams.SampleTypeName" placeholder="请选择" clearable>
<el-option v-for="item in regdictList" :label="item.dictName" :value="item.dictCode" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="开单时间:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="mb10">
<!-- <el-button type="primary" @click="thHandle(20)">重新采集</el-button>
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
<el-button type="primary" @click="thHandle(90)">申请作废</el-button> -->
</div>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@size-change="sizeChange" @page-change="currentChange">
</CustomTable>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { sampleTypeCount } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.js";
import { ElMessage } from 'element-plus';
const aotuSize = classCom.useAutoSize();
const queryParams: any = ref({
pageSize: 50,
pageNum: 1,
})
const tableData: any = ref([])
const columns: any = ref([
{ prop: 'srchospname', label: '所属医院', align: 'center', visible: true, },
{ prop: 'sampletypecode', label: '标本代码', align: 'center', visible: true, },
{ prop: 'sampletypename', label: '标本类别', align: 'center', visible: true, },
{ prop: 'sl', label: '数量(份)', align: 'center', visible: true, },
{ prop: 'OrderTime', label: '开单时间', align: 'center', visible: true, },
])
const tableConfig = ref({
border: true, // 边框
height: '75vh', // 高度
highlightCurrentRow: true, // 高亮当前行
summary: true,
summaryField: ['sl'],//计算列总和
sumText: '合计'
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const barcodes = ref([])
const tableRefs = ref(null)
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageSize = page.pageSize
handleQuery()
}
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
}
getList()
}
const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
}
handleQuery()
}
const getList = () => {
sampleTypeCount(queryParams.value).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
})
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'BT' }).then((res: any) => {
regdictList.value = res.rows
})
})
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};
</script>
<style scoped lang="scss">
.compact-form {
.el-form-item {
margin-bottom: 5px;
}
}
.btns {
display: flex;
flex-direction: column;
justify-content: space-around;
&>button {
width: 100%;
margin-left: 0;
margin-bottom: 5px;
}
}
</style>

View File

@ -0,0 +1,181 @@
<template>
<div class="app-container">
<div class="compact-form">
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
<el-row :gutter="10">
<el-col :span="5">
<el-form-item label="就诊医院:" prop="SrcHospName">
<SelectTable v-model:data="queryParams.SrcHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="检测医院:" prop="DstHospName">
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="日期:" prop="times">
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="mb10">
<!-- <el-button type="primary" @click="thHandle(20)">重新采集</el-button>
<el-button type="primary" @click="thHandle(50)">撤销退回</el-button>
<el-button type="primary" @click="thHandle(90)">申请作废</el-button> -->
</div>
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination"
@size-change="sizeChange" @page-change="currentChange">
</CustomTable>
</div>
</template>
<script setup lang="ts">
import CustomTable from '@/components/elTable/index.vue'
import { sampleitemCount, sampleSign } from '@/api/regional/index'
import SelectTable from '@/components/SelectTable/index.vue';
import { classCom } from '@/utils/classCom';
// @ts-ignore
import { listhospital } from "@/api/regional/dict/hospital.js";
// @ts-ignore
import { listregdict } from "@/api/regional/dict/regdict.js";
import { ElMessage } from 'element-plus';
const aotuSize = classCom.useAutoSize();
const queryParams: any = ref({
pageSize: 50,
pageNum: 1,
})
const tableData: any = ref([])
const columns: any = ref([
{ prop: 'SrcHospName', label: '就诊医院', align: 'center', visible: true, },
{ prop: 'SrcOrderItemCode', label: '组合编码', align: 'center', visible: true, },
{ prop: 'SrcOrderItemName', label: '组合名称', align: 'center', visible: true, },
{ prop: 'sl', label: '数量(份)', align: 'center', visible: true, },
{ prop: 'cost', label: '费用', align: 'center', visible: true, },
{ prop: 'DstHospName', label: '检测医院', align: 'center', visible: true, },
])
const tableConfig = ref({
border: true, // 边框
height: '75vh', // 高度
highlightCurrentRow: true, // 高亮当前行
summary: true,
summaryField: ['sl', 'cost'],//计算列总和
sumText: '合计'
})
const pagination = ref({
show: true,
total: 0,
pageSize: 50,
currentPage: 1,
})
const ksdhFields = ref([
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
])
const barcodes = ref([])
const tableRefs = ref(null)
const thHandle = (val: number) => {
if (!barcodes.value.length) return ElMessage.warning('请选择数据!')
sampleSign({ status: val, barcode: barcodes.value }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('操作成功!')
handleQuery()
}
})
}
const handleSelectionChange = (val: any) => {
barcodes.value = val.map((item: any) => item.barcode)
}
const currentChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageNum = page.currentPage
handleQuery()
}
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
queryParams.value.pageSize = page.pageSize
handleQuery()
}
const handleQuery = () => {
if (queryParams.value.times && queryParams.value.times.length > 0) {
queryParams.value.DateStart = queryParams.value.times[0]
queryParams.value.DateEnd = queryParams.value.times[1]
} else {
queryParams.value.DateStart = ''
queryParams.value.DateEnd = ''
}
getList()
}
const resetHandle = () => {
queryParams.value = {
pageSize: 50,
pageNum: 1,
}
handleQuery()
}
const getList = () => {
sampleitemCount(queryParams.value).then((res: any) => {
tableData.value = res.rows
pagination.value.total = res.total
})
}
const hosList = ref([])
const regdictList: any = ref([])
onMounted(() => {
getList()
listhospital().then((res: any) => {
hosList.value = res.rows.map((item: any) => {
return {
label: item.hospitalName,
value: item.hospitalCode
}
})
})
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
regdictList.value = res.rows;
})
})
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};
</script>
<style scoped lang="scss">
.compact-form {
.el-form-item {
margin-bottom: 5px;
}
}
.btns {
display: flex;
flex-direction: column;
justify-content: space-around;
&>button {
width: 100%;
margin-left: 0;
margin-bottom: 5px;
}
}
</style>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,489 @@
@charset "UTF-8";
/* CSS Document */
.bg {
margin: 0 auto;
width: 100%;
min-height: 100vh;
background: url(../images/bg2.jpg) no-repeat;
background-size: cover;
padding-top: 0rem;
padding: 0rem 3.125rem;
}
/*.conIn{
display:flex;
display: -webkit-flex;}*/
.title {
width: 100%;
font-size: 1.875rem;
line-height: 4.6875rem;
color: rgba(14, 253, 255, 1);
text-align: center;
font-weight: bold;
}
.border_bg_leftTop {
position: absolute;
left: -0.125rem;
top: -0.625rem;
width: 5.78125rem;
height: 0.78125rem;
display: block;
background: #01279d url(../images/title_left_bg.png) no-repeat;
background-size: cover;
}
.border_bg_rightTop {
position: absolute;
right: -0.15625rem;
top: -0.15625rem;
width: 1.5625rem;
height: 1.5625rem;
display: block;
background: url(../images/border_bg.jpg) no-repeat;
background-size: cover;
}
.border_bg_leftBottom {
position: absolute;
left: -0.125rem;
bottom: -0.125rem;
width: 1.5625rem;
height: 1.5625rem;
display: block;
background: url(../images/border_bg.jpg) no-repeat;
background-size: cover;
}
.border_bg_rightBottom {
position: absolute;
right: -0.15625rem;
bottom: -0.15625rem;
width: 1.25rem;
height: 1.25rem;
display: block;
background: url(../images/title_right_bg.png) no-repeat;
background-size: cover;
}
.leftMain {
width: 75%;
float: left;
padding-right: 1.5625rem;
padding-top: 1.5625rem;
}
.rightMain {
width: 25%;
float: left;
padding-top: 1.5625rem;
}
.leftMain_top {
width: 100%;
padding-bottom: 1.5625rem;
}
.leftMain_top ul {
display: flex;
display: -webkit-flex;
}
.leftMain_top ul li {
float: left;
width: 25%;
padding-right: 1.5625rem;
}
.leftMain_top ul li:last-child {
padding: 0;
}
.leftMain_top ul li .liIn {
border: 0.125rem solid rgba(14, 253, 255, 0.5);
width: 100%;
min-height: 3.75rem;
position: relative;
padding: .625rem 1.5625rem;
}
.leftMain_top ul li .liIn h3 {
font-size: 1.25rem;
font-weight: 700;
color: #fff;
}
.leftMain_top ul li .liIn .shu {
font-size: 1.875rem;
color: rgba(14, 253, 255, 1);
font-family: dig;
margin-bottom: 0.3125rem;
}
.leftMain_top ul li .liIn .shu i {
font-size: 1rem;
margin-left: 0.9375rem;
font-style: normal;
}
.leftMain_top ul li .liIn .zi {
font-size: 0.625rem;
color: #fff;
position: relative;
z-index: 10;
}
.leftMain_top ul li .liIn .zi .span1 {
margin-right: 1.5625rem;
}
.leftMain_middle {
width: 100%;
padding-bottom: 1.5625rem;
display: flex;
display: -webkit-flex;
}
.leftMain_middle .leftMain_middle_left {
width: 60%;
padding-right: 1.5625rem;
}
.leftMain_middle .leftMain_middle_left .leftMain_middle_leftIn {
border: 0.125rem solid rgba(14, 253, 255, 0.5);
width: 100%;
min-height: 3.75rem;
position: relative;
padding: 1.25rem 0.78125rem;
}
.leftMain_middle .leftMain_middle_left .leftMain_middle_leftIn h3 {
font-size: 1.25rem;
color: #fff;
font-weight: 700;
margin-bottom: 0.78125rem;
}
.leftMain_middle .leftMain_middle_left .leftMain_middle_leftIn .biaoge {
min-height: 12.5rem;
}
.leftMain_middle .leftMain_middle_right {
width: 40%;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn {
border: 0.125rem solid rgba(14, 253, 255, 0.5);
width: 100%;
min-height: 3.75rem;
position: relative;
padding: 1.25rem 0.78125rem;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn h3 {
font-size: 1.25rem;
color: #fff;
font-weight: 700;
margin-bottom: 0.78125rem;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge {
min-height: 12.5rem;
}
/*左边中间部分排行榜*/
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai {
width: 100%;
overflow: hidden;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn {
display: flex;
display: -webkit-flex;
align-items: center;
color: #fff;
font-size: 0.9375rem;
height: 2.8125rem;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_left {
width: 25%;
position: relative;
padding-left: 2.1875rem;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_left .bot {
width: 1.25rem;
height: 1.25rem;
background: #f78cf3;
border-radius: 62.5rem;
display: block;
position: absolute;
left: 0.3125rem;
top: 0;
bottom: 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_line {
width: 58%;
height: 1.25rem;
background: rgba(255, 255, 255, 0.5);
border-radius: 125rem;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .liIn_line .line_lineIn {
width: 100%;
height: 1.25rem;
background: #f78cf3;
border-radius: 6.25rem;
-webkit-animation: widthMove1 2s ease-in-out;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn2 .liIn_line .line_lineIn {
background: #e7feb8;
-webkit-animation: widthMove2 2s ease-in-out;
}
.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 {
0% {
width: 0%;
}
100% {
width: 98.5%;
}
}
@-webkit-keyframes widthMove2 {
0% {
width: 0%;
}
100% {
width: 88.5%;
}
}
@-webkit-keyframes widthMove3 {
0% {
width: 0%;
}
100% {
width: 68.5%;
}
}
@-webkit-keyframes widthMove4 {
0% {
width: 0%;
}
100% {
width: 40.5%;
}
}
@-webkit-keyframes widthMove5 {
0% {
width: 0%;
}
100% {
width: 22.5%;
}
}
@-webkit-keyframes widthMove6 {
0% {
width: 0%;
}
100% {
width: 10.5%;
}
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_pai ul li .liIn .num {
width: 17%;
font-family: dig;
padding-left: 0.3125rem;
}
/*左边底部*/
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_bi ul {
display: flex;
display: -webkit-flex;
flex-wrap: wrap;
width: 100%;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_bi ul li {
width: 33.3%;
text-align: center;
margin-bottom: 0.78125rem;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_bi ul li .shu {
font-size: 2.1875rem;
color: rgba(14, 253, 255, 1);
font-family: dig;
padding: 1.875rem 0 0.3125rem;
font-weight: normal;
}
.leftMain_middle .leftMain_middle_right .leftMain_middle_rightIn .biaoge_bi ul li .zi {
font-size: 0.9375rem;
color: #fff;
}
/*右边部分*/
.rightMain .rightMain_top {
width: 100%;
padding-bottom: 1.5625rem;
}
.rightMain .rightMain_topIn {
border: 0.125rem solid rgba(14, 253, 255, 0.5);
width: 100%;
min-height: 3.75rem;
position: relative;
padding: 1.25rem 0.78125rem;
}
.rightMain .rightMain_topIn h3 {
font-size: 1.25rem;
color: #fff;
margin-bottom: 0.78125rem;
}
.rightMain .rightMain_topIn .biaoge {
min-height: 12.5rem;
}
.rightMain .rightMain_bottom {
width: 100%;
}
.rightMain .rightMain_bottomIn {
border: 0.125rem solid rgba(14, 253, 255, 0.5);
width: 100%;
min-height: 3.75rem;
position: relative;
padding: 1.25rem 0.78125rem;
}
.rightMain .rightMain_bottomIn h3 {
font-size: 1.25rem;
color: #fff;
margin-bottom: 0.78125rem;
}
/*右下角表格*/
.rightMain .rightMain_bottomIn .biaoge {
min-height: 12.5rem;
}
.rightMain .rightMain_bottomIn .biaoge_list {
overflow: hidden;
position: relative;
}
.rightMain .rightMain_bottomIn .biaoge_list .biaoge_listIn .ul_list {
overflow: hidden;
position: relative;
}
.rightMain .rightMain_bottomIn .biaoge_list .biaoge_listIn .ul_listIn {
-webkit-animation: 14s gundong linear infinite normal;
animation: 14s gundong linear infinite normal;
position: relative;
}
@keyframes gundong {
0% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
100% {
-webkit-transform: translate3d(0, -30vh, 0);
transform: translate3d(0, -30vh, 0);
}
}
.rightMain .rightMain_bottomIn .biaoge_list ul {
display: flex;
display: -webkit-flex;
width: 100%;
}
.rightMain .rightMain_bottomIn .biaoge_list .ul_title {
background: linear-gradient(left, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
}
.rightMain .rightMain_bottomIn .biaoge_list .ul_con {
border-bottom: 0.125rem solid rgba(14, 253, 255, 0.5);
}
.rightMain .rightMain_bottomIn .biaoge_list ul li {
width: 20%;
text-align: center;
color: #fff;
font-size: 0.9375rem;
height: 3.125rem;
line-height: 3.125rem;
}
.rightMain .rightMain_bottomIn .biaoge_list ul li:frist-child {
text-align: left;
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,506 @@
<template>
<div class="bg">
<div class="title">智能大屏数据中心</div>
<div class="leftMain">
<div class="leftMain_top">
<div class="leftMain_topIn">
<ul>
<li>
<div class="liIn">
<h3>区域机构</h3>
<p class="shu"><span class="shu1">69</span><i>家</i></p>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</li>
<li>
<div class="liIn">
<h3>检验人数</h3>
<p class="shu"><span class="shu2">609</span><i>人</i></p>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</li>
<li>
<div class="liIn">
<h3>检验管数</h3>
<p class="shu"><span class="shu2">609</span><i>个</i></p>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</li>
<li>
<div class="liIn">
<h3>检验报告数</h3>
<p class="shu"><span class="shu3">289</span><i>份</i></p>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</li>
<li>
<div class="liIn">
<h3>检验项目数</h3>
<p class="shu"><span class="shu4">759</span><i>个</i></p>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</li>
</ul>
</div>
</div>
<div class="leftMain_middle">
<div class="leftMain_middle_left">
<div class="leftMain_middle_leftIn">
<h3>委托机构当月送检标本数量</h3>
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<div class="biaoge" style="width:100%; height:26vh" ref="chartmain" id="chartmain"></div>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</div>
<div class="leftMain_middle_right">
<div class="leftMain_middle_rightIn">
<h3>当日送检样本情况</h3>
<div class="biaoge biaoge_pai" ref="biaoge_pai" style="width:100%; height:26vh">
</div>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</div>
</div>
<div class="leftMain_middle">
<div class="leftMain_middle_left">
<div class="leftMain_middle_leftIn">
<h3>近一个月送检标本数量趋势图</h3>
<div class="biaoge" style="width:100%; height:28vh" ref="chartmain_zhe" id="chartmain_zhe"></div>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</div>
<div class="leftMain_middle_right">
<div class="leftMain_middle_rightIn">
<h3>送检项目分类占比</h3>
<div class="biaoge biaoge_bi" ref="sxEhart" style="width:100%; height:28vh">
</div>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</div>
</div>
</div>
<div class="rightMain">
<div class="rightMain_top">
<div class="rightMain_topIn">
<h3>这里是标题</h3>
<div class="biaoge" style="width:100%; height:30vh" id="chartmain_bing"></div>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</div>
<div class="rightMain_bottom">
<div class="rightMain_bottomIn">
<h3>这里是标题</h3>
<div class="biaoge biaoge_list" style="width:100%; height:36vh">
</div>
<span class="border_bg_leftTop"></span>
<span class="border_bg_rightTop"></span>
<span class="border_bg_leftBottom"></span>
<span class="border_bg_rightBottom"></span>
</div>
</div>
</div>
<div style="clear:both;"></div>
</div>
</template>
<script setup lang="ts">
import * as echarts from 'echarts';
//@ts-ignore
const chartmain = ref()
const getEcharts1 = () => {
const Intance = echarts.init(chartmain.value);
var dataAxis = ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日'];
var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
const option = {
title: {
text: '',
subtext: ''
},
grid: {
x: 40,
y: 40,
x2: 20,
y2: 20,
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data: dataAxis,
axisLabel: {
/*inside: true,*/
interval: 0,
textStyle: {
color: '#fff',
fontSize: 12
},
},
axisTick: {
show: false,
},
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolOffset: 12,
lineStyle: {
color: '#fff',
}
},
z: 10
},
yAxis: {
type: 'value',
name: '单位:个',
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolOffset: 12,
lineStyle: {
color: '#fff',
}
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: '#fff',
fontSize: 12
}
}
},
dataZoom: [
{
type: 'inside'
}
],
series: [
{
type: 'bar',
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: '#0efdff' },
{ offset: 0.5, color: '#188df0' },
{ offset: 1, color: '#188df0' }
]
)
},
emphasis: {
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: '#2378f7' },
{ offset: 0.7, color: '#2378f7' },
{ offset: 1, color: '#0efdff' }
]
)
}
},
data: data
}
]
};
Intance.setOption(option);
}
const biaoge_pai = ref()
const getEcharts2 = () => {
const Intance = echarts.init(biaoge_pai.value);
const option = {
title: {
text: '数据情况统计',
subtext: '',
left: 'right',
textStyle: {
color: '#fff',
fontSize: 12
}
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
// orient: 'vertical',
// top: 'middle',
type: 'scroll',
orient: 'vertical',
right: 10,
top: 40,
bottom: 20,
left: 'right',
data: ['已审核', '已采样', '已送检', '已接收', '已报告'],
textStyle: {
color: '#fff',
fontSize: 12
}
},
grid: {
x: '-10%',
y: 40,
x2: 20,
y2: 20,
},
color: ['#09d0fb', '#f88cfb', '#95f8fe', '#f9f390', '#ecfeb7'],
series: [
{
type: 'pie',
radius: '65%',
center: ['50%', '50%'],
selectedMode: 'single',
data: [
{
value: 1548, name: '已报告',
},
{ value: 535, name: '已接收' },
{ value: 510, name: '已送检' },
{ value: 634, name: '已采样' },
{ value: 735, name: '已审核' }
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
Intance.setOption(option);
}
const chartmain_zhe = ref()
const getEcharts3 = () => {
const Intance = echarts.init(chartmain_zhe.value);
const option = {
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
textStyle: {
color: '#fff',
fontSize: 12,
},
right: '10%',
data: ['折线一', '折线二']
},
grid: {
x: 40,
y: 40,
x2: 20,
y2: 20,
},
toolbox: {
feature: {
//saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
/*inside: true,*/
interval: 0,
textStyle: {
color: '#fff',
fontSize: 12
}
},
axisTick: {
show: false,
},
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolOffset: 12,
lineStyle: {
color: '#fff',
}
},
data: ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日']
},
yAxis: {
type: 'value',
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolOffset: 12,
lineStyle: {
color: '#fff',
}
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: '#fff',
fontSize: 12
}
}
},
series: [
{
name: '折线一',
type: 'line',
stack: '总量',
data: [280, 102, 191, 134, 390, 230, 210],
itemStyle: {
normal: {
color: "#0efdff",//折线点的颜色
lineStyle: {
color: "#0efdff",//折线的颜色
width: 2,
}
},
}
},
{
name: '折线二',
type: 'line',
stack: '总量',
data: [100, 132, 131, 234, 290, 330, 110]
},
]
};
Intance.setOption(option);
}
const sxEhart = ref()
const getEcharts4 = () => {
const Intance = echarts.init(sxEhart.value);
const option = {
title: {
text: '数据情况统计',
subtext: '',
left: 'right',
textStyle: {
color: '#fff',
fontSize: 12
}
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
// orient: 'vertical',
// top: 'middle',
type: 'scroll',
orient: 'vertical',
right: 10,
top: 40,
bottom: 20,
left: 'right',
data: ['全血', '血液', '血浆', '尿液', '其他',],
textStyle: {
color: '#fff',
fontSize: 12
}
},
grid: {
x: '-10%',
y: 40,
x2: 20,
y2: 20,
},
color: ['#09d0fb', '#f88cfb', '#95f8fe', '#f9f390', '#ecfeb7'],
series: [
{
type: 'pie',
radius: '65%',
center: ['50%', '50%'],
selectedMode: 'single',
data: [
{ value: 156, name: '尿液' },
{ value: 256, name: '血浆' },
{ value: 335, name: '血液' },
{ value: 235, name: '全血' },
{ value: 877, name: '其他' }
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
Intance.setOption(option);
}
onMounted(() => {
getEcharts1()
getEcharts2()
getEcharts3()
getEcharts4()
})
</script>
<style scoped>
@import './css/icon.css';
@import './css/index.css';
@import './css/public.css';
</style>

View File

@ -40,9 +40,8 @@ export default defineConfig(({
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
// target: 'http://localhost:9801',
target: 'http://47.97.125.165:8904',
// target: 'http://192.168.1.114:9801',
// target: 'http://192.168.1.151:9801',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
},