yanzai 1 year ago
commit 7be8b26dab

@ -90,27 +90,73 @@
} }
}, },
{ {
"path" : "pages/main/order/CheckPay", "path": "pages/main/order/CheckPay",
"style" : "style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{ {
"navigationBarTitleText" : "", "path": "pages/main/optionalProject/choose",
"enablePullDownRefresh" : false "style": {
"navigationBarTitleText": "团检预约",
"enablePullDownRefresh": false
} }
}, },
{ {
"path" : "pages/main/optionalProject/choose", "path": "pages/main/optionalProject/selectType",
"style" : "style": {
"navigationBarTitleText": "团检预约",
"enablePullDownRefresh": false
}
},
{ {
"navigationBarTitleText" : "团检预约", "path": "pages/main/optionalProject/combo",
"enablePullDownRefresh" : false "style": {
"navigationBarTitleText": "套餐列表",
"enablePullDownRefresh": false
} }
}, },
{ {
"path" : "pages/main/optionalProject/selectType", "path": "pages/main/bgcx/bgcx",
"style" : "style": {
"navigationBarTitleText": "报告查询"
}
},
{
"path": "pages/main/bgcx/bgjd/bgjd",
"style": {
"navigationBarTitleText": "报告解读"
}
},
{ {
"navigationBarTitleText" : "团检预约", "path": "pages/main/bgcx/bgdb/bgdb",
"enablePullDownRefresh" : false "style": {
"navigationBarTitleText": "报告对比"
}
},
{
"path": "pages/main/bgcx/ckbg/ckbg",
"style": {
"navigationBarTitleText": "查看报告"
}
},
{
"path": "pages/main/bgcx/qsfx/qsfx",
"style": {
"navigationBarTitleText": "趋势分析"
}
},
{
"path": "pages/main/selectDoctor/selectDoctor",
"style": {
"navigationBarTitleText": "选择医生"
}
},
{
"path": "pages/main/yytjsj/yytjsj",
"style": {
"navigationBarTitleText": "体检预约"
} }
} }
], ],

@ -0,0 +1,235 @@
<script setup>
/**
* name
* userbgcx
* date2024年9月20日 20:05:05
*/
import { ref, computed } from "vue";
import { $image, $api, $response } from "@/api";
import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store";
const $store = useStore();
let tabIndex = ref(0); //
const bgcx_list = ref(null);
const $props = defineProps({});
const mountedAction = async () => {
uni.showLoading({
title: "加载中",
});
// openId.value = $props.openId;
// if (openId.value) {
gettjbgInfo(); //
// }
};
const gettjbgInfo = async (index) => {
tabIndex.value = index ? index : 0;
//
console.log(tabIndex.value);
console.log($store, "store");
let obj = {
tj_status: tabIndex.value
};
const response = await $api("GetReportList", obj);
$response(response, () => {
console.log(response, "response");
bgcx_list.value = response.data.list;
uni.hideLoading();
});
};
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
mountedAction();
}
};
const routesDeatils = (val) => {
//
let tjhStr = val["体检号"];
uni.navigateTo({
url: `/pages/main/bgcx/ckbg/ckbg?tjh=${tjhStr}`,
});
};
const tzroutes = (url) => {
//
uni.navigateTo({
url: `/pages/main/bgcx/${url}/${url}`,
});
};
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
<view class="bgcx pl-10rpx pr-10rpx">
<view class="bgcx_header">
<view
@click="tzroutes('bgjd')"
class="bgcx_header_bgcolor"
style="background: linear-gradient(-30deg, #3bcda9, #3dcbd1)"
>
<view class="bgcx_header_text"> 报告解读 </view>
<image src="@/static/assets/slices/bgjd.png"></image>
</view>
<view
@click="tzroutes('bgdb')"
class="bgcx_header_bgcolor"
style="background: linear-gradient(-30deg, #fec546, #ffae22)"
>
<view class="bgcx_header_text"> 报告对比 </view>
<image src="@/static/assets/slices/bgdb.png"></image>
</view>
<view
@click="tzroutes('qsfx')"
class="bgcx_header_bgcolor"
style="background: linear-gradient(-30deg, #8bbafe, #7898fe)"
>
<view class="bgcx_header_text"> 趋势分析 </view>
<image src="@/static/assets/slices/xsfx.png"></image>
</view>
</view>
<view class="bgcx_fullReport">
<view class="text-#123531 text-34rpx"> 全部报告 </view>
<view class="bgcx_fullReport_query mb-38rpx">
<view
@click="gettjbgInfo(0)"
:class="tabIndex == 0 ? 'bgcx_fullReport_query_button_active' : ''"
class="bgcx_fullReport_query_button"
>全部</view
>
<view
@click="gettjbgInfo(1)"
:class="tabIndex == 1 ? 'bgcx_fullReport_query_button_active' : ''"
class="bgcx_fullReport_query_button"
>未出报告</view
>
</view>
<view v-for="(val, i) in bgcx_list" :key="i" @click="routesDeatils(val)">
<view class="flex items-center">
<view class="w-8rpx h-8rpx bg-#239EA3 rounded-15rpx"> </view>
<view class="ml-8rpx text-26rpx">
{{ val["登记时间"] }}
</view>
</view>
<view
class="mt-29rpx mb-40rpx bg-#239EA3 rounded-20rpx flex"
style="box-shadow: 0rpx 2rpx 10rpx 0rpx rgba(141, 141, 141, 0.25)"
>
<view class="flex-1 pb-25rpx bg-#fff rounded-20rpx">
<view
v-show="!val.is_read"
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
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 class="flex mt--20rpx mt-36rpx">
<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>
<style scoped>
.bgcx {
/* width: 750rpx; */
margin: 0 auto;
}
.bgcx_header {
margin-top: 20rpx;
display: flex;
justify-content: space-around;
}
.bgcx_header_bgcolor {
width: 220rpx;
height: 180rpx;
border-radius: 15rpx;
}
.bgcx_header_bgcolor image {
width: 100rpx;
height: 100rpx;
margin-left: 117rpx;
}
.bgcx_header_text {
/* box-sizing: border-box;
padding: 41rpx 0 0 19rpx; */
color: #fff;
font-size: 36rpx;
margin: 35rpx 0 0 19rpx;
}
.bgcx_fullReport {
/* width: 730rpx; */
background: #ffffff;
margin: 20rpx auto;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.04);
border-radius: 5px;
padding: 31rpx 25rpx;
box-sizing: border-box;
}
.bgcx_fullReport_query {
display: flex;
}
.bgcx_fullReport_query_button_active {
background: #e2f2f1;
border: 1px solid #239ea3;
color: #239ea3;
}
.bgcx_fullReport_query_button {
margin: 32rpx 30rpx 0 0;
width: 150rpx;
height: 58rpx;
line-height: 58rpx;
background: #f1f2f6;
border-radius: 29rpx;
text-align: center;
font-size: 26rpx;
}
</style>

