From 71030e1f80635b7332136a488bc2cc8bd36fc04c Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 19 十一月 2024 11:40:37 +0800 Subject: [PATCH] Merge branch 'hc-dataproduct-v1112' into lsf-dataproduct-1024 --- src/api/fysp/taskApi.js | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/src/api/fysp/taskApi.js b/src/api/fysp/taskApi.js index 6e4e66a..189f0f1 100644 --- a/src/api/fysp/taskApi.js +++ b/src/api/fysp/taskApi.js @@ -2,10 +2,28 @@ export default { /** + * 鏂板缓浠诲姟 + * @param {Object} task + */ + putTask(task){ + return $fysp.put(`task/create`, task).then((res) => res.data); + }, + /** + * 鏍规嵁涓婚敭鑾峰彇鎬讳换鍔℃垨鏃ヤ换鍔� + */ + fetchTaskById(id){ + return $fysp.get(`task/${id}`).then((res) => res.data); + }, + + /** * 鑾峰彇椤跺眰浠诲姟 */ getTopTask() { return $fysp.get('task/alltask/0').then((res) => res.data); + }, + + getLastTopTask(task){ + return $fysp.post(`task/lastTask`, task).then((res) => res.data); }, /** @@ -97,5 +115,19 @@ } }) .then((res) => res.data); + }, + /** + * 閫氳繃鎬讳换鍔d鍜屾椂闂村尯闂磋幏鍙栧瓙浠诲姟鍒楄〃 + */ + getByTopTaskAndDate({startTime, endTime, sceneTypeId, topTaskId}) { + const params = `?startTime=${startTime}&endTime=${endTime}&sceneTypeId=${sceneTypeId}&topTaskId=${topTaskId}`; + return $fysp.get(`subtask/getSubTask${params}`).then((res) => res.data); + }, + /** + * 鑾峰彇鏌愪釜鍦烘櫙鐨勫贰鏌ヤ换鍔� + */ + getSubtaskByScene({startTime, endTime, sceneId}) { + const params = `?startTime=${startTime}&endTime=${endTime}&sceneId=${sceneId}`; + return $fysp.get(`subtask/byScene${params}`).then((res) => res.data); } }; -- Gitblit v1.9.3