完成超声模块相关内容

This commit is contained in:
lxd 2024-07-19 21:17:27 +08:00
parent 0ca81a9c25
commit ce4976b062
10 changed files with 2218 additions and 1397 deletions

View File

@ -86,7 +86,7 @@
"source.fixAll.eslint": "explicit"
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"i18n-ally.localesPaths": ["src/locales"],
"i18n-ally.keystyle": "nested",

View File

@ -49,7 +49,9 @@
"element-plus": "2.6.1",
"fast-xml-parser": "^4.3.2",
"highlight.js": "^11.9.0",
"html2canvas": "^1.4.1",
"jsencrypt": "^3.3.2",
"jspdf": "^2.5.1",
"lodash-es": "^4.17.21",
"min-dash": "^4.1.1",
"mitt": "^3.0.1",

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,8 @@ export interface PatientexamlistVO {
regId: string // 登记单号
diagFlag: string // 阴性阳性标记
deviceName: string // 影像设备名称
notes:string//备注
billDoctorDepartment:string// 开单科室 送检科室
}
// PACS检查列表 API
@ -68,4 +69,9 @@ export const PatientexamlistApi = {
getuporghiid: async (id: number,orgId:String) => {
return await request.get({ url: `/tblist/patientexamlist/UPDATEHigOrg?id=${id}&&orgId=${orgId}` })
},
// 超声审核修改
examineupdatelist: async (data: PatientexamlistVO) => {
return await request.put({ url: `/tblist/patientexamlist/examineupdate`, data })
},
}

View File

@ -1,10 +1,31 @@
import request from '@/config/axios'
//分检操作使用
export interface updateexamineimageVO {
id: string // 主键
isDelete: string // 删除标记
deletePerson:string//删除人
selected:string//是否选中
}
// 超声组件 API
export const ultrasoniccomApi = {
// 查询模版表数据
getreporttemplatelist: async (orgID: string,type:string,isprivate:string) => {
return await request.get({ url: `/ultrasoniccom/ultrasonic/reporttemplatetlist?orgID=${orgID}&&type=${type}&&isprivate=${isprivate}` })
},
// 查询图片表数据
getimageslist: async (orgID: string,regID:string,select:string) => {
return await request.get({ url: `/ultrasoniccom/ultrasonic/getimageslist?orgID=${orgID}&&regID=${regID}&&select=${select}` })
},
// 查询图片表数据
updateexamineimagelist: async (data:updateexamineimageVO[]) => {
return await request.put({ url: `/ultrasoniccom/ultrasonic/examineimageupdate`, data})
},
//更新模版使用时间
upreporttemplatetime: async (pid:string) => {
return await request.get({ url: `/ultrasoniccom/ultrasonic/upreporttemplatetime?pid=${pid}`})
},
}

View File

@ -16,3 +16,4 @@ export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): str
}
export const dateUtil = dayjs

View File

