From cf3bea139063544d92dc0e03f7766b2882c5daa1 Mon Sep 17 00:00:00 2001 From: sa0ChunLuyu Date: Wed, 13 Nov 2024 00:15:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AF=A6=E6=83=85=EF=BC=9A=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=94=B9=E6=88=90=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=88=E5=87=8F=E5=B0=91=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC=EF=BC=89=EF=BC=8C=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BF=A1=E6=81=AF=E5=B0=B1=E5=8F=AF=E4=BB=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/user/fenzhen/fenzhen.vue | 145 +++++++++++++++++++++++------- 1 file changed, 113 insertions(+), 32 deletions(-) diff --git a/h5/pages/user/fenzhen/fenzhen.vue b/h5/pages/user/fenzhen/fenzhen.vue index cec4fdc..d523a28 100644 --- a/h5/pages/user/fenzhen/fenzhen.vue +++ b/h5/pages/user/fenzhen/fenzhen.vue @@ -40,7 +40,8 @@ fenzhen_list.value = response.data; console.log(window.location.href) setTimeout(() => { - if (!!window.location.href.includes('/pages/user/fenzhen/fenzhen')) { + if (!!window.location.href.includes('/pages/user/fenzhen/fenzhen') && + !window.location.href.includes('192.168.31.84:5173')) { getFenzhenList(false) } }, 1000 * 10) @@ -59,12 +60,6 @@ } }; - const toRouter = (clinic) => { - uni.navigateTo({ - url: "/pages/user/fenzhen/xindiantu?id=" + $props.id + '&clinic=' + clinic, - }); - }; - const timeShow = (time) => { let time_array = time.split(":"); return `${time_array[0]}:${time_array[1]}`; @@ -95,6 +90,44 @@ }) } + const toRouter = (clinic) => { + uni.navigateTo({ + url: "/pages/user/fenzhen/xindiantu?id=" + $props.id + '&clinic=' + clinic, + }); + }; + const fenzhen_active = ref(-1) + const fenzhen_info = ref(false) + const infoShowClick = (clinic) => { + if (clinic !== fenzhen_active.value) { + fenzhen_info.value = false + getFenzhenInfo(clinic) + } else { + fenzhen_active.value = -1 + } + } + const qijian = (item) => { + uni.navigateTo({ + url: `/pages/user/fenzhen/qijian?id=${$props.id}&xmid=${item.id}&tj_number=${fenzhen_list.value.info.tj_number}`, + }); + }; + + const getFenzhenInfo = async (clinic) => { + fenzhen_active.value = clinic + uni.showLoading(); + const response = await $api("FenzhenInfo", { + id: $props.id, + clinic: clinic, + }); + uni.hideLoading(); + $response(response, () => { + fenzhen_info.value = response.data; + }); + }; + + const useTimeShow = (time) => { + return Math.ceil(Number(time)) + } + onShow(() => { if (!!config_ref.value) { mountedAction(); @@ -151,14 +184,32 @@ - 开始体检时间 + 开始时间 {{ timeShow(fenzhen_list.info.start_time) }} - — 预计结束时间 + + + 预计结束 {{ - timeShow(fenzhen_list.info.end_time) - }} + timeShow(fenzhen_list.info.yuji_end_time) + }} + — 预计用时 + {{ + useTimeShow(fenzhen_list.info.yuji_use_time) + }} + 分钟 + + + 结束时间 + {{ + timeShow(fenzhen_list.info.end_time) + }} + — 实际用时 + {{ + useTimeShow(fenzhen_list.info.use_time) + }} + 分钟 @@ -171,28 +222,50 @@ 自助导检 - - - {{ - i.time - }} - - - - - - - - - - {{ k + 1 }}.{{ i.name }} - {{ i.desc }} + + + + {{ + i.time + }} + + + + + - - - {{ i.tip }} - 查看详情>> + + + + {{ k + 1 }}.{{ i.name }} + {{ i.desc }} + + + + {{ i.tip }} + 查看详情>> + + + + + + @@ -207,6 +280,10 @@