/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-05-14 11:53:35
 * @LastEditTime : 2021-05-28 12:05:53
 * @FilePath     : /wisdom-huiguanjia-app/task_package/lib/src/pages/plan_detail/components/info.dart
 * @Description  : 计划任务详情-人员信息
 */
part of '../index.dart';

///详情模块
class _BuildInfo extends StatelessWidget {
  const _BuildInfo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final store = Provider.of<PlanTaskDetailStore>(context);
    final data = store.data;

    final style = WTheme.of(context);
    final colorScheme = style.colorScheme;
    return SliverToBoxAdapter(
      child: Wisdom.column(
        color: Colors.white,
        padding: EdgeInsets.symmetric(horizontal: 15.pt),
        margin: EdgeInsets.symmetric(vertical: 7.5.pt),
        children: [
          Wisdom.row(
            padding: EdgeInsets.symmetric(vertical: 7.5.pt),
            children: <Widget>[
              WisText(
                '添加人',
                size: 15.pt,
              ).asExpanded(),
              Wisdom.row(
                children: <Widget>[
                  WisText(
                    data?.createdBy ?? '--',
                    size: 15.pt,
                    color: colorScheme.mainTitle,
                    weight: FontWeight.w600,
                  ),
                ],
              ),
            ],
          ),
          Wisdom.row(
            padding: EdgeInsets.symmetric(vertical: 7.5.pt),
            children: <Widget>[
              WisText(
                '执行周期',
                size: 15.pt,
              ).asExpanded(),
              WisText(
                '${store.planDateTime ?? '--'}',
                size: 15.pt,
                color: colorScheme.mainTitle,
                weight: FontWeight.w600,
              ),
            ],
          ),
          Wisdom.row(
            padding: EdgeInsets.symmetric(vertical: 7.5.pt),
            children: <Widget>[
              WisText(
                '计划执行时间',
                size: 15.pt,
              ).asExpanded(),
              WisText(
                store.executionTime ?? '--',
                size: 15.pt,
                color: colorScheme.mainTitle,
                weight: FontWeight.w600,
              ),
            ],
          ),
          Wisdom.row(
            padding: EdgeInsets.symmetric(vertical: 7.5.pt),
            children: <Widget>[
              WisText(
                '有效时间范围',
                size: 15.pt,
              ).asExpanded(),
              WisText(
                '${data?.startTime ?? ''}至${data?.endTime ?? '长期'}',
                size: 15.pt,
                color: colorScheme.mainTitle,
                weight: FontWeight.w600,
              ),
            ],
          ),
        ],
      ),
    );
  }
}
