diff --git a/pages/followUp/index.js b/pages/followUp/index.js
index 77c4642..e0d7ed5 100644
--- a/pages/followUp/index.js
+++ b/pages/followUp/index.js
@@ -45,6 +45,13 @@ Page({
},
async getDetail(id){
const res = await request('doctor/patient/questionnaire_info', 'post', {patient_id: 1, questionnaire_id: id})
+ res.liver_function_image = res.liver_function_image ? res.liver_function_image.split(',') : []
+ res.coagulation_function_image = res.coagulation_function_image ? res.coagulation_function_image.split(',') : []
+ res.blood_routine_image = res.blood_routine_image ? res.blood_routine_image.split(',') : []
+ res.nutritional_indicator_image = res.nutritional_indicator_image ? res.nutritional_indicator_image.split(',') : []
+ res.b_mode_image = res.b_mode_image ? res.b_mode_image.split(',') : []
+ res.mdt_image = res.mdt_image ? res.mdt_image.split(',') : []
+
this.setData({
detail: res
})
@@ -58,9 +65,10 @@ Page({
this.getDetail(id)
},
handleImagePreview(e){
- const { mode } = e.currentTarget.dataset;
+ const { mode, index } = e.currentTarget.dataset;
this.setData({
- imageList: this.data.detail[mode].split(',').filter(el => el !== ''),
+ imageList: this.data.detail[mode],
+ imageIndex: index,
imageVisible: true
})
},
diff --git a/pages/followUp/index.wxml b/pages/followUp/index.wxml
index 60d67fe..9425720 100644
--- a/pages/followUp/index.wxml
+++ b/pages/followUp/index.wxml
@@ -43,22 +43,13 @@
肝功能
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
+
+
+
+ + {{detail.liver_function_image.length - 3}}
+
@@ -98,20 +89,11 @@
凝血功能
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
+
+
+
+
+ + {{detail.coagulation_function_image.length - 3}}
@@ -161,20 +143,11 @@
血常规
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
+
+
+
+
+ + {{detail.blood_routine_image.length - 3}}
@@ -201,20 +174,11 @@
营养指标
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
+
+
+
+
+ + {{detail.nutritional_indicator_image.length - 3}}
@@ -248,20 +212,11 @@
B超
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
+
+
+
+
+ + {{detail.b_mode_image.length - 3}}
@@ -331,20 +286,11 @@
MDT 电子病历
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
+
+
+
+
+ + {{detail.mdt_image.length - 3}}