Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3
This commit is contained in:
commit
1e64b44b34
@ -44,7 +44,7 @@ export function changeresult(data?: Object) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改病人信息
|
//新建样本病人信息
|
||||||
export function updateLabPat(data?: Object) {
|
export function updateLabPat(data?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/lisworkoper/changepat',
|
url: '/lisworkoper/changepat',
|
||||||
@ -52,6 +52,7 @@ export function updateLabPat(data?: Object) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改病人信息
|
||||||
export function changepatcolumn(query?: Object) {
|
export function changepatcolumn(query?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/lisworkoper/changepatcolumn',
|
url: '/lisworkoper/changepatcolumn',
|
||||||
@ -159,4 +160,52 @@ export function printListwork(query?: Object) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 查询默认值
|
||||||
|
export function loadDefault(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkoper/loaddefault',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 历史对照
|
||||||
|
export function historyInfo(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkpageinfo/history',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 其他结果
|
||||||
|
export function otherinstr(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkpageinfo/otherinstr',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 收费信息
|
||||||
|
export function reqdetail(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkpageinfo/reqdetail',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取收费信息报告明细
|
||||||
|
export function reqdetailmx(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkpageinfo/reqdetailmx',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 左边form参数
|
||||||
|
export function instrdconfig(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/liswork/instrdconfig',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@ -200,6 +200,18 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-select__wrapper.is-disabled {
|
||||||
|
background-color: #ccc !important;
|
||||||
|
color: #000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input.is-disabled .el-input__wrapper {
|
||||||
|
background-color: #ccc !important;
|
||||||
|
color: #000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="select-table-container">
|
<div class="select-table-container">
|
||||||
<el-select ref="selectTable" v-model="selectShowValue" :placeholder="props.placeholder" :size="props.size"
|
<el-select ref="selectTable" v-model="selectShowValue" :placeholder="props.placeholder" :size="props.size"
|
||||||
:style="{ width: props.width }" @visible-change="visibleChange" @clear="clearHandle" clearable>
|
:style="{ width: props.width }" @visible-change="visibleChange" @clear="clearHandle" clearable
|
||||||
|
:disabled="disabled">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="select-table-dropdown">
|
<div class="select-table-dropdown">
|
||||||
<div style="text-align: left;">
|
<div style="text-align: left;">
|
||||||
@ -42,11 +43,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, onMounted, watch, nextTick } from "vue";
|
import { reactive, ref, onMounted, watch, nextTick, toRaw } from "vue";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { getFirstLetter } from '@/api/pinyin.js';
|
import { getFirstLetter } from '@/api/pinyin.js';
|
||||||
import { ElEmpty } from 'element-plus';
|
import { ElEmpty } from 'element-plus';
|
||||||
|
// @ts-ignore
|
||||||
|
import { comDict } from '@/utils/dict'
|
||||||
interface Field {
|
interface Field {
|
||||||
prop: string;
|
prop: string;
|
||||||
label: string;
|
label: string;
|
||||||
@ -57,7 +59,7 @@ interface Field {
|
|||||||
interface Props {
|
interface Props {
|
||||||
data: any;
|
data: any;
|
||||||
fields: Field[];
|
fields: Field[];
|
||||||
tableData: object[];
|
tableData?: object[];
|
||||||
label?: string;
|
label?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
objKey?: string;
|
objKey?: string;
|
||||||
@ -66,6 +68,8 @@ interface Props {
|
|||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
border?: boolean;
|
border?: boolean;
|
||||||
width?: string | number;
|
width?: string | number;
|
||||||
|
disabled?: boolean;
|
||||||
|
dictType?: string;
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
@ -75,6 +79,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
label: undefined,
|
label: undefined,
|
||||||
border: false,
|
border: false,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
dictType: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
@ -91,6 +96,12 @@ const filterData = ref<{ [key: string]: any; pinyinMap: Record<string, string> }
|
|||||||
// 存储预处理后的带拼音数据
|
// 存储预处理后的带拼音数据
|
||||||
const processedTableData = ref<{ [key: string]: any; pinyinMap: Record<string, string> }[]>([]);
|
const processedTableData = ref<{ [key: string]: any; pinyinMap: Record<string, string> }[]>([]);
|
||||||
const currentIndex = ref(-1);
|
const currentIndex = ref(-1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 字典数据存储
|
||||||
|
const dictData = ref<Record<string, any[]>>({});
|
||||||
// 预处理数据:生成拼音信息
|
// 预处理数据:生成拼音信息
|
||||||
const processTableData = (data: object[]) => {
|
const processTableData = (data: object[]) => {
|
||||||
return data.map((item: any) => {
|
return data.map((item: any) => {
|
||||||
@ -131,26 +142,68 @@ const visibleChange = (val: any) => {
|
|||||||
filterDataHandle()
|
filterDataHandle()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 数据回显处理
|
||||||
|
const handleDataEcho = () => {
|
||||||
|
if (props.data === null || props.data === undefined) {
|
||||||
|
selectShowValue.value = '';
|
||||||
|
emits('update:data', null);
|
||||||
|
// emits('getDataValue', null);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 查找匹配的行数据
|
||||||
|
let row: any = []
|
||||||
|
if (props.dictType) {
|
||||||
|
row = dictData.value[props.dictType]?.find((item: any) => props.objKey && item[props.objKey] === props.data)
|
||||||
|
} else if (props.tableData) {
|
||||||
|
row = props.tableData?.find((item: any) => props.objKey && item[props.objKey] === props.data)
|
||||||
|
}
|
||||||
|
selectShowValue.value = row ? (props.label ? row[props.label] : (props.value ? row[props.value] : '')) : '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
|
const initData = async () => {
|
||||||
|
if (props.tableData) {
|
||||||
|
// 如果传入tableData,直接使用
|
||||||
|
processedTableData.value = processTableData(props.tableData);
|
||||||
|
filterData.value = [...processedTableData.value];
|
||||||
|
} else if (props.dictType) {
|
||||||
|
// 如果传入dictType,通过comDict获取数据
|
||||||
|
const dictRefs = await comDict(props.dictType);
|
||||||
|
// // 从 ref 中获取实际数据
|
||||||
|
dictData.value = {
|
||||||
|
[props.dictType]: toRaw(dictRefs[props.dictType].value) || [],
|
||||||
|
};
|
||||||
|
processedTableData.value = processTableData(dictData.value[props.dictType]);
|
||||||
|
filterData.value = [...processedTableData.value];
|
||||||
|
}
|
||||||
|
// 处理数据回显
|
||||||
|
handleDataEcho();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初始化数据
|
||||||
|
initData();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
processedTableData.value = processTableData(props.tableData);
|
|
||||||
filterData.value = [...processedTableData.value];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听表格数据变化,重新处理
|
// 监听表格数据和字典类型变化
|
||||||
watch(() => props.tableData, (newVal) => {
|
watch(() => props.tableData, (newVal) => {
|
||||||
processedTableData.value = processTableData(newVal);
|
if (newVal) {
|
||||||
// 数据回显
|
processedTableData.value = processTableData(newVal);
|
||||||
handleDataEcho();
|
handleDataEcho();
|
||||||
|
}
|
||||||
}, { deep: true });
|
}, { deep: true });
|
||||||
|
|
||||||
|
|
||||||
// 监听绑定值数据变化,重新处理
|
// 监听绑定值数据变化,重新处理
|
||||||
watch(() => props.data, (newVal) => {
|
watch(() => props.data, (newVal) => {
|
||||||
// 数据回显
|
// 数据回显
|
||||||
handleDataEcho();
|
handleDataEcho();
|
||||||
}, { deep: true });
|
}, { deep: true });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 输入框键盘事件处理(专门处理上下键)
|
// 输入框键盘事件处理(专门处理上下键)
|
||||||
const handleInputKeydown = (e: KeyboardEvent) => {
|
const handleInputKeydown = (e: KeyboardEvent) => {
|
||||||
// 仅处理上下方向键
|
// 仅处理上下方向键
|
||||||
@ -208,20 +261,7 @@ const handleKeydown = (e: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数据回显处理
|
|
||||||
const handleDataEcho = () => {
|
|
||||||
if (props.data === null || props.data === undefined) {
|
|
||||||
selectShowValue.value = '';
|
|
||||||
emits('update:data', null);
|
|
||||||
// emits('getDataValue', null);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// 查找匹配的行数据
|
|
||||||
const row: any = props.tableData.find((item: any) => props.objKey && item[props.objKey] === props.data)
|
|
||||||
selectShowValue.value = row ? (props.label ? row[props.label] : (props.value ? row[props.value] : '')) : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 搜索过滤逻辑
|
// 搜索过滤逻辑
|
||||||
const filterDataHandle = () => {
|
const filterDataHandle = () => {
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
:border="config.border" :fit="config.fit !== true" :show-header="config.showHeader !== false"
|
:border="config.border" :fit="config.fit !== true" :show-header="config.showHeader !== false"
|
||||||
:highlight-current-row="config.highlightCurrentRow || false" :row-class-name="config.rowClassName"
|
:highlight-current-row="config.highlightCurrentRow || false" :row-class-name="config.rowClassName"
|
||||||
:header-cell-style="config.headerCellStyle" :cell-style="config.cellStyle" :max-height="config.maxHeight"
|
:header-cell-style="config.headerCellStyle" :cell-style="config.cellStyle" :max-height="config.maxHeight"
|
||||||
:height="config.height" :size="config.size || 'default'" :empty-text="config.emptyText || '暂无数据'"
|
:show-summary="config.summary" :summary-method="getSummaries" :sum-text="config.sumText" :height="config.height"
|
||||||
|
:size="config.size || 'default'" :empty-text="config.emptyText || '暂无数据'"
|
||||||
@selection-change="handleSelectionChange" @current-change="handleCurrentChange" @row-click="handleRowClick"
|
@selection-change="handleSelectionChange" @current-change="handleCurrentChange" @row-click="handleRowClick"
|
||||||
:header-cell-class-name="enableColumnDrag ? 'el-table-header-cell' : ''" @row-dblclick="handleRowDblclick"
|
:header-cell-class-name="enableColumnDrag ? 'el-table-header-cell' : ''" @row-dblclick="handleRowDblclick"
|
||||||
@sort-change="handleSortChange" v-bind="$attrs">
|
@sort-change="handleSortChange" v-bind="$attrs">
|
||||||
@ -180,6 +181,23 @@ const getIndex = (index: number) => {
|
|||||||
// return 'el-table-header-cell'; // 添加自定义类名
|
// return 'el-table-header-cell'; // 添加自定义类名
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
|
||||||
|
// 计算列合计
|
||||||
|
// 自定义汇总方法 - 只计算指定列
|
||||||
|
const getSummaries = ({ columns, data }: { columns: any, data: any }) => {
|
||||||
|
const summaries = columns.map(() => '');
|
||||||
|
if (props.config.summaryField.length > 0) {
|
||||||
|
props.config.summaryField.forEach((v: any) => {
|
||||||
|
const index = columns.find((column: any) => column.property === v)?.no;
|
||||||
|
const summaryData = data.map((item: any) => item[v]);
|
||||||
|
const summary = summaryData.reduce((acc: any, cur: any) => Number(acc) + Number(cur), 0);
|
||||||
|
summaries[index] = summary;
|
||||||
|
});
|
||||||
|
summaries[0] = props.config.sumText;
|
||||||
|
}
|
||||||
|
|
||||||
|
return summaries;
|
||||||
|
};
|
||||||
// 事件处理
|
// 事件处理
|
||||||
const handleSelectionChange = (selection: any[]) => {
|
const handleSelectionChange = (selection: any[]) => {
|
||||||
emit("selection-change", selection);
|
emit("selection-change", selection);
|
||||||
|
|||||||
@ -17,6 +17,8 @@
|
|||||||
import { onMounted, ref, watch, computed, reactive, toRaw } from 'vue';
|
import { onMounted, ref, watch, computed, reactive, toRaw } from 'vue';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { getFirstLetter } from '@/api/pinyin.js';
|
import { getFirstLetter } from '@/api/pinyin.js';
|
||||||
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
tableData: object[];
|
tableData: object[];
|
||||||
label?: string;
|
label?: string;
|
||||||
|
|||||||
@ -114,6 +114,14 @@ const setCurrentRow = (row: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清除高亮行
|
||||||
|
const clearCurrentRow = () => {
|
||||||
|
if (tableRef.value) {
|
||||||
|
tableRef.value.clearCurrentRow()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 初始化列拖拽功能
|
// 初始化列拖拽功能
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.enableColumnDrag && tableRef.value) {
|
if (props.enableColumnDrag && tableRef.value) {
|
||||||
@ -171,6 +179,7 @@ const initColumnDrag = () => {
|
|||||||
// 暴露公共方法
|
// 暴露公共方法
|
||||||
defineExpose({
|
defineExpose({
|
||||||
setCurrentRow,
|
setCurrentRow,
|
||||||
|
clearCurrentRow,
|
||||||
tableRef,
|
tableRef,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
57
src/utils/getNextNumber.ts
Normal file
57
src/utils/getNextNumber.ts
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// 获取下一个编号
|
||||||
|
export function getNextNumber(oldNumber: string): string | null {
|
||||||
|
// 检查是否为空
|
||||||
|
if (!oldNumber) return null;
|
||||||
|
|
||||||
|
// 分离前缀和数字部分
|
||||||
|
const prefixMatch = oldNumber.match(/^[A-Za-z]*/);
|
||||||
|
const prefix = prefixMatch ? prefixMatch[0] : '';
|
||||||
|
const numberPart = oldNumber.slice(prefix.length);
|
||||||
|
|
||||||
|
// 检查数字部分是否有效
|
||||||
|
if (!/^\d+$/.test(numberPart)) {
|
||||||
|
return null; // 无效的数字部分
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将数字部分转为整数并加1
|
||||||
|
const number = parseInt(numberPart, 10) + 1;
|
||||||
|
|
||||||
|
// 保持原有的数字位数,用0填充(next保持补0逻辑不变)
|
||||||
|
const nextNumberPart = number.toString().padStart(numberPart.length, '0');
|
||||||
|
|
||||||
|
// 拼接前缀和新的数字部分
|
||||||
|
return prefix + nextNumberPart;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取上一个编号,处理边界情况
|
||||||
|
export function getPreviousNumber(oldNumber: string): string | null {
|
||||||
|
// 检查是否为空
|
||||||
|
if (!oldNumber) return null;
|
||||||
|
|
||||||
|
// 分离前缀和数字部分
|
||||||
|
const prefixMatch = oldNumber.match(/^[A-Za-z]*/);
|
||||||
|
const prefix = prefixMatch ? prefixMatch[0] : '';
|
||||||
|
const numberPart = oldNumber.slice(prefix.length);
|
||||||
|
|
||||||
|
// 检查数字部分是否有效
|
||||||
|
if (!/^\d+$/.test(numberPart)) {
|
||||||
|
return null; // 无效的数字部分
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将数字部分转为整数
|
||||||
|
const number = parseInt(numberPart, 10);
|
||||||
|
|
||||||
|
// 处理边界情况:如果已经是1,则保持不变
|
||||||
|
if (number <= 1) {
|
||||||
|
return oldNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数字减1
|
||||||
|
const previousNumber = number - 1;
|
||||||
|
|
||||||
|
|
||||||
|
const previousNumberPart = previousNumber.toString();
|
||||||
|
|
||||||
|
// 拼接前缀和新的数字部分
|
||||||
|
return prefix + previousNumberPart;
|
||||||
|
}
|
||||||
159
src/views/liswork/work/charge/index.vue
Normal file
159
src/views/liswork/work/charge/index.vue
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
<!-- 收费项目列表 -->
|
||||||
|
<template>
|
||||||
|
<div class="charge_box">
|
||||||
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" @row-click="rowHandle"
|
||||||
|
:enableColumnDrag="true" @column-drag-end="handleColumnDragEnd">
|
||||||
|
<template #jjzt="{ row }">
|
||||||
|
<el-checkbox v-model="row.jjzt" true-value="1" disabled />
|
||||||
|
</template>
|
||||||
|
<template #zt="{ row }">
|
||||||
|
{{ formatDict(row.zt, 'ST') }}
|
||||||
|
</template>
|
||||||
|
<template #sqys="{ row }">
|
||||||
|
{{ formatDict(row.sqys, 'SRD') }}
|
||||||
|
</template>
|
||||||
|
<template #ksdh="{ row }">
|
||||||
|
{{ formatDict(row.ksdh, 'DP') }}
|
||||||
|
</template>
|
||||||
|
<template #jsys="{ row }">
|
||||||
|
{{ formatys(row.jsys) }}
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
<el-table :data="bottomTableData" style="width: 100%" highlight-current-row border height="39vh" class="mt10"
|
||||||
|
show-summary :summary-method="getSummaries" sum-text="项目数">
|
||||||
|
<el-table-column prop="xmdh" label="报告项目" fixed align="center" />
|
||||||
|
<el-table-column prop="xmmc" label="项目名称" fixed align="center" />
|
||||||
|
<el-table-column prop="tdh" label="双工代号" fixed align="center" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, toRefs, watch, computed, onMounted, nextTick } from "vue";
|
||||||
|
// @ts-ignore
|
||||||
|
import { listUser } from '@/api/system/user.js'
|
||||||
|
import { reqdetail, reqdetailmx } from '@/api/liswork/work/LisWork'
|
||||||
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 主键
|
||||||
|
queryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
dictData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => props.queryParams, (newValue) => {
|
||||||
|
console.log('==>', newValue);
|
||||||
|
nextTick(() => {
|
||||||
|
getInfoList()
|
||||||
|
})
|
||||||
|
}, { immediate: true })
|
||||||
|
|
||||||
|
// 解构 props
|
||||||
|
const { queryParams, dictData, } = toRefs(props);
|
||||||
|
|
||||||
|
const tableRef = ref()
|
||||||
|
const tableData = ref([])
|
||||||
|
const columns = ref([
|
||||||
|
{ prop: 'sqxmmc', label: '项目名称', align: 'center', width: 120, visible: true, },
|
||||||
|
{ prop: 'dj', label: '单价', align: 'center', visible: true, width: 100, },
|
||||||
|
{ prop: 'sl', label: '数量', align: 'center', visible: true, width: 60, },
|
||||||
|
{ prop: 'jjzt', label: '计价', align: 'center', visible: true, width: 60, slot: 'jjzt' },
|
||||||
|
{ prop: 'zt', label: '状态', align: 'center', visible: true, width: 60, slot: 'zt' },
|
||||||
|
{ prop: 'sqxmdh', label: '项目代号', align: 'center', visible: true, width: 120, },
|
||||||
|
{ prop: 'sqh', label: '申请号', align: 'center', visible: true, width: 120, },
|
||||||
|
{ type: 'index', label: '序号', align: 'center', visible: true, width: 60, },
|
||||||
|
{ prop: 'ksdh', label: '申请科室', align: 'center', visible: true, width: 120, slot: 'ksdh' },
|
||||||
|
{ prop: 'sqys', label: '申请医生', align: 'center', visible: true, slot: 'sqys' },
|
||||||
|
{ prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 120, },
|
||||||
|
{ prop: 'jsys', label: '接受医生', align: 'center', visible: true, slot: 'jsys' },
|
||||||
|
{ prop: 'jssj', label: '接收时间', align: 'center', visible: true, width: 120, },
|
||||||
|
{ prop: 'brly', label: '病人来源', align: 'center', visible: true, },
|
||||||
|
{ prop: 'brdh', label: '病人编号', align: 'center', visible: true, },
|
||||||
|
{ prop: 'brxm', label: '病人姓名', align: 'center', visible: true, },
|
||||||
|
{ prop: 'bz1', label: '备注1', align: 'center', visible: true, },
|
||||||
|
{ prop: 'bz2', label: '备注2', align: 'center', visible: true, },
|
||||||
|
])
|
||||||
|
const tableConfig = ref({
|
||||||
|
border: true, // 边框
|
||||||
|
height: '40vh', // 高度
|
||||||
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
|
summary: true,
|
||||||
|
summaryField: ['dj'],//计算列总和
|
||||||
|
sumText: '合计'
|
||||||
|
// cellStyle: cellStyleHd
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const bottomTableData = ref([])
|
||||||
|
const getInfoList = () => {
|
||||||
|
reqdetail(queryParams.value).then((res: any) => {
|
||||||
|
tableData.value = res.data
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
nextTick(() => {
|
||||||
|
tableRef.value?.setCurrentRow(res.data[0])
|
||||||
|
})
|
||||||
|
getMxInfo(res.data[0])
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getMxInfo = (row: any) => {
|
||||||
|
const data = {
|
||||||
|
yq: queryParams.value.yq,
|
||||||
|
sqxmdh: row.sqxmdh
|
||||||
|
}
|
||||||
|
reqdetailmx(data).then((res: any) => {
|
||||||
|
bottomTableData.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const userList = ref<{ [key: string]: any }>([])
|
||||||
|
onMounted(() => {
|
||||||
|
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
|
||||||
|
listUser(data).then((res: any) => {
|
||||||
|
userList.value = res.rows;
|
||||||
|
});
|
||||||
|
// getInfoList()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const rowHandle = (row: any) => {
|
||||||
|
console.log(row)
|
||||||
|
getMxInfo(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleColumnDragEnd = (data: any) => {
|
||||||
|
// 更新列配置
|
||||||
|
columns.value = data.columns;
|
||||||
|
};
|
||||||
|
|
||||||
|
const formatDict = (v: string, dictType: string) => {
|
||||||
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label
|
||||||
|
}
|
||||||
|
const formatys = (v: string) => {
|
||||||
|
return userList.value.find((item: any) => item.userName == v)?.nickName
|
||||||
|
}
|
||||||
|
|
||||||
|
const getSummaries = ({ columns, data }: { columns: any, data: any }) => {
|
||||||
|
const summaries = columns.map(() => '');
|
||||||
|
summaries[0] = '项目数';
|
||||||
|
summaries[1] = bottomTableData.value.length;
|
||||||
|
return summaries;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.charge_box {
|
||||||
|
:deep(.el-table__cell) {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
11
src/views/liswork/work/clinical/index.vue
Normal file
11
src/views/liswork/work/clinical/index.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
临床意义
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
11
src/views/liswork/work/combination/index.vue
Normal file
11
src/views/liswork/work/combination/index.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
组合项目
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
398
src/views/liswork/work/components/labpat copy.vue
Normal file
398
src/views/liswork/work/components/labpat copy.vue
Normal file
@ -0,0 +1,398 @@
|
|||||||
|
<template>
|
||||||
|
<div class="labpat_box">
|
||||||
|
<div class="flex-between mb5">
|
||||||
|
<el-input placeholder="条码号" class="mr10" style="width:100%" />
|
||||||
|
<el-button type="primary">打印条码</el-button>
|
||||||
|
</div>
|
||||||
|
<el-form :model="labPat" label-width="70px" class="compact-form" label-position="right"
|
||||||
|
:disabled="lastJgbz != null && lastJgbz != 0">
|
||||||
|
<div :class="['sh_box', getColor(lastJgbz)]" v-if="lastJgbz != null && lastJgbz != 0">
|
||||||
|
<div>{{ getLableType(lastJgbz) }}</div>
|
||||||
|
</div>
|
||||||
|
<el-form-item label="病人来源">
|
||||||
|
<el-col :span="14">
|
||||||
|
<SelectTable v-model:data="labPat.brly" :fields="brlyFields" :tableData="dictData.PT || []" label="label"
|
||||||
|
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
||||||
|
@getDataValue="handleFieldChange" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-switch v-model="labPat.jzbz" active-text="急诊" active-color="#FD0101" active-value="1" inactive-value="0"
|
||||||
|
@change="handleFieldChange"></el-switch>
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病 历 号">
|
||||||
|
<el-input v-model="labPat.brdh" placeholder="请输入病历号" @change="handleFieldChange" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓 名">
|
||||||
|
<el-input v-model="labPat.brxm" placeholder="请输入姓名" @change="handleFieldChange" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性 别">
|
||||||
|
<el-select v-model="labPat.brxb" placeholder="请选择" style="width: 100%;" @change="handleFieldChange"
|
||||||
|
size="small">
|
||||||
|
<el-option v-for="item in dictData.SX" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="年龄">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-input v-model="labPat.nl" placeholder="年龄" @change="handleFieldChange" style="width:100%"
|
||||||
|
size="small" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-select v-model="labPat.nldw" placeholder="请选择" style="width: 100%;" filterable size="small"
|
||||||
|
@change="handleFieldChange">
|
||||||
|
<el-option v-for="item in dictData.AU" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="送检科室">
|
||||||
|
<SelectTable v-model:data="labPat.ksdh" :fields="ksdhFields" :tableData="dictData.DP || []" label="label"
|
||||||
|
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
||||||
|
@getDataValue="handleFieldChange" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="床 号">
|
||||||
|
<el-input v-model="labPat.ch" placeholder="请输入床号" @change="handleFieldChange" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="样本类型">
|
||||||
|
<SelectTable v-model:data="labPat.yblx" :fields="ksdhFields" :tableData="dictData.DP || []" label="label"
|
||||||
|
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
||||||
|
@getDataValue="handleFieldChange" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申请医生">
|
||||||
|
<SelectTable v-model:data="labPat.sjys" :fields="ksdhFields" :tableData="dictData.SRD || []" label="label"
|
||||||
|
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
||||||
|
@getDataValue="handleFieldChange" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上机时间">
|
||||||
|
<el-date-picker v-model="labPat.sqsj" type="datetime" placeholder="上机时间" format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss" @change="handleFieldChange" size="small" style="width: 100%;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="采样时间">
|
||||||
|
<el-date-picker v-model="labPat.cyrq" type="datetime" placeholder="采样时间" format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss" @change="handleFieldChange" size="small" style="width: 100%;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报告时间">
|
||||||
|
<el-date-picker v-model="labPat.dysj" type="datetime" placeholder="报告时间" format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss" @change="handleFieldChange" size="small" style="width: 100%;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="临床诊断">
|
||||||
|
<el-input v-model="labPat.zd" placeholder="请输入临床诊断" @change="handleFieldChange" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备 注">
|
||||||
|
<el-input v-model="labPat.bz" placeholder="请输入备注" @change="handleFieldChange" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检验医生">
|
||||||
|
<SelectTable v-model:data="labPat.yhdh" :fields="ysFields" :tableData="userList || []" label="nickName"
|
||||||
|
value="userName" objKey="userName" :border="true" placeholder="请选择" size="small"
|
||||||
|
@getDataValue="handleFieldChange" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核医生">
|
||||||
|
<SelectTable v-model:data="labPat.hdys" :fields="ysFields" :tableData="userList || []" label="nickName"
|
||||||
|
value="userName" objKey="userName" :border="true" placeholder="请选择" size="small"
|
||||||
|
@getDataValue="handleFieldChange" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核状态">
|
||||||
|
<el-radio-group v-model="labPat.jgbz">
|
||||||
|
<el-radio :label="'0'">未审核</el-radio>
|
||||||
|
<el-radio :label="'2'">已审核</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, watch, toRaw, computed, onMounted } from 'vue';
|
||||||
|
import { changepatcolumn, updateLabPat } from "@/api/liswork/work/LisWork";
|
||||||
|
import SelectTable from '@/components/SelectTable/index.vue';
|
||||||
|
// @ts-ignore
|
||||||
|
import { listUser } from '@/api/system/user.js'
|
||||||
|
const props = defineProps({
|
||||||
|
labSysList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
labPat: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
//结果主键
|
||||||
|
labPatKey: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
dictData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const lastJgbz = ref();
|
||||||
|
watch(() => props.labPat, (newVal) => {
|
||||||
|
lastValue.value = JSON.stringify(newVal);
|
||||||
|
lastJgbz.value = newVal.jgbz;
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:labPat']);
|
||||||
|
const lastValue = ref('');
|
||||||
|
|
||||||
|
const brlyFields = ref([
|
||||||
|
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||||
|
{ prop: 'label', label: '名称', width: 120, enablePinyinSearch: true },
|
||||||
|
])
|
||||||
|
|
||||||
|
const ksdhFields = ref([
|
||||||
|
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||||
|
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||||
|
])
|
||||||
|
const ysFields = ref([
|
||||||
|
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
|
||||||
|
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
|
||||||
|
])
|
||||||
|
/**
|
||||||
|
* 通用字段变化处理(失焦、回车触发)
|
||||||
|
*/
|
||||||
|
const handleFieldChange = async () => {
|
||||||
|
// 将当前labPat转为字符串用于比较
|
||||||
|
const currentValue = JSON.stringify(props.labPat);
|
||||||
|
// 对比与上一次保存的值是否有变化
|
||||||
|
if (currentValue !== lastValue.value) {
|
||||||
|
// 找出变化的字段
|
||||||
|
const oldObj = JSON.parse(lastValue.value);
|
||||||
|
const newObj = props.labPat;
|
||||||
|
const changedField = getChangedField(oldObj, newObj);
|
||||||
|
if (changedField) {
|
||||||
|
// 这里可以添加实际的更新逻辑,比如调用接口
|
||||||
|
try {
|
||||||
|
if (props.labPat.id) {
|
||||||
|
updateLabPat({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue })
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('更新失败:', error);
|
||||||
|
// 失败时可以恢复旧值
|
||||||
|
emit('update:labPat', oldObj);
|
||||||
|
lastValue.value = JSON.stringify(oldObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 完善字段变化检测方法
|
||||||
|
const getChangedField = (oldObj: { [key: string]: any }, newObj: { [key: string]: any }) => {
|
||||||
|
const oldKeys = Object.keys(oldObj);
|
||||||
|
for (const key of oldKeys) {
|
||||||
|
const oldVal = oldObj[key];
|
||||||
|
const newVal = newObj[key];
|
||||||
|
|
||||||
|
if (oldVal instanceof Date && newVal instanceof Date) {
|
||||||
|
if (oldVal.getTime() !== newVal.getTime()) {
|
||||||
|
return { field: key, oldValue: oldVal, newValue: newVal };
|
||||||
|
}
|
||||||
|
} else if (oldVal !== newVal) {
|
||||||
|
return { field: key, oldValue: oldVal, newValue: newVal };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const newKeys = Object.keys(newObj);
|
||||||
|
for (const key of newKeys) {
|
||||||
|
if (!(key in oldObj)) {
|
||||||
|
return { field: key, oldValue: undefined, newValue: newObj[key] };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const getLableType = (type: string) => {
|
||||||
|
switch (type) {
|
||||||
|
case '1':
|
||||||
|
return '初审';
|
||||||
|
case '2':
|
||||||
|
return '已审核';
|
||||||
|
case '3':
|
||||||
|
return '初报';
|
||||||
|
case '4':
|
||||||
|
return '二报';
|
||||||
|
case '5':
|
||||||
|
return '锁定';
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getColor = (type: string) => {
|
||||||
|
switch (type) {
|
||||||
|
case '1':
|
||||||
|
return 'cs_color';
|
||||||
|
case '2':
|
||||||
|
return 'sh_color';
|
||||||
|
case '3':
|
||||||
|
return 'cb_color';
|
||||||
|
case '4':
|
||||||
|
return 'eb_color';
|
||||||
|
case '5':
|
||||||
|
return 'sd_color';
|
||||||
|
default:
|
||||||
|
return 'default';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const userList = ref([]);
|
||||||
|
onMounted(() => {
|
||||||
|
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
|
||||||
|
listUser(data).then((res: any) => {
|
||||||
|
userList.value = res.rows;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.labpat_box {
|
||||||
|
height: calc(90vh - 95px);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
|
:deep(.el-input__wrapper) {
|
||||||
|
box-shadow: 0 0 0 1px #96B8D9 inset;
|
||||||
|
background-color: rgba(236, 244, 251, 0.5);
|
||||||
|
color: #08355E;
|
||||||
|
|
||||||
|
|
||||||
|
.is-focus {
|
||||||
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// .el-input__placeholder {
|
||||||
|
// color: none !important;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-select__wrapper) {
|
||||||
|
box-shadow: 0 0 0 1px #96B8D9 inset;
|
||||||
|
background-color: rgba(236, 244, 251, 0.5);
|
||||||
|
color: #08355E;
|
||||||
|
|
||||||
|
|
||||||
|
.is-focus {
|
||||||
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-select__placeholder {
|
||||||
|
color: #08355E !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__inner) {
|
||||||
|
color: #08355E !important;
|
||||||
|
-webkit-text-fill-color: #08355E;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
:deep(.el-select__input) {
|
||||||
|
color: #08355E !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.compact-form {
|
||||||
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__label {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
color: #08355E;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pointer-events: none;
|
||||||
|
|
||||||
|
:deep(.el-radio__label) {
|
||||||
|
color: #08355E;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
:deep(.el-switch__label) {
|
||||||
|
color: #08355E;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.flex-between {
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.sh_box {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0);
|
||||||
|
z-index: 9;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
writing-mode: vertical-rl;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 137px;
|
||||||
|
|
||||||
|
// pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cs_color {
|
||||||
|
color: rgba(40, 189, 187, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sh_color {
|
||||||
|
color: rgba(238, 8, 8, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cb_color {
|
||||||
|
color: rgba(255, 165, 0, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.eb_color {
|
||||||
|
color: rgba(0, 128, 0, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sd_color {
|
||||||
|
color: rgba(128, 128, 128, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.default {
|
||||||
|
color: rgba(40, 189, 187, 0.44);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -9,125 +9,79 @@
|
|||||||
<div :class="['sh_box', getColor(lastJgbz)]" v-if="lastJgbz != null && lastJgbz != 0">
|
<div :class="['sh_box', getColor(lastJgbz)]" v-if="lastJgbz != null && lastJgbz != 0">
|
||||||
<div>{{ getLableType(lastJgbz) }}</div>
|
<div>{{ getLableType(lastJgbz) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="病人来源">
|
<template v-for="v in labSysList" :key="v.xh">
|
||||||
<el-col :span="14">
|
<el-row :gutter="10" v-if="v.mrts == '病人来源'">
|
||||||
<SelectTable v-model:data="labPat.brly" :fields="brlyFields" :tableData="dictData.PT || []" label="label"
|
<el-col :span="18">
|
||||||
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
<el-form-item :label="v.zdts" v-if="v.kj == '1'">
|
||||||
@getDataValue="handleFieldChange" />
|
<SelectTable v-model:data="labPat[v.zdmc]" :fields="brlyFields" :dictType="v.dict" placeholder=""
|
||||||
</el-col>
|
label="label" value="value" objKey="value" :border="true" size="small" @getDataValue="handleFieldChange"
|
||||||
<el-col :span="10">
|
:disabled="v.kybj == '0'" />
|
||||||
<el-switch v-model="labPat.jzbz" active-text="急诊" active-color="#FD0101" active-value="1" inactive-value="0"
|
</el-form-item>
|
||||||
@change="handleFieldChange"></el-switch>
|
|
||||||
</el-col>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="病 历 号">
|
|
||||||
<el-input v-model="labPat.brdh" placeholder="请输入病历号" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="姓 名">
|
|
||||||
<el-input v-model="labPat.brxm" placeholder="请输入姓名" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="性 别">
|
|
||||||
<el-select v-model="labPat.brxb" placeholder="请选择" style="width: 100%;" @change="handleFieldChange"
|
|
||||||
size="small">
|
|
||||||
<el-option v-for="item in dictData.SX" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="年龄">
|
|
||||||
<el-row :gutter="5">
|
|
||||||
<el-col :span="14">
|
|
||||||
<el-input v-model="labPat.nl" placeholder="年龄" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
style="width:100%" size="small" />
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="6">
|
||||||
<el-select v-model="labPat.nldw" placeholder="请选择" style="width: 100%;" filterable size="small"
|
<el-checkbox v-model="labPat.jzbz" true-value="1" :disabled="v.kybj == '0'" class="check_box"> 急诊
|
||||||
@change="handleFieldChange">
|
</el-checkbox>
|
||||||
<el-option v-for="item in dictData.AU" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="送检科室">
|
|
||||||
<!-- <el-select v-model="labPat.ksdh" placeholder="请选择" style="width: 100%;" filterable @change="handleFieldChange"
|
|
||||||
size="small">
|
|
||||||
<el-option v-for="item in dictData.DP" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select> -->
|
|
||||||
|
|
||||||
<SelectTable v-model:data="labPat.ksdh" :fields="ksdhFields" :tableData="dictData.DP || []" label="label"
|
<el-form-item :label="v.zdts" v-if="v.kj == '1' && !v.dict && v.mrts != '年龄'">
|
||||||
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
<el-input v-if="v.zdlb == '1'" v-model="labPat[v.zdmc]" @change="handleFieldChange" size="small"
|
||||||
@getDataValue="handleFieldChange" />
|
:disabled="v.kybj == '0'" />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="床 号">
|
|
||||||
<el-input v-model="labPat.ch" placeholder="请输入床号" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="样本类型">
|
|
||||||
<!-- <el-select v-model="labPat.yblx" placeholder="请选择" style="width: 100%;" @change="handleFieldChange" filterable
|
|
||||||
size="small">
|
|
||||||
<el-option v-for="item in dictData.BT" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select> -->
|
|
||||||
|
|
||||||
<SelectTable v-model:data="labPat.ksdh" :fields="ksdhFields" :tableData="dictData.DP || []" label="label"
|
|
||||||
value="value" objKey="value" :border="true" placeholder="请选择" size="small"
|
|
||||||
@getDataValue="handleFieldChange" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="申请医生">
|
|
||||||
<el-select v-model="labPat.sjys" placeholder="请选择" style="width: 100%;" @change="handleFieldChange" filterable
|
|
||||||
size="small">
|
|
||||||
<el-option v-for="item in dictData.SRD" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="上机时间">
|
|
||||||
<el-date-picker v-model="labPat.sqsj" type="datetime" placeholder="上机时间" format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss" @blur="handleFieldChange" @keyup.enter="handleFieldChange" size="small"
|
|
||||||
style="width: 100%;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="采样时间">
|
|
||||||
<el-date-picker v-model="labPat.cyrq" type="datetime" placeholder="采样时间" format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss" @blur="handleFieldChange" @keyup.enter="handleFieldChange" size="small"
|
|
||||||
style="width: 100%;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="报告时间">
|
|
||||||
<el-date-picker v-model="labPat.dysj" type="datetime" placeholder="报告时间" format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss" @blur="handleFieldChange" @keyup.enter="handleFieldChange" size="small"
|
|
||||||
style="width: 100%;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="临床诊断">
|
|
||||||
<el-input v-model="labPat.zd" placeholder="请输入临床诊断" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备 注">
|
|
||||||
<el-input v-model="labPat.bz" placeholder="请输入备注" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="检验医生">
|
|
||||||
<!-- <el-input v-model="labPat.yhdh" placeholder="请输入检验医生" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" /> -->
|
|
||||||
|
|
||||||
<el-select v-model="labPat.yhdh" placeholder="请选择" style="width: 100%;" @change="handleFieldChange" filterable
|
<el-date-picker v-if="v.zdlb == '3'" v-model="labPat[v.zdmc]" type="datetime" :disabled="v.kybj == '0'"
|
||||||
size="small">
|
format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" @change="handleFieldChange" size="small"
|
||||||
<el-option v-for="item in dictData.SRD" :key="item.value" :label="item.label" :value="item.value" />
|
style="width: 100%;" />
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审核医生">
|
|
||||||
<!-- <el-input v-model="labPat.hdys" placeholder="请输入审核医生" @blur="handleFieldChange" @keyup.enter="handleFieldChange"
|
|
||||||
size="small" /> -->
|
|
||||||
|
|
||||||
<el-select v-model="labPat.hdys" placeholder="请选择" style="width: 100%;" @change="handleFieldChange" filterable
|
|
||||||
size="small">
|
|
||||||
<el-option v-for="item in dictData.SRD" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审核状态">
|
|
||||||
<el-radio-group v-model="labPat.jgbz">
|
|
||||||
<el-radio :label="'0'">未审核</el-radio>
|
|
||||||
<el-radio :label="'2'">已审核</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
|
<el-form-item :label="v.zdts" v-if="v.kj == '1' && v.mrts == '年龄'">
|
||||||
|
<el-col :span="14" v-if="v.mrts == '年龄'">
|
||||||
|
<el-input v-model="labPat[v.zdmc]" @change="handleFieldChange" style="width:100%" size="small" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<!-- <el-select v-model="labPat.nldw" style="width: 100%;" filterable size="small" @change="handleFieldChange"
|
||||||
|
placeholder="">
|
||||||
|
<el-option v-for="item in dictData.AU" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select> -->
|
||||||
|
<SelectTable v-model:data="labPat.nldw" :fields="ksdhFields" dictType="AU" label="label" value="value"
|
||||||
|
objKey="value" :border="true" size="small" @getDataValue="handleFieldChange" placeholder="" />
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-form-item :label="v.zdts" v-if="v.kj == '1' && v.mrts == '性别'">
|
||||||
|
<el-select v-model="labPat[v.zdmc]" style="width: 100%;" @change="handleFieldChange" size="small"
|
||||||
|
placeholder="" :disabled="v.kybj == '0'">
|
||||||
|
<el-option v-for="item in dictData[v.dict]" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<el-form-item :label="v.zdts"
|
||||||
|
v-if="v.dict && v.kj == '1' && v.mrts != '病人来源' && v.mrts != '年龄单位' && v.mrts != '检验医师' && v.mrts != '核对医师'">
|
||||||
|
<SelectTable v-model:data="labPat[v.zdmc]" :fields="ksdhFields" :dictType="v.dict" label="label" value="value"
|
||||||
|
objKey="value" :border="true" size="small" @getDataValue="handleFieldChange" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-form-item :label="v.zdts" v-if="v.mrts == '科室' && v.kj == '1'">
|
||||||
|
<SelectTable v-model:data="labPat[v.zdmc]" :fields="ksdhFields" :tableData="dictData[v.dict] || []"
|
||||||
|
label="label" value="value" objKey="value" :border="true" size="small" @getDataValue="handleFieldChange"
|
||||||
|
:disabled="v.kybj == '0'" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<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"
|
||||||
|
value="userName" objKey="userName" :border="true" size="small" @getDataValue="handleFieldChange"
|
||||||
|
:disabled="v.kybj == '0'" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
<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"
|
||||||
|
value="userName" objKey="userName" :border="true" size="small" @getDataValue="handleFieldChange"
|
||||||
|
:disabled="v.kybj == '0'" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -135,8 +89,25 @@
|
|||||||
import { ref, reactive, watch, toRaw, computed, onMounted } from 'vue';
|
import { ref, reactive, watch, toRaw, computed, onMounted } from 'vue';
|
||||||
import { changepatcolumn, updateLabPat } from "@/api/liswork/work/LisWork";
|
import { changepatcolumn, updateLabPat } from "@/api/liswork/work/LisWork";
|
||||||
import SelectTable from '@/components/SelectTable/index.vue';
|
import SelectTable from '@/components/SelectTable/index.vue';
|
||||||
|
// @ts-ignore
|
||||||
|
import { listUser } from '@/api/system/user.js'
|
||||||
|
import { PropType } from 'vue';
|
||||||
|
|
||||||
|
interface LabSysItem {
|
||||||
|
kj: string;
|
||||||
|
dict: string;
|
||||||
|
kybj: string;
|
||||||
|
zdlb: string;
|
||||||
|
zdmc: string;
|
||||||
|
zdts: string;
|
||||||
|
xh: number;
|
||||||
|
mrts: string;
|
||||||
|
}
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
labSysList: {
|
||||||
|
type: Array as PropType<LabSysItem[]>,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
labPat: {
|
labPat: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
@ -157,7 +128,7 @@ watch(() => props.labPat, (newVal) => {
|
|||||||
lastJgbz.value = newVal.jgbz;
|
lastJgbz.value = newVal.jgbz;
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:labPat']);
|
const emit = defineEmits(['update:labPat', 'getLabList']);
|
||||||
const lastValue = ref('');
|
const lastValue = ref('');
|
||||||
|
|
||||||
const brlyFields = ref([
|
const brlyFields = ref([
|
||||||
@ -169,6 +140,10 @@ const ksdhFields = ref([
|
|||||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||||
])
|
])
|
||||||
|
const ysFields = ref([
|
||||||
|
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
|
||||||
|
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
|
||||||
|
])
|
||||||
/**
|
/**
|
||||||
* 通用字段变化处理(失焦、回车触发)
|
* 通用字段变化处理(失焦、回车触发)
|
||||||
*/
|
*/
|
||||||
@ -184,8 +159,16 @@ const handleFieldChange = async () => {
|
|||||||
if (changedField) {
|
if (changedField) {
|
||||||
// 这里可以添加实际的更新逻辑,比如调用接口
|
// 这里可以添加实际的更新逻辑,比如调用接口
|
||||||
try {
|
try {
|
||||||
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue }).then((res: any) => {
|
if (props.labPat.id) {
|
||||||
});
|
updateLabPat({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
emit('getLabList', newObj);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue })
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('更新失败:', error);
|
console.error('更新失败:', error);
|
||||||
// 失败时可以恢复旧值
|
// 失败时可以恢复旧值
|
||||||
@ -256,34 +239,16 @@ const getColor = (type: string) => {
|
|||||||
return 'default';
|
return 'default';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const userList = ref([]);
|
||||||
|
onMounted(() => {
|
||||||
|
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
|
||||||
|
listUser(data).then((res: any) => {
|
||||||
|
userList.value = res.rows;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典选择完成处理(弹窗选择后触发)
|
|
||||||
*/
|
|
||||||
const handleDictSelect = async () => {
|
|
||||||
// 字典选择后直接触发更新
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 重置方法
|
|
||||||
const resetMain = () => {
|
|
||||||
const resetData = {
|
|
||||||
...props.labPat,
|
|
||||||
brly: '',
|
|
||||||
brlyLabel: '',
|
|
||||||
ksdh: '',
|
|
||||||
ksdhLabel: '',
|
|
||||||
brxb: '',
|
|
||||||
brxbLabel: '',
|
|
||||||
nldw: '',
|
|
||||||
nldwLabel: '',
|
|
||||||
jzbz: '0',
|
|
||||||
jgbz: 0
|
|
||||||
};
|
|
||||||
emit('update:labPat', resetData);
|
|
||||||
lastValue.value = JSON.stringify(resetData);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -294,6 +259,11 @@ const resetMain = () => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
.check_box {
|
||||||
|
:deep(.el-checkbox__input.is-checked+.el-checkbox__label) {
|
||||||
|
color: #f00 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
box-shadow: 0 0 0 1px #96B8D9 inset;
|
box-shadow: 0 0 0 1px #96B8D9 inset;
|
||||||
|
|||||||
@ -110,6 +110,9 @@ const tableRef = ref()
|
|||||||
const setCurrentRow = (row: any) => {
|
const setCurrentRow = (row: any) => {
|
||||||
tableRef.value.setCurrentRow(row)
|
tableRef.value.setCurrentRow(row)
|
||||||
}
|
}
|
||||||
|
const clearCurrentRow = () => {
|
||||||
|
tableRef.value.clearCurrentRow()
|
||||||
|
}
|
||||||
// 引入公共组件的字典格式化方法
|
// 引入公共组件的字典格式化方法
|
||||||
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
|
||||||
@ -118,6 +121,7 @@ const formatDict = (v: string, dictType: string) => {
|
|||||||
// 暴露公共方法
|
// 暴露公共方法
|
||||||
defineExpose({
|
defineExpose({
|
||||||
setCurrentRow,
|
setCurrentRow,
|
||||||
|
clearCurrentRow,
|
||||||
tableRef,
|
tableRef,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
147
src/views/liswork/work/history/index.vue
Normal file
147
src/views/liswork/work/history/index.vue
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<el-table :data="tableData" style="width: 100%" @row-click="handleRowClick" highlight-current-row border
|
||||||
|
max-height="350px">
|
||||||
|
<el-table-column prop="xmdh" label="项目编号" fixed align="center" width="150px" />
|
||||||
|
<el-table-column prop="xmmc" label="项目名称" fixed align="center" />
|
||||||
|
<template v-for="(period) in periods" :key="period">
|
||||||
|
<el-table-column :label="period" :prop="period" :width="150" align="center" />
|
||||||
|
</template>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div ref="myEcharts" style="width:100%;height: 350px" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref, toRefs, computed } from 'vue';
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
import { historyInfo } from '@/api/liswork/work/LisWork'
|
||||||
|
import { get } from '@vueuse/core';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 主键
|
||||||
|
queryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 解构 props
|
||||||
|
const { queryParams } = toRefs(props);
|
||||||
|
const tableData = ref([])
|
||||||
|
const periods = ref<string[]>([])
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
|
||||||
|
const getList = () => {
|
||||||
|
historyInfo(queryParams.value).then((res: any) => {
|
||||||
|
tableData.value = res.data
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowClick = () => { }
|
||||||
|
|
||||||
|
const myEcharts = ref()
|
||||||
|
const getEcharts = (data: any) => {
|
||||||
|
const dateKeys = Object.keys(data).filter(key => /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(key));
|
||||||
|
const Intance = echarts.init(myEcharts.value);
|
||||||
|
const xData = dateKeys;
|
||||||
|
let seriesData = []
|
||||||
|
seriesData = dateKeys.map(item => data[item]);
|
||||||
|
|
||||||
|
const option = {
|
||||||
|
title: {
|
||||||
|
text: data.xmmc,
|
||||||
|
top: '5',
|
||||||
|
right: '5%',
|
||||||
|
left: '20',
|
||||||
|
// bottom: '20%'
|
||||||
|
// subtext: 'Feature Sample: Gradient Color, Shadow, Click Zoom'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '20%',
|
||||||
|
left: '3%',
|
||||||
|
right: '4%',
|
||||||
|
// bottom: '3%',
|
||||||
|
height: '80%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: xData,
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
// color: 'rgba(193, 207, 220, 1)',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
rotate: 30,
|
||||||
|
textStyle: {
|
||||||
|
color: "#8D949B "
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: [{
|
||||||
|
// name: '单位(mm)',
|
||||||
|
type: 'value',
|
||||||
|
axisLabel: {
|
||||||
|
textStyle: {
|
||||||
|
color: "#8D949B"
|
||||||
|
},
|
||||||
|
// formatter: '{value}%'
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#24abf2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dashed'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
series: [{
|
||||||
|
name: data.xmmc,
|
||||||
|
type: 'line',
|
||||||
|
data: seriesData,
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 5, //标记的大小
|
||||||
|
lineStyle: {
|
||||||
|
normal: {
|
||||||
|
width: 2,
|
||||||
|
color: '#24abf2',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: '#24abf2',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
smooth: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
Intance.setOption(option);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@ -23,18 +23,19 @@
|
|||||||
value="yq" objKey="yq" :border="true" width="140px" placeholder="请选择仪器"
|
value="yq" objKey="yq" :border="true" width="140px" placeholder="请选择仪器"
|
||||||
@getDataValue="yqHandleChange" />
|
@getDataValue="yqHandleChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<!-- <el-form-item>
|
||||||
<el-icon color="#3c80d9" size="20" style="margin-right: 10px;" class="cp">
|
<el-icon color="#3c80d9" size="20" style="margin-right: 10px;" class="cp">
|
||||||
<Search @click="fetchlabPatList" />
|
<Search @click="fetchlabPatList" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon color="#3c80d9" size="20" class="cp" @click="selectJob(labPat)">
|
<el-icon color="#3c80d9" size="20" class="cp" @click="selectJob(labPat)">
|
||||||
<Refresh />
|
<Refresh />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<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" :dictData="dictData" />
|
<LabPat ref="labPatRef" v-model:labPat="labPat" :labPatKey="queryParams" :dictData="dictData"
|
||||||
|
:labSysList="labInputcolList" @getLabList="getLabList" />
|
||||||
</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"
|
||||||
@ -52,51 +53,82 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-shadow">
|
<div class="box-shadow">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" :rules="rules" class="compact-form">
|
<template v-if="activeTab == 1">
|
||||||
<el-form-item label="筛选条件:" prop="ybh" label-width="90px">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" :rules="rules" class="compact-form">
|
||||||
<el-input clearable placeholder="筛选条件" prefix-icon="Search" @keyup.enter="handleQuery"
|
<el-form-item label="筛选条件:" prop="ybh" label-width="90px">
|
||||||
@clear="handleQuery" style="width:100px" />
|
<el-input clearable placeholder="筛选条件" prefix-icon="Search" @keyup.enter="handleQuery"
|
||||||
</el-form-item>
|
@clear="handleQuery" style="width:100px" />
|
||||||
<el-form-item label="筛选条件:" prop="ybh" label-width="90px">
|
</el-form-item>
|
||||||
<el-input clearable placeholder="筛选条件" prefix-icon="Search" @keyup.enter="handleQuery"
|
<el-form-item label="筛选条件:" prop="ybh" label-width="90px">
|
||||||
@clear="handleQuery" style="width:100px" />
|
<el-input clearable placeholder="筛选条件" prefix-icon="Search" @keyup.enter="handleQuery"
|
||||||
</el-form-item>
|
@clear="handleQuery" style="width:100px" />
|
||||||
<el-form-item label="筛选条件:" prop="ybh" label-width="90px">
|
</el-form-item>
|
||||||
<el-input clearable placeholder="筛选条件" prefix-icon="Search" @keyup.enter="handleQuery"
|
<el-form-item label="筛选条件:" prop="ybh" label-width="90px">
|
||||||
@clear="handleQuery" style="width:100px" />
|
<el-input clearable placeholder="筛选条件" prefix-icon="Search" @keyup.enter="handleQuery"
|
||||||
</el-form-item>
|
@clear="handleQuery" style="width:100px" />
|
||||||
<el-form-item>
|
</el-form-item>
|
||||||
<el-icon color="#3c80d9" size="20" style="margin-right: 10px;" class="cp">
|
<!-- <el-form-item>
|
||||||
<Search />
|
<el-icon color="#3c80d9" size="20" style="margin-right: 10px;" class="cp">
|
||||||
</el-icon>
|
<Search />
|
||||||
<el-icon color="#3c80d9" size="20" class="cp">
|
</el-icon>
|
||||||
<Menu />
|
<el-icon color="#3c80d9" size="20" class="cp">
|
||||||
</el-icon>
|
<Menu />
|
||||||
</el-form-item>
|
</el-icon>
|
||||||
</el-form>
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<div class="flex-between mb10">
|
<div class="flex-between mb10">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" icon="RefreshRight" @click="fetchlabPatList">刷新</el-button>
|
<el-button type="primary" icon="RefreshRight" @click="fetchlabPatList">刷新</el-button>
|
||||||
<el-button type="danger" icon="delete">删除</el-button>
|
<el-button type="danger" icon="delete">删除</el-button>
|
||||||
<el-button class="btn_green" icon="top" @click="handlePrev">上一个</el-button>
|
<el-button class="btn_green" icon="top" @click="handlePrev">上一个</el-button>
|
||||||
<el-button class="btn_green" icon="bottom" @click="handleNext">下一个</el-button>
|
<el-button class="btn_green" icon="bottom" @click="handleNext">下一个</el-button>
|
||||||
<el-select placeholder="所有" style="width: 150px" class="ml10">
|
<el-select placeholder="所有" style="width: 150px" class="ml10">
|
||||||
<el-option label="option" value="item.value" />
|
<el-option label="option" value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-checkbox v-model="lbFlag"> 列表翻页 </el-checkbox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<LabPatList ref="labPatListRef" :labPatList="labPatList" :loading="loading" @select="selectJob"
|
||||||
<el-checkbox> 列表翻页 </el-checkbox>
|
:total="total" :dictData="dictData" @search="searchJobs" @page-change="pageChange" />
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<LabPatList ref="labPatListRef" :labPatList="labPatList" :loading="loading" @select="selectJob"
|
|
||||||
:total="total" :dictData="dictData" @search="searchJobs" @page-change="pageChange" />
|
|
||||||
|
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<div class="text1">样本总数:<span>{{ ybs }}</span></div>
|
<div class="text1">样本总数:<span>{{ ybs }}</span></div>
|
||||||
<div class="text2">未审:<span>{{ ws }}</span></div>
|
<div class="text2">未审:<span>{{ ws }}</span></div>
|
||||||
<div class="text3">危:<span>{{ wjs }}</span></div>
|
<div class="text3">危:<span>{{ wjs }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<!-- 历史对照 -->
|
||||||
|
<template v-if="activeTab == 2">
|
||||||
|
<History :queryParams="queryParams" />
|
||||||
|
</template>
|
||||||
|
<!-- 其他结果 -->
|
||||||
|
<template v-if="activeTab == 3">
|
||||||
|
<Others :queryParams="queryParams" :dictData="dictData" :instrOptions="instrOptions" />
|
||||||
|
</template>
|
||||||
|
<!-- 结果复查 -->
|
||||||
|
<template v-if="activeTab == 4">
|
||||||
|
<Reexamination />
|
||||||
|
</template>
|
||||||
|
<!-- 收费信息 -->
|
||||||
|
<template v-if="activeTab == 5">
|
||||||
|
<Charge :queryParams="queryParams" :dictData="dictData" />
|
||||||
|
</template>
|
||||||
|
<!-- 组合项目 -->
|
||||||
|
<template v-if="activeTab == 6">
|
||||||
|
<Combination />
|
||||||
|
</template>
|
||||||
|
<!-- 临床意义 -->
|
||||||
|
<template v-if="activeTab == 7">
|
||||||
|
<Clinical />
|
||||||
|
</template>
|
||||||
|
<!-- 样本流转 -->
|
||||||
|
<template v-if="activeTab == 8">
|
||||||
|
<Sample />
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -119,18 +151,21 @@ import LabResult from './components/labresult.vue';
|
|||||||
import LabPatList from './components/labpatlist.vue';
|
import LabPatList from './components/labpatlist.vue';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { comDict } from '@/utils/dict'
|
import { comDict } from '@/utils/dict'
|
||||||
import {
|
import { queryLabPatList, queryLabResults, loadDefault, queryLabPat, instrdconfig } from "@/api/liswork/work/LisWork";
|
||||||
getDate, queryLabPatList, queryLabResults, updateLabPat, queryLabPat,
|
|
||||||
check2, uncheck2, unconfirmlog, checkuser, reglimit, queryXmInfo
|
|
||||||
} from "@/api/liswork/work/LisWork";
|
|
||||||
import { querylabInstrList, querylabInstrListByLisgroup } from "@/api/liswork/dict/LabInstr";
|
import { querylabInstrList, querylabInstrListByLisgroup } from "@/api/liswork/dict/LabInstr";
|
||||||
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
||||||
|
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import History from './history/index.vue'
|
||||||
|
import Others from './others/index.vue'
|
||||||
|
import Reexamination from './reexamination/index.vue'
|
||||||
|
import Charge from './charge/index.vue'
|
||||||
|
import Combination from './combination/index.vue'
|
||||||
|
import Clinical from './clinical/index.vue'
|
||||||
|
import Sample from './sample/index.vue'
|
||||||
|
import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber";
|
||||||
|
|
||||||
const previewShow = ref(false);
|
const previewShow = ref(false);
|
||||||
|
const lbFlag = ref(false);
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 2000,
|
pageSize: 2000,
|
||||||
@ -187,7 +222,7 @@ const total = ref(0)
|
|||||||
|
|
||||||
const rules = ref([])
|
const rules = ref([])
|
||||||
const instrGroupOptions = ref<any[]>([])
|
const instrGroupOptions = ref<any[]>([])
|
||||||
const instrOptions = ref<{ label: string, value: string }[]>([])
|
const instrOptions = ref<{ yq: string; yqmc: string }[]>([])
|
||||||
|
|
||||||
const pdfUrl = ref('')
|
const pdfUrl = ref('')
|
||||||
const previewHandle = (url: string) => {
|
const previewHandle = (url: string) => {
|
||||||
@ -205,6 +240,7 @@ const handleinstrGroupChange = (val: any) => {
|
|||||||
const yqHandleChange = (val: any) => {
|
const yqHandleChange = (val: any) => {
|
||||||
labResuts.value = []
|
labResuts.value = []
|
||||||
labPat.value = {}
|
labPat.value = {}
|
||||||
|
getSysList()
|
||||||
fetchlabPatList()
|
fetchlabPatList()
|
||||||
}
|
}
|
||||||
const instrGroupFields = ref([
|
const instrGroupFields = ref([
|
||||||
@ -250,7 +286,7 @@ const selectJob = (job: any) => {
|
|||||||
queryParams.value.ybh = job.ybh;
|
queryParams.value.ybh = job.ybh;
|
||||||
fetchLabResults();
|
fetchLabResults();
|
||||||
fetchLabPat();
|
fetchLabPat();
|
||||||
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh.toLowerCase().includes(queryParams.value.ybh));
|
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
|
||||||
}
|
}
|
||||||
const labResuts = ref([])
|
const labResuts = ref([])
|
||||||
//载入样本结果表单(中间labresult.vue组件)
|
//载入样本结果表单(中间labresult.vue组件)
|
||||||
@ -274,9 +310,8 @@ const handleQuery = () => {
|
|||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找匹配的行
|
// 查找匹配的行
|
||||||
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh.toLowerCase().includes(queryParams.value.ybh));
|
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
|
||||||
const row = labPatList.value[matchedIndex]
|
const row = labPatList.value[matchedIndex]
|
||||||
if (matchedIndex !== -1) {
|
if (matchedIndex !== -1) {
|
||||||
highlightRowIndex.value = matchedIndex;
|
highlightRowIndex.value = matchedIndex;
|
||||||
@ -284,27 +319,83 @@ const handleQuery = () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
labPatListRef.value.setCurrentRow(row);
|
labPatListRef.value.setCurrentRow(row);
|
||||||
});
|
});
|
||||||
|
selectJob(row);
|
||||||
} else {
|
} else {
|
||||||
|
handleCreate()
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
selectJob(row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePrev = () => {
|
// 创建新样本
|
||||||
if (highlightRowIndex.value > 0) {
|
const handleCreate = () => {
|
||||||
highlightRowIndex.value--;
|
loadDefault(queryParams.value).then((response: any) => {
|
||||||
const row = labPatList.value[highlightRowIndex.value];
|
if (response.code == 0) {
|
||||||
labPatListRef.value.setCurrentRow(row);
|
labPat.value = response.data;
|
||||||
selectJob(row);
|
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
||||||
}
|
labResuts.value = []
|
||||||
|
|
||||||
|
labPatListRef.value?.clearCurrentRow();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const handleNext = () => {
|
|
||||||
if (highlightRowIndex.value < labPatList.value.length - 1) {
|
const getLabList = (data: any) => {
|
||||||
highlightRowIndex.value++;
|
labPatList.value.push(data)
|
||||||
const row = labPatList.value[highlightRowIndex.value];
|
setTimeout(() => { handleQuery(); }, 100)
|
||||||
labPatListRef.value.setCurrentRow(row);
|
}
|
||||||
selectJob(row);
|
// 上一个样本
|
||||||
|
const handlePrev = () => {
|
||||||
|
if (!lbFlag.value) {
|
||||||
|
const ybh = getPreviousNumber(queryParams.value.ybh) as string;
|
||||||
|
queryParams.value.ybh = ybh;
|
||||||
|
const index = labPatList.value.findIndex((item: any) => item.ybh == ybh)
|
||||||
|
if (index !== -1) {
|
||||||
|
highlightRowIndex.value = index;
|
||||||
|
const row = labPatList.value[index];
|
||||||
|
labPatListRef.value.setCurrentRow(row);
|
||||||
|
selectJob(row);
|
||||||
|
} else {
|
||||||
|
handleCreate();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (highlightRowIndex.value > 0) {
|
||||||
|
highlightRowIndex.value--;
|
||||||
|
const row = labPatList.value[highlightRowIndex.value];
|
||||||
|
labPatListRef.value.setCurrentRow(row);
|
||||||
|
selectJob(row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下一个样本
|
||||||
|
const handleNext = () => {
|
||||||
|
if (!lbFlag.value) {
|
||||||
|
const ybh = getNextNumber(queryParams.value.ybh) as string;
|
||||||
|
queryParams.value.ybh = ybh;
|
||||||
|
const index = labPatList.value.findIndex((item: any) => item.ybh == ybh)
|
||||||
|
if (index !== -1) {
|
||||||
|
highlightRowIndex.value = index;
|
||||||
|
const row = labPatList.value[index];
|
||||||
|
labPatListRef.value.setCurrentRow(row);
|
||||||
|
selectJob(row);
|
||||||
|
} else {
|
||||||
|
handleCreate();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (highlightRowIndex.value < labPatList.value.length - 1) {
|
||||||
|
highlightRowIndex.value++;
|
||||||
|
const row = labPatList.value[highlightRowIndex.value];
|
||||||
|
labPatListRef.value.setCurrentRow(row);
|
||||||
|
selectJob(row);
|
||||||
|
} else {
|
||||||
|
queryParams.value.ybh = getNextNumber(queryParams.value.ybh) as string;
|
||||||
|
handleCreate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -369,27 +460,36 @@ interface DictData {
|
|||||||
BT?: Array<any>;
|
BT?: Array<any>;
|
||||||
SRD?: Array<any>;
|
SRD?: Array<any>;
|
||||||
HOS?: Array<any>;
|
HOS?: Array<any>;
|
||||||
|
ST?: Array<any>;
|
||||||
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||||
}
|
}
|
||||||
// 字典数据存储
|
// 字典数据存储
|
||||||
const dictData = ref<DictData>({});
|
const dictData = ref<DictData>({});
|
||||||
|
const labInputcolList = ref([])
|
||||||
|
// 获取参数配置
|
||||||
|
const getSysList = () => {
|
||||||
|
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != '年龄单位' || item.mrts != '!')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getSysList()
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// 加载病人来源字典
|
// // 加载病人来源字典
|
||||||
const dictRefs = await comDict('PT', 'AU', 'SX', 'DP', 'BT', 'SRD', 'HOS');
|
// const dictRefs = await comDict('PT', 'AU', 'SX', 'DP', 'BT', 'SRD', 'HOS', 'ST');
|
||||||
|
|
||||||
// 从 ref 中获取实际数据
|
|
||||||
dictData.value = {
|
|
||||||
PT: toRaw(dictRefs.PT.value) || [],
|
|
||||||
AU: toRaw(dictRefs.AU.value) || [],
|
|
||||||
SX: toRaw(dictRefs.SX.value) || [],
|
|
||||||
DP: toRaw(dictRefs.DP.value) || [],
|
|
||||||
BT: toRaw(dictRefs.BT.value) || [],
|
|
||||||
SRD: toRaw(dictRefs.SRD.value) || [],
|
|
||||||
HOS: toRaw(dictRefs.HOS.value) || [],
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
// // 从 ref 中获取实际数据
|
||||||
|
// dictData.value = {
|
||||||
|
// PT: toRaw(dictRefs.PT.value) || [],
|
||||||
|
// AU: toRaw(dictRefs.AU.value) || [],
|
||||||
|
// SX: toRaw(dictRefs.SX.value) || [],
|
||||||
|
// DP: toRaw(dictRefs.DP.value) || [],
|
||||||
|
// BT: toRaw(dictRefs.BT.value) || [],
|
||||||
|
// SRD: toRaw(dictRefs.SRD.value) || [],
|
||||||
|
// HOS: toRaw(dictRefs.HOS.value) || [],
|
||||||
|
// ST: toRaw(dictRefs.ST.value) || [],
|
||||||
|
// };
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -428,6 +528,7 @@ onMounted(async () => {
|
|||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
87
src/views/liswork/work/others/index.vue
Normal file
87
src/views/liswork/work/others/index.vue
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<div class="others-box">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-table :data="tableData" style="width: 100%" @row-click="handleRowClick" highlight-current-row border
|
||||||
|
height="80vh" show-overflow-tooltip>
|
||||||
|
<el-table-column prop="yq" label="仪器名称" align="center" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ formatyq(scope.row.yq) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="yljg" label="医疗机构" align="center" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ formatDict(scope.row.yljg, 'HOS') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="jyrq" label="检验日期" align="center" width="150" />
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-table :data="tableData" style="width: 100%" @row-click="handleRowClick" highlight-current-row border
|
||||||
|
height="80vh">
|
||||||
|
<el-table-column prop="xmmc" label="项目名称" fixed align="center" />
|
||||||
|
<template v-for="(period) in periods" :key="period">
|
||||||
|
<el-table-column :label="period" :prop="period" :width="150" align="center" />
|
||||||
|
</template>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
import { ref, watch, computed, reactive, toRefs, onMounted } from 'vue';
|
||||||
|
import { otherinstr } from '@/api/liswork/work/LisWork';
|
||||||
|
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 主键
|
||||||
|
queryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
dictData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
instrOptions: {
|
||||||
|
type: Array as PropType<Array<{ yq: string; yqmc: string }>>,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 解构 props
|
||||||
|
const { queryParams, dictData, instrOptions } = toRefs(props);
|
||||||
|
const tableData = ref([]);
|
||||||
|
const periods = ref<string[]>([])
|
||||||
|
onMounted(() => {
|
||||||
|
otherinstr(queryParams.value).then((res: any) => {
|
||||||
|
console.log(res)
|
||||||
|
tableData.value = res.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleRowClick = (row: any) => { }
|
||||||
|
|
||||||
|
|
||||||
|
const formatDict = (v: string, dictType: string) => {
|
||||||
|
return dictData.value[dictType]?.find((item: any) => item.value == v)?.label
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatyq = (v: string) => {
|
||||||
|
return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.others-box {
|
||||||
|
height: 80vh;
|
||||||
|
|
||||||
|
|
||||||
|
:deep(.el-table__cell) {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
11
src/views/liswork/work/reexamination/index.vue
Normal file
11
src/views/liswork/work/reexamination/index.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
结果复查
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
11
src/views/liswork/work/sample/index.vue
Normal file
11
src/views/liswork/work/sample/index.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
样本流转
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
Loading…
x
Reference in New Issue
Block a user