FlowBL/src/views/tblist/patientexamlist/index.vue

531 lines
16 KiB
Vue
Raw Normal View History

2024-07-09 20:23:02 +08:00
<template>
2024-08-22 12:01:11 +08:00
<ContentWrap style="height: 145px">
2024-07-31 19:35:52 +08:00
<!-- 搜索工作栏 影像工作站-->
2024-07-09 20:23:02 +08:00
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
2024-07-09 20:23:02 +08:00
>
<el-row :gutter="8">
<el-col :span="4">
<el-form-item label="检查单号" prop="examId">
<el-input
v-model="queryParams.examId"
placeholder="检查单号"
clearable
@keyup.enter="handleQuery"
class="!w-160px"
2024-07-31 19:35:52 +08:00
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="患者姓名" prop="pName">
<el-input
v-model="queryParams.pname"
placeholder="请输入患者姓名"
clearable
@keyup.enter="handleQuery"
class="!w-160px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="检查项目" prop="examItemName">
<el-input
v-model="queryParams.examItemName"
placeholder="请输入检查项"
clearable
@keyup.enter="handleQuery"
class="!w-160px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="报告状态" prop="reportstatus">
<el-select
v-model="queryParams.reportstatus"
placeholder="请选择报告状态"
clearable
class="!w-160px"
>
<el-option label="已分检" value="已分检" />
<el-option label="已分析" value="已分析" />
<el-option label="待分析" value="待分析" />
<el-option label="已审核" value="已审核" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="检查日期" prop="examDate" size="mini">
<!-- aaaaa -->
<el-radio-group
ref="examDate_radio"
v-model="examDate_radio_value"
@change="examDate_radio_change"
>
<el-radio style="margin-right: 15px" :value="0">全部</el-radio>
<el-radio style="margin-right: 15px" :value="1">今天</el-radio>
<el-radio style="margin-right: 15px" :value="2">昨天</el-radio>
<el-radio style="margin-right: 15px" :value="3">三天内</el-radio>
<el-radio style="margin-right: 15px" :value="4">一周</el-radio>
<el-radio style="margin-right: 25px" :value="5">
<el-date-picker
ref="examDate_picker"
:disabled="examDate_radio_value === 5 ? false : true"
v-model="queryParams.examDate"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-form>
<el-form-item>
2024-08-22 12:01:11 +08:00
<el-button
@click="handleQuery"
style="
margin-right: 0px;
margin-left: auto;
background-color: rgba(56, 119, 246, 1);
font-size: 14px;
color: rgba(255, 255, 255, 1);
"
><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
>
<el-button @click="resetQuery" style=""
><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
>
<!-- <el-button
2024-07-09 20:23:02 +08:00
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['tblist:patientexamlist:create']"
v-if="false"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button> -->
2024-08-22 12:01:11 +08:00
</el-form-item>
2024-07-09 20:23:02 +08:00
</ContentWrap>
2024-08-22 12:01:11 +08:00
<ContentWrap style="height: 65px">
<el-form-item>
<el-button
2024-08-22 12:01:11 +08:00
style="
margin-right: 0px;
margin-left: auto;
background-color: rgb(56, 119, 246);
font-size: 14px;
color: rgb(255, 255, 255);
"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['tblist:patientexamlist:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
2024-08-22 12:01:11 +08:00
<el-button
@click="dicomDataSync"
style="background-color: rgb(28, 176, 117); font-size: 14; color: rgb(255, 255, 255)"
><Icon icon="ep:refresh" class="mr-5px" /> 同步</el-button
>
<el-button
@click="dicomDataRefresh"
style="background-color: rgb(28, 176, 117); font-size: 14; color: rgb(255, 255, 255)"
><Icon icon="ep:refresh" class="mr-5px" /> 刷新</el-button
>
</el-form-item>
</ContentWrap>
2024-07-09 20:23:02 +08:00
<!-- 列表 -->
<ContentWrap>
2024-07-31 19:35:52 +08:00
<el-table
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
@row-dblclick="handleEdit"
2024-08-22 12:01:11 +08:00
:header-cell-style="{ background: 'rgb(235, 241, 250)', height: '56px', color: '#333333' }"
:row-style="{ height: '56px' }"
2024-07-31 19:35:52 +08:00
>
<el-table-column type="index" width="50px" />
<el-table-column label="" width="100px">
2024-07-31 19:35:52 +08:00
<template #default="scope">
<el-image :src="scope.row.thumbnailImgUrl" />
</template>
2024-07-09 20:23:02 +08:00
</el-table-column>
2024-07-31 19:35:52 +08:00
<el-table-column label="主键" align="center" prop="id" v-if="false" />
2024-08-16 13:44:19 +08:00
<el-table-column label="检查单号" align="center" prop="examId" width="250px" />
<el-table-column label="患者姓名" align="center" prop="pname" width="200px" />
2024-07-09 20:23:02 +08:00
<el-table-column label="性别" align="center" prop="gender" />
2024-08-15 13:06:03 +08:00
<el-table-column label="出生日期" align="center" prop="birthday" v-if="false" />
2024-07-09 20:23:02 +08:00
<el-table-column
label="检查日期"
align="center"
prop="examDate"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="设备类型" align="center" prop="deviceType" />
2024-08-16 13:44:19 +08:00
<el-table-column label="序列/数量" align="center" prop="seDc" width="100px" />
2024-08-15 13:06:03 +08:00
<el-table-column label="检查项目名称" align="center" prop="examItemName" width="180px" />
2024-07-09 20:23:02 +08:00
<el-table-column label="报告状态" align="center" prop="reportstatus" width="100px">
2024-07-31 19:35:52 +08:00
<template #default="scope">
<el-tag :type="scope.row.reportstatus === '已审核' ? 'danger' : 'success'">
<span style="">{{ scope.row.reportstatus }}</span>
</el-tag>
</template>
</el-table-column>
2024-07-09 20:23:02 +08:00
<el-table-column
label="申请日期"
align="center"
prop="applicationDate"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column
label="上传时间"
align="center"
prop="uploadDate"
:formatter="dateFormatter"
width="180px"
/>
2024-08-16 13:44:19 +08:00
<el-table-column label="机构名称" align="center" prop="orgName" width="280px" />
2024-07-31 19:35:52 +08:00
<el-table-column label="机构ID" align="center" prop="orgId" v-if="false" />
<el-table-column
label="上级判读机构id列表orgid1,orgid2,orgid3"
align="center"
prop="highLevelOrgId"
v-if="false"
/>
2024-07-09 20:23:02 +08:00
<el-table-column
label="创建时间:年月日时分秒"
align="center"
prop="createDate"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
2024-07-31 19:35:52 +08:00
<el-table-column label="检查所见" align="center" prop="examDescription" v-if="false" />
<el-table-column label="诊断结论" align="center" prop="diagResults" v-if="false" />
2024-07-09 20:23:02 +08:00
<el-table-column
label="下诊断结论的时间:年月日时分秒"
align="center"
prop="diagDate"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column label="诊断医生" align="center" prop="diagDoctor" v-if="false" />
<el-table-column label="审核医生" align="center" prop="reviewDoctor" v-if="false" />
<el-table-column
label="审核日期:年月日时分秒"
align="center"
prop="reviewDate"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column
label="框架需要:创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column label="操作" align="center" fixed="right">
2024-07-09 20:23:02 +08:00
<template #default="scope">
<el-button
2024-08-22 12:01:11 +08:00
link
style="color: rgb(56, 119, 246)"
2024-07-31 19:35:52 +08:00
size="small"
2024-07-09 20:23:02 +08:00
type="primary"
2024-07-31 19:35:52 +08:00
@click="getuporghiorgid(scope.row.id, scope.row.orgId, scope.row.reportstatus)"
v-hasPermi="['tblist:patientexamlist:query']"
2024-07-09 20:23:02 +08:00
>
申请
</el-button>
2024-07-31 19:35:52 +08:00
<!-- <el-button
2024-07-09 20:23:02 +08:00
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['tblist:patientexamlist:delete']"
>
删除
</el-button> -->
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
2024-08-04 18:23:33 +08:00
<!-- 表单弹窗影像组件 -->
<DicomViewForm ref="dicomViewRef" @success="getList" />
2024-07-09 20:23:02 +08:00
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { PatientexamlistApi, PatientexamlistVO } from '@/api/tblist/patientexamlist'
import PatientexamlistForm from './PatientexamlistForm.vue'
2024-08-04 18:23:33 +08:00
import DicomViewForm from '/src/views/dicomForm/dicomViewForm.vue'
2024-07-09 20:23:02 +08:00
/** PACS检查列表 列表 */
defineOptions({ name: 'Patientexamlist' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const loading = ref(true) // 列表的加载中
const list = ref<PatientexamlistVO[]>([]) // 列表的数据
const total = ref(0) // 列表的总页数
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
examId: undefined,
pname: undefined,
gender: undefined,
birthday: undefined,
examDate: [],
2024-07-31 19:35:52 +08:00
deviceType: '',
2024-07-09 20:23:02 +08:00
seDc: undefined,
examItemName: undefined,
2024-08-22 12:01:11 +08:00
reportstatus: '',
2024-07-09 20:23:02 +08:00
applicationDate: [],
uploadDate: [],
orgName: undefined,
2024-07-31 19:35:52 +08:00
orgId: '',
highLevelOrgId: '',
2024-07-09 20:23:02 +08:00
createDate: [],
examDescription: undefined,
diagResults: undefined,
diagDate: [],
diagDoctor: undefined,
reviewDoctor: undefined,
reviewDate: [],
thumbnailImgUrl: undefined,
2024-07-31 19:35:52 +08:00
createTime: []
2024-07-09 20:23:02 +08:00
})
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
2024-08-04 18:23:33 +08:00
/** 影像组件 */
const dicomViewRef = ref()
2024-08-16 12:29:27 +08:00
const opendicomViewFrom = (id: number, orgid: string, regid: string, examId: string) => {
dicomViewRef.value.open(id, orgid, regid, examId)
2024-08-15 13:58:27 +08:00
}
2024-07-17 21:01:02 +08:00
/** 表格行点击 */
2024-07-31 19:35:52 +08:00
const clickNumber = ref(0)
2024-07-17 21:01:02 +08:00
function handleEdit(row) {
console.log(111111121212)
2024-08-16 12:29:27 +08:00
if (!row.deviceType.includes('US')) {
//US是超声类
opendicomViewFrom(row.id, row.orgId, row.regId, row.examId)
2024-08-16 12:29:27 +08:00
/* clickNumber.value++;
2024-07-17 21:01:02 +08:00
if (clickNumber.value == 2) {
}
clickNumber.value = 0; */
2024-08-16 12:29:27 +08:00
}
}
2024-07-17 21:01:02 +08:00
2024-07-09 20:23:02 +08:00
/** aaaaa **/
2024-07-31 19:35:52 +08:00
const examDate_picker = ref(null)
const examDate_radio = ref(null)
const examDate_radio_value = ref(3)
2024-07-09 20:23:02 +08:00
2024-07-31 19:35:52 +08:00
const examDate_radio_change = () => {
if ([1, 2, 3, 4].includes(examDate_radio_value.value)) {
let timesta = new Date()
let timeend = new Date()
//判断当前选择的是那个时间
2024-07-31 19:35:52 +08:00
if (examDate_radio_value.value === 1) {
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
} else if (examDate_radio_value.value === 2) {
timesta.setDate(timesta.getDate() - 1)
2024-07-31 19:35:52 +08:00
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
} else if (examDate_radio_value.value === 3) {
timesta.setDate(timesta.getDate() - 3)
2024-07-31 19:35:52 +08:00
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
} else if (examDate_radio_value.value === 4) {
timesta.setDate(timesta.getDate() - 7)
2024-07-31 19:35:52 +08:00
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
}
2024-07-31 19:35:52 +08:00
handleQuery()
} else if (5 === examDate_radio_value.value) {
queryParams.examDate = []
} else if (0 === examDate_radio_value.value) {
queryParams.examDate = []
handleQuery()
}
2024-07-09 20:23:02 +08:00
}
///转换时间格式
function nowDate(time) {
2024-07-31 19:35:52 +08:00
var year = time.getFullYear() // 年
var month = (time.getMonth() + 1).toString().padStart(2, '0') // 月
var date = time.getDate().toString().padStart(2, '0') // 日
var hour = time.getHours().toString().padStart(2, '0') // 时
var minute = time.getMinutes().toString().padStart(2, '0') // 分
var second = time.getSeconds().toString().padStart(2, '0') // 秒
return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second
}
2024-07-09 20:23:02 +08:00
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
2024-08-15 15:13:47 +08:00
queryParams.deviceType = 'CT'
2024-07-09 20:23:02 +08:00
const data = await PatientexamlistApi.getPatientexamlistPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
2024-08-15 13:06:03 +08:00
const dicomDataSync = async () => {
2024-08-22 12:01:11 +08:00
const data = await PatientexamlistApi.dicomDataSync()
if (data.code == 'success') {
if (data.syncItems == '0') {
message.info('暂无可同步数据')
} else {
queryParams.reportstatus = '待分析'
examDate_radio_value.value = 0
examDate_radio_change()
message.success('数据同步成功')
}
} else {
message.error('数据同步失败')
}
2024-08-15 13:06:03 +08:00
}
2024-08-22 12:01:11 +08:00
// 分检数据刷新
const dicomDataRefresh = async () => {
await PatientexamlistApi.dicomDataRefresh()
examDate_radio_change()
}
2024-08-15 13:06:03 +08:00
2024-07-09 20:23:02 +08:00
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
2024-08-15 15:13:47 +08:00
queryParams.deviceType = 'CT'
2024-07-31 19:35:52 +08:00
//获取到当前登陆用户的机构时 要进行赋值
queryParams.orgId = ''
queryParams.highLevelOrgId = ''
2024-07-09 20:23:02 +08:00
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
2024-07-31 19:35:52 +08:00
queryFormRef.value.resetFields()
2024-07-09 20:23:02 +08:00
/** aaaaa **/
//新写法
2024-07-31 19:35:52 +08:00
examDate_radio_value.value = 1
examDate_radio_change()
if (5 === examDate_radio_value.value) handleQuery()
2024-07-09 20:23:02 +08:00
//老写法
//handleQuery();
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 申请后更新上级机构字段*/
2024-07-31 19:35:52 +08:00
const getuporghiorgid = async (id: number, orgId: string, reportstatus: string) => {
try {
2024-07-31 19:35:52 +08:00
if (reportstatus == '未申请') {
await message.confirm('是否要进行申请?', '确认提示')
await PatientexamlistApi.getuporghiid(id, orgId)
message.success(t('common.delSuccess'))
// 刷新列表
await getList()
} else {
await message.info('只有未申请才可以进行操作')
}
} catch {}
}
2024-07-09 20:23:02 +08:00
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
// 删除的二次确认
await message.delConfirm()
// 发起删除
await PatientexamlistApi.deletePatientexamlist(id)
message.success(t('common.delSuccess'))
// 刷新列表
await getList()
} catch {}
}
/** 申请按钮操作 */
const handleSub = async (id: number) => {
try {
// 删除的二次确认
await message.delConfirm()
// 发起删除
await PatientexamlistApi.deletePatientexamlist(id)
message.success(t('common.delSuccess'))
// 刷新列表
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
// 导出的二次确认
await message.exportConfirm()
// 发起导出
exportLoading.value = true
const data = await PatientexamlistApi.exportPatientexamlist(queryParams)
download.excel(data, 'PACS检查列表.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
//在初始化的时候查询到当前登陆用户的机构 和上级机构
2024-07-09 20:23:02 +08:00
/** aaaaa **/
//新代码
2024-07-31 19:35:52 +08:00
examDate_radio_change()
if (5 === examDate_radio_value.value) handleQuery()
2024-07-09 20:23:02 +08:00
//老代码
//getList();
})
</script>
<style>
/* 为了防止 el-form-item 的标签文本换行可以添加以下CSS样式 */
.el-form-item__label {
white-space: nowrap;
}
2024-07-31 19:35:52 +08:00
</style>