@ -0,0 +1,49 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const mountedAction = () => {
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
</template>
<style scoped>
</style>

@ -0,0 +1,49 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const mountedAction = () => {
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
</template>
<style scoped>
</style>

@ -0,0 +1,505 @@
<script setup>
/**
* name
* userckbg
* date2024年9月21日
*/
import { ref } from "vue";
import { $api, $response, $image } from "@/api";
import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store";
const $store = useStore();
const mountedAction = async () => {
uni.showLoading({
title: "加载中",
});
if (tjhNum.value) {
await getList(); //
}
};
const $props = defineProps({
tjh: {
type: String,
default: "",
},
});
const bgjl_obj = ref(false);
const wzbg_list = ref(null);
let tabIndex = ref(0); //
let currentIndex = ref(0); //
const getBtn = (e) => {
tabIndex.value = e;
getList();
};
const getList = async () => {
//
console.log(tabIndex.value, "tabIndex");
let obj = {
tijian_num: tjhNum.value, //
};
let url = "GetReportJieLunJianYi";
if (tabIndex.value == 1) {
url = "GetReportDetaiList";
}
const response = await $api(url, obj);
$response(response, () => {
console.log(response.data, "response");
if (tabIndex.value == 1) {
wzbg_list.value = response.data.list;
} else {
bgjl_obj.value = response.data.info;
}
console.log(wzbg_list.value, "wzbg_list.value");
uni.hideLoading();
});
};
const isopen = ref(false); //
const config_ref = ref(null);
const tjhNum = ref(""); //url
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
tjhNum.value = $props.tjh;
console.log(tjhNum.value, "tjh"); //url
mountedAction();
}
};
const dqArr = ref([]);
const collapseClick = async (e) => {
console.log(e);
let id = ""; //id
let itemWithId120 = null; //iditemWithId120['details']
if (e && e.length > 0) {
id = e[e.length - 1];
let isHas = dqArr.value.includes(id);
if (isHas) {
return;
}
for (let key in wzbg_list.value) {
if (
wzbg_list.value.hasOwnProperty(key) &&
wzbg_list.value[key].id === id
) {
itemWithId120 = wzbg_list.value[key];
break; // 退
}
}
console.log(wzbg_list.value, "wzbg_list", itemWithId120, "itemWithId120");
uni.showLoading({
title: "加载中",
});
let obj = {
id,
};
const response = await $api("GetReportDetai", obj);
console.log(response);
$response(response, () => {
console.log(response.data, "详情");
if (response.data.list) {
response.data.list.forEach((item) => {
let range = item["结果值范围"].split("-");
if (range.length === 2) {
item.minNum = parseFloat(range[0]);
item.maxNum = parseFloat(range[1]);
}
});
}
itemWithId120["details"] = response.data;
itemWithId120.isopen = itemWithId120.isopen
? !itemWithId120.isopen
: true;
});
uni.hideLoading();
dqArr.value = e;
}
};
const getOpenClick = () => {
isopen.value = !isopen.value;
// open
};
const calculatePercentage = (value, start, end) => {
//
const rangeLength = end - start;
const widthFull = rangeLength * 2;
let num = (value / widthFull).toFixed(2);
console.log(num);
if (num < 0) {
num = 0;
}
if (num > 1) {
num = 1;
}
return num * 100;
};
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="box-border ma pt-20rpx pb-20rpx pl-10rpx pr-10rpx">
<view
class="mb-20rpx flex rounded-8rpx w-428rpx h-66rpx ma b-0 b-1 b-solid b-#239EA3"
>
<view
@click="getBtn(0)"
:class="tabIndex == 0 ? 'ckjg_active' : ''"
class="text-#239EA3 flex-1 text-#26rpx bg-#D9F3F2 flex flex-items-center flex-justify-center rounded-l-8rpx"
>
结论建议
</view>
<view
@click="getBtn(1)"
:class="tabIndex == 1 ? 'ckjg_active' : ''"
class="text-#239EA3 flex-1 flex flex-items-center flex-justify-center bg-#D9F3F2 rounded-r-8rpx"
>完整报告
</view>
</view>
<view v-if="tabIndex == 0">
<view
class="bg-#239EA3 position-relative h-390rpx ma mb-10rpx border-rd-5rpx"
>
<view
class="text-36rpx text-#fff position-absolute top-33rpx left-28rpx"
>
{{ bgjl_obj.name }}
</view>
<image
class="w-279rpx h-329rpx position-absolute bottom-0 left-80rpx"
src="@/static/assets/slices/avatar.png"
></image>
<view class="relative center h-full">
<view
class="absolute right-335rpx"
style="
width: 0;
height: 0;
border-top: 15rpx solid transparent;
border-right: 15rpx solid #fff;
border-bottom: 15rpx solid transparent;
"
>
</view>
<view
class="bg-#fff rounded-20rpx pb-27rpx pl-33rpx pr-33rpx position-absolute right-20rpx w-250rpx"
>
<view class="text-#239EA3 text-28rpx line-height-[2.8] font-500">
基本健康数据
</view>
<view
class="flex flex-justify-between text-24rpx line-height-[1.5]"
v-for="(item, index) in bgjl_obj.base_date"
:key="index"
>
<view class="text-#8A8A8A"> {{ item.name }} </view>
<view class="text-#101010"> {{ item.value }} </view>
</view>
</view>
</view>
</view>
<view
class="flex flex-justify-evenly pb-20rpx pt-14rpx"
style="
background: linear-gradient(
-360deg,
#f3f3f3 0%,
#edf6f5 55%,
#bbdfe1 99%
);
"
>
<view
class="bg-#fff rounded-20rpx w-30% text-center pt-36rpx pb-36rpx"
>
<view class="text-26rpx font-500">
<span class="text-36rpx mr-10rpx">
{{ bgjl_obj ? bgjl_obj.items.all_count : 0 }}</span
>
</view>
<view class="text-#8C8C8C text-22rpx"> 总指标 </view>
</view>
<view
class="bg-#fff rounded-20rpx w-30% text-center pt-36rpx pb-36rpx"
>
<view class="text-26rpx font-500">
<span
class="text-36rpx mr-10rpx"
:class="
bgjl_obj && bgjl_obj.items.ipt_error_count > 0
? 'color-red'
: ''
"
>
{{ bgjl_obj ? bgjl_obj.items.ipt_error_count : 0 }}</span
>
</view>
<view class="text-#8C8C8C text-22rpx"> 重要异常结果 </view>
</view>
<view
class="bg-#fff rounded-20rpx w-30% text-center pt-36rpx pb-36rpx"
>
<view class="text-26rpx font-500">
<span
class="text-36rpx mr-10rpx"
:class="
bgjl_obj && bgjl_obj.items.error_count > 0 ? 'color-red' : ''
"
>{{ bgjl_obj ? bgjl_obj.items.error_count : 0 }}</span
>
</view>
<view class="text-#8C8C8C text-22rpx"> 异常结果 </view>
</view>
</view>
<view class="rounded-15rpx bg-#fff pt-22rpx pb-22rpx">
<view
class="w-154rpx h-60rpx rounded-r-30rpx text-center line-height-[2.3] text-#123531 text-25rpx font-500"
style="background: linear-gradient(90deg, #edf6f5 0%, #bbdfe1 99%)"
>
总检建议
</view>
<view class="pl-15rpx pr-25rpx pt-45rpx box-border">
<text>{{ bgjl_obj.content }}</text>
<!-- <view class=" flex flex-justify-between line-height-[2]">
<view class="font-500 text-28rpx">{{item}}舒张压降低
</view>
<view class="">
<image class="w-25rpx h-25rpx mr-4rpx" src="@/static/assets/slices/wjx.png"></image>
<image class="w-25rpx h-25rpx" src="@/static/assets/slices/wjx.png"></image>
</view>
</view>
<view class="text-26rpx text-#0B0B0B pl-15rpx">
<view class="flex">
<view class="mr-5rpx"> (1) </view>
<view class="">
收缩压正常舒张压降低为身低于60mm降低为身低于60mmHg 收缩压正常舒张压降低为身低于60mmHg
</view>
</view>
</view> -->
</view>
</view>
</view>
<view v-if="tabIndex == 1">
<view class="rounded-15rpx bg-#fff pt-22rpx pb-50rpx position-relative">
<view
class="w-154rpx h-60rpx mb-20rpx rounded-r-30rpx text-center line-height-[2.3] text-#123531 text-25rpx font-500"
style="background: linear-gradient(90deg, #edf6f5 0%, #bbdfe1 99%)"
>
全部检查
</view>
<view
class="position-absolute top-20rpx right-0rpx text-#6D6D6D text-26rpx"
>
<view
id="qcInline"
class="flex flex-items-center"
@click="getOpenClick"
>
<view class="position-absolute right-35px w-120rpx">
{{ isopen ? "收起全部" : "展开全部" }}
</view>
<uni-collapse-item id="qcInline-item" :open="isopen">
</uni-collapse-item>
</view>
<!-- 展开全部 -->
</view>
<uni-collapse
class="collapse-w"
@change="collapseClick($event)"
v-model="currentIndex"
>
<view
class="position-relative"
v-for="(item, index) in wzbg_list"
:key="index"
>
<view
v-if="item && item.error_count > 0"
class="position-absolute top-10px right-40px text-#6D6D6D text-15px"
>
<span class="text-#E46B1A">{{ item.error_count }}</span> 项异常
</view>
<uni-collapse-item
:name="item.id"
:open="item.isopen"
:title="index"
thumb=""
>
<view
class="p-20rpx pl-30rpx pr-30rpx"
v-if="item && item.details"
>
<view
class="bg-#FBF0EE b-0 b-1 b-solid b-#EADEDB rounded-15rpx pb-10rpx"
:class="item.error_count == 0 ? 'greenClor' : ''"
>
<view
:class="item.error_count == 0 ? 'greenTextClor' : ''"
class="w-141rpx line-height-[2] text-center text-#fff bg-#F6725B rounded-lt-15rpx rounded-rb-15rpx text-22rpx"
>
初步意见
</view>
<template v-if="item.error_count > 0">
<view
class="text-#E33939 text-22rpx line-height-[2] pl-20rpx pr-20rpx"
v-for="(text, i) in item.details.error_items"
:key="i"
>
{{ text }}
</view>
</template>
<view
class="text-#239EA3 text-22rpx line-height-[2] pl-20rpx pr-20rpx"
v-else
>
<!-- {{item.details.error_items.length}} -->
<text
v-if="
!item.details.suojian || !item.details.error_items
"
>
未见明显异常</text
>
<template v-else>
<text
v-for="(text, i) in item.details.suojian"
:key="i"
>
{{ text }}</text
>
</template>
</view>
</view>
<view v-if="1 < 0" class="flex flex-justify-around m-20rpx">
<view>
<view class="text-36rpx font-500"> 162.0 </view>
<view class="text-20rpx"> 身高cm </view>
</view>
<view>
<view class="text-40rpx font-500"> 58.8 </view>
<view class="text-20rpx"> 体重Kg </view>
</view>
</view>
<view class="p-10rpx pt-20rpx pb-20rpx">
<view v-for="(obj, i) in item.details.list" :key="i">
<view class="font-500 text-24rpx line-height-[2]">
{{ obj["基础项目名称"] }}
<span class="text-#737373 text-18rpx"
>( {{ obj["结果值单位"] }})</span
>
</view>
<view class="pt-80rpx pb-30rpx">
<view class="h-4rpx bg-#E2E2E2 rounded-2rpx relative">
<view
class="bg-#239EA3 h-3rpx w-50% rounded-2rpx ma flex text-24rpx text-#7B7B7B flex-justify-between"
>
<!-- {{obj['结果值范围']}} -->
<text>{{ obj.minNum }}</text>
<text>正常</text>
<text>{{ obj.maxNum }}</text>
</view>
<view
class="center flex-col absolute"
:style="{
left:
calculatePercentage(
obj['结果值'],
obj.minNum,
obj.maxNum
) + '%',
}"
>
<view
class="text-#239EA3 text-34rpx absolute top--50rpx"
>
<text>{{ obj["结果值"] }}</text>
<uni-icons
v-if="obj['结果值'] < obj.minNum"
type="arrow-down"
:size="18"
></uni-icons>
<uni-icons
v-if="obj['结果值'] > obj.maxNum"
type="arrow-up"
:size="18"
></uni-icons>
</view>
<view
class="w-8rpx h-8rpx rounded-50% bg-#fff b-4rpx b-solid b-#1F8F94 absolute -top-8rpx"
>
</view>
</view>
</view>
</view>
</view>
<view class=""> </view>
</view>
</view>
</uni-collapse-item>
</view>
</uni-collapse>
</view>
</view>
</view>
</view>
</template>
<style scoped>
/* uni-collapse-item__title.uni-collapse-item-border */
::v-deep
#qcInline
#qcInline-item
.uni-collapse-item__title.uni-collapse-item-border {
border: none !important;
}
::v-deep
#qcInline
#qcInline-item
.uni-collapse-item__wrap
.uni-collapse-item__wrap-content.open {
border: none !important;
}
::v-deep .collapse-w .uni-collapse-item__title-box {
width: 560rpx;
}
.ckjg_active {
background: #239ea3;
color: #fff;
}
.color-red {
color: #e46b1a;
}
.greenTextClor {
background-color: #239ea3;
}
.greenClor {
background-color: #e8f6f5;
border: 2px solid #dce9e8;
}
</style>

