From 2235539dac58e7e8e838a1b40cbb7f0b995b063e Mon Sep 17 00:00:00 2001
From: wally <18603454788@163.com>
Date: Sun, 21 May 2023 16:21:34 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B9=B3=E8=BD=A6=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E5=BC=B9=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/CarInfo/CarInfo.vue | 68 ++++++++++++++++++++++++++++
config/service.ts | 10 ++--
pages/patient-list/patient-list.vue | 36 +++++++++++++--
static/images/angle.png | Bin 0 -> 635 bytes
static/images/power.png | Bin 0 -> 522 bytes
static/images/vibrate.png | Bin 0 -> 803 bytes
static/images/weight.png | Bin 0 -> 631 bytes
7 files changed, 103 insertions(+), 11 deletions(-)
create mode 100644 components/CarInfo/CarInfo.vue
create mode 100644 static/images/angle.png
create mode 100644 static/images/power.png
create mode 100644 static/images/vibrate.png
create mode 100644 static/images/weight.png
diff --git a/components/CarInfo/CarInfo.vue b/components/CarInfo/CarInfo.vue
new file mode 100644
index 0000000..c966758
--- /dev/null
+++ b/components/CarInfo/CarInfo.vue
@@ -0,0 +1,68 @@
+
+
+
+ {{ currentCar?.carNo }}
+ {{ CAR_STATUS[currentCar!.online] }}
+
+
+
+
+
+ {{ currentCar?.sensorAngleV || '-' }}
+
+
+
+ {{ currentCar?.sensorVibrate || '-' }}
+
+
+
+ {{ currentCar?.sensorWeight || '-' }}
+
+
+
+ {{ currentCar?.sensorPower + '%' || '-' }}
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
diff --git a/config/service.ts b/config/service.ts
index 204ae9e..f4ae214 100644
--- a/config/service.ts
+++ b/config/service.ts
@@ -15,9 +15,7 @@ export function GET_GENDER_TEXT_BY_CODE(code: number): string | undefined {
}
// 急救状态
-export const AID_STATUS = {
- 0: '创建',
- 1: '待审核',
- 2: '审核通过',
- 3: '审核拒绝',
-}
+export const AID_STATUS = { 0: '创建', 1: '待审核', 2: '审核通过', 3: '审核拒绝' }
+
+// 平车状态
+export const CAR_STATUS = { 0: '离线', 1: '在线' }
diff --git a/pages/patient-list/patient-list.vue b/pages/patient-list/patient-list.vue
index 7251644..3d3621a 100644
--- a/pages/patient-list/patient-list.vue
+++ b/pages/patient-list/patient-list.vue
@@ -34,8 +34,15 @@
-
+
+
+
+
+
+
+
+
@@ -50,6 +57,7 @@ import { onReachBottom } from '@dcloudio/uni-app'
const serviceStore = useServiceStore()
const { pagination, updatePagination, resetPagination } = usePagination()
+const popupRef = ref()
const data = ref([])
const keywords = ref('')
const searchHeight = ref(100)
@@ -57,9 +65,18 @@ const searchHeight = ref(100)
const currentAidId = computed(() => serviceStore.currentPatient?.firstAidId)
function onClickItem(event) {
- const item = data[event.detail.index]
- serviceStore.setCurrentPatient(item)
- uni.$u.openPage('detail2')
+ console.log(event.detail);
+ const { index } = event.detail
+ if (index === 0) {
+ // 创建患者
+ uni.$u.openPage('detail2')
+ } else {
+ // 查看详情
+ const item = data.value[index - 1]
+ serviceStore.setCurrentPatient(item)
+ uni.$u.openPage('detail1')
+ }
+
}
function onSearch(searchValue: string) {
@@ -78,14 +95,23 @@ async function getAidList() {
} catch (error) {
console.error(error);
}
+
}
+// 查看平车详情
+function openCarInfo() {
+ popupRef.value.open()
+}
+
+// 获取search 组件的高度
function onSearchLoad(height: number) {
searchHeight.value = height
}
-
+// 默认搜索
onSearch('')
+
+// 触底加载下一页
onReachBottom(() => {
console.log('reach bottom', pagination);
if (pagination.nextPage === 0) {
diff --git a/static/images/angle.png b/static/images/angle.png
new file mode 100644
index 0000000000000000000000000000000000000000..d39143f6dee14a85d10c4dacd975f4c06d46fcfd
GIT binary patch
literal 635
zcmV->0)+jEP)Px%HAzH4R7gwZ)>)`caTLe#&ozaJc%e*@BBZ1|8A^E&GL*Sc9(b2TGNlwLLxxa9
zo`?)3MDd^$N@U0wp_I%sX=&X$bne;r9@B$=?at|(z1MgD*ZTd|`q%getL7gt{ol~V
zc!xcB@+Z#Cg_JTxQN5$?k%^|pP|h$Ed%Yt
z{tDoMSccBnh7Hv~pJ94JdtoisSE%)a~xQ)K(fCp%Xj@X6e
zzXKZT?T(2UfxS45ZWxKN=z?Qdl8Pttt^$o$!W2dtyO?qfKtf`Yz@B@K}g5MO$qsv_C@8pRhY^(*yGm
z9^HY>cvY!$)dw0W4YkJSW3rCgRl0bv7
z2%}4Wi!4O*2!EHIQbjurPj1Cf97t$sr)iTuo}X&|f?L>_SK0CwK_8`X;^Cc$Ves>c
z<~}>K@gCc=@5c8AK^tKu4j~@?oL60O`ecv(icMMj23sa3O3cj|3P04g
zu9L$6G|ndevRYz_?0w0?^f$07hxotGy?;Et-vINO
Vo*qm*WZeJ&002ovPDHLkV1l>dD>ncD
literal 0
HcmV?d00001
diff --git a/static/images/power.png b/static/images/power.png
new file mode 100644
index 0000000000000000000000000000000000000000..a8752b004e6f3f15edd7182d9a4d55fe26039626
GIT binary patch
literal 522
zcmV+l0`>igP)Px$#7RU!R7gwh*12m{VGsrIUxJ!|;zAM?^bfGq7}Lg7B8ZI&A}9(HaKR;AB7qc1
zZJ})lh<}GRS_m$nqJ>zAyGbnEg9`(5;pGONuek5MCbzlp@!dHy=ggeB9oq18v;or!
zXj55l8@=nW54*5|N_GB@`?!q{1$|NJ6&yn^R#(jHZ_MEVM({P_2k0xT!8qRIZ-u~H
zaUMN5fX4-BfIP&0d_*_4;Tt~T7uKT>UoekFY|gW&Z~ju$wI!33PiWI~eNc#4}T&Dl)m39crSA>U!t1r7dpq7xTVk0}h}2QK4f
z%CQ&svYNG+O{OBosZ6c_J(@9Jho(VqZKcn#BXu3cBTQl_&n_bFL=V)0Zp4ke6W^T1
z+icXR^f(64)k@G4nfQ@bg9bBWtp*K=T3TscP3v{$w9C!DRWBZc>d(Z>*1?Y&!Y2Jv3vz2z-a
z<&F*CeuHP_EmQ2%{wD6zTjhOP;U;S=RFzaVhFI~h$qMK)2HK+OKY(7lAAJ6ZPyhe`
M07*qoM6N<$g8x6~_y7O^
literal 0
HcmV?d00001
diff --git a/static/images/vibrate.png b/static/images/vibrate.png
new file mode 100644
index 0000000000000000000000000000000000000000..0d18360da74a0a365cff68f311c45ed61b03aede
GIT binary patch
literal 803
zcmV+;1Kj+HP)Px%-AP12R7gwh)>+6GRTu{FpGk{$VUgrT+Tuk*LMcQ@6e1a=l$J}DErdk`8nj!q
zXj&o!d0|GIq)3a3Ergh8Vj)o>R3b!%X;@?_DS^>mJn>EpR(yZ-3omjm&&-+Uyw5h%
z!y&kO90E*-LH|?M+w}ItQTP$RbtCE#I2u3U*Sxn4x&UY4KD=At2a6rBVR!@|Vp3x7Ku^b})}&z}
zxlV(nVb+!unKbP)3NK-MX`8)qa5L$5|EB3Bm91!$*d#_Ni)cEoqSX&yR}?~940t@Q
z#bbB}6H50+)2FdHpfN#iKHhR~UKmqF!$z4%L95t0mf}jPNVa^h;y?(qoUDOKZL>*NlM{?qCOY{D({KZ)GVA@UE6oRMmh~s
zio#c`G`a#k6W3uI7M4H$v61qkcK60a34M2b-eRl_6^&!C7pZWjL`v>}Iz3fE>8i@b^002ovPDHLkV1j0ueKP<6
literal 0
HcmV?d00001
diff --git a/static/images/weight.png b/static/images/weight.png
new file mode 100644
index 0000000000000000000000000000000000000000..d70c2b459a2ca8e1ec98815c470f10c59731ff20
GIT binary patch
literal 631
zcmV--0*L*IP)Px%F-b&0R7gwh)=8+1aTo^h-!)~96c*Tsg(>Vzk;p>XSdbLiup$dW85UTuF)SoR
zh=mkN%9zMdbhALFlzGUId8W7CQx`YRr+b{u{p$2}zW;aL=Y5{%{XhRxqY76|6)-h|
zR#f$>$vYVH&>c-GNbwu)Vs$V*gaCemuN4Gsiq5zgpzm-!*}kp^w5|o;b3LBLC%%`S
z#Zu|r`qtV7OY|-+p2h^c_yx2D#-;4%@d({gnGUGME%ZVkMB!*6Y>dXGteWMt-!u)AXqO%Yb-@DnVau6!!blt?~8yo#}bUeb97Ca
z!{aOHpMw&tqIfHe!oa*A&23o7(bD9qq1r1NbpI{iN^CmZaq)(($6uyHW2e>!DqV=u