From 325381e55a4ddeb78c87733c0897df8a8dceff98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=BD=B3=E5=AE=87?= <17601616548@163.com> Date: Sun, 6 Oct 2024 06:26:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=BD=93=E5=91=8A=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=AF=B9=E6=AF=94=EF=BC=8C=E8=B6=8B=E5=8A=BF?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=80=89=E6=8B=A9=E9=A1=B9=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6=E8=B0=83=E6=9F=A5=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=8A=A5=E5=91=8A=EF=BC=8C=E6=8A=A5=E5=91=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E5=A5=97=E9=A4=90=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages.json | 34 +- h5/pages/main/bgcx/bgcx.vue | 11 +- h5/pages/main/bgcx/bgdb/bgdb.vue | 314 ++++++-- h5/pages/main/bgcx/bgdb/xzbg/xzbg.vue | 113 +++ h5/pages/main/bgcx/ckbg/ckbg.vue | 338 ++++---- h5/pages/main/bgcx/qsfx/qsfx.vue | 107 ++- h5/pages/main/bgcx/qsfx/qsfxxq.vue | 59 ++ h5/pages/main/combo/combo.vue | 432 ++++++---- h5/pages/main/combo/tcdb.vue | 161 ++++ h5/pages/main/questionnaire/index.vue | 1075 ++++++++++++------------- h5/static/assets/slices/bgdbadd.png | Bin 0 -> 2240 bytes h5/static/assets/slices/bgjdtb.png | Bin 0 -> 1310 bytes h5/static/assets/slices/duibi.png | Bin 0 -> 1618 bytes h5/store/index.js | 18 +- h5/unocss.config.js | 1 + 15 files changed, 1720 insertions(+), 943 deletions(-) create mode 100755 h5/pages/main/bgcx/bgdb/xzbg/xzbg.vue create mode 100755 h5/pages/main/bgcx/qsfx/qsfxxq.vue create mode 100755 h5/pages/main/combo/tcdb.vue create mode 100755 h5/static/assets/slices/bgdbadd.png create mode 100644 h5/static/assets/slices/bgjdtb.png create mode 100644 h5/static/assets/slices/duibi.png diff --git a/h5/pages.json b/h5/pages.json index 4eee9bf..c21ca3d 100644 --- a/h5/pages.json +++ b/h5/pages.json @@ -1,5 +1,6 @@ { - "pages": [{ + "pages": [ + { "path": "pages/main/index/index", "style": { "navigationBarTitleText": "海南现代妇女儿童医院", @@ -13,6 +14,13 @@ "navigationStyle": "custom" } }, + { + "path": "pages/main/combo/tcdb", + "style": { + "navigationBarTitleText": "套餐对比", + "navigationStyle": "custom" + } + }, { "path": "pages/main/order/order", "style": { @@ -83,7 +91,7 @@ { "path": "pages/main/questionnaire/index", "style": { - "navigationBarTitleText": "问卷调查", + "navigationBarTitleText": "满意度调查", "navigationBarBackgroundColor": "#239EA3", "navigationBarTextStyle": "white" } @@ -115,6 +123,12 @@ "navigationBarTitleText": "报告查询" } }, + { + "path": "pages/main/bgcx/bgdb/xzbg/xzbg", + "style": { + "navigationBarTitleText": "选择体检报告" + } + }, { "path": "pages/main/bgcx/bgjd/bgjd", "style": { @@ -139,6 +153,12 @@ "navigationBarTitleText": "趋势分析" } }, + { + "path": "pages/main/bgcx/qsfx/qsfxxq", + "style": { + "navigationBarTitleText": "" + } + }, { "path": "pages/main/selectDoctor/selectDoctor", "style": { @@ -158,21 +178,21 @@ } }, { - "path": "pages/buy/contrast/contrast", + "path": "pages/user/pick/pick", "style": { - "navigationBarTitleText": "数据对比" + "navigationBarTitleText": "体检引导" } }, { - "path": "pages/user/pick/pick", + "path": "pages/user/fenzhen/fenzhen", "style": { "navigationBarTitleText": "体检引导" } }, { - "path": "pages/user/fenzhen/fenzhen", + "path": "pages/buy/contrast/contrast", "style": { - "navigationBarTitleText": "体检引导" + "navigationBarTitleText": "数据对比" } } ], diff --git a/h5/pages/main/bgcx/bgcx.vue b/h5/pages/main/bgcx/bgcx.vue index 165fa30..052108e 100755 --- a/h5/pages/main/bgcx/bgcx.vue +++ b/h5/pages/main/bgcx/bgcx.vue @@ -29,8 +29,8 @@ const gettjbgInfo = async (index) => { console.log(tabIndex.value); console.log($store, "store"); 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); $response(response, () => { @@ -57,6 +57,7 @@ const routesDeatils = (val) => { const tzroutes = (url) => { // 跳转路径 + $store.setTjbgInfo([]); uni.navigateTo({ url: `/pages/main/bgcx/${url}/${url}`, }); @@ -113,6 +114,12 @@ onShow(() => { @click="gettjbgInfo(1)" :class="tabIndex == 1 ? 'bgcx_fullReport_query_button_active' : ''" class="bgcx_fullReport_query_button" + >已出报告 + 未出报告 diff --git a/h5/pages/main/bgcx/bgdb/bgdb.vue b/h5/pages/main/bgcx/bgdb/bgdb.vue index dd2f9db..f495a47 100755 --- a/h5/pages/main/bgcx/bgdb/bgdb.vue +++ b/h5/pages/main/bgcx/bgdb/bgdb.vue @@ -1,49 +1,265 @@ - - - \ No newline at end of file + + + diff --git a/h5/pages/main/bgcx/bgdb/xzbg/xzbg.vue b/h5/pages/main/bgcx/bgdb/xzbg/xzbg.vue new file mode 100755 index 0000000..b1ce8d8 --- /dev/null +++ b/h5/pages/main/bgcx/bgdb/xzbg/xzbg.vue @@ -0,0 +1,113 @@ + + + diff --git a/h5/pages/main/bgcx/ckbg/ckbg.vue b/h5/pages/main/bgcx/ckbg/ckbg.vue index 57b73b9..e4888e8 100755 --- a/h5/pages/main/bgcx/ckbg/ckbg.vue +++ b/h5/pages/main/bgcx/ckbg/ckbg.vue @@ -28,7 +28,7 @@ const $props = defineProps({ const bgjl_obj = ref(false); const wzbg_list = ref(null); -let tabIndex = ref(0); // 标签索引 +let tabIndex = ref(1); // 标签索引 let currentIndex = ref(0); // 标签索引完整报告 const getBtn = (e) => { @@ -40,7 +40,7 @@ const getList = async () => { console.log(tabIndex.value, "tabIndex"); let obj = { tijian_num: tjhNum.value, // - hospital_id:$store.config.hospital[0].id + hospital_id: $store.save.hospital, }; let url = "GetReportJieLunJianYi"; if (tabIndex.value == 1) { @@ -50,7 +50,11 @@ const getList = async () => { $response(response, () => { console.log(response.data, "response"); if (tabIndex.value == 1) { + for (let key in response.data.list) { + response.data.list[key].isopen = false; + } wzbg_list.value = response.data.list; + console.log(response.data.list); } else { bgjl_obj.value = response.data.info; } @@ -74,15 +78,9 @@ const configRef = (e) => { }; const dqArr = ref([]); const collapseClick = async (e) => { - console.log(e); - let id = ""; //当前id - let itemWithId120 = null; //当前id的对象。itemWithId120['details'] - if (e && e.length > 0) { - id = e[e.length - 1]; - let isHas = dqArr.value.includes(id); - if (isHas) { - return; - } + let id = e; //当前id + let itemWithId120 = null; //当前id的对象 itemWithId120['details'] + if (e) { for (let key in wzbg_list.value) { if ( wzbg_list.value.hasOwnProperty(key) && @@ -92,7 +90,11 @@ const collapseClick = async (e) => { break; // 找到后退出循环 } } - console.log(wzbg_list.value, "wzbg_list", itemWithId120, "itemWithId120"); + // return + if(itemWithId120.hasOwnProperty("details")){ + console.log(itemWithId120["details"], "itemWithId120"); + return + } uni.showLoading({ title: "加载中", }); @@ -102,44 +104,49 @@ const collapseClick = async (e) => { 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; + console.log(itemWithId120["details"], "itemWithId120"); + // itemWithId120.isopen = itemWithId120.isopen + // ? !itemWithId120.isopen + // : true; + itemWithId120.isopen = true; }); uni.hideLoading(); - dqArr.value = e; } }; const getOpenClick = () => { 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 修改,并且请求接口 }; -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; +const calculatePercentage = (value, start, end, maxNum) => { + if (value >= start && value <= end) { + const rangeLength = end - start; + const distanceFromStart = value - start; + const proportion = distanceFromStart / rangeLength; + const percentage = proportion * 50 + 25; + return percentage.toFixed(2); } - if (num > 1) { - num = 1; + if (value < start) { + 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(() => { @@ -269,13 +276,15 @@ onShow(() => { 总检建议 - {{ bgjl_obj.content }} + {{ + bgjl_obj.content + }} - - - + - - {{ item.error_count }} 项异常 - - + + {{ item.error_count }} + 项异常 + + - 初步意见 - - - - - - - 未见明显异常 + + {{ text }} + + + - - - - - - 162.0 - 身高(cm) - - - 58.8 - 体重(Kg) + + - - - - - {{ obj["基础项目名称"] }} - ( {{ obj["结果值单位"] }}) + - {{ obj.minNum }} - 正常 - {{ obj.maxNum }} - - + 58.8 + 体重(Kg) + + --> + + + + {{ obj["基础项目名称"] }} + ( {{ obj["结果值单位"] }}) + + + + - {{ obj["结果值"] }} - - + + {{ obj["结果值范围"][0] }} + 正常 + {{ obj["结果值范围"][1] }} + + + {{ obj["结果值"] }} + + + + + + - - - - - + + + + diff --git a/h5/pages/main/bgcx/qsfx/qsfx.vue b/h5/pages/main/bgcx/qsfx/qsfx.vue index dd2f9db..aba6dab7 100755 --- a/h5/pages/main/bgcx/qsfx/qsfx.vue +++ b/h5/pages/main/bgcx/qsfx/qsfx.vue @@ -1,49 +1,74 @@ - \ No newline at end of file + + + + {{ item.title }} + + + + + + {{ val.name }} + {{ val.desc }} + + + + + + + + + + diff --git a/h5/pages/main/bgcx/qsfx/qsfxxq.vue b/h5/pages/main/bgcx/qsfx/qsfxxq.vue new file mode 100755 index 0000000..7b1784a --- /dev/null +++ b/h5/pages/main/bgcx/qsfx/qsfxxq.vue @@ -0,0 +1,59 @@ + + + diff --git a/h5/pages/main/combo/combo.vue b/h5/pages/main/combo/combo.vue index 28e574c..558d832 100644 --- a/h5/pages/main/combo/combo.vue +++ b/h5/pages/main/combo/combo.vue @@ -19,46 +19,96 @@ const $props = defineProps({ 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; +let popup = ref(null); +let selectKey = ref(""); // 整个选择的key +let sortIndex = ref(0); // 排序的索引 +let comboIndex = ref(null); // 套餐类型索引 +let crowdIndex = ref(null); // 适用人群索引 +let priceIndex = ref(null); // 套餐价格索引 +let projectIds = ref([]); // 项目id集合 +let screenObj = ref({}); // 筛选条件 +let combo_select = ref({}); // 套餐筛选条件 +let comboIds = ref([]); // 套餐对比列表 + +const selectItemClick = async (index, key) => { + // 选择套餐条件 + let data = combo_select.value; + if (selectKey.value == "sort_list") { + if (sortIndex.value == index) { + sortIndex.value = 0; + } else { + sortIndex.value = index; } + 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 = () => { - 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; - } +const selectDone = async () => { + if (priceIndex.value === null) { + delete screenObj.value.combo_price; + } 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 () => { uni.showLoading(); - const response = await $api("ComboSelect"); + const response = await $api("GetComboSort"); uni.hideLoading(); - $response(response, () => { + $response(response, async () => { 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: "", }, }); + const combo_list_computed = computed(() => { let list = []; for (let i in combo_list.value.list) { @@ -104,19 +155,33 @@ const combo_list_computed = computed(() => { }); const getComboList = async () => { uni.showLoading(); - const response = await $api("ComboList", { + let obj = { doctor: $store.save.doctor, hospital: hospital_active.value, - }); + }; + if (screenObj.value) { + obj = Object.assign(obj, screenObj.value); + } + const response = await $api("ComboList", obj); uni.hideLoading(); $response(response, () => { 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 checkHospital = () => { let hospital_id = $store.save.hospital; + comboIds.value = $store.getComboContrast() || []; if (!hospital_id) { hospital_id = $store.config.hospital[0].id; } @@ -127,6 +192,29 @@ const checkHospital = () => { 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 configRef = (e) => { if (!config_ref.value) { @@ -139,17 +227,6 @@ 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) { @@ -160,25 +237,26 @@ onShow(() => { const buyClick = async (item) => { let query = "?comboId=" + item.combo_id; if ($props.groupId) { - // 团检把团检ID加上 + // 团检把团检ID加上 query += "&groupId=" + $props.groupId; } - // 个检只要套餐ID + // 个检只要套餐ID // 预约 跳转到个检/团检套餐详情 uni.navigateTo({ url: "/pages/main/tj/tjxq" + query, }); }; -const toComboCompare = async (item) => { - for(let i in $store.combo_compare){ - if(!$store.combo_compare[Number(i)]){ - $store.combo_compare[Number(i)] = item.combo_id; - break; - } - } +const toRouter = () => { + if(!comboIds.value.length){ + uni.showToast({ + title: "请先选择套餐", + icon: "none", + }); + return + } uni.navigateTo({ - url: "/pages/buy/contrast/contrast" + url: "/pages/main/combo/tcdb", }); }; @@ -189,6 +267,24 @@ const toComboCompare = async (item) => { + + + + + 对比 + + @@ -200,7 +296,11 @@ const toComboCompare = async (item) => { - + 就诊人: {{ combo_list.info.name }} @@ -208,56 +308,50 @@ const toComboCompare = async (item) => { - - - 已根据指定医生: - 可选择指定医生: - - - {{ !!combo_list.doctor.id ? combo_list.doctor.name : "前往选择" }} - - (自动筛选匹配套餐) - - - - 综合排序 - - + + + + 已根据指定医生: + 可选择指定医生: - - - - {{ - !!combo_active ? comboActiveName() : "套餐类型" - }} - - + + {{ !!combo_list.doctor.id ? combo_list.doctor.name : "前往选择" }} - + (自动筛选匹配套餐) + + + - {{ - !!person_active ? personActiveName() : "适用人群" - }} - - - - - - - 筛选 + 筛选 @@ -308,7 +402,9 @@ const toComboCompare = async (item) => { - 对比 + {{ + comboIds.includes(i.combo_id) ? "已加入" : "对比" + }} 预约 @@ -316,54 +412,114 @@ const toComboCompare = async (item) => { - + + + + + + + + + {{ val.name }} + + + + + - 套餐类型 - + 套餐价格 + - 全部 - - - {{ i.label }} + {{ val.name }} - 适用人群 - - - 全部 - + 适用人群 + - {{ i.label }} + {{ val.name }} - 确定 + + 重制 + 确定 + @@ -402,11 +558,6 @@ const toComboCompare = async (item) => { flex-wrap: wrap; } -.select_group_title_wrapper { - font-size: 30rpx; - font-weight: bold; -} - .select_group_wrapper { margin: 20rpx; } @@ -593,6 +744,8 @@ const toComboCompare = async (item) => { background: #f1f7f7; box-shadow: 0rpx -1rpx 1rpx 0rpx rgba(0, 0, 0, 0.1); margin: 0 auto; + position: relative; + z-index: 999; } .select_item_icon_wrapper { @@ -671,10 +824,9 @@ const toComboCompare = async (item) => { align-items: center; width: 710rpx; height: 70rpx; - background: #28b7c1; + background: #239ea3; border-radius: 15rpx 15rpx 0rpx 0rpx; padding-left: 24rpx; - margin: 10rpx auto 0; } .user_choose_wrapper { @@ -723,6 +875,8 @@ const toComboCompare = async (item) => { height: 100rpx; background: #d8edf2; margin: 0 auto; + position: relative; + z-index: 999; } .hospital_wrapper { diff --git a/h5/pages/main/combo/tcdb.vue b/h5/pages/main/combo/tcdb.vue new file mode 100755 index 0000000..d1690e4 --- /dev/null +++ b/h5/pages/main/combo/tcdb.vue @@ -0,0 +1,161 @@ + + + diff --git a/h5/pages/main/questionnaire/index.vue b/h5/pages/main/questionnaire/index.vue index 1829b35..9dca934 100644 --- a/h5/pages/main/questionnaire/index.vue +++ b/h5/pages/main/questionnaire/index.vue @@ -1,558 +1,525 @@