|
@@ -21,6 +21,7 @@ import 'package:vitalapp/managers/interfaces/exam.dart';
|
|
|
import 'package:vitalapp/managers/interfaces/models/patient_model_dto.dart';
|
|
|
import 'package:vitalapp/pages/home/controller.dart';
|
|
|
import 'package:vitalapp/pages/patient/list/widgets/status.dart';
|
|
|
+import 'package:vitalapp/pages/widgets/icon_button.dart';
|
|
|
import 'package:vitalapp/store/store.dart';
|
|
|
|
|
|
import 'controller.dart';
|
|
@@ -245,63 +246,7 @@ class _HeaderWidget extends GetView<PatientListController> {
|
|
|
_HeaderWidget({
|
|
|
required this.onFilterPressed,
|
|
|
});
|
|
|
- Widget _buildIconButton(
|
|
|
- IconData iconData,
|
|
|
- String textString,
|
|
|
- VoidCallback voidCallback,
|
|
|
- ) {
|
|
|
- return Material(
|
|
|
- child: InkWell(
|
|
|
- onTap: () => voidCallback.call(),
|
|
|
- child: Container(
|
|
|
- margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- Icon(
|
|
|
- iconData,
|
|
|
- size: 38,
|
|
|
- ),
|
|
|
- Text(textString),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- // VSideNavMenuItem _buildCreateManualRecord() {
|
|
|
- // return VSideNavMenuItem(
|
|
|
- // title: "手动建档",
|
|
|
- // icon: Icon(Icons.edit_document, color: Colors.grey.shade700),
|
|
|
- // pageBuilder: (_) => _buildInterval(
|
|
|
- // PatientInfo(),
|
|
|
- // ),
|
|
|
- // );
|
|
|
- // }
|
|
|
-
|
|
|
- // VSideNavMenuItem _buildIDReaderRecord() {
|
|
|
- // return VSideNavMenuItem(
|
|
|
- // title: "读卡建档",
|
|
|
- // icon: Icon(Icons.chrome_reader_mode, color: Colors.grey.shade700),
|
|
|
- // onTap: () {
|
|
|
- // controller.onReadCardClicked();
|
|
|
- // },
|
|
|
- // );
|
|
|
- // }
|
|
|
|
|
|
- // VSideNavMenuItem _buildScanIdCardRecord() {
|
|
|
- // return VSideNavMenuItem(
|
|
|
- // title: "身份证识别建档",
|
|
|
- // icon: Icon(Icons.perm_contact_cal_rounded, color: Colors.grey.shade700),
|
|
|
- // onTap: () {
|
|
|
- // if (!kIsOnline) {
|
|
|
- // PromptBox.toast("当前为离线模式,不支持此功能");
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // controller.onIdCardScanClicked();
|
|
|
- // },
|
|
|
- // );
|
|
|
- // }
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
return SizedBox(
|
|
@@ -310,48 +255,64 @@ class _HeaderWidget extends GetView<PatientListController> {
|
|
|
children: [
|
|
|
_PatientStatisticWidget(),
|
|
|
if (Store.user.hasFeature(FeatureKeys.FaceRecognition))
|
|
|
- _buildIconButton(Icons.sensor_occupied, '人脸识别', () {
|
|
|
- if (!kIsOnline) {
|
|
|
- PromptBox.toast("当前为离线模式,不支持此功能");
|
|
|
- return;
|
|
|
- }
|
|
|
- advanceDebounce(
|
|
|
- controller.onFaceIdLoginClicked,
|
|
|
- "PatientList.OnFaceIdLoginClicked",
|
|
|
- 1500,
|
|
|
- );
|
|
|
- }),
|
|
|
- if (Store.user.hasFeature(FeatureKeys.IdCardPhotoOCR))
|
|
|
- _buildIconButton(Icons.perm_contact_cal_rounded, '拍照识别', () {
|
|
|
- if (!Store.user
|
|
|
- .hasFeature(FeatureKeys.IdCardOfflineRecognition)) {
|
|
|
+ VIconButton(
|
|
|
+ iconData: Icons.sensor_occupied,
|
|
|
+ textString: '人脸识别',
|
|
|
+ voidCallback: () {
|
|
|
if (!kIsOnline) {
|
|
|
PromptBox.toast("当前为离线模式,不支持此功能");
|
|
|
return;
|
|
|
}
|
|
|
- }
|
|
|
+ advanceDebounce(
|
|
|
+ controller.onFaceIdLoginClicked,
|
|
|
+ "PatientList.OnFaceIdLoginClicked",
|
|
|
+ 1500,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ if (Store.user.hasFeature(FeatureKeys.IdCardPhotoOCR))
|
|
|
+ VIconButton(
|
|
|
+ iconData: Icons.perm_contact_cal_rounded,
|
|
|
+ textString: '拍照识别',
|
|
|
+ voidCallback: () {
|
|
|
+ if (!Store.user
|
|
|
+ .hasFeature(FeatureKeys.IdCardOfflineRecognition)) {
|
|
|
+ if (!kIsOnline) {
|
|
|
+ PromptBox.toast("当前为离线模式,不支持此功能");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- advanceDebounce(
|
|
|
- controller.onIdCardScanClickedToDetail,
|
|
|
- "PatientList.OnIdCardScanClickedToDetail",
|
|
|
- 1500,
|
|
|
- );
|
|
|
- }),
|
|
|
+ advanceDebounce(
|
|
|
+ controller.onIdCardScanClickedToDetail,
|
|
|
+ "PatientList.OnIdCardScanClickedToDetail",
|
|
|
+ 1500,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ ),
|
|
|
if (Store.user.hasFeature(FeatureKeys.IDCardReader))
|
|
|
- _buildIconButton(Icons.chrome_reader_mode, '读卡识别', () {
|
|
|
+ VIconButton(
|
|
|
+ iconData: Icons.chrome_reader_mode,
|
|
|
+ textString: '读卡识别',
|
|
|
+ voidCallback: () {
|
|
|
+ advanceDebounce(
|
|
|
+ controller.onReadCardClickedToDetail,
|
|
|
+ "PatientList.OnReadCardClickedToDetail",
|
|
|
+ 1500,
|
|
|
+ );
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ VIconButton(
|
|
|
+ iconData: Icons.edit_document,
|
|
|
+ textString: '手动录入',
|
|
|
+ voidCallback: () {
|
|
|
advanceDebounce(
|
|
|
- controller.onReadCardClickedToDetail,
|
|
|
- "PatientList.OnReadCardClickedToDetail",
|
|
|
+ controller.onManualInputPatient,
|
|
|
+ "PatientList.OnManualInputPatient",
|
|
|
1500,
|
|
|
);
|
|
|
- }),
|
|
|
- _buildIconButton(Icons.edit_document, '手动录入', () {
|
|
|
- advanceDebounce(
|
|
|
- controller.onManualInputPatient,
|
|
|
- "PatientList.OnManualInputPatient",
|
|
|
- 1500,
|
|
|
- );
|
|
|
- }),
|
|
|
+ },
|
|
|
+ ),
|
|
|
Expanded(
|
|
|
child: SizedBox(
|
|
|
height: 70,
|