我使用完整日历,我需要获取其中日程表可以是每周,每日或每月类型的事件,或者它们可以有多种类型。 我将按照“时间表”的规定获取所有时间表。如下所示..请帮助我解决这个问题。提前谢谢。
$scope.getResidentInterventions = function () {
blockUI.start();
var residentList = [];
var getResidentInt_URL = $scope.constants.API.GET_RESIDENT_1 + $scope.selectedResidentID + $scope.constants.API.GET_RESIDENT_2
+ $scope.selectedFacilityID
+ $scope.constants.API.GET_RESIDENT_INTERVENTION
residentService.get(getResidentInt_URL).then(
function (response) {
// if (response.data) {
$scope.residentList = [];
$scope.residentIntList = response.data;
console.log("$scope.residentIntList", $scope.residentIntList);
//$scope.schedules = [];
$scope.residentIntList.forEach(function (problem) {
problem.rcp_goals.forEach(function (goal) {
goal.rcp_interventions.forEach(function (intervention) {
if (intervention.rcp_interventionfrequency != null) {
intervention.rcp_interventionfrequency.schedules.forEach(function (schedule) {
console.log(schedule);
//console.log(schedule.Schedule);
//console.log("$scope.schedules", $scope.schedules);
for (var weekKey in weekList) {
//for (var key in $scope.schedules) F{
var testSchedule = {};
if (weekKey == schedule.Schedule) {
testSchedule = {
//title: "Test",
// start: "2017-04-21T00:00:00.000Z", end: "2017-04-22T00:00:00.000Z",
start: "10:00", end: "2:00",
dow: [parseInt(weekList[weekKey])]
};
$scope.schedules.push(testSchedule);
$scope.RefreshCalenderEvents($scope.schedules);
break;
}
});
}
});
});
});