From bd3f4b0a9b9207b647de0f0d8c52600a2742fd56 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 26 十一月 2026 09:34:58 +0800
Subject: [PATCH] 修改了框架,适用chrome85
---
src/views/ecg/doctor/components/DevReadyPanel.vue | 208 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 154 insertions(+), 54 deletions(-)
diff --git a/src/views/ecg/doctor/components/DevReadyPanel.vue b/src/views/ecg/doctor/components/DevReadyPanel.vue
index 6860dea..c5d4637 100644
--- a/src/views/ecg/doctor/components/DevReadyPanel.vue
+++ b/src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -14,19 +14,19 @@
>
<!-- ===== 缂栬緫鍖猴紙闇�瑕佸綍鍏ョ殑瀛楁锛�===== -->
<el-row :gutter="20">
- <el-col :span="6">
+ <el-col :xs="24" :sm="12" :md="12" :lg="6">
<el-form-item label="妫�鏌ラ」鐩�" prop="">
{{getCheckTypeName(formData.checkType)}}
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :xs="24" :sm="24" :md="12" :lg="12">
<el-form-item label="鎮h�呯紪鍙�" prop="patId">
<el-input v-model="formData.patId" placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�" @input="getRentInfoByPatId" />
- <Barcode v-if="displayBarCode" :value="displayBarCode" :width=100 />
- <el-button @click="copyBarcode()">澶嶅埗</el-button>
+ <Barcode v-if="showBarCode" :value="barcodeContent" :width=100 />
+ <el-button v-if="showCopyButton" :disabled="!barcodeContent" @click="copyBarcode()">澶嶅埗</el-button>
</el-form-item>
</el-col>
- <el-col :span="6">
+ <el-col :xs="24" :sm="12" :md="12" :lg="6">
<el-form-item label="璁惧缂栧彿" prop="devId">
<el-input v-model="formData.devId" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" @input="getDevInfo"/>
</el-form-item>
@@ -74,13 +74,21 @@
</div>
<!-- 鍖荤敓瑁呮満鍒楄〃 -->
+ <!-- 銆愭湰娆¢渶姹傘�戞搷浣滃姛鑳藉尯涓庡凡瀹屾垚璁板綍涔嬮棿鐨勬爣棰樻爮 -->
+ <div class="records-title">
+ <span class="records-title__bar"></span>
+ <span class="records-title__text">宸插畬鎴愬垪琛�</span>
+ </div>
<div class="records-host">
<ContentWrap class="records-wrap">
+ <div class="records-scroll">
<el-table
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
+ highlight-current-row
+ @current-change="onCurrentRowChange"
@row-click="onRowClick"
>
<!-- 闇�姹�11锛堜慨姝o級锛氥�屾挙閿�銆嶄綔涓�**宸插畬鎴愰鐢ㄨ褰曞垪琛ㄧ殑绗竴鍒�**锛堣〃澶存彃妲斤級锛�
@@ -92,7 +100,8 @@
type="warning"
:disabled="undoDisabled"
:loading="undoLoading"
- @click="$emit('event_undo_finish')"
+ title="鍏堝湪涓嬫柟鐐归�変竴鏉″畬鎴愯褰曪紝鍐嶇偣姝ゆ挙閿�"
+ @click="undoSelected"
>
鎾ら攢
</el-button>
@@ -105,9 +114,15 @@
</el-table-column>
<el-table-column label="棰嗙敤鎯呭喌" align="center" prop="cancelled" >
<template #default="scope">
- <span v-if="scope.row.jobType === 5">"宸查鐢�"</span>
+ <!-- 銆愭湰闇�姹傘�戝畬鎴愯鎾ら攢杩囷細璇ユ潯璁板綍鏄剧ず銆屽凡鎾ら攢銆嶏紱鍐嶆瀹屾垚鏃跺悗绔� undone 鑷姩鍙樺洖 false -->
+ <el-tag v-if="scope.row.undone" type="danger" size="small">宸叉挙閿�</el-tag>
+ <span v-else-if="scope.row.jobType === 5">"宸查鐢�"</span>
<span v-if="scope.row.jobType === 30">"宸叉斁寮�"</span>
</template>
+ </el-table-column>
+ <!-- 銆�2026-11-25 闇�姹傘�戝悓涓�鎮h�呭彲鑳芥湁澶氫釜妫�鏌ラ」鐩紝宸插畬鎴愬垪琛ㄥ垪鍑烘潵鎵嶈兘鍖哄垎/绮剧‘鎾ら攢 -->
+ <el-table-column label="妫�鏌ラ」鐩�" align="center" width="150">
+ <template #default="scope">{{ getCheckTypeName(scope.row.checkType) }}</template>
</el-table-column>
<!-- <el-table-column label="浣滀笟绫诲瀷" align="center" prop="jobType" />-->
<!-- <el-table-column label="鍖荤敓缂栧彿" align="center" prop="docId" />-->
@@ -155,6 +170,7 @@
</el-table-column>
-->
</el-table>
+ </div>
</ContentWrap>
<!-- 鍒嗛〉 -->
<Pagination
@@ -184,6 +200,7 @@
import {calGender, getBookBeginTime} from "@/utils";
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import {tranlateDevState} from "@/utils/statusFormatter";
+import { copyText } from '@/utils/copyText'
import {getCheckTypeName, needAutoFeeConfirm, needDevReady} from "../../../../utils/checkTypeFormatter";
import { useRoomStore } from '@/store/modules/room'
// 闇�姹�1锛氭偅鑰呬俊鎭� 18 椤圭粺涓�灞曠ず鍧�
@@ -251,7 +268,6 @@
state: undefined,
})
-const displayBarCode = ref<string> ()
const getRentInfoByPatId = () => {
const tempPatId = formData.value.patId;
@@ -261,7 +277,6 @@
formData.value.patId = tempPatId;
getFreeRentInfo(formData.value)
- copyBarcode()
}
// 鏍规嵁鎮h�呮垨璁惧, 鑾峰彇 Free鐨勭璧�
@@ -309,7 +324,7 @@
`銆�${ctName}銆嶄笉闇�瑕佽澶囬鐢紝涓嶈兘鍦ㄨ澶囬鐢ㄦā鍧楀姙鐞嗐�俙 +
`璇风‘璁ゆ槸鍚﹀簲鍒般�屽彨鍙锋鏌ャ�嶉〉闈㈠鐞嗚鎮h�呫�俙
)
- return
+ return false
}
// 鏍¢獙琛ㄥ崟
@@ -336,6 +351,7 @@
// 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
emit('event_dev_ready')
message.success(t('鎿嶄綔瀹屾垚'))
+ return true
} finally {
formLoading.value = false
}
@@ -416,6 +432,10 @@
formData.value.doctor = queueVO?.doctor
formData.value.doctorTime = queueVO?.doctorTime
formData.value.patSrc = queueVO?.patSrc
+ // 銆愭湰娆′慨澶嶃�戞潯鐮�/鎵撳嵃灏忕エ渚濊禆 patDetails锛堝惈 source/appointmentId锛夛紝
+ // 闃熷垪琛屾湰灏卞甫鐫�瀹冿紱鍘熷厛鍙湪 getFreeRentInfo() 鏌ュ埌"寰呮鏌ュ崟"鏃舵墠璧嬪�硷紝
+ // 瀵艰嚧缁濆ぇ澶氭暟鎯呭喌涓� patDetails 涓� undefined 鈫� 鏉$爜涓嶆樉绀恒��
+ formData.value.patDetails = queueVO?.patDetails
formData.value.patMobile = queueVO?.patMobile
formData.value.patPhone = queueVO?.patPhone
formData.value.patWardDesc = queueVO?.patWardDesc
@@ -426,9 +446,19 @@
formData.value.doctorAdviceNo = queueVO?.doctorAdviceNo
formData.value.patIdentityId = queueVO?.patIdentityId
getFreeRentInfo(formData.value) // 寰呮鏌ョ殑淇℃伅 @ dev_rent 琛�
- copyBarcode()
}
-defineExpose({ setPatient }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰�
+/**
+ * 銆愬彨鍙疯嚜鍔ㄥ畬鎴愩�戜緵鐖堕〉闈㈢偣銆屽彨鍙枫�嶆椂鍏堣嚜鍔ㄥ畬鎴愬綋鍓嶆偅鑰咃紙绛夊悓鐐广�岄鐢ㄥ畬鎴愩�嶏級銆�
+ */
+const completeCurrent = async (): Promise<boolean> => {
+ try {
+ return (await submitForm()) === true
+ } catch (e) {
+ console.warn('[DevReadyPanel] 鑷姩銆岄鐢ㄥ畬鎴愩�嶅け璐�', e)
+ return false
+ }
+}
+defineExpose({ setPatient, getList: () => getList(), completeCurrent }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰�
const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
@@ -488,9 +518,29 @@
const data = await JobRecordApi.getJobRecordDoctorPage(queryParams)
list.value = data.list
total.value = data.total
+ // 鍒楄〃鍒锋柊鍚庢棫鐨勯�変腑琛屽凡澶辨晥锛屾竻鎺夛紝閬垮厤銆屾挙閿�銆嶄綔鐢ㄥ埌涓婁竴灞忕殑璁板綍
+ selectedRecord.value = undefined
} finally {
loading.value = false
}
+}
+
+/** 銆�2026-11-25 闇�姹傘�戝凡瀹屾垚鍒楄〃鐨勯�変腑琛岋細鎾ら攢鍓嶅厛鐐归�変竴鏉★紝鎾ら攢浣滅敤鍦ㄩ�変腑璁板綍涓� */
+const selectedRecord = ref<any>()
+const onCurrentRowChange = (row: any) => {
+ selectedRecord.value = row || undefined
+}
+
+/** 鎾ら攢锛氬彧鎾ら攢褰撳墠閫変腑鐨勯偅鏉″畬鎴愯褰曪紙鏈�変腑鏃舵彁绀猴紝涓嶅啀榛樿鎾ら攢"鏈�杩戜竴鏉�"锛� */
+const undoSelected = () => {
+ if (!selectedRecord.value) {
+ message.warning('璇峰厛鍦ㄣ�屽凡瀹屾垚鍒楄〃銆嶄腑鐐归�変竴鏉¤褰曪紝鍐嶇偣銆屾挙閿�銆�')
+ return
+ }
+ emit('event_undo_finish', {
+ ...selectedRecord.value,
+ checkTypeName: getCheckTypeName(selectedRecord.value.checkType)
+ })
}
const onRowClick = (cur) => {
@@ -631,47 +681,51 @@
/**
* 鑾峰彇鏉″舰鐮侊紝鏄剧ず涓庡惁 鍚屼竴涓��
*/
-const getDisplayBarcode = (): string => {
- if (formData.value.checkType == null)
- return ""
+/**
+ * 銆愭湰闇�姹傘�戞偅鑰呮潯鐮佸彛寰勶紙闂ㄨ瘖/鎬ヨ瘖/浣撴 = 灏辫瘖娴佹按鍙凤紱浣忛櫌涓嶅嚭鏉$爜锛屽彧鐣欍�屽鍒躲�嶏級
+ *
+ * 路 闂ㄨ瘖(1) / 鎬ヨ瘖(2) / 浣撴(4) 鈫� 鏉$爜鍐呭 = **灏辫瘖娴佹按鍙�**锛坋pisodeId锛�
+ * 路 浣忛櫌(3) 鈫� **涓嶆樉绀烘潯鐮�**锛屽彧淇濈暀銆屽鍒躲�嶆寜閽紙澶嶅埗鍐呭鍚屾牱鏄氨璇婃祦姘村彿锛�
+ * 路 銆屽鍒躲�嶆寜閽笌鏉$爜涓�鑷达細鍚屽彈銆屾鏌ョ被鍨� 鈫� 鎮h�呮潯鐮佹樉绀恒�嶉厤缃帶鍒�
+ * 锛堣妫�鏌ョ被鍨嬫湭鍕鹃�夎繖涓偅鑰呮潵婧愭椂锛屾潯鐮佸拰澶嶅埗鎸夐挳閮戒笉鏄剧ず锛�
+ */
+const patSourceValue = computed<number | null>(() => {
+ const source = formData.value.patDetails?.source ?? formData.value.patSrc
+ return source === null || source === undefined || source === '' ? null : Number(source)
+})
- if (formData.value.patDetails?.source == null)
- return ""
+/** 鏄惁閫氳繃浜嗐�屾偅鑰呮潯鐮佹樉绀恒�嶉厤缃紙鍕鹃�変簡褰撳墠鎮h�呮潵婧愶級 */
+const barcodeEnabled = computed<boolean>(() => {
+ if (formData.value.checkType == null) return false
+ const displayBarcode: number[] | undefined = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType)
+ if (displayBarcode == null || displayBarcode.length === 0) return false
+ const patSource = patSourceValue.value
+ if (patSource == null) return false
+ return displayBarcode.map(Number).includes(patSource)
+})
- const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType)
- if (displayBarcode == null || displayBarcode.length === 0)
- return ""
+/** 鏉$爜 / 澶嶅埗鐨勫唴瀹癸細缁熶竴鍙栥�屽氨璇婃祦姘村彿銆� */
+const barcodeContent = computed<string>(() =>
+ barcodeEnabled.value ? (formData.value.episodeId ?? '') : ''
+)
- if (!displayBarcode.includes( formData.value.patDetails.source ))
- return ""
+/** 鏄惁鏄剧ず鏉$爜锛氫綇闄紙鏉ユ簮 3锛変笉鏄剧ず锛涘唴瀹逛负绌烘椂涔熶笉鏄剧ず */
+const showBarCode = computed<boolean>(
+ () => barcodeEnabled.value && patSourceValue.value !== 3 && barcodeContent.value !== ''
+)
- return getBarcode()
-}
-
-const getBarcode = (): string => {
- if (formData.value.checkType == null)
- return ""
-
- const patSource = formData.value.patDetails?.source
- if (patSource == null)
- return ""
-
- if (1 === patSource || 2 === patSource)
- return formData.value.applyNo??""
- else if (3 === patSource || 4 === patSource)
- return formData.value.episodeId??""
-
- return ""
-}
+/** 鏄惁鏄剧ず銆屽鍒躲�嶆寜閽細涓庢潯鐮佷竴鑷达紙鍚屽彈閰嶇疆鎺у埗锛� */
+const showCopyButton = computed<boolean>(() => barcodeEnabled.value)
const copyBarcode = async () => {
- displayBarCode.value = getDisplayBarcode()
-
- const barCode = getBarcode()
- if (isStringEmpty(barCode))
- return
-
- await navigator.clipboard.writeText( barCode );
+ if (!barcodeContent.value) return
+ // 銆愬吋瀹� Chrome 85 / http 璁块棶銆戦潪瀹夊叏涓婁笅鏂囦笅 navigator.clipboard 涓嶅彲鐢紝鐢ㄥ吋瀹瑰疄鐜�
+ const ok = await copyText(barcodeContent.value)
+ if (ok) {
+ message.success('宸插鍒�')
+ } else {
+ message.warning('褰撳墠娴忚鍣ㄤ笉鏀寔鑷姩澶嶅埗锛岃鎵嬪姩閫変腑澶嶅埗')
+ }
}
/** 鍒濆鍖� **/
@@ -682,6 +736,28 @@
</script>
<style scoped lang="scss">
+
+/* 銆愭湰娆¢渶姹傘�戙�屽凡瀹屾垚鍒楄〃銆嶆爣棰樻爮锛氬乏渚т富鑹茬珫绾� + 鍔犵矖灏忔爣棰橈紝绱у噾楂樺害涓嶆尋鍘嬭〃鏍� */
+.records-title {
+ display: flex;
+ align-items: center;
+ flex: none;
+ gap: 6px;
+ padding: 2px 0 6px;
+
+ &__bar {
+ width: 3px;
+ height: 14px;
+ background-color: var(--el-color-primary);
+ border-radius: 2px;
+ }
+
+ &__text {
+ font-size: 15px;
+ font-weight: 600;
+ color: var(--el-text-color-primary);
+ }
+}
/* ==========================================================================
闇�姹傦細琛ㄥ崟鍐呭鎸ゅ崰浜嗕笅鏂硅褰曡〃鏍肩殑绌洪棿 鈥斺�� 鍘嬬缉琛岄棿璺濄��
Element Plus 榛樿 `.el-form-item { margin-bottom: 18px }`锛�
@@ -733,19 +809,43 @@
.patient-actions {
display: flex;
flex: none;
- flex-wrap: nowrap;
+ /* 鎸夐挳澶氭椂鍏佽鎹㈣锛岄伩鍏嶆尋鍦ㄤ竴琛岋紙妫�鏌ラ〉鏈�澶� 6 涓寜閽級 */
+ flex-wrap: wrap;
gap: 8px;
align-items: center;
- /* 涓婁笅鐣欑櫧 + 鍒嗛殧绾匡紝褰㈡垚鐙珛鍔熻兘鍧� */
- padding: 6px 4px;
- margin-bottom: 6px;
- background-color: var(--el-bg-color);
- border-top: 1px solid var(--el-border-color-lighter);
- border-bottom: 1px solid var(--el-border-color-lighter);
+ /*
+ 銆愭湰娆¢渶姹傘�戞搷浣滃姛鑳藉尯鍋氫竴鐐硅瑙夊尯鍒嗭紝鏂逛究鍖荤敓涓�鐪煎畾浣嶏細
+ 鏋佹祬鐨勪富鑹插簳 + 缁嗚竟妗� + 宸︿晶 3px 涓昏壊绔栨潯锛堜笌銆屸枎宸插畬鎴愬垪琛ㄣ�嶆爣棰樻潯鍚屾璇█锛夈��
+ 鍙仛"绋嶆湁鍖哄垎"锛屼笉鏀规寜閽湰韬殑灏哄/棰滆壊/椤哄簭銆�
+ */
+ padding: 8px 10px;
+ margin: 2px 0 10px;
+ background-color: var(--el-color-primary-light-9);
+ border: 1px solid var(--el-color-primary-light-7);
+ border-left: 3px solid var(--el-color-primary);
+ border-radius: 4px;
/* Element Plus 缁欑浉閭� el-button 榛樿鍔犱簡 margin-left:12px锛屼細涓� gap 鍙犲姞锛屾竻鎺� */
:deep(.el-button + .el-button) {
margin-left: 0;
}
}
+
+/* ==========================================================================
+ 銆�2026-11-25 闇�姹傘�戝凡瀹屾垚鍒楄〃锛氬彧鏄剧ず 4 琛屽乏鍙筹紝瓒呰繃灏卞嚭鐜扮旱鍚戞粴鍔ㄦ潯
+ 锛堝疄娴嬭楂� 40px銆佽〃澶� 63px 鈫� 63 + 4脳40 + 2 = 225px锛夈��
+ ========================================================================== */
+.records-scroll {
+ max-height: 225px;
+ min-height: 120px;
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ :deep(.el-table__header-wrapper) {
+ position: sticky;
+ top: 0;
+ z-index: 2;
+ background-color: var(--el-bg-color);
+ }
+}
</style>
--
Gitblit v1.9.3