|
@@ -21,18 +21,31 @@ class BaseInfoCard extends GetView<PatientDetailController> {
|
|
|
Padding(
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
|
|
|
child: Obx(
|
|
|
- () => Column(
|
|
|
- children: [
|
|
|
- const SizedBox(height: 18),
|
|
|
- _buildItem("姓名", state.name),
|
|
|
- _buildItem("性别", state.genderDesc),
|
|
|
- _buildItem("年龄", state.age.toString()),
|
|
|
- _buildItem("电话", state.phoneNo, placeholder: "未填写"),
|
|
|
- _buildItem("身份证", state.cardNo),
|
|
|
- // const SizedBox(height: 8),
|
|
|
- _buildItem("地址", state.address, enableTooltip: true),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ () {
|
|
|
+ if (state.phone == "UNLOAD") {
|
|
|
+ return Container(
|
|
|
+ height: 30 * 6 + 18,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ child: SizedBox(
|
|
|
+ width: 20,
|
|
|
+ height: 20,
|
|
|
+ child: CircularProgressIndicator(),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+ return Column(
|
|
|
+ children: [
|
|
|
+ const SizedBox(height: 18),
|
|
|
+ _buildItem("姓名", state.name),
|
|
|
+ _buildItem("性别", state.genderDesc),
|
|
|
+ _buildItem("年龄", state.age.toString()),
|
|
|
+ _buildItem("电话", state.phone, placeholder: "未填写"),
|
|
|
+ _buildItem("身份证", state.cardNo),
|
|
|
+ // const SizedBox(height: 8),
|
|
|
+ _buildItem("地址", state.address, enableTooltip: true),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ },
|
|
|
),
|
|
|
),
|
|
|
Positioned(
|
|
@@ -93,6 +106,9 @@ class BaseInfoCard extends GetView<PatientDetailController> {
|
|
|
|
|
|
Widget _buildAvatar() {
|
|
|
return Obx(() {
|
|
|
+ if (controller.state.phone == "UNLOAD") {
|
|
|
+ return SizedBox(width: 100, height: 150);
|
|
|
+ }
|
|
|
final url = controller.state.avatarUrl;
|
|
|
Widget image;
|
|
|
if (url != null && url.isNotEmpty) {
|