205 lines
6.9 KiB
Vue
205 lines
6.9 KiB
Vue
<template>
|
|
<ContentWrap :istable="true">
|
|
<el-form class="-mb-15px" :inline="true">
|
|
<el-form-item label="条码" prop="medicalSn">
|
|
<el-input v-model="medicalSn" placeholder="请输入条码" clearable class="!w-240px" @blur="handleBlur"/>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="save" type="primary">汇总保存</el-button>
|
|
<el-button @click="submit" type="primary">提交</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</ContentWrap>
|
|
<ContentWrap :istable="true">
|
|
<el-form class="-mb-15px" :inline="true">
|
|
<el-form-item label="条码" prop="medicalSn">
|
|
<el-input v-model="formData2.medicalSn" class="!w-200px"/>
|
|
</el-form-item>
|
|
<el-form-item label="姓名" prop="pname">
|
|
<el-input v-model="formData2.pname" class="!w-200px"/>
|
|
</el-form-item>
|
|
<el-form-item label="性别" prop="gender">
|
|
<el-select v-model="formData2.gender" placeholder="请选择" class="!w-120px">
|
|
<el-option
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="出生日期" prop="birthday" >
|
|
<el-date-picker
|
|
v-model="formData2.birthday"
|
|
type="date"
|
|
value-format="x"
|
|
class="!w-1/1"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="登记日期" prop="medicalDateTime" >
|
|
<el-date-picker
|
|
v-model="formData2.medicalDateTime"
|
|
type="date"
|
|
value-format="x"
|
|
class="!w-1/1"
|
|
/>
|
|
</el-form-item>
|
|
</el-form>
|
|
</ContentWrap>
|
|
<el-row :gutter="20">
|
|
<!-- 左侧部门树 -->
|
|
<el-col :span="8" :xs="24">
|
|
<ContentWrap class="h-1/1">
|
|
<el-table :data="list" @row-click="rowChange" :show-overflow-tooltip="true" :scroll-x="true">
|
|
<el-table-column label="用户编号" align="center" key="id" prop="id" v-if="false"/>
|
|
<el-table-column label="检查项目" align="center" prop="itemName" min-width="100"/>
|
|
<el-table-column label="阳性" align="center" prop="itemResult" min-width="320" />
|
|
</el-table>
|
|
</ContentWrap>
|
|
</el-col>
|
|
<el-col :span="2" :xs="24">
|
|
<ContentWrap class="h-1/1">
|
|
<ul style="list-style-type: none;text-align: center">
|
|
<li style="margin-top: 10px">
|
|
<el-button type="primary" @click="checkAll">全部选中</el-button>
|
|
</li>
|
|
<!-- <li style="margin-top: 10px">
|
|
<el-button type="primary" @click="automaticRollups">自动汇总</el-button>
|
|
</li>-->
|
|
<li style="margin-top: 10px">
|
|
<el-button type="primary" @click="autoEncoding">自动编码</el-button>
|
|
</li>
|
|
<li style="margin-top: 10px">
|
|
<el-button type="primary" @click="clearEncoding">清除编码</el-button>
|
|
</li>
|
|
</ul>
|
|
</ContentWrap>
|
|
</el-col>
|
|
<el-col :span="14" :xs="24">
|
|
<ContentWrap class="h-1/1">
|
|
<ol :style="{ listStyleType: showNumbers ? 'decimal' : 'none' }" style="margin-left: 15px">
|
|
<li v-for="(item, index) in list3" :key="index" @click="handleClick(item)">
|
|
<span style="display: block"> {{ analyseFlag ? '【' : '' }} {{ item.itemResult }} {{ analyseFlag ? '】' : '' }}</span>
|
|
<span style="display: block" v-if="analyseFlag"> <el-input v-model="item.analyse" placeholder="请输入" type="textarea"/> </span>
|
|
</li>
|
|
</ol>
|
|
</ContentWrap>
|
|
</el-col>
|
|
</el-row>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import * as SummaryApi from '@/api/summary'
|
|
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
|
import {Action, ElMessage} from "element-plus";
|
|
|
|
const { t } = useI18n() // 国际化
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
const list = ref([]);
|
|
/*const list = ref([
|
|
{ id: 1, itemName: 'Item 1', itemResult: 'Description for Item 1',analyse: '' },
|
|
{ id: 2, itemName: 'Item 2', itemResult: 'Description for Item 2' ,analyse: ''},
|
|
{ id: 3, itemName: 'Item 3', itemResult: 'Description for Item 3' ,analyse: ''},
|
|
]);*/
|
|
/*const list3 = ref(['Item 1', 'Item 2', 'Item 3', 'Item 4']) // 列表的数*/
|
|
const list3 = ref([
|
|
{ id: undefined, itemName: undefined, itemResult: undefined ,analyse: undefined}]) // 列表的数
|
|
|
|
const showNumbers = ref(false)
|
|
const analyseFlag = ref(false)
|
|
|
|
const checkAll = () => {
|
|
showNumbers.value = false; // 切换显示序号的状态
|
|
/*const descriptions = ref(list.value.map(item => item.description));
|
|
list3.value = descriptions.value*/
|
|
list3.value = list.value
|
|
}
|
|
const automaticRollups = () => {
|
|
ElMessageBox.confirm('自动汇总将会覆盖现有汇总内容是否继续', '提示', {
|
|
confirmButtonText: '继 续',
|
|
cancelButtonText: '取 消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
analyseFlag.value = true;
|
|
/*const descriptions = ref(list.value.map(item => item.description));
|
|
list3.value = descriptions.value*/
|
|
list3.value = list.value
|
|
})
|
|
|
|
}
|
|
const autoEncoding = () => {
|
|
showNumbers.value = true; // 切换显示序号的状态
|
|
}
|
|
const clearEncoding = () => {
|
|
showNumbers.value = false; // 切换显示序号的状态
|
|
}
|
|
const rowChange = (row)=>{
|
|
var flagChange = true;
|
|
for (let i = 0; i < list3.value.length; i++) {
|
|
if (list3.value[i].id == row.id){
|
|
flagChange = false;
|
|
}
|
|
}
|
|
if (flagChange){
|
|
list3.value.push(row)
|
|
}
|
|
|
|
}
|
|
const handleClick = (item) =>{
|
|
analyseFlag.value = true
|
|
}
|
|
|
|
//-------
|
|
const medicalSn = ref()
|
|
|
|
const formData2 = ref({
|
|
id: undefined,
|
|
medicalSn: undefined,
|
|
pname: undefined,
|
|
gender: undefined,
|
|
birthday: undefined,
|
|
medicalDateTime: undefined,
|
|
auditStatus: undefined,
|
|
|
|
|
|
})
|
|
|
|
const handleBlur = async () =>{
|
|
const patientInfo = await SummaryApi.getPatient(medicalSn.value)
|
|
const patientItemsInfo = await SummaryApi.getPatientItems(medicalSn.value)
|
|
formData2.value = patientInfo
|
|
const isCheck = await SummaryApi.isExistUncheck(medicalSn.value);
|
|
if (isCheck){
|
|
await ElMessageBox({
|
|
title: '提示',
|
|
message: h('p', null, [
|
|
h('span', {style: 'color: red'}, '该患者存在检查项目未查或者待查,请全部检查完在进行汇总!'),
|
|
]),
|
|
})
|
|
}else {
|
|
list.value = patientItemsInfo
|
|
}
|
|
|
|
|
|
}
|
|
const save = async () =>{
|
|
await SummaryApi.updateItemsAnalyse(list3.value)
|
|
message.success(t('common.updateSuccess'))
|
|
}
|
|
const submit = async () =>{
|
|
if(formData2.value.medicalSn == null || formData2.value.medicalSn == ''){
|
|
message.error(t('请输入条码!'))
|
|
return
|
|
}
|
|
if(formData2.value.auditStatus == 0){
|
|
message.error(t('已审核通过,无须再次提交!'))
|
|
}else if (formData2.value.auditStatus == 2){
|
|
message.error(t('已提交,无须再次提交!'))
|
|
}else {
|
|
await SummaryApi.updateAudit(medicalSn.value,2,'')
|
|
message.success(t('提交成功'))
|
|
}
|
|
|
|
}
|
|
</script>
|