| | |
| | | }, |
| | | |
| | | /** |
| | | * 获取每日任务统计信息 |
| | | * @param {String} topTaskId 总任务主键id |
| | | * @param {String} userId 用户id,当用户类型userType为1(监管用户)时,会根据用户id获取其权限内的统计信息 |
| | | * @param {String} userType 用户类型,0:管理员;1:监管用户;2:政府部门;3:企业 |
| | | */ |
| | | fetchDayTasks(topTaskId, userId = '', userType = '0') { |
| | | return $fysp |
| | | .get(`task/dayTask/${topTaskId}?userId=${userId}&userType=${userType}`) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取子任务统计信息 |
| | | */ |
| | | getSubtaskSummary({ topTaskId = undefined, sceneTypeId = undefined }) { |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 获取具体子任务信息 |
| | | * @param {String} dayTaskId 日任务主键id |
| | | * @param {String} userId 用户id,当用户类型userType为1(监管用户)时,会根据用户id获取其权限内的统计信息 |
| | | * @param {String} userType 用户类型,0:管理员;1:监管用户;2:政府部门;3:企业 |
| | | */ |
| | | fetchSubtaskByDayTask(dayTaskId, userId = '', userType = '0') { |
| | | const params = `?dayTaskId=${dayTaskId}&userId=${userId}&userType=${userType}`; |
| | | return $fysp.get(`subtask/byDayTaskId${params}`).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取子任务问题详情 |
| | | */ |
| | | getProBySubtask(id) { |
| | |
| | | } |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | /** |
| | | * 通过总任务id和时间区间获取子任务列表 |
| | | */ |
| | | async getByTopTaskAndDate({startTime, endTime, sceneTypeId, topTaskId}) { |
| | | const params = `?startTime=${startTime}&endTime=${endTime}&sceneTypeId=${sceneTypeId}&topTaskId=${topTaskId}`; |
| | | return await $fysp.get(`subtask/getSubTask${params}`).then((res) => res.data); |
| | | }, |
| | | /** |
| | | * 获取某个场景的巡查任务 |
| | | */ |
| | | async getSubtaskByScene({startTime, endTime, sceneId}) { |
| | | const params = `?startTime=${startTime}&endTime=${endTime}&sceneId=${sceneId}`; |
| | | return await $fysp.get(`subtask/byScene${params}`).then((res) => res.data); |
| | | } |
| | | }; |