项目模板/列表样式
This commit is contained in:
parent
56cb0013cf
commit
94b3568f19
@ -28,6 +28,7 @@
|
|||||||
"js-cookie": "3.0.5",
|
"js-cookie": "3.0.5",
|
||||||
"jsbarcode": "^3.12.1",
|
"jsbarcode": "^3.12.1",
|
||||||
"jsencrypt": "3.3.2",
|
"jsencrypt": "3.3.2",
|
||||||
|
"mitt": "^3.0.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"pinyin-pro": "^3.26.0",
|
"pinyin-pro": "^3.26.0",
|
||||||
|
|||||||
54
src/App.vue
54
src/App.vue
@ -1,15 +1,69 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="app-container" ref="appContainer">
|
||||||
|
<div class="app-content">
|
||||||
<router-view />
|
<router-view />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import useSettingsStore from '@/store/modules/settings'
|
import useSettingsStore from '@/store/modules/settings'
|
||||||
import { handleThemeStyle } from '@/utils/theme'
|
import { handleThemeStyle } from '@/utils/theme'
|
||||||
|
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
|
||||||
|
|
||||||
|
const appContainer = ref(null);
|
||||||
|
const appContent = ref(null);
|
||||||
|
|
||||||
|
// 设计稿基准尺寸
|
||||||
|
const baseWidth = 1920;
|
||||||
|
const baseHeight = 1080;
|
||||||
|
|
||||||
|
// 计算缩放比例并应用
|
||||||
|
const calcScale = () => {
|
||||||
|
if (!appContent.value) return;
|
||||||
|
|
||||||
|
// 当前窗口尺寸
|
||||||
|
const clientWidth = window.innerWidth;
|
||||||
|
const clientHeight = window.innerHeight;
|
||||||
|
|
||||||
|
// 计算宽高方向的缩放比例(取最小值,避免内容溢出)
|
||||||
|
const scaleX = clientWidth / baseWidth;
|
||||||
|
const scaleY = clientHeight / baseHeight;
|
||||||
|
const scale = Math.min(scaleX, scaleY);
|
||||||
|
|
||||||
|
// 应用缩放
|
||||||
|
appContent.value.style.transform = `scale(${scale})`;
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
calcScale(); // 初始化
|
||||||
|
window.addEventListener('resize', calcScale);
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 初始化主题样式
|
// 初始化主题样式
|
||||||
handleThemeStyle(useSettingsStore().theme)
|
handleThemeStyle(useSettingsStore().theme)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
window.removeEventListener('resize', calcScale);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-container {
|
||||||
|
/* 占满整个窗口 */
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
/* 避免缩放后出现滚动条 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-content {
|
||||||
|
/* 设计稿基准尺寸 */
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
margin: 0 auto;
|
||||||
|
/* 水平居中 */
|
||||||
|
transform-origin: top center;
|
||||||
|
/* 缩放原点(避免偏移) */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -257,6 +257,23 @@ export function inputmdl(query?: Object) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 项目模板输入结果
|
||||||
|
export function setinputmdl(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/liswork/setinputmdl',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 保存病人结果
|
||||||
|
export function saveResult(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkoper/saveresult',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取复查结果
|
// 获取复查结果
|
||||||
export function redoResult(query?: Object) {
|
export function redoResult(query?: Object) {
|
||||||
return request({
|
return request({
|
||||||
@ -282,3 +299,4 @@ export function getresultchangelog(query?: Object) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -292,6 +292,12 @@
|
|||||||
// 高亮
|
// 高亮
|
||||||
.vxe-table--render-default .vxe-body--row.row--current {
|
.vxe-table--render-default .vxe-body--row.row--current {
|
||||||
background-color: #a4beef !important;
|
background-color: #a4beef !important;
|
||||||
|
color: #FFF !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vxe-table--render-default .vxe-body--row.row--current .vxe-cell {
|
||||||
|
background-color: #a4beef !important;
|
||||||
|
color: #FFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 滚动条
|
// 滚动条
|
||||||
|
|||||||
@ -208,9 +208,8 @@ watch(() => props.data, (newVal) => {
|
|||||||
|
|
||||||
// 输入框键盘事件处理(专门处理上下键)
|
// 输入框键盘事件处理(专门处理上下键)
|
||||||
const handleInputKeydown = (e: KeyboardEvent) => {
|
const handleInputKeydown = (e: KeyboardEvent) => {
|
||||||
// 仅处理上下方向键
|
// 仅处理上下方向回车键
|
||||||
if (e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
|
if (!['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) return;
|
||||||
|
|
||||||
// 阻止事件冒泡到输入框父元素
|
// 阻止事件冒泡到输入框父元素
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
@ -229,6 +228,12 @@ const handleInputKeydown = (e: KeyboardEvent) => {
|
|||||||
const event = new KeyboardEvent('keydown', { key: e.key });
|
const event = new KeyboardEvent('keydown', { key: e.key });
|
||||||
tableContainer?.dispatchEvent(event);
|
tableContainer?.dispatchEvent(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 回车确认
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
const currentRow = filterData.value[currentIndex.value];
|
||||||
|
handleRowChange(currentRow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -214,11 +214,11 @@ defineExpose({
|
|||||||
|
|
||||||
// 表格边框
|
// 表格边框
|
||||||
:deep(.vxe-table--render-default.border--full .vxe-body--column) {
|
:deep(.vxe-table--render-default.border--full .vxe-body--column) {
|
||||||
background-image: linear-gradient(#96B8D9, #96B8D9), linear-gradient(#96B8D9, #96B8D9);
|
background-image: linear-gradient(#96B8D9, #96B8D9), linear-gradient(#96B8D9, #96B8D9) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表头边框
|
// 表头边框
|
||||||
:deep(.vxe-table--render-default.border--full .vxe-header--column) {
|
:deep(.vxe-table--render-default.border--full .vxe-header--column) {
|
||||||
background-image: linear-gradient(#1F6DD3, #1F6DD3), linear-gradient(#1F6DD3, #1F6DD3);
|
background-image: linear-gradient(#1F6DD3, #1F6DD3), linear-gradient(#1F6DD3, #1F6DD3) !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
13
src/store/modules/commonStore.ts
Normal file
13
src/store/modules/commonStore.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//公共状态管理
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
|
export const useCommonStore = defineStore('commonStore', {
|
||||||
|
state: () => ({
|
||||||
|
lxsrs: [] as string[], // 存储项目模板名称
|
||||||
|
}),
|
||||||
|
actions: {
|
||||||
|
setLxsrList(list: any[]) {
|
||||||
|
this.lxsrs = list
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
5
src/utils/mitt.ts
Normal file
5
src/utils/mitt.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// utils/mitt.ts
|
||||||
|
import mitt from "mitt"
|
||||||
|
const emitter = mitt()
|
||||||
|
|
||||||
|
export default emitter
|
||||||
@ -75,8 +75,8 @@ service.interceptors.request.use(config => {
|
|||||||
const s_time = sessionObj.time; // 请求时间
|
const s_time = sessionObj.time; // 请求时间
|
||||||
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
|
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
|
||||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||||
const message = '数据正在处理,请勿重复提交';
|
// const message = '数据正在处理,请勿重复提交';
|
||||||
console.warn(`[${s_url}]: ` + message)
|
// console.warn(`[${s_url}]: ` + message)
|
||||||
return Promise.reject(new Error(message))
|
return Promise.reject(new Error(message))
|
||||||
} else {
|
} else {
|
||||||
cache.session.setJSON('sessionObj', requestObj)
|
cache.session.setJSON('sessionObj', requestObj)
|
||||||
|
|||||||
@ -249,12 +249,12 @@ const loading = ref(true);
|
|||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
// 配置项
|
// 配置项
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ type: 'selection', visible: true, align: 'center', width: 40, label: '多选框' },
|
{ type: 'selection', visible: true, align: 'center', width: 35, label: '多选框' },
|
||||||
// { type: 'index', visible: true, align: 'center', width: 60, label: '序号' },
|
// { type: 'index', visible: true, align: 'center', width: 60, label: '序号' },
|
||||||
{ prop: 'zt', label: '印', visible: true, align: 'center', slot: 'dy', width: 20 },
|
{ prop: 'zt', label: '打印', visible: true, align: 'center', slot: 'dy', width: 40 },
|
||||||
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 20 },
|
{ prop: 'jzbz', label: '急', align: 'center', visible: true, slot: 'jzbz', width: 30 },
|
||||||
{ prop: 'ch', label: '床号', visible: true, align: 'center', width: 30 },//sortable: true,
|
{ prop: 'ch', label: '床号', visible: true, align: 'center', width: 40 },//sortable: true,
|
||||||
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, width: 40 },
|
{ prop: 'brxm', label: '姓名', align: 'center', visible: true, width: 50 },
|
||||||
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 30 },
|
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 30 },
|
||||||
{ prop: 'jymd', label: '项目名称', visible: true, width: 130 },
|
{ prop: 'jymd', label: '项目名称', visible: true, width: 130 },
|
||||||
{ prop: 'bgddhname', label: '类别', align: 'center', visible: true, width: 80 },
|
{ prop: 'bgddhname', label: '类别', align: 'center', visible: true, width: 80 },
|
||||||
@ -557,7 +557,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
// 字典格式化方法
|
// 字典格式化方法
|
||||||
const formatDict = (v: string, dictType: string) => {
|
const formatDict = (v: string, dictType: string) => {
|
||||||
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label;
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 计算table高度
|
// 计算table高度
|
||||||
|
|||||||
@ -134,10 +134,10 @@ const handleColumnDragEnd = (data: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const formatDict = (v: string, dictType: string) => {
|
const formatDict = (v: string, dictType: string) => {
|
||||||
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
}
|
}
|
||||||
const formatys = (v: string) => {
|
const formatys = (v: string) => {
|
||||||
return userList.value.find((item: any) => item.userName == v)?.nickName
|
return userList.value.find((item: any) => item.userName == v)?.nickName || v;
|
||||||
}
|
}
|
||||||
|
|
||||||
const getSummaries = ({ columns, data }: { columns: any, data: any }) => {
|
const getSummaries = ({ columns, data }: { columns: any, data: any }) => {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bination_box">
|
<div class="bination_box">
|
||||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig">
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig"
|
||||||
|
@row-dblclick="handleRowDblclick">
|
||||||
<template #lxsr="{ row }">
|
<template #lxsr="{ row }">
|
||||||
<el-checkbox :model-value="row.lxsr == '1'" readonly />
|
<el-checkbox v-model="row.lxsr" @change="changeLxsr(row)" />
|
||||||
</template>
|
</template>
|
||||||
<template #zdsr="{ row }">
|
<template #zdsr="{ row }">
|
||||||
<el-checkbox :model-value="row.zdsr == 'Y'" readonly />
|
<el-checkbox :model-value="row.zdsr == 'Y'" readonly />
|
||||||
@ -15,8 +16,8 @@
|
|||||||
import { ref, watch, toRefs, onMounted, computed } from 'vue'
|
import { ref, watch, toRefs, onMounted, computed } from 'vue'
|
||||||
import { inputmdl } from "@/api/liswork/work/LisWork";
|
import { inputmdl } from "@/api/liswork/work/LisWork";
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
|
import emitter from '@/utils/mitt'
|
||||||
|
import { useCommonStore } from '@/store/modules/commonStore';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 主键
|
// 主键
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -24,7 +25,7 @@ const props = defineProps({
|
|||||||
default: {}
|
default: {}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
const mbStore = useCommonStore();
|
||||||
const { queryParams } = toRefs(props);
|
const { queryParams } = toRefs(props);
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
@ -46,15 +47,28 @@ const tableConfig = ref({
|
|||||||
const getCombination = () => {
|
const getCombination = () => {
|
||||||
inputmdl(queryParams.value).then((res: any) => {
|
inputmdl(queryParams.value).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
tableData.value = res.data || []
|
tableData.value = res.data?.map((item: any) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
lxsr: mbStore.lxsrs.includes(item.mbmc) ? true : false,
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
watch(() => props.queryParams, (newValue) => {
|
watch(() => props.queryParams.yq, (newValue) => {
|
||||||
getCombination()
|
getCombination()
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|
||||||
// 解构 props
|
const changeLxsr = (row: any) => {
|
||||||
|
const lxsrs = tableData.value.filter((item: any) => item.lxsr).map((item: any) => item.mbmc);
|
||||||
|
console.log('lxsrs==>', lxsrs);
|
||||||
|
mbStore.setLxsrList(lxsrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowDblclick = (row: any) => {
|
||||||
|
emitter.emit('dbMbHandle', row);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<el-input v-model="labPat.ch" placeholder="请输入床号" @change="handleFieldChange" size="small" />
|
<el-input v-model="labPat.ch" placeholder="请输入床号" @change="handleFieldChange" size="small" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="样本类型">
|
<el-form-item label="样本类型">
|
||||||
<SelectTable v-model:data="labPat.yblx" :fields="ksdhFields" :tableData="dictData.DP || []" label="label"
|
<SelectTable v-model:data="labPat.yblx" :fields="ksdhFields" :tableData="dictData.BT || []" label="label"
|
||||||
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
||||||
@getDataValue="handleFieldChange" />
|
@getDataValue="handleFieldChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -14,24 +14,22 @@
|
|||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-form-item :label="v.zdts" v-if="v.kj == '1'">
|
<el-form-item :label="v.zdts" v-if="v.kj == '1'">
|
||||||
<SelectTable v-model:data="labPat[v.zdmc]" :fields="brlyFields" :dictType="v.dict" placeholder=""
|
<SelectTable v-model:data="labPat[v.zdmc]" :fields="brlyFields" :dictType="v.dict" placeholder=""
|
||||||
label="label" value="value" objKey="value" :border="true" size="small" @getDataValue="handleFieldChange"
|
label="label" value="value" objKey="value" :border="true" size="small"
|
||||||
:disabled="v.kybj == '0'" />
|
@getDataValue="handleFieldChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-checkbox v-model="labPat.jzbz" true-value="1" :disabled="v.kybj == '0'" class="check_box"> 急诊
|
<el-checkbox v-model="labPat.jzbz" true-value="1" class="check_box"> 急诊 </el-checkbox>
|
||||||
</el-checkbox>
|
<!-- :disabled="v.kybj == '0'" -->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item :label="v.zdts" v-if="v.kj == '1' && !v.dict && v.mrts != '年龄'">
|
<el-form-item :label="v.zdts" v-if="v.kj == '1' && !v.dict && v.mrts != '年龄'">
|
||||||
<el-input v-if="v.zdlb == '1'" v-model="labPat[v.zdmc]" @change="handleFieldChange" size="small"
|
<el-input v-if="v.zdlb == '1'" v-model="labPat[v.zdmc]" @change="handleFieldChange" size="small" />
|
||||||
:disabled="v.kybj == '0'" />
|
|
||||||
|
|
||||||
|
|
||||||
<el-date-picker v-if="v.zdlb == '3'" v-model="labPat[v.zdmc]" type="datetime" :disabled="v.kybj == '0'"
|
<el-date-picker v-if="v.zdlb == '3'" v-model="labPat[v.zdmc]" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
||||||
format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" @change="handleFieldChange" size="small"
|
value-format="YYYY-MM-DD HH:mm:ss" @change="handleFieldChange" size="small" style="width: 100%;" />
|
||||||
style="width: 100%;" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
@ -53,13 +51,11 @@
|
|||||||
|
|
||||||
<el-form-item :label="v.zdts" v-if="v.mrts == '检验医师' && v.kj == '1'">
|
<el-form-item :label="v.zdts" v-if="v.mrts == '检验医师' && v.kj == '1'">
|
||||||
<SelectTable v-model:data="labPat[v.zdmc]" :fields="ysFields" :tableData="userList || []" label="nickName"
|
<SelectTable v-model:data="labPat[v.zdmc]" :fields="ysFields" :tableData="userList || []" label="nickName"
|
||||||
value="userName" objKey="userName" :border="true" size="small" @getDataValue="getJyysData"
|
value="userName" objKey="userName" :border="true" size="small" @getDataValue="getJyysData" placeholder="" />
|
||||||
:disabled="v.kybj == '0'" placeholder="" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="v.zdts" v-if="v.mrts == '核对医师' && v.kj == '1'">
|
<el-form-item :label="v.zdts" v-if="v.mrts == '核对医师' && v.kj == '1'">
|
||||||
<SelectTable v-model:data="labPat[v.zdmc]" :fields="ysFields" :tableData="userList || []" label="nickName"
|
<SelectTable v-model:data="labPat[v.zdmc]" :fields="ysFields" :tableData="userList || []" label="nickName"
|
||||||
value="userName" objKey="userName" :border="true" size="small" @getDataValue="getHdysData"
|
value="userName" objKey="userName" :border="true" size="small" @getDataValue="getHdysData" placeholder="" />
|
||||||
:disabled="v.kybj == '0'" placeholder="" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -119,6 +115,7 @@ import SelectTable from '@/components/SelectTable/index.vue';
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { listUser } from '@/api/system/user.js'
|
import { listUser } from '@/api/system/user.js'
|
||||||
import { PropType } from 'vue';
|
import { PropType } from 'vue';
|
||||||
|
import emitter from '@/utils/mitt';
|
||||||
|
|
||||||
interface LabSysItem {
|
interface LabSysItem {
|
||||||
kj: string;
|
kj: string;
|
||||||
@ -152,9 +149,10 @@ const sqhRef = ref();
|
|||||||
watch(() => props.labPat, (newVal) => {
|
watch(() => props.labPat, (newVal) => {
|
||||||
lastValue.value = JSON.stringify(newVal);
|
lastValue.value = JSON.stringify(newVal);
|
||||||
lastJgbz.value = newVal.jgbz;
|
lastJgbz.value = newVal.jgbz;
|
||||||
|
sqhValue.value = '';
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:labPat', 'getLabList', 'changeStatus']);
|
const emit = defineEmits(['update:labPat', 'changeStatus']);
|
||||||
const lastValue = ref('');
|
const lastValue = ref('');
|
||||||
|
|
||||||
const brlyFields = ref([
|
const brlyFields = ref([
|
||||||
@ -250,6 +248,7 @@ const getHdysData = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用字段变化处理(失焦、回车触发)
|
* 通用字段变化处理(失焦、回车触发)
|
||||||
*/
|
*/
|
||||||
@ -258,6 +257,7 @@ const handleFieldChange = async () => {
|
|||||||
const currentValue = JSON.stringify(props.labPat);
|
const currentValue = JSON.stringify(props.labPat);
|
||||||
// 对比与上一次保存的值是否有变化
|
// 对比与上一次保存的值是否有变化
|
||||||
if (currentValue !== lastValue.value) {
|
if (currentValue !== lastValue.value) {
|
||||||
|
emitter.emit('saveLab');
|
||||||
// 找出变化的字段
|
// 找出变化的字段
|
||||||
const oldObj = JSON.parse(lastValue.value);
|
const oldObj = JSON.parse(lastValue.value);
|
||||||
const newObj = props.labPat;
|
const newObj = props.labPat;
|
||||||
@ -265,10 +265,21 @@ const handleFieldChange = async () => {
|
|||||||
if (changedField) {
|
if (changedField) {
|
||||||
// 这里可以添加实际的更新逻辑,比如调用接口
|
// 这里可以添加实际的更新逻辑,比如调用接口
|
||||||
try {
|
try {
|
||||||
|
saveLabPat(changedField)
|
||||||
|
} catch (error) {
|
||||||
|
console.error('更新失败:', error);
|
||||||
|
// 失败时可以恢复旧值
|
||||||
|
emit('update:labPat', oldObj);
|
||||||
|
lastValue.value = JSON.stringify(oldObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 保存病人信息
|
||||||
|
const saveLabPat = async (changedField: any) => {
|
||||||
if (props.labPat.id) {
|
if (props.labPat.id) {
|
||||||
updateLabPat({ ...props.labPatKey, ...props.labPat }).then((res: any) => {
|
updateLabPat({ ...props.labPatKey, ...props.labPat }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
emit('getLabList', newObj);
|
|
||||||
if (sqhFlag.value) {
|
if (sqhFlag.value) {
|
||||||
sqhValue.value = ''
|
sqhValue.value = ''
|
||||||
sqhRef.value.focus()
|
sqhRef.value.focus()
|
||||||
@ -276,7 +287,7 @@ const handleFieldChange = async () => {
|
|||||||
|
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
emit('update:labPat', res.data)
|
emit('update:labPat', res.data)
|
||||||
emit("changeStatus", props.labPat, sqhFlag.value);
|
emit("changeStatus", res.data, sqhFlag.value);
|
||||||
} else {
|
} else {
|
||||||
emit("changeStatus", props.labPat, sqhFlag.value);
|
emit("changeStatus", props.labPat, sqhFlag.value);
|
||||||
}
|
}
|
||||||
@ -284,6 +295,7 @@ const handleFieldChange = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
if (!changedField) return
|
||||||
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue }).then((res: any) => {
|
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (sqhFlag.value) {
|
if (sqhFlag.value) {
|
||||||
@ -303,14 +315,6 @@ const handleFieldChange = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error('更新失败:', error);
|
|
||||||
// 失败时可以恢复旧值
|
|
||||||
emit('update:labPat', oldObj);
|
|
||||||
lastValue.value = JSON.stringify(oldObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 完善字段变化检测方法
|
// 完善字段变化检测方法
|
||||||
@ -379,6 +383,11 @@ onMounted(() => {
|
|||||||
listUser(data).then((res: any) => {
|
listUser(data).then((res: any) => {
|
||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 监听保存病人结果
|
||||||
|
emitter.on('saveResult', () => {
|
||||||
|
saveLabPat(null)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns" :dict-data="dictData"
|
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns" :dict-data="dictData"
|
||||||
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="handleRowClick" size="small"
|
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="handleRowClick" size="small"
|
||||||
:cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
|
:row-style="rowStyle" :cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
|
||||||
@column-drag-end="handleColumnDragEnd">
|
@column-drag-end="handleColumnDragEnd">
|
||||||
<!-- 完成状态列 -->
|
<!-- 完成状态列 -->
|
||||||
<template #finish="{ row }">
|
<template #finish="{ row }">
|
||||||
@ -19,12 +19,18 @@
|
|||||||
<template #brly="{ row }">
|
<template #brly="{ row }">
|
||||||
{{ formatDict(row.brly, 'PT') }}
|
{{ formatDict(row.brly, 'PT') }}
|
||||||
</template>
|
</template>
|
||||||
|
<template #brxm="{ row }">
|
||||||
|
<span :style="{ color: row.jzbz == '1' ? '#f00' : '' }">{{ row.brxm }}</span>
|
||||||
|
</template>
|
||||||
<template #brxb="{ row }">
|
<template #brxb="{ row }">
|
||||||
{{ formatDict(row.brxb, 'SX') }}
|
{{ formatDict(row.brxb, 'SX') }}
|
||||||
</template>
|
</template>
|
||||||
<template #nldw="{ row }">
|
<template #nldw="{ row }">
|
||||||
{{ formatDict(row.nldw, 'AU') }}
|
{{ formatDict(row.nldw, 'AU') }}
|
||||||
</template>
|
</template>
|
||||||
|
<template #yblx="{ row }">
|
||||||
|
{{ formatDict(row.yblx, 'BT') }}
|
||||||
|
</template>
|
||||||
<template #ksdh="{ row }">
|
<template #ksdh="{ row }">
|
||||||
{{ formatDict(row.ksdh, 'DP') }}
|
{{ formatDict(row.ksdh, 'DP') }}
|
||||||
</template>
|
</template>
|
||||||
@ -54,6 +60,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, nextTick, onMounted } from 'vue'
|
import { ref, nextTick, onMounted } from 'vue'
|
||||||
import CommonTable from '@/components/vxeTable/index.vue'
|
import CommonTable from '@/components/vxeTable/index.vue'
|
||||||
|
import { color } from 'echarts'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
labPatList: {
|
labPatList: {
|
||||||
@ -84,14 +91,14 @@ const tableColumns = ref([
|
|||||||
{ field: 'autojgbz', title: '自', width: 20, align: 'center', slotName: 'autojgbz', resizable: true },
|
{ field: 'autojgbz', title: '自', width: 20, align: 'center', slotName: 'autojgbz', resizable: true },
|
||||||
{ field: 'brly', title: '类型', width: 50, align: 'center', slotName: 'brly', resizable: true },
|
{ field: 'brly', title: '类型', width: 50, align: 'center', slotName: 'brly', resizable: true },
|
||||||
{ field: 'ybh', title: '样本号', width: 45, align: 'center', resizable: true },
|
{ field: 'ybh', title: '样本号', width: 45, align: 'center', resizable: true },
|
||||||
{ field: 'brxm', title: '姓名', width: 40, align: 'center', resizable: true },
|
{ field: 'brxm', title: '姓名', width: 40, align: 'center', resizable: true, slotName: 'brxm' },
|
||||||
{ field: 'brdh', title: '病历号', width: 80, align: 'center', resizable: true },
|
{ field: 'brdh', title: '病历号', width: 80, align: 'center', resizable: true },
|
||||||
{ field: 'ch', title: '床号', width: 40, align: 'center', resizable: true },
|
{ field: 'ch', title: '床号', width: 40, align: 'center', resizable: true },
|
||||||
{ field: 'brxb', title: '性别', width: 30, align: 'center', slotName: 'brxb', resizable: true },
|
{ field: 'brxb', title: '性别', width: 30, align: 'center', slotName: 'brxb', resizable: true },
|
||||||
{ field: 'nl', title: '年', width: 30, align: 'center', resizable: true },
|
{ field: 'nl', title: '年', width: 30, align: 'center', resizable: true },
|
||||||
{ field: 'nldw', title: '龄', width: 20, align: 'center', slotName: 'nldw', resizable: true },
|
{ field: 'nldw', title: '龄', width: 20, align: 'center', slotName: 'nldw', resizable: true },
|
||||||
{ field: 'ksdh', title: '科室', width: 80, align: 'center', slotName: 'ksdh', resizable: true },
|
{ field: 'ksdh', title: '科室', width: 80, align: 'center', slotName: 'ksdh', resizable: true },
|
||||||
{ field: 'yblx', title: '标本', width: 50, align: 'center', resizable: true },
|
{ field: 'yblx', title: '标本', width: 50, align: 'center', resizable: true, slotName: 'yblx' },
|
||||||
{ field: 'dybz', title: '印', width: 20, align: 'center', slotName: 'dybz', resizable: true },
|
{ field: 'dybz', title: '印', width: 20, align: 'center', slotName: 'dybz', resizable: true },
|
||||||
{ field: 'fslx', title: '发送', width: 30, align: 'center', slotName: 'fslx', resizable: true },
|
{ field: 'fslx', title: '发送', width: 30, align: 'center', slotName: 'fslx', resizable: true },
|
||||||
{ field: 'shcs', title: '次数', width: 30, align: 'center', resizable: true },
|
{ field: 'shcs', title: '次数', width: 30, align: 'center', resizable: true },
|
||||||
@ -125,15 +132,38 @@ const clearCurrentRow = () => {
|
|||||||
|
|
||||||
const cellStyle = ({ row, column }: any) => {
|
const cellStyle = ({ row, column }: any) => {
|
||||||
if (column.title == "警" && row.alarmflag == 1) {
|
if (column.title == "警" && row.alarmflag == 1) {
|
||||||
return { background: '#f00 !important', color: '#FFF' };
|
return { background: '#f00 !important' };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (column.title == "审" && row.jgbz == '2') {
|
if (column.title == "审" && row.jgbz == '2') {
|
||||||
return { background: '#ffc0c0 !important', color: '#FFF' };
|
return { background: '#ffc0c0 !important' };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (column.title == "类型" && row.brly == '1') { //门诊
|
||||||
|
return { background: '#e9e930 !important' };
|
||||||
|
}
|
||||||
|
if (column.title == "类型" && row.brly == '3') { // 住院
|
||||||
|
return { background: '#8bdaf1 !important' };
|
||||||
|
}
|
||||||
|
if (column.title == "类型" && row.brly == '4') { //体检
|
||||||
|
return { background: '#9ae382 !important' };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const rowStyle = ({ row }: any) => {
|
||||||
|
if (row.dybz == '1') {
|
||||||
|
return { background: '#C0C0C0 !important' };
|
||||||
|
}
|
||||||
|
if (row.lstd == '1') {
|
||||||
|
return { background: '#ed4ced !important' };
|
||||||
|
}
|
||||||
|
if (row.jgbz == '2') {
|
||||||
|
return { background: '#C0FFC0 !important' };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 引入公共组件的字典格式化方法
|
// 引入公共组件的字典格式化方法
|
||||||
const formatDict = (v: string, dictType: string) => {
|
const formatDict = (v: string, dictType: string) => {
|
||||||
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label
|
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const row = props.labPatList.find((item: any) => item.ybh == props.tableKey.ybh)
|
const row = props.labPatList.find((item: any) => item.ybh == props.tableKey.ybh)
|
||||||
|
|||||||
@ -161,7 +161,7 @@
|
|||||||
import { ref, toRefs, watch, nextTick, onMounted } from "vue";
|
import { ref, toRefs, watch, nextTick, onMounted } from "vue";
|
||||||
import {
|
import {
|
||||||
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, queryXmInfo, deleteresult, changeresult,
|
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, queryXmInfo, deleteresult, changeresult,
|
||||||
newresult, queryXmVal, printListwork, getresultchangelog
|
newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult
|
||||||
} from "@/api/liswork/work/LisWork";
|
} from "@/api/liswork/work/LisWork";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
import ItemInput from "@/views/liswork/work/components/ItemInput.vue";
|
import ItemInput from "@/views/liswork/work/components/ItemInput.vue";
|
||||||
@ -171,6 +171,10 @@ import CustomTable from '@/components/elTable/index.vue'
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { listUser } from '@/api/system/user.js'
|
import { listUser } from '@/api/system/user.js'
|
||||||
|
import emitter from "@/utils/mitt";
|
||||||
|
import { useCommonStore } from "@/store/modules/commonStore";
|
||||||
|
import { set } from "@vueuse/core";
|
||||||
|
|
||||||
// 组件属性定义
|
// 组件属性定义
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
resultSysList: { type: Array, required: true },
|
resultSysList: { type: Array, required: true },
|
||||||
@ -185,6 +189,8 @@ const props = defineProps({
|
|||||||
const { tableData, tableKey, } = toRefs(props);
|
const { tableData, tableKey, } = toRefs(props);
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const lastjyrq = ref('');
|
const lastjyrq = ref('');
|
||||||
|
const mbStore = useCommonStore();
|
||||||
|
|
||||||
watch(() => props.tableData, (newVal) => {
|
watch(() => props.tableData, (newVal) => {
|
||||||
selectedRows.value = [];
|
selectedRows.value = [];
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
@ -195,6 +201,30 @@ watch(() => props.tableData, (newVal) => {
|
|||||||
lastjyrq.value = '上次结果'
|
lastjyrq.value = '上次结果'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return;
|
||||||
|
// console.log('mbStore==>', mbStore.lxsrs);
|
||||||
|
if (mbStore.lxsrs.length > 0) {
|
||||||
|
mbStore.lxsrs.forEach((mbmc) => {
|
||||||
|
const data = {
|
||||||
|
...tableKey.value,
|
||||||
|
mbmc: mbmc,
|
||||||
|
}
|
||||||
|
setinputmdl(data).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
const existingNames = new Set(tableData.value.map(item => item.xmdh))
|
||||||
|
res.data?.forEach(item => {
|
||||||
|
if (!existingNames.has(item.xmdh)) {
|
||||||
|
tableData.value.push(item)
|
||||||
|
existingNames.add(item.xmdh)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(() => props.resultSysList, (newVal) => {
|
watch(() => props.resultSysList, (newVal) => {
|
||||||
@ -601,8 +631,18 @@ const selectItem = (row) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const handleCsjgEnter = async (row) => {
|
const handleCsjgEnter = async (row) => {
|
||||||
|
// 判断数据中包含模板新增的数据 flag
|
||||||
|
if (tableData.value.length == 0) return
|
||||||
|
const flag = tableData.value.some(item => item.changeflag == 2)
|
||||||
|
if (flag) {
|
||||||
|
saveResult(tableData.value).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
emitter.emit('saveResult');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
if (row.id) {
|
if (row.id) {
|
||||||
|
emitter.emit('saveResult');
|
||||||
newresult(row).then(response => {
|
newresult(row).then(response => {
|
||||||
ElMessage.success("结果保存成功");
|
ElMessage.success("结果保存成功");
|
||||||
emits('fetchLabResults');
|
emits('fetchLabResults');
|
||||||
@ -622,6 +662,8 @@ const handleCsjgEnter = async (row) => {
|
|||||||
const input = document.activeElement;
|
const input = document.activeElement;
|
||||||
if (input.tagName === "INPUT") input.blur();
|
if (input.tagName === "INPUT") input.blur();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -790,6 +832,32 @@ onMounted(() => {
|
|||||||
listUser(data).then((res) => {
|
listUser(data).then((res) => {
|
||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 获取模板项目
|
||||||
|
emitter.on('dbMbHandle', (info) => {
|
||||||
|
// console.log('data==>', info);
|
||||||
|
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return ElMessage.warning('已审核结果不可添加模板项目');
|
||||||
|
const data = {
|
||||||
|
...tableKey.value,
|
||||||
|
mbmc: info.mbmc,
|
||||||
|
}
|
||||||
|
setinputmdl(data).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
const existingNames = new Set(tableData.value.map(item => item.xmdh))
|
||||||
|
res.data?.forEach(item => {
|
||||||
|
if (!existingNames.has(item.xmdh)) {
|
||||||
|
tableData.value.push(item)
|
||||||
|
existingNames.add(item.xmdh)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
handleCsjgEnter(null)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// 监听病人信息修改同时保存病人结果
|
||||||
|
emitter.on('saveLab', () => {
|
||||||
|
handleCsjgEnter(null)
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
const formatYs = (v) => {
|
const formatYs = (v) => {
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<el-row :gutter="5">
|
<el-row :gutter="5">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<LabPat ref="labPatRef" v-model:labPat="labPat" :labPatKey="queryParams" :labSysList="labInputcolList"
|
<LabPat ref="labPatRef" v-model:labPat="labPat" :labPatKey="queryParams" :labSysList="labInputcolList"
|
||||||
@getLabList="getLabList" @changeStatus="changeStatus" />
|
@changeStatus="changeStatus" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<LabResult ref="labResultRef" v-model:labPat="labPat" :tableData="labResuts" :tableKey="queryParams"
|
<LabResult ref="labResultRef" v-model:labPat="labPat" :tableData="labResuts" :tableKey="queryParams"
|
||||||
@ -142,6 +142,7 @@ import Clinical from './clinical/index.vue'
|
|||||||
import Sample from './sample/index.vue'
|
import Sample from './sample/index.vue'
|
||||||
import ResultGraph from './resultGraph/index.vue'
|
import ResultGraph from './resultGraph/index.vue'
|
||||||
import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber";
|
import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber";
|
||||||
|
import { useCommonStore } from '@/store/modules/commonStore';
|
||||||
|
|
||||||
|
|
||||||
const previewShow = ref(false);
|
const previewShow = ref(false);
|
||||||
@ -215,10 +216,11 @@ const handleinstrGroupChange = (val: any) => {
|
|||||||
// labPat.value = {}
|
// labPat.value = {}
|
||||||
getYqConfig()
|
getYqConfig()
|
||||||
}
|
}
|
||||||
|
const mbStore = useCommonStore();
|
||||||
const yqHandleChange = (val: any) => {
|
const yqHandleChange = (val: any) => {
|
||||||
labResuts.value = []
|
labResuts.value = []
|
||||||
labPat.value = {}
|
labPat.value = {}
|
||||||
|
mbStore.setLxsrList([]);
|
||||||
getSysList()
|
getSysList()
|
||||||
fetchlabPatList()
|
fetchlabPatList()
|
||||||
}
|
}
|
||||||
@ -327,11 +329,6 @@ const handleCreate = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLabList = (data: any) => {
|
|
||||||
labPatList.value.push(data)
|
|
||||||
setTimeout(() => { handleQuery(); }, 10)
|
|
||||||
getTotals()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除样本
|
// 删除样本
|
||||||
const delSampleHd = () => {
|
const delSampleHd = () => {
|
||||||
@ -422,11 +419,12 @@ const handleNext = () => {
|
|||||||
|
|
||||||
// 改变样本列表中样本状态
|
// 改变样本列表中样本状态
|
||||||
const changeStatus = (updatedPat: any, flag: boolean) => {
|
const changeStatus = (updatedPat: any, flag: boolean) => {
|
||||||
console.log('flag==>', flag, updatedPat);
|
console.log('changeStatusflag==>', flag, updatedPat);
|
||||||
queryLabPat(queryParams.value).then((response: any) => {
|
queryLabPat(queryParams.value).then((response: any) => {
|
||||||
if (response.code == 0) {
|
if (response.code == 0) {
|
||||||
labPat.value = response.data[0];
|
labPat.value = response.data[0];
|
||||||
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
|
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
|
||||||
|
console.log('index==>', index);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
labPatList.value = labPatList.value.map((item, i) =>
|
labPatList.value = labPatList.value.map((item, i) =>
|
||||||
i === index ? { ...labPat.value } : item
|
i === index ? { ...labPat.value } : item
|
||||||
@ -436,11 +434,27 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
labPatListRef.value.setCurrentRow(labPat.value);
|
labPatListRef.value.setCurrentRow(labPat.value);
|
||||||
});
|
});
|
||||||
// selectJob(labPat.value);
|
console.log('changeStatusflag==>', flag);
|
||||||
// 条码号输入后操作
|
// 条码号输入后操作
|
||||||
if (flag) {
|
if (flag) {
|
||||||
setTimeout(() => { handleNext() }, 10)
|
setTimeout(() => { handleNext() }, 10)
|
||||||
|
} else {
|
||||||
|
fetchLabResults()
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 条码号输入后操作
|
||||||
|
if (flag) {
|
||||||
|
setTimeout(() => { handleNext() }, 10)
|
||||||
|
} else {
|
||||||
|
fetchLabResults()
|
||||||
|
}
|
||||||
|
labPatList.value.push(labPat.value)
|
||||||
|
setTimeout(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
labPatListRef.value.setCurrentRow(labPat.value);
|
||||||
|
});
|
||||||
|
}, 10)
|
||||||
|
getTotals()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -506,10 +520,11 @@ const resultConfig = ref([])
|
|||||||
const getSysList = () => {
|
const getSysList = () => {
|
||||||
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != '年龄单位' || item.mrts != '!')
|
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != "年龄单位" && item.mrts != "!")
|
||||||
resultConfig.value = res.data.ResultConfig
|
resultConfig.value = res.data.ResultConfig
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mbStore.setLxsrList([]);
|
||||||
}
|
}
|
||||||
getSysList()
|
getSysList()
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@ -248,11 +248,11 @@ const handleRowClick = (row: any) => {
|
|||||||
|
|
||||||
|
|
||||||
const formatDict = (v: string, dictType: string) => {
|
const formatDict = (v: string, dictType: string) => {
|
||||||
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
}
|
}
|
||||||
|
|
||||||
const formatyq = (v: string) => {
|
const formatyq = (v: string) => {
|
||||||
return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc
|
return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc || v;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -539,7 +539,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
// 字典格式化方法
|
// 字典格式化方法
|
||||||
const formatDict = (v: string, dictType: string) => {
|
const formatDict = (v: string, dictType: string) => {
|
||||||
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label;
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -615,7 +615,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
// 字典格式化方法
|
// 字典格式化方法
|
||||||
const formatDict = (v: string, dictType: string) => {
|
const formatDict = (v: string, dictType: string) => {
|
||||||
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label;
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user