diff --git a/Laravel/app/Http/Controllers/API/H5/FenzhenController.php b/Laravel/app/Http/Controllers/API/H5/FenzhenController.php
index 5c4427f..a950cb6 100644
--- a/Laravel/app/Http/Controllers/API/H5/FenzhenController.php
+++ b/Laravel/app/Http/Controllers/API/H5/FenzhenController.php
@@ -13,27 +13,29 @@ class FenzhenController extends Controller
// 这里放 弃检逻辑
return \Yz::Return(true, "弃检成功");
}
+
public function check()
{
// 这里放 检查是否有 体检引导的数据
- $id_number =request('id_number');
- $list=DB::table('orders')->where(['id_number'=>$id_number])->whereIn('status',[2,4])->get();
- return \Yz::Return(true, "弃检成功",['list'=>$list]);
+ $id_number = request('id_number');
+ $list = DB::table('orders')->where(['id_number' => $id_number])->whereIn('status', [2, 4])->get();
+ return \Yz::Return(true, "弃检成功", ['list' => $list]);
}
public function list()
{
- $id =request('id');
- $info=DB::table('orders')->where(['id'=>$id])->whereIn('status',[2,4])->get();
- if(!$info) return \Yz::echoError1("查询就诊人订单失败");
+ $id = request('id');
+ $info = DB::table('orders')->where(['id' => $id])->whereIn('status', [2, 4])->first();
+ if (!$info) return \Yz::echoError1("查询就诊人订单失败");
+ $end_time = date('H:i', strtotime($info->appointment_date . ' ' . $info->appointment_time) + (60 * 60 * 0.54));
return \Yz::Return(true, "获取成功", [
'info' => [
'name' => $info->name,
'sex' => $info->sex,
'combo_name' => $info->title,
'check_date' => $info->appointment_date,
- 'start_time' => $info->appointment_time,
- 'end_time' => '10:25',
+ 'start_time' => $info->appointment_time,
+ 'end_time' => $end_time,
'qrcode' => '',
'code' => $info->appointment_number, // 体检条码
],
@@ -43,18 +45,21 @@ class FenzhenController extends Controller
'status' => 4,
'desc' => '已完成',
'tip' => '体检登记 2024-08-09 08:25:30',
+ 'more' => 0
], [
'time' => '08:30',
'name' => '体格检查',
'status' => 4,
'desc' => '已完成',
'tip' => '体格检查 2024-08-09 08:30:33',
+ 'more' => 0
], [
'time' => '08:50',
'name' => '超声科',
'status' => 2,
'desc' => '第5位,预计等待 11 分钟',
'tip' => '腹部彩超',
+ 'more' => 0
], [
'time' => '09:20',
'name' => '心电图',
@@ -63,36 +68,42 @@ class FenzhenController extends Controller
'tip' => '剩余5项正在排队中,',
'more' => 1
], [
- 'time' => '10:03',
+ 'time' => $end_time,
'name' => '体检结束',
'status' => -1,
- 'desc' => '早餐时间 10:03'
+ 'desc' => '用餐时间 ' . $end_time,
+ 'tip' => '',
+ 'more' => 0
], [
'time' => '',
'name' => '出具报告',
'status' => -1,
- 'desc' => '预计 9月23日 出具体检报告'
+ 'desc' => '预计 9月23日 出具体检报告',
+ 'tip' => '',
+ 'more' => 0
], [
'time' => '',
'name' => '报告解读',
'status' => -1,
- 'desc' => '预计 9月24日 可以预约报告解读'
+ 'desc' => '预计 9月24日 可以预约报告解读',
+ 'tip' => '',
+ 'more' => 0
]],
]);
}
public function info()
{
- $id =request('id');
- $info=DB::table('orders')->where(['id'=>$id])->whereIn('status',[2,4])->get();
- if(!$info) return \Yz::echoError1("查询就诊人订单失败");
+ $id = request('id');
+ $info = DB::table('orders')->where(['id' => $id])->whereIn('status', [2, 4])->get();
+ if (!$info) return \Yz::echoError1("查询就诊人订单失败");
return \Yz::Return(true, "获取成功", [
'info' => [
'name' => $info->name,
'sex' => $info->sex,
'combo_name' => $info->title,
'check_date' => $info->appointment_date,
- 'start_time' => $info->appointment_time,
+ 'start_time' => $info->appointment_time,
'end_time' => '10:25',
'qrcode' => '',
'code' => $info->appointment_number, // 体检条码
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
+
+
+
+
+
+
+
+
+
+ 由于手机上显示体检报告,最多选择两份报告对比!
+
+
+
+
+
+
+
+ {{ item["检前签到时间"]?.split("T").join(" ") }} 体检报告
+
+
+
+
+
+
+
+
+
+
+
+ 选择报告
+
+
+ 报告对比
+
+
+
+
+
+ 结论对比
+
+ 详情对比
+
+
+
+
+
+
+
+
+
+
+ {{ item.r1.date?.split("T")[0] }}
+
+
+ {{ item.r2.date?.split("T")[0] }}
+
+
+
+
+
+ {{ item.r1?.content }}
+
+
+
+ {{
+ item.r2?.icoin
+ }}{{ item.r1?.content }}
+
+
+ *正常范围:{{ item.r1?.desc }}
+
+
+
+
+
+
+ {{ item.r2?.content }}
+
+
+
+ {{
+ item.r2?.icoin
+ }}{{ item.r2?.content }}
+
+
+ *正常范围:{{ item.r2?.desc }}
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+ {{ item["套餐名称"] }}
+ {{ item["团检"] ? "团检" : "个检" }}
+
+
+ 体检人:
+ {{ item["姓名"] }}
+
+
+ 体检时间:
+ {{ item["检前签到时间"]?.split("T").join(" ") }}
+
+
+ 报告编号:
+ {{ item["体检号"] }}
+
+
+ 报告日期:
+ {{ item["报告日期"]?.split("T").join(" ") }}
+
+
+
+ 报告对比
+
+
+
+
+
+
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 }}
+ 初步意见
-
-
-
-
- 未见明显异常 0">
+
+ {{ text }}
+
+
+
-
+
- {{ text }}
-
-
-
-
-
- 162.0
- 身高(cm)
-
-
- 58.8
- 体重(Kg)
+
+
+ {{ text }}
+
+
-
-
-
-
- {{ 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) => {