Jelajahi Sumber

jsonToDart依赖 巡检任务列表 详情页面

tongfeng 2 tahun lalu
induk
melakukan
36f8426436

+ 5 - 0
lib/common/utils/ConstantString.dart

@@ -9,6 +9,11 @@ class ConstantString {
 
   static const String deviceManageText = "设备管理";
 
+  static const String patrolJobText = "巡检任务";
+
+  static const String patrolJobTitle = "巡检任务来自于'巡检计划管理',计划信息请登录pc端查看";
+
+
   static const String loadingText = "努力加载中···";
 
   static const String loginText = "登录";

+ 5 - 12
lib/generated/json/base/json_convert_content.dart

@@ -3,13 +3,16 @@
 // ignore_for_file: prefer_single_quotes
 
 import 'package:deus_app/generated/json/login_response_entity_helper.dart';
-import 'package:deus_app/generated/json/patrol_job_detail_response_entity_helper.dart';
 import 'package:deus_app/generated/json/user_response_entity_helper.dart';
 import 'package:deus_app/model/login_response_entity.dart';
-import 'package:deus_app/model/patrol_job_detail_response_entity.dart';
+import 'package:deus_app/model/user_response_entity.dart';
+import 'package:deus_app/model/patrol_response_entity.dart';
 // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
 import 'package:deus_app/model/user_response_entity.dart';
 
+import '../../../model/patrol_job_detail_response_entity.dart';
+import '../patrol_job_detail_response_entity_helper.dart';
+
 class JsonConvert<T> {
 	T fromJson(Map<String, dynamic> json) {
 		return _getFromJson<T>(runtimeType, this, json);
@@ -35,8 +38,6 @@ class JsonConvert<T> {
 				return loginResponseDataFromJson(data as LoginResponseData, json) as T;
 			case LoginResponseDataUser:
 				return loginResponseDataUserFromJson(data as LoginResponseDataUser, json) as T;
-			case PatrolJobDetailResponseEntity:
-				return patrolJobDetailResponseEntityFromJson(data as PatrolJobDetailResponseEntity, json) as T;
 			case PatrolJobDetailResponseData:
 				return patrolJobDetailResponseDataFromJson(data as PatrolJobDetailResponseData, json) as T;
 			case PatrolJobDetailResponseDataList:
@@ -62,8 +63,6 @@ class JsonConvert<T> {
 				return loginResponseDataToJson(data as LoginResponseData);
 			case LoginResponseDataUser:
 				return loginResponseDataUserToJson(data as LoginResponseDataUser);
-			case PatrolJobDetailResponseEntity:
-				return patrolJobDetailResponseEntityToJson(data as PatrolJobDetailResponseEntity);
 			case PatrolJobDetailResponseData:
 				return patrolJobDetailResponseDataToJson(data as PatrolJobDetailResponseData);
 			case PatrolJobDetailResponseDataList:
@@ -97,9 +96,6 @@ class JsonConvert<T> {
 		if(type == (LoginResponseDataUser).toString()){
 			return LoginResponseDataUser().fromJson(json);
 		}
-		if(type == (PatrolJobDetailResponseEntity).toString()){
-			return PatrolJobDetailResponseEntity().fromJson(json);
-		}
 		if(type == (PatrolJobDetailResponseData).toString()){
 			return PatrolJobDetailResponseData().fromJson(json);
 		}
@@ -136,9 +132,6 @@ class JsonConvert<T> {
 		if(<LoginResponseDataUser>[] is M){
 			return data.map<LoginResponseDataUser>((e) => LoginResponseDataUser().fromJson(e)).toList() as M;
 		}
-		if(<PatrolJobDetailResponseEntity>[] is M){
-			return data.map<PatrolJobDetailResponseEntity>((e) => PatrolJobDetailResponseEntity().fromJson(e)).toList() as M;
-		}
 		if(<PatrolJobDetailResponseData>[] is M){
 			return data.map<PatrolJobDetailResponseData>((e) => PatrolJobDetailResponseData().fromJson(e)).toList() as M;
 		}

+ 1 - 1
lib/model/drop_menu_item.dart

@@ -1,7 +1,7 @@
 import 'package:deus_app/generated/json/base/json_convert_content.dart';
 
 class DropMenuItem extends JsonConvert<DropMenuItem>{
-  late String label;
+  late dynamic label;
   late dynamic value;
   DropMenuItem(this.label,this.value);
 }

+ 56 - 0
lib/model/patrol_response_entity.dart

@@ -1,4 +1,16 @@
 import 'package:deus_app/generated/json/base/json_convert_content.dart';
+import 'package:json2dart_safe/json2dart.dart';
+
+class PatrolJobDataResponseEntity with JsonConvert<PatrolJobDataResponseEntity>{
+  late int code;
+  late PatrolJobDataVO data;
+  late String msg;
+}
+
+class PatrolJobDataVO with JsonConvert<PatrolJobDataVO>{
+  late PatrolJobData query;
+  late List<PatrolJobData> list;
+}
 
 class PatrolJobDetailResponseEntity with JsonConvert<PatrolJobDetailResponseEntity>{
   late int code;
@@ -58,3 +70,47 @@ class PatrolJobImageData with JsonConvert<PatrolJobImageData>{
   PatrolJobImageData(this.id,this.url);
 }
 
+
+/**
+ * 巡检任务列表数据
+ */
+class PatrolJobData{
+  String? name;
+  String? number;
+  int? count;
+  String? planName;
+  String? planNumber;
+  int? termType;
+  String? startDate;
+  String? endDate;
+  int? status;
+
+  PatrolJobData({this.name,this.number,this.count,this.planName,this.planNumber,this.termType,this.startDate,this.endDate,this.status,});
+
+  Map<String, dynamic> toJson() {
+    return Map<String, dynamic>()
+      ..put('name',this.name)
+      ..put('number',this.number)
+      ..put('count',this.count)
+      ..put('planName',this.planName)
+      ..put('planNumber',this.planNumber)
+      ..put('termType',this.termType)
+      ..put('startDate',this.startDate)
+      ..put('endDate',this.endDate)
+      ..put('status',this.status);
+  }
+
+  PatrolJobData.fromJson(Map<String, dynamic> json) {
+    this.name=json.asString('name');
+    this.number=json.asString('number');
+    this.count=json.asInt('count');
+    this.planName=json.asString('planName');
+    this.planNumber=json.asString('planNumber');
+    this.termType=json.asInt('termType');
+    this.startDate=json.asString('startDate');
+    this.endDate=json.asString('endDate');
+    this.status=json.asInt('status');
+  }
+
+  static PatrolJobData toBean(Map<String, dynamic> json) => PatrolJobData.fromJson(json);
+}

+ 1 - 1
lib/page/login/login_page.dart

@@ -37,7 +37,7 @@ class _LoginPageState extends State<LoginPage> {
   //TextEditingController可以使用 text 属性指定初始值
   final TextEditingController _usernameController = TextEditingController();
   final TextEditingController _passwordController = TextEditingController();
-  String _username = '18179442077', _password = '123456';
+  String _username = '17659896868', _password = '123456';
 
   @override
   Widget build(BuildContext context) {

+ 5 - 52
lib/page/patrol/patrol_job_detail.dart

@@ -67,7 +67,6 @@ DropMenuItem girl = DropMenuItem('女', 2);
 
 List<DropMenuItem> sexMenuItems = [boy,girl];
 List<String> sexSelects = ['男','女','奥特曼'];
-DropMenuItem sexSelect = DropMenuItem('男',1);
 class _PatrolJobDetail extends State<PatrolJobDetail> {
 
 
@@ -88,12 +87,11 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
 
   List<Widget> _Ws() {
     List<Widget> ws = [];
-    // ws.add(_patrolJobDetail(patrolJobDetailData));
-    // ws.add(_device());
-    // ws.add(_item());
-    // ws.add(_remark());
-    // ws.add(_url());
-    ws.add(dropDownButtonsColumn(sexMenuItems,'性别',sexSelect));
+    ws.add(_patrolJobDetail(patrolJobDetailData));
+    ws.add(_device());
+    ws.add(_item());
+    ws.add(_remark());
+    ws.add(_url());
     return ws;
   }
 
@@ -368,49 +366,4 @@ class _PatrolJobDetail extends State<PatrolJobDetail> {
         child: Image.network(imageData.url));
   }
 
-  Widget dropDownButtonsColumn(List<DropMenuItem> list, String hint,DropMenuItem select){
-    return Padding(
-      padding: const EdgeInsets.only(left: 40, right: 40 , bottom: 24,top:12),
-      child: Container(
-        height: 55,  //gives the height of the dropdown button
-        width: MediaQuery.of(context).size.width, //gives the width of the dropdown button
-        decoration: BoxDecoration(
-            borderRadius: BorderRadius.all(Radius.circular(3)),
-            color: Color(0xFFF2F2F2)
-        ),
-        // padding: const EdgeInsets.symmetric(horizontal: 13), //you can include padding to control the menu items
-        child: Theme(
-            data: Theme.of(context).copyWith(
-                canvasColor: Colors.white70, // background color for the dropdown items
-                buttonTheme: ButtonTheme.of(context).copyWith(
-                  alignedDropdown: true,  //If false (the default), then the dropdown's menu will be wider than its button.
-                )
-            ),
-            child: DropdownButtonHideUnderline(  // to hide the default underline of the dropdown button
-              child: DropdownButton<String>(
-                iconEnabledColor: Color(0xFF595959),  // icon color of the dropdown button
-                items: list.map(( dropMenuItem){
-                  return DropdownMenuItem<String>(
-                    value: dropMenuItem.label,
-                    child: Text(
-                      dropMenuItem.label,
-                      style: TextStyle(
-                          fontSize: 15
-                      ),
-                    ),
-                  );
-                }).toList(),
-                hint: Text(hint,style: TextStyle(fontSize: 15),),  // setting hint
-                onChanged: (String? value){
-                  setState(() {
-                    sexSelect.label = value!;  // saving the selected value
-                  });
-                },
-                value: sexSelect.label,  // displaying the selected value
-              ),
-            )
-        ),
-      ),
-    );
-  }
 }

+ 248 - 132
lib/page/patrol/patrol_job_page.dart

@@ -1,6 +1,11 @@
 //巡检任务列表
 import 'package:deus_app/common/style/TitleBar.dart';
 import 'package:flutter/material.dart';
+import '../../common/style/gsy_style.dart';
+import '../../common/utils/ConstantString.dart';
+import '../../common/utils/DioUtil.dart';
+import '../../model/patrol_response_entity.dart';
+import '../../widget/PatrolJobDrawer.dart';
 
 class PatrolJobPage extends StatefulWidget {
   const PatrolJobPage({super.key});
@@ -13,154 +18,265 @@ class PatrolJobPage extends StatefulWidget {
   }
 }
 
+
+
+Map<String,dynamic> map1 = {
+  'name':'巡检任务',
+  'number':'巡检任务编号',
+  'count':3,
+  'planName':'巡检计划名称',
+  'planNumber':'巡检计划编号',
+  'termType':1,
+  'startDate':'2023-05-29 00:00:00',
+  'endDate':'2023-05-20 23:59:59',
+  'status':1
+};
+
+PatrolJobData p = PatrolJobData.toBean(map1);
+
+List<PatrolJobData> patrol_job_list = [p];
+
+
+PatrolJobData query = PatrolJobData();
+
 class _PatrolJobPage extends State<PatrolJobPage> {
+  final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
+
+  _load() async {
+    var result = await DioUtil()
+        .request('patrolJob/getJobList', method: DioMethod.post, data: {
+      'query': query,
+      'index':1,
+      'size':5
+    });
+
+
+  }
+
+  @override
+  void initState() {
+    // TODO: implement initState
+    super.initState();
+    Future.delayed(Duration.zero,()=> setState((){
+      _load();
+    }));
+  }
+
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-        appBar: TitleBar().backAppbar(context, "巡检任务"),
+        key: _scaffoldKey,
+        appBar: TitleBar().drawAppBar(ConstantString.patrolJobText, () {
+          _scaffoldKey.currentState?.openEndDrawer();
+        }),
+        endDrawer: PatrolJobDrawer(), //抽屉
+        backgroundColor: const Color(0xfff2f2f2),
         body: Column(
           children: [
             SizedBox(
-              height: 1,
+              height: 10,
             ),
-            Container(
-              child: Text(
-                '巡检任务来自于“巡检计划管理”,计划信息请登录pc端查看',
-                style: TextStyle(fontSize: 14, color: Colors.white),
-              ),
-              height: 40,
-              alignment: Alignment.center,
-              decoration: BoxDecoration(
-                color: Colors.blueAccent, //背景色
-              ),
+            Row(
+              mainAxisAlignment: MainAxisAlignment.start,
+              children: [
+                SizedBox(
+                  width: 15,
+                ),
+                Text(ConstantString.patrolJobTitle,
+                    style: GSYConstant.smallActionLightText),
+              ],
             ),
             Expanded(
                 child: Container(
                     child: ListView.builder(
-              itemCount: 20,
+              itemCount: patrol_job_list.length,
               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");
-                        },
-                      ));
-                }
+                PatrolJobData patrolJobData = patrol_job_list[index];
+                return _patrol_job_list(patrolJobData);
               },
             )))
           ],
         ));
   }
+
+  Widget _patrol_job_list(PatrolJobData patrolJobData) {
+    return Container(
+        margin: EdgeInsets.only(top: 12, left: 10, right: 10),
+        padding: EdgeInsets.only(top: 12, bottom: 10),
+        color: Colors.white,
+        child: ListTile(
+          title: Column(
+            children: [
+              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                Container(
+                  child: Text(
+                    '此处展示巡检任务名称',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Container(
+                  padding:
+                      EdgeInsets.only(top: 3, bottom: 3, left: 5, right: 5),
+                  child: Text(
+                    patrolJobData.status == 0
+                        ? '已关闭'
+                        : patrolJobData.status == 1
+                            ? '执行中'
+                            : patrolJobData.status == 2
+                                ? '已完成'
+                                : patrolJobData.status == 3
+                                    ? '待执行'
+                                    : patrolJobData.status == 4
+                                        ? '已逾期'
+                                        : '未知',
+                    textAlign: TextAlign.right,
+                    style: TextStyle(
+                      color: patrolJobData.status == 0
+                          ? Colors.red
+                          : patrolJobData.status == 1
+                              ? Colors.blue
+                              : patrolJobData.status == 2
+                                  ? Colors.green
+                                  : patrolJobData.status == 3
+                                      ? Colors.pinkAccent
+                                      : patrolJobData.status == 4
+                                          ? Colors.purpleAccent
+                                          : Colors.black, //边框颜色
+                      fontSize: GSYConstant.minTextSize,
+                    ),
+                  ),
+                  decoration: BoxDecoration(
+                    border: new Border.all(
+                      color: patrolJobData.status == 0
+                          ? Colors.red
+                          : patrolJobData.status == 1
+                              ? Colors.blue
+                              : patrolJobData.status == 2
+                                  ? Colors.green
+                                  : patrolJobData.status == 3
+                                      ? Colors.pinkAccent
+                                      : patrolJobData.status == 4
+                                          ? Colors.purpleAccent
+                                          : Colors.black, //边框颜色
+                      width: 1.0, //边框粗细
+                    ),
+                    borderRadius: const BorderRadius.all(
+                        const Radius.circular(3.0)), //边框的弧度
+                  ),
+                )
+              ]),
+              SizedBox(
+                height: 12,
+              ),
+              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                Container(
+                  child: Text(
+                    '任务编号:',
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+                Container(
+                  child: Text(
+                    '任务编号001',
+                    textAlign: TextAlign.right,
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+              ]),
+              SizedBox(
+                height: 10,
+              ),
+              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                Container(
+                  child: Text(
+                    '巡检产品数量:',
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+                Container(
+                  child: Text(
+                    '3',
+                    textAlign: TextAlign.right,
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+              ]),
+              SizedBox(
+                height: 10,
+              ),
+              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                Container(
+                  child: Text(
+                    '任务开始时间:',
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+                Container(
+                  child: Text(
+                    '2023-2-9',
+                    textAlign: TextAlign.right,
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+              ]),
+              SizedBox(
+                height: 10,
+              ),
+              Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+                Container(
+                  child: Text(
+                    '任务结束时间:',
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+                Container(
+                  child: Text(
+                    '2023-2-9',
+                    textAlign: TextAlign.right,
+                    style: TextStyle(
+                      color: GSYColors.primaryLightValue,
+                      fontSize: GSYConstant.middleTextWhiteSize,
+                    ),
+                  ),
+                ),
+              ]),
+              SizedBox(
+                height: 5,
+              ),
+            ],
+          ),
+          onTap: () {
+            /*Navigator.push(
+                context,
+                MaterialPageRoute(
+                    builder: (context) => const PatrolJobDetail()));*/
+
+          },
+        ));
+  }
 }

+ 207 - 0
lib/widget/PatrolJobDrawer.dart

@@ -0,0 +1,207 @@
+import 'package:deus_app/common/style/gsy_style.dart';
+import 'package:flutter/material.dart';
+
+class PatrolJobDrawer extends StatelessWidget{
+  @override
+  Widget build(BuildContext context) {
+    return Drawer(
+      child: MediaQuery.removePadding(
+        context: context,
+        //移除抽屉菜单顶部默认留白
+        removeTop: true,
+        child: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: <Widget>[
+            Padding(
+              padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 1,
+                  child: Text(
+                    '任务名称',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                        border: OutlineInputBorder(),
+                      ),style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        _name = value;
+                      },
+                    ),
+                  ),
+                  flex: 4,
+
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 1,
+                  child: Text(
+                    '任务编号',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                          border: OutlineInputBorder()
+                      ),style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        _number = value;
+                      },
+                    ),
+                  ),
+                  flex: 4,
+
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 1,
+                  child: Text(
+                    '计划名称',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                          border: OutlineInputBorder()
+                      ),style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        _planName = value;
+                      },
+                    ),
+                  ),
+                  flex: 4,
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 1,
+                  child: Text(
+                    '计划编号',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  flex: 4,
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                          border: OutlineInputBorder()
+                      ),style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        _planNumber = value;
+                      },
+                    ),
+                  ),
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 1,
+                  child: Text(
+                    '计划编号',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  flex: 4,
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                          border: OutlineInputBorder()
+                      ),style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        _planNumber = value;
+                      },
+                    ),
+                  ),
+                ),
+              ]),
+            ),
+            Padding(
+              padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
+              child: Row(children: [
+                Expanded(
+                  flex: 1,
+                  child: Text(
+                    '计划编号',
+                    style: TextStyle(
+                      color: Colors.black,
+                      fontSize: GSYConstant.minTextSize,
+                      fontWeight: FontWeight.bold,
+                    ),
+                  ),
+                ),
+                Expanded(
+                  flex: 4,
+                  child: Container(
+                    height: 40,
+                    child: TextField(
+                      decoration: InputDecoration(
+                          border: OutlineInputBorder()
+                      ),style: TextStyle(fontSize: 14),
+                      onChanged: (value) {
+                        _planNumber = value;
+                      },
+                    ),
+                  ),
+                ),
+              ]),
+            ),
+
+          ],
+        ),
+      ),
+    );
+  }
+
+  String  _name = '',_number = '', _planName = '', _planNumber = '';
+  int _status = 1,_termType = 1;
+
+}

+ 2 - 0
pubspec.yaml

@@ -36,6 +36,8 @@ dependencies:
   # The following adds the Cupertino Icons font to your application.
   # Use with the CupertinoIcons class for iOS style icons.
   cupertino_icons: ^1.0.2
+  # json转dart依赖
+  json2dart_safe: ^1.0.8+9
 
 
 dev_dependencies: