Issues #183: done.
This commit is contained in:
@@ -192,8 +192,19 @@ export default defineStore('allMapDataStore', {
|
||||
this.allTraceTaskSeq = response.data.task_seq;
|
||||
this.allCase = response.data.cases;
|
||||
this.allCase.map(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY-MM-DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY-MM-DD HH:mm');
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:mm');
|
||||
c.attributes.map(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.value = att.value !== null ? moment(att.value).format('YYYY/MM/DD HH:mm') : null;
|
||||
break;
|
||||
case 'float':
|
||||
att.value = att.value !== null ? Number(new Decimal(att.value).toFixed(2)) : null;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
})
|
||||
return this.allCase;
|
||||
});
|
||||
return this.allCase;
|
||||
@@ -216,8 +227,19 @@ export default defineStore('allMapDataStore', {
|
||||
this.allBaseTraceTaskSeq = response.data.task_seq;
|
||||
this.allBaseCase = response.data.cases;
|
||||
this.allBaseCase.map(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY-MM-DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY-MM-DD HH:mm');
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:mm');
|
||||
c.attributes.map(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.value = att.value !== null ? moment(att.value).format('YYYY/MM/DD HH:mm') : null;
|
||||
break;
|
||||
case 'float':
|
||||
att.value = att.value !== null ? Number(new Decimal(att.value).toFixed(2)) : null;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
})
|
||||
return this.allBaseCase;
|
||||
});
|
||||
return this.allBaseCase;
|
||||
|
||||
Reference in New Issue
Block a user