|
@@ -386,70 +386,73 @@ class _SelectModulePageState extends FState<SelectModulePage> {
|
|
|
),
|
|
|
// ),
|
|
|
),
|
|
|
- if (e.status != null)
|
|
|
- FPositioned(
|
|
|
- bottom: 0,
|
|
|
- right: 0,
|
|
|
- child: _buildItemBuyStatusName(
|
|
|
- e.status ?? WorkingItemStatusEnum.Free,
|
|
|
- ),
|
|
|
- )
|
|
|
+
|
|
|
+ /// 【TODO】 暂时屏蔽 buyStatus
|
|
|
+ // if (e.status != null)
|
|
|
+ // FPositioned(
|
|
|
+ // bottom: 0,
|
|
|
+ // right: 0,
|
|
|
+ // child: _buildItemBuyStatusName(
|
|
|
+ // e.status ?? WorkingItemStatusEnum.Free,
|
|
|
+ // ),
|
|
|
+ // )
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
// 构建测量项是否需要购买
|
|
|
- FWidget _buildItemBuyStatusName(WorkingItemStatusEnum buyStatus) {
|
|
|
- String name = "";
|
|
|
- Color textColor = Colors.white;
|
|
|
-
|
|
|
- switch (buyStatus) {
|
|
|
- case WorkingItemStatusEnum.Probation:
|
|
|
- name = i18nBook.measure.probation.t;
|
|
|
- textColor = Colors.yellow;
|
|
|
- break;
|
|
|
- case WorkingItemStatusEnum.Unpaid:
|
|
|
- name = i18nBook.measure.unpaid.t;
|
|
|
- textColor = Colors.red;
|
|
|
- break;
|
|
|
- // case WorkingItemStatusEnum.Purchased:
|
|
|
- // name = i18nBook.measure.purchased.t;
|
|
|
- // textColor = childButtonHighlight;
|
|
|
- // break;
|
|
|
- case WorkingItemStatusEnum.Expired:
|
|
|
- name = i18nBook.measure.expired.t;
|
|
|
- textColor = Colors.red;
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- if (name.isNotEmpty) {
|
|
|
- return QuickFWidget(
|
|
|
- Tooltip(
|
|
|
- message: buyStatus == WorkingItemStatusEnum.Unpaid
|
|
|
- ? "如需继续使用该测量项,请联系Vinno申请试用或购买。"
|
|
|
- : "",
|
|
|
- padding: EdgeInsets.zero,
|
|
|
- margin: EdgeInsets.zero,
|
|
|
- child: Container(
|
|
|
- alignment: Alignment.center,
|
|
|
- padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
|
|
- color: textColor.withOpacity(0.4),
|
|
|
- // color: Colors.black.withOpacity(0.2),
|
|
|
- child: FText(
|
|
|
- name,
|
|
|
- style: const TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 10,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
- return const FSizedBox();
|
|
|
- }
|
|
|
+ /// 【TODO】 暂时屏蔽 buyStatus
|
|
|
+ // FWidget _buildItemBuyStatusName(WorkingItemStatusEnum buyStatus) {
|
|
|
+ // String name = "";
|
|
|
+ // Color textColor = Colors.white;
|
|
|
+
|
|
|
+ // switch (buyStatus) {
|
|
|
+ // case WorkingItemStatusEnum.Probation:
|
|
|
+ // name = i18nBook.measure.probation.t;
|
|
|
+ // textColor = Colors.yellow;
|
|
|
+ // break;
|
|
|
+ // case WorkingItemStatusEnum.Unpaid:
|
|
|
+ // name = i18nBook.measure.unpaid.t;
|
|
|
+ // textColor = Colors.red;
|
|
|
+ // break;
|
|
|
+ // // case WorkingItemStatusEnum.Purchased:
|
|
|
+ // // name = i18nBook.measure.purchased.t;
|
|
|
+ // // textColor = childButtonHighlight;
|
|
|
+ // // break;
|
|
|
+ // case WorkingItemStatusEnum.Expired:
|
|
|
+ // name = i18nBook.measure.expired.t;
|
|
|
+ // textColor = Colors.red;
|
|
|
+ // break;
|
|
|
+ // default:
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // if (name.isNotEmpty) {
|
|
|
+ // return QuickFWidget(
|
|
|
+ // Tooltip(
|
|
|
+ // message: buyStatus == WorkingItemStatusEnum.Unpaid
|
|
|
+ // ? "如需继续使用该测量项,请联系Vinno申请试用或购买。"
|
|
|
+ // : "",
|
|
|
+ // padding: EdgeInsets.zero,
|
|
|
+ // margin: EdgeInsets.zero,
|
|
|
+ // child: Container(
|
|
|
+ // alignment: Alignment.center,
|
|
|
+ // padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
|
|
+ // color: textColor.withOpacity(0.4),
|
|
|
+ // // color: Colors.black.withOpacity(0.2),
|
|
|
+ // child: FText(
|
|
|
+ // name,
|
|
|
+ // style: const TextStyle(
|
|
|
+ // color: Colors.white,
|
|
|
+ // fontSize: 10,
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+ // return const FSizedBox();
|
|
|
+ // }
|
|
|
|
|
|
/// 未选中的测量项
|
|
|
FWidget _buildNoSlected(ItemMetaDTO e) {
|
|
@@ -494,14 +497,16 @@ class _SelectModulePageState extends FState<SelectModulePage> {
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
- if (e.status != null)
|
|
|
- FPositioned(
|
|
|
- bottom: 0,
|
|
|
- right: 0,
|
|
|
- child: _buildItemBuyStatusName(
|
|
|
- e.status ?? WorkingItemStatusEnum.Free,
|
|
|
- ),
|
|
|
- )
|
|
|
+
|
|
|
+ /// 【TODO】 暂时屏蔽 buyStatus
|
|
|
+ // if (e.status != null)
|
|
|
+ // FPositioned(
|
|
|
+ // bottom: 0,
|
|
|
+ // right: 0,
|
|
|
+ // child: _buildItemBuyStatusName(
|
|
|
+ // e.status ?? WorkingItemStatusEnum.Free,
|
|
|
+ // ),
|
|
|
+ // )
|
|
|
],
|
|
|
),
|
|
|
);
|