// 获取是否打卡class function getClass(json) { if (json) { if (json.startPunchClock && json.endPunchClock) { return 'all'; } else if (json.startPunchClock || json.endPunchClock) { return 'shortage'; } } return '' } function getSelectClass(blue, selectedIndex, index, json) { if (selectedIndex === index && json) { if (blue === index) { return 'text-blue'; } if (json.startPunchClock && json.endPunchClock) { return 'text-blue'; } else if (json.startPunchClock || json.endPunchClock) { return 'text-yellow'; } return 'text-blue'; } return '' } module.exports = { getClass: getClass, getSelectClass: getSelectClass };