From 310633feef20e9b77d44fd25e0b41778e033b33b Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期二, 11 十一月 2025 21:48:46 +0800
Subject: [PATCH] feat: 车辆GPS统计,并修改了一些变更任务状态的逻辑
---
app/api/task.js | 41 +++++++++++++++++++++++++++++++++++++++--
1 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/app/api/task.js b/app/api/task.js
index 9287710..3121d97 100644
--- a/app/api/task.js
+++ b/app/api/task.js
@@ -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,11 @@
method: 'get'
})
}
+
+// 妫�鏌ヨ溅杈嗘槸鍚︽湁姝e湪杩涜涓殑浠诲姟
+export function checkVehicleActiveTasks(vehicleId) {
+ return request({
+ url: '/task/vehicle/' + vehicleId + '/active',
+ method: 'get'
+ })
+}
--
Gitblit v1.9.1