Commit e7d1e4e34e6f6574edff2eea23d245d127b9b451

Authored by “gaiyaguang”
1 parent ea4333cc

uiui

... ... @@ -366,7 +366,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(84),
height: ScreenUtil().setWidth(84),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
... ...
... ... @@ -400,7 +400,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
child: Container(
// color: Colors.red,
// height: ScreenUtil().setHeight(178),
height: ScreenUtil().setHeight(180),
height: ScreenUtil().setWidth(185),
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext contxt, int index) {
... ... @@ -773,7 +773,6 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
height: 84,
fontSize: 34,
content: "确定修改",
fontWeight: FontWeight.bold,
state: 2,
onPress: () async {
String name =
... ...
... ... @@ -111,7 +111,6 @@ class MessageItem extends StatelessWidget {
width: 152,
height: 50,
fontSize: 30,
fontWeight: FontWeight.bold,
content:message.message_type=="10"?"立即处理":"立即查看",
state: 1,
onPress: () {
... ...
... ... @@ -64,7 +64,7 @@ class NotebookItemState extends State<NoteBookItem> {
notebook.tableinfoStr?.trim(),
style: TextStyle(
color: textColor,
fontWeight: FontWeight.bold,
// fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
),
... ... @@ -83,7 +83,7 @@ class NotebookItemState extends State<NoteBookItem> {
notebook.rnameStr,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.bold,
// fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
VEmptyView(10),
... ... @@ -91,7 +91,7 @@ class NotebookItemState extends State<NoteBookItem> {
notebook.phoneStr,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.bold,
// fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(26)),
)
],
... ... @@ -109,7 +109,7 @@ class NotebookItemState extends State<NoteBookItem> {
notebook.ddateStr,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.bold,
// fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
),
... ... @@ -134,7 +134,7 @@ class NotebookItemState extends State<NoteBookItem> {
notebook.status == "6")
? MyColours.color_bfbfbf
: MyColours.color_2bb5b7,
fontWeight: FontWeight.bold,
// fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
),
... ...
... ... @@ -80,7 +80,7 @@ class CommonButton extends StatelessWidget {
onTap: onPress,
child: Container(
width: ScreenUtil().setWidth(width),
height: ScreenUtil().setHeight(height),
height: ScreenUtil().setWidth(height),
decoration: boxDecoration,
child: Align(
alignment: Alignment.center,
... ...
... ... @@ -5,15 +5,15 @@ import 'package:one_key/res/colors.dart';
import 'package:one_key/models/table.dart' as t;
import 'package:one_key/widgets/v_empty_view.dart';
class NeedItem extends StatefulWidget{
class NeedItem extends StatefulWidget {
final t.Table table;
final bool canSelected;//是否能选中
final bool canSelected; //是否能选中
final ValueChanged onSelected;
final int height;//高度
final int height; //高度
NeedItem(this.table,{this.onSelected,this.canSelected=false,this.height=183});
NeedItem(this.table,
{this.onSelected, this.canSelected = false, this.height = 183});
@override
State<StatefulWidget> createState() {
... ... @@ -22,19 +22,18 @@ class NeedItem extends StatefulWidget{
}
}
class NeedItemState extends State<NeedItem>{
class NeedItemState extends State<NeedItem> {
@override
Widget build(BuildContext context) {
// TODO: implement build
t.Table table=widget.table;
t.Table table = widget.table;
return GestureDetector(
onTap: (){
if(widget.canSelected&&table.signStr.isEmpty){
onTap: () {
if (widget.canSelected && table.signStr.isEmpty) {
setState(() {
table.selected=!(table.selected??false);
table.selected = !(table.selected ?? false);
});
widget.onSelected(table);
}
... ... @@ -42,44 +41,68 @@ class NeedItemState extends State<NeedItem>{
child: Stack(
children: <Widget>[
Container(
width: ScreenUtil().setWidth(190),
height: ScreenUtil().setWidth(widget.height),
alignment: Alignment.center,
margin:EdgeInsets.all( ScreenUtil().setWidth(9)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))
),
child:Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(table.name,style: TextStyle(color: MyColours.color_131313,fontSize: ScreenUtil().setSp(30),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
Offstage(
offstage: table.maxText.isEmpty?true:false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
VEmptyView(5),
Text(table.maxText,style: TextStyle(color: MyColours.color_777777,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
],
width: ScreenUtil().setWidth(190),
height: ScreenUtil().setWidth(widget.height),
alignment: Alignment.center,
margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(8)))),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
table.name,
style: TextStyle(
color: MyColours.color_131313,
fontSize: ScreenUtil().setSp(30),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
),
),
Offstage(
offstage: table.lowStr.isEmpty?true:false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
VEmptyView(5),
Text(table.lowStr,style: TextStyle(color: MyColours.color_2bb5b7,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,)
],
Offstage(
offstage: table.maxText.isEmpty ? true : false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
VEmptyView(5),
Text(
table.maxText,
style: TextStyle(
color: MyColours.color_777777,
fontSize: ScreenUtil().setSp(26),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
),
],
),
),
)
],
)
),
Offstage(
offstage: table.lowStr.isEmpty ? true : false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
VEmptyView(5),
Text(
table.lowStr,
textAlign: TextAlign.center,
style: TextStyle(
color: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
)
],
),
)
],
)),
],
),
);
}
}
\ No newline at end of file
}
... ...
... ... @@ -16,7 +16,7 @@ class NewTableItem extends StatefulWidget {
NewTableItem(this.table,
{this.onSelected,
this.canSelected = false,
this.height = 180,
this.height = 185,
this.isRegionName = false});
@override
... ... @@ -47,7 +47,7 @@ class NewTableItemState extends State<NewTableItem> {
Container(
width: ScreenUtil().setWidth(160),
height: ScreenUtil().setWidth(widget.height),
margin: EdgeInsets.only(left:ScreenUtil().setWidth(40)),
margin: EdgeInsets.only(left: ScreenUtil().setWidth(40)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(
... ... @@ -84,7 +84,7 @@ class NewTableItemState extends State<NewTableItem> {
Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24)),
horizontal: ScreenUtil().setWidth(20)),
// margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
child: Column(
mainAxisSize: MainAxisSize.min,
... ... @@ -92,17 +92,39 @@ class NewTableItemState extends State<NewTableItem> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
VEmptyView(38),
Text(
table.name,
maxLines: 2,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
),
VEmptyView(12),
Container(
alignment: Alignment.center,
child: Transform.translate(
offset:
Offset(0, 1 / 2), //1为 StrutStyle 的 leading的值
child: Text(
table.name,
maxLines: 2,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.2),
),
)
),
// Text(
// table.name,
// maxLines: 2,
// style: TextStyle(
// color: MyColours.color_353535,
// fontSize: ScreenUtil().setSp(28),
// decoration: TextDecoration.none,
// fontWeight: FontWeight.normal),
// overflow: TextOverflow.ellipsis,
// ),
VEmptyView(8),
Text(
(table.reserver == null || table.reserver.isEmpty)
? '${table.tablePnum}人'
... ...
... ... @@ -19,7 +19,7 @@ class TableItem extends StatefulWidget {
TableItem(this.table,
{this.onSelected,
this.canSelected = false,
this.height = 180,
this.height = 185,
this.canChoose = false,
this.rid,
this.tableMap});
... ... @@ -118,7 +118,7 @@ class TableItemState extends State<TableItem> {
Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24)),
horizontal: ScreenUtil().setWidth(20)),
// margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
child: Column(
mainAxisSize: MainAxisSize.min,
... ... @@ -126,19 +126,43 @@ class TableItemState extends State<TableItem> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
VEmptyView(38),
Text(
table.name,
maxLines: 2,
style: TextStyle(
color: table.signStr == '已停用'
? MyColours.color_999999
: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
),
VEmptyView(12),
Container(
alignment: Alignment.center,
child: Transform.translate(
offset:
Offset(0, 1 / 2), //1为 StrutStyle 的 leading的值
child: Text(
table.name,
maxLines: 2,
style: TextStyle(
color: table.signStr == '已停用'
? MyColours.color_999999
: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.2),
),
)
// Text(
// table.name,
// // textAlign: TextAlign.center,
// maxLines: 2,
// style: TextStyle(
// color: table.signStr == '已停用'
// ? MyColours.color_999999
// : MyColours.color_353535,
// fontSize: ScreenUtil().setSp(28),
// decoration: TextDecoration.none,
// fontWeight: FontWeight.normal),
// overflow: TextOverflow.ellipsis,
// ),
),
VEmptyView(6),
Text(
(table.reserver == null || table.reserver.isEmpty)
? table.tableNum
... ...