选择体告,报告对比,趋势分析选择项目,满意度调查,查看报告,报告查询,套餐对比

wenjuan
刘佳宇 1 year ago
parent 9cf5cb7ab6
commit 325381e55a

@ -1,5 +1,6 @@
{ {
"pages": [{ "pages": [
{
"path": "pages/main/index/index", "path": "pages/main/index/index",
"style": { "style": {
"navigationBarTitleText": "海南现代妇女儿童医院", "navigationBarTitleText": "海南现代妇女儿童医院",
@ -13,6 +14,13 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/main/combo/tcdb",
"style": {
"navigationBarTitleText": "套餐对比",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/main/order/order", "path": "pages/main/order/order",
"style": { "style": {
@ -83,7 +91,7 @@
{ {
"path": "pages/main/questionnaire/index", "path": "pages/main/questionnaire/index",
"style": { "style": {
"navigationBarTitleText": "问卷调查", "navigationBarTitleText": "满意度调查",
"navigationBarBackgroundColor": "#239EA3", "navigationBarBackgroundColor": "#239EA3",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
@ -115,6 +123,12 @@
"navigationBarTitleText": "报告查询" "navigationBarTitleText": "报告查询"
} }
}, },
{
"path": "pages/main/bgcx/bgdb/xzbg/xzbg",
"style": {
"navigationBarTitleText": "选择体检报告"
}
},
{ {
"path": "pages/main/bgcx/bgjd/bgjd", "path": "pages/main/bgcx/bgjd/bgjd",
"style": { "style": {
@ -139,6 +153,12 @@
"navigationBarTitleText": "趋势分析" "navigationBarTitleText": "趋势分析"
} }
}, },
{
"path": "pages/main/bgcx/qsfx/qsfxxq",
"style": {
"navigationBarTitleText": ""
}
},
{ {
"path": "pages/main/selectDoctor/selectDoctor", "path": "pages/main/selectDoctor/selectDoctor",
"style": { "style": {
@ -158,21 +178,21 @@
} }
}, },
{ {
"path": "pages/buy/contrast/contrast", "path": "pages/user/pick/pick",
"style": { "style": {
"navigationBarTitleText": "数据对比" "navigationBarTitleText": "体检引导"
} }
}, },
{ {
"path": "pages/user/pick/pick", "path": "pages/user/fenzhen/fenzhen",
"style": { "style": {
"navigationBarTitleText": "体检引导" "navigationBarTitleText": "体检引导"
} }
}, },
{ {
"path": "pages/user/fenzhen/fenzhen", "path": "pages/buy/contrast/contrast",
"style": { "style": {
"navigationBarTitleText": "体检引导" "navigationBarTitleText": "数据对比"
} }
} }
], ],

@ -29,8 +29,8 @@ const gettjbgInfo = async (index) => {
console.log(tabIndex.value); console.log(tabIndex.value);
console.log($store, "store"); console.log($store, "store");
let obj = { let obj = {
hospital_id:$store.config.hospital[0].id tj_status: tabIndex.value,
tj_status: tabIndex.value hospital_id: $store.save.hospital
}; };
const response = await $api("GetReportList", obj); const response = await $api("GetReportList", obj);
$response(response, () => { $response(response, () => {
@ -57,6 +57,7 @@ const routesDeatils = (val) => {
const tzroutes = (url) => { const tzroutes = (url) => {
// //
$store.setTjbgInfo([]);
uni.navigateTo({ uni.navigateTo({
url: `/pages/main/bgcx/${url}/${url}`, url: `/pages/main/bgcx/${url}/${url}`,
}); });
@ -113,6 +114,12 @@ onShow(() => {
@click="gettjbgInfo(1)" @click="gettjbgInfo(1)"
:class="tabIndex == 1 ? 'bgcx_fullReport_query_button_active' : ''" :class="tabIndex == 1 ? 'bgcx_fullReport_query_button_active' : ''"
class="bgcx_fullReport_query_button" class="bgcx_fullReport_query_button"
>已出报告</view
>
<view
@click="gettjbgInfo(2)"
:class="tabIndex == 2 ? 'bgcx_fullReport_query_button_active' : ''"
class="bgcx_fullReport_query_button"
>未出报告</view >未出报告</view
> >
</view> </view>

@ -1,49 +1,265 @@
<script setup> <script setup>
/** /**
* name * name
* usersa0ChunLuyu * userbgdb
* date2024年9月11日 19:24:50 * date2024年9月26日 19:26:00
*/ */
import { import { ref } from "vue";
ref import { $api, $response } from "@/api";
} from 'vue' import { onShow } from "@dcloudio/uni-app";
import { import { useStore } from "@/store";
$api, const $store = useStore();
$response const dbList = ref([]);
} from '@/api' let data = ref({});
import { const mountedAction = () => {
onShow // uni.showLoading({
} from '@dcloudio/uni-app' // title: "",
import { // });
useStore let obj = $store.getTjbgInfo();
} from '@/store' if (obj.length) {
const $store = useStore() dbList.value = obj;
console.log($store.getTjbgInfo(), "体检报告");
const mountedAction = () => { }
};
} const dbResList = ref([]);
const config_ref = ref(null) let tabIndex = ref(0); //
const configRef = (e) => {
if (!config_ref.value) { const getBtn = async (e) => {
config_ref.value = e tabIndex.value = e;
mountedAction() //dbResList
} if (e == 0) {
} dbResList.value = data.value?.report_type1_content;
} else {
onShow(() => { dbResList.value = data.value?.report_type2_content;
if (!!config_ref.value) { }
mountedAction() };
} const duibiclick = async () => {
}) //
</script>
<template> if (dbList.value && dbList.value.length == 2) {
<view> let obj = {
<view v-if="!!$store.config"> tj_numbers: [dbList.value[0]["体检号"], dbList.value[0]["体检号"]],
<view :ref="configRef"></view> };
</view> const response = await $api("ReportContrast", obj);
</view> $response(response, () => {
</template> data.value = response.data;
<style scoped> dbResList.value = data.value?.report_type1_content;
});
</style> } else {
uni.$lu.toast("选择两份报告后在进行对比");
}
};
const delObj = (i) => {
dbList.value.splice(i, 1);
$store.setTjbgInfo(dbList.value);
};
const selectBg = () => {
//
uni.navigateTo({
url: `/pages/main/bgcx/bgdb/xzbg/xzbg`,
});
};
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="p-20rpx">
<view
class="bg-#EEA61E text-#CF911C bg-op-20 rounded-10rpx p-20rpx flex flex-items-center"
>
<image
class="w-26rpx h-26rpx mr-20rpx"
src="@/static/assets/slices/bgjdtb.png"
></image>
<span class="text-24rpx"
>由于手机上显示体检报告最多选择两份报告对比!</span
>
</view>
<view class="bg-#fff rounded-15rpx p-20rpx mt-20rpx mb-20rpx pb-50rpx">
<!-- list -->
<view class="pb-30rpx">
<view v-for="(item, index) in dbList" :key="index">
<view
style="border-bottom: 1px solid #e6e9e9"
class="flex flex-justify-between text-#101010 text-30rpx pb-20rpx pt-20rpx"
>
<view class="line-clamp-1 flex-1">
{{ item["检前签到时间"]?.split("T").join(" ") }} 体检报告
</view>
<view
@click="delObj(index)"
class="w-48rpx h-48rpx rounded-15rpx flex flex-items-center flex-justify-center right-50rpx top-30px"
>
<uni-icons
type="trash-filled"
color="#E55224"
size="20"
></uni-icons>
</view>
</view>
</view>
</view>
<view
v-if="dbList && dbList.length == 0"
@click="selectBg"
class="bg-#F0F0F0 rounded-10rpx w-477rpx h-242rpx ma flex flex-justify-center mt-20rpx mb-40rpx"
>
<image
class="w-91rpx h-101rpx mt-50rpx"
src="@/static/assets/slices/bgdbadd.png"
></image>
</view>
<view
@click="selectBg"
v-if="dbList && dbList.length == 1"
class="w-520rpx ma bg-#239EA3 rounded-40rpx text-#fff text-26rpx font-500 flex flex-justify-center line-height-[3]"
>
选择报告
</view>
<view
@click="duibiclick"
v-if="dbList.length != 1"
class="w-520rpx ma bg-#239EA3 rounded-40rpx text-#fff text-26rpx font-500 flex flex-justify-center line-height-[3]"
>
报告对比
</view>
</view>
<view
class="bg-#fff rounded-15rpx p-20rpx mt-20rpx mb-20rpx pb-50rpx"
v-if="dbResList && dbResList.length > 0"
>
<view
class="mt-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>
<uni-collapse id="collapse-bgdb">
<view
class="mt-35rpx"
v-for="(item, index) in dbResList"
:key="index"
>
<uni-collapse-item
:name="item.id"
:open="true"
:title="item.title"
thumb=""
>
<view class="p-20rpx py-0">
<!-- <view class="p-20rpx pl-30rpx pr-30rpx" v-if="item && item.details"> -->
<view class="flex text-#343434 text-center">
<view
style="border-bottom: 1px solid #d2d2d2"
class="line-height-[2.8] flex-1 mr-25rpx text-#343434 text-24rpx"
>
{{ item.r1.date?.split("T")[0] }}
</view>
<view
style="border-bottom: 1px solid #d2d2d2"
class="line-height-[2.8] flex-1 ml-25rpx text-#343434 text-24rpx"
>
{{ item.r2.date?.split("T")[0] }}
</view>
</view>
<view class="center text-#343434 items-stretch">
<view class="flex-1 mr-20rpx pt-20rpx">
<view v-show="tabIndex == 0" class="whitespace-pre-wrap text-28rpx">
{{ item.r1?.content }}
</view>
<view v-show="tabIndex == 1" class="text-center">
<view class="text-32rpx">
<text class="text-#D01615 text-28rpx">{{
item.r2?.icoin
}}</text
>{{ item.r1?.content }}
</view>
<view class="text-#999999">
*正常范围{{ item.r1?.desc }}
</view>
</view>
</view>
<view class="bg-#D2D2D2 w-1rpx mt-20rpx" />
<view class="flex-1 ml-20rpx pt-20rpx">
<view v-show="tabIndex == 0" class="whitespace-pre-wrap text-28rpx">
{{ item.r2?.content }}
</view>
<view v-show="tabIndex == 1" class="text-center">
<view class="text-32rpx">
<text class="text-#D01615 text-28rpx">{{
item.r2?.icoin
}}</text
>{{ item.r2?.content }}
</view>
<view class="text-#999999">
*正常范围{{ item.r2?.desc }}
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</view>
</uni-collapse>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
::v-deep .uni-collapse-item__title-wrap {
width: 80% !important;
}
::v-deep #collapse-bgdb .uni-collapse-item__title-box,
::v-deep .uni-collapse-item__title {
background: #239ea3 !important;
color: #fff !important;
.uni-icons {
color: #fff !important;
}
}
::v-deep #collapse-bgdb .uni-collapse-item__title.uni-collapse-item-border {
border: none !important;
}
::v-deep
#collapse-bgdb
.uni-collapse-item__wrap
.uni-collapse-item__wrap-content.open {
border: none !important;
}
.ckjg_active {
background: #239ea3;
color: #fff;
}
</style>

@ -0,0 +1,113 @@
<script setup>
/**
* name
* userxzbg
* date2024年9月27日 16:01:08
*/
import { ref } from "vue";
import { $api, $response } from "@/api";
import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store";
const $store = useStore();
let bgcx_list = ref([]); //
const mountedAction = () => {
gettjbgInfo();
};
const gettjbgInfo = async () => {
//
console.log($store, "store");
let obj = {
tj_status: 1,
hospital_id: $store.save.hospital,
};
const response = await $api("GetReportList", obj);
$response(response, () => {
console.log(response, "response");
bgcx_list.value = response.data.list;
uni.hideLoading();
});
};
// const bgList = ref([1, 2, 3, 4])
const selectdbObj = async (item) => {
let tjbgList = $store.getTjbgInfo();
if($store.setTjbgInfo?.length < 2){
tjbgList.push(item);
}
$store.setTjbgInfo(tjbgList);
// console.log(item.name)
// item.name
uni.navigateBack({
delta: 1,
});
};
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="">
<view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.05)"
class="text-24rpx text-#333 m-20rpx p-24rpx bg-#fff rounded-10rpx"
v-for="(item, index) in bgcx_list"
:key="index"
>
<view
class="pb-30rpx text-#0E0E0E text-34rpx flex flex-justify-between"
>
<text class="line-clamp-1">{{ item["套餐名称"] }}</text>
<text
class="w-90rpx h-42rpx bg-#32A8D9 text-#fff text-24rpx rounded-rb-20rpx rounded-lt-20rpx text-center line-height-[1.6]"
>{{ item["团检"] ? "团检" : "个检" }}</text
>
</view>
<view class="pb-15rpx">
<text class="text-#8B8B8B">体检人</text>
<text class="ml-25rpx">{{ item["姓名"] }}</text>
</view>
<view class="pb-15rpx">
<text class="text-#8B8B8B">体检时间</text>
<text>{{ item["检前签到时间"]?.split("T").join(" ") }}</text>
</view>
<view class="pb-15rpx">
<text class="text-#8B8B8B">报告编号</text>
<text>{{ item["体检号"] }}</text>
</view>
<view class="pb-20rpx">
<text class="text-#8B8B8B">报告日期</text>
<text>{{ item["报告日期"]?.split("T").join(" ") }}</text>
</view>
<view
style="border-top: 1px solid #e6e9e9"
class="pt-20rpx flex flex-justify-end"
>
<view
@click="selectdbObj(item)"
class="bg-#33ACB5 w-200rpx rounded-5rpx text-#fff text-center line-height-[2.5]"
>报告对比</view
>
</view>
</view>
</view>
</view>
</template>
<style scoped></style>

@ -28,7 +28,7 @@ const $props = defineProps({
const bgjl_obj = ref(false); const bgjl_obj = ref(false);
const wzbg_list = ref(null); const wzbg_list = ref(null);
let tabIndex = ref(0); // let tabIndex = ref(1); //
let currentIndex = ref(0); // let currentIndex = ref(0); //
const getBtn = (e) => { const getBtn = (e) => {
@ -40,7 +40,7 @@ const getList = async () => {
console.log(tabIndex.value, "tabIndex"); console.log(tabIndex.value, "tabIndex");
let obj = { let obj = {
tijian_num: tjhNum.value, // tijian_num: tjhNum.value, //
hospital_id:$store.config.hospital[0].id hospital_id: $store.save.hospital,
}; };
let url = "GetReportJieLunJianYi"; let url = "GetReportJieLunJianYi";
if (tabIndex.value == 1) { if (tabIndex.value == 1) {
@ -50,7 +50,11 @@ const getList = async () => {
$response(response, () => { $response(response, () => {
console.log(response.data, "response"); console.log(response.data, "response");
if (tabIndex.value == 1) { if (tabIndex.value == 1) {
for (let key in response.data.list) {
response.data.list[key].isopen = false;
}
wzbg_list.value = response.data.list; wzbg_list.value = response.data.list;
console.log(response.data.list);
} else { } else {
bgjl_obj.value = response.data.info; bgjl_obj.value = response.data.info;
} }
@ -74,15 +78,9 @@ const configRef = (e) => {
}; };
const dqArr = ref([]); const dqArr = ref([]);
const collapseClick = async (e) => { const collapseClick = async (e) => {
console.log(e); let id = e; //id
let id = ""; //id let itemWithId120 = null; //id itemWithId120['details']
let itemWithId120 = null; //iditemWithId120['details'] if (e) {
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) { for (let key in wzbg_list.value) {
if ( if (
wzbg_list.value.hasOwnProperty(key) && wzbg_list.value.hasOwnProperty(key) &&
@ -92,7 +90,11 @@ const collapseClick = async (e) => {
break; // 退 break; // 退
} }
} }
console.log(wzbg_list.value, "wzbg_list", itemWithId120, "itemWithId120"); // return
if(itemWithId120.hasOwnProperty("details")){
console.log(itemWithId120["details"], "itemWithId120");
return
}
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
@ -102,44 +104,49 @@ const collapseClick = async (e) => {
const response = await $api("GetReportDetai", obj); const response = await $api("GetReportDetai", obj);
console.log(response); console.log(response);
$response(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["details"] = response.data;
itemWithId120.isopen = itemWithId120.isopen console.log(itemWithId120["details"], "itemWithId120");
? !itemWithId120.isopen // itemWithId120.isopen = itemWithId120.isopen
: true; // ? !itemWithId120.isopen
// : true;
itemWithId120.isopen = true;
}); });
uni.hideLoading(); uni.hideLoading();
dqArr.value = e;
} }
}; };
const getOpenClick = () => { const getOpenClick = () => {
isopen.value = !isopen.value; isopen.value = !isopen.value;
console.log(wzbg_list.value);
for (let key in wzbg_list.value) {
wzbg_list.value[key].isopen = !wzbg_list.value[key].isopen;
}
console.log(wzbg_list.value);
// open // open
}; };
const calculatePercentage = (value, start, end) => { const calculatePercentage = (value, start, end, maxNum) => {
// if (value >= start && value <= end) {
const rangeLength = end - start; const rangeLength = end - start;
const widthFull = rangeLength * 2; const distanceFromStart = value - start;
let num = (value / widthFull).toFixed(2); const proportion = distanceFromStart / rangeLength;
console.log(num); const percentage = proportion * 50 + 25;
if (num < 0) { return percentage.toFixed(2);
num = 0;
} }
if (num > 1) { if (value < start) {
num = 1; const rangeLength = start;
const distanceFromStart = value;
const proportion = distanceFromStart / rangeLength;
const percentage = proportion * 25;
return percentage.toFixed(2);
}
if (value > end) {
const rangeLength = maxNum - end;
const distanceFromStart = value - end;
const proportion = distanceFromStart / rangeLength;
const percentage = proportion * 25 + 75;
return percentage.toFixed(2);
} }
return num * 100;
}; };
onShow(() => { onShow(() => {
@ -269,13 +276,15 @@ onShow(() => {
<view class="rounded-15rpx bg-#fff pt-22rpx pb-22rpx"> <view class="rounded-15rpx bg-#fff pt-22rpx pb-22rpx">
<view <view
class="w-154rpx h-60rpx rounded-r-30rpx text-center line-height-[2.3] text-#123531 text-25rpx font-500" class="w-154rpx h-60rpx rounded-r-30rpx text-center center text-#123531 text-25rpx font-500"
style="background: linear-gradient(90deg, #edf6f5 0%, #bbdfe1 99%)" style="background: linear-gradient(90deg, #edf6f5 0%, #bbdfe1 99%)"
> >
总检建议 总检建议
</view> </view>
<view class="pl-15rpx pr-25rpx pt-45rpx box-border"> <view class="pl-15rpx pr-25rpx pt-45rpx box-border">
<text>{{ bgjl_obj.content }}</text> <text class="text-#0B0B0B line-height-[2] text-26rpx">{{
bgjl_obj.content
}}</text>
<!-- <view class=" flex flex-justify-between line-height-[2]"> <!-- <view class=" flex flex-justify-between line-height-[2]">
@ -322,144 +331,173 @@ onShow(() => {
</view> </view>
<!-- 展开全部 --> <!-- 展开全部 -->
</view> </view>
<view v-for="(item, index) in wzbg_list">
<uni-collapse <uni-collapse
class="collapse-w" class="collapse-w"
@change="collapseClick($event)" @change="collapseClick"
v-model="currentIndex" v-model="currentIndex"
> accordion
<view
class="position-relative"
v-for="(item, index) in wzbg_list"
:key="index"
> >
<view <view class="position-relative" :key="index">
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 <view
class="p-20rpx pl-30rpx pr-30rpx" v-if="item && item.error_count > 0"
v-if="item && item.details" class="position-absolute line-height-[96rpx] right-40px text-#6D6D6D text-15px"
>
<span class="text-#E46B1A">{{ item.error_count }}</span>
项异常
</view>
<uni-collapse-item
:name="item.id"
:open="item.isopen"
thumb=""
:title="index"
> >
<view <view
class="bg-#FBF0EE b-0 b-1 b-solid b-#EADEDB rounded-15rpx pb-10rpx" class="p-20rpx pl-30rpx pr-30rpx"
:class="item.error_count == 0 ? 'greenClor' : ''" v-if="item && item.details"
> >
<view <view
:class="item.error_count == 0 ? 'greenTextClor' : ''" class="bg-#FBF0EE b-0 b-1 b-solid b-#EADEDB rounded-15rpx pb-10rpx"
class="w-141rpx line-height-[2] text-center text-#fff bg-#F6725B rounded-lt-15rpx rounded-rb-15rpx text-22rpx" :class="item.error_count == 0 ? 'greenClor' : ''"
> >
初步意见
</view>
<template v-if="item.error_count > 0">
<view <view
class="text-#E33939 text-22rpx line-height-[2] pl-20rpx pr-20rpx" :class="item.error_count == 0 ? 'greenTextClor' : ''"
v-for="(text, i) in item.details.error_items" class="w-141rpx line-height-[2] text-center text-#fff bg-#F6725B rounded-lt-15rpx rounded-rb-15rpx text-22rpx"
:key="i"
> >
{{ text }} 初步意见
</view> </view>
</template>
<view <template v-if="item.error_count > 0">
class="text-#239EA3 text-22rpx line-height-[2] pl-20rpx pr-20rpx" <view
v-else class="text-#E33939 text-22rpx line-height-[2] pl-20rpx pr-20rpx"
> v-for="(text, i) in item.details.error_items"
<!-- {{item.details.error_items.length}} --> :key="i"
<text >
v-if=" {{ text }}
!item.details.suojian || !item.details.error_items </view>
" </template>
> <view
未见明显异常</text class="text-#239EA3 text-22rpx line-height-[2] pl-20rpx pr-20rpx"
v-else
> >
<template v-else> <!-- {{item.details.error_items.length}} -->
<text <text
v-for="(text, i) in item.details.suojian" v-if="
:key="i" !item.details.suojian?.length && !item.details.error_items?.length
"
> >
{{ text }}</text 未见明显异常</text
> >
</template> <template v-else>
</view> <text
</view> v-for="(text, i) in item.details.suojian"
<view v-if="1 < 0" class="flex flex-justify-around m-20rpx"> :key="i"
<view> >
<view class="text-36rpx font-500"> 162.0 </view> {{ text }}</text
<view class="text-20rpx"> 身高cm </view> >
</view> </template>
<view> </view>
<view class="text-40rpx font-500"> 58.8 </view>
<view class="text-20rpx"> 体重Kg </view>
</view> </view>
</view> <!-- <view v-if="1 < 0" class="flex flex-justify-around m-20rpx">
<view class="p-10rpx pt-20rpx pb-20rpx"> <view>
<view v-for="(obj, i) in item.details.list" :key="i"> <view class="text-36rpx font-500"> 162.0 </view>
<view class="font-500 text-24rpx line-height-[2]"> <view class="text-20rpx"> 身高cm </view>
{{ obj["基础项目名称"] }}
<span class="text-#737373 text-18rpx"
>( {{ obj["结果值单位"] }})</span
>
</view> </view>
<view>
<view class="pt-80rpx pb-30rpx"> <view class="text-40rpx font-500"> 58.8 </view>
<view class="h-4rpx bg-#E2E2E2 rounded-2rpx relative"> <view class="text-20rpx"> 体重Kg </view>
<view </view>
class="bg-#239EA3 h-3rpx w-50% rounded-2rpx ma flex text-24rpx text-#7B7B7B flex-justify-between" </view> -->
> <view class="p-10rpx pt-20rpx pb-20rpx">
<!-- {{obj['结果值范围']}} --> <view v-for="(obj, k) in item.details.list" :key="k">
<text>{{ obj.minNum }}</text> <view class="font-500 text-24rpx line-height-[2]">
<text>正常</text> {{ obj["基础项目名称"] }}
<text>{{ obj.maxNum }}</text> <span class="text-#737373 text-18rpx"
</view> >( {{ obj["结果值单位"] }})</span
<view
class="center flex-col absolute"
:style="{
left:
calculatePercentage(
obj['结果值'],
obj.minNum,
obj.maxNum
) + '%',
}"
> >
</view>
<view class="pt-80rpx pb-30rpx">
<view class="h-4rpx bg-#E2E2E2 rounded-2rpx relative">
<view <view
class="text-#239EA3 text-34rpx absolute top--50rpx" class="bg-#239EA3 h-4rpx w-50% rounded-2rpx ma flex text-24rpx text-#7B7B7B flex-justify-between"
> >
<text>{{ obj["结果值"] }}</text> <!-- {{obj['结果值范围']}} -->
<uni-icons <text>{{ obj["结果值范围"][0] }}</text>
v-if="obj['结果值'] < obj.minNum" <text>正常</text>
type="arrow-down" <text>{{ obj["结果值范围"][1] }}</text>
:size="18"
></uni-icons>
<uni-icons
v-if="obj['结果值'] > obj.maxNum"
type="arrow-up"
:size="18"
></uni-icons>
</view> </view>
<view <view
class="w-8rpx h-8rpx rounded-50% bg-#fff b-4rpx b-solid b-#1F8F94 absolute -top-8rpx" v-if="
obj['结果值'] < obj['结果值范围'][0] ||
obj['结果值'] > obj['结果值范围'][1]
"
class="bg-#F8C9C7 h-4rpx w-25% rounded-2rpx ma absolute bottom-0"
:class="{
'left-0': obj['结果值'] < obj['结果值范围'][0],
'right-0': obj['结果值'] > obj['结果值范围'][1],
}"
></view>
<view
class="center flex-col absolute"
:style="{
left:
calculatePercentage(
obj['结果值'],
obj['结果值范围'][0],
obj['结果值范围'][1],
obj['最大范围'][1]
) + '%',
}"
> >
<view
class="text-34rpx absolute top--50rpx"
:class="{
'text-#239EA3':
obj['结果值'] >= obj['结果值范围'][0] &&
obj['结果值'] <= obj['结果值范围'][1],
'text-#F34932':
obj['结果值'] < obj['结果值范围'][0] ||
obj['结果值'] > obj['结果值范围'][1],
}"
>
<text>{{ obj["结果值"] }}</text>
<uni-icons
v-if="obj['结果值'] < obj['结果值范围'][0]"
type="arrow-down"
:size="16"
color="#F34932"
></uni-icons>
<uni-icons
v-if="obj['结果值'] > obj['结果值范围'][1]"
type="arrow-up"
:size="16"
color="#F34932"
></uni-icons>
</view>
<view
class="w-8rpx h-8rpx rounded-50% bg-#fff b-4rpx b-solid absolute -top-8rpx"
:class="{
'b-#1F8F94':
obj['结果值'] >= obj['结果值范围'][0] &&
obj['结果值'] <= obj['结果值范围'][1],
'b-#F34932':
obj['结果值'] < obj['结果值范围'][0] ||
obj['结果值'] > obj['结果值范围'][1],
}"
>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class=""> </view>
</view> </view>
<view class=""> </view>
</view> </view>
</view> </uni-collapse-item>
</uni-collapse-item> </view>
</view> </uni-collapse>
</uni-collapse> </view>
</view> </view>
</view> </view>
</view> </view>

@ -1,49 +1,74 @@
<script setup> <script setup>
/** /**
* name * name
* usersa0ChunLuyu * usersa0ChunLuyu
* date2024年9月11日 19:24:50 * date2024年9月11日 19:24:50
*/ */
import { import { ref } from "vue";
ref import { $api, $response } from "@/api";
} from 'vue' import { onShow } from "@dcloudio/uni-app";
import { import { useStore } from "@/store";
$api, const $store = useStore();
$response
} from '@/api'
import {
onShow
} from '@dcloudio/uni-app'
import {
useStore
} from '@/store'
const $store = useStore()
const mountedAction = () => { let list = ref([]);
const mountedAction = () => {
AnalysisTypeGetList();
};
} const AnalysisTypeGetList = async () => {
const response = await $api("AnalysisTypeGetList");
$response(response, () => {
console.log(response)
list.value = response.data.list;
});
};
const config_ref = ref(null) const toRouter = (index, i) => {
const configRef = (e) => { uni.navigateTo({
if (!config_ref.value) { url: "/pages/main/bgcx/qsfx/qsfxxq?i=" + i + "&index=" + index,
config_ref.value = e });
mountedAction() };
}
}
onShow(() => { const config_ref = ref(null);
if (!!config_ref.value) { const configRef = (e) => {
mountedAction() if (!config_ref.value) {
} config_ref.value = e;
}) mountedAction();
}
};
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>
</template>
<style scoped>
</style> <view>
<view v-for="(item, index) in list" :key="index" class="flex flex-col mt-25rpx">
<view
class="w-180rpx rounded-r-full text-#0E0E0E text-25rpx px-40rpx center justify-start h-60rpx box-border bg-gradient-to-r from-#edf6f5 to-#bbdfe2"
>
{{ item.title }}
</view>
<view class="p-20rpx">
<view v-for="(val, i) in item.list" :key="i" class="mb-10rpx p-[25rpx_20rpx_0rpx_10rpx] box-border between bg-#F1F7F7 rounded-10rpx" @click="toRouter(index, i)">
<view :style="{'background-color': val.color}" class="w-60rpx h-60rpx rounded-full mr-30rpx"></view>
<view class="flex flex-col mr-auto">
<text class="text-#222222 text-28rpx">{{ val.name }}</text>
<text class="text-#939898 text-22rpx">{{ val.desc }}</text>
</view>
<uni-icons type="right" size="15" color="#6A6A6A"></uni-icons>
</view>
</view>
</view>
</view>
</view>
</template>
<style scoped></style>

@ -0,0 +1,59 @@
<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 $props = defineProps({
index: {
type: String,
default: ''
},
i: {
type: String,
default: ''
}
});
let details = ref({});
const mountedAction = () => {
AnalysisTypeGetList();
};
const AnalysisTypeGetList = async () => {
const response = await $api("AnalysisTypeGetList");
$response(response, () => {
details.value = response.data.list[$props.index].list[$props.i];
console.log(details.value);
});
};
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>

@ -19,46 +19,96 @@ const $props = defineProps({
const combo_active = ref(""); const combo_active = ref("");
const person_active = ref(""); const person_active = ref("");
const selectItemClick = (type, value) => { let popup = ref(null);
select_active.value[type] = value; let selectKey = ref(""); // key
}; let sortIndex = ref(0); //
const selectDone = () => { let comboIndex = ref(null); //
combo_active.value = select_active.value.combo; let crowdIndex = ref(null); //
person_active.value = select_active.value.person; let priceIndex = ref(null); //
select_drawer_ref.value.close(); let projectIds = ref([]); // id
}; let screenObj = ref({}); //
const clearSelectClick = () => { let combo_select = ref({}); //
combo_active.value = ""; let comboIds = ref([]); //
person_active.value = "";
}; const selectItemClick = async (index, key) => {
const combo_select = ref({ //
combo: [], let data = combo_select.value;
person: [], if (selectKey.value == "sort_list") {
}); if (sortIndex.value == index) {
const comboActiveName = () => { sortIndex.value = 0;
for (let i in combo_select.value.combo) { } else {
if (combo_select.value.combo[i].value === combo_active.value) { sortIndex.value = index;
return combo_select.value.combo[i].label;
} }
screenObj.value.combo_sort = data[selectKey.value][index]?.id;
} else if (selectKey.value == "combo_type") {
if (comboIndex.value == index) {
comboIndex.value = null;
delete screenObj.value.combo_type;
} else {
comboIndex.value = index;
screenObj.value.combo_type = data[selectKey.value][index]?.id;
}
} else if (selectKey.value == "combo_crowd") {
if (crowdIndex.value == index) {
crowdIndex.value = null;
delete screenObj.value.combo_crowd;
} else {
crowdIndex.value = index;
screenObj.value.combo_crowd = data[selectKey.value][index]?.id;
}
} else {
if (key == "combo_price") {
if (priceIndex.value == index) {
priceIndex.value = null;
return;
}
priceIndex.value = index;
} else {
if (projectIds.value.includes(index)) {
projectIds.value.splice(projectIds.value.indexOf(index), 1);
} else {
projectIds.value.push(index);
}
}
return;
} }
return "套餐类型"; await getComboList();
popup.value.close();
}; };
const personActiveName = () => { const selectDone = async () => {
for (let i in combo_select.value.person) { if (priceIndex.value === null) {
if (combo_select.value.person[i].value === person_active.value) { delete screenObj.value.combo_price;
return combo_select.value.person[i].label; } else {
} screenObj.value.combo_price =
combo_select.value["combo_price"][priceIndex.value]?.id;
}
if (projectIds.value.length) {
screenObj.value.combo_item = projectIds.value;
} else {
delete screenObj.value.combo_item;
} }
return "适用人群"; await getComboList();
select_drawer_ref.value.close();
}; };
const remake = () => {
//
delete screenObj.value.combo_price;
delete screenObj.value.combo_item;
priceIndex.value = null;
projectIds.value = [];
};
const getComboSelect = async () => { const getComboSelect = async () => {
uni.showLoading(); uni.showLoading();
const response = await $api("ComboSelect"); const response = await $api("GetComboSort");
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, async () => {
combo_select.value = response.data; combo_select.value = response.data;
getComboList(); if ("sort_list" in combo_select.value) {
selectKey.value = "sort_list";
sortIndex.value = 0;
}
await getComboList();
}); });
}; };
@ -74,6 +124,7 @@ const combo_list = ref({
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) {
@ -104,19 +155,33 @@ const combo_list_computed = computed(() => {
}); });
const getComboList = async () => { const getComboList = async () => {
uni.showLoading(); uni.showLoading();
const response = await $api("ComboList", { let obj = {
doctor: $store.save.doctor, doctor: $store.save.doctor,
hospital: hospital_active.value, hospital: hospital_active.value,
}); };
if (screenObj.value) {
obj = Object.assign(obj, screenObj.value);
}
const response = await $api("ComboList", obj);
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, () => {
combo_list.value = response.data; combo_list.value = response.data;
}); });
}; };
const contrastClick = async (item) => {
if (comboIds.value.includes(item.combo_id)) {
comboIds.value.splice(comboIds.value.indexOf(item.combo_id), 1);
} else {
comboIds.value.push(item.combo_id);
}
$store.setComboContrast(comboIds.value);
};
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;
comboIds.value = $store.getComboContrast() || [];
if (!hospital_id) { if (!hospital_id) {
hospital_id = $store.config.hospital[0].id; hospital_id = $store.config.hospital[0].id;
} }
@ -127,6 +192,29 @@ const checkHospital = () => {
getComboSelect(); getComboSelect();
}; };
const tabPatients = () => {
uni.navigateTo({
url: "/pages/user/choose/choose",
});
};
const open = (key) => {
if (key) {
//
selectKey.value = key;
popup.value.close();
let time = setTimeout(() => {
popup.value.open("top");
clearTimeout(time);
}, 400);
} else {
//
popup.value.close();
selectKey.value = "screen";
select_drawer_ref.value.open();
}
};
const config_ref = ref(null); const config_ref = ref(null);
const configRef = (e) => { const configRef = (e) => {
if (!config_ref.value) { if (!config_ref.value) {
@ -139,17 +227,6 @@ 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({
combo: "",
person: "",
});
const selectShow = () => {
select_active.value = {
combo: combo_active.value,
person: person_active.value,
};
select_drawer_ref.value.open();
};
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {
@ -160,25 +237,26 @@ onShow(() => {
const buyClick = async (item) => { const buyClick = async (item) => {
let query = "?comboId=" + item.combo_id; let query = "?comboId=" + item.combo_id;
if ($props.groupId) { if ($props.groupId) {
// ID // ID
query += "&groupId=" + $props.groupId; query += "&groupId=" + $props.groupId;
} }
// ID // ID
// / // /
uni.navigateTo({ uni.navigateTo({
url: "/pages/main/tj/tjxq" + query, url: "/pages/main/tj/tjxq" + query,
}); });
}; };
const toComboCompare = async (item) => { const toRouter = () => {
for(let i in $store.combo_compare){ if(!comboIds.value.length){
if(!$store.combo_compare[Number(i)]){ uni.showToast({
$store.combo_compare[Number(i)] = item.combo_id; title: "请先选择套餐",
break; icon: "none",
} });
} return
}
uni.navigateTo({ uni.navigateTo({
url: "/pages/buy/contrast/contrast" url: "/pages/main/combo/tcdb",
}); });
}; };
</script> </script>
@ -189,6 +267,24 @@ const toComboCompare = async (item) => {
</view> </view>
<view class="header_wrapper"> <view class="header_wrapper">
<view
@click="toRouter"
class="center fixed pt-10rpx box-border left-40rpx bottom-5% rounded-full w-110rpx h-110rpx bg-#239EA3 flex-col"
>
<uni-badge
:text="comboIds.length"
absolute="rightTop"
size="small"
>
<image
src="@/static/assets/slices/duibi.png"
mode="widthFix"
class="w-42rpx"
/>
</uni-badge>
<text class="text-22rpx text-#fff -mt-5rpx">对比</text>
</view>
<view v-if="!!combo_list.hospital.id" class="hospital_wrapper"> <view v-if="!!combo_list.hospital.id" class="hospital_wrapper">
<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>
@ -200,7 +296,11 @@ const toComboCompare = async (item) => {
<image src="@/static/assets/gengduo@2x.png"></image> <image src="@/static/assets/gengduo@2x.png"></image>
</view> </view>
</view> </view>
<view v-if="!!combo_list.info.name" class="user_wrapper"> <view
v-if="!!combo_list.info.name"
class="user_wrapper"
@click="tabPatients()"
>
<view class="user_title_wrapper">就诊人</view> <view class="user_title_wrapper">就诊人</view>
<view class="user_name_wrapper">{{ combo_list.info.name }}</view> <view class="user_name_wrapper">{{ combo_list.info.name }}</view>
<view v-if="combo_list.info.count > 1" class="user_choose_wrapper"> <view v-if="combo_list.info.count > 1" class="user_choose_wrapper">
@ -208,56 +308,50 @@ const toComboCompare = async (item) => {
</view> </view>
</view> </view>
</view> </view>
<view class="doctor_wrapper"> <view class="relative z-999 pt-10rpx center">
<view class="doctor_tip_wrapper"> <view class="doctor_wrapper">
<text v-if="!!combo_list.doctor.id"></text> <view class="doctor_tip_wrapper">
<text v-else></text> <text v-if="!!combo_list.doctor.id"></text>
</view> <text v-else></text>
<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>
<view class="select_item_line_wrapper"></view> <view class="doctor_name_wrapper">
</view> {{ !!combo_list.doctor.id ? combo_list.doctor.name : "前往选择" }}
<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>
<view class="select_item_line_wrapper"></view> <view class="doctor_tip_wrapper">自动筛选匹配套餐</view>
</view> </view>
</view>
<view class="select_wrapper flex" v-if="selectKey">
<template v-for="(value, key, index) in combo_select" :key="index">
<view
@click="open(key)"
class="flex-1 center text-#2f2f2f text-26rpx line-height-[1]"
v-if="key != 'combo_price' && key != 'combo_item'"
:class="{
'!text-#239EA3': selectKey == key,
}"
>
<view v-if="key == 'sort_list'">
{{ value[sortIndex]?.name || "综合排序" }}
</view>
<view v-if="key == 'combo_type'">
{{ value[comboIndex]?.name || "套餐类型" }}
</view>
<view v-if="key == 'combo_crowd'">
{{ value[crowdIndex]?.name || "适用人群" }}
</view>
<view class="select_item_icon_wrapper">
<image src="@/static/assets/xuanzegengduo@2x.png"></image>
</view>
</view>
</template>
<view <view
@click="selectShow()" @click="open()"
class="select_item_wrapper" :class="{
:class="[!!person_active ? 'active' : '']" '!text-#239EA3': selectKey == 'screen',
}"
class="mx-20rpx center text-#2f2f2f text-26rpx"
> >
<view class="select_item_name_wrapper">{{ <view>筛选</view>
!!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"> <view class="select_item_icon2_wrapper">
<image src="@/static/assets/shaixuan@2x.png"></image> <image src="@/static/assets/shaixuan@2x.png"></image>
</view> </view>
@ -308,7 +402,9 @@ const toComboCompare = async (item) => {
</view> </view>
</view> </view>
<view class="combo_button_wrapper"> <view class="combo_button_wrapper">
<view @click="toComboCompare(i)" class="combo_pick_button_wrapper">对比</view> <view @click="contrastClick(i)" class="combo_pick_button_wrapper">{{
comboIds.includes(i.combo_id) ? "已加入" : "对比"
}}</view>
<view class="combo_buy_button_wrapper" @click="buyClick(i)" <view class="combo_buy_button_wrapper" @click="buyClick(i)"
>预约</view >预约</view
> >
@ -316,54 +412,114 @@ const toComboCompare = async (item) => {
<view class="combo_line_wrapper"></view> <view class="combo_line_wrapper"></view>
</view> </view>
</view> </view>
<uni-popup ref="popup" mask-background-color="transparent">
<view class="pt-260rpx w-full h-100vh" @click="popup.close()">
<view class="bg-[rgba(0,0,0,0.3)] h-100%">
<view
class="bg-#fff"
:class="
selectKey != 'sort_list'
? 'flex pt20rpx px10rpx pb0 box-border flex-wrap'
: ''
"
>
<view
v-for="(val, index) in combo_select[selectKey]"
:key="index"
@click.stop="selectItemClick(index)"
:class="{
'min-w-23% mx-1% mb-20rpx': selectKey != 'sort_list',
}"
>
<uni-list-item v-if="selectKey == 'sort_list'">
<template v-slot:body>
<text
class="text-26rpx"
:class="{
'!text-#239EA3': sortIndex == index,
}"
>{{ val.name }}</text
>
</template>
</uni-list-item>
<view
v-else
class="box-border px-28rpx py-20rpx text-26rpx center line-height-[1] rounded-5rpx"
:class="{
'!bg-#239EA3 !text-#fff':
(selectKey == 'combo_type' && comboIndex == index) ||
(selectKey == 'combo_crowd' && crowdIndex == index),
'!text-#747474 !bg-#e0e0e0':
(selectKey == 'combo_type' && comboIndex != index) ||
(selectKey == 'combo_crowd' && crowdIndex != index),
}"
>{{ val.name }}</view
>
</view>
</view>
</view>
</view>
</uni-popup>
<uni-drawer :ref="selectDrawerRef" mode="right" :mask-click="false"> <uni-drawer :ref="selectDrawerRef" mode="right" :mask-click="false">
<view> <view>
<scroll-view scroll-y="true"> <scroll-view scroll-y="true">
<view> <view>
<view class="select_group_wrapper"> <view class="select_group_wrapper">
<view class="select_group_title_wrapper">套餐类型</view> <view class="text-30rpx bold">套餐价格</view>
<view class="select_group_line_wrapper"> <view class="select_group_line_wrapper mt-20rpx">
<view <view
@click="selectItemClick('combo', '')" v-for="(val, index) in combo_select['combo_price']"
class="select_group_item_wrapper" :key="index"
:class="[select_active.combo === '' ? 'active' : '']" @click.stop="selectItemClick(index, 'combo_price')"
class="min-w-31% mx-1% mb-20rpx"
> >
全部 <view
</view> class="box-border px-20rpx py-20rpx text-22rpx center line-height-[1] rounded-5rpx"
<view :class="{
@click="selectItemClick('combo', i.value)" '!bg-#239EA3 !text-#fff':
class="select_group_item_wrapper" selectKey == 'screen' && priceIndex == index,
v-for="(i, k) in combo_select.combo" '!text-#747474 !bg-#e0e0e0':
:key="k" selectKey == 'screen' && priceIndex != index,
:class="[select_active.combo === i.value ? 'active' : '']" }"
> >{{ val.name }}</view
{{ i.label }} >
</view> </view>
</view> </view>
</view> </view>
<view class="select_group_wrapper"> <view class="select_group_wrapper">
<view class="select_group_title_wrapper">适用人群</view> <view class="text-30rpx bold">适用人群</view>
<view class="select_group_line_wrapper"> <view class="select_group_line_wrapper mt-20rpx">
<view
@click="selectItemClick('person', '')"
class="select_group_item_wrapper"
:class="[select_active.person === '' ? 'active' : '']"
>
全部
</view>
<view <view
@click="selectItemClick('person', i.value)" v-for="(val, index) in combo_select['combo_item']"
class="select_group_item_wrapper" :key="index"
v-for="(i, k) in combo_select.person" @click.stop="selectItemClick(val.id, 'combo_item')"
:key="k" class="min-w-31% mx-1% mb-20rpx"
:class="[select_active.person === i.value ? 'active' : '']"
> >
{{ i.label }} <view
class="box-border px-20rpx py-20rpx text-22rpx center line-height-[1] rounded-5rpx"
:class="{
'!bg-#239EA3 !text-#fff':
selectKey == 'screen' && projectIds.includes(val.id),
'!text-#747474 !bg-#e0e0e0':
selectKey == 'screen' && !projectIds.includes(val.id),
}"
>{{ val.name }}</view
>
</view> </view>
</view> </view>
</view> </view>
<view class="select_done_wrapper" @click="selectDone()"></view> <view class="around">
<view
class="w-40% text-26rpx h-60rpx center rounded-full bg-#239EA3 text-#fff"
@click="remake()"
>重制</view
>
<view
class="w-40% text-26rpx h-60rpx center rounded-full bg-#239EA3 text-#fff"
@click="selectDone()"
>确定</view
>
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -402,11 +558,6 @@ const toComboCompare = async (item) => {
flex-wrap: wrap; flex-wrap: wrap;
} }
.select_group_title_wrapper {
font-size: 30rpx;
font-weight: bold;
}
.select_group_wrapper { .select_group_wrapper {
margin: 20rpx; margin: 20rpx;
} }
@ -593,6 +744,8 @@ const toComboCompare = async (item) => {
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;
position: relative;
z-index: 999;
} }
.select_item_icon_wrapper { .select_item_icon_wrapper {
@ -671,10 +824,9 @@ const toComboCompare = async (item) => {
align-items: center; align-items: center;
width: 710rpx; width: 710rpx;
height: 70rpx; height: 70rpx;
background: #28b7c1; background: #239ea3;
border-radius: 15rpx 15rpx 0rpx 0rpx; border-radius: 15rpx 15rpx 0rpx 0rpx;
padding-left: 24rpx; padding-left: 24rpx;
margin: 10rpx auto 0;
} }
.user_choose_wrapper { .user_choose_wrapper {
@ -723,6 +875,8 @@ const toComboCompare = async (item) => {
height: 100rpx; height: 100rpx;
background: #d8edf2; background: #d8edf2;
margin: 0 auto; margin: 0 auto;
position: relative;
z-index: 999;
} }
.hospital_wrapper { .hospital_wrapper {

@ -0,0 +1,161 @@
<script setup>
/**
* name
* usertcdb
* date2024年9月26日 19:26:00
*/
import { ref } from "vue";
import { $api, $response, $image } from "@/api";
import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store";
const $store = useStore();
let comboIds = ref([]);
const mountedAction = () => {
comboIds.value = $store.getComboContrast() || [];
getdbAxios();
};
const comboInfo = ref(false);
const getdbAxios = async () => {
uni.showLoading({
title: "加载中",
});
let obj = {
combo_ids: $store.getComboContrast(),
};
const response = await $api("ComboCompare", obj);
$response(response, () => {
comboInfo.value = response.data.list || false;
console.log(response.data, "response.data");
uni.hideLoading();
});
};
const clickdb = async () => {
uni.navigateTo({
url: "/pages/buy/contrast/contrast",
});
};
const config_ref = ref(null);
const configRef = (e) => {
if (!config_ref.value) {
config_ref.value = e;
mountedAction();
}
};
const selectClick = (id, status) => {
if (status) {
comboIds.value.splice(comboIds.value.indexOf(id), 1);
$store.setComboContrast(comboIds.value);
getdbAxios();
return
}
if (comboIds.value.includes(id)) {
comboIds.value.splice(comboIds.value.indexOf(id), 1);
} else {
comboIds.value.push(id);
}
};
onShow(() => {
if (!!config_ref.value) {
mountedAction();
}
});
</script>
<template>
<view>
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
<view class="p-20rpx">
<view
style="border-bottom: 1px solid #e1ecee"
class="flex w-full pb-50rpx mt-50rpx relative"
v-for="(obj, f) in comboInfo"
:key="f"
>
<view class="flex flex-items-center pl-10rpx pr-10rpx pt-10rpx">
<uni-icons
@click="selectClick(obj.combo_id)"
:type="
comboIds.includes(obj.combo_id) ? 'checkbox-filled' : 'circle'
"
color="#239EA3"
size="30"
></uni-icons>
</view>
<view
class="w-48rpx h-48rpx rounded-15rpx bg-#F9E7E7 absolute flex flex-items-center flex-justify-center right-50rpx top-30px"
>
<uni-icons
@click="selectClick(obj.combo_id, 1)"
type="trash-filled"
color="#D70F0F"
size="25"
></uni-icons>
</view>
<!-- 1个检套餐 显示套餐信息 -->
<image
v-if="obj.cover"
:src="$image(obj.cover)"
class="w-190rpx h-190rpx mr-37rpx"
mode="widthFix"
/>
<view class="flex flex-col grow">
<text>{{ obj.name }}</text>
<view class="mt-13rpx mb-18rpx">
<uni-tag
v-for="(val, i) in obj.tag"
:key="i"
size="small"
:inverted="true"
:text="val.text"
class="mr-8rpx"
:custom-style="
'background-color:' +
val.color +
';border-color:' +
val.color +
'; color:' +
val.text_color +
';'
"
/>
</view>
<view v-if="obj.tags2?.length">
<text
v-for="(val, i) in obj.tags2"
:key="i"
class="text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-solid b-#8B8B8B"
:class="i == obj.tags2?.length - 1 ? 'b-r-0' : 'b-r-2'"
>{{ val }}</text
>
</view>
<view class="mt-20rpx w-full flex items-end">
<text class="text-18rpx text-#EC3D15">¥</text>
<text class="text-38rpx text-#EC3D15 mx-10rpx -mb-8rpx">{{
obj.price
}}</text>
<text class="text-18rpx text-#878787 line-through">{{
obj.original_price
}}</text>
<text class="text-18rpx text-#878787 ml-auto mr-55rpx"
>已售{{ obj.saleCount }}</text
>
</view>
</view>
</view>
</view>
<view
@click="clickdb"
class="h-110rpx bg-#239EA3 text-#fff text-32rpx flex flex-justify-center flex-items-center absolute bottom-0 w-100%"
>
开始对比
</view>
</view>
</template>
<style scoped></style>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -5,10 +5,11 @@ import {
export const useStore = defineStore('counter', { export const useStore = defineStore('counter', {
state: () => ({ state: () => ({
user: {}, user: {},
tjbgInfo: [],
yytjInfo: {}, yytjInfo: {},
config: false, config: false,
groupInfo: {}, // 团检信息 groupInfo: {}, // 团检信息
combo_compare: [null, null, null], // 套餐对比 combo_compare: [], // 套餐对比
save: { save: {
hospital: 1, hospital: 1,
doctor: 1, doctor: 1,
@ -22,6 +23,21 @@ export const useStore = defineStore('counter', {
buyInfo: {}, // 购买信息接口配置 预约页面使用 别的地方最好不要用 buyInfo: {}, // 购买信息接口配置 预约页面使用 别的地方最好不要用
}), }),
actions: { actions: {
setComboContrast(comboContrast) {
this.combo_compare = comboContrast;
uni.setStorageSync('COMBO_CONTRAST', JSON.stringify(this.comboContrast));
},
getComboContrast(){
return JSON.parse(uni.getStorageSync('COMBO_CONTRAST') || '[]') || this.combo_compare;
},
setTjbgInfo(tjbgInfo) {
this.tjbgInfo = tjbgInfo;
uni.setStorageSync('TJBG_INFO', JSON.stringify(tjbgInfo));
},
getTjbgInfo() {
console.log(uni.getStorageSync('TJBG_INFO'))
return JSON.parse(uni.getStorageSync('TJBG_INFO') || '[]') || this.tjbgInfo;
},
getCheckupTypeId() { getCheckupTypeId() {
return JSON.parse(uni.getStorageSync('CHECKUP_TYPE') || '{}') || this.checkup_type; return JSON.parse(uni.getStorageSync('CHECKUP_TYPE') || '{}') || this.checkup_type;
}, },

@ -15,6 +15,7 @@ export default {
'border-base': 'border border-gray-500_10', 'border-base': 'border border-gray-500_10',
'center': 'flex justify-center items-center', 'center': 'flex justify-center items-center',
'between': 'flex justify-between items-center', 'between': 'flex justify-between items-center',
'around': 'flex justify-around items-center',
}, },
], ],

Loading…
Cancel
Save