Created
June 24, 2019 08:04
-
-
Save oomusou/289a1cdedcf8f8b2363048b152a403a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unit -> unit | |
let mounted = async function() { | |
await fetchAllMachine({ | |
app_id: process.env.VUE_APP_APP_ID, | |
s_date: getToday(), | |
e_date: getToday() | |
}).then(x => machines = x.data.payload) | |
.then(() => fetchHistoricProcessInstances({ | |
processDefinitionKey: 'material_order_flow', | |
start: '0', | |
size: '200' | |
}).then(x => histories = x.data.data) | |
.then(() => { | |
machines = map(x => ({ | |
id: x.exceptionId, | |
time: x.exceptionTime, | |
color: statusToColor(x.status), | |
name: description(x.status), | |
title: '叫修流程', | |
rawId: x.exceptionId, | |
}), machines); | |
histories = map(x => ({ | |
id: flowableId(x.id), | |
time: flowableTime(x.startTime), | |
color: entTimeToColor(x.endTime), | |
name: entTimeToName(x.endTime), | |
title: '叫料流程', | |
rawId: x.id, | |
}), histories); | |
histories = filter(x => x.time >= '2019-06-13 07:30:00', histories); | |
this.items = pipe( | |
concatAll, | |
sortBy(descend(prop('time'))), | |
addDivider | |
)([machines, histories]); | |
})); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment