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 @@ + + + + + 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 0000000..d39143f Binary files /dev/null and b/static/images/angle.png differ diff --git a/static/images/power.png b/static/images/power.png new file mode 100644 index 0000000..a8752b0 Binary files /dev/null and b/static/images/power.png differ diff --git a/static/images/vibrate.png b/static/images/vibrate.png new file mode 100644 index 0000000..0d18360 Binary files /dev/null and b/static/images/vibrate.png differ diff --git a/static/images/weight.png b/static/images/weight.png new file mode 100644 index 0000000..d70c2b4 Binary files /dev/null and b/static/images/weight.png differ