move card text to PlainText
This commit is contained in:
+11
-11
@@ -24,8 +24,6 @@ function mainPageCard(c: CardContent): JSX.Element {
|
||||
);
|
||||
}
|
||||
|
||||
type DutyState = 'off' | '1' | '2' | '3';
|
||||
|
||||
class DutyData {
|
||||
constructor() {
|
||||
this.isInDuty = false;
|
||||
@@ -37,9 +35,9 @@ class DutyData {
|
||||
|
||||
isInDuty: boolean;
|
||||
inDutyCnt: number;
|
||||
currentDuty: DutyState;
|
||||
offDutyReason: string;
|
||||
dutyRecoverTime: string;
|
||||
currentDuty: 'off' | '1' | '2' | '3';
|
||||
offDutyReason: string; // from backend
|
||||
dutyRecoverTime: string; // from backend
|
||||
}
|
||||
|
||||
class ExpandItem extends Component {
|
||||
@@ -77,22 +75,24 @@ class DutyInfo extends Component {
|
||||
|
||||
offDutyContent(): ReactNode {
|
||||
const data = this.props.data;
|
||||
const od = pt.get().mainPage.dutyCard.offDuty;
|
||||
return (
|
||||
<View>
|
||||
<View>当前未值班</View>
|
||||
<View>{data.offDutyReason}</View>
|
||||
<View>恢复值班时间:{data.dutyRecoverTime}</View>
|
||||
<View>{od.title}</View>
|
||||
<View>{od.reason(data.offDutyReason)}</View>
|
||||
<View>{od.recoverTime(data.dutyRecoverTime)}</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
inDutyContent(): ReactNode {
|
||||
const data = this.props.data;
|
||||
const id = pt.get().mainPage.dutyCard.inDuty;
|
||||
return (
|
||||
<View>
|
||||
<View>值班中</View>
|
||||
<View>当前班次 {data.currentDuty}</View>
|
||||
<View>当前{data.inDutyCnt}人在岗</View>
|
||||
<View>{id.title}</View>
|
||||
<View>{id.currentDutyText(data.currentDuty)}</View>
|
||||
<View>{id.inDutyCnt(data.inDutyCnt)}</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user