|
@@ -7,6 +7,7 @@ import 'package:vnoteapp/pages/medical/widgets/blood_sugar.dart';
|
|
|
import 'package:vnoteapp/pages/medical/widgets/body_temperature.dart';
|
|
|
import 'package:vnoteapp/pages/medical/widgets/body_bmi.dart';
|
|
|
import 'package:vnoteapp/pages/medical/widgets/bool_oxygen.dart';
|
|
|
+import 'package:vnoteapp/store/store.dart';
|
|
|
|
|
|
class MedicalPage extends GetView<MedicalController> {
|
|
|
const MedicalPage({super.key});
|
|
@@ -17,85 +18,115 @@ class MedicalPage extends GetView<MedicalController> {
|
|
|
backgroundColor: Colors.white,
|
|
|
// appBar: VAppBar(
|
|
|
// titleWidget: const Text(
|
|
|
- // "诊疗展示",
|
|
|
+ // "健康检测",
|
|
|
// style: TextStyle(fontSize: 24),
|
|
|
// ),
|
|
|
// ),
|
|
|
- body: Row(
|
|
|
+ body: Stack(
|
|
|
children: [
|
|
|
- Column(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: controller.state.medicalMenuList
|
|
|
- .map(
|
|
|
- (e) => Material(
|
|
|
- borderRadius: const BorderRadius.only(
|
|
|
- topRight: Radius.circular(30),
|
|
|
- bottomRight: Radius.circular(30),
|
|
|
- ),
|
|
|
- child: Ink(
|
|
|
- decoration: const BoxDecoration(
|
|
|
- borderRadius: BorderRadius.only(
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ Column(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: controller.state.medicalMenuList
|
|
|
+ .map(
|
|
|
+ (e) => Material(
|
|
|
+ borderRadius: const BorderRadius.only(
|
|
|
topRight: Radius.circular(30),
|
|
|
bottomRight: Radius.circular(30),
|
|
|
),
|
|
|
- ),
|
|
|
- child: InkWell(
|
|
|
- borderRadius: const BorderRadius.only(
|
|
|
- topRight: Radius.circular(30),
|
|
|
- bottomRight: Radius.circular(30),
|
|
|
- ),
|
|
|
- onTap: () {
|
|
|
- controller.state.currentTab = e.key;
|
|
|
- },
|
|
|
- child: Obx(
|
|
|
- () => _SideBar(
|
|
|
- title: e.diagnosticItem,
|
|
|
- isActive: controller.state.currentTab == e.key,
|
|
|
+ child: Ink(
|
|
|
+ decoration: const BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topRight: Radius.circular(30),
|
|
|
+ bottomRight: Radius.circular(30),
|
|
|
),
|
|
|
- )),
|
|
|
- ),
|
|
|
- ),
|
|
|
- )
|
|
|
- .toList(),
|
|
|
- ),
|
|
|
- Container(
|
|
|
- alignment: Alignment.topCenter,
|
|
|
- margin: const EdgeInsets.all(16).copyWith(top: 0),
|
|
|
- child: Image.asset(
|
|
|
- 'assets/images/exam/normalMeasurementChart.png',
|
|
|
- height: double.infinity,
|
|
|
- fit: BoxFit.fitWidth, // 设置图像的适应方式
|
|
|
- ),
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: Stack(
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- padding: const EdgeInsets.all(16),
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- _buildContent(),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ ),
|
|
|
+ child: InkWell(
|
|
|
+ borderRadius: const BorderRadius.only(
|
|
|
+ topRight: Radius.circular(30),
|
|
|
+ bottomRight: Radius.circular(30),
|
|
|
+ ),
|
|
|
+ onTap: () {
|
|
|
+ controller.state.currentTab = e.key;
|
|
|
+ },
|
|
|
+ child: Obx(
|
|
|
+ () => _SideBar(
|
|
|
+ title: e.diagnosticItem,
|
|
|
+ isActive:
|
|
|
+ controller.state.currentTab == e.key,
|
|
|
+ ),
|
|
|
+ )),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ .toList(),
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ alignment: Alignment.topCenter,
|
|
|
+ margin: const EdgeInsets.all(16).copyWith(top: 0),
|
|
|
+ child: Image.asset(
|
|
|
+ 'assets/images/exam/normalMeasurementChart.png',
|
|
|
+ height: double.infinity,
|
|
|
+ fit: BoxFit.fitWidth, // 设置图像的适应方式
|
|
|
),
|
|
|
- Positioned(
|
|
|
- bottom: 100,
|
|
|
- right: 16,
|
|
|
- child: VButton(
|
|
|
- onTap: controller.createDiagnosis,
|
|
|
- child: const Text(
|
|
|
- '保存',
|
|
|
- style: TextStyle(fontSize: 26),
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ padding: const EdgeInsets.all(16),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ _buildContent(),
|
|
|
+ ],
|
|
|
),
|
|
|
- ))
|
|
|
- ],
|
|
|
- ),
|
|
|
- )
|
|
|
+ ),
|
|
|
+ _buildSaveButton(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ _buildGenerateReport(),
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ Widget _buildGenerateReport() {
|
|
|
+ return Positioned(
|
|
|
+ bottom: 100,
|
|
|
+ left: 16,
|
|
|
+ child: VButton(
|
|
|
+ onTap: controller.saveCachedAppDataId,
|
|
|
+ child: const Text(
|
|
|
+ '生成报告',
|
|
|
+ style: TextStyle(fontSize: 26),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget _buildSaveButton() {
|
|
|
+ return Obx(() {
|
|
|
+ if (Store.user.currentSelectPatientInfo == null) {
|
|
|
+ return const SizedBox();
|
|
|
+ }
|
|
|
+ return Positioned(
|
|
|
+ bottom: 100,
|
|
|
+ right: 16,
|
|
|
+ child: VButton(
|
|
|
+ onTap: controller.createDiagnosis,
|
|
|
+ child: const Text(
|
|
|
+ '保存',
|
|
|
+ style: TextStyle(fontSize: 26),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
Widget _buildContent() {
|
|
|
return Obx(() {
|
|
|
switch (controller.state.currentTab) {
|