更新
This commit is contained in:
@@ -274,7 +274,8 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
),
|
||||
];
|
||||
|
||||
if (widget.device['bind_type'] == BindType.active.code && !AppConstants.is_test_account) {
|
||||
if (widget.device['bind_type'] == BindType.active.code &&
|
||||
!AppConstants.is_test_account) {
|
||||
items.addAll([
|
||||
_buildMenuItem(
|
||||
text: "WIFI配置".tr,
|
||||
@@ -413,12 +414,17 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
child: TextFormField(
|
||||
onChanged: (value) {
|
||||
personController.name.value = value;
|
||||
if (value == null || value.isEmpty) {
|
||||
personController.name.value = "体征监测设备".tr;
|
||||
} else {
|
||||
personController.name.value = value;
|
||||
}
|
||||
},
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
hintText: '请输入人员名称'.tr,
|
||||
// hintText: '请输入人员名称'.tr,
|
||||
hintText: "体征监测设备".tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
@@ -447,6 +453,10 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
color: Colors.black,
|
||||
),
|
||||
cursorColor: Colors.white,
|
||||
initialValue: widget.device['person']['name'] == null ||
|
||||
widget.device['person']['name'] == ""
|
||||
? "体征监测设备".tr
|
||||
: widget.device['person']['name'],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -521,14 +531,21 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
// 'TH689564522DL',
|
||||
'${widget.device['person']?['name'] ?? '未命名'.tr}',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
// maxWidth: MediaQuery.sizeOf(context).width - 200.rpx,
|
||||
maxWidth: MediaQuery.sizeOf(context).width * 0.6,
|
||||
),
|
||||
child: Text(
|
||||
'${widget.device['person']?['name'] ?? '未命名'.tr}',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
// ClickableContainer(
|
||||
@@ -1347,7 +1364,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
|
||||
// SizedBox(
|
||||
// width: 20.rpx,
|
||||
// ),
|
||||
|
||||
Reference in New Issue
Block a user