|
@@ -12,12 +12,14 @@ import 'package:vitalapp/components/dialog_date.dart';
|
|
|
import 'package:vitalapp/components/dynamic_drawer.dart';
|
|
|
import 'package:vitalapp/components/input.dart';
|
|
|
import 'package:vitalapp/components/search_input.dart';
|
|
|
+import 'package:vitalapp/components/tag_widget.dart';
|
|
|
import 'package:vitalapp/consts/rpc_enum_labels.dart';
|
|
|
import 'package:vitalapp/consts/styles.dart';
|
|
|
import 'package:vitalapp/global.dart';
|
|
|
import 'package:vitalapp/managers/contract/index.dart';
|
|
|
import 'package:vitalapp/managers/interfaces/diagnosis.dart';
|
|
|
import 'package:vitalapp/managers/interfaces/exam.dart';
|
|
|
+import 'package:vitalapp/managers/interfaces/models/crowd_labels.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';
|
|
@@ -389,12 +391,14 @@ class _PatientCard extends StatelessWidget {
|
|
|
return SizedBox(width: width, child: _buildBaseInfoRow());
|
|
|
},
|
|
|
),
|
|
|
- const SizedBox(height: 8),
|
|
|
- //Expanded(child: _buildClassTags()),
|
|
|
- _buildClassTags(),
|
|
|
+ const SizedBox(height: 4),
|
|
|
_buildPhone(),
|
|
|
const SizedBox(height: 4),
|
|
|
_buildCardNo(),
|
|
|
+ if (dto.labelNames?.isNotEmpty ?? false) ...[
|
|
|
+ const Expanded(child: SizedBox()),
|
|
|
+ _buildClassTags(),
|
|
|
+ ],
|
|
|
],
|
|
|
),
|
|
|
),
|
|
@@ -481,11 +485,26 @@ class _PatientCard extends StatelessWidget {
|
|
|
minWidth: double.infinity,
|
|
|
maxHeight: 50,
|
|
|
),
|
|
|
- child: Text(
|
|
|
- dto.labelNames?.join('、') ?? '',
|
|
|
- style: const TextStyle(color: Colors.grey, fontSize: 18),
|
|
|
- maxLines: 2,
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
+ child: Row(
|
|
|
+ children: dto.labelNames!
|
|
|
+ .map(
|
|
|
+ (e) => TagWidget(
|
|
|
+ label: e,
|
|
|
+ borderColor:
|
|
|
+ (e == CrowdLabels.CHILDREN || e == CrowdLabels.ELDERLY)
|
|
|
+ ? Colors.blue
|
|
|
+ : Colors.orange,
|
|
|
+ backgroundColor: Colors.transparent,
|
|
|
+ textColor: Colors.black,
|
|
|
+ padding: EdgeInsets.only(
|
|
|
+ top: 2,
|
|
|
+ bottom: 2,
|
|
|
+ right: 8,
|
|
|
+ left: 4,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ .toList(),
|
|
|
),
|
|
|
),
|
|
|
],
|