瀏覽代碼

1、人群分类和签约状态新增权限

guanxinyi 1 年之前
父節點
當前提交
5625707d55

+ 6 - 0
lib/architecture/values/features.dart

@@ -36,4 +36,10 @@ class FeatureKeys {
 
   ///离线身份证识别操作
   static const IdCardOfflineRecognition = 'LXSFZSB';
+
+  /// 人群分类
+  static const CrowdClassification = 'RQFL';
+
+  /// 签约状态
+  static const ContractStatus = 'QYZT';
 }

+ 0 - 1
lib/pages/check/widgets/configurable_card.dart

@@ -3,7 +3,6 @@ import 'dart:convert';
 import 'package:fis_jsonrpc/rpc.dart';
 import 'package:flutter/material.dart';
 import 'package:get/get.dart';
-import 'package:vitalapp/architecture/utils/prompt_box.dart';
 import 'package:vitalapp/components/button.dart';
 import 'package:vitalapp/components/dialog_input.dart';
 import 'package:vitalapp/components/dialog_number.dart';

+ 1 - 1
lib/pages/patient/detail/state.dart

@@ -73,7 +73,7 @@ class PatientDetailState {
   /// 人群分类名称集合
   List<String>? get labelNames => _dto.value.labelNames;
 
-  List<String>? get crowdLabels => _dto.value.crowdLabels;
+  List<String> get crowdLabels => _dto.value.crowdLabels ?? [];
 
   /// 签约医生
   String get contractedDoctorName => _dto.value.contractedDoctorName!;

+ 11 - 6
lib/pages/patient/detail/view.dart

@@ -46,12 +46,17 @@ class PatientDetailPage extends GetView<PatientDetailController> {
                           );
                         },
                       ),
-
-                    // Expanded(
-                    //   child: CrowdLabelsCard(),
-                    // ),
-                    // SizedBox(height: 12),
-                    // Expanded(child: FollowupTipsCard()),
+                    if (Store.user
+                        .hasFeature(FeatureKeys.CrowdClassification)) ...[
+                      const SizedBox(height: 12),
+                      const Expanded(
+                        child: CrowdLabelsCard(),
+                      ),
+                    ],
+                    if (Store.user.hasFeature(FeatureKeys.ContractStatus)) ...[
+                      const SizedBox(height: 12),
+                      const Expanded(child: FollowupTipsCard()),
+                    ]
                   ],
                 ),
               ),