From 5ad61d6ad3a0ce12c7fe0808527069b09a7c9c0d Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 16 九月 2025 17:31:05 +0800 Subject: [PATCH] 新增基础产品 --- src/api/fysp/taskApi.js | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/api/fysp/taskApi.js b/src/api/fysp/taskApi.js index da5ef7a..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); }, /** @@ -101,15 +119,15 @@ /** * 閫氳繃鎬讳换鍔d鍜屾椂闂村尯闂磋幏鍙栧瓙浠诲姟鍒楄〃 */ - async getByTopTaskAndDate({startTime, endTime, sceneTypeId, topTaskId}) { + 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); + return $fysp.get(`subtask/getSubTask${params}`).then((res) => res.data); }, /** * 鑾峰彇鏌愪釜鍦烘櫙鐨勫贰鏌ヤ换鍔� */ - async getSubtaskByScene({startTime, endTime, sceneId}) { + getSubtaskByScene({startTime, endTime, sceneId}) { const params = `?startTime=${startTime}&endTime=${endTime}&sceneId=${sceneId}`; - return await $fysp.get(`subtask/byScene${params}`).then((res) => res.data); + return $fysp.get(`subtask/byScene${params}`).then((res) => res.data); } }; -- Gitblit v1.9.3