本文整理汇总了TypeScript中entcore._.union方法的典型用法代码示例。如果您正苦于以下问题:TypeScript _.union方法的具体用法?TypeScript _.union怎么用?TypeScript _.union使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entcore._
的用法示例。
在下文中一共展示了_.union方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: init
function init(subjectScheduled){
SubjectCopyService.resolveBySubjectScheduled_force(subjectScheduled).then(
function () {
scope.subjectCopyList = SubjectCopyService.getListBySubjectScheduled(subjectScheduled);
scope.subjectCopyList.forEach(copy => {
if(copy.is_corrected){
scope.score.sum += copy.final_score;
scope.score.nb++;
}
});
CorrectionService.automaticCorrection(scope.subjectCopyList, scope.selectedSubjectScheduled);
}
);
let r = _.map(_.union(scope.selectedSubjectScheduled.scheduled_at.userList, scope.selectedSubjectScheduled.scheduled_at.groupList), _.clone);
let total = r.length;
let current = 1;
_.forEach(r, function (obj) {
if (total !== current) obj.name = obj.name + ' - ';
current++;
});
scope.lUserGroup = r;
scope.selectedSubjectScheduled.lUserGroup = scope.lUserGroup;
}
示例2: function
ArchivesService.getListArchivedSubjectScheduledCopy(subjectScheduled.id , (array => {
scope.subjectCopyList = array;
let r = _.map(_.union(scope.selectedSubjectScheduled.scheduled_at.userList, scope.selectedSubjectScheduled.scheduled_at.groupList), _.clone);
let total = r.length;
let current = 1;
_.forEach(r, function (obj) {
if (total !== current) obj.name = obj.name + ' - ';
current++;
});
scope.lUserGroup = r;
}))
示例3: init
function init(subjectScheduled){
SubjectCopyService.resolveBySubjectScheduled_force(subjectScheduled).then(
function () {
scope.subjectCopyList = SubjectCopyService.getListBySubjectScheduled(subjectScheduled);
}
);
let r = _.map(_.union(scope.selectedSubjectScheduled.scheduled_at.userList, scope.selectedSubjectScheduled.scheduled_at.groupList), _.clone);
let total = r.length;
let current = 1;
_.forEach(r, function (obj) {
if (total !== current) obj.name = obj.name + ' - ';
current++;
});
scope.lUserGroup = r;
};