2 İşlemeler 8b3ee18632 ... 5bd930dbdb

Yazar SHA1 Mesaj Tarih
  tongfeng 5bd930dbdb Merge remote-tracking branch 'origin/master' 2 yıl önce
  tongfeng cf44d2fd7f 巡检任务页面 2 yıl önce
1 değiştirilmiş dosya ile 166 ekleme ve 0 silme
  1. 166 0
      lib/page/patrol/patrol_job_page.dart

+ 166 - 0
lib/page/patrol/patrol_job_page.dart

@@ -0,0 +1,166 @@
+//巡检任务列表
+import 'package:deus_app/common/style/TitleBar.dart';
+import 'package:deus_app/common/utils/ConstantString.dart';
+import 'package:deus_app/common/utils/ToastUtils.dart';
+import 'package:flutter/material.dart';
+
+class PatrolJobPage extends StatefulWidget {
+  const PatrolJobPage({super.key});
+
+  @override
+  State createState() {
+    return _PatrolJobPage();
+  }
+}
+
+class _PatrolJobPage extends State<PatrolJobPage> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        appBar: TitleBar().backAppbar(context, "巡检任务"),
+        body: Column(
+          children: [
+            SizedBox(
+              height: 1,
+            ),
+            Container(
+              child: Text(
+                '巡检任务来自于“巡检计划管理”,计划信息请登录pc端查看',
+                style: TextStyle(fontSize: 14, color: Colors.white),
+              ),
+              height: 40,
+              alignment: Alignment.center,
+              decoration: BoxDecoration(
+                color: Colors.blueAccent, //背景色
+              ),
+            ),
+            Expanded(
+                child: Container(
+                    child: ListView.builder(
+              itemCount: 20,
+              itemBuilder: (context, index) {
+                if (index != null) {
+                  return Container(
+                    margin: EdgeInsets.only(top: 12),
+                      color: Colors.white,
+                      child: ListTile(
+                        title: Column(
+                          children: [
+                            SizedBox(
+                              width: 50,
+                            ),
+                            Row(
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              children: [
+                                Container(
+                                  padding: const EdgeInsets.all(10.0),
+                                  alignment: Alignment.centerLeft,
+                                  child: Text(
+                                    '任务名称',
+                                    style: TextStyle(fontSize: 18),
+                                  ),
+                                ),
+                                Container(
+                                  width: 100,
+                                  height: 40,
+                                  alignment: Alignment.center,
+                                  child: Text(
+                                    '已逾期',
+                                    style: TextStyle(
+                                        fontSize: 20, color: Colors.white),
+                                  ),
+                                  decoration: BoxDecoration(
+                                    color: Colors.red, //背景色
+                                    borderRadius:
+                                        BorderRadius.all(Radius.circular(20.0)),
+                                  ),
+                                )
+                              ],
+                            ),
+                            Container(
+                              padding: const EdgeInsets.all(10.0),
+                              alignment: Alignment.centerLeft,
+                              child: Text(
+                                '任务编号:   $index',
+                                style: TextStyle(
+                                  fontSize: 18,
+                                ),
+                              ),
+                            ),
+                            Container(
+                              padding: const EdgeInsets.all(10.0),
+                              alignment: Alignment.centerLeft,
+                              child: Text(
+                                '任务开始时间:   $index',
+                                style: TextStyle(
+                                  fontSize: 18,
+                                ),
+                              ),
+                            ),
+                            Container(
+                              padding: const EdgeInsets.all(10.0),
+                              alignment: Alignment.centerLeft,
+                              child: Text(
+                                '任务结束时间:   $index',
+                                style: TextStyle(
+                                  fontSize: 18,
+                                ),
+                              ),
+                            ),
+                          ],
+                        ),
+                        onTap: () {
+                          debugPrint("你点击了$index");
+                        },
+                      ));
+                } else {
+                  return Container(
+                      margin: EdgeInsets.only(top: 12),
+                      color: Colors.white,
+                      child: ListTile(
+                        title: Column(
+                          children: [
+                            SizedBox(
+                              width: 50,
+                            ),
+                            Row(
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                              children: [
+                                Container(
+                                  padding: const EdgeInsets.all(10.0),
+                                  alignment: Alignment.centerLeft,
+                                  child: Text(
+                                    '任务名称',
+                                    style: TextStyle(fontSize: 18),
+                                  ),
+                                ),
+                                Container(
+                                  width: 100,
+                                  height: 40,
+                                  alignment: Alignment.center,
+                                  child: Text(
+                                    '进行中',
+                                    style: TextStyle(
+                                        fontSize: 20, color: Colors.white70),
+                                  ),
+                                  decoration: BoxDecoration(
+                                    color: Colors.green, //背景色
+                                    borderRadius:
+                                        BorderRadius.all(Radius.circular(20.0)),
+                                  ),
+                                )
+                              ],
+                            ),
+                          ],
+                        ),
+                        onTap: () {
+                          debugPrint("你点击了$index");
+                        },
+                      ));
+                }
+              },
+            )))
+          ],
+        ));
+  }
+}