hcong
2024-11-08 d7d7da5c09340eafcd2e2c672e6b2c001a4cc0be
src/api/fysp/taskApi.js
@@ -22,6 +22,13 @@
    return $fysp.get('task/alltask/0').then((res) => res.data);
  },
  /**
   * 获取顶层任务和日任务
   */
  getTopTaskWithDayTask() {
    return $fysp.get('task/alltask/1').then((res) => res.data);
  },
  getLastTopTask(task){
    return $fysp.post(`task/lastTask`, task).then((res) => res.data);
  },
@@ -119,9 +126,11 @@
  /** 
   * 通过总任务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 getByTopTaskAndDate({startTime = null, endTime = null, sceneTypeId = null, topTaskId}) {
    // const params = `?startTime=${startTime}&endTime=${endTime}&sceneTypeId=${sceneTypeId}&topTaskId=${topTaskId}`;
    return await $fysp.get(`subtask/getSubTask`, {
      params: {startTime: startTime, endTime: endTime, sceneTypeId: sceneTypeId, topTaskId: topTaskId}
    }).then((res) => res.data);
  },
  /** 
   * 获取某个场景的巡查任务