@ -79,6 +79,15 @@ export function getNowDateTime() {
return dayjs()
}
/**
* + YYYY-MM-DD HH:mm:ss LocalDateTime
*/
export function getNowDateTimeS() {
const currentDate = new Date();
const formattedDateTime = dayjs(currentDate).format('[YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z]');
const formattedDate = dayjs(formattedDateTime).toDate();
return formattedDate;
}
/**
*
* @param dateTime

63
src/utils/htmlPdf.js Normal file
View File

@ -0,0 +1,63 @@
// 页面导出为pdf格式
import html2Canvas from 'html2canvas';
import jsPDF from 'jspdf';
const htmlToPdf = {
getPdf(title, id) {
html2Canvas(
document.querySelector(id),
{
allowTaint: false,
taintTest: false,
logging: false,
useCORS: true,
dpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
scale: 4, //按比例增加分辨率
}
).then((canvas) => {
var pdf = new jsPDF('p', 'mm', 'a4'); //A4纸纵向
var ctx = canvas.getContext('2d'),
a4w = 190,
a4h = 272, //A4大小210mm x 297mm四边各保留10mm的边距显示区域190x277
imgHeight = Math.floor((a4h * canvas.width) / a4w), //按A4显示比例换算一页图像的像素高度
renderedHeight = 0;
while (renderedHeight < canvas.height) {
var page = document.createElement('canvas');
page.width = canvas.width;
page.height = Math.min(imgHeight, canvas.height - renderedHeight); //可能内容不足一页
//用getImageData剪裁指定区域并画到前面创建的canvas对象中
page
.getContext('2d')
.putImageData(
ctx.getImageData(
0,
renderedHeight,
canvas.width,
Math.min(imgHeight, canvas.height - renderedHeight),
),
0,
0,
);
pdf.addImage(
page.toDataURL('image/jpeg', 1.0),
'JPEG',
10,
10,
a4w,
Math.min(a4h, (a4w * page.height) / page.width),
); //添加图像到页面保留10mm边距
renderedHeight += imgHeight;
if (renderedHeight < canvas.height) {
pdf.addPage(); //如果后面还有内容,添加一个空页
}
// delete page;
}
pdf.save(title + '.pdf')
});
},
};
export default htmlToPdf;

View File

@ -437,15 +437,15 @@ const exportLoading = ref(false) // 导出的加载中
/** 超声组件 */
const ultrasonic = ref();
const openultrForm = (id:number,orgid:string) => {
const openultrForm = (id:number,orgid:string,regid:string) => {
ultrasonic.value.open(id,orgid)
ultrasonic.value.open(id,orgid,regid)
}
/** 表格行点击 */
const clickNumber = ref(0);
function handleEdit(row) {
console.log(111111121212)
openultrForm(row.id,row.orgid)
openultrForm(row.id,row.orgId,row.regId)
/* clickNumber.value++;
if (clickNumber.value == 2) {

View File

@ -17,12 +17,12 @@
@change="handleselectchange"
@clear="selectclear"
>
<el-option label="门诊" value="门诊模版"/>
<el-option label="住院" value="住院模版"/>
<el-option label="体检" value="体检模版"/>
<el-option label="门诊" value="门诊模版" />
<el-option label="住院" value="住院模版" />
<el-option label="体检" value="体检模版" />
</el-select>
<el-tabs type="border-card" style="height: 931px;">
<el-tabs type="border-card" style="height: 931px">
<el-tab-pane label="通用模版">
<!-- -->
<el-tree
@ -57,6 +57,7 @@
:show-checkbox="false"
:check-strictly="true"
@node-click="handleTreeNodeClick"
ref="priselectTree"
:expand-on-click-node="false"
/>
@ -66,23 +67,34 @@
<div class="middle">
<!--用户信息区域-->
<el-tabs v-model="activeName" class="demo-tabs" type="border-card" style="height: 963px;">
<el-tabs
v-model="activeName"
class="demo-tabs"
type="border-card"
style="height: 963px"
@tab-change="handleTabChange"
>
<el-tab-pane label="用户信息" name="first">
<el-form :model="applyFormVO" label-width="auto" style="max-width: 900px" :inline="true">
<el-form
:model="applyFormVO"
label-width="auto"
style="max-width: 900px"
:inline="true"
>
<el-row>
<el-col :span="8">
<el-form-item label="检查号">
<el-input v-model="applyFormVO.examId" style="width: 180px;" :disabled="true" />
<el-input v-model="applyFormVO.examId" style="width: 180px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名">
<el-input v-model="applyFormVO.pname" style="width: 180px;" :disabled="true" />
<el-input v-model="applyFormVO.pname" style="width: 180px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别">
<el-input v-model="applyFormVO.gender" style="width: 180px;" :disabled="true" />
<el-input v-model="applyFormVO.gender" style="width: 180px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -95,7 +107,6 @@
style="width: 180px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="8">
@ -108,12 +119,15 @@
style="width: 180px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检查项目名称">
<el-input v-model="applyFormVO.examItemName" style="width: 180px;" :disabled="true"/>
<el-input
v-model="applyFormVO.examItemName"
style="width: 180px"
:disabled="true"
/>
</el-form-item>
</el-col>
@ -131,7 +145,16 @@
</el-col>
<el-col :span="8">
<el-form-item label="申请单号">
<el-input v-model="applyFormVO.regId" style="width: 180px;" :disabled="true"/>
<el-input v-model="applyFormVO.regId" style="width: 180px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="送检科室">
<el-input
v-model="applyFormVO.billDoctorDepartment"
style="width: 180px"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
@ -139,18 +162,35 @@
<el-divider />
<!--图片显示区域-->
<div class="demo-image">
<el-card style="max-width: 480px">
<el-image style="width: 100px; height: 100px" src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" fit="fill" />
<el-card style="max-width: 180px">
<el-image
style="width: 100px; height: 100px"
:src="selecteimagedone"
fit="fill"
@dblclick="deleteimage('1')"
/>
</el-card>
<el-card style="max-width: 480px">
<el-image style="width: 100px; height: 100px" src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" fit="fill" />
<el-card style="max-width: 180px">
<el-image
style="width: 100px; height: 100px"
:src="selecteimagedtwo"
fit="fill"
@dblclick="deleteimage('2')"
/>
</el-card>
<el-card style="max-width: 480px">
<el-image style="width: 100px; height: 100px" src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" fit="fill" />
<el-card style="max-width: 180px">
<el-image
style="width: 100px; height: 100px"
:src="selecteimagedthree"
fit="fill"
@dblclick="deleteimage('3')"
/>
</el-card>
</div>
<el-divider />
<label style="text-align: center;">检查所见</label>
<label style="text-align: center">检查所见</label>
<el-input
v-model="sj"
style="max-width: 100%; width: 100%"
@ -169,28 +209,144 @@
/>
<el-divider />
<label>报告备注</label>
<el-input v-model="input" style="width: 100%" placeholder="" />
<el-divider />
<el-radio-group v-model="radio1" size="small" class="radio-group-wrapper" @dblclick="cancelSelection">
<el-input v-model="notes" style="width: 100%" placeholder="" />
<el-radio-group
v-model="radio1"
size="small"
class="radio-group-wrapper"
@dblclick="cancelSelection"
>
<el-radio-button label="阴性" value="0" />
<el-radio-button label="阳性" value="1" />
</el-radio-group>
<el-button >审核</el-button>
<div class="form-row">
<el-form-item label="诊断医生" class="form-item">
<el-input v-model="applyFormVO.diagDoctor" style="width: 180px" :disabled="true" />
</el-form-item>
<el-form-item label="审核医生" class="form-item">
<el-input
v-model="applyFormVO.reviewDoctor"
style="width: 180px"
:disabled="true"
/>
</el-form-item>
<el-form-item label="报告状态" class="form-item">
<el-input
v-model="applyFormVO.reportstatus"
style="width: 180px"
:disabled="true"
/>
</el-form-item>
</div>
<!--:disabled="applyFormVO.reportstatus === '已审核' ? true : false"-->
<el-button
type="primary"
plain
style="width: 180px; float: right"
@click="examine"
:disabled="applyFormVO.reportstatus === '已审核' ? true : false"
>审核</el-button
>
</el-tab-pane>
<el-tab-pane label="报告">
<el-tab-pane label="报告" name="report">
<!--报告区域-->
<div class="flex-center" id="printMe">
<div class="ultrasound-report" id="PDF" style="height: 750px">
<h2>超声检查报告单</h2>
<hr />
<div class="patient-info">
<p class="info-item">姓名{{ applyFormVO.pname }}</p>
<p class="info-item">送检科室{{ applyFormVO.billDoctorDepartment }}</p>
<p class="info-item">门诊号{{ applyFormVO.examId }}</p>
<p class="info-item">性别{{ applyFormVO.gender }}</p>
<p class="info-item">年龄{{ age }}</p>
<p class="info-item">设备{{ applyFormVO.deviceName }}</p>
<p class="info-item">检查号{{ applyFormVO.regId }}</p>
<p class="info-item">检查类型{{ applyFormVO.examItemName }}</p>
</div>
<hr />
<!-- 图片展示区域 -->
<h3>超声图像</h3>
<div class="image-gallery">
<div class="image-item-container" v-for="image in reportimages" :key="image.id">
<img :src="image.imgUrl" alt="" style="width: 180px; height: 180px" />
</div>
</div>
<div class="ultrasound-findings">
<h3>超声所见</h3>
<p>{{ applyFormVO.examDescription }}</p>
</div>
<div class="ultrasound-recommendation">
<h3>超声提示</h3>
<p>{{ applyFormVO.diagResults }}</p>
</div>
<div style="position: absolute; bottom: 20px; right: 20px">
<p>医生签名{{ Profilevo.username }}</p>
<!-- <p>时间xxx</p> -->
</div>
</div>
<el-divider />
<!--功能区-->
<div>
<el-button
type="primary"
style="width: 100px; float: right"
class="ignore-print"
:disabled="formLoading"
v-print="'printMe'"
>打印</el-button
>
<el-button
type="primary"
class="ignore-print"
style="width: 100px"
:disabled="formLoading"
@click="() => htmlToPdf.getPdf('超声报告单', '#PDF')"
>导出PDF</el-button
>
</div>
<div> </div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="right">Right</div>
<div class="right" style="border: 1px solid #dcdfe6; padding: 2px; height: 960px">
<!--图片区域-->
<div>
<el-button
type="primary"
plain
style="width: 220px"
@click="upimagedeleteor()"
:disabled="applyFormVO.reportstatus === '已审核' ? true : false"
>图像删除</el-button
>
</div>
<div>
<el-button
type="primary"
plain
style="width: 220px"
@click="getimages"
:disabled="applyFormVO.reportstatus === '已审核' ? true : false"
>图像刷新</el-button
>
</div>
<div class="image-container">
<div class="image-wrapper">
<div class="image-item-container" v-for="image in images" :key="image.id">
<el-image
class="image-item"
:src="image.imgUrl"
@dblclick="selectImage(image.imgUrl, image.id)"
@click="chooseImage($event, image.id)"
/>
</div>
</div>
</div>
</div>
</div>
<!-- </el-form> -->
@ -198,121 +354,387 @@
<el-button @click="dialogVisible = false">关闭</el-button>
</template>
</Dialog>
<!-- 弹窗-->
<el-dialog v-model="dialogTableVisible" title="选择结论添加方式" width="300" align-center>
<div>
<el-button @click="handleButtonClick('覆盖')" type="primary">覆盖</el-button>
<el-button @click="handleButtonClick('追加')" type="success">追加</el-button>
<el-button @click="dialogTableVisible = false" type="info">关闭</el-button>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { ApplyformApi, ApplyformVO,UPFJApplyformVO } from '@/api/applyregistration/applyform'
import {ultrasoniccomApi} from '@/api/ultrasoniccom'
import { fill } from 'lodash-es';
import { number } from 'vue-types';
import { ApplyformApi, ApplyformVO, UPFJApplyformVO } from '@/api/applyregistration/applyform'
import { ultrasoniccomApi, updateexamineimageVO } from '@/api/ultrasoniccom'
import { fill } from 'lodash-es'
import { number } from 'vue-types'
import { PatientexamlistApi, PatientexamlistVO } from '@/api/tblist/patientexamlist'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
import { getNowDateTimeS } from '@/utils/formatTime'
import print from 'vue3-print-nb'
import htmlToPdf from '@/utils/htmlPdf'
/** 超声组件 */
defineOptions({ name: 'Ultrasonic' })
const Profilevo = ref<ProfileVO>({} as ProfileVO) //
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) // 12
const examineFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
//使
const clickuptime =async (pid:string)=>
{
await ultrasoniccomApi.upreporttemplatetime(pid)
}
//
const dialogTableVisible = ref(false)
//
const btncleckname = ref()
//
const handleButtonClick = (buttonName) => {
if (buttonName == '覆盖') {
zdjl.value = strzdjl
sj.value = strsj
} else if (buttonName == '追加') {
let lszdjl: string = zdjl.value
let lssj: string = sj.value
zdjl.value = lszdjl + strzdjl
sj.value = lssj + strsj
}
dialogTableVisible.value = false
console.log("获取到父节点"+pid);
clickuptime(pid)
}
//or
const updateexamineimage = ref<updateexamineimageVO[]>([])
//
const notes = ref()
//
const examine = async () => {
try {
if (selecteimagedoneid === 0 || selecteimagedtwoid === 0 || selecteimagedthreeid === 0) {
message.warning('请选择影像图')
return
}
//
await message.delConfirm('是否进行审核', '确认')
let timesta = new Date()
var localDateTime = new Date(timesta.getTime()).toISOString() // ISO
localDateTime = localDateTime.slice(0, localDateTime.length - 1)
console.log('当前时间' + localDateTime)
examineFormVO.value.id = ID.toString()
examineFormVO.value.examDescription = sj.value
examineFormVO.value.diagResults = zdjl.value
examineFormVO.value.notes = notes.value
examineFormVO.value.diagFlag = radio1.value
examineFormVO.value.diagDoctor = Profilevo.value.username
examineFormVO.value.reviewDoctor = Profilevo.value.username
examineFormVO.value.reportstatus = '已审核'
// examineFormVO.value.diagDate=localDateTime
// examineFormVO.value.reviewDate=dateTime
const response = await PatientexamlistApi.examineupdatelist(examineFormVO.value)
// code
if (response) {
//
await upimageselect()
message.alertSuccess('审核成功')
// data
console.log('接口调用成功')
console.log('data:', response.data)
// ID
getPatientexamlist(ID)
} else {
//
console.error('接口调用失败:', response.msg)
}
} catch (error) {
//
console.error('接口调用失败:', error)
}
}
///
function nowDate(time) {
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
}
//id
const deleteimageid = ref('')
//
const selecteimagedone = ref('1')
//
const selecteimagedtwo = ref('2')
//
const selecteimagedthree = ref('3')
//ID
let selecteimagedoneid: number = 0
let selecteimagedtwoid: number = 0
let selecteimagedthreeid: number = 0
//
const images = ref<any[]>([])
//
const reportimages = ref<any[]>([])
//
const getimages = async () => {
const imageslist = await ultrasoniccomApi.getimageslist(orgId.value, regId.value, '')
console.log(imageslist)
images.value = imageslist
}
const selectImage = (imageUrl: string, id: number) => {
console.log(imageUrl)
console.log(id)
if (selecteimagedone.value == '1') {
selecteimagedone.value = imageUrl
selecteimagedoneid = id
return
}
if (selecteimagedtwo.value == '2') {
selecteimagedtwo.value = imageUrl
selecteimagedtwoid = id
return
}
if (selecteimagedthree.value == '3') {
selecteimagedthree.value = imageUrl
selecteimagedthreeid = id
return
}
}
//
const deleteimage = (flag: string) => {
if (flag == '1') {
selecteimagedone.value = '1'
selecteimagedoneid = 0
return
} else if (flag == '2') {
selecteimagedtwo.value = '2'
selecteimagedtwoid = 0
return
} else if (flag == '3') {
selecteimagedthree.value = '3'
selecteimagedthreeid = 0
return
}
}
//
const upimageselect = async () => {
updateexamineimage.value.push({
id: selecteimagedoneid.toString(),
isDelete: '',
deletePerson: '',
selected: '1'
})
updateexamineimage.value.push({
id: selecteimagedtwoid.toString(),
isDelete: '',
deletePerson: '',
selected: '1'
})
updateexamineimage.value.push({
id: selecteimagedthreeid.toString(),
isDelete: '',
deletePerson: '',
selected: '1'
})
const response = await ultrasoniccomApi.updateexamineimagelist(updateexamineimage.value)
if (response) {
console.log('更新图片标识接口调用成功')
}
updateexamineimage.value = []
}
//
const upimagedeleteor = async () => {
updateexamineimage.value.push({
id: deleteimageid.value,
isDelete: '1',
deletePerson: Profilevo.value.username,
selected: ''
})
const response = await ultrasoniccomApi.updateexamineimagelist(updateexamineimage.value)
if (response) {
console.log('删除图片标识接口调用成功')
}
//ID
deleteimageid.value = ''
updateexamineimage.value = []
}
const handleTabChange = async () => {
if (activeName.value == 'report') {
if (reportimages.value.length === 0) {
const imageslist = await ultrasoniccomApi.getimageslist(orgId.value, regId.value, '1')
console.log(imageslist)
reportimages.value = imageslist
}
}
}
//
const age = ref()
const calculateAge = (birthdate) => {
if (!birthdate) {
age.value = null
return
}
const today = new Date()
const birth = new Date(birthdate)
let yearsDiff = today.getFullYear() - birth.getFullYear()
// Check if the birthday hasn't occurred yet this year
const hasBirthdayPassed =
today.getMonth() > birth.getMonth() ||
(today.getMonth() === birth.getMonth() && today.getDate() >= birth.getDate())
if (!hasBirthdayPassed) {
yearsDiff--
}
age.value = yearsDiff
}
//
const applyFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO);
const applyFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
//
const fordevicemValue = ref('')
//
const selectclear=async ()=>
{
//
const selectclear = async () => {
//
//
const dd= await ultrasoniccomApi.getreporttemplatelist("","","")
treeData.value=dd
const dd = await ultrasoniccomApi.getreporttemplatelist('', '', '')
treeData.value = dd
const pridate= await ultrasoniccomApi.getreporttemplatelist("","","1")
privateData.value=pridate
const pridate = await ultrasoniccomApi.getreporttemplatelist('', '', '1')
privateData.value = pridate
}
const fordevicemData = ref<any[]>([])
const formRules = reactive({
})
const formRules = reactive({})
const formRef = ref() // Ref
//table
const activeName = ref('first')
//
const radio1 = ref('')
const cancelSelection=()=> {
radio1.value = "";
}
const cancelSelection = () => {
radio1.value = ''
}
//
const zdjl = ref('')
//
const sj = ref('')
//
const selectTree = ref();
const selectTree = ref()
//
const treeData = ref([]);
//
const privateData = ref([]);
const treeData = ref([])
//
const privateData = ref([])
//
const treeDefaultProps = {
children: "children",
label: "tempname"
children: 'children',
label: 'tempname'
}
//
let strzdjl: string = ''
let strsj: string = ''
let pid:string=''//id
//
const handleTreeNodeClick = (data) => {
zdjl.value=data.diagResults
sj.value= data.examDescription
};
const handleTreeNodeClick = async (data) => {
strzdjl = data.diagResults
strsj = data.examDescription
pid=data.pid
console.log("父节点"+data.pid)
dialogTableVisible.value = true
}
//
const handleselectchange =async () => {
console.log(fordevicemValue.value);
const handleselectchange = async () => {
console.log(fordevicemValue.value)
if(fordevicemValue.value)
{
//
if (fordevicemValue.value) {
//
//
const dd= await ultrasoniccomApi.getreporttemplatelist("",String(fordevicemValue.value),"")
treeData.value=dd
const pridate= await ultrasoniccomApi.getreporttemplatelist("",String(fordevicemValue.value),"1")
privateData.value=pridate
}
const dd = await ultrasoniccomApi.getreporttemplatelist('', String(fordevicemValue.value), '')
treeData.value = dd
const pridate = await ultrasoniccomApi.getreporttemplatelist(
'',
String(fordevicemValue.value),
'1'
)
privateData.value = pridate
}
}
//
let ID: number
//orgid
const orgId = ref('')
//regid
const regId = ref('')
/** 打开弹窗 */
const open = async (id:number,orgid:string) => {
const open = async (id: number, orgid: string, regid: string) => {
resetForm()
console.log('orgid' + orgid)
console.log('regid' + regid)
console.log('id' + id)
orgId.value = orgid
regId.value = regid
ID = id
dialogVisible.value = true
dialogTitle.value ="书写报告(超声)"
dialogTitle.value = '书写报告(超声)'
//
formLoading.value = true
try {
//
const dd= await ultrasoniccomApi.getreporttemplatelist("",String(fordevicemValue.value),"")
treeData.value=dd
console.log( "返回值1"+ dd)
console.log( "返回值2"+ treeData.value)
const dd = await ultrasoniccomApi.getreporttemplatelist('', String(fordevicemValue.value), '')
treeData.value = dd
console.log('返回值1' + dd)
console.log('返回值2' + treeData.value)
//
const pridate= await ultrasoniccomApi.getreporttemplatelist("",String(fordevicemValue.value),"1")
privateData.value=pridate
const pridate = await ultrasoniccomApi.getreporttemplatelist(
'',
String(fordevicemValue.value),
'1'
)
privateData.value = pridate
// ID
const data = await PatientexamlistApi.getPatientexamlist(id)
applyFormVO.value = data
getPatientexamlist(id)
//
getlogininfo()
} finally {
formLoading.value = false
}
}
// ID
const getPatientexamlist = async (id: number) => {
const data = await PatientexamlistApi.getPatientexamlist(id)
applyFormVO.value = data
//
radio1.value = applyFormVO.value.diagFlag
zdjl.value = applyFormVO.value.diagResults
sj.value = applyFormVO.value.examDescription
notes.value = applyFormVO.value.notes
calculateAge(applyFormVO.value.birthday)
}
defineExpose({ open }) // open
@ -320,25 +742,62 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const emit = defineEmits(['success']) // success
// 使v-print
const PrintForm = () => {
// window.print()
//
emit('success')
}
/** 重置表单 */
const resetForm = () => {
selectTree.value=''
treeData.value=[]
privateData.value=[]
fordevicemData.value =[]
fordevicemValue.value=''
upFJApplyformVO.value=[]
formRef.value?.resetFields()
//
const getlogininfo = async () => {
Profilevo.value = await getUserProfile()
}
/** 重置表单 */
const resetForm = () => {
pid=''
strzdjl= ''
strsj = ''
activeName.value = 'first'
deleteimageid.value = ''
updateexamineimage.value = []
//
selecteimagedone.value = '1'
//
selecteimagedtwo.value = '2'
//
selecteimagedthree.value = '3'
selecteimagedoneid = 0
selecteimagedtwoid = 0
selecteimagedthreeid = 0
images.value = []
reportimages.value = []
selectTree.value = ''
treeData.value = []
privateData.value = []
fordevicemData.value = []
fordevicemValue.value = ''
upFJApplyformVO.value = []
formRef.value?.resetFields()
orgId.value = ''
regId.value = ''
}
/** 选择图片,用于删除 */
const chooseImage = (event, id: number) => {
console.log(id)
deleteimageid.value = id.toString()
const items = document.querySelectorAll('.image-item')
items.forEach((item) => {
item.classList.remove('image-item-selected')
})
console.log(event)
event.target.parentNode.classList.add('image-item-selected')
}
</script>
<style>
@ -360,7 +819,10 @@ const resetForm = () => {
.right {
flex: 0 0 200px; /* 固定宽度 */
background: lightcoral;
background: rgb(255, 255, 255);
display: flex;
flex-direction: column;
align-items: flex-start;
}
.custom-dialog {
width: 1500px; /* 设置宽度 */
@ -374,15 +836,121 @@ const resetForm = () => {
.demo-image {
display: flex;
justify-content: center;
}
}
.demo-image .el-card:not(:last-child) {
.demo-image .el-card:not(:last-child) {
margin-right: 100px;
margin-top: 10px;
}
.radio-group-wrapper {
}
.radio-group-wrapper {
display: flex;
justify-content: flex-end;
margin-top: 1px; /* 调整上方外边距 */
margin-top: 10px; /* 调整上方外边距 */
}
/* 右侧图片列表样式 */
.image-container {
/* 添加一些外边距来控制图像容器与周围元素之间的间距 */
margin-top: 20px;
margin-bottom: 20px;
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
}
.image-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
gap: 10px; /* 设置图像之间的间距 */
}
.image-item {
/* 可选:设置图像的宽度和高度 */
width: 200px;
height: 200px;
cursor: pointer;
transition: transform 0.3s ease; /* 添加过渡效果 */
}
.image-item:hover {
transform: scale(1.1); /* 放大容器 */
}
.image-item-selected {
outline: none;
border-color: yellow;
box-shadow: 0 0 10px yellow;
}
.image-item:active {
transform: scale(0.9); /* 缩小图像 */
}
/* 诊断医生等样式 */
.form-row {
display: flex;
justify-content: space-between; /* 将元素左右对齐 */
margin-top: 10px;
}
.form-item {
flex: 1; /* 均分宽度,使两个输入框平分容器的宽度 */
margin-right: 20px;
}
/* 报告样式 */
.ultrasound-report {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
position: relative;
}
.ultrasound-report h1,
.ultrasound-report h2 {
text-align: center;
}
.patient-info p,
.ultrasound-findings p,
.ultrasound-recommendation p {
margin: 5px 0;
}
.ultrasound-findings h3,
.ultrasound-recommendation h3 {
margin-top: 20px;
}
.image-gallery {
display: flex;
justify-content: space-around;
margin: 20px 0;
}
.image-gallery img {
max-width: 100%;
height: auto;
border: 1px solid #ccc;
border-radius: 4px;
margin: 5px;
}
/* 不打印区域 */
@media print {
.ignore-print {
display: none;
}
}
/* 报告的P标签 */
.patient-info {
display: flex;
flex-wrap: wrap;
}
.info-item {
flex-basis: 25%;
/* 设置其他样式属性,如 padding、margin 等 */
}
</style>