From 812ffe6f989303514b45f8106f09ff902bbe0d8a Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 31 十月 2024 16:19:56 +0800
Subject: [PATCH] update
---
src/views/ecg/doctor/DevDismantle.vue | 33 ++++++++++++++--
src/views/ecg/doctor/components/RoutinePanel.vue | 1
src/views/ecg/appointment/index.vue | 2
src/api/ecg/appointment/index.ts | 9 +++-
src/views/ecg/appointment/AppointmentConfirm.vue | 2
src/views/ecg/appointment/AppointmentForm.vue | 27 +++++++++++--
src/api/ecg/devrent/index.ts | 5 ++
src/views/ecg/queue/index.vue | 23 +++++++++--
src/views/ecg/doctor/components/DevInstallPanel.vue | 1
9 files changed, 84 insertions(+), 19 deletions(-)
diff --git a/src/api/ecg/appointment/index.ts b/src/api/ecg/appointment/index.ts
index 402e9d2..bbcd7eb 100644
--- a/src/api/ecg/appointment/index.ts
+++ b/src/api/ecg/appointment/index.ts
@@ -36,9 +36,14 @@
return await request.get({ url: `/ecg/appointment/get?id=` + id })
},
+ //
+ getCurAppointmentByPatId: async (patId: string) => {
+ return await request.get({ url: `/ecg/appointment/get-current-by-patient?patId=` + patId })
+ },
+
// 浠嶩IS鎴栬�匘B鏌ヨ棰勭害璇︽儏
- getAppointmentByPatId: async (patId: string) => {
- return await request.get({ url: `/ecg/appointment/get-by-patient?patId=` + patId })
+ queryAndCreateAppointmentByPatId: async (patId: string) => {
+ return await request.get({ url: `/ecg/appointment/query-and-create-by-patient?patId=` + patId })
},
// 浠嶩IS鏌ヨ棰勭害鎴栧紑鍗曚俊鎭�
diff --git a/src/api/ecg/devrent/index.ts b/src/api/ecg/devrent/index.ts
index 6088315..58d4813 100644
--- a/src/api/ecg/devrent/index.ts
+++ b/src/api/ecg/devrent/index.ts
@@ -114,5 +114,10 @@
return await request.post({ url: `/ecg/dev-rent/dev-lose`, data })
},
+ // 鎹熸瘉
+ devDamage: async (data: DevRentVO) => {
+ return await request.post({ url: `/ecg/dev-rent/dev-damage`, data })
+ },
+
}
diff --git a/src/views/ecg/appointment/AppointmentConfirm.vue b/src/views/ecg/appointment/AppointmentConfirm.vue
index f7c5579..8ff1564 100644
--- a/src/views/ecg/appointment/AppointmentConfirm.vue
+++ b/src/views/ecg/appointment/AppointmentConfirm.vue
@@ -153,7 +153,7 @@
if (null === queryParams.patId || "" === queryParams.patId)
return
- const data = await AppointmentApi.getAppointmentByPatId(queryParams.patId) // 瀵瑰簲鏁版嵁搴撲腑 pat_id
+ const data = await AppointmentApi.queryAndCreateAppointmentByPatId(queryParams.patId) // 瀵瑰簲鏁版嵁搴撲腑 pat_id
console.info( data )
if (null !== data) {
formData.value = data
diff --git a/src/views/ecg/appointment/AppointmentForm.vue b/src/views/ecg/appointment/AppointmentForm.vue
index 71248fe..f79ec29 100644
--- a/src/views/ecg/appointment/AppointmentForm.vue
+++ b/src/views/ecg/appointment/AppointmentForm.vue
@@ -219,10 +219,25 @@
}
}
}
-defineExpose({ open }) // 鎻愪緵 open 鏂规硶锛岀敤浜庢墦寮�寮圭獥
+const openByQueue = async (type: string, patId: string) => {
+ dialogVisible.value = true
+ dialogTitle.value = t('action.' + type)
+ formType.value = type
+ resetForm()
+ // 淇敼鏃讹紝璁剧疆鏁版嵁
+ if (patId) {
+ formLoading.value = true
+ try {
+ formData.value = await AppointmentApi.getCurAppointmentByPatId( patId )
+ } finally {
+ formLoading.value = false
+ }
+ }
+}
+defineExpose({ open, openByQueue }) // 鎻愪緵 open 鏂规硶锛岀敤浜庢墦寮�寮圭獥
/** 鎻愪氦琛ㄥ崟 */
-const emit = defineEmits(['success']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
+const emit = defineEmits(['event_appointment_success']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
const submitForm = async () => {
// 鏍¢獙琛ㄥ崟
await formRef.value.validate()
@@ -232,14 +247,16 @@
const data = formData.value as unknown as AppointmentVO
if (formType.value === 'create') {
await AppointmentApi.createAppointment(data)
+ // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
+ emit('event_appointment_success')
message.success(t('common.createSuccess'))
- } else {
+ } else if (formType.value === 'update') {
await AppointmentApi.updateAppointment(data)
+ // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
+ emit('event_appointment_success')
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
- // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
- emit('success')
} finally {
formLoading.value = false
}
diff --git a/src/views/ecg/appointment/index.vue b/src/views/ecg/appointment/index.vue
index 64b9ce7..9a0fb71 100644
--- a/src/views/ecg/appointment/index.vue
+++ b/src/views/ecg/appointment/index.vue
@@ -193,7 +193,7 @@
</ContentWrap>
<!-- 琛ㄥ崟寮圭獥锛氭坊鍔�/淇敼 -->
- <AppointmentForm ref="formRef" @success="getList" />
+ <AppointmentForm ref="formRef" @event_appointment_success="getList" />
</template>
<script setup lang="ts">
diff --git a/src/views/ecg/doctor/DevDismantle.vue b/src/views/ecg/doctor/DevDismantle.vue
index d479724..0b313d7 100644
--- a/src/views/ecg/doctor/DevDismantle.vue
+++ b/src/views/ecg/doctor/DevDismantle.vue
@@ -1,3 +1,4 @@
+<!--鎷嗘満鐣岄潰-->
<template>
<el-form
ref="formRef"
@@ -76,6 +77,7 @@
<el-button @click="submitForm" type="primary" :disabled="formLoading">鎷嗘満瀹屾垚</el-button>
<el-button @click="resetForm()">閲� 缃�</el-button>
<el-button @click="loseDismantle" :disabled="formLoading">閬� 澶�</el-button>
+ <el-button @click="damageDismantle" :disabled="formLoading">鎹� 姣�</el-button>
<!-- 鍖荤敓鎷嗘満鍒楄〃 -->
<ContentWrap>
@@ -85,6 +87,7 @@
<template #default="scope">
<span v-if="scope.row.jobType === 20">"宸叉媶鏈�"</span>
<span v-if="scope.row.jobType === 40">"宸查仐澶�"</span>
+ <span v-if="scope.row.jobType === 42">"宸叉崯姣�"</span>
</template>
</el-table-column>
<!-- <el-table-column label="浣滀笟绫诲瀷" align="center" prop="jobType" />-->
@@ -151,7 +154,7 @@
/** 瑁呮満鎷嗘満 琛ㄥ崟 */
defineOptions({ name: 'DevrDismantle' })
-const emit = defineEmits(['success']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
+const emit = defineEmits(['event_dismantle_success']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
const { t } = useI18n() // 鍥介檯鍖�
const message = useMessage() // 娑堟伅寮圭獥
@@ -181,7 +184,7 @@
message.success(t('鎿嶄綔鎴愬姛'))
dialogVisible.value = false
// 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
- emit('success')
+ emit('event_dismantle_success')
resetForm()
getList()
} finally {
@@ -189,7 +192,7 @@
}
}
-// 閬楀け鎿嶄綔
+// 閬楀け.鎷嗘満鎿嶄綔
const loseDismantle = async () => {
// 鏍¢獙琛ㄥ崟
await formRef.value.validate()
@@ -201,7 +204,27 @@
message.success(t('鎿嶄綔鎴愬姛'))
dialogVisible.value = false
// 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
- emit('success')
+ emit('event_dismantle_success')
+ resetForm()
+ getList()
+ } finally {
+ formLoading.value = false
+ }
+}
+
+// 鎹熸瘉.鎷嗘満鎿嶄綔
+const damageDismantle = async () => {
+ // 鏍¢獙琛ㄥ崟
+ await formRef.value.validate()
+ // 鎻愪氦璇锋眰
+ formLoading.value = true
+ try {
+ const data = formData.value as unknown as DevRentVO
+ await DevRentApi.devDamage(data)
+ message.success(t('鎿嶄綔鎴愬姛'))
+ dialogVisible.value = false
+ // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
+ emit('event_dismantle_success')
resetForm()
getList()
} finally {
@@ -271,7 +294,7 @@
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
- jobType: [20, 40],
+ jobType: [20, 40, 42], // 妫�鏌ョ姸鎬�
docId: undefined,
docName: undefined,
devId: undefined,
diff --git a/src/views/ecg/doctor/components/DevInstallPanel.vue b/src/views/ecg/doctor/components/DevInstallPanel.vue
index 729ee2f..6c8da84 100644
--- a/src/views/ecg/doctor/components/DevInstallPanel.vue
+++ b/src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -10,6 +10,7 @@
<el-col :span="12">
<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-form-item>
<el-form-item label="鎮h�呭悕绉�" prop="patName">
<el-input v-model="formData.patName" placeholder="璇疯緭鍏ユ偅鑰呭悕绉�" />
diff --git a/src/views/ecg/doctor/components/RoutinePanel.vue b/src/views/ecg/doctor/components/RoutinePanel.vue
index 9023179..41c599a 100644
--- a/src/views/ecg/doctor/components/RoutinePanel.vue
+++ b/src/views/ecg/doctor/components/RoutinePanel.vue
@@ -11,6 +11,7 @@
<el-col :span="12">
<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-form-item>
<el-form-item label="鎮h�呭悕绉�" prop="patName">
<el-input v-model="formData.patName" placeholder="璇疯緭鍏ユ偅鑰呭悕绉�" />
diff --git a/src/views/ecg/queue/index.vue b/src/views/ecg/queue/index.vue
index 32f3639..d682321 100644
--- a/src/views/ecg/queue/index.vue
+++ b/src/views/ecg/queue/index.vue
@@ -101,6 +101,7 @@
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 鎼滅储</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 閲嶇疆</el-button>
+<!--
<el-button
type="primary"
plain
@@ -109,6 +110,8 @@
>
<Icon icon="ep:plus" class="mr-5px" /> 鏂板
</el-button>
+-->
+<!--
<el-button
type="success"
plain
@@ -118,6 +121,7 @@
>
<Icon icon="ep:download" class="mr-5px" /> 瀵煎嚭
</el-button>
+-->
</el-form-item>
</el-form>
</ContentWrap>
@@ -163,11 +167,12 @@
<el-button
link
type="primary"
- @click="openForm('update', scope.row.id)"
- v-hasPermi="['ecg:queue:update']"
+ @click="openAppointmentForm('preview', scope.row.patId)"
+ v-hasPermi="['ecg:appointment:preview']"
>
- 缂栬緫
+ 鏌ョ湅
</el-button>
+<!--
<el-button
link
type="danger"
@@ -176,6 +181,7 @@
>
鍒犻櫎
</el-button>
+-->
<el-button
link
type="danger"
@@ -183,7 +189,7 @@
v-if="scope.row.status === 10"
v-hasPermi="['ecg:queue:jump']"
>
- {{scope.row.jumpFlag === 0? "鎻掗槦" : "鍙栨秷鎻掗槦"}}
+ {{scope.row.jumpFlag === 0? "鍔犳��" : "鍙栨秷鍔犳��"}}
</el-button>
<el-button
link
@@ -207,7 +213,10 @@
</ContentWrap>
<!-- 琛ㄥ崟寮圭獥锛氭坊鍔�/淇敼 -->
- <queueForm ref="formRef" @success="getList" />
+ <!-- <queueForm ref="formRef" @success="getList" />-->
+
+ <!-- 琛ㄥ崟寮圭獥锛氭坊鍔�/淇敼 -->
+ <AppointmentForm ref="formRef" @event_appointment_success="getList" />
</template>
<script setup lang="ts">
@@ -218,6 +227,7 @@
import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
import {DoctorApi, PatientVO} from "@/api/ecg/doctor";
import {useCheckTypeStore} from "@/store/modules/checkType";
+import AppointmentForm from "@/views/ecg/appointment/AppointmentForm.vue";
/** 鎺掗槦 鍒楄〃 */
defineOptions({ name: 'queue' })
@@ -278,6 +288,9 @@
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
+const openAppointmentForm = (type: string, patId: string, status: number) => {
+ formRef.value.openByQueue(type, patId, status)
+}
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
const handleDelete = async (id: number) => {
--
Gitblit v1.9.3