跳转小程序报告解读

wenjuan
yanzai 1 year ago
parent e8f1b82761
commit 7407f9daf4

@ -95,7 +95,7 @@ class FenzhenController extends Controller
public function info() public function info()
{ {
$id = request('id'); $id = request('id');
$info = DB::table('orders')->where(['id' => $id])->whereIn('status', [2, 4])->get(); $info = DB::table('orders')->where(['id' => $id])->whereIn('status', [2, 4])->first();
if (!$info) return \Yz::echoError1("查询就诊人订单失败"); if (!$info) return \Yz::echoError1("查询就诊人订单失败");
return \Yz::Return(true, "获取成功", [ return \Yz::Return(true, "获取成功", [
'info' => [ 'info' => [

@ -1,243 +1,231 @@
<script setup> <script setup>
/** /**
* name * name
* userbgcx * userbgcx
* date2024年9月20日 20:05:05 * date2024年9月20日 20:05:05
*/ */
import { ref, computed } from "vue"; import {
import { $image, $api, $response } from "@/api"; ref,
import { onShow } from "@dcloudio/uni-app"; computed
import { useStore } from "@/store"; } from "vue";
const $store = useStore(); import {
let tabIndex = ref(0); // $image,
const bgcx_list = ref(null); $api,
$response
} from "@/api";
import {
onShow
} from "@dcloudio/uni-app";
import wx from 'weixin-js-sdk'
import {
useStore
} from "@/store";
const $store = useStore();
let tabIndex = ref(0); //
const bgcx_list = ref(null);
const $props = defineProps({}); const $props = defineProps({});
const mountedAction = async () => { const mountedAction = async () => {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
// openId.value = $props.openId; // openId.value = $props.openId;
// if (openId.value) { // if (openId.value) {
gettjbgInfo(); // gettjbgInfo(); //
// } // }
}; };
const gettjbgInfo = async (index) => { const gettjbgInfo = async (index) => {
tabIndex.value = index ? index : 0; tabIndex.value = index ? index : 0;
// //
console.log(tabIndex.value); console.log(tabIndex.value);
console.log($store, "store"); console.log($store, "store");
let obj = { let obj = {
tj_status: tabIndex.value, tj_status: tabIndex.value,
hospital_id: $store.save.hospital hospital_id: $store.save.hospital
}; };
const response = await $api("GetReportList", obj); const response = await $api("GetReportList", obj);
$response(response, () => { $response(response, () => {
console.log(response, "response"); console.log(response, "response");
bgcx_list.value = response.data.list; bgcx_list.value = response.data.list;
uni.hideLoading(); uni.hideLoading();
}); });
}; };
const config_ref = ref(null); const config_ref = ref(null);
const configRef = (e) => { const configRef = (e) => {
if (!config_ref.value) { if (!config_ref.value) {
config_ref.value = e; config_ref.value = e;
mountedAction(); mountedAction();
} }
}; };
const routesDeatils = (val) => { const routesDeatils = (val) => {
// //
let tjhStr = val["体检号"]; let tjhStr = val["体检号"];
uni.navigateTo({ uni.navigateTo({
url: `/pages/main/bgcx/ckbg/ckbg?tjh=${tjhStr}`, url: `/pages/main/bgcx/ckbg/ckbg?tjh=${tjhStr}`,
}); });
}; };
const tzroutes = (url) => { const tzroutes = (url) => {
// if (url == 'bgjd') {
$store.setTjbgInfo([]); wx.miniProgram.navigateTo({
uni.navigateTo({ url: '/pages/other/entry/index?path=/pages/outpatient/doctor-appointment/index&scene=1035&hospitalAreaId=6&departmentCode=A0030077&subDepartmentCode=4773794195699464904'
url: `/pages/main/bgcx/${url}/${url}`, })
}); }
}; //
onShow(() => { $store.setTjbgInfo([]);
if (!!config_ref.value) { uni.navigateTo({
mountedAction(); url: `/pages/main/bgcx/${url}/${url}`,
} });
}); };
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script> </script>
<template> <template>
<view> <view>
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
</view> </view>
<view class="bgcx pl-10rpx pr-10rpx"> <view class="bgcx pl-10rpx pr-10rpx">
<view class="bgcx_header"> <view class="bgcx_header">
<view <view @click="tzroutes('bgjd')" class="bgcx_header_bgcolor"
@click="tzroutes('bgjd')" style="background: linear-gradient(-30deg, #3bcda9, #3dcbd1)">
class="bgcx_header_bgcolor" <view class="bgcx_header_text"> 报告解读 </view>
style="background: linear-gradient(-30deg, #3bcda9, #3dcbd1)" <image src="@/static/assets/slices/bgjd.png"></image>
> </view>
<view class="bgcx_header_text"> 报告解读 </view> <view @click="tzroutes('bgdb')" class="bgcx_header_bgcolor"
<image src="@/static/assets/slices/bgjd.png"></image> style="background: linear-gradient(-30deg, #fec546, #ffae22)">
</view> <view class="bgcx_header_text"> 报告对比 </view>
<view <image src="@/static/assets/slices/bgdb.png"></image>
@click="tzroutes('bgdb')" </view>
class="bgcx_header_bgcolor" <view @click="tzroutes('qsfx')" class="bgcx_header_bgcolor"
style="background: linear-gradient(-30deg, #fec546, #ffae22)" style="background: linear-gradient(-30deg, #8bbafe, #7898fe)">
> <view class="bgcx_header_text"> 趋势分析 </view>
<view class="bgcx_header_text"> 报告对比 </view> <image src="@/static/assets/slices/xsfx.png"></image>
<image src="@/static/assets/slices/bgdb.png"></image> </view>
</view> </view>
<view <view class="bgcx_fullReport">
@click="tzroutes('qsfx')" <view class="text-#123531 text-34rpx"> 全部报告 </view>
class="bgcx_header_bgcolor" <view class="bgcx_fullReport_query mb-38rpx">
style="background: linear-gradient(-30deg, #8bbafe, #7898fe)" <view @click="gettjbgInfo(0)" :class="tabIndex == 0 ? 'bgcx_fullReport_query_button_active' : ''"
> class="bgcx_fullReport_query_button">全部</view>
<view class="bgcx_header_text"> 趋势分析 </view> <view @click="gettjbgInfo(1)" :class="tabIndex == 1 ? 'bgcx_fullReport_query_button_active' : ''"
<image src="@/static/assets/slices/xsfx.png"></image> class="bgcx_fullReport_query_button">已出报告</view>
</view> <view @click="gettjbgInfo(2)" :class="tabIndex == 2 ? 'bgcx_fullReport_query_button_active' : ''"
</view> class="bgcx_fullReport_query_button">未出报告</view>
<view class="bgcx_fullReport"> </view>
<view class="text-#123531 text-34rpx"> 全部报告 </view> <view v-for="(val, i) in bgcx_list" :key="i" @click="routesDeatils(val)">
<view class="bgcx_fullReport_query mb-38rpx"> <view class="flex items-center">
<view <view class="w-8rpx h-8rpx bg-#239EA3 rounded-15rpx"> </view>
@click="gettjbgInfo(0)" <view class="ml-8rpx text-26rpx">
:class="tabIndex == 0 ? 'bgcx_fullReport_query_button_active' : ''" {{ val["登记时间"] }}
class="bgcx_fullReport_query_button" </view>
>全部</view </view>
> <view class="mt-29rpx mb-40rpx bg-#239EA3 rounded-20rpx flex"
<view style="box-shadow: 0rpx 2rpx 10rpx 0rpx rgba(141, 141, 141, 0.25)">
@click="gettjbgInfo(1)" <view class="flex-1 pb-25rpx bg-#fff rounded-20rpx">
:class="tabIndex == 1 ? 'bgcx_fullReport_query_button_active' : ''" <view v-show="!val.is_read"
class="bgcx_fullReport_query_button" class="rounded-5rpx position-absolute right-94rpx text-#239EA3 rounded-rt-20rpx mt-3rpx w-70rpx h-36rpx bg-#F3F9F9 b-0 b-1 b-solid b-#E9F5F5 text-22rpx text-center">
>已出报告</view 未读
> </view>
<view <view v-show="val.is_read"
@click="gettjbgInfo(2)" class="rounded-5rpx position-absolute right-94rpx rounded-rt-20rpx m-3rpx w-70rpx h-36rpx text-#ED6907 bg-#FCF5F0 b-0 b-1 b-solid b-#F9E1CF text-22rpx text-center">
:class="tabIndex == 2 ? 'bgcx_fullReport_query_button_active' : ''" 已读
class="bgcx_fullReport_query_button" </view>
>未出报告</view <view class="flex mt--20rpx mt-36rpx">
> <view class="flex flex-col items-center w-193rpx">
</view> <view class="line-height-[2.2] text-30rpx font-500">
<view v-for="(val, i) in bgcx_list" :key="i" @click="routesDeatils(val)"> {{ val["姓名"] }}
<view class="flex items-center"> </view>
<view class="w-8rpx h-8rpx bg-#239EA3 rounded-15rpx"> </view> <view class="text-26rpx text-#868686">
<view class="ml-8rpx text-26rpx"> {{ val["性别"] }}
{{ val["登记时间"] }} </view>
</view> </view>
</view> <view class="flex flex-col flex-1">
<view <view class="line-height-[2.2] text-#0D0D0D text-26rpx">
class="mt-29rpx mb-40rpx bg-#239EA3 rounded-20rpx flex" 体检报告
style="box-shadow: 0rpx 2rpx 10rpx 0rpx rgba(141, 141, 141, 0.25)" </view>
> <view class="text-#868686 text-26rpx box-border pr-20rpx">
<view class="flex-1 pb-25rpx bg-#fff rounded-20rpx"> {{ val["套餐名称"] }}
<view <br />
v-show="!val.is_read" 报告编号 {{ val["体检号"] }}
class="rounded-5rpx position-absolute right-94rpx text-#239EA3 rounded-rt-20rpx mt-3rpx w-70rpx h-36rpx bg-#F3F9F9 b-0 b-1 b-solid b-#E9F5F5 text-22rpx text-center" </view>
> </view>
未读 </view>
</view> </view>
<view <view class="text-#fff w-26rpx ml-16rpx mr-16rpx text-26rpx mt-26rpx line-height-[1.2]">
v-show="val.is_read" 体检报告
class="rounded-5rpx position-absolute right-94rpx rounded-rt-20rpx m-3rpx w-70rpx h-36rpx text-#ED6907 bg-#FCF5F0 b-0 b-1 b-solid b-#F9E1CF text-22rpx text-center" </view>
> </view>
已读 </view>
</view> </view>
<view class="flex mt--20rpx mt-36rpx"> </view>
<view class="flex flex-col items-center w-193rpx">
<view class="line-height-[2.2] text-30rpx font-500">
{{ val["姓名"] }}
</view>
<view class="text-26rpx text-#868686">
{{ val["性别"] }}
</view>
</view>
<view class="flex flex-col flex-1">
<view class="line-height-[2.2] text-#0D0D0D text-26rpx">
体检报告
</view>
<view class="text-#868686 text-26rpx box-border pr-20rpx">
{{ val["套餐名称"] }}
<br />
报告编号 {{ val["体检号"] }}
</view>
</view>
</view>
</view>
<view
class="text-#fff w-26rpx ml-16rpx mr-16rpx text-26rpx mt-26rpx line-height-[1.2]"
>
体检报告
</view>
</view>
</view>
</view>
</view>
</template> </template>
<style scoped> <style scoped>
.bgcx { .bgcx {
/* width: 750rpx; */ /* width: 750rpx; */
margin: 0 auto; margin: 0 auto;
} }
.bgcx_header { .bgcx_header {
margin-top: 20rpx; margin-top: 20rpx;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.bgcx_header_bgcolor { .bgcx_header_bgcolor {
width: 220rpx; width: 220rpx;
height: 180rpx; height: 180rpx;
border-radius: 15rpx; border-radius: 15rpx;
} }
.bgcx_header_bgcolor image { .bgcx_header_bgcolor image {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-left: 117rpx; margin-left: 117rpx;
} }
.bgcx_header_text { .bgcx_header_text {
/* box-sizing: border-box; /* box-sizing: border-box;
padding: 41rpx 0 0 19rpx; */ padding: 41rpx 0 0 19rpx; */
color: #fff; color: #fff;
font-size: 36rpx; font-size: 36rpx;
margin: 35rpx 0 0 19rpx; margin: 35rpx 0 0 19rpx;
} }
.bgcx_fullReport { .bgcx_fullReport {
/* width: 730rpx; */ /* width: 730rpx; */
background: #ffffff; background: #ffffff;
margin: 20rpx auto; margin: 20rpx auto;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.04); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.04);
border-radius: 5px; border-radius: 5px;
padding: 31rpx 25rpx; padding: 31rpx 25rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.bgcx_fullReport_query { .bgcx_fullReport_query {
display: flex; display: flex;
} }
.bgcx_fullReport_query_button_active { .bgcx_fullReport_query_button_active {
background: #e2f2f1; background: #e2f2f1;
border: 1px solid #239ea3; border: 1px solid #239ea3;
color: #239ea3; color: #239ea3;
} }
.bgcx_fullReport_query_button { .bgcx_fullReport_query_button {
margin: 32rpx 30rpx 0 0; margin: 32rpx 30rpx 0 0;
width: 150rpx; width: 150rpx;
height: 58rpx; height: 58rpx;
line-height: 58rpx; line-height: 58rpx;
background: #f1f2f6; background: #f1f2f6;
border-radius: 29rpx; border-radius: 29rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
} }
</style> </style>
Loading…
Cancel
Save