|
@@ -1,5 +1,4 @@
|
|
|
<template>
|
|
|
-
|
|
|
<div class="layout_container">
|
|
|
<header>
|
|
|
<el-date-picker
|
|
@@ -22,8 +21,8 @@
|
|
|
<aside class="layout_el-table">
|
|
|
<el-table ref="indexTable" :data="inspectionsIndex" stripe @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column prop="ordr_CREATE_DATE" label="报告时间" width="160"></el-table-column>
|
|
|
- <el-table-column prop="aply_CTNT" label="检验名称" width="260"></el-table-column>
|
|
|
+ <el-table-column prop="trscDate" label="报告时间" width="160"></el-table-column>
|
|
|
+ <el-table-column prop="examPurpose" label="检验名称" width="260"></el-table-column>
|
|
|
</el-table>
|
|
|
</aside>
|
|
|
<div class="layout_main">
|
|
@@ -51,9 +50,10 @@
|
|
|
<script setup>
|
|
|
import {onMounted, ref} from 'vue'
|
|
|
import {healthCardShortcuts} from '@/data/shortcuts'
|
|
|
-import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
+import {ElMessageBox} from 'element-plus'
|
|
|
import {getIndexByBarCode, getIndexByTjNo, pushSelectedResult} from '@/api/inspections'
|
|
|
import {formatDate} from '@/utils/date'
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
|
|
|
const datePeriod = ref([])
|
|
|
const customerInfo = ref({})
|
|
@@ -66,17 +66,12 @@ const autoPush = ref(true)
|
|
|
|
|
|
const makeParam = (value) => {
|
|
|
if (!datePeriod.value) {
|
|
|
- ElMessage({
|
|
|
- message: '请选择日期范围',
|
|
|
- type: 'warning',
|
|
|
- duration: 2000,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
+ xcMessage.warning('请选择日期范围')
|
|
|
return
|
|
|
}
|
|
|
return {
|
|
|
- start: formatDate(datePeriod.value[0]),
|
|
|
- end: formatDate(datePeriod.value[1]),
|
|
|
+ reqStartTime: formatDate(datePeriod.value[0]),
|
|
|
+ reqEndTime: formatDate(datePeriod.value[1]),
|
|
|
content: value,
|
|
|
}
|
|
|
}
|
|
@@ -114,12 +109,7 @@ const scanBarCode = () => {
|
|
|
|
|
|
const fixTjNo = () => {
|
|
|
if (!customerInfo.value.name) {
|
|
|
- ElMessage({
|
|
|
- message: '请先扫描健康证条码。',
|
|
|
- type: 'warning',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
+ xcMessage.warning('请先扫描健康证条码。')
|
|
|
return
|
|
|
}
|
|
|
ElMessageBox.prompt('请扫描或输入【' + customerInfo.value.name + '】的体检号', '提示', {
|
|
@@ -128,12 +118,7 @@ const fixTjNo = () => {
|
|
|
}).then(({value}) => {
|
|
|
getIndexByTjNo(makeParam(value)).then((res) => {
|
|
|
if (!res || res.length === 0) {
|
|
|
- ElMessage({
|
|
|
- message: '没有找到体检号【' + value + '】对应的检查,请确认日期范围是否正确。',
|
|
|
- type: 'warning',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
+ xcMessage.warning('没有找到体检号【' + value + '】对应的检查,请确认日期范围是否正确。')
|
|
|
} else {
|
|
|
inspectionsIndex.value = res
|
|
|
if (autoPush.value && isInspectionsCompleted(inspectionsIndex.value)) {
|
|
@@ -155,13 +140,13 @@ const isInspectionsCompleted = (val) => {
|
|
|
let jk02 = false
|
|
|
let jk03 = false
|
|
|
val.forEach((item) => {
|
|
|
- if (item.aply_CTNT.indexOf('大便培养') !== -1 || item.aply_CTNT.indexOf('大便体检') !== -1) {
|
|
|
+ if (item.examPurpose.indexOf('大便培养') !== -1 || item.examPurpose.indexOf('大便体检') !== -1) {
|
|
|
jk01 = true
|
|
|
}
|
|
|
- if (item.aply_CTNT.indexOf('甲肝抗体') !== -1 && item.aply_CTNT.indexOf('戊肝抗体') !== -1) {
|
|
|
+ if (item.examPurpose.indexOf('甲肝抗体') !== -1 && item.examPurpose.indexOf('戊肝抗体') !== -1) {
|
|
|
jk02 = true
|
|
|
}
|
|
|
- if (item.aply_CTNT.indexOf('核酸') !== -1) {
|
|
|
+ if (item.examPurpose.indexOf('核酸') !== -1) {
|
|
|
jk03 = true
|
|
|
}
|
|
|
})
|
|
@@ -187,20 +172,10 @@ const uploadSelected = (rows) => {
|
|
|
pushSelectedResult(param).then((res) => {
|
|
|
pushResult.value = res
|
|
|
if (res.JK01 === '推送成功' && res.JK02 === '推送成功') {
|
|
|
- ElMessage({
|
|
|
- message: '推送成功。',
|
|
|
- type: 'success',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
+ xcMessage.success('推送成功。')
|
|
|
scanBarCode()
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- message: '推送失败。',
|
|
|
- type: 'error',
|
|
|
- duration: 2500,
|
|
|
- showClose: true,
|
|
|
- })
|
|
|
+ xcMessage.error('推送失败。')
|
|
|
}
|
|
|
})
|
|
|
}
|