@ -0,0 +1,49 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年9月11日 19:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const mountedAction = () => {
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
</view>
</template>
<style scoped>
</style>

@ -1,165 +1,174 @@
<script setup> <script setup>
/** /**
* name * name
* usersa0ChunLuyu * usersa0ChunLuyu
* date2024年8月7日 20:05:05 * date2024年8月7日 20:05:05
*/ */
import { import { ref, computed } from "vue";
ref, import { $image, $api, $response } from "@/api";
computed import { onShow } from "@dcloudio/uni-app";
} from 'vue' import { useStore } from "@/store";
import { const $store = useStore();
$image,
$api, const $props = defineProps({
$response groupId: {
} from '@/api' type: String,
import { default: "",
onShow },
} from '@dcloudio/uni-app' });
import {
useStore const combo_active = ref("");
} from '@/store' const person_active = ref("");
const $store = useStore() const selectItemClick = (type, value) => {
select_active.value[type] = value;
const combo_active = ref('') };
const person_active = ref('') const selectDone = () => {
const selectItemClick = (type, value) => { combo_active.value = select_active.value.combo;
select_active.value[type] = value person_active.value = select_active.value.person;
} select_drawer_ref.value.close();
const selectDone = () => { };
combo_active.value = select_active.value.combo const clearSelectClick = () => {
person_active.value = select_active.value.person combo_active.value = "";
select_drawer_ref.value.close() person_active.value = "";
} };
const clearSelectClick = () => { const combo_select = ref({
combo_active.value = ''
person_active.value = ''
}
const combo_select = ref({
combo: [], combo: [],
person: [], person: [],
}) });
const comboActiveName = () => { const comboActiveName = () => {
for (let i in combo_select.value.combo) { for (let i in combo_select.value.combo) {
if (combo_select.value.combo[i].value === combo_active.value) { if (combo_select.value.combo[i].value === combo_active.value) {
return combo_select.value.combo[i].label return combo_select.value.combo[i].label;
}
} }
return '套餐类型'
} }
const personActiveName = () => { return "套餐类型";
};
const personActiveName = () => {
for (let i in combo_select.value.person) { for (let i in combo_select.value.person) {
if (combo_select.value.person[i].value === person_active.value) { if (combo_select.value.person[i].value === person_active.value) {
return combo_select.value.person[i].label return combo_select.value.person[i].label;
} }
} }
return '适用人群' return "适用人群";
} };
const getComboSelect = async () => { const getComboSelect = async () => {
uni.showLoading() uni.showLoading();
const response = await $api('ComboSelect') const response = await $api("ComboSelect");
uni.hideLoading() uni.hideLoading();
$response(response, () => { $response(response, () => {
combo_select.value = response.data combo_select.value = response.data;
getComboList() getComboList();
}) });
} };
const combo_list = ref({ const combo_list = ref({
list: [], list: [],
hospital: { hospital: {
id: 0 id: 0,
}, },
doctor: { doctor: {
id: 0 id: 0,
}, },
info: { info: {
name: '' name: "",
}, },
}) });
const combo_list_computed = computed(() => { const combo_list_computed = computed(() => {
let list = [] let list = [];
for (let i in combo_list.value.list) { for (let i in combo_list.value.list) {
let push = false let push = false;
if (!combo_active.value) { if (!combo_active.value) {
push = true push = true;
} else { } else {
if (combo_list.value.list[i].combo_type === combo_active.value) { if (combo_list.value.list[i].combo_type === combo_active.value) {
push = true push = true;
} }
} }
if (!!push) { if (!!push) {
if (!person_active.value) { if (!person_active.value) {
push = true push = true;
} else { } else {
if (combo_list.value.list[i].person_type === person_active.value) { if (combo_list.value.list[i].person_type === person_active.value) {
push = true push = true;
} else { } else {
push = false push = false;
} }
} }
} }
if (!!push) { if (!!push) {
list.push(combo_list.value.list[i]) list.push(combo_list.value.list[i]);
} }
} }
return list return list;
}) });
const getComboList = async () => { const getComboList = async () => {
uni.showLoading() uni.showLoading();
const response = await $api('ComboList', { const response = await $api("ComboList", {
doctor: $store.save.doctor, doctor: $store.save.doctor,
hospital: hospital_active.value, hospital: hospital_active.value,
}) });
uni.hideLoading() uni.hideLoading();
$response(response, () => { $response(response, () => {
combo_list.value = response.data combo_list.value = response.data;
}) });
} };
const hospital_active = ref(0) const hospital_active = ref(0);
const checkHospital = () => { const checkHospital = () => {
let hospital_id = $store.save.hospital let hospital_id = $store.save.hospital;
if (!hospital_id) { if (!hospital_id) {
hospital_id = $store.config.hospital[0].id hospital_id = $store.config.hospital[0].id;
} }
hospital_active.value = hospital_id hospital_active.value = hospital_id;
$store.saveInfo({ $store.saveInfo({
hospital: hospital_id hospital: hospital_id,
}) });
getComboSelect() getComboSelect();
} };
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;
checkHospital() checkHospital();
} }
} };
const select_drawer_ref = ref(null) const select_drawer_ref = ref(null);
const selectDrawerRef = (e) => { const selectDrawerRef = (e) => {
select_drawer_ref.value = e select_drawer_ref.value = e;
} };
const select_active = ref({ const select_active = ref({
combo: '', combo: "",
person: '', person: "",
}) });
const selectShow = () => { const selectShow = () => {
select_active.value = { select_active.value = {
combo: combo_active.value, combo: combo_active.value,
person: person_active.value, person: person_active.value,
} };
select_drawer_ref.value.open() select_drawer_ref.value.open();
} };
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {
checkHospital() checkHospital();
} }
}) });
const buyClick = async (item) => {
let query = "?comboId=" + item.combo_id;
if ($props.groupId) {
// ID
query += "&groupId=" + $props.groupId;
}
// ID
// /
uni.navigateTo({
url: "/pages/main/optionalProject/optionalDetails" + query,
});
};
</script> </script>
<template> <template>
<view> <view>
@ -172,7 +181,9 @@
<view class="hospital_icon_wrapper"> <view class="hospital_icon_wrapper">
<image src="@/static/assets/dingwei@2x.png"></image> <image src="@/static/assets/dingwei@2x.png"></image>
</view> </view>
<view class="hospital_name_wrapper">{{ combo_list.hospital.name }}</view> <view class="hospital_name_wrapper">{{
combo_list.hospital.name
}}</view>
<view class="hospital_select_wrapper"> <view class="hospital_select_wrapper">
<image src="@/static/assets/gengduo@2x.png"></image> <image src="@/static/assets/gengduo@2x.png"></image>
</view> </view>
@ -191,33 +202,43 @@
<text v-else></text> <text v-else></text>
</view> </view>
<view class="doctor_name_wrapper"> <view class="doctor_name_wrapper">
{{ !!combo_list.doctor.id ? combo_list.doctor.name : '前往选择' }} {{ !!combo_list.doctor.id ? combo_list.doctor.name : "前往选择" }}
</view> </view>
<view class="doctor_tip_wrapper">自动筛选匹配套餐</view> <view class="doctor_tip_wrapper">自动筛选匹配套餐</view>
</view> </view>
<view class="select_wrapper"> <view class="select_wrapper">
<view @click="clearSelectClick()" class="select_item_wrapper" :class="[ <view
(!combo_active && !person_active) ? 'active' : '' @click="clearSelectClick()"
]"> class="select_item_wrapper"
:class="[!combo_active && !person_active ? 'active' : '']"
>
<view class="select_item_name_wrapper">综合排序</view> <view class="select_item_name_wrapper">综合排序</view>
<view class="select_item_icon_wrapper"> <view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image> <image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view> </view>
<view class="select_item_line_wrapper"></view> <view class="select_item_line_wrapper"></view>
</view> </view>
<view @click="selectShow()" class="select_item_wrapper" :class="[ <view
!!combo_active ? 'active' : '' @click="selectShow()"
]"> class="select_item_wrapper"
<view class="select_item_name_wrapper">{{ !!combo_active ? comboActiveName() : '套餐类型' }}</view> :class="[!!combo_active ? 'active' : '']"
>
<view class="select_item_name_wrapper">{{
!!combo_active ? comboActiveName() : "套餐类型"
}}</view>
<view class="select_item_icon_wrapper"> <view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image> <image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view> </view>
<view class="select_item_line_wrapper"></view> <view class="select_item_line_wrapper"></view>
</view> </view>
<view @click="selectShow()" class="select_item_wrapper" :class="[ <view
!!person_active ? 'active' : '' @click="selectShow()"
]"> class="select_item_wrapper"
<view class="select_item_name_wrapper">{{ !!person_active ? personActiveName() : '适用人群' }}</view> :class="[!!person_active ? 'active' : '']"
>
<view class="select_item_name_wrapper">{{
!!person_active ? personActiveName() : "适用人群"
}}</view>
<view class="select_item_icon_wrapper"> <view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image> <image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view> </view>
@ -231,31 +252,44 @@
</view> </view>
</view> </view>
<view class="list_wrapper"> <view class="list_wrapper">
<view class="combo_wrapper" v-for="(i,k) in combo_list_computed" :key="k"> <view
class="combo_wrapper"
v-for="(i, k) in combo_list_computed"
:key="k"
>
<view class="combo_info_wrapper"> <view class="combo_info_wrapper">
<view class="combo_cover_wrapper"> <view class="combo_cover_wrapper">
<image :src="$image(i.cover)"></image> <image v-if="i.cover" :src="$image(i.cover)"></image>
</view> </view>
<view class="combo_content_wrapper"> <view class="combo_content_wrapper">
<view class="combo_name_wrapper">{{ i.name }}</view> <view class="combo_name_wrapper">{{ i.name }}</view>
<view class="combo_tags_wrapper"> <view class="combo_tags_wrapper">
<view class="combo_tag_wrapper" v-for="(ii,kk) in i.tag" :key="kk" :style="{ <view
color:ii.text_color, class="combo_tag_wrapper"
background:ii.color, v-for="(ii, kk) in i.tag"
}"> :key="kk"
:style="{
color: ii.text_color,
background: ii.color,
}"
>
{{ ii.text }} {{ ii.text }}
</view> </view>
</view> </view>
<view class="combo_desc_wrapper"> <view class="combo_desc_wrapper">
{{ i.tags2.join(" | ") }} {{ i.tags2?.join(" | ") }}
</view> </view>
<view class="combo_price_wrapper"> <view class="combo_price_wrapper">
<view class="combo_price_box_wrapper"> <view class="combo_price_box_wrapper">
<view class="combo_true_price_wrapper"> <view class="combo_true_price_wrapper">
<text class="combo_true_price_icon_wrapper">¥</text> <text class="combo_true_price_icon_wrapper">¥</text>
<text class="combo_true_price_number_wrapper">{{ i.price }}</text> <text class="combo_true_price_number_wrapper">{{
i.price
}}</text>
</view> </view>
<view class="combo_original_price_wrapper">¥{{ i.original_price }}</view> <view class="combo_original_price_wrapper"
>¥{{ i.original_price }}</view
>
</view> </view>
<view class="combo_count_wrapper">已售{{ i.count }}</view> <view class="combo_count_wrapper">已售{{ i.count }}</view>
</view> </view>
@ -263,7 +297,9 @@
</view> </view>
<view class="combo_button_wrapper"> <view class="combo_button_wrapper">
<view class="combo_pick_button_wrapper">对比</view> <view class="combo_pick_button_wrapper">对比</view>
<view class="combo_buy_button_wrapper">预约</view> <view class="combo_buy_button_wrapper" @click="buyClick(i)"
>预约</view
>
</view> </view>
<view class="combo_line_wrapper"></view> <view class="combo_line_wrapper"></view>
</view> </view>
@ -276,15 +312,20 @@
<view class="select_group_wrapper"> <view class="select_group_wrapper">
<view class="select_group_title_wrapper">套餐类型</view> <view class="select_group_title_wrapper">套餐类型</view>
<view class="select_group_line_wrapper"> <view class="select_group_line_wrapper">
<view @click="selectItemClick('combo','')" class="select_group_item_wrapper" :class="[ <view
select_active.combo === '' ? 'active' : '' @click="selectItemClick('combo', '')"
]"> class="select_group_item_wrapper"
:class="[select_active.combo === '' ? 'active' : '']"
>
全部 全部
</view> </view>
<view @click="selectItemClick('combo',i.value)" class="select_group_item_wrapper" <view
v-for="(i,k) in combo_select.combo" :key="k" :class="[ @click="selectItemClick('combo', i.value)"
select_active.combo === i.value ? 'active' : '' class="select_group_item_wrapper"
]"> v-for="(i, k) in combo_select.combo"
:key="k"
:class="[select_active.combo === i.value ? 'active' : '']"
>
{{ i.label }} {{ i.label }}
</view> </view>
</view> </view>
@ -292,15 +333,20 @@
<view class="select_group_wrapper"> <view class="select_group_wrapper">
<view class="select_group_title_wrapper">适用人群</view> <view class="select_group_title_wrapper">适用人群</view>
<view class="select_group_line_wrapper"> <view class="select_group_line_wrapper">
<view @click="selectItemClick('person','')" class="select_group_item_wrapper" :class="[ <view
select_active.person === '' ? 'active' : '' @click="selectItemClick('person', '')"
]"> class="select_group_item_wrapper"
:class="[select_active.person === '' ? 'active' : '']"
>
全部 全部
</view> </view>
<view @click="selectItemClick('person',i.value)" class="select_group_item_wrapper" <view
v-for="(i,k) in combo_select.person" :key="k" :class="[ @click="selectItemClick('person', i.value)"
select_active.person === i.value ? 'active' : '' class="select_group_item_wrapper"
]"> v-for="(i, k) in combo_select.person"
:key="k"
:class="[select_active.person === i.value ? 'active' : '']"
>
{{ i.label }} {{ i.label }}
</view> </view>
</view> </view>
@ -313,47 +359,47 @@
</view> </view>
</template> </template>
<style scoped> <style scoped>
.select_done_wrapper { .select_done_wrapper {
color: #ffffff; color: #ffffff;
background: #239EA3; background: #239ea3;
width: calc(100% - 60rpx); width: calc(100% - 60rpx);
margin: 50rpx auto 0; margin: 50rpx auto 0;
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
text-align: center; text-align: center;
border-radius: 6rpx; border-radius: 6rpx;
} }
.select_group_item_wrapper { .select_group_item_wrapper {
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
border: 1rpx solid #239EA3; border: 1rpx solid #239ea3;
font-size: 22rpx; font-size: 22rpx;
margin: 20rpx 20rpx 0 0; margin: 20rpx 20rpx 0 0;
border-radius: 6rpx; border-radius: 6rpx;
color: #239EA3; color: #239ea3;
} }
.select_group_item_wrapper.active { .select_group_item_wrapper.active {
color: #ffffff; color: #ffffff;
background: #239EA3; background: #239ea3;
} }
.select_group_line_wrapper { .select_group_line_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
} }
.select_group_title_wrapper { .select_group_title_wrapper {
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
} }
.select_group_wrapper { .select_group_wrapper {
margin: 20rpx; margin: 20rpx;
} }
.list_wrapper { .list_wrapper {
padding-top: 30rpx; padding-top: 30rpx;
height: calc(100vh - 100rpx - 10rpx - 70rpx - 80rpx - 30rpx - 30rpx); height: calc(100vh - 100rpx - 10rpx - 70rpx - 80rpx - 30rpx - 30rpx);
width: 750rpx; width: 750rpx;
@ -365,35 +411,35 @@
scrollbar-width: none; scrollbar-width: none;
overflow: -moz-scrollbars-none; overflow: -moz-scrollbars-none;
overflow-y: scroll; overflow-y: scroll;
} }
.list_wrapper::-webkit-scrollbar { .list_wrapper::-webkit-scrollbar {
display: none; display: none;
} }
.combo_line_wrapper { .combo_line_wrapper {
width: 710rpx; width: 710rpx;
height: 1rpx; height: 1rpx;
background: #E1ECEE; background: #e1ecee;
margin: 15rpx auto 0; margin: 15rpx auto 0;
} }
.combo_pick_button_wrapper { .combo_pick_button_wrapper {
width: 160rpx; width: 160rpx;
height: 60rpx; height: 60rpx;
background: #E1ECEE; background: #e1ecee;
border-radius: 30rpx; border-radius: 30rpx;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #239EA3; color: #239ea3;
text-align: center; text-align: center;
line-height: 60rpx; line-height: 60rpx;
} }
.combo_buy_button_wrapper { .combo_buy_button_wrapper {
width: 160rpx; width: 160rpx;
height: 60rpx; height: 60rpx;
background: #239EA3; background: #239ea3;
border-radius: 30rpx; border-radius: 30rpx;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
@ -402,75 +448,75 @@
line-height: 60rpx; line-height: 60rpx;
margin-left: 32rpx; margin-left: 32rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
.combo_button_wrapper { .combo_button_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end; justify-content: end;
margin-top: 27rpx; margin-top: 27rpx;
} }
.combo_count_wrapper { .combo_count_wrapper {
font-weight: 500; font-weight: 500;
font-size: 18rpx; font-size: 18rpx;
color: #8B8B8B; color: #8b8b8b;
line-height: 1; line-height: 1;
} }
.combo_original_price_wrapper { .combo_original_price_wrapper {
font-weight: 500; font-weight: 500;
font-size: 18rpx; font-size: 18rpx;
color: #8B8B8B; color: #8b8b8b;
line-height: 1; line-height: 1;
text-decoration-line: line-through; text-decoration-line: line-through;
margin-left: 10rpx; margin-left: 10rpx;
} }
.combo_true_price_wrapper { .combo_true_price_wrapper {
font-weight: 500; font-weight: 500;
font-size: 18rpx; font-size: 18rpx;
color: #EC3D15; color: #ec3d15;
line-height: 1; line-height: 1;
} }
.combo_true_price_number_wrapper { .combo_true_price_number_wrapper {
font-size: 38rpx; font-size: 38rpx;
} }
.combo_price_wrapper { .combo_price_wrapper {
display: flex; display: flex;
align-items: end; align-items: end;
justify-content: space-between; justify-content: space-between;
margin-top: 21rpx; margin-top: 21rpx;
} }
.combo_price_box_wrapper { .combo_price_box_wrapper {
display: flex; display: flex;
align-items: end; align-items: end;
} }
.combo_wrapper { .combo_wrapper {
height: 307rpx; height: 307rpx;
width: 750rpx; width: 750rpx;
margin: 0 auto; margin: 0 auto;
} }
.combo_tags_wrapper { .combo_tags_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 13rpx; margin-top: 13rpx;
} }
.combo_desc_wrapper { .combo_desc_wrapper {
font-weight: 500; font-weight: 500;
font-size: 20rpx; font-size: 20rpx;
color: #8B8B8B; color: #8b8b8b;
line-height: 1; line-height: 1;
margin-top: 18rpx; margin-top: 18rpx;
} }
.combo_tag_wrapper { .combo_tag_wrapper {
padding-left: 13rpx; padding-left: 13rpx;
padding-right: 13rpx; padding-right: 13rpx;
height: 30rpx; height: 30rpx;
@ -478,232 +524,232 @@
border-radius: 5rpx; border-radius: 5rpx;
font-weight: 400; font-weight: 400;
font-size: 18rpx; font-size: 18rpx;
color: #47ABD8; color: #47abd8;
margin-right: 8rpx; margin-right: 8rpx;
} }
.combo_name_wrapper { .combo_name_wrapper {
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 32rpx;
color: #0E0E0E; color: #0e0e0e;
line-height: 1; line-height: 1;
} }
.combo_content_wrapper { .combo_content_wrapper {
margin-left: 30rpx; margin-left: 30rpx;
width: calc(750rpx - 190rpx - 30rpx - 20rpx - 55rpx); width: calc(750rpx - 190rpx - 30rpx - 20rpx - 55rpx);
} }
.combo_info_wrapper { .combo_info_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
width: 750rpx; width: 750rpx;
margin: 0 auto; margin: 0 auto;
} }
.combo_cover_wrapper { .combo_cover_wrapper {
width: 190rpx; width: 190rpx;
height: 190rpx; height: 190rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.combo_cover_wrapper image { .combo_cover_wrapper image {
width: 190rpx; width: 190rpx;
height: 190rpx; height: 190rpx;
display: block; display: block;
object-fit: contain; object-fit: contain;
} }
.select_item_line_wrapper { .select_item_line_wrapper {
position: absolute; position: absolute;
width: 95rpx; width: 95rpx;
height: 10rpx; height: 10rpx;
background: linear-gradient(to bottom, #ffffff00, #1B9A9F); background: linear-gradient(to bottom, #ffffff00, #1b9a9f);
border-radius: 5rpx; border-radius: 5rpx;
bottom: 0; bottom: 0;
left: 50%; left: 50%;
transform: translateX(calc(-50% - 8px)); transform: translateX(calc(-50% - 8px));
opacity: 0; opacity: 0;
} }
.select_wrapper { .select_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 750rpx; width: 750rpx;
height: 80rpx; height: 80rpx;
background: #F1F7F7; background: #f1f7f7;
box-shadow: 0rpx -1rpx 1rpx 0rpx rgba(0, 0, 0, 0.1); box-shadow: 0rpx -1rpx 1rpx 0rpx rgba(0, 0, 0, 0.1);
margin: 0 auto; margin: 0 auto;
} }
.select_item_icon_wrapper { .select_item_icon_wrapper {
width: 18rpx; width: 18rpx;
height: 9rpx; height: 9rpx;
margin-left: 9rpx; margin-left: 9rpx;
filter: grayscale(100%); filter: grayscale(100%);
} }
.select_item_icon_wrapper image { .select_item_icon_wrapper image {
width: 18rpx; width: 18rpx;
height: 9rpx; height: 9rpx;
display: block; display: block;
object-fit: contain; object-fit: contain;
} }
.select_item_icon2_wrapper { .select_item_icon2_wrapper {
width: 26rpx; width: 26rpx;
height: 23rpx; height: 23rpx;
margin-left: 7rpx; margin-left: 7rpx;
} }
.select_item_icon2_wrapper image { .select_item_icon2_wrapper image {
width: 26rpx; width: 26rpx;
height: 23rpx; height: 23rpx;
display: block; display: block;
object-fit: contain; object-fit: contain;
} }
.select_item_name_wrapper { .select_item_name_wrapper {
font-weight: 400; font-weight: 400;
font-size: 26rpx; font-size: 26rpx;
color: #2F2F2F; color: #2f2f2f;
line-height: 1; line-height: 1;
} }
.select_item_wrapper { .select_item_wrapper {
width: 25%; width: 25%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
height: 80rpx; height: 80rpx;
} }
.select_item_wrapper.active .select_item_name_wrapper { .select_item_wrapper.active .select_item_name_wrapper {
color: #239EA3; color: #239ea3;
font-weight: bold; font-weight: bold;
} }
.select_item_wrapper.active .select_item_icon_wrapper { .select_item_wrapper.active .select_item_icon_wrapper {
filter: grayscale(0%); filter: grayscale(0%);
} }
.select_item_wrapper.active .select_item_line_wrapper { .select_item_wrapper.active .select_item_line_wrapper {
opacity: 1; opacity: 1;
} }
.doctor_name_wrapper { .doctor_name_wrapper {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
line-height: 1; line-height: 1;
color: #FFFFFF; color: #ffffff;
border-bottom: 1rpx solid #FFFFFF; border-bottom: 1rpx solid #ffffff;
} }
.doctor_tip_wrapper { .doctor_tip_wrapper {
font-weight: 400; font-weight: 400;
font-size: 22rpx; font-size: 22rpx;
line-height: 1; line-height: 1;
color: #FFFFFF; color: #ffffff;
} }
.doctor_wrapper { .doctor_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
width: 710rpx; width: 710rpx;
height: 70rpx; height: 70rpx;
background: #28B7C1; background: #28b7c1;
border-radius: 15rpx 15rpx 0rpx 0rpx; border-radius: 15rpx 15rpx 0rpx 0rpx;
padding-left: 24rpx; padding-left: 24rpx;
margin: 10rpx auto 0; margin: 10rpx auto 0;
} }
.user_choose_wrapper { .user_choose_wrapper {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
margin-left: 30rpx; margin-left: 30rpx;
} }
.user_choose_wrapper image { .user_choose_wrapper image {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
display: block; display: block;
object-fit: contain; object-fit: contain;
} }
.user_title_wrapper { .user_title_wrapper {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #239EA3; color: #239ea3;
line-height: 1; line-height: 1;
} }
.user_name_wrapper { .user_name_wrapper {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #0d0d0d; color: #0d0d0d;
line-height: 1; line-height: 1;
} }
.user_wrapper { .user_wrapper {
height: 80rpx; height: 80rpx;
padding-left: 40rpx; padding-left: 40rpx;
padding-right: 20rpx; padding-right: 20rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 40rpx 0 0 40rpx; border-radius: 40rpx 0 0 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.header_wrapper { .header_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 750rpx; width: 750rpx;
height: 100rpx; height: 100rpx;
background: #D8EDF2; background: #d8edf2;
margin: 0 auto; margin: 0 auto;
} }
.hospital_wrapper { .hospital_wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
width: 50%; width: 50%;
} }
.hospital_icon_wrapper { .hospital_icon_wrapper {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.hospital_icon_wrapper image { .hospital_icon_wrapper image {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
display: block; display: block;
object-fit: contain; object-fit: contain;
} }
.hospital_name_wrapper { .hospital_name_wrapper {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #484747; color: #484747;
margin-left: 9rpx; margin-left: 9rpx;
line-height: 1; line-height: 1;
} }
.hospital_select_wrapper { .hospital_select_wrapper {
width: 24rpx; width: 24rpx;
height: 14rpx; height: 14rpx;
margin-left: 19rpx; margin-left: 19rpx;
} }
.hospital_select_wrapper image { .hospital_select_wrapper image {
width: 24rpx; width: 24rpx;
height: 14rpx; height: 14rpx;
display: block; display: block;
object-fit: contain; object-fit: contain;
} }
</style> </style>

@ -24,7 +24,8 @@
const getUserInfo = async () => { const getUserInfo = async () => {
const response = await $api('UserInfo') const response = await $api('UserInfo')
$response(response, () => { $response(response, () => {
$store.user = response.data.info // $store.user = response.data.info
$store.setUser(response.data.info);
}) })
} }
const switch_arr = [ const switch_arr = [

@ -41,7 +41,6 @@ const choosePersonClick = async (info) => {
popup.value.open("bottom"); popup.value.open("bottom");
} }
if (response.data.unit.length == 1) { if (response.data.unit.length == 1) {
// selectUnit(response.data.unit[0]);
getGroupCombo(response.data.unit[0]); getGroupCombo(response.data.unit[0]);
} }
}); });
@ -65,6 +64,7 @@ const getGroupCombo = async (info) => {
"/pages/main/optionalProject/selectType" "/pages/main/optionalProject/selectType"
}); });
} else { } else {
//
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/main/optionalProject/optionalDetails?groupId=" + "/pages/main/optionalProject/optionalDetails?groupId=" +
@ -74,12 +74,6 @@ const getGroupCombo = async (info) => {
} }
}); });
}; };
const selectUnit = async (info) => {
popup.value.close();
uni.navigateTo({
url: "/pages/main/optionalProject/optionalDetails?groupId=" + info.group_id,
});
};
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {

@ -0,0 +1,709 @@
<script setup>
/**
* name
* usersa0ChunLuyu
* date2024年8月7日 20:05:05
*/
import {
ref,
computed
} from 'vue'
import {
$image,
$api,
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const combo_active = ref('')
const person_active = ref('')
const selectItemClick = (type, value) => {
select_active.value[type] = value
}
const selectDone = () => {
combo_active.value = select_active.value.combo
person_active.value = select_active.value.person
select_drawer_ref.value.close()
}
const clearSelectClick = () => {
combo_active.value = ''
person_active.value = ''
}
const combo_select = ref({
combo: [],
person: [],
})
const comboActiveName = () => {
for (let i in combo_select.value.combo) {
if (combo_select.value.combo[i].value === combo_active.value) {
return combo_select.value.combo[i].label
}
}
return '套餐类型'
}
const personActiveName = () => {
for (let i in combo_select.value.person) {
if (combo_select.value.person[i].value === person_active.value) {
return combo_select.value.person[i].label
}
}
return '适用人群'
}
const getComboSelect = async () => {
uni.showLoading()
const response = await $api('ComboSelect')
uni.hideLoading()
$response(response, () => {
combo_select.value = response.data
getComboList()
})
}
const combo_list = ref({
list: [],
hospital: {
id: 0
},
doctor: {
id: 0
},
info: {
name: ''
},
})
const combo_list_computed = computed(() => {
let list = []
for (let i in combo_list.value.list) {
let push = false
if (!combo_active.value) {
push = true
} else {
if (combo_list.value.list[i].combo_type === combo_active.value) {
push = true
}
}
if (!!push) {
if (!person_active.value) {
push = true
} else {
if (combo_list.value.list[i].person_type === person_active.value) {
push = true
} else {
push = false
}
}
}
if (!!push) {
list.push(combo_list.value.list[i])
}
}
return list
})
const getComboList = async () => {
uni.showLoading()
const response = await $api('ComboList', {
doctor: $store.save.doctor,
hospital: hospital_active.value,
})
uni.hideLoading()
$response(response, () => {
combo_list.value = response.data
})
}
const hospital_active = ref(0)
const checkHospital = () => {
let hospital_id = $store.save.hospital
if (!hospital_id) {
hospital_id = $store.config.hospital[0].id
}
hospital_active.value = hospital_id
$store.saveInfo({
hospital: hospital_id
})
getComboSelect()
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
checkHospital()
}
}
const select_drawer_ref = ref(null)
const selectDrawerRef = (e) => {
select_drawer_ref.value = e
}
const select_active = ref({
combo: '',
person: '',
})
const selectShow = () => {
select_active.value = {
combo: combo_active.value,
person: person_active.value,
}
select_drawer_ref.value.open()
}
onShow(() => {
if (!!config_ref.value) {
checkHospital()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="header_wrapper">
<view v-if="!!combo_list.hospital.id" class="hospital_wrapper">
<view class="hospital_icon_wrapper">
<image src="@/static/assets/dingwei@2x.png"></image>
</view>
<view class="hospital_name_wrapper">{{ combo_list.hospital.name }}</view>
<view class="hospital_select_wrapper">
<image src="@/static/assets/gengduo@2x.png"></image>
</view>
</view>
<view v-if="!!combo_list.info.name" class="user_wrapper">
<view class="user_title_wrapper">就诊人</view>
<view class="user_name_wrapper">{{ combo_list.info.name }}</view>
<view v-if="combo_list.info.count > 1" class="user_choose_wrapper">
<image src="@/static/assets/qiehuan@2x.png"></image>
</view>
</view>
</view>
<view class="doctor_wrapper">
<view class="doctor_tip_wrapper">
<text v-if="!!combo_list.doctor.id"></text>
<text v-else></text>
</view>
<view class="doctor_name_wrapper">
{{ !!combo_list.doctor.id ? combo_list.doctor.name : '前往选择' }}
</view>
<view class="doctor_tip_wrapper">自动筛选匹配套餐</view>
</view>
<view class="select_wrapper">
<view @click="clearSelectClick()" class="select_item_wrapper" :class="[
(!combo_active && !person_active) ? 'active' : ''
]">
<view class="select_item_name_wrapper">综合排序</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
<view class="select_item_line_wrapper"></view>
</view>
<view @click="selectShow()" class="select_item_wrapper" :class="[
!!combo_active ? 'active' : ''
]">
<view class="select_item_name_wrapper">{{ !!combo_active ? comboActiveName() : '套餐类型' }}</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
<view class="select_item_line_wrapper"></view>
</view>
<view @click="selectShow()" class="select_item_wrapper" :class="[
!!person_active ? 'active' : ''
]">
<view class="select_item_name_wrapper">{{ !!person_active ? personActiveName() : '适用人群' }}</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
<view class="select_item_line_wrapper"></view>
</view>
<view @click="selectShow()" class="select_item_wrapper">
<view class="select_item_name_wrapper">筛选</view>
<view class="select_item_icon2_wrapper">
<image src="@/static/assets/shaixuan@2x.png"></image>
</view>
</view>
</view>
<view class="list_wrapper">
<view class="combo_wrapper" v-for="(i,k) in combo_list_computed" :key="k">
<view class="combo_info_wrapper">
<view class="combo_cover_wrapper">
<image v-if="i.cover" :src="$image(i.cover)"></image>
</view>
<view class="combo_content_wrapper">
<view class="combo_name_wrapper">{{ i.name }}</view>
<view class="combo_tags_wrapper">
<view class="combo_tag_wrapper" v-for="(ii,kk) in i.tag" :key="kk" :style="{
color:ii.text_color,
background:ii.color,
}">
{{ ii.text }}
</view>
</view>
<view class="combo_desc_wrapper">
{{ i.tags2?.join(" | ") }}
</view>
<view class="combo_price_wrapper">
<view class="combo_price_box_wrapper">
<view class="combo_true_price_wrapper">
<text class="combo_true_price_icon_wrapper">¥</text>
<text class="combo_true_price_number_wrapper">{{ i.price }}</text>
</view>
<view class="combo_original_price_wrapper">¥{{ i.original_price }}</view>
</view>
<view class="combo_count_wrapper">已售{{ i.count }}</view>
</view>
</view>
</view>
<view class="combo_button_wrapper">
<view class="combo_pick_button_wrapper">对比</view>
<view @click="buyClick(i)" class="combo_buy_button_wrapper">预约</view>
</view>
<view class="combo_line_wrapper"></view>
</view>
</view>
<uni-drawer :ref="selectDrawerRef" mode="right" :mask-click="false">
<view>
<scroll-view scroll-y="true">
<view>
<view class="select_group_wrapper">
<view class="select_group_title_wrapper">套餐类型</view>
<view class="select_group_line_wrapper">
<view @click="selectItemClick('combo','')" class="select_group_item_wrapper" :class="[
select_active.combo === '' ? 'active' : ''
]">
全部
</view>
<view @click="selectItemClick('combo',i.value)" class="select_group_item_wrapper"
v-for="(i,k) in combo_select.combo" :key="k" :class="[
select_active.combo === i.value ? 'active' : ''
]">
{{ i.label }}
</view>
</view>
</view>
<view class="select_group_wrapper">
<view class="select_group_title_wrapper">适用人群</view>
<view class="select_group_line_wrapper">
<view @click="selectItemClick('person','')" class="select_group_item_wrapper" :class="[
select_active.person === '' ? 'active' : ''
]">
全部
</view>
<view @click="selectItemClick('person',i.value)" class="select_group_item_wrapper"
v-for="(i,k) in combo_select.person" :key="k" :class="[
select_active.person === i.value ? 'active' : ''
]">
{{ i.label }}
</view>
</view>
</view>
<view class="select_done_wrapper" @click="selectDone()"></view>
</view>
</scroll-view>
</view>
</uni-drawer>
</view>
</template>
<style scoped>
.select_done_wrapper {
color: #ffffff;
background: #239EA3;
width: calc(100% - 60rpx);
margin: 50rpx auto 0;
height: 50rpx;
line-height: 50rpx;
text-align: center;
border-radius: 6rpx;
}
.select_group_item_wrapper {
padding: 10rpx 20rpx;
border: 1rpx solid #239EA3;
font-size: 22rpx;
margin: 20rpx 20rpx 0 0;
border-radius: 6rpx;
color: #239EA3;
}
.select_group_item_wrapper.active {
color: #ffffff;
background: #239EA3;
}
.select_group_line_wrapper {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.select_group_title_wrapper {
font-size: 30rpx;
font-weight: bold;
}
.select_group_wrapper {
margin: 20rpx;
}
.list_wrapper {
padding-top: 30rpx;
height: calc(100vh - 100rpx - 10rpx - 70rpx - 80rpx - 30rpx - 30rpx);
width: 750rpx;
overflow-y: auto;
padding-bottom: 30rpx;
margin: 0 auto;
overflow-x: hidden;
-ms-overflow-style: none;
scrollbar-width: none;
overflow: -moz-scrollbars-none;
overflow-y: scroll;
}
.list_wrapper::-webkit-scrollbar {
display: none;
}
.combo_line_wrapper {
width: 710rpx;
height: 1rpx;
background: #E1ECEE;
margin: 15rpx auto 0;
}
.combo_pick_button_wrapper {
width: 160rpx;
height: 60rpx;
background: #E1ECEE;
border-radius: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #239EA3;
text-align: center;
line-height: 60rpx;
}
.combo_buy_button_wrapper {
width: 160rpx;
height: 60rpx;
background: #239EA3;
border-radius: 30rpx;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
text-align: center;
line-height: 60rpx;
margin-left: 32rpx;
margin-right: 20rpx;
}
.combo_button_wrapper {
display: flex;
align-items: center;
justify-content: end;
margin-top: 27rpx;
}
.combo_count_wrapper {
font-weight: 500;
font-size: 18rpx;
color: #8B8B8B;
line-height: 1;
}
.combo_original_price_wrapper {
font-weight: 500;
font-size: 18rpx;
color: #8B8B8B;
line-height: 1;
text-decoration-line: line-through;
margin-left: 10rpx;
}
.combo_true_price_wrapper {
font-weight: 500;
font-size: 18rpx;
color: #EC3D15;
line-height: 1;
}
.combo_true_price_number_wrapper {
font-size: 38rpx;
}
.combo_price_wrapper {
display: flex;
align-items: end;
justify-content: space-between;
margin-top: 21rpx;
}
.combo_price_box_wrapper {
display: flex;
align-items: end;
}
.combo_wrapper {
height: 307rpx;
width: 750rpx;
margin: 0 auto;
}
.combo_tags_wrapper {
display: flex;
align-items: center;
margin-top: 13rpx;
}
.combo_desc_wrapper {
font-weight: 500;
font-size: 20rpx;
color: #8B8B8B;
line-height: 1;
margin-top: 18rpx;
}
.combo_tag_wrapper {
padding-left: 13rpx;
padding-right: 13rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 5rpx;
font-weight: 400;
font-size: 18rpx;
color: #47ABD8;
margin-right: 8rpx;
}
.combo_name_wrapper {
font-weight: 400;
font-size: 32rpx;
color: #0E0E0E;
line-height: 1;
}
.combo_content_wrapper {
margin-left: 30rpx;
width: calc(750rpx - 190rpx - 30rpx - 20rpx - 55rpx);
}
.combo_info_wrapper {
display: flex;
align-items: center;
width: 750rpx;
margin: 0 auto;
}
.combo_cover_wrapper {
width: 190rpx;
height: 190rpx;
margin-left: 20rpx;
}
.combo_cover_wrapper image {
width: 190rpx;
height: 190rpx;
display: block;
object-fit: contain;
}
.select_item_line_wrapper {
position: absolute;
width: 95rpx;
height: 10rpx;
background: linear-gradient(to bottom, #ffffff00, #1B9A9F);
border-radius: 5rpx;
bottom: 0;
left: 50%;
transform: translateX(calc(-50% - 8px));
opacity: 0;
}
.select_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
width: 750rpx;
height: 80rpx;
background: #F1F7F7;
box-shadow: 0rpx -1rpx 1rpx 0rpx rgba(0, 0, 0, 0.1);
margin: 0 auto;
}
.select_item_icon_wrapper {
width: 18rpx;
height: 9rpx;
margin-left: 9rpx;
filter: grayscale(100%);
}
.select_item_icon_wrapper image {
width: 18rpx;
height: 9rpx;
display: block;
object-fit: contain;
}
.select_item_icon2_wrapper {
width: 26rpx;
height: 23rpx;
margin-left: 7rpx;
}
.select_item_icon2_wrapper image {
width: 26rpx;
height: 23rpx;
display: block;
object-fit: contain;
}
.select_item_name_wrapper {
font-weight: 400;
font-size: 26rpx;
color: #2F2F2F;
line-height: 1;
}
.select_item_wrapper {
width: 25%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 80rpx;
}
.select_item_wrapper.active .select_item_name_wrapper {
color: #239EA3;
font-weight: bold;
}
.select_item_wrapper.active .select_item_icon_wrapper {
filter: grayscale(0%);
}
.select_item_wrapper.active .select_item_line_wrapper {
opacity: 1;
}
.doctor_name_wrapper {
font-weight: 400;
font-size: 24rpx;
line-height: 1;
color: #FFFFFF;
border-bottom: 1rpx solid #FFFFFF;
}
.doctor_tip_wrapper {
font-weight: 400;
font-size: 22rpx;
line-height: 1;
color: #FFFFFF;
}
.doctor_wrapper {
display: flex;
align-items: center;
width: 710rpx;
height: 70rpx;
background: #28B7C1;
border-radius: 15rpx 15rpx 0rpx 0rpx;
padding-left: 24rpx;
margin: 10rpx auto 0;
}
.user_choose_wrapper {
width: 50rpx;
height: 50rpx;
margin-left: 30rpx;
}
.user_choose_wrapper image {
width: 50rpx;
height: 50rpx;
display: block;
object-fit: contain;
}
.user_title_wrapper {
font-weight: 400;
font-size: 28rpx;
color: #239EA3;
line-height: 1;
}
.user_name_wrapper {
font-weight: 400;
font-size: 28rpx;
color: #0d0d0d;
line-height: 1;
}
.user_wrapper {
height: 80rpx;
padding-left: 40rpx;
padding-right: 20rpx;
background: #FFFFFF;
border-radius: 40rpx 0 0 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
width: 750rpx;
height: 100rpx;
background: #D8EDF2;
margin: 0 auto;
}
.hospital_wrapper {
display: flex;
align-items: center;
width: 50%;
}
.hospital_icon_wrapper {
width: 48rpx;
height: 48rpx;
margin-left: 20rpx;
}
.hospital_icon_wrapper image {
width: 48rpx;
height: 48rpx;
display: block;
object-fit: contain;
}
.hospital_name_wrapper {
font-weight: 400;
font-size: 28rpx;
color: #484747;
margin-left: 9rpx;
line-height: 1;
}
.hospital_select_wrapper {
width: 24rpx;
height: 14rpx;
margin-left: 19rpx;
}
.hospital_select_wrapper image {
width: 24rpx;
height: 14rpx;
display: block;
object-fit: contain;
}
</style>

@ -10,6 +10,8 @@ import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store"; import { useStore } from "@/store";
const $store = useStore(); const $store = useStore();
// groupId
let comboInfo = ref({}); // let comboInfo = ref({}); //
let selectIds = ref([]); // ID let selectIds = ref([]); // ID
let itemsInfo = ref({}); // let itemsInfo = ref({}); //
@ -20,6 +22,8 @@ let tabIndex = ref(0); // 标签索引
let totalPrice = ref(0); // let totalPrice = ref(0); //
let patientInfo = ref({}); // () let patientInfo = ref({}); // ()
let groupInfo = ref({}); // let groupInfo = ref({}); //
let items = ref([]); // /
let status = ref(0); // 1 2 3 4
const $props = defineProps({ const $props = defineProps({
comboId: { comboId: {
@ -34,14 +38,47 @@ const $props = defineProps({
type: String, type: String,
default: "", default: "",
}, },
itemIds: {
type: String,
default: "",
},
}); });
const mountedAction = async () => { const mountedAction = async () => {
selectIds.value = $props.itemIds?.split(",") || []; selectIds.value = $props.itemIds?.split(",") || [];
console.log($store.user); console.log($store.user);
comboId.value = $props.comboId || ""; comboId.value = $props.comboId || "";
personId.value = $props.personId || ""; personId.value = $store.getUser().person_id || "";
groupId.value = $props.groupId || ""; groupId.value = $props.groupId || "";
// - - - - -
//
// - / -
// - - -
// comboId && person_id
// - - - -
//
// - -
if (groupId.value) {
if (comboId.value) {
//
status.value = 3;
} else {
//
status.value = 4;
}
} else {
if (comboId.value) {
//
status.value = 1;
} else {
//
status.value = 2;
}
}
console.log(status.value, "1个检套餐 2个检自选 3团检套餐 4团检自选");
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
@ -60,9 +97,9 @@ const getBuyInfo = async () => {
const response = await $api("BuyInfo", obj); const response = await $api("BuyInfo", obj);
$response(response, () => { $response(response, () => {
uni.hideLoading(); uni.hideLoading();
if (groupId.value) { if (groupId.value && response.data.group_info.length) {
//
groupInfo.value = response.data.group_info[0]; groupInfo.value = response.data.group_info[0];
return;
} }
comboInfo.value = response.data.combo_info; comboInfo.value = response.data.combo_info;
itemsInfo.value = response.data.items_info; itemsInfo.value = response.data.items_info;
@ -71,13 +108,13 @@ const getBuyInfo = async () => {
}; };
const addCombo = () => { const addCombo = () => {
const itemIds = selectIds.value.length > 0 ? selectIds.value.join(",") : ""; let itemIds = $props.itemIds?$props.itemIds:"";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) {
query += "&groupId=" + groupId.value;
}
uni.navigateTo({ uni.navigateTo({
url: url: "/pages/main/optionalProject/optionalProject?" + query,
"/pages/main/optionalProject/optionalProject?comboId=" +
comboId.value +
"&itemIds=" +
itemIds,
}); });
}; };
@ -106,8 +143,10 @@ onShow(() => {
<view <view
class="pt-35rpx rounded-15rpx px-10rpx bg-#fff pb-30rpx box-border b-0 b-t-1 b-solid b-#E1ECEE" class="pt-35rpx rounded-15rpx px-10rpx bg-#fff pb-30rpx box-border b-0 b-t-1 b-solid b-#E1ECEE"
> >
<view class="flex w-full" v-if="comboId"> <view class="flex w-full" v-if="status == 1">
<!-- 1个检套餐 显示套餐信息 -->
<image <image
v-if="comboInfo.img"
:src="$image(comboInfo.img)" :src="$image(comboInfo.img)"
class="w-190rpx h-190rpx mr-37rpx" class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix" mode="widthFix"
@ -133,12 +172,12 @@ onShow(() => {
" "
/> />
</view> </view>
<view v-if="comboInfo.tags2.length"> <view v-if="comboInfo.tags2?.length">
<text <text
v-for="(val, i) in comboInfo.tags2" v-for="(val, i) in comboInfo.tags2"
:key="i" :key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B" class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
:class="i == comboInfo.tags2.length - 1 ? 'b-r-0' : 'b-r-2'" :class="i == comboInfo.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'"
>{{ val }}</text >{{ val }}</text
> >
</view> </view>
@ -157,9 +196,10 @@ onShow(() => {
</view> </view>
</view> </view>
<view <view
v-if="comboId" v-if="status == 1"
class="mt-25rpx pt-25rpx b-0 b-t-1 b-solid b-#E1ECEE bettween flex-col text-24rpx" class="mt-25rpx pt-25rpx b-0 b-t-1 b-solid b-#E1ECEE bettween flex-col text-24rpx"
> >
<!-- 1个检套餐显示 -->
<view> <view>
<text class="text-#8B8B8B">适用人群</text> <text class="text-#8B8B8B">适用人群</text>
<text class="text-#0E0E0E">{{ comboInfo.crowd_name }}</text> <text class="text-#0E0E0E">{{ comboInfo.crowd_name }}</text>
@ -169,39 +209,55 @@ onShow(() => {
<text class="text-#0E0E0E">{{ comboInfo.hospital_name }}</text> <text class="text-#0E0E0E">{{ comboInfo.hospital_name }}</text>
</view> </view>
</view> </view>
<view v-else class="px-15rpx pt-10rpx"> <view v-if="status != 1" class="px-15rpx pt-10rpx">
<!-- 2个检自选 3团检套餐 4团检自选 都要显示头像和名字 -->
<view class="flex items-center"> <view class="flex items-center">
<image src="@/static/assets/userm.png" class="w-70rpx h-70rpx mr-35rpx" /> <image
src="@/static/assets/userm.png"
class="w-70rpx h-70rpx mr-35rpx"
/>
<view class="flex items-center grow"> <view class="flex items-center grow">
<text class="text-#707070 text-24rpx">您好</text> <text class="text-#707070 text-24rpx">您好</text>
<text class="text-#0E0E0E text-32rpx">{{groupInfo.name}}</text> <text class="text-#0E0E0E text-32rpx">{{ groupId?groupInfo.name:$store.getUser().name }}</text>
</view> </view>
</view> </view>
<view v-if="groupId" class="text-24rpx mt-40rpx"> <view v-if="status != 2" class="text-24rpx mt-40rpx">
<!-- 3团检套餐 4团检自选 都要显示单位部门等信息 -->
<view class="pb-30rpx"> <view class="pb-30rpx">
<text class="text-#8B8B8B">单位名称</text> <text class="text-#8B8B8B">单位名称</text>
<text>{{ groupInfo.group_name }}</text> <text>{{ groupInfo.group_name }}</text>
</view> </view>
<view class="pb-30rpx"> <view class="pb-30rpx">
<text class="text-#8B8B8B">部门名称</text> <text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.group_name }}</text> <text>{{ groupInfo.bumen_name }}</text>
</view> </view>
<view v-if="groupInfo.combo_name"> <view class="pb-30rpx">
<text class="text-#8B8B8B">套餐名称</text> <text class="text-#8B8B8B">套餐名称</text>
<text>{{ groupInfo.combo_name }}</text> <text>{{ groupInfo.combo_name }}</text>
</view> </view>
<view>
<text class="text-#8B8B8B">体检额度</text>
<text>{{ groupInfo.tongshou_xiane }}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="pb-300rpx"> <view class="pb-300rpx">
<view class="flex items-center justify-around px-30rpx mt-30rpx"> <view class="flex items-center justify-around px-30rpx mt-30rpx">
<text <text
v-if="comboId || groupId" v-if="status == 1 || status == 3"
@click="tabIndex = 0" @click="tabIndex = 0"
:class="tabIndex == 0 ? 'active' : ''" :class="tabIndex == 0 ? 'active' : ''"
class="text-30rpx text-#2E2E2E" class="text-30rpx text-#2E2E2E"
>套餐内容</text >套餐内容</text
> >
<text
v-else
@click="tabIndex = 0"
:class="tabIndex == 0 ? 'active' : ''"
class="text-30rpx text-#2E2E2E"
>自选内容</text
>
<text <text
@click="tabIndex = 1" @click="tabIndex = 1"
:class="tabIndex == 1 ? 'active' : ''" :class="tabIndex == 1 ? 'active' : ''"
@ -214,10 +270,52 @@ onShow(() => {
class="mt-20rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex" class="mt-20rpx bg-#fff py-40rpx px-14rpx box-border flex-col flex"
> >
<!-- 套餐内容 --> <!-- 套餐内容 -->
<view v-if="comboInfo.items?.length" class="mb-20rpx"> <view v-if="comboInfo?.items?.length" class="mb-20rpx">
<!-- 套餐项目 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx"
>套餐项目{{ comboInfo?.items?.length }}</view
>
<view
class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx"
>
<view
class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"
>检查项目</view
>
<view class="grow center">检查指标意义</view>
</view>
<view v-for="(val, index) in comboInfo?.items" :key="index">
<view
class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx"
>
<view
class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"
></view>
<view class="grow center"
>{{ val.keshi_name }}{{ val.children.length }}</view
>
</view>
<view
class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx"
v-for="(v, i) in val.children"
:key="i"
>
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center"
>{{ v.name }}</view
>
<view class="grow center p-10rpx box-border">{{
v.desc || "-"
}}</view>
</view>
</view>
</view>
<!-- 团检内自带的项目 -->
<view v-if="groupInfo?.items?.length" class="mb-20rpx">
<!-- 套餐 --> <!-- 套餐 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx" <view class="text-#2E2E2E text-30rpx center mb-20rpx"
>套餐项目{{ comboInfo.items?.length }}</view >套餐项目{{ groupInfo?.items?.length }}</view
> >
<view <view
class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx" class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx"
@ -228,7 +326,7 @@ onShow(() => {
> >
<view class="grow center">检查指标意义</view> <view class="grow center">检查指标意义</view>
</view> </view>
<view v-for="(val, index) in comboInfo.items" :key="index"> <view v-for="(val, index) in groupInfo?.items" :key="index">
<view <view
class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx" class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx"
> >

@ -20,6 +20,14 @@ const $props = defineProps({
type: String, type: String,
default: "", default: "",
}, },
personId: {
type: String,
default: "",
},
groupId: {
type: String,
default: "",
},
}); });
const $store = useStore(); const $store = useStore();
@ -38,12 +46,19 @@ let totalOriginalPrice = ref(0); // 总原始价格
let total = ref(0); // let total = ref(0); //
let comboId = ref(""); // id let comboId = ref(""); // id
let recommendPackageList = ref([]); // let recommendPackageList = ref([]); //
let popup = ref(null); let popup = ref(null); //
let popupTip = ref(null); //
let groupLength = ref(0); //
let status = ref(0); // 1 2 3 4
let personId = ref(""); // ID
let groupId = ref(""); // id
let losePrice = ref(0); //
// let query = ref(""); //
const getComboRecommend = async () => { const getComboRecommend = async () => {
// //
const response = await $api("ComboRecommend", { const response = await $api("ComboRecommend", {
person_id: $store.save_info.user_id || 1, person_id: personId.value,
item_ids: selectIds.value, item_ids: selectIds.value,
}); });
$response(response, () => { $response(response, () => {
@ -79,12 +94,18 @@ const getBuyInfo = async () => {
let obj = { let obj = {
item_ids: selectIds.value, item_ids: selectIds.value,
hospital: $store.save_info.hospital, hospital: $store.save_info.hospital,
person_id: personId.value,
group_id: groupId.value,
combo_id: comboId.value,
}; };
if (comboId.value) { if (comboId.value) {
obj.combo_id = comboId.value; obj.combo_id = comboId.value;
} }
const response = await $api("BuyInfo", obj); const response = await $api("BuyInfo", obj);
$response(response, () => { $response(response, () => {
groupLength.value = response.data.group_info
? response.data.group_info?.length
: 0;
packagePrice.value = response.data.combo_info.price; packagePrice.value = response.data.combo_info.price;
packageOriginalPrice.value = response.data.combo_info.original_price; packageOriginalPrice.value = response.data.combo_info.original_price;
optionalPrice.value = response.data.items_info.price; optionalPrice.value = response.data.items_info.price;
@ -92,49 +113,138 @@ const getBuyInfo = async () => {
totalPrice.value = response.data.true_price; totalPrice.value = response.data.true_price;
totalOriginalPrice.value = response.data.original_price; totalOriginalPrice.value = response.data.original_price;
total.value = response.data.pay_item_count; total.value = response.data.pay_item_count;
losePrice.value = response.data.lose_price;
uni.hideLoading(); uni.hideLoading();
}); });
}; };
const confirm = async () => { const confirm = async () => {
const itemIds = selectIds.value.length > 0 ? selectIds.value.join(",") : "";
// //
if (comboId.value) { // status 1 2 3 4
// if (status.value == 3) {
uni.navigateBack({ //
delta: 2, // query.value = "?groupId=" +
success: () => { // groupId.value +
let time = setTimeout(() => { // "&itemIds=" +
uni.navigateTo({ // itemIds +
url: // "&comboId=" +
"/pages/main/optionalProject/optionalDetails?comboId=" + // comboId.value;
comboId.value + }
"&itemIds=" + if (status.value == 4) {
itemIds, //
}); // query.value = "?groupId=" + groupId.value + "&itemIds=" + itemIds;
clearTimeout(time); if (!groupLength.value) {
}, 500); //
}, getComboRecommend();
}); return;
} else { }
// }
if (status.value == 1) {
//
// query.value = "?itemIds=" + itemIds + "&comboId=" + comboId.value;
}
if (status.value == 2) {
//
// query.value = "?itemIds=" + itemIds + "&personId=" + personId.value;
if (!selectIds.value.length) { if (!selectIds.value.length) {
uni.$lu.toast("请选择项目"); uni.$lu.toast("请选择项目");
return; return;
} }
// //
getComboRecommend(); getComboRecommend();
return;
} }
toDetails();
};
const toDetails = (state) => {
//
if (losePrice.value > 0 && !state) {
popupTip.value.open("center"); //
return;
}
const itemIds = selectIds.value.length > 0 ? selectIds.value.join(",") : "";
let query = "?comboId=" + comboId.value + "&itemIds=" + itemIds;
if (groupId.value) {
query += "&groupId=" + groupId.value;
}
console.log($props.comboId || $props.itemIds ? 2 : 1);
let delta = 0;
if(groupId.value){
if(groupLength.value){
delta = 2;
}else{
if($props.comboId || $props.itemIds){
delta = 2;
}else{
delta = 1;
}
}
}else{
if($props.comboId || $props.itemIds){
delta = 2;
}else{
delta = 1;
}
}
uni.navigateBack({
delta: delta,
success: () => {
let time = setTimeout(
() => {
clearTimeout(time);
uni.navigateTo({
url: "/pages/main/optionalProject/optionalDetails" + query,
});
},
delta == 2 ? 800 : 500
);
},
});
};
const buy = async (item) => {
if (item) {
comboId.value = item.combo_id;
await getBuyInfo();
}
const itemIds = selectIds.value.length > 0 ? selectIds.value.join(",") : "";
//
popup.value.close(); //
toDetails();
}; };
const mountedAction = async () => { const mountedAction = async () => {
selectIds.value = $props.itemIds?.split(",") || []; selectIds.value = $props.itemIds ? $props.itemIds.split(",") : [];
comboId.value = $props.comboId ? $props.comboId : ""; comboId.value = $props.comboId || "";
personId.value = $store.getUser().person_id || "";
groupId.value = $props.groupId || "";
if (groupId.value) {
if (comboId.value) {
//
status.value = 3;
} else {
//
status.value = 4;
}
} else {
if (comboId.value) {
//
status.value = 1;
} else {
//
status.value = 2;
}
}
console.log(status.value, "1个检套餐 2个检自选 3团检套餐 4团检自选");
await getAllItems(); // await getAllItems(); //
// await getComboRecommend(); // await getComboRecommend();
if (comboId.value) {
getBuyInfo(); // getBuyInfo(); //
}
}; };
const config_ref = ref(null); const config_ref = ref(null);
@ -157,6 +267,33 @@ onShow(() => {
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>
</view> </view>
<uni-popup ref="popupTip">
<view
class="mb-70rpx bg-#fff text-center box-border pt-80rpx pb-50rpx px-65rpx w-90vw rounded-15rpx"
>
<view
class="w-full text-center text-##090909 text-26rpx line-height-[50rpx]"
>您还剩余
{{ losePrice }}
元体检额度尚未使用确认提交后剩余体检额度将无法使用!</view
>
<view class="mt-50rpx between">
<button
type="primary"
@click="toDetails(1)"
class="w-196rpx h-68rpx center text-#fff text-24rpx !bg-#239EA3 rounded-8rpx"
>
我想好了
</button>
<button
@click="popupTip.close()"
class="w-196rpx h-68rpx center text-#239EA3 text-24rpx !bg-#D9F3F2 rounded-8rpx"
>
我再想想
</button>
</view>
</view>
</uni-popup>
<uni-popup ref="popup"> <uni-popup ref="popup">
<view class="bg-#fff rounded-15rpx w-95vw px-20rpx box-border"> <view class="bg-#fff rounded-15rpx w-95vw px-20rpx box-border">
<view class="center relative pt-47rpx pb-32rpx text-36rpx"> <view class="center relative pt-47rpx pb-32rpx text-36rpx">
@ -176,6 +313,7 @@ onShow(() => {
> >
<view class="flex w-full"> <view class="flex w-full">
<image <image
v-if="item.cover"
:src="$image(item.cover)" :src="$image(item.cover)"
class="w-190rpx h-190rpx mr-37rpx" class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix" mode="widthFix"
@ -240,7 +378,7 @@ onShow(() => {
</view> </view>
<button <button
type="primary" type="primary"
@click="" @click="buy(item)"
class="w-160rpx h-60rpx center text-#fff text-28rpx !bg-#239EA3 rounded-full" class="w-160rpx h-60rpx center text-#fff text-28rpx !bg-#239EA3 rounded-full"
> >
预约 预约
@ -250,7 +388,7 @@ onShow(() => {
<view class="b-0 b-t-1 b-solid b-#E1ECEE pt-80rpx pb-70rpx"> <view class="b-0 b-t-1 b-solid b-#E1ECEE pt-80rpx pb-70rpx">
<button <button
type="primary" type="primary"
@click="" @click="buy()"
class="w-300rpx h-78rpx center text-#fff text-30rpx !bg-#239EA3 rounded-10rpx" class="w-300rpx h-78rpx center text-#fff text-30rpx !bg-#239EA3 rounded-10rpx"
> >
跳过 跳过
@ -289,7 +427,12 @@ onShow(() => {
</view> </view>
</view> </view>
<view class="grow h-100% bg-#fff pb-200rpx"> <view class="grow h-100% bg-#fff pb-200rpx">
<image class="w-full" mode="widthFix" :src="$image(headImg)"></image> <image
v-if="headImg"
class="w-full"
mode="widthFix"
:src="$image(headImg)"
></image>
<view <view
v-for="(item, index) in rightLeft" v-for="(item, index) in rightLeft"
:key="index" :key="index"

@ -34,9 +34,9 @@ onShow(() => {
const toDetails = (type) => { const toDetails = (type) => {
let url = ""; let url = "";
if(type == 1){ if(type == 1){
url = "/pages/main/optionalProject/optionalProject?projectId=" + groupInfo.project_id; url = "/pages/main/combo/combo?groupId=" + groupInfo.value.group_id;
}else{ }else{
url = "/pages/main/optionalProject/optionalDetails"; url = "/pages/main/optionalProject/optionalProject?groupId=" + groupInfo.value.group_id;
} }
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
@ -69,7 +69,7 @@ const toDetails = (type) => {
</view> </view>
<view class="pb-30rpx"> <view class="pb-30rpx">
<text class="text-#8B8B8B">部门名称</text> <text class="text-#8B8B8B">部门名称</text>
<text>{{ groupInfo.group_name }}</text> <text>{{ groupInfo.bumen_name }}</text>
</view> </view>
<view class="pb-30rpx"> <view class="pb-30rpx">
<text class="text-#8B8B8B">套餐名称</text> <text class="text-#8B8B8B">套餐名称</text>

@ -0,0 +1,121 @@
<script setup>
/**
* name
* userselectDoctor
* date2024年9月24日 16:24:50
*/
import {
ref
} from 'vue'
import {
$api,
$response,
$image
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const dqDate = ref('')
const $props = defineProps({
date: {
type: String,
default: "",
},
});
const mountedAction = () => {
uni.showLoading({
title: "加载中",
});
dqDate.value = $props.date ? $props.date : '2024-08-01';
if (dqDate.value) {
getdoctorList(); //
}
}
const doctor_list = ref(false)
const getdoctorList = async () => {
//
console.log($store, 'store')
let obj = {
"date": dqDate.value
};
const response = await $api("DoctorGetList", obj);
$response(response, () => {
console.log(response, 'response')
doctor_list.value = response.data.list;
uni.hideLoading();
});
};
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
const clickDoctor = (item) => {
$store.setYytjInfo(item);
console.log(item.name)
// item.name
uni.navigateBack({
delta: 1
});
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class=" pb-40rpx">
<view class="h-38rpx bg-#239EA3 pl-20rpx pr-20rpx box-border">
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);"
class="pb-80rpx pt-30rpx rounded-15rpx bg-#fff">
<view v-for="(item,index) in doctor_list" :key="index" class="p-10rpx ">
<view class="flex flex-row text-#8B8B8B text-23rpx ">
<image :src="$image(item.head_img)" class="w-170rpx h-226rpx mr-20rpx "></image>
<view class="flex-1 flex flex-col flex-justify-start pr-20rpx">
<view class="text-#0E0E0E text-36rpx">
{{item.name}}
<span class="text-26rpx text-#515151 ml-10rpx">{{item.level}}</span>
</view>
<view class="mt-33rpx mb-10rpx line-clamp-1">
{{item.hospital}}:
<span class="ml-11rpx ">{{item.time}}</span>
</view>
<view class="line-clamp-2">
{{item.desc}}
</view>
<view @click="clickDoctor(item)"
class="ml-a mt-25rpx w-190rpx h-55rpx bg-#239EA3 rounded-33rpx text-#fff text-21rpx flex flex-justify-center items-center">
预约此医生 </view>
</view>
</view>
<view class="w-100% h-1rpx bg-#E6E9E9 mt-15rpx" />
</view>
</view>
</view>
</view>
</view>
</template>
<style scoped>
</style>

@ -0,0 +1,265 @@
<script setup>
/**
* name
* useryytjsj
* date2024年9月25日 10:25:00
*/
import {
ref
} from 'vue'
import {
$api,
$response,
$image
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const dqDate = ref('')
const doctor_name = ref('')
const $props = defineProps({
});
const mountedAction = () => {
uni.showLoading({
title: "加载中",
});
console.log($store.getYytjInfo(), '123123')
doctor_name.value = $store.getYytjInfo().name || ''; //
// if (dqDate.value) {
getnmrList(); //
// }
}
const date_list = ref(false)
const time_list = ref(false)
const currentDate = ref(0)
const currentTime = ref(0)
const currentXmmcObj = ref(false) //
const nmr_list = ref(false) //
const getnmrList = async () => {
console.log($store, 'store')
let obj = {
"hospital": 1,
"combo_id": "2053",
"item_ids": ["2074", "2075"],
"person_id": 1,
"group_id": null,
"integral": 50,
"save_money": 100,
"coupon_id": 1
};
const response = await $api("BuyInfo", obj);
$response(response, () => {
currentDate.value = getToday(); //huo
nmr_list.value = response.data.nmr_list || false;
nmr_list.value[0].rq = currentDate.value
console.log(nmr_list.value, 'data.nmr_list')
xmmcClick(nmr_list.value[0]) //
getTjTimeList()
uni.hideLoading();
});
}
const getToday = () => {
//
var today = new Date();
//
var year = today.getFullYear(); //
var month = (today.getMonth() + 1).toString().padStart(2, '0'); // 0+1使padStart
var day = today.getDate().toString().padStart(2, '0'); // 使padStart
//
return year + '-' + month + '-' + day;
}
const getTjTimeList = async () => {
console.log(currentDate.value)
//
let obj = {
"hospital": "1",
"person_id": "1",
"date": "2024-08-17", //currentDate.value
"use_type": 1,
"checkup_type_id": 1,
"amount": "500"
};
const response = await $api("GetDayPlanList", obj);
$response(response, () => {
console.log(response, 'response')
currentXmmcObj.value['sj'] = ''; //
currentTime.value = ''
date_list.value = response.data.weeklist;
time_list.value = response.data.list;
time_list.value.forEach((item) => {
console.log(item.date)
item.newTime = item.time.slice(0, 5);
})
date_list.value.forEach((item) => {
const [year, month, day] = item.date.split('-');
item.newMonthDate = `${month}/${day}`; //
item.newWeek = item.xingqi.replace("星期", "周")
})
uni.hideLoading();
});
};
const getCurrentClick = (item, i) => {
console.log(item, i) //
currentDate.value = item.date
let obj = {}
getTjTimeList() //
}
const getCurrentTime = (item) => {
currentTime.value = item
currentXmmcObj.value['sj'] = item.newTime
}
const xmmcClick = (i) => {
currentXmmcObj.value = i //
}
const clickDoctor = () => {
//
uni.navigateTo({
url: `/pages/main/selectDoctor/selectDoctor?date=${'2024-08-01'}`
})
}
const comfrimyy=()=>{
uni.$lu.toast('提交成功')
}
const config_ref = ref(null)
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e
mountedAction()
}
}
onShow(() => {
if (!!config_ref.value) {
mountedAction()
}
})
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="h-38rpx bg-#239EA3 pl-20rpx pr-20rpx box-border">
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);"
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff">
<view class="">
---------------------
</view>
<view class="">
<view class="text-30rpx text-#0E0E0E pb-34rpx">
自选项目
</view>
<view class=" text-#8B8B8B text-24rpx">
<view class="flex mb-20rpx">
妇科化验-<span class="flex-1 ml-10rpx text-#0E0E0E line-clamp-1"> 头瘤病毒乳头瘤病毒乳头瘤病毒乳头瘤病毒乳头瘤病毒乳头瘤病毒HPV
</span>
</view>
<view class="flex mb-20rpx">
超声科-<span class="flex-1 ml-10rpx text-#0E0E0E"> 腹部B超 </span>
</view>
<view class="flex mb-20rpx">
体检医生 -
<span class="flex-1 ml-10rpx text-#0E0E0E" @click="clickDoctor"> {{doctor_name || ''}}
<span class="ml-10rpx">&gt;</span>
</span>
</view>
</view>
</view>
</view>
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);"
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff mt-15rpx">
<view class="">
<view class="text-30rpx text-#0E0E0E pb-34rpx font-500">
{{currentXmmcObj.name || ''}}
</view>
<view class="flex" v-if="date_list">
<view class="w-15% text-center text-18rpx" v-for="(item,index) in date_list" :key="index">
<view @click="getCurrentClick(item,index)" :class="3==index?'activeTime':''"
class="rounded-12rpx pt-10rpx pb-10rpx ml-10rpx mr-10rpx mb-6rpx ">
<view> {{item.newMonthDate}} </view>
<view class="text-26rpx font-500"> {{item.newWeek}} </view>
</view>
<view class="ma">
<text class="bg-#EFEFEF rounded-10rpx h-28rpx pl-10rpx pr-10rpx">{{item.count }}</text>
</view>
</view>
<!-- <view class="w-1rpx m-20rpx bg-#E6E9E9 ml-15rpx" />
<view class="flex text-#239EA3 text-20rpx">
更多
</view> -->
</view>
<view class="w-100% h-1rpx bg-#E6E9E9 mt-18rpx" />
<view class="flex flex-wrap pt-30rpx pb-30rpx">
<view class="w-20% text-center box-border p-20rpx" v-for="(item,index) in time_list" :key="index"
@click="getCurrentTime(item)">
<view class="text-24rpx rounded-12rpx h-54rpx flex flex-items-center flex-justify-center"
:class="currentTime.newTime==item.newTime?'activeTime':''">
{{item.newTime}}
</view>
</view>
</view>
</view>
</view>
<view style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.04);"
class=" p-30rpx pl-10rpx pr-10rpx rounded-15rpx bg-#fff mt-15rpx text-#101010 text-28rpx">
<view class="bg-#F7F7F7 pl-20rpx pr-20rpx pt-23rpx pb-25rpx">
路雅思
<view class="bg-#EFEFEF rounded-15rpx p-10rpx pb-15rpx pt-15rpx mt-20rpx" v-if="nmr_list">
<view v-for="(item,index) in nmr_list" :key="index" @click="xmmcClick(item)"
:class="currentXmmcObj.name==item.name ?'acitvetc':''"
class="flex flex-justify-around p-20rpx pl-10rpx pr-10rpx rounded-15rpx">
<view class="flex-1 line-clamp-1">
{{item.name}}
</view>
<view>
{{item.rq}} <span class="ml-5rpx">{{item.sj}}</span>
<!-- 2024年12月12日 09:00 -->
</view>
</view>
</view>
</view>
</view>
<view class="pb-100rpx">
<view @click="comfrimyy"
class="text-#fff text-32rpx rounded-45rpx bg-#239EA3 mt-40rpx ma w-520rpx h-90rpx flex flex-items-center flex-justify-center">
确定
</view>
</view>
</view>
</view>
</template>
<style scoped>
.activeTime {
background-color: #239EA3;
color: #fff;
}
.acitvetc {
background-color: #E0F1F2;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -4,7 +4,8 @@ import {
export const useStore = defineStore('counter', { export const useStore = defineStore('counter', {
state: () => ({ state: () => ({
user: false, user: {},
yytjInfo: {},
config: false, config: false,
patientInfo: {}, // 病人信息 patientInfo: {}, // 病人信息
groupInfo: {}, // 团检信息 groupInfo: {}, // 团检信息
@ -17,18 +18,32 @@ export const useStore = defineStore('counter', {
loading: 0, loading: 0,
}), }),
actions: { actions: {
setPatientInfo(info){ setYytjInfo(yytjInfo) {
this.yytjInfo = yytjInfo;
uni.setStorageSync('yytjInfo', JSON.stringify(yytjInfo));
},
getYytjInfo() {
return JSON.parse(uni.getStorageSync('yytjInfo')) || this.yytjInfo;
},
setUser(user) {
this.user = user;
uni.setStorageSync('USER', JSON.stringify(user));
},
getUser() {
return JSON.parse(uni.getStorageSync('USER')) || this.user;
},
setPatientInfo(info) {
this.patientInfo = info; this.patientInfo = info;
uni.setStorageSync('PATIENT_INFO', JSON.stringify(info)); uni.setStorageSync('PATIENT_INFO', JSON.stringify(info));
}, },
getPatientInfo(){ getPatientInfo() {
return JSON.parse(uni.getStorageSync('PATIENT_INFO')) || this.patientInfo; return JSON.parse(uni.getStorageSync('PATIENT_INFO')) || this.patientInfo;
}, },
setGroupInfo(info){ setGroupInfo(info) {
this.groupInfo = info; this.groupInfo = info;
uni.setStorageSync('GROUP_INFO', JSON.stringify(info)); uni.setStorageSync('GROUP_INFO', JSON.stringify(info));
}, },
getGroupInfo(){ getGroupInfo() {
return JSON.parse(uni.getStorageSync('GROUP_INFO')) || this.groupInfo; return JSON.parse(uni.getStorageSync('GROUP_INFO')) || this.groupInfo;
}, },
resetSaveInfo() { resetSaveInfo() {

Loading…
Cancel
Save