修改分检增加业务表操作内容
This commit is contained in:
parent
9281dadf57
commit
ef53e538ae
@ -16,7 +16,7 @@
|
||||
"build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",
|
||||
"serve:dev": "vite preview --mode dev",
|
||||
"serve:prod": "vite preview --mode prod",
|
||||
"preview": "pnpm build:local && vite preview",
|
||||
"preview": "pnpm build:dev && vite preview",
|
||||
"clean": "npx rimraf node_modules",
|
||||
"clean:cache": "npx rimraf node_modules/.cache",
|
||||
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
||||
|
BIN
public/static/101缩略图.jpg
Normal file
BIN
public/static/101缩略图.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
BIN
public/static/201缩略图.jpg
Normal file
BIN
public/static/201缩略图.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -33,6 +33,22 @@ export interface UPFJApplyformVO {
|
||||
id: string // 主键
|
||||
device: string // 设备内容
|
||||
sortDoctor:string//分检医生 也就是当前登录人
|
||||
worklist:DicomworklistVO[]
|
||||
}
|
||||
// 分检业务表 VO
|
||||
export interface DicomworklistVO {
|
||||
accessionN: string // 唯一的号
|
||||
patientID: string // 患者ID
|
||||
patientNam: string // 姓名
|
||||
patientBir: string // 日期
|
||||
patientSex: string // 性别
|
||||
studyInsta: string // 1
|
||||
modality: string // 1
|
||||
scheduledA: string // 1
|
||||
startDate: string // 1
|
||||
startTime: string // 1
|
||||
orgId: string // 1
|
||||
registrant: string // 登记医生
|
||||
}
|
||||
|
||||
// 申请登记记录 API
|
||||
|
@ -2,24 +2,28 @@
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model=formData
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
|
||||
<el-form-item label="当前患者" v-if="false" >
|
||||
<el-input v-model="name" />
|
||||
<el-form-item label="当前患者" v-if="false">
|
||||
<el-input v-model="name" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="分诊设备" >
|
||||
<el-form-item label="分诊设备">
|
||||
<el-select
|
||||
v-model="fordevicemValue"
|
||||
placeholder="请选择分诊设备"
|
||||
clearable
|
||||
class="!w-300px"
|
||||
>
|
||||
<el-option v-for="item in fordevicemData" :key="item.deviceId" :label="item.deviceName+'|'+item.deviceType+'|'+item.deviceId" :value="item.deviceName+'|'+item.deviceId" />
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fordevicemData"
|
||||
:key="item.deviceId"
|
||||
:label="item.deviceName + '|' + item.deviceType + '|' + item.deviceId+'|'+item.ScheduledAET"
|
||||
:value="item.deviceName + '|' + item.deviceId + '|' + item.deviceType+'|'+item.ScheduledAET"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -30,14 +34,19 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ApplyformApi, ApplyformVO,UPFJApplyformVO } from '@/api/applyregistration/applyform'
|
||||
import {
|
||||
ApplyformApi,
|
||||
ApplyformVO,
|
||||
UPFJApplyformVO,
|
||||
DicomworklistVO
|
||||
} from '@/api/applyregistration/applyform'
|
||||
|
||||
/** 申请登记记录 表单 */
|
||||
defineOptions({ name: 'ApplyformForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const upFJApplyformVO = ref<UPFJApplyformVO[]>([]);
|
||||
const upFJApplyformVO = ref<UPFJApplyformVO[]>([])
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
@ -63,100 +72,220 @@ const formData = ref({
|
||||
createDate: undefined,
|
||||
examItemCode: undefined,
|
||||
orgId: undefined,
|
||||
sortDoctor: undefined,
|
||||
sortDoctor: undefined
|
||||
})
|
||||
|
||||
|
||||
|
||||
const fordevicemValue = ref('')
|
||||
const name = ref('')
|
||||
let ID:number=0//表单ID
|
||||
let Username:string=""//分检医生
|
||||
let ID: number = 0 //表单ID
|
||||
let Username: string = '' //分检医生
|
||||
const fordevicemData = ref<any[]>([])
|
||||
const selectedRows = ref<any[]>([]); // 存储当前选中的行
|
||||
const formRules = reactive({
|
||||
})
|
||||
const selectedRows = ref<any[]>([]) // 存储当前选中的行
|
||||
const formRules = reactive({})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const uprow = ref<any[]>([]) //当前选择的患者的行 单个患者的
|
||||
//分检相关表数据
|
||||
const worklistarrayvo = ref<DicomworklistVO[]>([])
|
||||
const worklistvo = ref({} as DicomworklistVO)
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, orgId: string,pname:string,id:number,username:string,list:any[]) => {
|
||||
const open = async (
|
||||
type: string,
|
||||
orgId: string,
|
||||
pname: string,
|
||||
id: number,
|
||||
username: string,
|
||||
list: any[],
|
||||
Row: any[]
|
||||
) => {
|
||||
dialogVisible.value = true
|
||||
|
||||
|
||||
dialogTitle.value = type
|
||||
// formType.value = type
|
||||
name.value=pname
|
||||
ID=id
|
||||
Username=username
|
||||
// formType.value = type
|
||||
name.value = pname
|
||||
ID = id
|
||||
Username = username
|
||||
resetForm()
|
||||
if(type=="批量")
|
||||
{
|
||||
selectedRows.value=list
|
||||
console.log("批量"+list.length)
|
||||
}
|
||||
|
||||
if (type == '批量') {
|
||||
selectedRows.value = list
|
||||
console.log('批量' + list.length)
|
||||
} else {
|
||||
uprow.value = Row
|
||||
}
|
||||
|
||||
// 修改时,设置数据
|
||||
|
||||
formLoading.value = true
|
||||
try {
|
||||
|
||||
|
||||
|
||||
formLoading.value = true
|
||||
try {
|
||||
fordevicemData.value = await ApplyformApi.getDevicelist(orgId)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
|
||||
|
||||
// 校验表单
|
||||
if(!fordevicemValue.value)
|
||||
{
|
||||
await message.alert("请选择分检设备")
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!fordevicemValue.value) {
|
||||
await message.alert('请选择分检设备')
|
||||
} else {
|
||||
// 拿到设备类型
|
||||
let devtype = fordevicemValue.value.split('|')[2]
|
||||
// 拿到设备AET
|
||||
let devAET = fordevicemValue.value.split('|')[3]
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
if(dialogTitle.value=="批量")
|
||||
{
|
||||
/* // 批量分检的二次确
|
||||
formLoading.value = true
|
||||
try {
|
||||
if (dialogTitle.value == '批量') {
|
||||
/* // 批量分检的二次确
|
||||
await message.delConfirm("是否批量分检选择内容") */
|
||||
selectedRows.value.forEach((item) => {
|
||||
console.log(`selectedRows ${Username} was unselected.`);
|
||||
upFJApplyformVO.value.push({ id: item.id, device:item.deviceName+'|'+item.deviceId,sortDoctor: Username})
|
||||
});
|
||||
|
||||
selectedRows.value.forEach((item) => {
|
||||
console.log(`selectedRows ${Username} was unselected.`)
|
||||
//批量分检
|
||||
let Random = generateUniqueTimeRandomNumber()
|
||||
// 直接获取行数据是个时间戳 给他转换--------------
|
||||
const date = new Date(item.birthday)
|
||||
const isoString = date.toISOString().substring(0, 10)
|
||||
let formattedDate = computed(() => isoString.replace(/-/g, ''))
|
||||
// -----------------------------------------
|
||||
// 分割日期和时间
|
||||
const datatime = new Date(item.examDate)
|
||||
const [datePart, timePart] = datatime
|
||||
.toISOString()
|
||||
.substring(0, 19)
|
||||
.replace('T', ' ')
|
||||
.split(' ')
|
||||
// 存放业务表数据
|
||||
let array = [] as DicomworklistVO[]
|
||||
let worklistvo: DicomworklistVO = {
|
||||
accessionN: Random,
|
||||
patientID: item.regId,
|
||||
patientNam: item.pname,
|
||||
patientBir: formattedDate.value,
|
||||
patientSex: getGenderCode(item.gender),
|
||||
studyInsta: Random,
|
||||
modality: devtype,
|
||||
scheduledA: devAET,
|
||||
startDate: formatDate(datePart),
|
||||
startTime: formatDate(datePart),
|
||||
orgId: '',
|
||||
registrant: ''
|
||||
}
|
||||
array.push(worklistvo)
|
||||
|
||||
upFJApplyformVO.value.push({
|
||||
id: item.id,
|
||||
device: item.deviceName + '|' + item.deviceId,
|
||||
sortDoctor: Username,
|
||||
worklist: array
|
||||
})
|
||||
})
|
||||
await ApplyformApi.batchupdateFJApplyform(upFJApplyformVO.value)
|
||||
}
|
||||
else{
|
||||
await ApplyformApi.updateFJApplyform({ id: ID.toString(), device:fordevicemValue.value.toString(),sortDoctor: Username})
|
||||
}
|
||||
|
||||
message.success("分检成功")
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
} else {
|
||||
//单独分检 获取信息
|
||||
let Random = generateUniqueTimeRandomNumber()
|
||||
// 直接获取行数据是个时间戳 给他转换--------------
|
||||
const date = new Date(uprow.value.birthday)
|
||||
const isoString = date.toISOString().substring(0, 10)
|
||||
let formattedDate = computed(() => isoString.replace(/-/g, ''))
|
||||
// -----------------------------------------
|
||||
// 分割日期和时间
|
||||
const datatime = new Date(uprow.value.examDate)
|
||||
const [datePart, timePart] = datatime
|
||||
.toISOString()
|
||||
.substring(0, 19)
|
||||
.replace('T', ' ')
|
||||
.split(' ')
|
||||
console.log('datePart' + datePart)
|
||||
console.log('timePart' + timePart)
|
||||
worklistarrayvo.value.push({
|
||||
accessionN: Random,
|
||||
patientID: uprow.value.regId,
|
||||
patientNam: uprow.value.pname,
|
||||
patientBir: formattedDate.value,
|
||||
patientSex: getGenderCode(uprow.value.gender),
|
||||
studyInsta: Random,
|
||||
modality: devtype,
|
||||
scheduledA: devAET,
|
||||
startDate: formatDate(datePart),
|
||||
startTime: formatTime(timePart),
|
||||
orgId: '',
|
||||
registrant: ''
|
||||
})
|
||||
console.log(worklistarrayvo.value)
|
||||
await ApplyformApi.updateFJApplyform({
|
||||
id: ID.toString(),
|
||||
device: fordevicemValue.value.toString(),
|
||||
sortDoctor: Username,
|
||||
worklist: worklistarrayvo.value
|
||||
})
|
||||
}
|
||||
|
||||
message.success('分检成功')
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取一个6位的随机数
|
||||
function generateUniqueTimeRandomNumber() {
|
||||
// 获取当前日期
|
||||
const now = new Date()
|
||||
// 获取当前年份的最后两位
|
||||
const year = now.getFullYear().toString().slice(-2)
|
||||
// 获取当前月份,JavaScript中月份是从0开始的,所以需要+1
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0')
|
||||
// 获取当前日,确保是两位数字
|
||||
const day = String(now.getDate()).padStart(2, '0')
|
||||
// 构建时间部分,格式为 "yyMMdd"
|
||||
const timePart = `${year}${month}${day}`
|
||||
|
||||
// 生成0到99之间的随机数
|
||||
const randomPart = Math.floor(Math.random() * 100)
|
||||
.toString()
|
||||
.padStart(2, '0')
|
||||
|
||||
// 拼接时间戳和随机数,返回最终的字符串
|
||||
return `${timePart}${randomPart}`
|
||||
}
|
||||
// 性别转换
|
||||
function getGenderCode(gender) {
|
||||
const genderCode = {
|
||||
男: 'M',
|
||||
女: 'F'
|
||||
}
|
||||
// 返回对应的性别代码,如果输入不是预期的值,则返回 undefined 或默认值
|
||||
return genderCode[gender]
|
||||
}
|
||||
|
||||
// 函数:将日期字符串转换为 "YYYYMMDD" 格式
|
||||
function formatDate(dateString) {
|
||||
const dateParts = dateString.split('-').map((part) => part.padStart(2, '0'))
|
||||
return dateParts.join('')
|
||||
}
|
||||
|
||||
// 函数:将时间字符串转换为纯数字格式
|
||||
function formatTime(timeString) {
|
||||
const timeParts = timeString.split(':').map((part) => parseInt(part, 10))
|
||||
return timeParts.reduce((acc, value) => acc * 100 + value, 0)
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
fordevicemData.value =[]
|
||||
fordevicemValue.value=''
|
||||
upFJApplyformVO.value=[]
|
||||
selectedRows.value=[]
|
||||
fordevicemData.value = []
|
||||
fordevicemValue.value = ''
|
||||
upFJApplyformVO.value = []
|
||||
selectedRows.value = []
|
||||
uprow.value = [] //当前选择的患者的行 单个患者的
|
||||
//分检相关表数据
|
||||
worklistvo.value = {} as DicomworklistVO
|
||||
worklistarrayvo.value = []
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -236,7 +236,7 @@
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
openForm('分检', scope.row.pname, scope.row.orgId, scope.row.id, scope.row.examStatus)
|
||||
openForm('分检', scope.row.pname, scope.row.orgId, scope.row.id, scope.row.examStatus,scope.row)
|
||||
"
|
||||
v-hasPermi="['applyregistration:applyform:update']"
|
||||
>
|
||||
@ -355,9 +355,10 @@ const Sync = async () => {
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, pname: string, orgid: string, ID: number, status: string) => {
|
||||
const openForm = (type: string, pname: string, orgid: string, ID: number, status: string,row:any[]) => {
|
||||
console.log(row);
|
||||
if (status == '未分检') {
|
||||
formRef.value.open(type, orgid, pname, ID, Profilevo.value.username, [])
|
||||
formRef.value.open(type, orgid, pname, ID, Profilevo.value.username, [],row)
|
||||
} else {
|
||||
message.warning('只有未分检才可以进行分检操作')
|
||||
}
|
||||
@ -410,7 +411,7 @@ const batchhandle = async (username: string) => {
|
||||
}
|
||||
console.log(`orgid ${orgid} was unselected.`)
|
||||
console.log(`username ${username} was unselected.`)
|
||||
formRef.value.open('批量', orgid, '', 0, username, previouslySelectedRows.value)
|
||||
formRef.value.open('批量', orgid, '', 0, username, previouslySelectedRows.value,[])
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
@ -322,11 +322,11 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报告" name="report" >
|
||||
<!--报告区域-->
|
||||
<div class="flex-center" id="printMe" style="height: calc(100% - 15px)">
|
||||
<div class="ultrasound-report" id="PDF">
|
||||
<div id="my-printMe" style="height: calc(100% - 15px)">
|
||||
<div class="my-ultrasound-report1" id="PDF">
|
||||
<h2>超声检查报告单</h2>
|
||||
<hr />
|
||||
<div class="patient-info">
|
||||
<div class="my-patient-info">
|
||||
<p class="info-item">姓名:{{ applyFormVO.pname }}</p>
|
||||
<p class="info-item">送检科室:{{ applyFormVO.billDoctorDepartment }}</p>
|
||||
<p class="info-item">门诊号:{{ applyFormVO.examId }}</p>
|
||||
@ -339,8 +339,8 @@
|
||||
<hr />
|
||||
<!-- 图片展示区域 -->
|
||||
<h3>超声图像:</h3>
|
||||
<div class="image-gallery">
|
||||
<div class="image-item-container" v-for="image in reportimages" :key="image.id">
|
||||
<div class="my-image-gallery1">
|
||||
<div v-for="image in reportimages" :key="image.id">
|
||||
<img :src="image.imgUrl" alt="" style="width: 180px; height: 180px" />
|
||||
</div>
|
||||
</div>
|
||||
@ -365,7 +365,7 @@
|
||||
style="width: 100px; float: right"
|
||||
class="ignore-print"
|
||||
:disabled="formLoading"
|
||||
v-print="'printMe'"
|
||||
v-print="'my-printMe'"
|
||||
>打印</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -755,14 +755,14 @@ const handleTabChange = async () => {
|
||||
|
||||
//隐藏报告
|
||||
function hideDiv() {
|
||||
var div = document.getElementById('printMe')
|
||||
var div = document.getElementById('my-printMe')
|
||||
if (div) {
|
||||
div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
//显示报告
|
||||
function showDiv() {
|
||||
var div = document.getElementById('printMe')
|
||||
var div = document.getElementById('my-printMe')
|
||||
if (div) {
|
||||
div.style.display = 'block'
|
||||
}
|
||||
@ -1111,7 +1111,7 @@ const chooseImage = (event, id: number) => {
|
||||
}
|
||||
|
||||
/* 报告样式 */
|
||||
.ultrasound-report {
|
||||
.my-ultrasound-report1 {
|
||||
font-family: Arial, sans-serif;
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
@ -1122,12 +1122,12 @@ const chooseImage = (event, id: number) => {
|
||||
height: 800px;
|
||||
}
|
||||
|
||||
.ultrasound-report h1,
|
||||
.ultrasound-report h2 {
|
||||
.my-ultrasound-report1 h1,
|
||||
.my-ultrasound-report1 h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.patient-info p,
|
||||
.my-patient-info p,
|
||||
.ultrasound-findings p,
|
||||
.ultrasound-recommendation p {
|
||||
margin: 5px 0;
|
||||
@ -1137,13 +1137,13 @@ const chooseImage = (event, id: number) => {
|
||||
.ultrasound-recommendation h3 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.image-gallery {
|
||||
.my-image-gallery1 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.image-gallery img {
|
||||
.my-image-gallery1 img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border: 1px solid #ccc;
|
||||
@ -1158,7 +1158,7 @@ const chooseImage = (event, id: number) => {
|
||||
}
|
||||
|
||||
/* 报告的P标签 */
|
||||
.patient-info {
|
||||
.my-patient-info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user