From 8f511b0c5330475abd5f887c2407f8cc0458c0ba Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Wed, 26 May 2021 02:26:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E8=AE=BF=E8=B0=88?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E5=AF=B9=E6=8E=A5=E8=AE=BF=E8=B0=88?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/const/api.dart | 6 + .../interview/interview_list_model.dart | 77 +++++++ .../home/application/applications_page.dart | 4 +- lib/ui/home/search_workorder_page.dart | 4 +- .../interview/interview_card.dart | 169 ++++++++++++++ .../interview/interview_detail_page.dart | 186 +++++++++++++++ .../interview/interview_feedback_page.dart | 213 ++++++++++++++++++ .../interview/interview_page.dart | 32 +++ .../interview/interview_view.dart | 59 +++++ 9 files changed, 748 insertions(+), 2 deletions(-) create mode 100644 lib/models/manager/interview/interview_list_model.dart create mode 100644 lib/ui/manage_pages/interview/interview_card.dart create mode 100644 lib/ui/manage_pages/interview/interview_detail_page.dart create mode 100644 lib/ui/manage_pages/interview/interview_feedback_page.dart create mode 100644 lib/ui/manage_pages/interview/interview_page.dart create mode 100644 lib/ui/manage_pages/interview/interview_view.dart diff --git a/lib/const/api.dart b/lib/const/api.dart index 6f3c0d9..7137814 100644 --- a/lib/const/api.dart +++ b/lib/const/api.dart @@ -246,6 +246,12 @@ class _Manage { ///管家app 考勤管理:填写加班/请假申请 String get clockApply => '/user/attendance/apply'; + + ///管家app 客户访谈管理:查询所有客户访谈信息 + String get interviewList => '/user/interview/list'; + + ///管家app 客户访谈管理:访谈回 + String get interviewFeedBack => '/user/interview/feedBack'; } class _Upload { diff --git a/lib/models/manager/interview/interview_list_model.dart b/lib/models/manager/interview/interview_list_model.dart new file mode 100644 index 0000000..46a16a9 --- /dev/null +++ b/lib/models/manager/interview/interview_list_model.dart @@ -0,0 +1,77 @@ +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:flutter/material.dart'; + +class InterviewListModel { + int id; + String name; + String tel; + String content; + int status; + String interviewDate; + String feedbackContent; + String feedbackDate; + String createName; + String createDate; + + InterviewListModel( + {this.id, + this.name, + this.tel, + this.content, + this.status, + this.interviewDate, + this.feedbackContent, + this.feedbackDate, + this.createName, + this.createDate}); + + InterviewListModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + tel = json['tel']; + content = json['content']; + status = json['status']; + interviewDate = json['interviewDate']; + feedbackContent = json['feedbackContent']; + feedbackDate = json['feedbackDate']; + createName = json['createName']; + createDate = json['createDate']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['tel'] = this.tel; + data['content'] = this.content; + data['status'] = this.status; + data['interviewDate'] = this.interviewDate; + data['feedbackContent'] = this.feedbackContent; + data['feedbackDate'] = this.feedbackDate; + data['createName'] = this.createName; + data['createDate'] = this.createDate; + return data; + } + + String get statusString { + switch (this.status) { + case 1: + return '待回复'; + case 2: + return '已回复'; + default: + return '未知'; + } + } + + Color get statusColor { + switch (this.status) { + case 1: + return kPrimaryColor; + case 2: + return kTextSubColor; + default: + return kTextPrimaryColor; + } + } +} diff --git a/lib/ui/home/application/applications_page.dart b/lib/ui/home/application/applications_page.dart index e0218c7..b5a7883 100644 --- a/lib/ui/home/application/applications_page.dart +++ b/lib/ui/home/application/applications_page.dart @@ -1,6 +1,7 @@ // Flutter imports: import 'package:aku_community_manager/ui/manage_pages/clock_in_out/clock_in_out_page.dart'; import 'package:aku_community_manager/ui/manage_pages/facilities/facilities_select_page.dart'; +import 'package:aku_community_manager/ui/manage_pages/interview/interview_page.dart'; import 'package:flutter/material.dart'; // Package imports: @@ -89,7 +90,8 @@ class _ApplicationPageState extends State AppApplication('规程管理', R.ASSETS_HOME_RULES_PNG, () => RulesManagePage()), AppApplication( '卫生管理', R.ASSETS_PLACEHOLDER_WEBP, () => HygienceManagePage()), - AppApplication('考勤管理', R.ASSETS_PLACEHOLDER_WEBP, () => ClockInOutPage()) + AppApplication('考勤管理', R.ASSETS_PLACEHOLDER_WEBP, () => ClockInOutPage()), + AppApplication('访谈管理', R.ASSETS_PLACEHOLDER_WEBP, () => InterviewPage()) ]; @override diff --git a/lib/ui/home/search_workorder_page.dart b/lib/ui/home/search_workorder_page.dart index 3aaca7d..23bf4be 100644 --- a/lib/ui/home/search_workorder_page.dart +++ b/lib/ui/home/search_workorder_page.dart @@ -1,6 +1,7 @@ // Flutter imports: import 'package:aku_community_manager/ui/manage_pages/clock_in_out/clock_in_out_page.dart'; import 'package:aku_community_manager/ui/manage_pages/facilities/facilities_select_page.dart'; +import 'package:aku_community_manager/ui/manage_pages/interview/interview_page.dart'; import 'package:flutter/material.dart'; // Package imports: @@ -60,7 +61,8 @@ class _SearchWorkOrderpageState extends State { AppApplication('规程管理', R.ASSETS_HOME_RULES_PNG, () => RulesManagePage()), AppApplication( '卫生管理', R.ASSETS_PLACEHOLDER_WEBP, () => HygienceManagePage()), - AppApplication('考勤管理', R.ASSETS_PLACEHOLDER_WEBP, () => ClockInOutPage()) + AppApplication('考勤管理', R.ASSETS_PLACEHOLDER_WEBP, () => ClockInOutPage()), + AppApplication('访谈管理', R.ASSETS_PLACEHOLDER_WEBP, () => InterviewPage()) ]; List _displayApps = []; diff --git a/lib/ui/manage_pages/interview/interview_card.dart b/lib/ui/manage_pages/interview/interview_card.dart new file mode 100644 index 0000000..8f7ad8d --- /dev/null +++ b/lib/ui/manage_pages/interview/interview_card.dart @@ -0,0 +1,169 @@ +import 'package:aku_community_manager/models/manager/interview/interview_list_model.dart'; +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/tools/aku_divider.dart'; +import 'package:aku_community_manager/ui/manage_pages/interview/interview_detail_page.dart'; +import 'package:aku_community_manager/ui/manage_pages/interview/interview_feedback_page.dart'; +import 'package:aku_ui/aku_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; +import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'; + +class InterviewCard extends StatefulWidget { + final InterviewListModel model; + InterviewCard({Key key, this.model}) : super(key: key); + + @override + _InterviewCardState createState() => _InterviewCardState(); +} + +class _InterviewCardState extends State { + @override + Widget build(BuildContext context) { + return AkuButton( + onPressed: () { + Get.to(() => InterviewDetailPage( + model: widget.model, + )); + }, + child: Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(8.w)), + padding: EdgeInsets.all(24.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + '访谈信息'.text.size(32.sp).color(kTextPrimaryColor).bold.make(), + Spacer(), + widget.model.statusString.text + .size(28.sp) + .bold + .color(widget.model.statusColor) + .make() + ], + ), + 16.w.heightBox, + AkuDivider.horizontal(), + 24.w.heightBox, + ...[ + _rowTile( + R.ASSETS_MANAGE_IC_RENWU_PNG, + '客户姓名', + '${widget.model.name}' + .text + .size(24.sp) + .color(kTextSubColor) + .make()), + _rowTile( + R.ASSETS_MANAGE_IC_RENWU_PNG, + '客户电话', + widget.model.tel.text + .size(24.sp) + .color(kTextSubColor) + .make()), + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '创建时间', + widget.model.createDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ...widget.model.interviewDate == null + ? [] + : [ + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '访谈时间', + widget.model.interviewDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ], + ...widget.model.feedbackDate == null + ? [] + : [ + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '回复时间', + widget.model.feedbackDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ], + ].sepWidget(separate: 12.w.heightBox), + _getBottomButtons(widget.model.status), + ], + ), + ), + ); + } + + Widget _getBottomButtons(int status) { + MaterialButton button; + switch (status) { + case 1: + button = _bottomButton('访谈回复', () async { + await Get.to(() => InterviewFeedBackPage( + model: widget.model, + )); + }, Color(0xFFFFC40C), Colors.black); + break; + case 2: + button = null; + break; + default: + return null; + } + return button == null + ? SizedBox() + : Padding( + padding: EdgeInsets.only(top: 40.w), + child: Row( + children: [ + Spacer(), + button, + ], + ), + ); + } + + Widget _bottomButton( + String title, Function onPressed, Color color, Color textColor, + {bool hasBorder = false}) { + return MaterialButton( + height: 52.w, + padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(74.w), + side: !hasBorder ? BorderSide.none : BorderSide(color: Colors.black), + ), + color: color, + onPressed: onPressed, + elevation: 0, + focusElevation: 0, + hoverElevation: 0, + highlightElevation: 0, + child: title.text.size(26.sp).color(textColor).make(), + ); + } + + Widget _rowTile(String iconPath, String title, Widget content) { + return Row( + children: [ + SizedBox( + width: 40.w, + height: 40.w, + child: Image.asset(iconPath), + ), + 12.w.widthBox, + title.text.size(24.sp).color(kTextSubColor).make(), + Spacer(), + content, + ], + ); + } +} diff --git a/lib/ui/manage_pages/interview/interview_detail_page.dart b/lib/ui/manage_pages/interview/interview_detail_page.dart new file mode 100644 index 0000000..823e780 --- /dev/null +++ b/lib/ui/manage_pages/interview/interview_detail_page.dart @@ -0,0 +1,186 @@ +import 'package:aku_community_manager/models/manager/interview/interview_list_model.dart'; +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/tools/aku_divider.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; +import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'; + +class InterviewDetailPage extends StatefulWidget { + final InterviewListModel model; + InterviewDetailPage({Key key, this.model}) : super(key: key); + + @override + _InterviewDetailPageState createState() => _InterviewDetailPageState(); +} + +class _InterviewDetailPageState extends State { + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '访谈详情', + body: ListView( + padding: EdgeInsets.all(32.w), + children: [ + _interviewInfo(), + 24.w.heightBox, + _contentWidget(), + ], + ), + ); + } + + Widget _interviewInfo() { + return Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(8.w)), + padding: EdgeInsets.all(24.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + '访谈信息'.text.size(32.sp).color(kTextPrimaryColor).bold.make(), + Spacer(), + widget.model.statusString.text + .size(28.sp) + .bold + .color(widget.model.statusColor) + .make() + ], + ), + 16.w.heightBox, + AkuDivider.horizontal(), + 24.w.heightBox, + ...[ + _rowTile( + R.ASSETS_MANAGE_IC_RENWU_PNG, + '客户姓名', + '${widget.model.name}' + .text + .size(24.sp) + .color(kTextSubColor) + .make()), + _rowTile(R.ASSETS_MANAGE_IC_RENWU_PNG, '客户电话', + widget.model.tel.text.size(24.sp).color(kTextSubColor).make()), + _rowTile( + R.ASSETS_OUTDOOR_IC_ADDRESS_PNG, + '创建时间', + widget.model.createDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ...widget.model.interviewDate == null + ? [] + : [ + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '访谈时间', + widget.model.interviewDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ], + ...widget.model.feedbackDate == null + ? [] + : [ + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '回复时间', + widget.model.feedbackDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ], + ].sepWidget(separate: 12.w.heightBox), + // _getBottomButtons(widget.model.status), + ], + ), + ); + } + + Widget _contentWidget() { + return Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(8.w)), + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + '访谈内容'.text.size(32.sp).color(kTextPrimaryColor).bold.make(), + Spacer(), + ], + ), + 16.w.heightBox, + AkuDivider.horizontal(), + 20.w.heightBox, + widget.model.content.text.size(28.sp).color(kTextPrimaryColor).make(), + 40.w.heightBox, + Row( + children: [ + Spacer(), + widget.model.interviewDate.text + .size(24.sp) + .color(kTextSubColor) + .make(), + ], + ), + ...widget.model.feedbackContent == null + ? [] + : [ + 16.w.heightBox, + AkuDivider.horizontal(), + 20.w.heightBox, + Row( + children: [ + '访谈回复' + .text + .size(32.sp) + .color(kTextPrimaryColor) + .bold + .make(), + Spacer(), + ], + ), + 12.w.heightBox, + widget.model.feedbackContent.text + .size(28.sp) + .color(kTextPrimaryColor) + .make(), + 20.w.heightBox, + Row( + children: [ + Spacer(), + widget.model.feedbackDate.text + .size(24.sp) + .color(kTextSubColor) + .make(), + ], + ), + ] + ], + ), + ); + } + + Widget _rowTile(String iconPath, String title, Widget content) { + return Row( + children: [ + SizedBox( + width: 40.w, + height: 40.w, + child: Image.asset(iconPath), + ), + 12.w.widthBox, + title.text.size(24.sp).color(kTextSubColor).make(), + Spacer(), + content, + ], + ); + } +} diff --git a/lib/ui/manage_pages/interview/interview_feedback_page.dart b/lib/ui/manage_pages/interview/interview_feedback_page.dart new file mode 100644 index 0000000..26ae9f3 --- /dev/null +++ b/lib/ui/manage_pages/interview/interview_feedback_page.dart @@ -0,0 +1,213 @@ +import 'package:aku_community_manager/const/api.dart'; +import 'package:aku_community_manager/models/manager/interview/interview_list_model.dart'; +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:aku_community_manager/tools/aku_divider.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_community_manager/ui/widgets/inner/aku_bottom_button.dart'; +import 'package:aku_community_manager/utils/network/base_model.dart'; +import 'package:aku_community_manager/utils/network/net_util.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; +import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart'; + +class InterviewFeedBackPage extends StatefulWidget { + final InterviewListModel model; + InterviewFeedBackPage({Key key, this.model}) : super(key: key); + + @override + _InterviewFeedBackPageState createState() => _InterviewFeedBackPageState(); +} + +class _InterviewFeedBackPageState extends State { + TextEditingController _textEditingController; + @override + void initState() { + super.initState(); + _textEditingController = TextEditingController(); + } + + @override + void dispose() { + _textEditingController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '访谈回复', + body: ListView( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + children: [ + _interviewInfo(), + 24.w.heightBox, + _feedBackWidget(), + ], + ), + bottom: AkuBottomButton( + title: '立即回复', + onTap: () async { + BaseModel baseModel = await NetUtil().post( + API.manage.interviewFeedBack, + params: { + "id": widget.model.id, + "feedbackContent": _textEditingController.text, + }, + showMessage: true, + ); + if (baseModel.status) { + Get.back(); + } + }, + ), + ); + } + + Widget _feedBackWidget() { + return Container( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8.w), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + '访谈回复'.text.size(32.sp).color(kTextPrimaryColor).bold.make(), + Spacer(), + ], + ), + 16.w.heightBox, + _inputWidget(_textEditingController,hintText:'请输入回复内容'), + ], + ), + ); + } + + Widget _inputWidget( + TextEditingController controller, + {String hintText,} + ) { + return Container( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + border: Border.all( + width: 2.w, + color: Color(0xFFE8E8E8), + ), + ), + child: TextField( + minLines: 5, + maxLines: 10, + autofocus: false, + controller: controller, + onChanged: (value) { + controller.text = value; + }, + decoration: InputDecoration( + hintText: hintText??'', + hintStyle: TextStyle( + fontSize: 28.sp, + color: kTextSubColor, + ), + contentPadding: + EdgeInsets.symmetric(vertical: 16.w, horizontal: 24.w), + border: InputBorder.none, + isDense: true, + ), + ), + ); + } + + Widget _interviewInfo() { + return Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(8.w)), + padding: EdgeInsets.all(24.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + '访谈信息'.text.size(32.sp).color(kTextPrimaryColor).bold.make(), + Spacer(), + widget.model.statusString.text + .size(28.sp) + .bold + .color(widget.model.statusColor) + .make() + ], + ), + 16.w.heightBox, + AkuDivider.horizontal(), + 24.w.heightBox, + ...[ + _rowTile( + R.ASSETS_MANAGE_IC_RENWU_PNG, + '客户姓名', + '${widget.model.name}' + .text + .size(24.sp) + .color(kTextSubColor) + .make()), + _rowTile(R.ASSETS_MANAGE_IC_RENWU_PNG, '客户电话', + widget.model.tel.text.size(24.sp).color(kTextSubColor).make()), + _rowTile( + R.ASSETS_OUTDOOR_IC_ADDRESS_PNG, + '创建时间', + widget.model.createDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ...widget.model.interviewDate == null + ? [] + : [ + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '访谈时间', + widget.model.interviewDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ], + ...widget.model.feedbackDate == null + ? [] + : [ + _rowTile( + R.ASSETS_MANAGE_IC_TIME_PNG, + '回复时间', + widget.model.feedbackDate.text + .size(24.sp) + .color(kTextSubColor) + .make()), + ], + ].sepWidget(separate: 12.w.heightBox), + // _getBottomButtons(widget.model.status), + ], + ), + ); + } + + Widget _rowTile(String iconPath, String title, Widget content) { + return Row( + children: [ + SizedBox( + width: 40.w, + height: 40.w, + child: Image.asset(iconPath), + ), + 12.w.widthBox, + title.text.size(24.sp).color(kTextSubColor).make(), + Spacer(), + content, + ], + ); + } +} diff --git a/lib/ui/manage_pages/interview/interview_page.dart b/lib/ui/manage_pages/interview/interview_page.dart new file mode 100644 index 0000000..52fadd2 --- /dev/null +++ b/lib/ui/manage_pages/interview/interview_page.dart @@ -0,0 +1,32 @@ +import 'package:aku_community_manager/ui/manage_pages/interview/interview_view.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class InterviewPage extends StatefulWidget { + InterviewPage({Key key}) : super(key: key); + + @override + _InterviewPageState createState() => _InterviewPageState(); +} + +class _InterviewPageState extends State with TickerProviderStateMixin { + TabController _tabController; + @override + void initState() { + super.initState(); + _tabController=TabController(length: _tabs.length, vsync: this); + } + List _tabs=['待回复','已回复']; + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '访谈管理', + appBarBottom: PreferredSize(preferredSize: Size.fromHeight(88.w),child: AkuTabBar(controller: _tabController, tabs: _tabs),), + body:TabBarView( + controller: _tabController, + children: List.generate(_tabs.length, (index) => InterviewView(index:index))), + ); + } +} diff --git a/lib/ui/manage_pages/interview/interview_view.dart b/lib/ui/manage_pages/interview/interview_view.dart new file mode 100644 index 0000000..05ed13a --- /dev/null +++ b/lib/ui/manage_pages/interview/interview_view.dart @@ -0,0 +1,59 @@ +import 'package:aku_community_manager/const/api.dart'; +import 'package:aku_community_manager/models/manager/interview/interview_list_model.dart'; +import 'package:aku_community_manager/ui/manage_pages/interview/interview_card.dart'; +import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class InterviewView extends StatefulWidget { + final int index; + InterviewView({Key key, this.index}) : super(key: key); + + @override + _InterviewViewState createState() => _InterviewViewState(); +} + +class _InterviewViewState extends State { + EasyRefreshController _refreshController; + @override + void initState() { + super.initState(); + _refreshController = EasyRefreshController(); + } + + @override + void dispose() { + _refreshController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BeeListView( + path: API.manage.interviewList, + controller: _refreshController, + extraParams: { + "interviewStatus": widget.index + 1, + }, + convert: (models) { + return models.tableList + .map((e) => InterviewListModel.fromJson(e)) + .toList(); + }, + builder: (items) { + return ListView.separated( + padding: EdgeInsets.all(24.w), + itemBuilder: (context, index) { + return InterviewCard( + model: items[index], + ); + }, + separatorBuilder: (_, __) { + return 24.w.heightBox; + }, + itemCount: items.length); + }); + } +}