Map Attributes: Apply, Clear done.
This commit is contained in:
@@ -97,22 +97,7 @@ export default defineStore('allMapDataStore', {
|
||||
},
|
||||
filterAttrs: state => {
|
||||
if(state.allFilterAttrs !== null){
|
||||
state.allFilterAttrs.map(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.min = att.min !== null ? moment(att.min).format('YYYY/MM/DD HH:mm') : null;
|
||||
att.max = att.max !== null ? moment(att.max).format('YYYY/MM/DD HH:mm') : null;
|
||||
break;
|
||||
case 'float':
|
||||
// Decimal.ROUND_UP|0: 無條件進位; Decimal.ROUND_DOWN|1: 無條件捨去。
|
||||
att.min = att.min !== null ? Number(new Decimal(att.min).toFixed(2, 0)) : null;
|
||||
att.max = att.max !== null ? Number(new Decimal(att.max).toFixed(2, 1)) : null;
|
||||
break
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return att;
|
||||
});
|
||||
state.allFilterAttrㄧㄠ
|
||||
return state.allFilterAttrs;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user