Compare commits
No commits in common. "ff926676bd90edae9220a54321daace93fc73a85" and "f592d87e17da863f8387fb6eb0b6210c18e5ff2e" have entirely different histories.
ff926676bd
...
f592d87e17
21
doc/api.md
21
doc/api.md
|
|
@ -44,12 +44,9 @@ data:
|
||||||
{
|
{
|
||||||
"isInDuty": true,
|
"isInDuty": true,
|
||||||
"inDutyCnt": 3,
|
"inDutyCnt": 3,
|
||||||
"currentDuty": "1",
|
"currentDuty": "2",
|
||||||
"place": "", // 只有当 currentDuty 为 others 时,place 和 值班时间 才不为空
|
"place": "东三-204",
|
||||||
"otherDutyStart": "",
|
"otherDutyTime": ""
|
||||||
"otherDutyEnd": "",
|
|
||||||
"offDutyReason": "",
|
|
||||||
"dutyRecoverTime": ""
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -62,11 +59,8 @@ data:
|
||||||
"isInDuty": true,
|
"isInDuty": true,
|
||||||
"inDutyCnt": 3,
|
"inDutyCnt": 3,
|
||||||
"currentDuty": "others",
|
"currentDuty": "others",
|
||||||
"place": "蓝田", // 只有当 currentDuty 为 others 时,place 才不为空
|
"place": "蓝田",
|
||||||
"otherDutyStart": "2024-03-07T11:52:48.523303", // Timestamp
|
"otherDutyTime": "9:30-11:30"
|
||||||
"otherDutyEnd": "2024-03-07T13:52:48.523303",
|
|
||||||
"offDutyReason": "",
|
|
||||||
"dutyRecoverTime": ""
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -77,11 +71,6 @@ data:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"isInDuty": false,
|
"isInDuty": false,
|
||||||
"inDutyCnt": 0,
|
|
||||||
"currentDuty": "0", // '0' 代表正常值班时间下班,'others' 代表其他值班时间下班
|
|
||||||
"place": "",
|
|
||||||
"otherDutyStart": "",
|
|
||||||
"otherDutyEnd": "",
|
|
||||||
"offDutyReason": "学园维修",
|
"offDutyReason": "学园维修",
|
||||||
"dutyRecoverTime": "下周一"
|
"dutyRecoverTime": "下周一"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,19 +14,18 @@ export default {
|
||||||
'GET /duty/info': {
|
'GET /duty/info': {
|
||||||
success: true,
|
success: true,
|
||||||
data: {
|
data: {
|
||||||
|
token: 'token_test',
|
||||||
isInDuty: true,
|
isInDuty: true,
|
||||||
inDutyCnt: 3,
|
inDutyCnt: 3,
|
||||||
currentDuty: 'others',
|
currentDuty: 'others',
|
||||||
otherDutyStart: '2024-03-07T09:30:48.523303',
|
otherDutyTime: '9:30-11:30',
|
||||||
otherDutyEnd: '2024-03-07T13:30:48.523303',
|
|
||||||
place: '蓝田',
|
place: '蓝田',
|
||||||
offDutyReason: '',
|
|
||||||
dutyRecoverTime: '',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'GET /user/info': {
|
'GET /user/info': {
|
||||||
success: true,
|
success: true,
|
||||||
data: {
|
data: {
|
||||||
|
token: 'token_test',
|
||||||
name: '马保国',
|
name: '马保国',
|
||||||
phone: 13333333333,
|
phone: 13333333333,
|
||||||
},
|
},
|
||||||
|
|
@ -117,6 +116,7 @@ export default {
|
||||||
'GET /member/duty/info': {
|
'GET /member/duty/info': {
|
||||||
success: true,
|
success: true,
|
||||||
data: {
|
data: {
|
||||||
|
token: 'token_test',
|
||||||
isInDuty: true,
|
isInDuty: true,
|
||||||
inDutyCnt: 6,
|
inDutyCnt: 6,
|
||||||
currentDuty: '3',
|
currentDuty: '3',
|
||||||
|
|
|
||||||
|
|
@ -3,24 +3,13 @@
|
||||||
{
|
{
|
||||||
"id": 6830,
|
"id": 6830,
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"status": 3,
|
"status": 2,
|
||||||
"device": "主机",
|
"device": "主机",
|
||||||
"deviceModel": "技嘉",
|
"deviceModel": "技嘉",
|
||||||
"owner": "武技栏",
|
"owner": "武技栏",
|
||||||
"phone": "18888888888",
|
"phone": "18888888888",
|
||||||
"createdTime": "2024-03-06T19:49:27.043865",
|
"createdTime": "2024-03-06T19:49:27.043865",
|
||||||
"isConfirmed": false
|
"isConfirmed": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 6831,
|
|
||||||
"type": 1,
|
|
||||||
"status": 2,
|
|
||||||
"device": "ROG",
|
|
||||||
"deviceModel": "幻 14",
|
|
||||||
"owner": "晓洋",
|
|
||||||
"phone": "18888888887",
|
|
||||||
"createdTime": "2024-03-06T19:49:27.043865",
|
|
||||||
"isConfirmed": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
"description": "清灰",
|
"description": "清灰",
|
||||||
"workers": ["宇航员"],
|
"workers": ["宇航员"],
|
||||||
"createdTime": "2024-03-07T19:52:48.523303",
|
"createdTime": "2024-03-07T19:52:48.523303",
|
||||||
"status": 4,
|
"status": 5,
|
||||||
"isConfirmed": false,
|
"isConfirmed": false,
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ export default class DetailFramework extends Component<
|
||||||
marginLeft: '3%',
|
marginLeft: '3%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<AtCard isFull title={pt.get().ticketDetail.desc.title}>
|
<AtCard isFull title={pt.get().ticketDetail.descTitle}>
|
||||||
<View className='at-article__h3'>
|
<View className='at-article__h3'>
|
||||||
{this.state.ticketInfo.description}
|
{this.state.ticketInfo.description}
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
|
||||||
var message = '';
|
var message = '';
|
||||||
const note = this.props.note;
|
const note = this.props.note;
|
||||||
const td = pt.get().ticketDetail;
|
const td = pt.get().ticketDetail;
|
||||||
const createMessage = td.comment.createTicketMessage;
|
const createMessage = td.createTicketMessage;
|
||||||
const modifyMessage = td.statusModifyMessage;
|
const modifyMessage = td.statusModifyMessage;
|
||||||
const prefix = td.comment.statusModifyPrefix;
|
const prefix = td.statusModifyPrefix;
|
||||||
|
|
||||||
switch (note.type) {
|
switch (note.type) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,14 @@ export default class NotFoundPage extends Component {
|
||||||
style={{ marginTop: '150rpx', marginBottom: '240rpx' }}
|
style={{ marginTop: '150rpx', marginBottom: '240rpx' }}
|
||||||
>
|
>
|
||||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
{pt.get().notFound.title.ZhCn}
|
{pt.get().notFound.titleZhCn}
|
||||||
</View>
|
</View>
|
||||||
<View className='at-article__h2'>{pt.get().notFound.desc.ZhCn}</View>
|
<View className='at-article__h2'>{pt.get().notFound.descZhCn}</View>
|
||||||
<View style={{ height: '150rpx' }}></View>
|
<View style={{ height: '150rpx' }}></View>
|
||||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
{pt.get().notFound.title.EnUs}
|
{pt.get().notFound.titleEnUs}
|
||||||
</View>
|
</View>
|
||||||
<View className='at-article__h2'>{pt.get().notFound.desc.EnUs}</View>
|
<View className='at-article__h2'>{pt.get().notFound.descEnUs}</View>
|
||||||
</View>
|
</View>
|
||||||
<PageFooter />
|
<PageFooter />
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import {
|
||||||
AtActionSheet,
|
AtActionSheet,
|
||||||
AtActionSheetItem,
|
AtActionSheetItem,
|
||||||
AtButton,
|
AtButton,
|
||||||
AtCheckbox,
|
|
||||||
AtFloatLayout,
|
AtFloatLayout,
|
||||||
AtForm,
|
AtForm,
|
||||||
AtMessage,
|
AtMessage,
|
||||||
|
|
@ -23,98 +22,58 @@ import { pickTicket } from '@/service/pickTicket';
|
||||||
import { retrieve } from '@/service/retrieve';
|
import { retrieve } from '@/service/retrieve';
|
||||||
import { changeStatus } from '@/service/changeStatus';
|
import { changeStatus } from '@/service/changeStatus';
|
||||||
import { getDisable } from '@/service/getDisable';
|
import { getDisable } from '@/service/getDisable';
|
||||||
import { StatusStr } from './TicketNote';
|
|
||||||
|
|
||||||
const submitInterval = 5000;
|
const submitInterval = 5000;
|
||||||
|
|
||||||
interface TicketDetailState {
|
interface TicketDetailState {
|
||||||
id: number;
|
id: number;
|
||||||
isMember: boolean;
|
isMember: boolean;
|
||||||
show: {
|
showOreoModal: boolean;
|
||||||
modal: {
|
showCommentLayout: boolean;
|
||||||
oreo: boolean;
|
showRetrieveModal: boolean;
|
||||||
retrieve: boolean;
|
showStatusSheet: boolean;
|
||||||
pick: boolean;
|
showPickModal: boolean;
|
||||||
};
|
|
||||||
layout: {
|
|
||||||
comment: boolean;
|
|
||||||
reminder: boolean;
|
|
||||||
};
|
|
||||||
actionSheet: {
|
|
||||||
status: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
comment: string;
|
comment: string;
|
||||||
isLoading: {
|
isOreoLoading: boolean;
|
||||||
oreo: boolean;
|
isOreoDisable: boolean;
|
||||||
pick: boolean;
|
isOreoDisable_main: boolean;
|
||||||
retrieve: boolean;
|
isPickLoading: boolean;
|
||||||
comment: boolean;
|
isPickDisable: boolean;
|
||||||
status: boolean;
|
isPickDisable_main: boolean;
|
||||||
reminder: boolean;
|
isRetrieveLoading: boolean;
|
||||||
};
|
isRetrieveDisable: boolean;
|
||||||
isDisable: {
|
isRetrieveDisable_main: boolean;
|
||||||
oreo: boolean;
|
isStatusLoading: boolean;
|
||||||
pick: boolean;
|
isStatusDisable: boolean;
|
||||||
retrieve: boolean;
|
isCommentLoading: boolean;
|
||||||
comment: boolean;
|
isCommentDisable: boolean;
|
||||||
status: boolean;
|
isCommentDisable_main: boolean;
|
||||||
reminder: boolean;
|
|
||||||
};
|
|
||||||
isDisable_main: {
|
|
||||||
oreo: boolean;
|
|
||||||
pick: boolean;
|
|
||||||
retrieve: boolean;
|
|
||||||
comment: boolean;
|
|
||||||
};
|
|
||||||
reminderList: Array<number>;
|
|
||||||
statusToBe: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class TicketDetail extends Component<{}, TicketDetailState> {
|
export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
state: Readonly<TicketDetailState> = {
|
state: Readonly<TicketDetailState> = {
|
||||||
id: 0,
|
id: 0,
|
||||||
isMember: false,
|
isMember: false,
|
||||||
show: {
|
showOreoModal: false,
|
||||||
modal: {
|
showCommentLayout: false,
|
||||||
oreo: false,
|
showRetrieveModal: false,
|
||||||
retrieve: false,
|
showStatusSheet: false,
|
||||||
pick: false,
|
showPickModal: false,
|
||||||
},
|
|
||||||
layout: {
|
|
||||||
comment: false,
|
|
||||||
reminder: false,
|
|
||||||
},
|
|
||||||
actionSheet: {
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
comment: '',
|
comment: '',
|
||||||
isLoading: {
|
isOreoLoading: false,
|
||||||
oreo: false,
|
isOreoDisable: false,
|
||||||
pick: false,
|
isOreoDisable_main: false,
|
||||||
retrieve: false,
|
isPickLoading: false,
|
||||||
comment: false,
|
isPickDisable: false,
|
||||||
status: false,
|
isPickDisable_main: false,
|
||||||
reminder: false,
|
isRetrieveLoading: false,
|
||||||
},
|
isRetrieveDisable: false,
|
||||||
isDisable: {
|
isRetrieveDisable_main: false,
|
||||||
oreo: false,
|
isStatusLoading: false,
|
||||||
pick: false,
|
isStatusDisable: false,
|
||||||
retrieve: false,
|
isCommentLoading: false,
|
||||||
comment: false,
|
isCommentDisable: false,
|
||||||
status: false,
|
isCommentDisable_main: false,
|
||||||
reminder: false,
|
|
||||||
},
|
|
||||||
isDisable_main: {
|
|
||||||
oreo: false,
|
|
||||||
pick: false,
|
|
||||||
retrieve: false,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
reminderList: [],
|
|
||||||
// eslint-disable-next-line react/no-unused-state
|
|
||||||
statusToBe: 0,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount(): void {
|
componentDidMount(): void {
|
||||||
|
|
@ -129,157 +88,73 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
|
|
||||||
onAddToOreo(): void {
|
onAddToOreo(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showOreoModal: true,
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
oreo: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddComment(): void {
|
onAddComment(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showCommentLayout: true,
|
||||||
...this.state.show,
|
|
||||||
layout: {
|
|
||||||
...this.state.show.layout,
|
|
||||||
comment: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onRetrieved(): void {
|
onRetrieved(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showRetrieveModal: true,
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
retrieve: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onPick(): void {
|
onPick(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showPickModal: true,
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
pick: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeStatus(): void {
|
onChangeStatus(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showStatusSheet: true,
|
||||||
...this.state.show,
|
|
||||||
actionSheet: {
|
|
||||||
...this.state.show.actionSheet,
|
|
||||||
status: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOreoCancel(): void {
|
handleOreoCancel(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showOreoModal: false,
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
oreo: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleCommentCancel(): void {
|
handleCommentCancel(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showCommentLayout: false,
|
||||||
...this.state.show,
|
|
||||||
layout: {
|
|
||||||
...this.state.show.layout,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleReminderCancel(): void {
|
|
||||||
this.setState({
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
layout: {
|
|
||||||
...this.state.show.layout,
|
|
||||||
reminder: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleRetrieveCancel(): void {
|
handleRetrieveCancel(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showRetrieveModal: false,
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
retrieve: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleStatusCancel(): void {
|
handleStatusCancel(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showStatusSheet: false,
|
||||||
...this.state.show,
|
|
||||||
actionSheet: {
|
|
||||||
...this.state.show.actionSheet,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePickCancel(): void {
|
handlePickCancel(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
show: {
|
showPickModal: false,
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
pick: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOreoConfirm(): void {
|
handleOreoConfirm(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isOreoDisable: true,
|
||||||
...this.state.isDisable,
|
showOreoModal: false,
|
||||||
oreo: true,
|
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
oreo: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
addToOreo(this);
|
addToOreo(this);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isOreoDisable: false,
|
||||||
...this.state.isDisable,
|
|
||||||
oreo: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}, submitInterval);
|
}, submitInterval);
|
||||||
return;
|
return;
|
||||||
|
|
@ -287,25 +162,13 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
|
|
||||||
handleRetrieveConfirm(): void {
|
handleRetrieveConfirm(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isRetrieveDisable: true,
|
||||||
...this.state.isDisable,
|
showRetrieveModal: false,
|
||||||
retrieve: true,
|
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
retrieve: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
retrieve(this);
|
retrieve(this);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isRetrieveDisable: false,
|
||||||
...this.state.isDisable,
|
|
||||||
retrieve: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}, submitInterval);
|
}, submitInterval);
|
||||||
return;
|
return;
|
||||||
|
|
@ -313,73 +176,27 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
|
|
||||||
handlePickConfirm(): void {
|
handlePickConfirm(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isPickDisable: true,
|
||||||
...this.state.isDisable,
|
showPickModal: false,
|
||||||
pick: true,
|
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
modal: {
|
|
||||||
...this.state.show.modal,
|
|
||||||
pick: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
pickTicket(this);
|
pickTicket(this);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isPickDisable: false,
|
||||||
...this.state.isDisable,
|
|
||||||
pick: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}, submitInterval);
|
}, submitInterval);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleStatusChange(status: number): void {
|
handleStatusChange(status: number): void {
|
||||||
if (status == 3 || status == 5 || status == 7) {
|
this.setState({
|
||||||
this.setState({
|
showStatusSheet: false,
|
||||||
isDisable: {
|
isStatusDisable: true,
|
||||||
...this.state.isDisable,
|
});
|
||||||
status: true,
|
changeStatus(this, status);
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
actionSheet: {
|
|
||||||
...this.state.show.actionSheet,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
layout: {
|
|
||||||
...this.state.show.layout,
|
|
||||||
reminder: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// eslint-disable-next-line react/no-unused-state
|
|
||||||
statusToBe: status,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.setState({
|
|
||||||
isDisable: {
|
|
||||||
...this.state.isDisable,
|
|
||||||
status: true,
|
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
actionSheet: {
|
|
||||||
...this.state.show.actionSheet,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
changeStatus(this);
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isStatusDisable: false,
|
||||||
...this.state.isDisable,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}, submitInterval);
|
}, submitInterval);
|
||||||
return;
|
return;
|
||||||
|
|
@ -394,17 +211,8 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
|
|
||||||
onCommentSubmit() {
|
onCommentSubmit() {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isCommentDisable: true,
|
||||||
...this.state.isDisable,
|
showCommentLayout: false,
|
||||||
comment: true,
|
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
layout: {
|
|
||||||
...this.state.show.layout,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
if (this.state.comment == '') {
|
if (this.state.comment == '') {
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
|
|
@ -413,10 +221,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isCommentDisable: false,
|
||||||
...this.state.isDisable,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}, submitInterval);
|
}, submitInterval);
|
||||||
return;
|
return;
|
||||||
|
|
@ -424,81 +229,11 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
submitComment(this);
|
submitComment(this);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDisable: {
|
isCommentDisable: false,
|
||||||
...this.state.isDisable,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}, submitInterval);
|
}, submitInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleReminderChange(reminderList: Array<number>) {
|
|
||||||
this.setState({
|
|
||||||
reminderList: reminderList,
|
|
||||||
});
|
|
||||||
return reminderList;
|
|
||||||
}
|
|
||||||
|
|
||||||
onReminderSubmit() {
|
|
||||||
if (
|
|
||||||
this.state.reminderList.includes(1) &&
|
|
||||||
this.state.reminderList.includes(3)
|
|
||||||
) {
|
|
||||||
this.setState({
|
|
||||||
isDisable: {
|
|
||||||
...this.state.isDisable,
|
|
||||||
reminder: true,
|
|
||||||
},
|
|
||||||
show: {
|
|
||||||
...this.state.show,
|
|
||||||
layout: {
|
|
||||||
...this.state.show.layout,
|
|
||||||
reminder: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
changeStatus(this);
|
|
||||||
} else {
|
|
||||||
this.setState({
|
|
||||||
isDisable: {
|
|
||||||
...this.state.isDisable,
|
|
||||||
reminder: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
Taro.atMessage({
|
|
||||||
message: pt.get().ticketDetail.reminder.error,
|
|
||||||
type: 'error',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
this.setState({
|
|
||||||
isDisable: {
|
|
||||||
...this.state.isDisable,
|
|
||||||
reminder: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}, submitInterval);
|
|
||||||
}
|
|
||||||
|
|
||||||
reminderOption = [
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: pt.get().ticketDetail.reminder.r0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: pt.get().ticketDetail.reminder.r1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: pt.get().ticketDetail.reminder.r2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 3,
|
|
||||||
label: pt.get().ticketDetail.reminder.r3,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
const middleButton = this.state.isMember ? (
|
const middleButton = this.state.isMember ? (
|
||||||
<View>
|
<View>
|
||||||
|
|
@ -511,14 +246,14 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
>
|
>
|
||||||
<AtButton
|
<AtButton
|
||||||
loading={this.state.isLoading.pick}
|
loading={this.state.isPickLoading}
|
||||||
disabled={
|
disabled={
|
||||||
this.state.isDisable.pick || this.state.isDisable_main.pick
|
this.state.isPickDisable || this.state.isPickDisable_main
|
||||||
}
|
}
|
||||||
type='secondary'
|
type='secondary'
|
||||||
onClick={this.onPick.bind(this)}
|
onClick={this.onPick.bind(this)}
|
||||||
>
|
>
|
||||||
{pt.get().ticketDetail.button.pick}
|
{pt.get().ticketDetail.pick}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
|
|
@ -526,14 +261,14 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
>
|
>
|
||||||
<AtButton
|
<AtButton
|
||||||
loading={this.state.isLoading.oreo}
|
loading={this.state.isOreoLoading}
|
||||||
disabled={
|
disabled={
|
||||||
this.state.isDisable.oreo || this.state.isDisable_main.oreo
|
this.state.isOreoDisable || this.state.isOreoDisable_main
|
||||||
}
|
}
|
||||||
type='primary'
|
type='primary'
|
||||||
onClick={this.onAddToOreo.bind(this)}
|
onClick={this.onAddToOreo.bind(this)}
|
||||||
>
|
>
|
||||||
{pt.get().ticketDetail.button.addToOreo}
|
{pt.get().ticketDetail.addToOreo}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
@ -546,12 +281,12 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
>
|
>
|
||||||
<AtButton
|
<AtButton
|
||||||
loading={this.state.isLoading.status}
|
loading={this.state.isStatusLoading}
|
||||||
disabled={this.state.isDisable.status}
|
disabled={this.state.isStatusDisable}
|
||||||
type='primary'
|
type='primary'
|
||||||
onClick={this.onChangeStatus.bind(this)}
|
onClick={this.onChangeStatus.bind(this)}
|
||||||
>
|
>
|
||||||
{pt.get().ticketDetail.button.status}
|
{pt.get().ticketDetail.status.button}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
|
|
@ -560,14 +295,13 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
>
|
>
|
||||||
<AtButton
|
<AtButton
|
||||||
disabled={
|
disabled={
|
||||||
this.state.isDisable.comment ||
|
this.state.isCommentDisable || this.state.isCommentDisable_main
|
||||||
this.state.isDisable_main.comment
|
|
||||||
}
|
}
|
||||||
loading={this.state.isLoading.comment}
|
loading={this.state.isCommentLoading}
|
||||||
type='secondary'
|
type='secondary'
|
||||||
onClick={this.onAddComment.bind(this)}
|
onClick={this.onAddComment.bind(this)}
|
||||||
>
|
>
|
||||||
{pt.get().ticketDetail.button.addNote}
|
{pt.get().ticketDetail.addNote}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
@ -582,15 +316,14 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
style={{ marginLeft: '20rpx', paddingRight: '10rpx', width: '50%' }}
|
||||||
>
|
>
|
||||||
<AtButton
|
<AtButton
|
||||||
loading={this.state.isLoading.retrieve}
|
loading={this.state.isRetrieveLoading}
|
||||||
disabled={
|
disabled={
|
||||||
this.state.isDisable.retrieve ||
|
this.state.isRetrieveDisable || this.state.isRetrieveDisable_main
|
||||||
this.state.isDisable_main.retrieve
|
|
||||||
}
|
}
|
||||||
type='primary'
|
type='primary'
|
||||||
onClick={this.onRetrieved.bind(this)}
|
onClick={this.onRetrieved.bind(this)}
|
||||||
>
|
>
|
||||||
{pt.get().ticketDetail.button.tookAway}
|
{pt.get().ticketDetail.tookAway}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
|
|
@ -599,38 +332,18 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
>
|
>
|
||||||
<AtButton
|
<AtButton
|
||||||
disabled={
|
disabled={
|
||||||
this.state.isDisable.comment || this.state.isDisable_main.comment
|
this.state.isCommentDisable || this.state.isCommentDisable_main
|
||||||
}
|
}
|
||||||
loading={this.state.isLoading.comment}
|
loading={this.state.isCommentLoading}
|
||||||
type='secondary'
|
type='secondary'
|
||||||
onClick={this.onAddComment.bind(this)}
|
onClick={this.onAddComment.bind(this)}
|
||||||
>
|
>
|
||||||
{pt.get().ticketDetail.button.addNote}
|
{pt.get().ticketDetail.addNote}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
||||||
const actionSheetItemList: Array<StatusStr> = [
|
|
||||||
'0',
|
|
||||||
'1',
|
|
||||||
'2',
|
|
||||||
'3',
|
|
||||||
'4',
|
|
||||||
'5',
|
|
||||||
'6',
|
|
||||||
'7',
|
|
||||||
];
|
|
||||||
|
|
||||||
const sheetItemsRenderer = actionSheetItemList.map((item, idx) => (
|
|
||||||
<AtActionSheetItem
|
|
||||||
key={idx}
|
|
||||||
onClick={this.handleStatusChange.bind(this, idx)}
|
|
||||||
>
|
|
||||||
{pt.get().ticketDetail.statusModifyMessage.get(item)}
|
|
||||||
</AtActionSheetItem>
|
|
||||||
));
|
|
||||||
|
|
||||||
const isInfoShow = {
|
const isInfoShow = {
|
||||||
device: true,
|
device: true,
|
||||||
createdTime: true,
|
createdTime: true,
|
||||||
|
|
@ -645,7 +358,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
<View>
|
<View>
|
||||||
<AtMessage />
|
<AtMessage />
|
||||||
<AtModal
|
<AtModal
|
||||||
isOpened={this.state.show.modal.oreo}
|
isOpened={this.state.showOreoModal}
|
||||||
title={pt.get().modal.addToOreo.title}
|
title={pt.get().modal.addToOreo.title}
|
||||||
cancelText={pt.get().modal.cancel}
|
cancelText={pt.get().modal.cancel}
|
||||||
confirmText={pt.get().modal.confirm}
|
confirmText={pt.get().modal.confirm}
|
||||||
|
|
@ -654,7 +367,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
content={pt.get().modal.addToOreo.content}
|
content={pt.get().modal.addToOreo.content}
|
||||||
/>
|
/>
|
||||||
<AtModal
|
<AtModal
|
||||||
isOpened={this.state.show.modal.retrieve}
|
isOpened={this.state.showRetrieveModal}
|
||||||
title={pt.get().modal.retrieve.title}
|
title={pt.get().modal.retrieve.title}
|
||||||
cancelText={pt.get().modal.cancel}
|
cancelText={pt.get().modal.cancel}
|
||||||
confirmText={pt.get().modal.confirm}
|
confirmText={pt.get().modal.confirm}
|
||||||
|
|
@ -663,7 +376,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
content={pt.get().modal.retrieve.content}
|
content={pt.get().modal.retrieve.content}
|
||||||
/>
|
/>
|
||||||
<AtModal
|
<AtModal
|
||||||
isOpened={this.state.show.modal.pick}
|
isOpened={this.state.showPickModal}
|
||||||
title={pt.get().modal.pick.title}
|
title={pt.get().modal.pick.title}
|
||||||
cancelText={pt.get().modal.cancel}
|
cancelText={pt.get().modal.cancel}
|
||||||
confirmText={pt.get().modal.confirm}
|
confirmText={pt.get().modal.confirm}
|
||||||
|
|
@ -672,7 +385,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
content={pt.get().modal.pick.content}
|
content={pt.get().modal.pick.content}
|
||||||
/>
|
/>
|
||||||
<AtFloatLayout
|
<AtFloatLayout
|
||||||
isOpened={this.state.show.layout.comment}
|
isOpened={this.state.showCommentLayout}
|
||||||
title={pt.get().ticketDetail.comment.title}
|
title={pt.get().ticketDetail.comment.title}
|
||||||
onClose={this.handleCommentCancel.bind(this)}
|
onClose={this.handleCommentCancel.bind(this)}
|
||||||
>
|
>
|
||||||
|
|
@ -689,35 +402,37 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</AtForm>
|
</AtForm>
|
||||||
</AtFloatLayout>
|
</AtFloatLayout>
|
||||||
<AtFloatLayout
|
|
||||||
isOpened={this.state.show.layout.reminder}
|
|
||||||
title={pt.get().ticketDetail.reminder.title}
|
|
||||||
onClose={this.handleReminderCancel.bind(this)}
|
|
||||||
>
|
|
||||||
<AtForm onSubmit={this.onReminderSubmit.bind(this)}>
|
|
||||||
<AtCheckbox
|
|
||||||
options={this.reminderOption}
|
|
||||||
selectedList={this.state.reminderList}
|
|
||||||
onChange={this.handleReminderChange.bind(this)}
|
|
||||||
/>
|
|
||||||
<AtButton
|
|
||||||
loading={this.state.isLoading.reminder}
|
|
||||||
formType='submit'
|
|
||||||
type='primary'
|
|
||||||
disabled={this.state.isDisable.reminder}
|
|
||||||
>
|
|
||||||
{pt.get().button.buttonText.submit}
|
|
||||||
</AtButton>
|
|
||||||
</AtForm>
|
|
||||||
</AtFloatLayout>
|
|
||||||
<AtActionSheet
|
<AtActionSheet
|
||||||
isOpened={this.state.show.actionSheet.status}
|
isOpened={this.state.showStatusSheet}
|
||||||
cancelText={pt.get().ticketDetail.status.cancel}
|
cancelText={pt.get().ticketDetail.status.cancel}
|
||||||
title={pt.get().ticketDetail.status.title}
|
title={pt.get().ticketDetail.status.title}
|
||||||
onCancel={this.handleStatusCancel.bind(this)}
|
onCancel={this.handleStatusCancel.bind(this)}
|
||||||
onClose={this.handleStatusCancel.bind(this)}
|
onClose={this.handleStatusCancel.bind(this)}
|
||||||
>
|
>
|
||||||
{sheetItemsRenderer}
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 0)}>
|
||||||
|
{pt.get().ticketDetail.status.status0}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 1)}>
|
||||||
|
{pt.get().ticketDetail.status.status1}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 2)}>
|
||||||
|
{pt.get().ticketDetail.status.status2}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 3)}>
|
||||||
|
{pt.get().ticketDetail.status.status3}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 4)}>
|
||||||
|
{pt.get().ticketDetail.status.status4}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 5)}>
|
||||||
|
{pt.get().ticketDetail.status.status5}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 6)}>
|
||||||
|
{pt.get().ticketDetail.status.status6}
|
||||||
|
</AtActionSheetItem>
|
||||||
|
<AtActionSheetItem onClick={this.handleStatusChange.bind(this, 7)}>
|
||||||
|
{pt.get().ticketDetail.status.status7}
|
||||||
|
</AtActionSheetItem>
|
||||||
</AtActionSheet>
|
</AtActionSheet>
|
||||||
<DetailFramework
|
<DetailFramework
|
||||||
middleButton={middleButton}
|
middleButton={middleButton}
|
||||||
|
|
|
||||||
|
|
@ -30,4 +30,4 @@ export class ShowElements {
|
||||||
notelist: JSX.Element;
|
notelist: JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StatusStr = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
|
export type StatusStr = '1' | '2' | '3' | '4' | '5';
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ export default class TicketListPage extends Component<{}, TicketListState> {
|
||||||
<AtList>{fixListRenderer}</AtList>
|
<AtList>{fixListRenderer}</AtList>
|
||||||
<View style={{ marginTop: '40rpx' }}>
|
<View style={{ marginTop: '40rpx' }}>
|
||||||
<AtPagination
|
<AtPagination
|
||||||
icon
|
|
||||||
total={this.state.totalPage}
|
total={this.state.totalPage}
|
||||||
pageSize={this.state.pageSize}
|
pageSize={this.state.pageSize}
|
||||||
current={this.state.currentPage}
|
current={this.state.currentPage}
|
||||||
|
|
|
||||||
|
|
@ -6,24 +6,22 @@ import tick from '@/assets/icons/MainPage/tick.svg';
|
||||||
import cross from '@/assets/icons/MainPage/cross.svg';
|
import cross from '@/assets/icons/MainPage/cross.svg';
|
||||||
import clock from '@/assets/icons/MainPage/offduty.svg';
|
import clock from '@/assets/icons/MainPage/offduty.svg';
|
||||||
import wechatUser from '@/wechat';
|
import wechatUser from '@/wechat';
|
||||||
import moment from 'moment';
|
|
||||||
|
|
||||||
export class DutyData {
|
export class DutyData {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.isInDuty = false;
|
this.isInDuty = false;
|
||||||
this.inDutyCnt = 3;
|
this.inDutyCnt = 3;
|
||||||
this.currentDuty = '1';
|
this.currentDuty = '2';
|
||||||
this.otherDutyStart = '2024-03-07T13:30:48.523303';
|
this.otherDutyTime = '9:30-11:30';
|
||||||
this.otherDutyEnd = '2024-03-07T16:00:48.523303';
|
this.offDutyReason = '学园维修';
|
||||||
this.dutyRecoverTime = '明天 13:30';
|
this.dutyRecoverTime = '下周一';
|
||||||
this.place = '东三-204';
|
this.place = '东三-204';
|
||||||
}
|
}
|
||||||
|
|
||||||
isInDuty: boolean;
|
isInDuty: boolean;
|
||||||
inDutyCnt?: number;
|
inDutyCnt?: number;
|
||||||
currentDuty?: '0' | '1' | '2' | '3' | 'others';
|
currentDuty?: 'off' | '1' | '2' | '3' | 'others';
|
||||||
otherDutyStart?: string;
|
otherDutyTime?: string;
|
||||||
otherDutyEnd?: string;
|
|
||||||
offDutyReason?: string;
|
offDutyReason?: string;
|
||||||
dutyRecoverTime?: string;
|
dutyRecoverTime?: string;
|
||||||
place: string;
|
place: string;
|
||||||
|
|
@ -89,18 +87,8 @@ export class DutyInfo extends Component {
|
||||||
<Card isInDuty={data.isInDuty} place={data.place} />
|
<Card isInDuty={data.isInDuty} place={data.place} />
|
||||||
<AtTimeline
|
<AtTimeline
|
||||||
items={[
|
items={[
|
||||||
{
|
{ title: od.reason(data.offDutyReason as string) },
|
||||||
title:
|
{ title: od.recoverTime(data.dutyRecoverTime as string) },
|
||||||
data.currentDuty == '0'
|
|
||||||
? pt.get().mainPage.normal.reason
|
|
||||||
: od.reason(data.offDutyReason as string),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title:
|
|
||||||
data.currentDuty == '0'
|
|
||||||
? pt.get().mainPage.normal.recoverTime
|
|
||||||
: od.recoverTime(data.dutyRecoverTime as string),
|
|
||||||
},
|
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
@ -118,11 +106,8 @@ export class DutyInfo extends Component {
|
||||||
{
|
{
|
||||||
title:
|
title:
|
||||||
data.currentDuty == 'others'
|
data.currentDuty == 'others'
|
||||||
? id.currentDutyText('others') +
|
? id.currentDutyText('others') + data.otherDutyTime
|
||||||
moment(data.otherDutyStart).format('H:mm') +
|
: id.currentDutyText(data.currentDuty || 'off'),
|
||||||
' - ' +
|
|
||||||
moment(data.otherDutyEnd).format('H:mm')
|
|
||||||
: id.currentDutyText(data.currentDuty || '0'),
|
|
||||||
},
|
},
|
||||||
{ title: id.inDutyCnt(data.inDutyCnt as number) },
|
{ title: id.inDutyCnt(data.inDutyCnt as number) },
|
||||||
]}
|
]}
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@ export default class TitleCard extends React.Component {
|
||||||
<View className='page-title'>
|
<View className='page-title'>
|
||||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
{wechatUser.getAccess()
|
{wechatUser.getAccess()
|
||||||
? memberPage.titleLine.main.index + wechatUser.getInfo().name
|
? memberPage.mainTitleLine + wechatUser.getInfo().name
|
||||||
: mainPage.titleLine.main}
|
: mainPage.mainTitleLine}
|
||||||
</View>
|
</View>
|
||||||
<View className='at-article__h2'>
|
<View className='at-article__h2'>
|
||||||
{wechatUser.getAccess()
|
{wechatUser.getAccess()
|
||||||
? memberPage.titleLine.sub.index
|
? memberPage.subTitleLine
|
||||||
: mainPage.titleLine.sub}
|
: mainPage.subTitleLine}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -265,18 +265,12 @@ export default class MainPage extends Component<{}, MainPageState> {
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{wechatUser.getAccess() ? (
|
{wechatUser.getAccess() ? (
|
||||||
<View style={{ marginTop: '40rpx' }}>
|
<View>
|
||||||
<View
|
|
||||||
className='at-article__h3'
|
|
||||||
style={{ marginBottom: '20rpx', fontWeight: 'bold' }}
|
|
||||||
>
|
|
||||||
{memberPage.ticketList.hint}
|
|
||||||
</View>
|
|
||||||
<AtList>{fixListRenderer}</AtList>
|
<AtList>{fixListRenderer}</AtList>
|
||||||
<AtList>
|
<AtList>
|
||||||
<AtListItem
|
<AtListItem
|
||||||
title={pt.get().memberPage.ticketList.title}
|
title={pt.get().mainPage.ticketList.title}
|
||||||
note={pt.get().memberPage.ticketList.note}
|
note={pt.get().mainPage.ticketList.note}
|
||||||
arrow='right'
|
arrow='right'
|
||||||
thumb={clockIcon}
|
thumb={clockIcon}
|
||||||
onClick={this.ticketListPage}
|
onClick={this.ticketListPage}
|
||||||
|
|
|
||||||
|
|
@ -184,16 +184,9 @@ export default class RepairPage extends Component<{}, RepairPageState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): ReactNode {
|
render(): ReactNode {
|
||||||
const hasContinuingticket = this.state.currentTicketsIdName.length !== 0;
|
const ticketsRenderer =
|
||||||
const ticketsRenderer = hasContinuingticket ? (
|
this.state.currentTicketsIdName.length !== 0 ? (
|
||||||
<View>
|
this.state.currentTicketsIdName.map((pair, idx) => (
|
||||||
<View
|
|
||||||
className='at-article__h3'
|
|
||||||
style={{ marginBottom: '20rpx', fontWeight: 'bold' }}
|
|
||||||
>
|
|
||||||
{pt.get().repairPage.currentTicket.hint}
|
|
||||||
</View>
|
|
||||||
{this.state.currentTicketsIdName.map((pair, idx) => (
|
|
||||||
<AtCard
|
<AtCard
|
||||||
key={idx}
|
key={idx}
|
||||||
title={pair.values().next().value} //pair.keys().next().value == ticket['device'] + ' ' + ticket['deviceModel']
|
title={pair.values().next().value} //pair.keys().next().value == ticket['device'] + ' ' + ticket['deviceModel']
|
||||||
|
|
@ -217,16 +210,10 @@ export default class RepairPage extends Component<{}, RepairPageState> {
|
||||||
middleButton={middleButton}
|
middleButton={middleButton}
|
||||||
/>
|
/>
|
||||||
</AtCard>
|
</AtCard>
|
||||||
))}
|
))
|
||||||
</View>
|
) : (
|
||||||
) : (
|
<View></View>
|
||||||
<View
|
);
|
||||||
className='at-article__h3'
|
|
||||||
style={{ marginBottom: '20rpx', fontWeight: 'bold' }}
|
|
||||||
>
|
|
||||||
{pt.get().repairPage.currentTicket.nohint}
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<View style={{ width: '94%', marginLeft: '3%' }}>
|
<View style={{ width: '94%', marginLeft: '3%' }}>
|
||||||
<AtMessage />
|
<AtMessage />
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,10 @@ export default class UserMemberPage extends Component {
|
||||||
<AtMessage />
|
<AtMessage />
|
||||||
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
{pt.get().memberPage.titleLine.main.login}
|
{pt.get().memberPage.loginMainTitleLine}
|
||||||
</View>
|
</View>
|
||||||
<View className='at-article__h2'>
|
<View className='at-article__h2'>
|
||||||
{pt.get().memberPage.titleLine.sub.login}
|
{pt.get().memberPage.loginSubTitleLine}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<AtButton
|
<AtButton
|
||||||
|
|
@ -70,10 +70,10 @@ export default class UserMemberPage extends Component {
|
||||||
<AtMessage />
|
<AtMessage />
|
||||||
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
<View className='page-title' style={{ marginBottom: '40rpx' }}>
|
||||||
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
<View className='at-article__h1' style={{ fontWeight: 'bold' }}>
|
||||||
{pt.get().memberPage.titleLine.main.logout}
|
{pt.get().memberPage.logoutMainTitleLine}
|
||||||
</View>
|
</View>
|
||||||
<View className='at-article__h2'>
|
<View className='at-article__h2'>
|
||||||
{pt.get().memberPage.titleLine.sub.logout}
|
{pt.get().memberPage.logoutSubTitleLine}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<AtButton type='primary' onClick={this.onLogout.bind(this)}>
|
<AtButton type='primary' onClick={this.onLogout.bind(this)}>
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,9 @@ export default class UserPage extends Component {
|
||||||
if (this.state.clicks < 3) {
|
if (this.state.clicks < 3) {
|
||||||
this.setState({
|
this.setState({
|
||||||
toastText:
|
toastText:
|
||||||
pt.get().userPage.memberEntry.prefix +
|
pt.get().userPage.memberEntry.front +
|
||||||
(this.state.clicks + 1).toString() + // React State's feature
|
(this.state.clicks + 1).toString() + // React State's feature
|
||||||
pt.get().userPage.memberEntry.affix,
|
pt.get().userPage.memberEntry.behind,
|
||||||
isToastOpen: true,
|
isToastOpen: true,
|
||||||
});
|
});
|
||||||
if (this.state.clicks == 0) {
|
if (this.state.clicks == 0) {
|
||||||
|
|
@ -123,7 +123,7 @@ export default class UserPage extends Component {
|
||||||
className='at-row at-row__justify--center at-row__align--center'
|
className='at-row at-row__justify--center at-row__align--center'
|
||||||
style='height:120rpx;color:#696969;'
|
style='height:120rpx;color:#696969;'
|
||||||
>
|
>
|
||||||
<Text style={{ fontSize: '32rpx' }}> EVA Eta v1.0.2</Text>
|
<Text style={{ fontSize: '32rpx' }}> EVA Eta v1.0.0</Text>
|
||||||
</View>
|
</View>
|
||||||
<AtList>
|
<AtList>
|
||||||
<AtListItem
|
<AtListItem
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,14 @@
|
||||||
export interface NotFoundText {
|
export interface NotFoundText {
|
||||||
title: {
|
titleZhCn: string;
|
||||||
ZhCn: string;
|
titleEnUs: string;
|
||||||
EnUs: string;
|
descZhCn: string;
|
||||||
};
|
descEnUs: string;
|
||||||
desc: {
|
|
||||||
ZhCn: string;
|
|
||||||
EnUs: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const notFound: NotFoundText = {
|
export const notFound: NotFoundText = {
|
||||||
title: {
|
titleZhCn: '啊哦...请求出错了...',
|
||||||
ZhCn: '啊哦...请求出错了...',
|
descZhCn: '请确保处于校网环境后,点击右上角 "...-重新进入小程序"!',
|
||||||
EnUs: 'Oops...Network Error...',
|
titleEnUs: 'Oops...Network Error...',
|
||||||
},
|
descEnUs:
|
||||||
desc: {
|
'Please make sure you\'re in ZJU\'s school network environment and then click on the top right corner "... - re-enter the applet"!',
|
||||||
ZhCn: '请确保处于校网环境后,点击右上角 "...-重新进入小程序"!',
|
|
||||||
EnUs: 'Please make sure you\'re in ZJU\'s school network environment and then click on the top right corner "... - re-enter the applet"!',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
export interface MainPageText {
|
export interface MainPageText {
|
||||||
normal: {
|
mainTitleLine: string;
|
||||||
recoverTime: string;
|
subTitleLine: string;
|
||||||
reason: string;
|
|
||||||
};
|
|
||||||
titleLine: {
|
|
||||||
main: string;
|
|
||||||
sub: string;
|
|
||||||
};
|
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
dutyInfo: string;
|
dutyInfo: string;
|
||||||
stepInfo: string;
|
stepInfo: string;
|
||||||
|
|
@ -29,6 +23,11 @@ export interface MainPageText {
|
||||||
stepList: Array<{ title: string }>;
|
stepList: Array<{ title: string }>;
|
||||||
tipsList: Array<{ title: string }>;
|
tipsList: Array<{ title: string }>;
|
||||||
|
|
||||||
|
ticketList: {
|
||||||
|
title: string;
|
||||||
|
note: string;
|
||||||
|
};
|
||||||
|
|
||||||
dutyCard: {
|
dutyCard: {
|
||||||
offDuty: {
|
offDuty: {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
@ -37,21 +36,15 @@ export interface MainPageText {
|
||||||
};
|
};
|
||||||
inDuty: {
|
inDuty: {
|
||||||
title: string;
|
title: string;
|
||||||
currentDutyText: (c: '0' | '1' | '2' | '3' | 'others') => string;
|
currentDutyText: (c: 'off' | '1' | '2' | '3' | 'others') => string;
|
||||||
inDutyCnt: (n: number) => string;
|
inDutyCnt: (n: number) => string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mainPageZhCn: MainPageText = {
|
export const mainPageZhCn: MainPageText = {
|
||||||
normal: {
|
mainTitleLine: '您好,这里是E志者协会',
|
||||||
recoverTime: '明天 13:30',
|
subTitleLine: '维修请至【东三-204】实验室',
|
||||||
reason: '正常下班',
|
|
||||||
},
|
|
||||||
titleLine: {
|
|
||||||
main: '您好,这里是E志者协会',
|
|
||||||
sub: '维修请至【东三-204】实验室',
|
|
||||||
},
|
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
dutyInfo: '值班情况',
|
dutyInfo: '值班情况',
|
||||||
stepInfo: '维修步骤',
|
stepInfo: '维修步骤',
|
||||||
|
|
@ -83,6 +76,10 @@ export const mainPageZhCn: MainPageText = {
|
||||||
{ title: '204 也是实验室,请勿在内饮食~' },
|
{ title: '204 也是实验室,请勿在内饮食~' },
|
||||||
{ title: '我们是志愿服务,不收取任何礼物哦~' },
|
{ title: '我们是志愿服务,不收取任何礼物哦~' },
|
||||||
],
|
],
|
||||||
|
ticketList: {
|
||||||
|
title: '预填写工单列表',
|
||||||
|
note: '在这里查看所有的预填写工单!',
|
||||||
|
},
|
||||||
dutyCard: {
|
dutyCard: {
|
||||||
offDuty: {
|
offDuty: {
|
||||||
title: '未值班',
|
title: '未值班',
|
||||||
|
|
@ -93,7 +90,7 @@ export const mainPageZhCn: MainPageText = {
|
||||||
title: '值班中',
|
title: '值班中',
|
||||||
currentDutyText: (c) => {
|
currentDutyText: (c) => {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '0':
|
case 'off':
|
||||||
return '当前未值班';
|
return '当前未值班';
|
||||||
case '1':
|
case '1':
|
||||||
return '第一班 13:30-16:00';
|
return '第一班 13:30-16:00';
|
||||||
|
|
@ -111,14 +108,8 @@ export const mainPageZhCn: MainPageText = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mainPageEnUs: MainPageText = {
|
export const mainPageEnUs: MainPageText = {
|
||||||
normal: {
|
mainTitleLine: 'Hi! This is EVA.',
|
||||||
recoverTime: 'Tomorrow 13:30',
|
subTitleLine: 'For maintenance, please go to [204 Lab, E3 building]',
|
||||||
reason: 'Normal shift',
|
|
||||||
},
|
|
||||||
titleLine: {
|
|
||||||
main: 'Hi! This is EVA.',
|
|
||||||
sub: 'For maintenance, please go to [204 Lab, E3 building]',
|
|
||||||
},
|
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
dutyInfo: 'Duty Situation',
|
dutyInfo: 'Duty Situation',
|
||||||
stepInfo: 'Maintenance Steps',
|
stepInfo: 'Maintenance Steps',
|
||||||
|
|
@ -150,6 +141,10 @@ export const mainPageEnUs: MainPageText = {
|
||||||
{ title: '204 is also a laboratory. Do not eat inside.' },
|
{ title: '204 is also a laboratory. Do not eat inside.' },
|
||||||
{ title: 'We are volunteers and do not take any gifts.' },
|
{ title: 'We are volunteers and do not take any gifts.' },
|
||||||
],
|
],
|
||||||
|
ticketList: {
|
||||||
|
title: 'Pre-filling ticket list',
|
||||||
|
note: 'Browse for all pre-filling tickets here!',
|
||||||
|
},
|
||||||
dutyCard: {
|
dutyCard: {
|
||||||
offDuty: {
|
offDuty: {
|
||||||
title: 'Off Duty',
|
title: 'Off Duty',
|
||||||
|
|
@ -160,8 +155,8 @@ export const mainPageEnUs: MainPageText = {
|
||||||
title: 'On Duty',
|
title: 'On Duty',
|
||||||
currentDutyText: (c) => {
|
currentDutyText: (c) => {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '0':
|
case 'off':
|
||||||
return 'Normal Shift';
|
return 'Currently not on duty';
|
||||||
case '1':
|
case '1':
|
||||||
return '1st Shift 13:30-16:00';
|
return '1st Shift 13:30-16:00';
|
||||||
case '2':
|
case '2':
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,10 @@
|
||||||
export interface MemberPageText {
|
export interface MemberPageText {
|
||||||
titleLine: {
|
mainTitleLine: string;
|
||||||
main: {
|
subTitleLine: string;
|
||||||
index: string;
|
loginMainTitleLine: string;
|
||||||
login: string;
|
loginSubTitleLine: string;
|
||||||
logout: string;
|
logoutMainTitleLine: string;
|
||||||
};
|
logoutSubTitleLine: string;
|
||||||
sub: {
|
|
||||||
index: string;
|
|
||||||
login: string;
|
|
||||||
logout: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
dutyInfo: string;
|
dutyInfo: string;
|
||||||
stepInfo: string;
|
stepInfo: string;
|
||||||
|
|
@ -28,6 +22,9 @@ export interface MemberPageText {
|
||||||
title: string;
|
title: string;
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
};
|
};
|
||||||
|
uncompletedTicket: {
|
||||||
|
extra: string;
|
||||||
|
};
|
||||||
dutyCard: {
|
dutyCard: {
|
||||||
offDuty: {
|
offDuty: {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
@ -57,33 +54,22 @@ export interface MemberPageText {
|
||||||
};
|
};
|
||||||
stepList: Array<{ title: string }>;
|
stepList: Array<{ title: string }>;
|
||||||
tipsList: Array<{ title: string }>;
|
tipsList: Array<{ title: string }>;
|
||||||
ticketList: {
|
|
||||||
hint: string;
|
|
||||||
title: string;
|
|
||||||
note: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const memberPageZhCn: MemberPageText = {
|
export const memberPageZhCn: MemberPageText = {
|
||||||
titleLine: {
|
mainTitleLine: '您好,',
|
||||||
main: {
|
subTitleLine: '祝你满绩每一天',
|
||||||
index: '您好,',
|
loginMainTitleLine: '协会成员登录入口',
|
||||||
login: '协会成员登录入口',
|
loginSubTitleLine: '请使用 EVA 统一身份认证,登录后点击下方按钮以扫描二维码',
|
||||||
logout: '协会成员登出',
|
logoutMainTitleLine: '协会成员登出',
|
||||||
},
|
logoutSubTitleLine: '登出后须扫码重新登录!',
|
||||||
sub: {
|
|
||||||
index: '祝你满绩每一天',
|
|
||||||
login: '请使用 EVA 统一身份认证,登录后点击下方按钮以扫描二维码',
|
|
||||||
logout: '登出后须扫码重新登录!',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
dutyInfo: '值班情况',
|
dutyInfo: '值班情况',
|
||||||
stepInfo: '维修步骤',
|
stepInfo: '维修步骤',
|
||||||
tipsInfo: '注意事项',
|
tipsInfo: '注意事项',
|
||||||
},
|
},
|
||||||
dutyCount: {
|
dutyCount: {
|
||||||
button: '更新',
|
button: '更新值班人数',
|
||||||
text: '当前值班人数:',
|
text: '当前值班人数:',
|
||||||
},
|
},
|
||||||
stuidText: {
|
stuidText: {
|
||||||
|
|
@ -94,6 +80,9 @@ export const memberPageZhCn: MemberPageText = {
|
||||||
title: '密码',
|
title: '密码',
|
||||||
placeholder: '与 EVA 统一身份认证一致',
|
placeholder: '与 EVA 统一身份认证一致',
|
||||||
},
|
},
|
||||||
|
uncompletedTicket: {
|
||||||
|
extra: '详细信息',
|
||||||
|
},
|
||||||
dutyCard: {
|
dutyCard: {
|
||||||
offDuty: {
|
offDuty: {
|
||||||
title: '空闲',
|
title: '空闲',
|
||||||
|
|
@ -146,34 +135,23 @@ export const memberPageZhCn: MemberPageText = {
|
||||||
{ title: '离开 204 前清点好维修物资!' },
|
{ title: '离开 204 前清点好维修物资!' },
|
||||||
{ title: '螺丝上了吗?电源排线插了吗?' },
|
{ title: '螺丝上了吗?电源排线插了吗?' },
|
||||||
],
|
],
|
||||||
ticketList: {
|
|
||||||
hint: '七日内未完成工单',
|
|
||||||
title: '预填写工单列表',
|
|
||||||
note: '在这里查看所有的预填写工单!',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const memberPageEnUs: MemberPageText = {
|
export const memberPageEnUs: MemberPageText = {
|
||||||
titleLine: {
|
mainTitleLine: 'Hi! ',
|
||||||
main: {
|
subTitleLine: 'Have a great day!',
|
||||||
index: 'Hi! ',
|
loginMainTitleLine: 'EVA Member Entry',
|
||||||
login: 'EVA Member Entry',
|
loginSubTitleLine:
|
||||||
logout: 'EVA Member Logout',
|
'Please use EVA Auth, log in and click the button below to scan the QR code',
|
||||||
},
|
logoutMainTitleLine: 'EVA Member Logout',
|
||||||
sub: {
|
logoutSubTitleLine: 'After logging out, scan the code again to log back in!',
|
||||||
index: 'Have a great day!',
|
|
||||||
login:
|
|
||||||
'Please use EVA Auth, log in and click the button below to scan the QR code',
|
|
||||||
logout: 'After logging out, scan the code again to log back in!',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
dutyInfo: 'Duty Situation',
|
dutyInfo: 'Duty Situation',
|
||||||
stepInfo: 'Maintenance Steps',
|
stepInfo: 'Maintenance Steps',
|
||||||
tipsInfo: 'Tips',
|
tipsInfo: 'Tips',
|
||||||
},
|
},
|
||||||
dutyCount: {
|
dutyCount: {
|
||||||
button: 'Update',
|
button: 'Update Duty Count',
|
||||||
text: 'The duty count: ',
|
text: 'The duty count: ',
|
||||||
},
|
},
|
||||||
stuidText: {
|
stuidText: {
|
||||||
|
|
@ -184,6 +162,9 @@ export const memberPageEnUs: MemberPageText = {
|
||||||
title: 'Password',
|
title: 'Password',
|
||||||
placeholder: 'Consistent with EVA Auth',
|
placeholder: 'Consistent with EVA Auth',
|
||||||
},
|
},
|
||||||
|
uncompletedTicket: {
|
||||||
|
extra: 'Details',
|
||||||
|
},
|
||||||
dutyCard: {
|
dutyCard: {
|
||||||
offDuty: {
|
offDuty: {
|
||||||
title: 'Off Duty',
|
title: 'Off Duty',
|
||||||
|
|
@ -240,9 +221,4 @@ export const memberPageEnUs: MemberPageText = {
|
||||||
{ title: '204 is a laboratory. Do not eat inside.' },
|
{ title: '204 is a laboratory. Do not eat inside.' },
|
||||||
{ title: 'Are the screws on? Is the power cable plugged in?' },
|
{ title: 'Are the screws on? Is the power cable plugged in?' },
|
||||||
],
|
],
|
||||||
ticketList: {
|
|
||||||
hint: 'Uncompleted tickets in 7 days',
|
|
||||||
title: 'Pre-filling ticket list',
|
|
||||||
note: 'Browse for all pre-filling tickets here!',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ export interface RepairPageText {
|
||||||
title: string;
|
title: string;
|
||||||
note: string;
|
note: string;
|
||||||
extra: string;
|
extra: string;
|
||||||
hint: string;
|
|
||||||
nohint: string;
|
|
||||||
};
|
};
|
||||||
typeText: {
|
typeText: {
|
||||||
computer: string;
|
computer: string;
|
||||||
|
|
@ -53,8 +51,6 @@ export const repairPageZhCn: RepairPageText = {
|
||||||
title: '',
|
title: '',
|
||||||
note: '',
|
note: '',
|
||||||
extra: '详细信息',
|
extra: '详细信息',
|
||||||
hint: '我正在进行的工单',
|
|
||||||
nohint: '暂无进行中的工单',
|
|
||||||
},
|
},
|
||||||
typeText: {
|
typeText: {
|
||||||
computer: '电脑',
|
computer: '电脑',
|
||||||
|
|
@ -102,8 +98,6 @@ export const repairPageEnUs: RepairPageText = {
|
||||||
title: '',
|
title: '',
|
||||||
note: '',
|
note: '',
|
||||||
extra: 'Details',
|
extra: 'Details',
|
||||||
hint: 'My continuing tickets',
|
|
||||||
nohint: 'No continuing tickets',
|
|
||||||
},
|
},
|
||||||
typeText: {
|
typeText: {
|
||||||
computer: 'Computer',
|
computer: 'Computer',
|
||||||
|
|
|
||||||
|
|
@ -6,39 +6,35 @@ type StatusStr = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
|
||||||
|
|
||||||
export interface TicketDetailText {
|
export interface TicketDetailText {
|
||||||
stepItems: Array<StepItem>;
|
stepItems: Array<StepItem>;
|
||||||
|
createTicketMessage: string;
|
||||||
|
statusModifyPrefix: string;
|
||||||
statusModifyMessage: Map<StatusStr, string>;
|
statusModifyMessage: Map<StatusStr, string>;
|
||||||
desc: {
|
descTitle: string;
|
||||||
title: string;
|
|
||||||
};
|
|
||||||
divider: string;
|
divider: string;
|
||||||
info: {
|
info: {
|
||||||
title: string;
|
title: string;
|
||||||
extra: string;
|
extra: string;
|
||||||
};
|
};
|
||||||
button: {
|
tookAway: string;
|
||||||
tookAway: string;
|
addToOreo: string;
|
||||||
addToOreo: string;
|
addNote: string;
|
||||||
addNote: string;
|
pick: string;
|
||||||
pick: string;
|
|
||||||
status: string;
|
|
||||||
};
|
|
||||||
reminder: {
|
|
||||||
title: string;
|
|
||||||
error: string;
|
|
||||||
r0: string;
|
|
||||||
r1: string;
|
|
||||||
r2: string;
|
|
||||||
r3: string;
|
|
||||||
};
|
|
||||||
comment: {
|
comment: {
|
||||||
title: string;
|
title: string;
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
createTicketMessage: string;
|
|
||||||
statusModifyPrefix: string;
|
|
||||||
};
|
};
|
||||||
status: {
|
status: {
|
||||||
|
button: string;
|
||||||
title: string;
|
title: string;
|
||||||
cancel: string;
|
cancel: string;
|
||||||
|
status0: string;
|
||||||
|
status1: string;
|
||||||
|
status2: string;
|
||||||
|
status3: string;
|
||||||
|
status4: string;
|
||||||
|
status5: string;
|
||||||
|
status6: string;
|
||||||
|
status7: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -49,6 +45,8 @@ export const ticketDetailZhCn: TicketDetailText = {
|
||||||
{ title: '待取回' },
|
{ title: '待取回' },
|
||||||
{ title: '工单完成' },
|
{ title: '工单完成' },
|
||||||
],
|
],
|
||||||
|
createTicketMessage: '创建了维修',
|
||||||
|
statusModifyPrefix: '将维修状态改为:',
|
||||||
statusModifyMessage: new Map<StatusStr, string>([
|
statusModifyMessage: new Map<StatusStr, string>([
|
||||||
['0', '已创建/交接中'],
|
['0', '已创建/交接中'],
|
||||||
['1', '维修中'],
|
['1', '维修中'],
|
||||||
|
|
@ -59,38 +57,32 @@ export const ticketDetailZhCn: TicketDetailText = {
|
||||||
['6', '维修翻车待取回'],
|
['6', '维修翻车待取回'],
|
||||||
['7', '维修翻车已取回'],
|
['7', '维修翻车已取回'],
|
||||||
]),
|
]),
|
||||||
desc: {
|
descTitle: '问题描述',
|
||||||
title: '问题描述',
|
divider: '评论 / 状态',
|
||||||
},
|
|
||||||
info: {
|
info: {
|
||||||
title: '机主姓名',
|
title: '机主姓名',
|
||||||
extra: '联系方式',
|
extra: '联系方式',
|
||||||
},
|
},
|
||||||
divider: '评论 / 状态',
|
tookAway: '我已取回',
|
||||||
button: {
|
addToOreo: '加入 Oreo',
|
||||||
tookAway: '我已取回',
|
addNote: '添加评论',
|
||||||
addToOreo: '加入 Oreo',
|
pick: '认领',
|
||||||
addNote: '添加评论',
|
|
||||||
pick: '认领',
|
|
||||||
status: '改变状态',
|
|
||||||
},
|
|
||||||
comment: {
|
comment: {
|
||||||
title: '添加评论',
|
title: '添加评论',
|
||||||
placeholder: '可以在这里交流机器情况、维修进度、提出问题~',
|
placeholder: '可以在这里交流机器情况、维修进度、提出问题~',
|
||||||
createTicketMessage: '创建了维修',
|
|
||||||
statusModifyPrefix: '将维修状态改为:',
|
|
||||||
},
|
|
||||||
reminder: {
|
|
||||||
title: '注意事项!',
|
|
||||||
error: '请重新确认机器状况!',
|
|
||||||
r0: '是否进行维修?',
|
|
||||||
r1: '螺丝是否装回?排线是否插好?',
|
|
||||||
r2: '维修后机器是否已正常运行?',
|
|
||||||
r3: '随机附件是否已经归还?',
|
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
|
button: '改变工单状态',
|
||||||
title: '请选择要改变成为的状态',
|
title: '请选择要改变成为的状态',
|
||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
|
status0: '已创建/交接中',
|
||||||
|
status1: '维修中',
|
||||||
|
status2: '劝退待取回',
|
||||||
|
status3: '劝退已取回',
|
||||||
|
status4: '维修成功待取回',
|
||||||
|
status5: '维修成功已取回',
|
||||||
|
status6: '维修翻车待取回',
|
||||||
|
status7: '维修翻车已取回',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -101,6 +93,8 @@ export const ticketDetailEnUs: TicketDetailText = {
|
||||||
{ title: 'Finished' },
|
{ title: 'Finished' },
|
||||||
{ title: 'Retrieved' },
|
{ title: 'Retrieved' },
|
||||||
],
|
],
|
||||||
|
createTicketMessage: 'Created ticket',
|
||||||
|
statusModifyPrefix: 'Modified repair status to: ',
|
||||||
statusModifyMessage: new Map<StatusStr, string>([
|
statusModifyMessage: new Map<StatusStr, string>([
|
||||||
['0', 'Created / Handovering'],
|
['0', 'Created / Handovering'],
|
||||||
['1', 'Repairing'],
|
['1', 'Repairing'],
|
||||||
|
|
@ -111,38 +105,32 @@ export const ticketDetailEnUs: TicketDetailText = {
|
||||||
['6', 'Pending Retrieval (Failed)'],
|
['6', 'Pending Retrieval (Failed)'],
|
||||||
['7', 'Retrieved (Failed)'],
|
['7', 'Retrieved (Failed)'],
|
||||||
]),
|
]),
|
||||||
desc: {
|
descTitle: 'Description',
|
||||||
title: 'Description',
|
divider: 'Comment / Status',
|
||||||
},
|
|
||||||
info: {
|
info: {
|
||||||
title: 'Name',
|
title: 'Name',
|
||||||
extra: 'Contact',
|
extra: 'Contact',
|
||||||
},
|
},
|
||||||
divider: 'Comment / Status',
|
tookAway: 'Already retrieved',
|
||||||
button: {
|
addToOreo: 'Add to Oreo',
|
||||||
tookAway: 'Already retrieved',
|
addNote: 'Comment',
|
||||||
addToOreo: 'Add to Oreo',
|
pick: 'Pick',
|
||||||
addNote: 'Comment',
|
|
||||||
pick: 'Pick',
|
|
||||||
status: 'Change status',
|
|
||||||
},
|
|
||||||
comment: {
|
comment: {
|
||||||
title: 'Add comment',
|
title: 'Add Comment',
|
||||||
placeholder:
|
placeholder:
|
||||||
'You can exchange information the device, the progress of repairs, and ask questions here.',
|
'You can exchange information the device, the progress of repairs, and ask questions here.',
|
||||||
createTicketMessage: 'Created ticket',
|
|
||||||
statusModifyPrefix: 'Modified repair status to: ',
|
|
||||||
},
|
|
||||||
reminder: {
|
|
||||||
title: 'Reminder',
|
|
||||||
error: 'Please re-confirm the status of the device!',
|
|
||||||
r0: 'Is the maintenance performed?',
|
|
||||||
r1: 'Are the srews on? Is the power cable plugged in?',
|
|
||||||
r2: 'Did the device operate well after maintenance?',
|
|
||||||
r3: 'Are the attachments reverted?',
|
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
|
button: 'Modify Status',
|
||||||
title: 'Please select the status you want to modify to',
|
title: 'Please select the status you want to modify to',
|
||||||
cancel: 'Cancel',
|
cancel: 'Cancel',
|
||||||
|
status0: 'Created / Handovering',
|
||||||
|
status1: 'Repairing',
|
||||||
|
status2: 'Pending Retrieval (Refused)',
|
||||||
|
status3: 'Retrieved (Refused)',
|
||||||
|
status4: 'Pending Retrieval (Finished)',
|
||||||
|
status5: 'Retrieved (Finished)',
|
||||||
|
status6: 'Pending Retrieval (Failed)',
|
||||||
|
status7: 'Retrieved (Failed)',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
export interface UserPageText {
|
export interface UserPageText {
|
||||||
memberEntry: {
|
memberEntry: {
|
||||||
prefix: string;
|
front: string;
|
||||||
affix: string;
|
behind: string;
|
||||||
};
|
};
|
||||||
ticketColumn: {
|
ticketColumn: {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
@ -27,8 +27,8 @@ export interface UserPageText {
|
||||||
|
|
||||||
export const userPageZhCn: UserPageText = {
|
export const userPageZhCn: UserPageText = {
|
||||||
memberEntry: {
|
memberEntry: {
|
||||||
prefix: '再点击 ',
|
front: '再点击 ',
|
||||||
affix: ' 次以进入协会成员登录页面',
|
behind: ' 次以进入协会成员登录页面',
|
||||||
},
|
},
|
||||||
ticketColumn: {
|
ticketColumn: {
|
||||||
title: '我的工单',
|
title: '我的工单',
|
||||||
|
|
@ -54,8 +54,8 @@ export const userPageZhCn: UserPageText = {
|
||||||
|
|
||||||
export const userPageEnUs: UserPageText = {
|
export const userPageEnUs: UserPageText = {
|
||||||
memberEntry: {
|
memberEntry: {
|
||||||
prefix: 'Click ',
|
front: 'Click ',
|
||||||
affix: ' more times to enter member login page',
|
behind: ' more times to enter member login page',
|
||||||
},
|
},
|
||||||
ticketColumn: {
|
ticketColumn: {
|
||||||
title: 'My Tickets',
|
title: 'My Tickets',
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,7 @@ import { getUrl } from '.';
|
||||||
|
|
||||||
export function addToOreo(that: TicketDetail) {
|
export function addToOreo(that: TicketDetail) {
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isOreoLoading: true,
|
||||||
...that.state.isLoading,
|
|
||||||
oreo: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/tickets/addtooreo'),
|
url: getUrl('/tickets/addtooreo'),
|
||||||
|
|
@ -22,10 +19,7 @@ export function addToOreo(that: TicketDetail) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isOreoLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
oreo: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.success,
|
message: pt.get().button.submitText.success,
|
||||||
|
|
@ -35,10 +29,7 @@ export function addToOreo(that: TicketDetail) {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.errMsg);
|
console.log(err.errMsg);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isOreoLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
oreo: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.error + err.errMsg,
|
message: pt.get().button.submitText.error + err.errMsg,
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,9 @@ import { getUrl } from '.';
|
||||||
|
|
||||||
const reLaunchInterval = 1000;
|
const reLaunchInterval = 1000;
|
||||||
|
|
||||||
export function changeStatus(that: TicketDetail) {
|
export function changeStatus(that: TicketDetail, status: number) {
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isStatusLoading: true,
|
||||||
...that.state.isLoading,
|
|
||||||
status: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/tickets/update'),
|
url: getUrl('/tickets/update'),
|
||||||
|
|
@ -19,16 +16,13 @@ export function changeStatus(that: TicketDetail) {
|
||||||
data: {
|
data: {
|
||||||
token: wechatUser.getToken(),
|
token: wechatUser.getToken(),
|
||||||
id: that.state.id,
|
id: that.state.id,
|
||||||
status: that.state.statusToBe,
|
status: status,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isStatusLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.success,
|
message: pt.get().button.submitText.success,
|
||||||
|
|
@ -43,10 +37,7 @@ export function changeStatus(that: TicketDetail) {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.errMsg);
|
console.log(err.errMsg);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isStatusLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.error + err.errMsg,
|
message: pt.get().button.submitText.error + err.errMsg,
|
||||||
|
|
|
||||||
|
|
@ -16,21 +16,19 @@ export function getCurrentTicket(that: RepairPage) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
let newIdNameList: Array<Map<number, string>> = [];
|
let newIdNameList: Array<Map<number, string>> = [];
|
||||||
if (data.list.length !== 0) {
|
data.list.map((ticket: TicketListItem) => {
|
||||||
data.list.map((ticket: TicketListItem) => {
|
if (
|
||||||
if (
|
ticket['status'] !== 3 &&
|
||||||
ticket['status'] !== 3 &&
|
ticket['status'] !== 5 &&
|
||||||
ticket['status'] !== 5 &&
|
ticket['status'] !== 7
|
||||||
ticket['status'] !== 7
|
) {
|
||||||
) {
|
newIdNameList.push(
|
||||||
newIdNameList.push(
|
new Map([
|
||||||
new Map([
|
[ticket['id'], ticket['device'] + ' ' + ticket['deviceModel']],
|
||||||
[ticket['id'], ticket['device'] + ' ' + ticket['deviceModel']],
|
]),
|
||||||
]),
|
);
|
||||||
);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
that.setState({
|
that.setState({
|
||||||
currentTicketsIdName: newIdNameList,
|
currentTicketsIdName: newIdNameList,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,28 @@ export function getDutyInfo(that: MainPage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
that.setState({
|
if (data.isInDuty) {
|
||||||
rs: former.trans(true),
|
that.setState({
|
||||||
dutyData: data,
|
rs: former.trans(true),
|
||||||
});
|
dutyData: {
|
||||||
|
isInDuty: data.isInDuty,
|
||||||
|
inDutyCnt: data.inDutyCnt,
|
||||||
|
currentDuty: data.currentDuty,
|
||||||
|
otherDutyTime: data.otherDutyTime,
|
||||||
|
place: data.place,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
that.setState({
|
||||||
|
rs: former.trans(true),
|
||||||
|
dutyData: {
|
||||||
|
isInDuty: data.isInDuty,
|
||||||
|
offDutyReason: data.offDutyReason,
|
||||||
|
dutyRecoverTime: data.dutyRecoverTime,
|
||||||
|
place: data.place,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.errMsg);
|
console.log(err.errMsg);
|
||||||
|
|
|
||||||
|
|
@ -13,24 +13,19 @@ export function getDisable(that: TicketDetail, id: number) {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
let isDisable_main = that.state.isDisable_main;
|
|
||||||
if (data.status === 3 || data.status === 5 || data.status === 7) {
|
if (data.status === 3 || data.status === 5 || data.status === 7) {
|
||||||
isDisable_main.retrieve = true;
|
that.setState({
|
||||||
isDisable_main.comment = true;
|
isRetrieveDisable_main: true,
|
||||||
|
isCommentDisable_main: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (wechatUser.getAccess()) {
|
if (wechatUser.getAccess()) {
|
||||||
if (data.workers.includes(wechatUser.getInfo().name)) {
|
if (data.workers.includes(wechatUser.getInfo().name)) {
|
||||||
isDisable_main.pick = true;
|
that.setState({
|
||||||
|
isPickDisable_main: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.setState({
|
|
||||||
isDisable_main: {
|
|
||||||
...that.state.isDisable_main,
|
|
||||||
retrieve: isDisable_main.retrieve,
|
|
||||||
comment: isDisable_main.comment,
|
|
||||||
pick: isDisable_main.pick,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.catch((reason) => {
|
.catch((reason) => {
|
||||||
console.log(reason.errMsg);
|
console.log(reason.errMsg);
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@ const reLaunchInterval = 1000;
|
||||||
|
|
||||||
export function pickTicket(that: TicketDetail) {
|
export function pickTicket(that: TicketDetail) {
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isPickLoading: true,
|
||||||
...that.state.isLoading,
|
|
||||||
pick: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/tickets/pick'),
|
url: getUrl('/tickets/pick'),
|
||||||
|
|
@ -24,10 +21,7 @@ export function pickTicket(that: TicketDetail) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isPickLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
pick: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.success,
|
message: pt.get().button.submitText.success,
|
||||||
|
|
@ -42,10 +36,7 @@ export function pickTicket(that: TicketDetail) {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.errMsg);
|
console.log(err.errMsg);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isPickLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
pick: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.error + err.errMsg,
|
message: pt.get().button.submitText.error + err.errMsg,
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@ const reLaunchInterval = 1000;
|
||||||
|
|
||||||
export function retrieve(that: TicketDetail) {
|
export function retrieve(that: TicketDetail) {
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isRetrieveLoading: true,
|
||||||
...that.state.isLoading,
|
|
||||||
retrieve: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/tickets/retrieve'),
|
url: getUrl('/tickets/retrieve'),
|
||||||
|
|
@ -24,10 +21,7 @@ export function retrieve(that: TicketDetail) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isRetrieveLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
retrieve: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.success,
|
message: pt.get().button.submitText.success,
|
||||||
|
|
@ -42,10 +36,7 @@ export function retrieve(that: TicketDetail) {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.errMsg);
|
console.log(err.errMsg);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isRetrieveLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
retrieve: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.error + err.errMsg,
|
message: pt.get().button.submitText.error + err.errMsg,
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@ const reLaunchInterval = 1000;
|
||||||
|
|
||||||
export function submitComment(that: TicketDetail) {
|
export function submitComment(that: TicketDetail) {
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isCommentLoading: true,
|
||||||
...that.state.isLoading,
|
|
||||||
comment: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.request({
|
Taro.request({
|
||||||
url: getUrl('/report'),
|
url: getUrl('/report'),
|
||||||
|
|
@ -24,10 +21,7 @@ export function submitComment(that: TicketDetail) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isCommentLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.success,
|
message: pt.get().button.submitText.success,
|
||||||
|
|
@ -42,10 +36,7 @@ export function submitComment(that: TicketDetail) {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.errMsg);
|
console.log(err.errMsg);
|
||||||
that.setState({
|
that.setState({
|
||||||
isLoading: {
|
isCommentLoading: false,
|
||||||
...that.state.isLoading,
|
|
||||||
comment: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
Taro.atMessage({
|
Taro.atMessage({
|
||||||
message: pt.get().button.submitText.error + err.errMsg,
|
message: pt.get().button.submitText.error + err.errMsg,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue