From 5d75fcaea0a3774052b7484a4ffe755258502363 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 06 十二月 2025 20:49:11 +0800
Subject: [PATCH] fix:开始执行人员就绪按钮

---
 app/api/task.js |   51 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/app/api/task.js b/app/api/task.js
index 9287710..742c650 100644
--- a/app/api/task.js
+++ b/app/api/task.js
@@ -26,7 +26,7 @@
 
 export function updateTask(data) {
   return request({
-    url: '/task/' + data.taskId,
+    url: '/task',
     method: 'put',
     data: data
   })
@@ -61,11 +61,14 @@
 }
 
 // 闄勪欢绠$悊API
-export function uploadAttachment(taskId, file) {
+export function uploadAttachment(taskId, file, category) {
   const formData = new FormData()
   formData.append('file', file)
+  if (category) {
+    formData.append('category', category)
+  }
   return request({
-    url: '/task/' + taskId + '/attachment',
+    url: '/task/attachment/upload/' + taskId,
     method: 'post',
     data: formData,
     headers: {
@@ -74,10 +77,36 @@
   })
 }
 
+export function uploadAttachmentFromWechat(taskId, mediaId, category) {
+  return request({
+    url: '/task/attachment/uploadFromWechat/' + taskId,
+    method: 'post',
+    params: {
+      mediaId: mediaId,
+      category: category
+    }
+  })
+}
+
+export function getAttachmentList(taskId) {
+  return request({
+    url: '/task/attachment/list/' + taskId,
+    method: 'get'
+  })
+}
+
 export function deleteAttachment(attachmentId) {
   return request({
     url: '/task/attachment/' + attachmentId,
     method: 'delete'
+  })
+}
+
+// 鑾峰彇寰俊AccessToken
+export function getWechatAccessToken() {
+  return request({
+    url: '/wechat/accessToken',
+    method: 'get'
   })
 }
 
@@ -112,3 +141,19 @@
     method: 'get'
   })
 }
+
+// 妫�鏌ヨ溅杈嗘槸鍚︽湁姝e湪杩涜涓殑浠诲姟
+export function checkVehicleActiveTasks(vehicleId) {
+  return request({
+    url: '/task/vehicle/' + vehicleId + '/active',
+    method: 'get'
+  })
+}
+
+// 鏍囪鎵ц浜哄氨缁�
+export function setAssigneeReady(taskId) {
+  return request({
+    url: '/task/' + taskId + '/assignee/ready',
+    method: 'post'
+  })
+}

--
Gitblit v1.9.1