From 9b47bfa2cc65963b487035772db15eccebab9b54 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 15 九月 2026 23:38:41 +0800
Subject: [PATCH] 优化了科室选择页面布局
---
src/views/ecg/doctor/components/RoutinePanel.vue | 179 ++++++++++++++++++++++++++++++-----------------------------
1 files changed, 91 insertions(+), 88 deletions(-)
diff --git a/src/views/ecg/doctor/components/RoutinePanel.vue b/src/views/ecg/doctor/components/RoutinePanel.vue
index 61a6a6d..a9ceea2 100644
--- a/src/views/ecg/doctor/components/RoutinePanel.vue
+++ b/src/views/ecg/doctor/components/RoutinePanel.vue
@@ -1,55 +1,67 @@
<!-- 甯歌妫�鏌� 鍖荤敓鐣岄潰-->
<template>
- <el-form
- ref="formRef"
- :model="formData"
- :rules="formRules"
- label-width="100px"
- v-loading="formLoading"
- >
- <el-row :gutter="20">
- <el-col :span="12">
+ <el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
+ <el-row :gutter="20">
+ <el-col :span="6">
<el-form-item label="鎮h�呯紪鍙�" prop="patId">
- <el-input
- v-model="formData.patId"
- placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�"
- @input="getRentInfoByPatId"
- />
- <!-- <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 />-->
+ <el-input v-model="formData.patId" placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�" @input="getRentInfoByPatId" />
+ <!--
+ <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 />
<Barcode v-if="displayBarCode" :value="displayBarCode" :width="100" />
<el-button @click="copyBarcode()">澶嶅埗</el-button>
- </el-form-item>
- <el-form-item label="鎮h�呭悕绉�" prop="patName">
- <el-input v-model="formData.patName" placeholder="璇疯緭鍏ユ偅鑰呭悕绉�" />
- </el-form-item>
- <el-form-item label="鎮h�呮弿杩�" prop="patDetails">
- <dict-tag
- v-if="formData.patDetails?.source"
- :type="DICT_TYPE.ECG_PAT_SOURCE"
- :value="formData.patDetails?.source"
- />
- {{ formData?.patDetails?.deptDesc }} {{ formData?.patDetails?.wardDesc }}
- {{ formData?.patDetails?.bedNo }}
- </el-form-item>
- <el-form-item label="妫�鏌ユ椂闂�" prop="rentTime">
- <el-date-picker
- v-model="formData.rentTime"
- type="date"
- value-format="x"
- placeholder="閫夋嫨瑁呮満鏃堕棿"
- />
+ -->
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="6">
+ <el-form-item label="鎮h�呭悕绉�" prop="patName">
+ <el-input v-model="formData.patName" placeholder="璇疯緭鍏ユ偅鑰呭悕绉�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="灏辫瘖缂栧彿" prop="episodeId">
+ <el-input v-model="formData.episodeId" placeholder="璇疯緭鍏ユ偅鑰呭氨璇婄紪鍙�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="episodeId">
+ {{ formData?.patDetails?.mobile }}
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鐢宠鍗曞彿" prop="applyNo">
+ <el-input v-model="formData.applyNo" placeholder="璇疯緭鍏ョ敵璇峰崟鍙�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="18">
+ <el-form-item label="绉戝鐥呭尯" prop="patDetails">
+ <dict-tag v-if="formData.patDetails?.source" :type="DICT_TYPE.ECG_PAT_SOURCE"
+ :value="formData.patDetails?.source" />
+ {{ formData?.patDetails?.deptDesc }}-{{ formData?.patDetails?.wardDesc }}-{{ formData?.patDetails?.bedNo }}
+ </el-form-item></el-col>
+
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="妫�鏌ユ椂闂�" prop="rentTime">
+ <el-date-picker v-model="formData.rentTime" type="date" value-format="x" placeholder="閫夋嫨鏃堕棿" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
<el-form-item label="妫�鏌ラ」鐩�" prop="">
{{ formData?.checkType && getCheckTypeName(formData?.checkType) }}
</el-form-item>
- <el-form-item label="澶囨敞" prop="remark">
- <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" />
- </el-form-item>
+ </el-col>
+ <el-col :span="6">
<el-form-item label="鏄惁澶氳��" prop="tolerance">
<el-tag type="info" v-if="formData.tolerance == 0">鍚�</el-tag>
<el-tag type="danger" v-else>鏄�</el-tag>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" />
</el-form-item>
</el-col>
</el-row>
@@ -57,30 +69,14 @@
<el-button @click="submitForm" type="primary" :disabled="formLoading">妫�鏌ュ畬鎴�</el-button>
<el-button @click="cancelInstall" :disabled="formLoading">鏀惧純妫�鏌�</el-button>
<el-button @click="resetForm()">閲� 缃�</el-button>
- <el-button @click="yddownload()">骞虫澘杩愬姩蹇冪數鍥剧煡鎯呭悓鎰忎功</el-button>
- <el-button @click="sgdownload()">椋熺蹇冭剰鐢电敓鐞嗚瘖鐤楃煡鎯呭悓鎰忎功</el-button>
- <el-button
- v-if="needAutoFeeConfirm(formData.checkType)"
- @click="feeConfirm"
- :disabled="formLoading"
- >纭垂</el-button
- >
- <el-button
- v-if="needAutoFeeConfirm(formData.checkType)"
- @click="feeCancel"
- :disabled="formLoading"
- >鍙栨秷纭垂</el-button
- >
+ <el-button @click="yddownload()" :loading="yddownloadLoading" :disabled="yddownloadLoading">骞虫澘杩愬姩蹇冪數鍥剧煡鎯呭悓鎰忎功</el-button>
+ <el-button @click="sgdownload()" :loading="sgdownloadLoading" :disabled="sgdownloadLoading">椋熺蹇冭剰鐢电敓鐞嗚瘖鐤楃煡鎯呭悓鎰忎功</el-button>
+ <el-button v-if="needAutoFeeConfirm(formData.checkType)" @click="feeConfirm" :disabled="formLoading">纭垂</el-button>
+ <el-button v-if="needAutoFeeConfirm(formData.checkType)" @click="feeCancel" :disabled="formLoading">鍙栨秷纭垂</el-button>
<!-- 鍖荤敓瑁呮満鍒楄〃 -->
<ContentWrap>
- <el-table
- v-loading="loading"
- :data="list"
- :stripe="true"
- :show-overflow-tooltip="true"
- @row-click="onRowClick"
- >
+ <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="onRowClick">
<!-- <el-table-column label="id" align="center" prop="id" />-->
<el-table-column label="妫�鏌ョ姸鎬�" align="center" prop="lost">
<template #default="scope">
@@ -94,22 +90,10 @@
<!-- <el-table-column label="璁惧缂栧彿" align="center" prop="devId" />-->
<el-table-column label="鎮h�呯紪鍙�" align="center" prop="patId" />
<el-table-column label="鎮h�呭悕绉�" align="center" prop="patName" />
- <el-table-column
- label="浣滀笟鏃堕棿"
- align="center"
- prop="jobTime"
- :formatter="dateFormatter"
- width="180px"
- />
+ <el-table-column label="浣滀笟鏃堕棿" align="center" prop="jobTime" :formatter="dateFormatter" width="180px" />
<!-- <el-table-column label="浣滀笟姒傝" align="center" prop="summary" />-->
<el-table-column label="澶囨敞" align="center" prop="remark" />
- <el-table-column
- label="鍒涘缓鏃堕棿"
- align="center"
- prop="createTime"
- :formatter="dateFormatter"
- width="180px"
- />
+ <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" :formatter="dateFormatter" width="180px" />
<!--
<el-table-column label="鎿嶄綔" align="center" min-width="120px">
<template #default="scope">
@@ -134,12 +118,8 @@
-->
</el-table>
<!-- 鍒嗛〉 -->
- <Pagination
- :total="total"
- v-model:page="queryParams.pageNo"
- v-model:limit="queryParams.pageSize"
- @pagination="getList"
- />
+ <Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
+ @pagination="getList" />
</ContentWrap>
</template>
@@ -192,7 +172,8 @@
const message = useMessage() // 娑堟伅寮圭獥
const dialogVisible = ref(false) // 寮圭獥鐨勬槸鍚﹀睍绀�
-
+const yddownloadLoading = ref(false);
+const sgdownloadLoading = ref(false);
const formLoading = ref(false) // 琛ㄥ崟鐨勫姞杞戒腑锛�1锛変慨鏀规椂鐨勬暟鎹姞杞斤紱2锛夋彁浜ょ殑鎸夐挳绂佺敤
const formData = ref<Partial<DevRentVO>>({
@@ -266,15 +247,37 @@
formRef.value?.resetFields()
}
const yddownload = async () => {
- const response = await DoctorApi.yddownload(props.setappointmentId)
- console.log(response, 'xml1')
- console.log(response.fileContent, 'xml2')
- console.log(DoctorApi.yddownload(props.setappointmentId));
- downloadWordFile(response.fileContent, response.fileName)
+ // 妫�鏌� setappointmentId 鏄惁瀛樺湪
+ if (!props.setappointmentId) {
+ message.warning('褰撳墠鏃犲氨璇婁腑鎮h�呰鍏堝彨鍙�')
+ return
+ }
+
+ yddownloadLoading.value = true
+ try {
+ const response = await DoctorApi.yddownload(props.setappointmentId)
+ console.log(response, 'xml1')
+ console.log(response.fileContent, 'xml2')
+ downloadWordFile(response.fileContent, response.fileName)
+ } finally {
+ yddownloadLoading.value = false
+ }
}
+
const sgdownload = async () => {
- const obj = await DoctorApi.sgdownload(props.setappointmentId)
- downloadWordFile(obj, '椋熺蹇冭剰鐢电敓鐞嗚瘖鐤楃煡鎯呭悓鎰忎功.doc')
+ // 妫�鏌� setappointmentId 鏄惁瀛樺湪
+ if (!props.setappointmentId) {
+ message.warning('褰撳墠鏃犲氨璇婁腑鎮h�呰鍏堝彨鍙�')
+ return
+ }
+
+ sgdownloadLoading.value = true
+ try {
+ const response = await DoctorApi.sgdownload(props.setappointmentId)
+ downloadWordFile(response.fileContent, response.fileName)
+ } finally {
+ sgdownloadLoading.value = false
+ }
}
const downloadWordFile = (data, filename = 'document') => {
try {
--
Gitblit v1.9.3