Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3
This commit is contained in:
commit
8d98e4c8c3
@ -29,6 +29,7 @@
|
||||
"js-cookie": "3.0.5",
|
||||
"jsbarcode": "^3.12.1",
|
||||
"jsencrypt": "3.3.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mitt": "^3.0.1",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.1.7",
|
||||
@ -50,6 +51,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.27.0",
|
||||
"@types/lodash": "^4.17.21",
|
||||
"@types/vue": "^2.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||
"@typescript-eslint/parser": "^8.46.2",
|
||||
|
||||
24
pnpm-lock.yaml
generated
24
pnpm-lock.yaml
generated
@ -56,6 +56,9 @@ importers:
|
||||
jsencrypt:
|
||||
specifier: 3.3.2
|
||||
version: 3.3.2
|
||||
lodash:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
mitt:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
@ -77,6 +80,9 @@ importers:
|
||||
sortablejs:
|
||||
specifier: ^1.14.0
|
||||
version: 1.14.0
|
||||
three:
|
||||
specifier: ^0.181.2
|
||||
version: 0.181.2
|
||||
vue:
|
||||
specifier: 3.5.23
|
||||
version: 3.5.23(typescript@5.9.3)
|
||||
@ -111,6 +117,9 @@ importers:
|
||||
'@eslint/js':
|
||||
specifier: ^9.27.0
|
||||
version: 9.27.0
|
||||
'@types/lodash':
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
'@types/vue':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(typescript@5.9.3)
|
||||
@ -599,8 +608,8 @@ packages:
|
||||
'@types/lodash-es@4.17.12':
|
||||
resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}
|
||||
|
||||
'@types/lodash@4.17.20':
|
||||
resolution: {integrity: sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==}
|
||||
'@types/lodash@4.17.21':
|
||||
resolution: {integrity: sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ==}
|
||||
|
||||
'@types/minimatch@3.0.5':
|
||||
resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==}
|
||||
@ -2503,6 +2512,9 @@ packages:
|
||||
text-segmentation@1.0.3:
|
||||
resolution: {integrity: sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==}
|
||||
|
||||
three@0.181.2:
|
||||
resolution: {integrity: sha512-k/CjiZ80bYss6Qs7/ex1TBlPD11whT9oKfT8oTGiHa34W4JRd1NiH/Tr1DbHWQ2/vMUypxksLnF2CfmlmM5XFQ==}
|
||||
|
||||
tiny-emitter@2.1.0:
|
||||
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
|
||||
|
||||
@ -3113,9 +3125,9 @@ snapshots:
|
||||
|
||||
'@types/lodash-es@4.17.12':
|
||||
dependencies:
|
||||
'@types/lodash': 4.17.20
|
||||
'@types/lodash': 4.17.21
|
||||
|
||||
'@types/lodash@4.17.20': {}
|
||||
'@types/lodash@4.17.21': {}
|
||||
|
||||
'@types/minimatch@3.0.5': {}
|
||||
|
||||
@ -3817,7 +3829,7 @@ snapshots:
|
||||
'@element-plus/icons-vue': 2.3.2(vue@3.5.23(typescript@5.9.3))
|
||||
'@floating-ui/dom': 1.6.13
|
||||
'@popperjs/core': '@sxzz/popperjs-es@2.11.7'
|
||||
'@types/lodash': 4.17.20
|
||||
'@types/lodash': 4.17.21
|
||||
'@types/lodash-es': 4.17.12
|
||||
'@vueuse/core': 9.13.0(vue@3.5.23(typescript@5.9.3))
|
||||
async-validator: 4.2.5
|
||||
@ -5355,6 +5367,8 @@ snapshots:
|
||||
dependencies:
|
||||
utrie: 1.0.2
|
||||
|
||||
three@0.181.2: {}
|
||||
|
||||
tiny-emitter@2.1.0: {}
|
||||
|
||||
to-object-path@0.3.0:
|
||||
|
||||
19
src/App.vue
19
src/App.vue
@ -10,24 +10,19 @@ import { useFingerprint } from '@/utils/useFingerprint';
|
||||
import { useCommonStore } from '@/store/modules/commonStore'
|
||||
const mbStore = useCommonStore();
|
||||
// 使用自定义hook获取指纹信息
|
||||
const {
|
||||
fingerprint,
|
||||
loading,
|
||||
error,
|
||||
getFingerprint
|
||||
} = useFingerprint();
|
||||
const { fingerprint, getFingerprint } = useFingerprint();
|
||||
|
||||
if (!mbStore.fingerprint) {
|
||||
// 重新获取指纹
|
||||
getFingerprint();
|
||||
mbStore.setFingerprint(fingerprint)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
handleThemeStyle(useSettingsStore().theme)
|
||||
})
|
||||
|
||||
if (!mbStore.fingerprint) {
|
||||
// 重新获取指纹
|
||||
getFingerprint();
|
||||
mbStore.setFingerprint(fingerprint)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -104,3 +104,13 @@ export function deleteXmInfoVs(query:any){
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//删除检验项目
|
||||
export function deleteXmInfoService(query:any){
|
||||
return request({
|
||||
url: '/xminfo/del',
|
||||
method: 'delete',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -19,6 +19,14 @@ export function wswsamplelistpage(query?: Object) {
|
||||
})
|
||||
}
|
||||
// 获取微生物样本信息
|
||||
export function wswsampleinfo(query?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/germsampleinfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获取微生物结果信息
|
||||
export function sampleMedInfo(query?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/getresultlist',
|
||||
|
||||
@ -124,6 +124,7 @@ aside {
|
||||
//main-container全局样式
|
||||
.app-container {
|
||||
padding: 10px 10px 0 10px;
|
||||
min-height: calc(100vh - 84px);
|
||||
}
|
||||
|
||||
.components-container {
|
||||
@ -303,4 +304,8 @@ aside {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.next_btn {
|
||||
margin-right: 0.2rem;
|
||||
}
|
||||
}
|
||||
@ -5,67 +5,67 @@
|
||||
|
||||
/** 基础通用 **/
|
||||
.pt5 {
|
||||
padding-top: 5px;
|
||||
padding-top: .3125rem;
|
||||
}
|
||||
|
||||
.pr5 {
|
||||
padding-right: 5px;
|
||||
padding-right: .3125rem;
|
||||
}
|
||||
|
||||
.pb5 {
|
||||
padding-bottom: 5px;
|
||||
padding-bottom: .3125rem;
|
||||
}
|
||||
|
||||
.mt5 {
|
||||
margin-top: 5px;
|
||||
margin-top: .3125rem;
|
||||
}
|
||||
|
||||
.mr5 {
|
||||
margin-right: 5px;
|
||||
margin-right: .3125rem;
|
||||
}
|
||||
|
||||
.mb5 {
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: .3125rem;
|
||||
}
|
||||
|
||||
.mb8 {
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.ml5 {
|
||||
margin-left: 5px;
|
||||
margin-left: .3125rem;
|
||||
}
|
||||
|
||||
.mt10 {
|
||||
margin-top: 10px;
|
||||
margin-top: .625rem;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10px;
|
||||
margin-right: .625rem;
|
||||
}
|
||||
|
||||
.mb10 {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: .625rem;
|
||||
}
|
||||
|
||||
.ml10 {
|
||||
margin-left: 10px;
|
||||
margin-left: .625rem;
|
||||
}
|
||||
|
||||
.mt20 {
|
||||
margin-top: 20px;
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.mr20 {
|
||||
margin-right: 20px;
|
||||
margin-right: 1.25rem;
|
||||
}
|
||||
|
||||
.mb20 {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.ml20 {
|
||||
margin-left: 20px;
|
||||
margin-left: 1.25rem;
|
||||
}
|
||||
|
||||
.cp {
|
||||
@ -213,8 +213,8 @@
|
||||
|
||||
.el-table__body-wrapper .el-table-column--selection>.cell {
|
||||
padding: 0 !important;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 1.875rem;
|
||||
line-height: 1.875rem;
|
||||
}
|
||||
|
||||
.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
|
||||
@ -224,8 +224,8 @@
|
||||
|
||||
.cell.el-tooltip {
|
||||
padding: 0 !important;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 1.875rem;
|
||||
line-height: 1.875rem;
|
||||
}
|
||||
|
||||
.el-table-header-cell .cell {
|
||||
@ -241,8 +241,8 @@
|
||||
|
||||
.el-table__cell {
|
||||
padding: 0 !important;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 1.875rem;
|
||||
line-height: 1.875rem;
|
||||
}
|
||||
|
||||
.el-checkbox {
|
||||
|
||||
@ -13,10 +13,10 @@
|
||||
|
||||
<template>
|
||||
<div class="common-table-container">
|
||||
<vxe-table :data="tableData" :loading="loading" border height="auto" :checkbox-config="config.checkboxConfig"
|
||||
@checkbox-change="handleCheckboxChange" :row-config="rowConfig" :show-overflow="showOverflow"
|
||||
@current-change="handleRowClick" ref="tableRef" :size="size" :current-row="currentRow"
|
||||
:highlight-current-row="highlightCurrentRow" :scroll-y="scrollYConfig"
|
||||
<vxe-table :data="tableData" :loading="loading" border :checkbox-config="config.checkboxConfig"
|
||||
:height="scrollYConfig.height" @checkbox-change="handleCheckboxChange" :row-config="rowConfig"
|
||||
:show-overflow="showOverflow" @current-change="handleRowClick" ref="tableRef" :size="size"
|
||||
:current-row="currentRow" :highlight-current-row="highlightCurrentRow" :scroll-y="scrollYConfig"
|
||||
:header-cell-class-name="enableColumnDrag ? 'el-table-header-cell' : ''" v-bind="$attrs">
|
||||
<!-- 动态渲染列 -->
|
||||
<template v-for="(column, i) in columns" :key="`${column.field}-${i}`">
|
||||
@ -88,7 +88,11 @@ const props = defineProps({
|
||||
// 纵向滚动配置
|
||||
scrollYConfig: {
|
||||
type: Object,
|
||||
default: () => ({ enabled: true, rSize: 30, adaptive: true })
|
||||
default: () => ({
|
||||
enabled: true, // 强制启用虚拟滚动
|
||||
rSize: 30, // 行高(需与实际行高一致)
|
||||
height: 600, // 固定表格高度(关键,单位px)
|
||||
})
|
||||
},
|
||||
// 表格尺寸
|
||||
size: {
|
||||
|
||||
@ -28,6 +28,10 @@ export const getDictData = async (...args: string[]) => {
|
||||
if(dictRefs.LF != undefined) dictData.value.LF = toRaw(dictRefs.LF.value) || []
|
||||
if(dictRefs.BT != undefined) dictData.value.BT = toRaw(dictRefs.BT.value) || []
|
||||
if(dictRefs.SLZQ != undefined) dictData.value.SLZQ = toRaw(dictRefs.SLZQ.value) || []
|
||||
if(dictRefs.UT != undefined) dictData.value.UT = toRaw(dictRefs.UT.value) || [] //单位
|
||||
if(dictRefs.MD != undefined) dictData.value.MD = toRaw(dictRefs.MD.value) || [] //测试方法
|
||||
if(dictRefs.ITEMCLASS != undefined) dictData.value.ITEMCLASS = toRaw(dictRefs.ITEMCLASS.value) || [] //细菌项目类别
|
||||
if(dictRefs.GBDM != undefined) dictData.value.GBDM = toRaw(dictRefs.GBDM.value) || [] //国标代码
|
||||
}
|
||||
|
||||
//字典数据格式化方法
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<keep-alive :include="tagsViewStore.cachedViews">
|
||||
<component v-if="!route.meta.link" :is="Component" :key="route.path"/>
|
||||
<component v-if="!route.meta.link" :is="Component" :key="route.path" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
@ -21,24 +21,24 @@ const tagsViewStore = useTagsViewStore()
|
||||
<style lang="scss" scoped>
|
||||
.app-main {
|
||||
/* 50= navbar 50 */
|
||||
min-height: calc(100vh - 50px);
|
||||
min-height: calc(100vh - 3.125rem);
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fixed-header + .app-main {
|
||||
padding-top: 50px;
|
||||
.fixed-header+.app-main {
|
||||
padding-top: 3.125rem;
|
||||
}
|
||||
|
||||
.hasTagsView {
|
||||
.app-main {
|
||||
/* 84 = navbar + tags-view = 50 + 34 */
|
||||
min-height: calc(100vh - 84px);
|
||||
min-height: calc(100vh - 5.25rem);
|
||||
}
|
||||
|
||||
.fixed-header + .app-main {
|
||||
padding-top: 84px;
|
||||
.fixed-header+.app-main {
|
||||
padding-top: 5.25rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -65,4 +65,3 @@ const tagsViewStore = useTagsViewStore()
|
||||
border-radius: 3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<!-- 侧边栏折叠按钮(保留原有功能) -->
|
||||
<hamburger
|
||||
id="hamburger-container"
|
||||
:is-active="appStore.sidebar.opened"
|
||||
class="hamburger-container"
|
||||
@toggleClick="toggleSideBar"
|
||||
/>
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar" />
|
||||
|
||||
<!-- 核心改造:替换面包屑/顶部导航,改为产品名称 + 登录信息布局 -->
|
||||
<div class="custom-header-content">
|
||||
@ -25,7 +21,7 @@
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
-->
|
||||
-->
|
||||
<!-- 登录人信息(姓名 + 角色) -->
|
||||
<div class="user-info" v-if="userStore.nickName">
|
||||
欢迎,{{ userStore.nickName }}({{ userStore.roleName }})
|
||||
@ -60,7 +56,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ElMessageBox} from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
// 引入原有组件
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
@ -75,7 +71,7 @@ import useAppStore from '@/store/modules/app'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
// 引入图标和默认头像(可替换为你的默认头像)
|
||||
import {CaretBottom} from '@element-plus/icons-vue'
|
||||
import { CaretBottom } from '@element-plus/icons-vue'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const userStore = useUserStore()
|
||||
@ -137,20 +133,24 @@ function setLayout() {
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.navbar {
|
||||
height: 50px; /* 固定高度,与原有一致 */
|
||||
height: 3.125rem;
|
||||
/* 固定高度,与原有一致 */
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
//background: #fff;
|
||||
background: #0d9488;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.15);
|
||||
//box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
display: flex; /* 改为flex布局,确保子元素对齐 */
|
||||
align-items: center; /* 垂直居中 */
|
||||
display: flex;
|
||||
/* 改为flex布局,确保子元素对齐 */
|
||||
align-items: center;
|
||||
/* 垂直居中 */
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 50px; /* 与导航栏高度一致 */
|
||||
line-height: 3.125rem;
|
||||
/* 与导航栏高度一致 */
|
||||
height: 100%;
|
||||
padding: 0 16px;
|
||||
padding: 0 1rem;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
@ -165,19 +165,23 @@ function setLayout() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex: 1; /* 占满剩余宽度 */
|
||||
padding: 0 20px;
|
||||
flex: 1;
|
||||
/* 占满剩余宽度 */
|
||||
padding: 0 1.25rem;
|
||||
height: 100%;
|
||||
margin-left: 5px;
|
||||
margin-left: .3125rem;
|
||||
}
|
||||
|
||||
/* 产品名称样式 */
|
||||
.app-name {
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: #fff; /* 若依主题色,可替换为品牌色 */
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
font-style: italic; /* 关键:字体倾斜 */
|
||||
color: #fff;
|
||||
/* 若依主题色,可替换为品牌色 */
|
||||
white-space: nowrap;
|
||||
/* 防止换行 */
|
||||
font-style: italic;
|
||||
/* 关键:字体倾斜 */
|
||||
/* 可选优化:增加倾斜角度控制(默认 italic 约 14 度,可自定义) */
|
||||
/* transform: skewX(-10deg); /* 向左倾斜 10 度,正负值控制倾斜方向 */
|
||||
}
|
||||
@ -186,13 +190,15 @@ function setLayout() {
|
||||
.right-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px; /* 元素间距,可调整 */
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
gap: .75rem;
|
||||
/* 元素间距,可调整 */
|
||||
white-space: nowrap;
|
||||
/* 防止换行 */
|
||||
}
|
||||
|
||||
/* 用户信息样式 */
|
||||
.user-info {
|
||||
font-size: 14px;
|
||||
font-size: .875rem;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -204,9 +210,9 @@ function setLayout() {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 8px;
|
||||
padding: 0 .5rem;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
font-size: 1.125rem;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
@ -226,19 +232,23 @@ function setLayout() {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px; /* 头像与下拉图标间距 */
|
||||
gap: .25rem;
|
||||
/* 头像与下拉图标间距 */
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 36px; /* 调整头像大小 */
|
||||
height: 36px;
|
||||
border-radius: 50%; /* 圆形头像,可改为10px保持原有风格 */
|
||||
object-fit: cover; /* 防止头像变形 */
|
||||
width: 2.25rem;
|
||||
/* 调整头像大小 */
|
||||
height: 2.25rem;
|
||||
border-radius: 50%;
|
||||
/* 圆形头像,可改为10px保持原有风格 */
|
||||
object-fit: cover;
|
||||
/* 防止头像变形 */
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
font-size: .75rem;
|
||||
color: #5a5e66;
|
||||
}
|
||||
}
|
||||
|
||||
4
src/types/Object.d.ts
vendored
4
src/types/Object.d.ts
vendored
@ -19,6 +19,10 @@ export interface DictData {
|
||||
LF?: Array<any>;
|
||||
BT?: Array<any>;
|
||||
SLZQ?: Array<any>;
|
||||
UT?: Array<any>;
|
||||
MD?: Array<any>;
|
||||
ITEMCLASS?: Array<any>;
|
||||
GBDM?: Array<any>;
|
||||
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||
}
|
||||
|
||||
|
||||
@ -120,6 +120,9 @@ service.interceptors.response.use(res => {
|
||||
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
|
||||
return res.data
|
||||
}
|
||||
if (code == -1) {
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
if (code === 401) {
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
|
||||
@ -39,11 +39,6 @@ export function useFingerprint() {
|
||||
}
|
||||
};
|
||||
|
||||
// 组件挂载时自动获取指纹
|
||||
onMounted(() => {
|
||||
// getFingerprint();
|
||||
});
|
||||
|
||||
return {
|
||||
fingerprint,
|
||||
loading,
|
||||
|
||||
@ -134,6 +134,9 @@ const formatHeader = (column: any, prefix: string) => {
|
||||
|
||||
const getList = () => {
|
||||
historyInfo(queryParams.value).then((res: any) => {
|
||||
tableData.value = []
|
||||
getEcharts(null)
|
||||
if (!res.data) return
|
||||
const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
|
||||
const dataMaps = new Map();
|
||||
|
||||
@ -194,9 +197,12 @@ const getList = () => {
|
||||
return row;
|
||||
});
|
||||
nextTick(() => {
|
||||
tableRef.value.setCurrentRow(tableData.value[0]);
|
||||
getEcharts(tableData.value[0])
|
||||
if (tableData.value.length) {
|
||||
tableRef.value.setCurrentRow(tableData.value[0]);
|
||||
getEcharts(tableData.value[0])
|
||||
}
|
||||
})
|
||||
|
||||
// console.log('合并后的表格数据==>', tableData.value);
|
||||
});
|
||||
};
|
||||
@ -217,9 +223,27 @@ const handleRowClick = (row: any) => {
|
||||
const myEcharts = ref()
|
||||
const getEcharts = (data: any) => {
|
||||
const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first']
|
||||
if (!data) return
|
||||
|
||||
if (!data) {
|
||||
// 数据为空时清空图表
|
||||
if (myEcharts.value) {
|
||||
const existingInstance = echarts.getInstanceByDom(myEcharts.value);
|
||||
if (existingInstance) {
|
||||
existingInstance.clear();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
const xData = periods.map(period => { return data[`${period}Date`] })?.filter(Boolean) //过滤掉空值
|
||||
const yData = periods.map(period => { return data[`${period}Csjg`] })?.filter(Boolean)
|
||||
// 先获取已有实例并销毁
|
||||
if (myEcharts.value) {
|
||||
const existingInstance = echarts.getInstanceByDom(myEcharts.value);
|
||||
if (existingInstance) {
|
||||
echarts.dispose(existingInstance);
|
||||
}
|
||||
}
|
||||
|
||||
const Intance = echarts.init(myEcharts.value);
|
||||
|
||||
|
||||
|
||||
@ -153,7 +153,10 @@ const formatHeader = (column: any, prefix: string) => {
|
||||
};
|
||||
// 获取其他结果信息
|
||||
const getOthersInfo = () => {
|
||||
tableData.value = []
|
||||
tableDataDetail.value = []
|
||||
otherinstr(queryParams.value).then((res: any) => {
|
||||
if (!res.data) return
|
||||
tableData.value = res.data.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
@ -185,6 +188,7 @@ const handleRowClick = (row: any) => {
|
||||
ybh: row.ybh
|
||||
}
|
||||
otherInstrDetail(data).then((res: any) => {
|
||||
if (!res.data) return
|
||||
const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
|
||||
const dataMaps = new Map();
|
||||
|
||||
|
||||
210
src/views/liswork/components/wswHistory/index.vue
Normal file
210
src/views/liswork/components/wswHistory/index.vue
Normal file
@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<div>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" @row-click="rowHandle">
|
||||
<template #yblx="{ row }">
|
||||
{{ formatDict(row.yblx, 'BT') }}
|
||||
</template>
|
||||
<template #jgbz="{ row }">
|
||||
{{ formatJgbz(row.jgbz) }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<div class="mt5"></div>
|
||||
<CustomTable ref="ymTableRef" :data="ymTableData" :columns="ymColumns" :config="ymTableConfig"
|
||||
:enable-column-drag="true" @column-drag-end="ymHandleColumnDragEnd">
|
||||
<template #jgbz="{ row }">
|
||||
<el-radio-group v-model="row.jgbz" disabled>
|
||||
<el-radio value="R">R</el-radio>
|
||||
<el-radio value="I">I</el-radio>
|
||||
<el-radio value="S">S</el-radio>
|
||||
<el-radio value="N">N</el-radio>
|
||||
<el-radio value="D">SDD</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getresultmedList } from "@/api/liswork/micro";
|
||||
import { historyInfo } from "@/api/liswork/work/LisWork";
|
||||
import CustomTable from "@/components/elTable/index.vue"
|
||||
import { LabResultItem, ymTableDataItem } from '@/types/index';
|
||||
|
||||
const props = defineProps({
|
||||
queryParams: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
tablekey: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
dictData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
})
|
||||
|
||||
const { queryParams, tablekey, } = toRefs(props)
|
||||
|
||||
const tableData = ref([])
|
||||
|
||||
const columns = ref([
|
||||
{ label: "标本", prop: "yblx", align: 'center', visible: true, slot: "yblx" },
|
||||
{ label: "细菌", prop: "xmmc", align: 'center', visible: true, },
|
||||
{ label: "样本号", prop: "ybh", align: 'center', visible: true, },
|
||||
{ label: "菌落计数", prop: "od", align: 'center', visible: true, },
|
||||
{ label: "检验结果", prop: "csjg", align: 'center', visible: true, slot: "csjg" },
|
||||
{ label: "阴阳性", prop: "jgbz", align: 'center', visible: true, slot: "jgbz" },
|
||||
{ label: "检验日期", prop: "jyrq", align: 'center', visible: true, },
|
||||
{ label: "仪器", prop: "yq", align: 'center', visible: true, },
|
||||
{ label: "病人代号", prop: "brdh", align: 'center', visible: true, },
|
||||
{ label: "性别", prop: "brxb", align: 'center', visible: true, },
|
||||
{ label: "年龄", prop: "nl", align: 'center', visible: true, },
|
||||
])
|
||||
|
||||
const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||
row: any;
|
||||
column: any;
|
||||
rowIndex: number;
|
||||
columnIndex: number;
|
||||
}) => {
|
||||
if (column.label == "检验结果" && row.jgbz == "H") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "检验结果" && row.jgbz == "L") {
|
||||
return { background: '#8080ff !important', color: '#fff' };
|
||||
}
|
||||
if (column.label == "检验结果" && row.jgbz == "P") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "检验结果" && row.jgbz == "Q") {
|
||||
return { background: '#ffff80 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "阴阳性" && row.jgbz == "H") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "阴阳性" && row.jgbz == "L") {
|
||||
return { background: '#8080ff !important', color: '#fff' };
|
||||
}
|
||||
if (column.label == "阴阳性" && row.jgbz == "P") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "阴阳性" && row.jgbz == "Q") {
|
||||
return { background: '#ffff80 !important', color: '#606266' };
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const tableConfig = ref({
|
||||
height: '24vh',
|
||||
border: true,
|
||||
highlightCurrentRow: true,
|
||||
cellStyle: CellStyleHd
|
||||
});
|
||||
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
|
||||
const getList = () => {
|
||||
tableData.value = []
|
||||
const data = {
|
||||
ybh: tablekey.value.ybh,
|
||||
yq: tablekey.value.yq,
|
||||
jyrq: tablekey.value.jyrq,
|
||||
}
|
||||
historyInfo(data).then((res: any) => {
|
||||
if (!res.data) return
|
||||
tableData.value = res.data
|
||||
if (res.data.length) {
|
||||
rowHandle(res.data[0])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.tablekey, (newValue) => {
|
||||
getList()
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
|
||||
const rowHandle = (row: any) => {
|
||||
const data = {
|
||||
ybh: tablekey.value.ybh,
|
||||
yq: tablekey.value.yq,
|
||||
jyrq: tablekey.value.jyrq,
|
||||
xmdh: row.xmdh
|
||||
}
|
||||
getresultmedList(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ymTableData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const ymTableData = ref<ymTableDataItem[]>([]);
|
||||
|
||||
const ymColumns = ref([
|
||||
{ label: "抗生素", prop: "ywmc", visible: true, align: 'center', },
|
||||
{ label: "Mic", prop: "mic", align: 'center', visible: true, },
|
||||
{ label: "KB", prop: "rad", align: 'center', visible: true, },
|
||||
{ label: "结果", prop: "csjg", align: 'center', visible: true, },
|
||||
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', showOverflowTooltip: false, width: 180 },
|
||||
])
|
||||
const ymCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||
row: any;
|
||||
column: any;
|
||||
rowIndex: number;
|
||||
columnIndex: number;
|
||||
}) => {
|
||||
if (column.label == "结果" && row.jgbz == "R") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "结果" && row.jgbz == "I") {
|
||||
return { background: '#ffff80 !important', color: '#606266' };
|
||||
}
|
||||
}
|
||||
const ymTableConfig = ref({
|
||||
height: '57vh',
|
||||
border: true,
|
||||
highlightCurrentRow: true,
|
||||
cellStyle: ymCellStyleHd,
|
||||
});
|
||||
|
||||
const ymHandleColumnDragEnd = (data: any) => {
|
||||
ymColumns.value = data.columns;
|
||||
}
|
||||
|
||||
|
||||
const formatDict = (v: string, dictType: string) => {
|
||||
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||
}
|
||||
|
||||
const formatJgbz = (v: string) => {
|
||||
const jgbzMap = {
|
||||
'H': '高',
|
||||
'L': '低',
|
||||
'N': '阴性',
|
||||
'P': '阳性',
|
||||
'Q': '弱阳性',
|
||||
'M': '正常'
|
||||
};
|
||||
return jgbzMap[v as keyof typeof jgbzMap] ?? '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-radio {
|
||||
margin-right: .3125rem;
|
||||
|
||||
:deep(.el-radio__label) {
|
||||
padding-left: 2px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
130
src/views/liswork/labItem/BatchInstrVs.vue
Normal file
130
src/views/liswork/labItem/BatchInstrVs.vue
Normal file
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<!-- 批量仪器对应 -->
|
||||
<el-dialog title="批量项目对应" width="1000px" v-model="batchInstrVsModel.visible" @close="onClose">
|
||||
<el-form :model="formData" inline>
|
||||
<el-form-item label="项目类别" prop="xmgl">
|
||||
<!-- <el-input placeholder="项目类别" v-model="formData.xmgl"></el-input> -->
|
||||
<SelectTable v-model:data="formData.xmgl" :fields="xmglFields" :tableData="dictData.XMGL" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="项目类别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="快速查找" prop="inputcode">
|
||||
<el-input placeholder="快速查找" v-model="formData.inputcode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="细菌标志" prop="itemclass">
|
||||
<SelectTable v-model:data="formData.xmgl" :fields="xmglFields" :tableData="dictData.ITEMCLASS" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="细菌标志" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器大类" prop="yqdl">
|
||||
<SelectTable v-model:data="formData.xmgl" :fields="xmglFields" :tableData="dictData.YQDL" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="仪器大类" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" placeholder="请输入仪器名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="formData.wsw" label="隐藏微生物"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="rowClick">
|
||||
</CustomTable>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleOk">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getDictData, dictData } from '@/hooks';
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
|
||||
|
||||
const formData = ref({
|
||||
xmgl: '',
|
||||
inputcode: '',
|
||||
itemclass: '',
|
||||
yqdl: '',
|
||||
wsw: false,
|
||||
yq: ''
|
||||
})
|
||||
const tableData = ref()
|
||||
const batchInstrVsModel = defineModel<any>()
|
||||
|
||||
const xmglFields = ref([
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
const columns = ref([
|
||||
{ prop: 'xmgl', label: '项目类别', visible: true, align: 'center', width: 50 },
|
||||
{ prop: 'xmdh', label: '英文缩写', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmmc', label: '名称', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'dyckz', label: '参考值', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dw', label: '单位', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmlb', label: '结果类型', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'jsxm', label: '计算项目', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dyxh', label: '序号', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 50 },
|
||||
{ prop: 'xsws', label: '小数位数', visible: true, align: 'center', width: 50 },
|
||||
{ prop: 'xsbs', label: '稀释倍数', visible: true, align: 'center', width: 50 },
|
||||
{ prop: 'uflag', label: '停用', visible: true, align: 'center', width: 50 },
|
||||
{ prop: 'yqdl', label: '仪器大类', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'knowledge', label: '项目编码', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val1', label: '外部代码1', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val2', label: '外部代码2', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val3', label: '外部代码3', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'yymc', label: '英文名称', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'qccv', label: '允许CA(%)', visible: true, align: 'center', width: 100 },
|
||||
]);
|
||||
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '60vh', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// cellStyle: cellStyleHd
|
||||
})
|
||||
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
// 更新列配置
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
|
||||
const rowClick = () => {
|
||||
|
||||
}
|
||||
|
||||
const onClose = () => {
|
||||
batchInstrVsModel.value.visible = false;
|
||||
}
|
||||
|
||||
//刷新数据
|
||||
const getList = () => {
|
||||
|
||||
}
|
||||
|
||||
//取消
|
||||
const handleCancel = () => {
|
||||
|
||||
}
|
||||
|
||||
//确定
|
||||
const handleOk = () => {
|
||||
|
||||
}
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await getDictData('XMGL', 'ITEMCLASS', 'YQDL', 'YQ');
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -2,35 +2,34 @@
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="14" :xs="24">
|
||||
<!-- 表单区域-->
|
||||
<!-- 表单区域-->
|
||||
<el-form inline :model="queryParams" class="mb8" size="small">
|
||||
<el-form-item label="项目类别">
|
||||
<SelectTable v-model:data="queryParams.xmgl" :fields="xmglFields" :tableData="dictData.XMGL" label="label" value="value" objKey="value" width="140px" placeholder="项目类别"
|
||||
size="small"
|
||||
@getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类别">
|
||||
<SelectTable v-model:data="queryParams.xmgl" :fields="xmglFields" :tableData="dictData.XMGL" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="项目类别" size="small" @getDataValue="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="细菌标志">
|
||||
<SelectTable v-model:data="queryParams.itemclass" :fields="itemclassFields" :tableData="dictData.ITEMCLASS" label="label" value="value" objKey="value" width="140px" placeholder="细菌标志"
|
||||
size="small"
|
||||
@getDataValue="getList"/>
|
||||
<SelectTable v-model:data="queryParams.itemclass" :fields="itemclassFields" :tableData="dictData.ITEMCLASS"
|
||||
label="label" value="value" objKey="value" width="140px" placeholder="细菌标志" size="small"
|
||||
@getDataValue="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器代号">
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc" value="yq" objKey="yq" :border="true" width="140px" placeholder="请选择仪器"
|
||||
size="small"
|
||||
@getDataValue="getList"/>
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc"
|
||||
value="yq" objKey="yq" :border="true" width="140px" placeholder="请选择仪器" size="small"
|
||||
@getDataValue="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="快速查找">
|
||||
<el-input clearable placeholder="快速查找" v-model="queryParams.inputcode" prefix-icon="Search" style="width: 150px"
|
||||
@change="getList"/>
|
||||
<el-input clearable placeholder="快速查找" v-model="queryParams.inputcode" prefix-icon="Search"
|
||||
style="width: 150px" @change="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器大类">
|
||||
<SelectTable v-model:data="queryParams.yqdl" :fields="yqdlFields" :tableData="dictData.YQDL" label="label" value="value" objKey="value" :border="true" width="140px" placeholder="仪器大类"
|
||||
size="small"
|
||||
@getDataValue="getList"/>
|
||||
<SelectTable v-model:data="queryParams.yqdl" :fields="yqdlFields" :tableData="dictData.YQDL" label="label"
|
||||
value="value" objKey="value" :border="true" width="140px" placeholder="仪器大类" size="small"
|
||||
@getDataValue="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID">
|
||||
<el-input clearable placeholder="项目ID" prefix-icon="Search" v-model="queryParams.xmid" style="width: 150px"
|
||||
@change="getList"/>
|
||||
@change="getList" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio-group v-model="queryParams.uflag" fill="primary" size="large" @change="changeStauts">
|
||||
@ -40,34 +39,36 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="queryParams.isMIC" label="隐藏微生物项目" size="large" @change="getList" />
|
||||
<el-checkbox v-model="queryParams.isMIC" label="隐藏微生物项目" size="large" @change="getList" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleRefresh">刷新</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleDel">删除</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleDelCorr">删除对应</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleBatchVs">批量项目对应</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleBatchDel">批量删除对应</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleSave">保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 表格区域-->
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-click="rowChange">
|
||||
<template #xmgl ="{ row }">
|
||||
<!-- 表格区域-->
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="rowChange">
|
||||
<template #xmgl="{ row }">
|
||||
{{ formatDict(row.xmgl, 'XMGL') }}
|
||||
</template>
|
||||
<template #xmlb ="{ row }">
|
||||
{{ xmlbList.find(item => item.value === row.xmlb).label }}
|
||||
<template #xmlb="{ row }">
|
||||
{{xmlbList.find(item => item.value === row.xmlb).label}}
|
||||
</template>
|
||||
<template #jsxm ="{ row }">
|
||||
<template #jsxm="{ row }">
|
||||
{{ row.jsxm === 'Y' ? '是' : '否' }}
|
||||
</template>
|
||||
<template #uflag ="{ row }">
|
||||
<template #uflag="{ row }">
|
||||
{{ row.uflag === '0' ? '否' : '是' }}
|
||||
</template>
|
||||
<template #yqdl ="{ row }">
|
||||
{{ formatDict(row.yqdl, 'YQDL')}}
|
||||
<template #yqdl="{ row }">
|
||||
{{ formatDict(row.yqdl, 'YQDL') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
@ -75,8 +76,10 @@
|
||||
<el-col :span="10" :xs="24">
|
||||
<tabView :tabList="tabList" v-model:activeTab="activeTab" @update:active-tab="updateActive" />
|
||||
<KeepAlive>
|
||||
<component class="tabDiv" ref="tableTabRef" :is="activeTabN" :dataList="tabDataList" :formData="selectRow" v-model="modelParam" @refreshTabData="rowChange"></component>
|
||||
<component class="tabDiv" ref="tableTabRef" :is="activeTabN" :formData="selectRow" v-model="modelParam"
|
||||
@refreshTabData="rowChange"></component>
|
||||
</KeepAlive>
|
||||
<BatchInstrVs v-show="batchInstrVsModel.visible" v-model="batchInstrVsModel" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -94,14 +97,15 @@ import Sort from './tab/Sort.vue'
|
||||
import Parameter from './tab/Parameter.vue';
|
||||
import ChannelNumber from './tab/ChannelNumber.vue';
|
||||
import ReferenceValueDetails from './tab/ReferenceValueDetails.vue';
|
||||
import { queryXmInfoNewService,queryXmInfoNewDetailService,saveDataService} from '@/api/liswork/labItem/labItemApi';
|
||||
import { queryXmInfoNewService, queryXmInfoNewDetailService, saveDataService, deleteXmInfoService } from '@/api/liswork/labItem/labItemApi';
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import { getGroupInstrdList } from '@/api/liswork/work/LisWork';
|
||||
import tabView from '@/components/tabViews/index.vue';
|
||||
import { LabInstr,XmInfoNew } from '@/types';
|
||||
import { formatDict,getDictData,dictData } from '@/hooks';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { datalink } from '../../../api/liswork/work/LisWork';
|
||||
import { LabInstr, XmInfoNew } from '@/types';
|
||||
import { formatDict, getDictData, dictData } from '@/hooks';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import BatchInstrVs from './BatchInstrVs.vue';
|
||||
import _ from 'lodash';
|
||||
|
||||
const xmlbList = ref<Array<any>>([
|
||||
{ label: '数值型', value: '1' },
|
||||
@ -112,12 +116,12 @@ const xmlbList = ref<Array<any>>([
|
||||
const dataList = ref<Array<any>>([])
|
||||
const queryParams = ref({
|
||||
xmgl: '', //项目归类
|
||||
itemclass: '' , //细菌标志
|
||||
itemclass: '', //细菌标志
|
||||
yq: '', //仪器代号
|
||||
inputcode: '', //快速查找
|
||||
yqdl: '', //仪器大类
|
||||
xmid: '' , //项目ID
|
||||
uflag: '0' , //状态
|
||||
xmid: '', //项目ID
|
||||
uflag: '0', //状态
|
||||
isMIC: false || null //是否隐藏微生物项目
|
||||
})
|
||||
//字典数据
|
||||
@ -158,24 +162,24 @@ const activeTabN = computed(() => activeTabMap[activeTab.value as keyof typeof a
|
||||
//table表格列
|
||||
const columns = ref([
|
||||
{ prop: 'xmgl', label: '项目归类', visible: true, align: 'center', slot: 'xmgl', width: 100 },
|
||||
{ prop: 'xmdh', label: '英文缩写', visible: true, align: 'center'},
|
||||
{ prop: 'xmmc', label: '名称', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'dyckz', label: '参考值', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dw', label: '单位', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmlb', label: '结果类型', visible: true, align: 'center', slot: 'xmlb', width: 100 },
|
||||
{ prop: 'jsxm', label: '计算项目', visible: true, align: 'center', slot: 'jsxm', width: 100 },
|
||||
{ prop: 'dyxh', label: '序号', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xsws', label: '小数位数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmdh', label: '英文缩写', visible: true, align: 'center' },
|
||||
{ prop: 'xmmc', label: '名称', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'dyckz', label: '参考值', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dw', label: '单位', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmlb', label: '结果类型', visible: true, align: 'center', slot: 'xmlb', width: 100 },
|
||||
{ prop: 'jsxm', label: '计算项目', visible: true, align: 'center', slot: 'jsxm', width: 100 },
|
||||
{ prop: 'dyxh', label: '序号', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xsws', label: '小数位数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xsbs', label: '稀释倍数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'uflag', label: '停用', visible: true, align: 'center', slot: 'uflag', width: 100 },
|
||||
{ prop: 'uflag', label: '停用', visible: true, align: 'center', slot: 'uflag', width: 100 },
|
||||
{ prop: 'yqdl', label: '仪器大类', visible: true, align: 'center', slot: 'yqdl', width: 100 },
|
||||
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'knowledge', label: '知识库编码', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val1', label: '外部代码1', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val2', label: '外部代码2', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val3', label: '外部代码3', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'yymc', label: '英文名称', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val1', label: '外部代码1', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val2', label: '外部代码2', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val3', label: '外部代码3', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'yymc', label: '英文名称', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'qccv', label: '允许CA(%)', visible: true, align: 'center', width: 100 },
|
||||
])
|
||||
|
||||
@ -196,13 +200,13 @@ const yqdlFields = ref([
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
//tab页数据
|
||||
const tabDataList = ref<any>([]);
|
||||
|
||||
//选中行数据
|
||||
const selectRow = ref();
|
||||
//明细数据
|
||||
const selectDetailRow = ref()
|
||||
const tableTabRef = ref()
|
||||
//tab页数据
|
||||
const modelParam = ref<any>({
|
||||
basicData: {},
|
||||
commonlyValuesData: [],
|
||||
@ -212,8 +216,29 @@ const modelParam = ref<any>({
|
||||
})
|
||||
const basic = ref<boolean>(false)
|
||||
|
||||
// 1. 定义变量跟踪是否有未保存的修改
|
||||
const hasUnsavedChanges = ref(false);
|
||||
// 保存初始数据快照用于比较
|
||||
const initialModelParam = ref<any>(null);
|
||||
const batchInstrVsModel = ref<any>({
|
||||
visible: false
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 2. 深度监视modelParam的所有属性变化
|
||||
watch(
|
||||
modelParam,
|
||||
(newVal, oldVal) => {
|
||||
// 初始加载时不判断
|
||||
if (initialModelParam.value) {
|
||||
// 使用lodash的isEqual进行深度比较
|
||||
hasUnsavedChanges.value = !_.isEqual(newVal, initialModelParam.value);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
// 仪器
|
||||
const getYqConfig = () => {
|
||||
getGroupInstrdList()
|
||||
@ -233,50 +258,94 @@ const getList = () => {
|
||||
dataList.value = res.data;
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
getDictData('XMGL','ITEMCLASS', 'YQDL');
|
||||
getList()
|
||||
getYqConfig();
|
||||
})
|
||||
|
||||
|
||||
//新增
|
||||
const handleAdd = () => {
|
||||
console.log('新增')
|
||||
selectRow.value = '';
|
||||
tableTabRef.value.changeDisabled(false);
|
||||
modelParam.value = {
|
||||
basicData: {
|
||||
yq: '',
|
||||
xmdh: '',
|
||||
xmmc: '',
|
||||
zhbdh: '',
|
||||
bgdh: '',
|
||||
cksx: null,
|
||||
ckxx: null,
|
||||
dyckz: '',
|
||||
dylx: '1',
|
||||
zjf: '',
|
||||
xmlb: '',
|
||||
xs: null,
|
||||
xsws: '-1',
|
||||
mrz: '',
|
||||
jg: null,
|
||||
cb: null,
|
||||
dw: '',
|
||||
jsxm: 'N',
|
||||
jsgs: '',
|
||||
zkxm: 'N',
|
||||
sjx: null,
|
||||
xjx: null,
|
||||
ygxb: 'N',
|
||||
ygnl: 'N',
|
||||
ygbb: 'N',
|
||||
lcyy: '',
|
||||
jgbz: '',
|
||||
uflag: '0',
|
||||
xsbs: 1
|
||||
},
|
||||
commonlyValuesData: [],
|
||||
userInstrData: [],
|
||||
commonDescriptionsData: [],
|
||||
referenceValueDetailsData: []
|
||||
};
|
||||
tableConfig.value.highlightCurrentRow = false
|
||||
// 重置快照
|
||||
initialModelParam.value = _.cloneDeep(modelParam.value);
|
||||
hasUnsavedChanges.value = false;
|
||||
}
|
||||
|
||||
//删除
|
||||
const handleDel = () => {
|
||||
console.log('删除')
|
||||
const handleDel = async () => {
|
||||
if (selectRow.value) {
|
||||
await ElMessageBox.confirm('是否删除选中的数据?', '提示',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
);
|
||||
await deleteXmInfoService({ xmid: selectRow.value.xmid });
|
||||
ElMessage.success('删除成功!')
|
||||
getList();
|
||||
selectRow.value = null;
|
||||
if (typeof tableTabRef.value.changeDisabled === 'function') {
|
||||
tableTabRef.value.changeDisabled(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//删除对应
|
||||
const handleDelCorr = () => {
|
||||
//批量对应
|
||||
const handleBatchVs = () => {
|
||||
batchInstrVsModel.value.visible = true;
|
||||
}
|
||||
|
||||
//批量删除对应
|
||||
const handleBatchDel = () => {
|
||||
console.log('删除对应')
|
||||
}
|
||||
|
||||
//保存
|
||||
const handleSave = async () => {
|
||||
const handleSave = async (flag: any) => {
|
||||
|
||||
switch(activeTab.value){
|
||||
case 'Basic':
|
||||
basic.value = true
|
||||
modelParam.value.basicData = tableTabRef.value.basicData;
|
||||
break;
|
||||
case 'CommonlyValues':
|
||||
modelParam.value.commonlyValuesData = tableTabRef.value.commonlyValuesData;
|
||||
break;
|
||||
case 'UseInstr':
|
||||
modelParam.value.userInstrData = tableTabRef.value.userInstrData;
|
||||
break;
|
||||
case 'CommonDescriptions':
|
||||
modelParam.value.commonDescriptionsData = tableTabRef.value.commonDescriptionsData;
|
||||
break;
|
||||
case 'ReferenceValueDetails':
|
||||
modelParam.value.referenceValueDetailsData = tableTabRef.value.referenceValueDetailsData;
|
||||
break;
|
||||
//验证表单
|
||||
if (typeof tableTabRef.value.validate === 'function') {
|
||||
const valid = await tableTabRef.value.validate(); // 调用子组件的验证方法
|
||||
if (!valid) {
|
||||
ElMessage.error('表单验证失败,请检查输入项!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await saveDataService({
|
||||
xmInfoNew: modelParam.value.basicData,
|
||||
xmDoubleRows: [],
|
||||
@ -289,15 +358,26 @@ const handleSave = async () => {
|
||||
xmInfoVsRows: modelParam.value.userInstrData,
|
||||
xmTextresultNewRows: modelParam.value.commonDescriptionsData
|
||||
})
|
||||
rowChange(selectRow.value)
|
||||
if(basic.value){
|
||||
await getList();
|
||||
basic.value = false
|
||||
if (!flag) {
|
||||
rowChange(selectRow.value)
|
||||
}
|
||||
|
||||
if (basic.value) {
|
||||
getList();
|
||||
basic.value = false
|
||||
}
|
||||
ElMessage.success('保存成功!')
|
||||
|
||||
// 保存后更新快照
|
||||
initialModelParam.value = _.cloneDeep(modelParam.value);
|
||||
hasUnsavedChanges.value = false;
|
||||
|
||||
}
|
||||
|
||||
const handleRefresh = () => {
|
||||
getList();
|
||||
}
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
// 更新列配置
|
||||
@ -306,19 +386,51 @@ const handleColumnDragEnd = (data: any) => {
|
||||
|
||||
//状态改变
|
||||
const changeStauts = () => {
|
||||
if(!queryParams.value.isMIC){
|
||||
if (!queryParams.value.isMIC) {
|
||||
queryParams.value.isMIC = null;
|
||||
}
|
||||
getList();
|
||||
getList();
|
||||
}
|
||||
|
||||
// 选择行变化
|
||||
const rowChange = async (row: any) => {
|
||||
if (typeof tableTabRef.value.changeDisabled === 'function') {
|
||||
tableTabRef.value.changeDisabled(false);
|
||||
}
|
||||
|
||||
// 如果有未保存的修改,显示提示
|
||||
if (hasUnsavedChanges.value) {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
'当前数据有未保存的修改,是否保存?',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '保存',
|
||||
cancelButtonText: '不保存',
|
||||
type: 'warning'
|
||||
}
|
||||
);
|
||||
// 用户选择保存
|
||||
await handleSave("1");
|
||||
} catch (error) {
|
||||
// 用户选择不保存,继续执行
|
||||
}
|
||||
}
|
||||
|
||||
selectRow.value = row;
|
||||
const res = await queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh)
|
||||
const res = await queryXmInfoNewDetailService(row.xmid, row.yq, row.xmdh)
|
||||
selectDetailRow.value = res.data
|
||||
console.log('选中行明细数据:',selectDetailRow.value)
|
||||
console.log('选中行明细数据:', selectDetailRow.value)
|
||||
changeActiveTab()
|
||||
initialModelParam.value = _.cloneDeep(modelParam.value);
|
||||
hasUnsavedChanges.value = false;
|
||||
|
||||
//重置表单状态
|
||||
if (typeof tableTabRef.value.resetField === 'function') {
|
||||
tableTabRef.value.resetField();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//tab变化
|
||||
@ -328,13 +440,23 @@ const updateActive = () => {
|
||||
|
||||
|
||||
const changeActiveTab = () => {
|
||||
modelParam.value.basicData = toRaw(selectDetailRow.value.xmInfoNew || {});
|
||||
modelParam.value.commonlyValuesData = toRaw(selectDetailRow.value.xmValNewRows || []);
|
||||
modelParam.value.userInstrData = toRaw(selectDetailRow.value.xmInfoVsRows || []);
|
||||
modelParam.value.commonDescriptionsData = toRaw(selectDetailRow.value.xmTextresultNewRows || []);
|
||||
modelParam.value.referenceValueDetailsData = toRaw(selectDetailRow.value.xmRefNewRows || []);
|
||||
if (selectRow.value) {
|
||||
modelParam.value.basicData = toRaw(selectDetailRow.value.xmInfoNew || {});
|
||||
modelParam.value.commonlyValuesData = toRaw(selectDetailRow.value.xmValNewRows || []);
|
||||
modelParam.value.userInstrData = toRaw(selectDetailRow.value.xmInfoVsRows || []);
|
||||
modelParam.value.commonDescriptionsData = toRaw(selectDetailRow.value.xmTextresultNewRows || []);
|
||||
modelParam.value.referenceValueDetailsData = toRaw(selectDetailRow.value.xmRefNewRows || []);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
getDictData('XMGL', 'ITEMCLASS', 'YQDL');
|
||||
getList()
|
||||
getYqConfig();
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="css">
|
||||
|
||||
@ -1,50 +1,43 @@
|
||||
<!-- 常用取值 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="bClickAdd">增加</el-button>
|
||||
<el-button type="primary" @click="bClickDel">删除</el-button>
|
||||
<div>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="bClickAdd">增加</el-button>
|
||||
<el-button type="primary" @click="bClickDel">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="modelParam.commonlyValuesData" :columns="columns" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="handRowClick">
|
||||
<template #qz="{ row }">
|
||||
<el-select v-model="row.qz" clearable allow-create filterable default-first-option>
|
||||
<el-option v-for="item in qzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #jgbz="{ row }">
|
||||
<el-select v-model="row.jgbz" clearable>
|
||||
<el-option v-for="item in jgbzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #srm="{ row }">
|
||||
<el-input v-model="row.srm" class="full-width-input"></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="tableList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-click="handRowClick">
|
||||
<template #qz = {row}>
|
||||
<el-select v-model="row.qz" clearable allow-create filterable default-first-option>
|
||||
<el-option v-for="item in qzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #jgbz = {row}>
|
||||
<el-select v-model="row.jgbz" clearable>
|
||||
<el-option v-for="item in jgbzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #srm = {row}>
|
||||
<el-input v-model="row.srm" class="full-width-input"></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { dictData,getDictData } from '@/hooks';
|
||||
import { dictData, getDictData } from '@/hooks';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import {delXmValNewService} from '@/api/liswork/labItem/labItemApi'
|
||||
import { delXmValNewService } from '@/api/liswork/labItem/labItemApi'
|
||||
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
const tableRef = ref<any>();
|
||||
const tableList = ref<any>();
|
||||
const columns = ref([
|
||||
{ prop: 'qz', label: '取值', visible: true, align: 'center', slot:'qz', width: 200 },
|
||||
{ prop: 'srm', label: '快速输入码', visible: true, align: 'center',slot: 'srm', width: 100 },
|
||||
{ prop: 'qz', label: '取值', visible: true, align: 'center', slot: 'qz', width: 200 },
|
||||
{ prop: 'srm', label: '快速输入码', visible: true, align: 'center', slot: 'srm', width: 100 },
|
||||
{ prop: 'jgbz', label: '结果标志', visible: true, align: 'center', slot: 'jgbz', width: 100 }
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
@ -63,17 +56,9 @@ const handleColumnDragEnd = (data: any) => {
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
tableList.value = [...newVal.commonlyValuesData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
//序号最大值
|
||||
const maxXh = computed(() => {
|
||||
return tableList.value.length > 0 ? Math.max(...tableList.value.map((item:any) => item.xh || 0)) : 0;
|
||||
return modelParam.value.commonlyValuesData.length > 0 ? Math.max(...modelParam.value.commonlyValuesData.value.map((item: any) => item.xh || 0)) : 0;
|
||||
});
|
||||
|
||||
const bClickAdd = () => {
|
||||
@ -84,42 +69,35 @@ const bClickAdd = () => {
|
||||
jgbz: '',
|
||||
xh: maxXh.value + 1
|
||||
}
|
||||
tableList.value.push(newData);
|
||||
modelParam.value.commonlyValuesData.push(newData);
|
||||
|
||||
}
|
||||
|
||||
const bClickDel = async () => {
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',
|
||||
{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'});
|
||||
//删掉界面上面的数据
|
||||
//tableList.value = tableList.value?.filter((item:any) => item.xh != selectRow.value.xh );
|
||||
await delXmValNewService({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
if (selectRow.value) {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?', '警告',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' });
|
||||
//删掉界面上面的数据
|
||||
//tableList.value = tableList.value?.filter((item:any) => item.xh != selectRow.value.xh );
|
||||
await delXmValNewService({ xmid: modelParam.value.basicData.xmid, xh: selectRow.value.xh })
|
||||
emit('refreshTabData', modelParam.value.basicData)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const handRowClick = (row:any) => {
|
||||
const handRowClick = (row: any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
onActivated(async ()=>{
|
||||
onActivated(async () => {
|
||||
//默认取值
|
||||
await getDictData('VA','LF')
|
||||
await getDictData('VA', 'LF')
|
||||
qzOptions.value = dictData.value.VA
|
||||
jgbzOptions.value = dictData.value.LF
|
||||
tableList.value = modelParam.value.commonlyValuesData || []
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
commonlyValuesData: tableList
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
@ -1,180 +1,184 @@
|
||||
<template>
|
||||
<!-- 基本资料 -->
|
||||
<div>
|
||||
<el-form ref="formRef" :model="formData" size="small" class="form-inline" inline label-width="80px">
|
||||
<span class="text-span">基本参数:</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="项目类别" prop="xmgl">
|
||||
<SelectTable v-model:data="formData.xmgl" :fields="xmglFields" :tableData="dictData.XMGL" label="label" value="value" objKey="value" width="140px" placeholder="项目类别"
|
||||
size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="英文缩写" prop="xmdh">
|
||||
<el-input placeholder="英文缩写" v-model="formData.xmdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="xmmc">
|
||||
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="dw">
|
||||
<el-input placeholder="单位" v-model="formData.dw"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="结果类别" prop="xmlb">
|
||||
<el-input placeholder="结果类别" v-model="formData.xmlb"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="阴阳性" prop="mrz">
|
||||
<el-input placeholder="阴阳性" v-model="formData.mrz"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器大类" prop="yqdl">
|
||||
<el-input placeholder="仪器大类" v-model="formData.yqdl"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="允许CV(%)" prop="qccv" label-width="100px">
|
||||
<el-input placeholder="允许CV(%)" v-model="formData.qccv"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="稀释倍数" prop="xsbs">
|
||||
<el-input placeholder="稀释倍数" v-model="formData.xsbs"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="稀释倍数" prop="xsbs">
|
||||
<el-input placeholder="稀释倍数" v-model="formData.xsbs"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="whonet编码" prop="whocode" label-width="100px">
|
||||
<el-input placeholder="whonet编码" v-model="formData.whocode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Gram" prop="germflag">
|
||||
<el-input placeholder="Gram" v-model="formData.germflag"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文名称" prop="yymc">
|
||||
<el-input placeholder="英文名称" v-model="formData.yymc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID" prop="xmid">
|
||||
<el-input placeholder="项目ID" disabled v-model="formData.xmid"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="uflag">
|
||||
<el-checkbox value="uflag">停用</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="知识库编码" prop="knowledge" label-width="100px">
|
||||
<el-input placeholder="知识库编码" v-model="formData.knowledge"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="小数保留位数" prop="xsws" label-width="100px">
|
||||
<el-input placeholder="小数保留位数" v-model="formData.xsws"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印形式" prop="dylx">
|
||||
<el-input placeholder="打印形式" v-model="formData.dylx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="总汇表代号" prop="zhbdh" label-width="100px">
|
||||
<el-input placeholder="总汇表代号" v-model="formData.zhbdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报告单代号" prop="bgdh" label-width="90px">
|
||||
<el-input placeholder="报告单代号" v-model="formData.bgdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="jg">
|
||||
<el-input placeholder="价格" v-model="formData.jg"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="助记符" prop="zjf">
|
||||
<el-input placeholder="助记符" v-model="formData.zjf"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="测试方法" prop="csff">
|
||||
<el-input placeholder="测试方法" v-model="formData.csff"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组打印组号" prop="fzdyxh" label-width="100px">
|
||||
<el-input placeholder="分组打印组号" v-model="formData.fzdyxh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="细菌项目类别" prop="itemclass" label-width="100px">
|
||||
<el-input placeholder="细菌项目类别" v-model="formData.itemclass"></el-input>
|
||||
</el-form-item>
|
||||
<span class="text-span">结果参考值计算:</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="参考下限" prop="ckxx">
|
||||
<el-input placeholder="参考下限" v-model="formData.ckxx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参考上限" prop="cksx">
|
||||
<el-input placeholder="参考上限" v-model="formData.cksx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参考值" prop="dyckz" label-width="60px">
|
||||
<el-input placeholder="参考值" v-model="formData.dyckz"></el-input>
|
||||
<el-button type="primary" @click="multiRefClick">多行参考值向导...</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="公式" prop="jsgs" label-width="40px" >
|
||||
<el-input placeholder="公式" v-model="formData.jsgs"></el-input>
|
||||
<el-button v-show="formData.jsxm === 'Y'" type="primary" @click="calcGuildeClick">向导...</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox label="参考值与性别有关" v-model="ygxbCheck"></el-checkbox>
|
||||
<el-checkbox label="与年龄有关" v-model="ygnlCheck"></el-checkbox>
|
||||
<el-checkbox label="与标本有关" v-model="ygbbCheck"></el-checkbox>
|
||||
<el-checkbox label="与生理周期有关" v-model="ygzqCheck"></el-checkbox>
|
||||
<el-checkbox label="与诊断有关" v-model="ygzdCheck"></el-checkbox>
|
||||
<el-checkbox label="计算项目" v-model="jsxmCheck"></el-checkbox>
|
||||
</el-form-item>
|
||||
<span class="text-span">医学审核条件:</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="项目结果不可能大于" prop="sjx" label-width="140px">
|
||||
<el-input placeholder="项目结果不可能大于" v-model="formData.sjx" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="不可能小于" prop="xjx" label-width="90px">
|
||||
<el-input placeholder="不可能小于" v-model="formData.xjx" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人两次检验结果在" prop="jgjg" label-width="140px">
|
||||
<el-input placeholder="病人两次检验结果在" v-model="formData.jgjg" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<!--计算属性-->
|
||||
<el-form-item label="天内不可能相差" prop="cp_jgz" label-width="120px">
|
||||
<el-input placeholder="天内不可能相差" v-model="formData.cp_jgz" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<!--报警条件-->
|
||||
<span class="text-span">报警条件</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="危急值">
|
||||
<el-input placeholder="上限极值" v-model="formData.hlimt"></el-input>
|
||||
<el-input placeholder="下限极值" v-model="formData.llimit"></el-input>
|
||||
<el-button type="primary" @click="conditionClick">特定条件</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="复查">
|
||||
<el-input placeholder="上限极值" v-model="formData.redoxx"></el-input>
|
||||
<el-input placeholder="下限极值" v-model="formData.redosx"></el-input>
|
||||
</el-form-item>
|
||||
<span class="text-span">其他参数</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="国标编码">
|
||||
<el-input v-model="formData.val1"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码2">
|
||||
<el-input v-model="formData.val2"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码3">
|
||||
<el-input v-model="formData.val3"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码4">
|
||||
<el-input v-model="formData.val4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码5">
|
||||
<el-input v-model="formData.val5"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 基本资料 -->
|
||||
<div>
|
||||
<el-form ref="formRef" :model="modelParam.basicData" :rules="rules" size="small" class="form-inline" inline
|
||||
label-width="70px" :disabled="disabled" label-position="right" inline-message>
|
||||
<span class="text-span">基本参数:</span>
|
||||
<el-divider style="margin: 5px 0;" />
|
||||
<el-form-item label="项目类别" prop="xmgl">
|
||||
<SelectTable v-model:data="modelParam.basicData.xmgl" :fields="xmglFields" :tableData="dictData.XMGL"
|
||||
label="label" value="value" objKey="value" width="140px" placeholder="项目类别" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="英文缩写" prop="xmdh">
|
||||
<el-input placeholder="英文缩写" v-model="modelParam.basicData.xmdh" @input="xmdhInput"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="xmmc">
|
||||
<el-input placeholder="项目名称" v-model="modelParam.basicData.xmmc" @change="xmmcChange"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="dw">
|
||||
<SelectTable v-model:data="modelParam.basicData.dw" :fields="xmglFields" :tableData="dictData.UT" label="label"
|
||||
value="label" objKey="label" width="140px" placeholder="单位" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结果类别" prop="xmlb">
|
||||
<SelectTable v-model:data="modelParam.basicData.xmlb" :fields="xmglFields" :tableData="xmlbData" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="结果类别" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="阴阳性" prop="mrz">
|
||||
<SelectTable v-model:data="modelParam.basicData.mrz" :fields="xmglFields" :tableData="mrzData" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="阴阳性" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器大类" prop="yqdl">
|
||||
<SelectTable v-model:data="modelParam.basicData.yqdl" :fields="xmglFields" :tableData="dictData.YQDL"
|
||||
label="label" value="value" objKey="value" width="140px" placeholder="仪器大类" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="允许CV(%)" prop="qccv" label-width="100px">
|
||||
<el-input placeholder="允许CV(%)" type="number" v-model="modelParam.basicData.qccv"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="稀释倍数" prop="xsbs">
|
||||
<el-input placeholder="稀释倍数" v-model="modelParam.basicData.xsbs"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="whonet编码" prop="whocode" label-width="100px">
|
||||
<el-input placeholder="whonet编码" v-model="modelParam.basicData.whocode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Gram" prop="germflag">
|
||||
<el-input placeholder="Gram" v-model="modelParam.basicData.germflag"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文名称" prop="yymc">
|
||||
<el-input placeholder="英文名称" v-model="modelParam.basicData.yymc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID" prop="xmid">
|
||||
<el-input placeholder="项目ID" disabled v-model="modelParam.basicData.xmid"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="uflag">
|
||||
<el-checkbox value="uflag">停用</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="知识库编码" prop="knowledge" label-width="100px">
|
||||
<el-input placeholder="知识库编码" v-model="modelParam.basicData.knowledge"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="小数保留位数" prop="xsws" label-width="100px">
|
||||
<SelectTable v-model:data="modelParam.basicData.xsws" :fields="xmglFields" :tableData="xswsData" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="小数保留位数" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="打印形式" prop="dylx">
|
||||
<SelectTable v-model:data="modelParam.basicData.dylx" :fields="xmglFields" :tableData="dylxData" label="label"
|
||||
value="value" objKey="value" width="140px" placeholder="打印形式" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总汇表代号" prop="zhbdh" label-width="100px">
|
||||
<el-input placeholder="总汇表代号" v-model="modelParam.basicData.zhbdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报告单代号" prop="bgdh" label-width="90px">
|
||||
<el-input placeholder="报告单代号" v-model="modelParam.basicData.bgdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="jg">
|
||||
<el-input placeholder="价格" type="number" v-model="modelParam.basicData.jg"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="助记符" prop="zjf">
|
||||
<el-input placeholder="助记符" v-model="modelParam.basicData.zjf"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="测试方法" prop="csff">
|
||||
<SelectTable v-model:data="modelParam.basicData.csff" :fields="xmglFields" :tableData="dictData.MD"
|
||||
label="label" value="value" objKey="value" width="140px" placeholder="测试方法" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分组打印组号" prop="fzdyxh" label-width="100px">
|
||||
<el-input placeholder="分组打印组号" type="number" v-model="modelParam.basicData.fzdyxh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="细菌项目类别" prop="itemclass" label-width="100px">
|
||||
<SelectTable v-model:data="modelParam.basicData.itemclass" :fields="xmglFields" :tableData="dictData.ITEMCLASS"
|
||||
label="label" value="value" objKey="value" width="140px" placeholder="细菌项目类别" size="small" />
|
||||
</el-form-item>
|
||||
<span class="text-span">结果参考值计算:</span>
|
||||
<el-divider style="margin: 5px 0;" />
|
||||
<el-form-item label="参考下限" prop="ckxx">
|
||||
<el-input placeholder="参考下限" v-model="modelParam.basicData.ckxx" @input="updatedyckz"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参考上限" prop="cksx">
|
||||
<el-input placeholder="参考上限" v-model="modelParam.basicData.cksx" @input="updatedyckz"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参考值" prop="dyckz" label-width="60px">
|
||||
<el-input placeholder="参考值" v-model="modelParam.basicData.dyckz"></el-input>
|
||||
<el-button type="primary" @click="multiRefClick">多行参考值向导...</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="公式" prop="jsgs" label-width="40px">
|
||||
<el-input placeholder="公式" v-model="modelParam.basicData.jsgs"></el-input>
|
||||
<el-button v-show="modelParam.basicData.jsxm === 'Y'" type="primary" @click="calcGuildeClick">向导...</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox label="参考值与性别有关" v-model="ygxbCheck"></el-checkbox>
|
||||
<el-checkbox label="与年龄有关" v-model="ygnlCheck"></el-checkbox>
|
||||
<el-checkbox label="与标本有关" v-model="ygbbCheck"></el-checkbox>
|
||||
<el-checkbox label="与生理周期有关" v-model="ygzqCheck"></el-checkbox>
|
||||
<el-checkbox label="与诊断有关" v-model="ygzdCheck"></el-checkbox>
|
||||
<el-checkbox label="计算项目" v-model="jsxmCheck"></el-checkbox>
|
||||
</el-form-item>
|
||||
<span class="text-span">医学审核条件:</span>
|
||||
<el-divider style="margin: 5px 0;" />
|
||||
<el-form-item label="项目结果不可能大于" prop="sjx" label-width="140px">
|
||||
<el-input placeholder="项目结果不可能大于" v-model="modelParam.basicData.sjx" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="不可能小于" prop="xjx" label-width="90px">
|
||||
<el-input placeholder="不可能小于" v-model="modelParam.basicData.xjx" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人两次检验结果在" prop="jgjg" label-width="140px">
|
||||
<el-input placeholder="病人两次检验结果在" v-model="modelParam.basicData.jgjg" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<!--计算属性-->
|
||||
<el-form-item label="天内不可能相差" prop="cp_jgz" label-width="120px">
|
||||
<el-input placeholder="天内不可能相差" v-model="modelParam.basicData.cp_jgz" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<!--报警条件-->
|
||||
<span class="text-span">报警条件</span>
|
||||
<el-divider style="margin: 5px 0;" />
|
||||
<el-form-item label="危急值">
|
||||
<el-input placeholder="上限极值" v-model="modelParam.basicData.hlimt"></el-input>
|
||||
<el-input placeholder="下限极值" v-model="modelParam.basicData.llimit"></el-input>
|
||||
<el-button type="primary" @click="conditionClick">特定条件</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="复查">
|
||||
<el-input placeholder="上限极值" v-model="modelParam.basicData.redoxx"></el-input>
|
||||
<el-input placeholder="下限极值" v-model="modelParam.basicData.redosx"></el-input>
|
||||
</el-form-item>
|
||||
<span class="text-span">其他参数</span>
|
||||
<el-divider style="margin: 5px 0;" />
|
||||
<el-form-item label="国标编码">
|
||||
<SelectTable v-model:data="modelParam.basicData.val1" :fields="xmglFields" :tableData="dictData.GBDM"
|
||||
label="label" value="value" objKey="value" width="140px" placeholder="国标编码" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码2">
|
||||
<el-input v-model="modelParam.basicData.val2"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码3">
|
||||
<el-input v-model="modelParam.basicData.val3"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码4">
|
||||
<el-input v-model="modelParam.basicData.val4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码5">
|
||||
<el-input v-model="modelParam.basicData.val5"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<MultiRef :refData="formData.dyckz" v-model:dialog-table-visible="mulitDialogTableVisible" @closeWithReturn="closeWithReturnMultiRef" />
|
||||
<CalcGuilde v-model="calcDialogTableVisible" :form-data="formData" :text="formData.jsgs" @confirm="handleDialogConfirm"/>
|
||||
<Condition v-model="conditionTabVisible" :form-data="formData"/>
|
||||
<MultiRef :refData="modelParam.basicData.dyckz" v-model:dialog-table-visible="mulitDialogTableVisible"
|
||||
@closeWithReturn="closeWithReturnMultiRef" />
|
||||
<CalcGuilde v-model="calcDialogTableVisible" :form-data="modelParam.basicData" :text="modelParam.basicData.jsgs"
|
||||
@confirm="handleDialogConfirm" />
|
||||
<Condition v-model="conditionTabVisible" :form-data="modelParam.basicData" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { formatDict,getDictData ,dictData} from '@/hooks';
|
||||
import { formatDict, getDictData, dictData } from '@/hooks';
|
||||
import MultiRef from './child/MultiRef.vue';
|
||||
import CalcGuilde from './child/CalcGuilde.vue';
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import Condition from './child/Condition.vue';
|
||||
|
||||
// const props = defineProps({
|
||||
// dataList: {
|
||||
// type: Object , //Object as PropType<XmInfoNew>
|
||||
// required: false
|
||||
// }
|
||||
// });
|
||||
//@ts-ignore
|
||||
import { getFirstLetter } from '@/utils/pinyin.js';
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
|
||||
const formRef = ref();
|
||||
const formData = ref<any>({});
|
||||
const disabled = ref(true);
|
||||
const mulitDialogTableVisible = ref(false)
|
||||
const calcDialogTableVisible = ref(false)
|
||||
const conditionTabVisible = ref(false)
|
||||
@ -182,120 +186,174 @@ const xmglFields = ref([
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
||||
])
|
||||
const xmlbData = [
|
||||
{ label: '数值型', value: '1' },
|
||||
{ label: '文字型', value: '2' },
|
||||
{ label: '阴阳性型', value: '3' },
|
||||
{ label: '数值文字混合型', value: '4' },
|
||||
]
|
||||
const mrzData = [
|
||||
{ label: '阴性', value: 'N' },
|
||||
{ label: '阳性', value: 'P' }
|
||||
]
|
||||
const xswsData = [
|
||||
{ label: '保持原始值', value: '-1' },
|
||||
{ label: '0 位', value: '0' },
|
||||
{ label: '1 位', value: '1' },
|
||||
{ label: '2 位', value: '2' },
|
||||
{ label: '3 位', value: '3' },
|
||||
{ label: '4 位', value: '4' },
|
||||
]
|
||||
const dylxData = [
|
||||
{ label: '原始检验结果', value: '1' },
|
||||
{ label: '>上限,<下限模式', value: '2' },
|
||||
{ label: '不打印', value: '3' },
|
||||
]
|
||||
|
||||
const rules = ref({
|
||||
dylx: [{ required: true, message: '请选择打印形式', trigger: 'blur' }],
|
||||
})
|
||||
|
||||
computed(() => {
|
||||
switch(formData.value.jgbz){
|
||||
switch (modelParam.value.basicData.jgbz) {
|
||||
case '1':
|
||||
formData.value.cp_jgz = formData.value.jgz;
|
||||
modelParam.value.basicData.cp_jgz = modelParam.value.basicData.jgz;
|
||||
break;
|
||||
case '2':
|
||||
formData.value.cp_jgz = formData.value.jgz + '%';
|
||||
modelParam.value.basicData.cp_jgz = modelParam.value.basicData.jgz + '%';
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
const jsxmCheck = computed({
|
||||
get(){
|
||||
return formData.value.jsxm === 'Y'
|
||||
get() {
|
||||
return modelParam.value.basicData.jsxm === 'Y'
|
||||
},
|
||||
set(checked: boolean){
|
||||
formData.value.jsxm = checked ? 'Y' : 'N';
|
||||
set(checked: boolean) {
|
||||
modelParam.value.basicData.jsxm = checked ? 'Y' : 'N';
|
||||
}
|
||||
})
|
||||
|
||||
const ygzqCheck = computed({
|
||||
get(){
|
||||
return formData.value.ygzq === 'Y'
|
||||
const ygzqCheck = computed({
|
||||
get() {
|
||||
return modelParam.value.basicData.ygzq === 'Y'
|
||||
},
|
||||
set(checked: boolean){
|
||||
formData.value.ygzq = checked ? 'Y' : 'N';
|
||||
set(checked: boolean) {
|
||||
modelParam.value.basicData.ygzq = checked ? 'Y' : 'N';
|
||||
}
|
||||
})
|
||||
|
||||
const ygzdCheck = computed({
|
||||
get(){
|
||||
return formData.value.ygzd === 'Y'
|
||||
const ygzdCheck = computed({
|
||||
get() {
|
||||
return modelParam.value.basicData.ygzd === 'Y'
|
||||
},
|
||||
set(checked: boolean){
|
||||
formData.value.ygzd = checked ? 'Y' : 'N';
|
||||
set(checked: boolean) {
|
||||
modelParam.value.basicData.ygzd = checked ? 'Y' : 'N';
|
||||
}
|
||||
})
|
||||
|
||||
const ygbbCheck = computed({
|
||||
get(){
|
||||
return formData.value.ygbb === 'Y'
|
||||
const ygbbCheck = computed({
|
||||
get() {
|
||||
return modelParam.value.basicData.ygbb === 'Y'
|
||||
},
|
||||
set(checked: boolean){
|
||||
formData.value.ygbb = checked ? 'Y' : 'N';
|
||||
set(checked: boolean) {
|
||||
modelParam.value.basicData.ygbb = checked ? 'Y' : 'N';
|
||||
}
|
||||
})
|
||||
|
||||
const ygnlCheck = computed({
|
||||
get(){
|
||||
return formData.value.ygnl === 'Y'
|
||||
const ygnlCheck = computed({
|
||||
get() {
|
||||
return modelParam.value.basicData.ygnl === 'Y'
|
||||
},
|
||||
set(checked: boolean){
|
||||
formData.value.ygnl = checked ? 'Y' : 'N';
|
||||
set(checked: boolean) {
|
||||
modelParam.value.basicData.ygnl = checked ? 'Y' : 'N';
|
||||
}
|
||||
})
|
||||
|
||||
const ygxbCheck = computed({
|
||||
get(){
|
||||
return formData.value.ygxb === 'Y'
|
||||
const ygxbCheck = computed({
|
||||
get() {
|
||||
return modelParam.value.basicData.ygxb === 'Y'
|
||||
},
|
||||
set(checked: boolean){
|
||||
formData.value.ygxb = checked ? 'Y' : 'N';
|
||||
set(checked: boolean) {
|
||||
modelParam.value.basicData.ygxb = checked ? 'Y' : 'N';
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
formData.value = {...newVal.basicData};
|
||||
},
|
||||
{ immediate: true,deep: true }
|
||||
);
|
||||
const updatedyckz = () => {
|
||||
modelParam.value.basicData.dyckz = !modelParam.value.basicData.ckxx && !modelParam.value.basicData.cksx ? '' : `${modelParam.value.basicData.ckxx}--${modelParam.value.basicData.cksx}`;
|
||||
}
|
||||
|
||||
|
||||
//多行参考值
|
||||
const multiRefClick = () => {
|
||||
if(formData.value.dyckz){
|
||||
if (modelParam.value.basicData.dyckz) {
|
||||
mulitDialogTableVisible.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const closeWithReturnMultiRef = (val: string) => {
|
||||
formData.value.dyckz = val;
|
||||
modelParam.value.basicData.dyckz = val;
|
||||
mulitDialogTableVisible.value = false;
|
||||
}
|
||||
|
||||
const handleDialogConfirm = (val:string) => {
|
||||
formData.value.jsgs = val;
|
||||
const handleDialogConfirm = (val: string) => {
|
||||
modelParam.value.basicData.jsgs = val;
|
||||
calcDialogTableVisible.value = false
|
||||
}
|
||||
|
||||
//计算向导
|
||||
const calcGuildeClick = () => {
|
||||
if(formData.value.jsxm){
|
||||
if (modelParam.value.basicData.jsxm) {
|
||||
calcDialogTableVisible.value = true
|
||||
}
|
||||
|
||||
}
|
||||
//危急值特定条件
|
||||
const conditionClick = () => {
|
||||
if(formData.value.xmid){
|
||||
if (modelParam.value.basicData.xmid) {
|
||||
conditionTabVisible.value = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const xmdhInput = (val: string) => {
|
||||
modelParam.value.basicData.zhbdh = val;
|
||||
modelParam.value.basicData.bgdh = val;
|
||||
}
|
||||
|
||||
const xmmcChange = (val: string) => {
|
||||
modelParam.value.basicData.zjf = getFirstLetter(val);
|
||||
|
||||
}
|
||||
|
||||
onActivated(async () => {
|
||||
await getDictData('XMGL');
|
||||
await getDictData('XMGL', 'UT', 'YQDL', 'MD', 'ITEMCLASS', 'GBDM');
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 暴露验证方法(关键步骤)
|
||||
defineExpose({
|
||||
basicData: formData
|
||||
})
|
||||
// 封装表单验证方法,返回 Promise
|
||||
validate: () => {
|
||||
return new Promise((resolve) => {
|
||||
formRef.value?.validate((valid: boolean) => {
|
||||
resolve(valid);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 可选:暴露清除验证的方法
|
||||
clearValidate: () => {
|
||||
formRef.value?.clearValidate();
|
||||
},
|
||||
resetField: () => {
|
||||
formRef.value?.resetFields();
|
||||
},
|
||||
changeDisabled: (val: any) => {
|
||||
disabled.value = val;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@ -305,16 +363,19 @@ defineExpose({
|
||||
padding: 10px;
|
||||
background-color: #f5f7fa;
|
||||
height: auto;
|
||||
|
||||
.el-input {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.text-span {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<!-- 常见描述 -->
|
||||
<div>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="onAddClick">增加</el-button>
|
||||
<el-button type="primary" @click="onDelClick">删除</el-button>
|
||||
<!-- 常见描述 -->
|
||||
<div>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="onAddClick">增加</el-button>
|
||||
<el-button type="primary" @click="onDelClick">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="modelParam.commonDescriptionsData" :columns="columns" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="rowClick">
|
||||
<template #textresult="{ row }">
|
||||
<el-input type="textarea" v-model="row.textresult" class="full-width-input" autosize></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="tableList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-click="rowClick">
|
||||
<template #textresult="{row}">
|
||||
<el-input type="textarea" v-model="row.textresult" class="full-width-input" autosize></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -22,20 +22,11 @@ import { ElMessageBox } from 'element-plus';
|
||||
import { ref } from 'vue';
|
||||
import { delXmTextresultNew } from '@/api/liswork/labItem/labItemApi';
|
||||
|
||||
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
|
||||
const tableRef = ref();
|
||||
const tableList = ref<Array<XmTextresultNew>>([])
|
||||
const columns = ref([
|
||||
{ prop: 'textresult', label: '文字描述', visible: true, align: 'center',slot: 'textresult', width: 500,showOverflowTooltip:false },
|
||||
{ prop: 'textresult', label: '文字描述', visible: true, align: 'center', slot: 'textresult', width: 500, showOverflowTooltip: false },
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
@ -56,18 +47,10 @@ const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
//序号最大值
|
||||
const maxXh = computed(() => {
|
||||
return tableList.value.length > 0 ? Math.max(...tableList.value.map((item:any) => item.xh || 0)) : 0;
|
||||
return modelParam.value.commonDescriptionsData.length > 0 ? Math.max(...modelParam.value.commonDescriptionsData.map((item: any) => item.xh || 0)) : 0;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
tableList.value = [...newVal.commonDescriptionsData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const rowClick = (row:any) => {
|
||||
const rowClick = (row: any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
@ -78,25 +61,20 @@ const onAddClick = () => {
|
||||
xmdh: modelParam.value.basicData.xmdh,
|
||||
xh: maxXh.value + 1
|
||||
}
|
||||
tableList.value.push(newData)
|
||||
modelParam.value.commonDescriptionsData.push(newData)
|
||||
}
|
||||
|
||||
const onDelClick = async ()=> {
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',
|
||||
{ confirmButtonText: 'OK',cancelButtonText: 'Cancel',type: 'warning',});
|
||||
const onDelClick = async () => {
|
||||
if (selectRow.value) {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?', '警告',
|
||||
{ confirmButtonText: 'OK', cancelButtonText: 'Cancel', type: 'warning', });
|
||||
//tableList.value = tableList.value.filter((item:any) => item.xh != selectRow.value.xh)
|
||||
await delXmTextresultNew({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
await delXmTextresultNew({ xmid: modelParam.value.basicData.xmid, xh: selectRow.value.xh })
|
||||
emit('refreshTabData', modelParam.value.basicData)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
commonDescriptionsData: tableList
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,119 +1,94 @@
|
||||
<template>
|
||||
<!--参考值明细-->
|
||||
<div>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="onAddClick">增加</el-button>
|
||||
<el-button type="primary" @click="onDelClick">删除</el-button>
|
||||
<!--参考值明细-->
|
||||
<div>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="onAddClick">增加</el-button>
|
||||
<el-button type="primary" @click="onDelClick">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRefUp" :data="modelParam.referenceValueDetailsData" :columns="columnsUp"
|
||||
:enable-column-drag="true" @column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="rowClick">
|
||||
<template #xb="{ row }">
|
||||
<el-select v-model="row.xb" clearable>
|
||||
<el-option v-for="item in optionsXb" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #nl1="{ row }">
|
||||
<el-input v-model="row.nl1" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cp_nldw1="{ row }">
|
||||
<el-select v-model="row.nldw" clearable>
|
||||
<el-option v-for="item in optionsNLDW" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #nl2="{ row }">
|
||||
<el-input v-model="row.nl2" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cp_nldw2="{ row }">
|
||||
<el-select v-model="row.nldw" clearable>
|
||||
<el-option v-for="item in optionsNLDW" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #bblx="{ row }">
|
||||
<SelectTable v-model:data="row.bblx" :fields="fields" :tableData="bblxOptions" label="label" value="label"
|
||||
objKey="label" :border="true" />
|
||||
</template>
|
||||
<template #slzq="{ row }">
|
||||
<el-select v-model="row.slzq" clearable>
|
||||
<el-option v-for="item in optionsSLZQ" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #zd="{ row }">
|
||||
<el-input v-model="row.zd" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #ckxx="{ row }">
|
||||
<el-input v-model="row.ckxx" class="full-width-input" @input="updateDyck(row)"></el-input>
|
||||
</template>
|
||||
<template #cksx="{ row }">
|
||||
<el-input v-model="row.cksx" class="full-width-input" @input="updateDyck(row)"></el-input>
|
||||
</template>
|
||||
<template #alterxx="{ row }">
|
||||
<el-input v-model="row.alterxx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #altersx="{ row }">
|
||||
<el-input v-model="row.altersx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #dyck="{ row }">
|
||||
<el-text class="mx-1">{{ row.dyck }}</el-text>
|
||||
</template>
|
||||
</CustomTable>
|
||||
<el-row>
|
||||
仪器特定参考值:
|
||||
</el-row>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="">增加</el-button>
|
||||
<el-button type="primary" @click="">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRefDown" :data="dataListDown" :columns="columnsDown" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" />
|
||||
</div>
|
||||
<CustomTable ref="tableRefUp" :data="dataListUp" :columns="columnsUp" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-click="rowClick">
|
||||
<template #xb="{row}">
|
||||
<el-select v-model="row.xb" clearable>
|
||||
<el-option
|
||||
v-for="item in optionsXb"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #cp_nl1="{row}">
|
||||
<el-input v-model="row.cp_nl1" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cp_nldw1="{row}">
|
||||
<el-select v-model="row.cp_nldw1" clearable>
|
||||
<el-option
|
||||
v-for="item in optionsNLDW"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #cp_nl2="{row}">
|
||||
<el-input v-model="row.cp_nl2" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cp_nldw2="{row}">
|
||||
<el-select v-model="row.cp_nldw2" clearable>
|
||||
<el-option
|
||||
v-for="item in optionsNLDW"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #bblx="{row}">
|
||||
<SelectTable v-model:data="row.bblx" :fields="fields" :tableData="bblxOptions" label="label"
|
||||
value="label" objKey="label" :border="true" />
|
||||
</template>
|
||||
<template #slzq="{row}">
|
||||
<el-select v-model="row.slzq" clearable>
|
||||
<el-option
|
||||
v-for="item in optionsSLZQ"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #zd="{row}">
|
||||
<el-input v-model="row.zd" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #ckxx="{row}">
|
||||
<el-input v-model="row.ckxx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cksx="{row}">
|
||||
<el-input v-model="row.cksx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #alterxx="{row}">
|
||||
<el-input v-model="row.alterxx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #altersx="{row}">
|
||||
<el-input v-model="row.altersx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #dyck="{row}">
|
||||
{{ !row.ckxx && !row.cksx ? '':row.ckxx + '--' + row.cksx }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<el-row>
|
||||
仪器特定参考值:
|
||||
</el-row>
|
||||
<div class="modifyClass">
|
||||
<el-button type="primary" @click="">增加</el-button>
|
||||
<el-button type="primary" @click="">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRefDown" :data="dataListDown" :columns="columnsDown" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { ref } from 'vue';
|
||||
import {getDictData,dictData} from '@/hooks'
|
||||
import { getDictData, dictData } from '@/hooks'
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
|
||||
// const props = defineProps({
|
||||
// dataList: {
|
||||
// type: Array,
|
||||
// default: []
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
const optionsXb = [
|
||||
{value: '1' ,label: '男'},
|
||||
{value: '2' ,label: '女'},
|
||||
{ value: '1', label: '男' },
|
||||
{ value: '2', label: '女' },
|
||||
]
|
||||
|
||||
const optionsNLDW = [
|
||||
{value: '1' ,label: '岁'},
|
||||
{value: '2' ,label: '月'},
|
||||
{value: '3' ,label: '天'},
|
||||
{value: '4' ,label: '时'},
|
||||
{ value: '1', label: '岁' },
|
||||
{ value: '2', label: '月' },
|
||||
{ value: '3', label: '天' },
|
||||
{ value: '4', label: '时' },
|
||||
]
|
||||
|
||||
const optionsSLZQ = ref<any>([])
|
||||
@ -128,27 +103,27 @@ const bblxOptions = ref<Array<{ zddh: string; zdmc: string }>>([]);
|
||||
|
||||
const tableRefUp = ref<any>();
|
||||
const tableRefDown = ref<any>();
|
||||
const dataListUp = ref();
|
||||
// const dataListUp = ref();
|
||||
const dataListDown = ref();
|
||||
const columnsUp = ref([
|
||||
{ prop: 'xmid', label: 'xmid', visible: false, align: 'center'},
|
||||
{ prop: 'xmid', label: 'xmid', visible: false, align: 'center' },
|
||||
{ prop: 'xh', label: '序号', visible: false, align: 'center' },
|
||||
{ prop: 'xb', label: '性别', visible: true, align: 'center',slot: 'xb', width: 70 },
|
||||
{ prop: 'nl1', label: '年龄下限', visible: true, align: 'center',slot:'cp_nl1', width: 100 },
|
||||
{ prop: 'cp_nldw1', label: '年龄单位', visible: true, align: 'center',slot:'cp_nldw1', width: 70 },
|
||||
{ prop: 'nl2', label: '年龄上限', visible: true, align: 'center',slot: 'cp_nl2', width: 100 },
|
||||
{ prop: 'cp_nldw2', label: '年龄单位', visible: true, align: 'center',slot: 'cp_nldw2', width: 100 },
|
||||
{ prop: 'bblx', label: '标本类型', visible: true, align: 'center',slot: 'bblx', width: 100 },
|
||||
{ prop: 'slzq', label: '生理周期', visible: true, align: 'center',slot: 'slzq', width: 100 },
|
||||
{ prop: 'zd', label: '诊断', visible: true, align: 'center',slot:'zd', width: 100 },
|
||||
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center',slot:'ckxx', width: 100 },
|
||||
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot:'cksx', width: 100 },
|
||||
{ prop: 'alterxx', label: '危急值下限', visible: true, align: 'center',slot:'alterxx', width: 100 },
|
||||
{ prop: 'altersx', label: '危急值上限', visible: true, align: 'center',slot:'altersx', width: 100 },
|
||||
{ prop: 'dyck', label: '参考值', visible: true, align: 'center',slot:'dyck', width: 100 },
|
||||
{ prop: 'xb', label: '性别', visible: true, align: 'center', slot: 'xb', width: 70 },
|
||||
{ prop: 'nl1', label: '年龄下限', visible: true, align: 'center', slot: 'nl1', width: 70 },
|
||||
{ prop: 'nldw', label: '年龄单位', visible: true, align: 'center', slot: 'cp_nldw1', width: 70 },
|
||||
{ prop: 'nl2', label: '年龄上限', visible: true, align: 'center', slot: 'nl2', width: 70 },
|
||||
{ prop: 'nldw', label: '年龄单位', visible: true, align: 'center', slot: 'cp_nldw2', width: 70 },
|
||||
{ prop: 'bblx', label: '标本类型', visible: true, align: 'center', slot: 'bblx', width: 100 },
|
||||
{ prop: 'slzq', label: '生理周期', visible: true, align: 'center', slot: 'slzq', width: 100 },
|
||||
{ prop: 'zd', label: '诊断', visible: true, align: 'center', slot: 'zd', width: 100 },
|
||||
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center', slot: 'ckxx', width: 100 },
|
||||
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center', slot: 'cksx', width: 100 },
|
||||
{ prop: 'alterxx', label: '危急值下限', visible: true, align: 'center', slot: 'alterxx', width: 100 },
|
||||
{ prop: 'altersx', label: '危急值上限', visible: true, align: 'center', slot: 'altersx', width: 100 },
|
||||
{ prop: 'dyck', label: '参考值', visible: true, align: 'center', slot: 'dyck', width: 100 },
|
||||
]);
|
||||
const columnsDown = ref([
|
||||
{ prop: 'xb', label: '性别', visible: true, align: 'center',slot: 'xb', width: 100 },
|
||||
{ prop: 'xb', label: '性别', visible: true, align: 'center', slot: 'xb', width: 100 },
|
||||
{ prop: 'cp_nl1', label: '年龄下限', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'cp_nldw1', label: '年龄单位', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'cp_nl2', label: '年龄上限', visible: true, align: 'center', width: 100 },
|
||||
@ -180,16 +155,12 @@ const handleColumnDragEnd = (data: any) => {
|
||||
|
||||
//序号最大值
|
||||
const maxXh = computed(() => {
|
||||
return dataListUp.value.length > 0 ? Math.max(...dataListUp.value.map((item:any) => item.xh || 0)) : 0;
|
||||
return modelParam.value.referenceValueDetailsData.length > 0 ? Math.max(...modelParam.value.referenceValueDetailsData.map((item: any) => item.xh || 0)) : 0;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
dataListUp.value = [...newVal.referenceValueDetailsData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const updateDyck = (row: any) => {
|
||||
row.dyck = !row.ckxx && !row.cksx ? '' : `${row.ckxx}--${row.cksx}`;
|
||||
}
|
||||
|
||||
const onAddClick = () => {
|
||||
const newData = {
|
||||
@ -197,33 +168,28 @@ const onAddClick = () => {
|
||||
yq: '0',
|
||||
xh: maxXh.value + 1
|
||||
}
|
||||
dataListUp.value.push(newData)
|
||||
modelParam.value.referenceValueDetailsData.push(newData)
|
||||
}
|
||||
|
||||
const onDelClick = async () => {
|
||||
console.log('删除',selectRow.value)
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',
|
||||
{ confirmButtonText: 'OK',cancelButtonText: 'Cancel',type: 'warning',});
|
||||
dataListUp.value = dataListUp.value.filter((item:any) => item.xh !== selectRow.value.xh)
|
||||
if (selectRow.value) {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?', '警告',
|
||||
{ confirmButtonText: 'OK', cancelButtonText: 'Cancel', type: 'warning', });
|
||||
emit('refreshTabData', modelParam.value.basicData)
|
||||
}
|
||||
}
|
||||
|
||||
const rowClick = (row:any) => {
|
||||
const rowClick = (row: any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
onActivated( async ()=>{
|
||||
onActivated(async () => {
|
||||
//加载字典数据
|
||||
await getDictData('BT','SLZQ')
|
||||
await getDictData('BT', 'SLZQ')
|
||||
bblxOptions.value = dictData.value.BT || []
|
||||
optionsSLZQ.value = dictData.value.SLZQ || []
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
referenceValueDetailsData: dataListUp
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -1,32 +1,32 @@
|
||||
<template>
|
||||
<!-- 使用仪器 -->
|
||||
<div>
|
||||
<!-- 使用仪器 -->
|
||||
<div>
|
||||
<el-button type="primary" @click="onClickAdd">新增</el-button>
|
||||
<el-button type="primary" @click="onClickDel">删除</el-button>
|
||||
<div>
|
||||
<el-button type="primary" @click="onClickAdd">新增</el-button>
|
||||
<el-button type="primary" @click="onClickDel">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="modelParam.userInstrData" :columns="columns" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" :config="tableConfig" @row-click="onRowClick">
|
||||
<template #yq="{ row }">
|
||||
<YQSelectTable v-model:data="row.yq" placeholder="请输入仪器名称" />
|
||||
</template>
|
||||
<template #xs="{ row }">
|
||||
<el-input v-model="row.xs" class="full-width-input" />
|
||||
</template>
|
||||
<template #zkxm="{ row }">
|
||||
<el-checkbox :checked="row.zkxm === '1'" @change="(val: any) => row.zkxm = val ? 1 : 0" />
|
||||
</template>
|
||||
<template #ckxx="{ row }">
|
||||
<el-input v-model="row.ckxx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cksx="{ row }">
|
||||
<el-input v-model="row.cksx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #dyckz="{ row }">
|
||||
<el-input :model-value="getDyckz(row)" disabled class="full-width-input"></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="yqList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-click="onRowClick">
|
||||
<template #yq="{row}">
|
||||
<YQSelectTable v-model:data="row.yq" placeholder="请输入仪器名称"/>
|
||||
</template>
|
||||
<template #xs="{row}">
|
||||
<el-input v-model="row.xs" class="full-width-input"/>
|
||||
</template>
|
||||
<template #zkxm="{row}">
|
||||
<el-checkbox :checked="row.zkxm === '1'" @change="(val:any) => row.zkxm = val ? 1 : 0" />
|
||||
</template>
|
||||
<template #ckxx="{row}">
|
||||
<el-input v-model="row.ckxx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cksx="{row}">
|
||||
<el-input v-model="row.cksx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #dyckz="{row}">
|
||||
<el-input :model-value="getDyckz(row)" disabled class="full-width-input"></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -34,30 +34,20 @@
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { XmInfoVs } from '@/types';
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
|
||||
import {ElMessageBox} from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { deleteXmInfoVs } from '@/api/liswork/labItem/labItemApi';
|
||||
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// required: false,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
//const yq = ref<string>('');
|
||||
const tableRef = ref<any>();
|
||||
const yqList = ref<Array<XmInfoVs>>([]);
|
||||
const columns = ref([
|
||||
{ prop: 'vsid', label: '对照编码', visible: false, align: 'center' },
|
||||
{ prop: 'yq', label: '仪器代号', visible: true, align: 'center', slot: 'yq', width: 150 },
|
||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', slot: 'xs', width: 100 },
|
||||
{ prop: 'zkxm', label: '质控', visible: true, align: 'center', slot: 'zkxm', width: 40 },
|
||||
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center',slot: 'ckxx', width: 100 },
|
||||
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot: 'cksx', width: 100 },
|
||||
{ prop: 'dyckz', label: '打印参考值', visible: true, align: 'center',slot: 'dyckz', width: 100 },
|
||||
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center', slot: 'ckxx', width: 100 },
|
||||
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center', slot: 'cksx', width: 100 },
|
||||
{ prop: 'dyckz', label: '打印参考值', visible: true, align: 'center', slot: 'dyckz', width: 100 },
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
@ -70,14 +60,6 @@ const selectRow = ref<XmInfoVs>({
|
||||
xmid: 0
|
||||
})
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
yqList.value = [...newVal.userInstrData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
//退拽属性
|
||||
@ -87,12 +69,7 @@ const handleColumnDragEnd = (data: any) => {
|
||||
}
|
||||
|
||||
const handInputChange = () => {
|
||||
// yqList.value = yqList.value.filter(item => {
|
||||
// return item.yq.includes(yq.value) || item.yqmc.includes(yq.value);
|
||||
// });
|
||||
// if (yq.value === '') {
|
||||
// yqList.value = props.dataList;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
const onClickAdd = () => {
|
||||
@ -100,19 +77,19 @@ const onClickAdd = () => {
|
||||
yq: '',
|
||||
xmid: modelParam.value.basicData.xmid,
|
||||
}
|
||||
yqList.value.push(newData)
|
||||
modelParam.value.userInstrData.push(newData)
|
||||
}
|
||||
|
||||
const onClickDel = async () => {
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','Warning',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
await deleteXmInfoVs({vsid:selectRow.value.vsid || 0})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
if (selectRow.value) {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?', 'Warning',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
await deleteXmInfoVs({ vsid: selectRow.value.vsid || 0 })
|
||||
emit('refreshTabData', modelParam.value.basicData)
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,20 +98,16 @@ const onRowClick = (row: any) => {
|
||||
}
|
||||
|
||||
const getDyckz = (row: XmInfoVs) => {
|
||||
if(!row.cksx && !row.ckxx){
|
||||
return '';
|
||||
}else{
|
||||
if (!row.cksx && !row.ckxx) {
|
||||
return '';
|
||||
} else {
|
||||
return `${row.ckxx || ''}--${row.cksx || ''}`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onActivated(() =>{
|
||||
onActivated(() => {
|
||||
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
userInstrData: yqList
|
||||
})
|
||||
|
||||
</script>
|
||||
273
src/views/liswork/micro/components/searchListFrom.vue
Normal file
273
src/views/liswork/micro/components/searchListFrom.vue
Normal file
@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<el-popover :visible="selectVisible" placement="bottom" :width="'18vw'" @after-enter="initClickOutside">
|
||||
<el-form :model="queryParams" class="query-form" label-width="5.625rem">
|
||||
<!-- 病人类型选择 -->
|
||||
<el-form-item label="病人类型:" prop="brly">
|
||||
<el-select v-model="queryParams.brly" placeholder="全部" clearable>
|
||||
<el-option v-for="item in brlyOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="药敏:" prop="finish">
|
||||
<el-radio-group v-model="queryParams.finish" @change="handleRadioChange">
|
||||
<el-radio value="1" @click.native="handleRadioClick('1', 'finish')">已完成</el-radio>
|
||||
<el-radio value="0" @click.native="handleRadioClick('0', 'finish')">未完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 审核状态选择 -->
|
||||
<el-form-item label="审核状态:" prop="jgbz">
|
||||
<el-radio-group v-model="queryParams.jgbz" @change="handleRadioChange">
|
||||
<el-radio value="2" @click.native="handleRadioClick('2', 'jgbz')">已审核</el-radio>
|
||||
<el-radio value="3" @click.native="handleRadioClick('3', 'jgbz')">初报</el-radio>
|
||||
<el-radio value="4" @click.native="handleRadioClick('4', 'jgbz')">二报</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<!-- 危急值选择 -->
|
||||
<el-form-item prop="alarmflag" label-width="0">
|
||||
<el-checkbox v-model="queryParams.alarmflag" true-value="1" false-value=""> 警 </el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- 急诊选择 -->
|
||||
<el-form-item prop="jzbz" label-width="0">
|
||||
<el-checkbox v-model="queryParams.jzbz" true-value="1" false-value=""> 急诊 </el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 打印状态选择 -->
|
||||
<el-form-item label="打印状态:" prop="dybz">
|
||||
<el-radio-group v-model="queryParams.dybz" @chnage="handleRadioChange">
|
||||
<el-radio value="1" @click.native="handleRadioClick('1', 'dybz')">已打印</el-radio>
|
||||
<el-radio value="0" @click.native="handleRadioClick('0', 'dybz')">未打印</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery" :size="props.size">确认查询</el-button>
|
||||
<el-button @click="handleReset" style="margin-left: 0.5rem" :size="props.size">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #reference>
|
||||
<el-input v-model="selectShowValue" :size="props.size" @clear="clearHandle"
|
||||
@click="selectVisible = !selectVisible" :placeholder="props.placeholder" readonly
|
||||
:style="{ width: props.width }" suffix-icon="ArrowDown" :clearable="props.clearable" />
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, defineProps, defineEmits, nextTick, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
// 定义下拉选项类型
|
||||
interface OptionItem {
|
||||
label: string
|
||||
value: string | number
|
||||
}
|
||||
|
||||
// 定义查询参数类型
|
||||
interface QueryParams {
|
||||
brly?: string | number
|
||||
jgbz?: string | number
|
||||
dybz?: string | number
|
||||
alarmflag?: string | number
|
||||
jzbz?: string | number
|
||||
finish?: string | number
|
||||
autojgbz?: string | number
|
||||
}
|
||||
|
||||
// 定义组件Props
|
||||
const props = defineProps<{
|
||||
// 可传入初始查询参数
|
||||
initialParams?: Partial<QueryParams>,
|
||||
// 宽度
|
||||
width?: string,
|
||||
// 是否禁用
|
||||
disabled?: boolean,
|
||||
// 是否可清空
|
||||
clearable?: boolean,
|
||||
// 是否显示查询按钮
|
||||
showQueryButton?: boolean,
|
||||
// 是否显示重置按钮
|
||||
showResetButton?: boolean,
|
||||
// 尺寸
|
||||
size?: 'large' | 'default' | 'small',
|
||||
// 占位符
|
||||
placeholder?: string,
|
||||
dictData?: any
|
||||
}>()
|
||||
|
||||
|
||||
watch(() => props.dictData, () => {
|
||||
brlyOptions.value = props.dictData.PT
|
||||
optionMaps.brly = props.dictData.PT
|
||||
})
|
||||
|
||||
// 定义组件事件
|
||||
const emit = defineEmits<{
|
||||
// 查询事件,返回查询参数
|
||||
(e: 'query', params: QueryParams): void
|
||||
// 重置事件
|
||||
(e: 'reset'): void
|
||||
}>()
|
||||
const selectVisible = ref(false)
|
||||
const selectShowValue = ref('')
|
||||
const selectRef = ref()
|
||||
// 病人类型选项
|
||||
const brlyOptions = ref<OptionItem[]>([])
|
||||
// 审核状态选项
|
||||
const jgbzOptions: OptionItem[] = [
|
||||
{ label: '已审核', value: 2 },
|
||||
{ label: '初报', value: 3 },
|
||||
{ label: '二报', value: 4 },
|
||||
]
|
||||
|
||||
// 打印状态选项
|
||||
const dybzOptions: OptionItem[] = [
|
||||
{ label: '未打印', value: 0 },
|
||||
{ label: '已打印', value: 1 },
|
||||
]
|
||||
|
||||
// 危急值选项
|
||||
const alarmflagOptions: OptionItem[] = [
|
||||
{ label: '危急值', value: 1 },
|
||||
{ label: '无', value: 0 }
|
||||
]
|
||||
|
||||
// 急诊选项
|
||||
const emergencyOptions: OptionItem[] = [
|
||||
{ label: '急诊', value: 1 },
|
||||
{ label: '否', value: 0 }
|
||||
]
|
||||
|
||||
// 完成状态选项
|
||||
const finishOptions: OptionItem[] = [
|
||||
{ label: '未完成', value: 0 },
|
||||
{ label: '已完成', value: 1 },
|
||||
]
|
||||
|
||||
// 自审状态选项
|
||||
const autojgbzOptions: OptionItem[] = [
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '自审', value: 1 },
|
||||
]
|
||||
|
||||
|
||||
// 创建选项映射关系,方便查找label
|
||||
const optionMaps = {
|
||||
brly: props.dictData.PT,
|
||||
jgbz: jgbzOptions,
|
||||
dybz: dybzOptions,
|
||||
alarmflag: alarmflagOptions,
|
||||
jzbz: emergencyOptions,
|
||||
finish: finishOptions,
|
||||
autojgbz: autojgbzOptions
|
||||
}
|
||||
|
||||
// 查询参数
|
||||
const queryParams = ref<QueryParams>({
|
||||
...props.initialParams
|
||||
})
|
||||
|
||||
// 由于更多按钮在 app 元素内,给 app 元素注册的点击事件必须在弹出框显示后并且是一次性的
|
||||
// 防止更多按钮的事件与之冲突
|
||||
const initClickOutside = () => {
|
||||
document.getElementById('app')!.addEventListener('click', () => {
|
||||
selectVisible.value = false
|
||||
}, { once: true })
|
||||
}
|
||||
|
||||
// 记录上一次选中的值
|
||||
const lastRadioValue = ref<string | undefined>(undefined);
|
||||
const handleRadioChange = (value: string) => {
|
||||
lastRadioValue.value = value;
|
||||
};
|
||||
const handleRadioClick = (value: string, zd: keyof QueryParams) => {
|
||||
if (value === lastRadioValue.value) {
|
||||
setTimeout(() => {
|
||||
queryParams.value[zd] = undefined;
|
||||
lastRadioValue.value = undefined;
|
||||
}, 100);
|
||||
} else {
|
||||
lastRadioValue.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const clearHandle = () => {
|
||||
queryParams.value = {}
|
||||
selectShowValue.value = ''
|
||||
}
|
||||
|
||||
// 根据值和选项列表获取对应的label
|
||||
const getLabelByValue = (value: string | number | undefined, options: OptionItem[]) => {
|
||||
if (value === undefined || value === null || value === '') return ''
|
||||
const item = options.find(option => option.value == value)
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
// 处理查询
|
||||
const handleQuery = () => {
|
||||
// 过滤空值参数
|
||||
const filteredParams = Object.fromEntries(
|
||||
Object.entries(queryParams.value).filter(([_, v]) => v !== undefined && v !== null && v !== '')
|
||||
) as QueryParams
|
||||
|
||||
// 收集所有选中项的label
|
||||
const labels: string[] = []
|
||||
Object.entries(filteredParams).forEach(([key, value]) => {
|
||||
// @ts-ignore
|
||||
const options = optionMaps[key]
|
||||
if (options) {
|
||||
const label = getLabelByValue(value, options)
|
||||
if (label) labels.push(label)
|
||||
}
|
||||
})
|
||||
|
||||
// 拼接label并设置到显示值
|
||||
selectShowValue.value = labels.join(',')
|
||||
console.log('selectShowValue.value==>', selectShowValue.value);
|
||||
|
||||
emit('query', filteredParams)
|
||||
|
||||
selectVisible.value = false;
|
||||
}
|
||||
|
||||
// 处理重置
|
||||
const handleReset = () => {
|
||||
selectShowValue.value = ''
|
||||
queryParams.value = {}
|
||||
selectVisible.value = false;
|
||||
emit('reset')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.query-form {
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 768px) {
|
||||
.query-form {
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -5,51 +5,40 @@
|
||||
<div class="box-shadow">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" :size="aotuSize" :rules="rules"
|
||||
class="compact-form">
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="" prop="ybh">
|
||||
<div class="next_box">
|
||||
<el-form-item label="" prop="ybh">
|
||||
<div class="next_box">
|
||||
<el-button-group>
|
||||
<el-tooltip class="box-item" effect="dark" content="上一个" placement="top">
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowUpBold"
|
||||
@click="handlePrev"></el-button>
|
||||
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||
style="width:100%" />
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowDownBold"
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="下一个" placement="top">
|
||||
<el-button type="primary" class="jt_btn next_btn" :size="aotuSize" icon="ArrowDownBold"
|
||||
@click="handleNext"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="日期:" prop="jyrq">
|
||||
<el-date-picker v-model="ybJyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||
value-format="YYYY-MM-DD" :clearable="false" @change="jyrqChange" ref="datePickerRef"
|
||||
style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门:" prop="instrGroup">
|
||||
<SelectTable v-model:data="queryParams.instrGroup" :fields="instrGroupFields"
|
||||
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="9rem"
|
||||
placeholder="请选择部门" @getDataValue="handleinstrGroupChange" :clearable="false" :size="aotuSize" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="仪器:" prop="yq">
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc"
|
||||
value="yq" objKey="yq" :border="true" width="9rem" placeholder="请选择仪器" :clearable="false"
|
||||
:size="aotuSize" @getDataValue="yqHandleChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tooltip>
|
||||
</el-button-group>
|
||||
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||
style="width:14.5rem" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
</el-row>
|
||||
<el-form-item label="日期:" prop="jyrq">
|
||||
<el-date-picker v-model="ybJyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||
value-format="YYYY-MM-DD" :clearable="false" @change="jyrqChange" ref="datePickerRef"
|
||||
style="width:7.5rem" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item>
|
||||
<el-icon color="#3c80d9" size="20" style="margin-right: 10px;" class="cp">
|
||||
<Search @click="fetchlabPatList" />
|
||||
</el-icon>
|
||||
<el-icon color="#3c80d9" size="20" class="cp" @click="selectJob(labPat)">
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="部门:" prop="instrGroup">
|
||||
<SelectTable v-model:data="queryParams.instrGroup" :fields="instrGroupFields"
|
||||
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="9rem"
|
||||
placeholder="请选择部门" @getDataValue="handleinstrGroupChange" :clearable="false" :size="aotuSize" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="仪器:" prop="yq">
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc"
|
||||
value="yq" objKey="yq" :border="true" width="10rem" placeholder="请选择仪器" :clearable="false"
|
||||
:size="aotuSize" @getDataValue="yqHandleChange" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="8">
|
||||
@ -88,12 +77,20 @@
|
||||
<template v-if="activeTab == 'LabPatList'">
|
||||
<div class="flex-between">
|
||||
<div>
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" circle
|
||||
@click="fetchlabPatList"></el-button>
|
||||
<el-button type="danger" :size="aotuSize" icon="Delete" circle @click="delSampleHd"></el-button>
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" circle @click="handlePrev"></el-button>
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" circle
|
||||
@click="handleNext"></el-button>
|
||||
<el-tooltip class="box-item" effect="dark" content="刷新" placement="top">
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" circle
|
||||
@click="fetchlabPatList"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="删除" placement="top">
|
||||
<el-button type="danger" :size="aotuSize" icon="Delete" circle @click="delSampleHd"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="上一个" placement="top">
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" circle @click="handlePrev"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="下一个" placement="top">
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" circle
|
||||
@click="handleNext"></el-button>
|
||||
</el-tooltip>
|
||||
<PatientQueryForm :initial-params="initialParams" @query="handleQueryResult" @reset="handleReset"
|
||||
width="14rem" :size="aotuSize" placeholder="查询条件" :dict-data="dictData" :clearable="true" />
|
||||
<el-input v-model="searchText" clearable :size="aotuSize" @keyup.enter="searchQuery" class="ml10"
|
||||
@ -122,12 +119,11 @@
|
||||
<LabPatList ref="labPatListRef" :labPatList="labPatList" :loading="loading" @select="selectJob"
|
||||
:tableKey="{ ...queryParams, jyrq: ybJyrq }" :dictData="dictData" @search="searchJobs" />
|
||||
|
||||
<div class="button-group">
|
||||
<!-- <div class="button-group">
|
||||
<el-pagination v-model:current-page="queryParams.pageNum" v-model:page-size="queryParams.pageSize"
|
||||
:page-sizes="[300, 600, 1000]" :size="aotuSize" background
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
:page-sizes="[300, 600, 1000]" :size="aotuSize" background layout="total, sizes, prev, pager, next"
|
||||
:total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||
</div> -->
|
||||
</template>
|
||||
|
||||
<!-- tab栏 内容 -->
|
||||
@ -159,7 +155,7 @@ import tabView from '@/components/tabViews/index.vue';
|
||||
// @ts-ignore
|
||||
import iFrame from "@/components/iFrame/index.vue";
|
||||
import LabPatList from './labpatlist.vue';
|
||||
import History from '../components/history/index.vue'
|
||||
import History from '../components/wswHistory/index.vue'
|
||||
import OthersResult from '../components/othersResult/index.vue'
|
||||
import Reexamination from '../components/reexamination/index.vue'
|
||||
import Charge from '../components/charge/index.vue'
|
||||
@ -176,15 +172,15 @@ import Pyj from './labresult/pyj.vue';
|
||||
import Record from './labresult/record.vue';
|
||||
// @ts-ignore
|
||||
import { comDict } from '@/utils/dict'
|
||||
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
|
||||
import { wswsamplelistpage, sampleMedInfo, changepatjyrq } from "@/api/liswork/micro/index";
|
||||
import { queryLabResults, loadDefault, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
|
||||
import { wswsampleList, sampleMedInfo, changepatjyrq, wswsampleinfo } from "@/api/liswork/micro/index";
|
||||
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import BatchCode from '../work/components/batchCode.vue';
|
||||
import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber";
|
||||
import { useCommonStore } from '@/store/modules/commonStore';
|
||||
import { classCom } from '@/utils/classCom';
|
||||
import PatientQueryForm from '@/components/selectSearch/index.vue'
|
||||
import PatientQueryForm from './components/searchListFrom.vue'
|
||||
// @ts-ignore
|
||||
import { listUser } from '@/api/system/user.js'
|
||||
import dayjs from 'dayjs'
|
||||
@ -200,9 +196,9 @@ const queryParams = ref({
|
||||
instrGroup: '04',
|
||||
problemId: 0,
|
||||
days: -1,
|
||||
pageSize: 600,
|
||||
pageNum: 1,
|
||||
yhdh: ''
|
||||
yhdh: '',
|
||||
// pageSize: 600,
|
||||
// pageNum: 1,
|
||||
})
|
||||
|
||||
|
||||
@ -215,10 +211,10 @@ const wjs = ref(0)
|
||||
const activeTab = ref('LabPatList')
|
||||
const tabList = ref([
|
||||
{ label: '标本列表', value: 'LabPatList' },
|
||||
{ label: '结果图形', value: 'ResultGraph' },
|
||||
// { label: '结果图形', value: 'ResultGraph' },
|
||||
{ label: '历史对照', value: 'History' },
|
||||
{ label: '其他结果', value: 'OthersResult' },
|
||||
{ label: '结果复查', value: 'Reexamination' },
|
||||
// { label: '结果复查', value: 'Reexamination' },
|
||||
{ label: '收费信息', value: 'Charge' },
|
||||
{ label: '组合项目', value: 'Combination' },
|
||||
{ label: '临床意义', value: 'Clinical' },
|
||||
@ -268,6 +264,13 @@ const ybJyrq = ref('')
|
||||
watch(() => labPat.value, (newValue) => {
|
||||
queryParams.value.ybh = newValue.ybh;
|
||||
ybJyrq.value = newValue.jyrq;
|
||||
if (newValue.jgbz == '2') {
|
||||
activeName.value = 'first'
|
||||
}
|
||||
|
||||
if (newValue.jgbz == '0' || newValue.jgbz == '3' || newValue.jgbz == '4') {
|
||||
activeName.value = 'second'
|
||||
}
|
||||
}, { deep: true });
|
||||
|
||||
const checkUserRef = ref()
|
||||
@ -336,9 +339,8 @@ const searchQuery = () => {
|
||||
const searchStr = searchText.value.trim().toLowerCase();
|
||||
filterMhList = filterMhList.filter((item: any) => {
|
||||
// 处理 zjf大写转为小写
|
||||
const matchZjf = item.zjf && typeof item.zjf === 'string'
|
||||
? item.zjf.toLowerCase().includes(searchStr)
|
||||
: false; const matchBrxm = item.brxm && typeof item.brxm === 'string' && item.brxm.includes(searchStr);
|
||||
const matchZjf = item.zjf && typeof item.zjf === 'string' ? item.zjf.toLowerCase().includes(searchStr) : false;
|
||||
const matchBrxm = item.brxm && typeof item.brxm === 'string' && item.brxm.includes(searchStr);
|
||||
const matchSqh = item.sqh && typeof item.sqh === 'string' && item.sqh.includes(searchStr);
|
||||
return matchZjf || matchBrxm || matchSqh;
|
||||
});
|
||||
@ -481,7 +483,7 @@ const fetchLabPat = () => {
|
||||
yq: labInfo.value.yq,
|
||||
ybh: labInfo.value.ybh
|
||||
}
|
||||
queryLabPat(data).then((response: any) => {
|
||||
wswsampleinfo(data).then((response: any) => {
|
||||
labPat.value = response.data;
|
||||
})
|
||||
}
|
||||
@ -506,19 +508,25 @@ const handleQuery = () => {
|
||||
// queryParams.value = { ...queryParams.value };
|
||||
// 查找匹配的行
|
||||
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
|
||||
const row = labPatList.value[matchedIndex]
|
||||
|
||||
if (matchedIndex !== -1) {
|
||||
highlightRowIndex.value = matchedIndex;
|
||||
// 等待DOM更新后滚动到目标行
|
||||
nextTick(() => {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
});
|
||||
selectJob(row);
|
||||
} else {
|
||||
handleCreate()
|
||||
highlightRowIndex.value = -1;
|
||||
}
|
||||
// 查询样本信息是否存在
|
||||
wswsampleinfo(queryParams.value).then((response: any) => {
|
||||
if (response.data) {
|
||||
if (matchedIndex !== -1) {
|
||||
highlightRowIndex.value = matchedIndex;
|
||||
// 等待DOM更新后滚动到目标行
|
||||
nextTick(() => {
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(response.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
selectJob(response.data);
|
||||
} else {
|
||||
handleCreate()
|
||||
highlightRowIndex.value = -1;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@ -652,7 +660,7 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
|
||||
yq: updatedPat.yq.trim(),
|
||||
ybh: updatedPat.ybh,
|
||||
}
|
||||
queryLabPat(data).then((response: any) => {
|
||||
wswsampleinfo(data).then((response: any) => {
|
||||
if (response.code == 0) {
|
||||
labPat.value = response.data;
|
||||
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
|
||||
@ -693,28 +701,31 @@ const searchJobs = async (text: string, page: number, size: number) => {
|
||||
fetchlabPatList()
|
||||
}
|
||||
|
||||
const handleSizeChange = (size: number) => {
|
||||
queryParams.value.pageSize = size
|
||||
fetchlabPatList()
|
||||
}
|
||||
const handleCurrentChange = (page: number) => {
|
||||
queryParams.value.pageNum = page
|
||||
fetchlabPatList()
|
||||
}
|
||||
// const handleSizeChange = (size: number) => {
|
||||
// queryParams.value.pageSize = size
|
||||
// fetchlabPatList()
|
||||
// }
|
||||
// const handleCurrentChange = (page: number) => {
|
||||
// queryParams.value.pageNum = page
|
||||
// fetchlabPatList()
|
||||
// }
|
||||
|
||||
//载入样本列表(右边labpatlist.vue组件)
|
||||
const fetchlabPatList = () => {
|
||||
loading.value = true;
|
||||
wswsamplelistpage(queryParams.value).then((res: any) => {
|
||||
if (res.code == 200) {
|
||||
labPatList.value = res.rows;
|
||||
originalLabPatList.value = res.rows;
|
||||
total.value = res.total;
|
||||
wswsampleList(queryParams.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
labPatList.value = res.data;
|
||||
loading.value = false;
|
||||
if (res.rows.length > 0) {
|
||||
originalLabPatList.value = res.data;
|
||||
if (res.data.length > 0) {
|
||||
highlightRowIndex.value = 0;
|
||||
setTimeout(() => { labPatListRef.value.setCurrentRow(res.rows[0]) }, 10)
|
||||
selectJob(res.rows[0])
|
||||
setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]) }, 10)
|
||||
selectJob(res.data[0])
|
||||
} else {
|
||||
labInfo.value = {}
|
||||
labPat.value = {}
|
||||
zbLabResuts.value = []
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -852,7 +863,6 @@ const sendMessage = () => {
|
||||
border-radius: .75rem;
|
||||
padding: .5rem;
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.radio_box {
|
||||
@ -872,9 +882,19 @@ const sendMessage = () => {
|
||||
}
|
||||
|
||||
.compact-form {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #E1E9F7;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.el-form-item--default {
|
||||
margin-bottom: .3125rem !important;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
@keyup.enter="handleInputFocus" />
|
||||
<el-button type="primary" :size="aotuSize" @click="batchHandle">扫码</el-button>
|
||||
</div>
|
||||
<el-form :model="labPat" label-width="5rem" class="compact-form" label-position="right">
|
||||
<el-form :model="labPat" label-width="4.5rem" class="compact-form" label-position="right">
|
||||
<div :class="['sh_box', getColor(lastJgbz)]" v-if="lastJgbz != null && lastJgbz != 0 && lastJgbz != 'C'">
|
||||
<div class="text">{{ getLableType(lastJgbz) }}</div>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect" menu-width="200">
|
||||
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns"
|
||||
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="handleRowClick" size="small"
|
||||
:row-style="rowStyle" :cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
|
||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :row-style="rowStyle"
|
||||
:cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd">
|
||||
<!-- 完成状态列 -->
|
||||
<template #finish="{ row }">
|
||||
@ -40,10 +41,6 @@
|
||||
{{ formatDict(row.yhdh, 'SRD') }}
|
||||
</template>
|
||||
|
||||
<template #autojgbz="{ row }">
|
||||
<el-checkbox :model-value="row.autojgbz === '1'" readonly />
|
||||
</template>
|
||||
|
||||
<template #dybz="{ row }">
|
||||
<el-checkbox :model-value="row.dybz === '1'" readonly />
|
||||
</template>
|
||||
@ -255,7 +252,7 @@ defineExpose({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.table-container {
|
||||
height: 72vh;
|
||||
height: 75vh;
|
||||
|
||||
.form-box {
|
||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||
|
||||
@ -202,21 +202,28 @@ const erInfo = ref<any>({})
|
||||
|
||||
const mbStore = useCommonStore();
|
||||
watch(labPat, (newVal: any) => {
|
||||
//获取结果列表
|
||||
getResultList()
|
||||
// 获取病人信息
|
||||
getLabPatInfo()
|
||||
if (newVal.ybh) {
|
||||
//获取结果列表
|
||||
getResultList()
|
||||
// 获取病人信息
|
||||
getLabPatInfo()
|
||||
} else {
|
||||
tableData.value = []
|
||||
tableData2.value = []
|
||||
cbInfo.value = {}
|
||||
erInfo.value = {}
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => tableData, (newValue) => {
|
||||
// 模板数据
|
||||
if (labPat.value.jgbz != null && labPat.value.jgbz != 0 && labPat.value.jgbz != 'C') return;
|
||||
if (cbInfo.value?.jgbz == 2 || erInfo.value?.jgbz == 2 || labPat.value.jgbz == 2) return;
|
||||
mbList(1)
|
||||
})
|
||||
|
||||
watch(() => tableData2, (newValue) => {
|
||||
// 模板数据
|
||||
if (labPat.value.jgbz != null && labPat.value.jgbz != 0 && labPat.value.jgbz != 'C') return;
|
||||
if (erInfo.value?.jgbz == 2 || labPat.value.jgbz == 2) return;
|
||||
mbList(2)
|
||||
})
|
||||
|
||||
|
||||
@ -189,6 +189,9 @@ const getbyjList = () => {
|
||||
watch(() => props.labPat, (newValue) => {
|
||||
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||
getbyjList()
|
||||
} else {
|
||||
tableData.value = []
|
||||
selectedRows.value = []
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -53,6 +53,8 @@ const getRecordList = () => {
|
||||
watch(() => props.labPat, (newValue) => {
|
||||
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||
getRecordList()
|
||||
} else {
|
||||
tableData.value = []
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="labPat.jgbz == 2"
|
||||
@click="pyMb">评语模板</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="handleTextarea">确定</el-button>
|
||||
@click="handleTextarea">保存</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="textarea = ''">清除</el-button>
|
||||
</template>
|
||||
@ -688,7 +688,7 @@ watch(labResutsData, (newVal: any) => {
|
||||
ymselectedRows.value = []
|
||||
}
|
||||
|
||||
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return;
|
||||
if (labPat.value.jgbz == 2) return;
|
||||
// console.log('mbStore==>', mbStore.lxsrs);
|
||||
if (mbStore.lxsrs.length > 0) {
|
||||
mbStore.lxsrs.forEach((mbmc) => {
|
||||
@ -714,7 +714,6 @@ watch(labResutsData, (newVal: any) => {
|
||||
|
||||
const handleTextarea = () => {
|
||||
if (!rowInfo.value.xmdh) return
|
||||
if (!textarea.value) return ElMessage.warning('请填写专家评语!')
|
||||
savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success('保存成功');
|
||||
@ -729,9 +728,9 @@ const rowHandle = (row: any) => {
|
||||
textarea.value = row.textresult
|
||||
|
||||
const data = {
|
||||
ybh: labPat.value.ybh,
|
||||
yq: labPat.value.yq,
|
||||
jyrq: labPat.value.jyrq,
|
||||
ybh: row.ybh,
|
||||
yq: row.yq,
|
||||
jyrq: row.jyrq,
|
||||
xmdh: row.xmdh
|
||||
}
|
||||
getresultmedList(data).then((res: any) => {
|
||||
@ -1053,6 +1052,7 @@ const formatJgbz = (v: string) => {
|
||||
|
||||
.el-radio {
|
||||
margin-right: .3125rem;
|
||||
height: 1.875rem;
|
||||
|
||||
:deep(.el-radio__label) {
|
||||
padding-left: 2px !important;
|
||||
|
||||
@ -5,51 +5,41 @@
|
||||
<div class="box-shadow">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" :size="aotuSize" :rules="rules"
|
||||
class="compact-form">
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="" prop="ybh">
|
||||
<div class="next_box">
|
||||
|
||||
<el-form-item label="" prop="ybh">
|
||||
<div class="next_box">
|
||||
<el-button-group>
|
||||
<el-tooltip class="box-item" effect="dark" content="上一个" placement="top">
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowUpBold"
|
||||
@click="handlePrev"></el-button>
|
||||
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||
style="width:100%" />
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowDownBold"
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="下一个" placement="top">
|
||||
<el-button type="primary" class="jt_btn next_btn" :size="aotuSize" icon="ArrowDownBold"
|
||||
@click="handleNext"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="日期:" prop="jyrq">
|
||||
<el-date-picker v-model="queryParams.jyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||
value-format="YYYY-MM-DD" :clearable="false" @change="fetchlabPatList"
|
||||
style="width:100%"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门:" prop="instrGroup">
|
||||
<SelectTable v-model:data="queryParams.instrGroup" :fields="instrGroupFields"
|
||||
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="9rem"
|
||||
placeholder="请选择部门" @getDataValue="handleinstrGroupChange" :clearable="false" :size="aotuSize" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="仪器:" prop="yq">
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc"
|
||||
value="yq" objKey="yq" :border="true" width="9rem" placeholder="请选择仪器" :clearable="false"
|
||||
:size="aotuSize" @getDataValue="yqHandleChange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tooltip>
|
||||
</el-button-group>
|
||||
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||
style="width:14.5rem" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
</el-row>
|
||||
<el-form-item label="日期:" prop="jyrq">
|
||||
<el-date-picker v-model="queryParams.jyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||
value-format="YYYY-MM-DD" :clearable="false" @change="fetchlabPatList"
|
||||
style="width:7.5rem"></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item>
|
||||
<el-icon color="#3c80d9" size="20" style="margin-right: 10px;" class="cp">
|
||||
<Search @click="fetchlabPatList" />
|
||||
</el-icon>
|
||||
<el-icon color="#3c80d9" size="20" class="cp" @click="selectJob(labPat)">
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="部门:" prop="instrGroup">
|
||||
<SelectTable v-model:data="queryParams.instrGroup" :fields="instrGroupFields"
|
||||
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="9rem"
|
||||
placeholder="请选择部门" @getDataValue="handleinstrGroupChange" :clearable="false" :size="aotuSize" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="仪器:" prop="yq">
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc"
|
||||
value="yq" objKey="yq" :border="true" width="10rem" placeholder="请选择仪器" :clearable="false"
|
||||
:size="aotuSize" @getDataValue="yqHandleChange" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="8">
|
||||
@ -73,12 +63,20 @@
|
||||
<template v-if="activeTab == 'LabPatList'">
|
||||
<div class="flex-between">
|
||||
<div>
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" circle
|
||||
@click="fetchlabPatList"></el-button>
|
||||
<el-button type="danger" :size="aotuSize" icon="Delete" circle @click="delSampleHd"></el-button>
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" circle @click="handlePrev"></el-button>
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" circle
|
||||
@click="handleNext"></el-button>
|
||||
<el-tooltip class="box-item" effect="dark" content="刷新" placement="top">
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" circle
|
||||
@click="fetchlabPatList"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="删除" placement="top">
|
||||
<el-button type="danger" :size="aotuSize" icon="Delete" circle @click="delSampleHd"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="上一个" placement="top">
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" circle @click="handlePrev"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="下一个" placement="top">
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" circle
|
||||
@click="handleNext"></el-button>
|
||||
</el-tooltip>
|
||||
<PatientQueryForm :initial-params="initialParams" @query="handleQueryResult" @reset="handleReset"
|
||||
width="14rem" :size="aotuSize" placeholder="查询条件" :dict-data="dictData" :clearable="true" />
|
||||
<el-input v-model="searchText" clearable :size="aotuSize" @keyup.enter="searchQuery" class="ml10"
|
||||
@ -228,9 +226,8 @@ const searchQuery = () => {
|
||||
const searchStr = searchText.value.trim().toLowerCase();
|
||||
filterMhList = filterMhList.filter((item: any) => {
|
||||
// 处理 zjf大写转为小写
|
||||
const matchZjf = item.zjf && typeof item.zjf === 'string'
|
||||
? item.zjf.toLowerCase().includes(searchStr)
|
||||
: false; const matchBrxm = item.brxm && typeof item.brxm === 'string' && item.brxm.includes(searchStr);
|
||||
const matchZjf = item.zjf && typeof item.zjf === 'string' ? item.zjf.toLowerCase().includes(searchStr) : false;
|
||||
const matchBrxm = item.brxm && typeof item.brxm === 'string' && item.brxm.includes(searchStr);
|
||||
const matchSqh = item.sqh && typeof item.sqh === 'string' && item.sqh.includes(searchStr);
|
||||
return matchZjf || matchBrxm || matchSqh;
|
||||
});
|
||||
@ -399,22 +396,27 @@ const handleQuery = () => {
|
||||
return;
|
||||
}
|
||||
queryParams.value = { ...queryParams.value };
|
||||
|
||||
|
||||
// 查找匹配的行
|
||||
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
|
||||
const row = labPatList.value[matchedIndex]
|
||||
|
||||
if (matchedIndex !== -1) {
|
||||
highlightRowIndex.value = matchedIndex;
|
||||
// 等待DOM更新后滚动到目标行
|
||||
nextTick(() => {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
});
|
||||
selectJob(row);
|
||||
} else {
|
||||
handleCreate()
|
||||
highlightRowIndex.value = -1;
|
||||
}
|
||||
|
||||
// 查询样本信息是否存在
|
||||
queryLabPat(queryParams.value).then((response: any) => {
|
||||
if (response.data) {
|
||||
highlightRowIndex.value = matchedIndex;
|
||||
// 等待DOM更新后滚动到目标行
|
||||
nextTick(() => {
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(response.data);
|
||||
}
|
||||
});
|
||||
selectJob(response.data);
|
||||
} else {
|
||||
handleCreate()
|
||||
highlightRowIndex.value = -1;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 创建新样本
|
||||
@ -729,9 +731,19 @@ const sendMessage = () => {
|
||||
}
|
||||
|
||||
.compact-form {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #E1E9F7;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.el-form-item--default {
|
||||
margin-bottom: .3125rem !important;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
@keyup.enter="handleInputFocus" />
|
||||
<el-button type="primary" :size="aotuSize" @click="batchHandle">扫码</el-button>
|
||||
</div>
|
||||
<el-form :model="labPat" label-width="5rem" class="compact-form" label-position="right">
|
||||
<el-form :model="labPat" label-width="4.5rem" class="compact-form" label-position="right">
|
||||
<div :class="['sh_box', getColor(lastJgbz)]" v-if="lastJgbz != null && lastJgbz != 0 && lastJgbz != 'C'">
|
||||
<div class="text">{{ getLableType(lastJgbz) }}</div>
|
||||
</div>
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect" menu-width="200">
|
||||
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns" :dict-data="dictData"
|
||||
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="handleRowClick" size="small"
|
||||
:row-style="rowStyle" :cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd">
|
||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :row-style="rowStyle" :cell-style="cellStyle"
|
||||
class="mytable-style" ref="tableRef" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
|
||||
<!-- 完成状态列 -->
|
||||
<template #finish="{ row }">
|
||||
<svg-icon v-if="row.finish == 1" icon-class="lvgou" />
|
||||
|
||||
@ -9,11 +9,10 @@
|
||||
@click="openItemDictDialog">新增</el-button>
|
||||
<el-button type="danger" :size="aotuSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0" plain
|
||||
@click="handleBatchDelete">删除</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" plain icon="Files" :size="aotuSize" @click="previewHandle(1)">打印</el-button>
|
||||
<el-button type="primary" plain icon="View" :size="aotuSize" @click="previewHandle(2)">预览</el-button>
|
||||
</div>
|
||||
<div> </div>
|
||||
</div>
|
||||
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect">
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user