From 5f98cc660dbf590549f0dcd7af04d2dd7d918982 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?=
<14103883+leaf-phos@user.noreply.gitee.com>
Date: Fri, 7 Mar 2025 17:40:29 +0800
Subject: [PATCH] =?UTF-8?q?0.6.2=20=E6=8E=A5=E5=8F=96=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=89=8B=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/bst/task.js | 8 +++++++
src/utils/enums.js | 40 +++++++++++++++++++++++++++++++++--
src/views/bst/index/index.vue | 2 +-
src/views/bst/task/index.vue | 21 +++++++++++++++++-
src/views/bst/task/mixins.js | 17 ++++++++++++++-
5 files changed, 83 insertions(+), 5 deletions(-)
diff --git a/src/api/bst/task.js b/src/api/bst/task.js
index eee0a4a..fef046e 100644
--- a/src/api/bst/task.js
+++ b/src/api/bst/task.js
@@ -69,3 +69,11 @@ export function passTask(id) {
method: 'put'
})
}
+
+// 接取任务
+export function receiveTask(id) {
+ return request({
+ url: '/bst/task/receive/' + id,
+ method: 'put'
+ })
+}
diff --git a/src/utils/enums.js b/src/utils/enums.js
index 840b560..8ece80c 100644
--- a/src/utils/enums.js
+++ b/src/utils/enums.js
@@ -14,7 +14,6 @@ export const TaskStatus = {
PASS: "4", // 通过
REJECT: "5", // 驳回(停用)
CANCEL: "6", // 取消
-
// 获取可以提交的任务状态
canSubmit() {
return [this.PROCESSING]
@@ -29,7 +28,7 @@ export const TaskStatus = {
},
// 获取可以开始的任务状态
canStart() {
- return [this.WAIT_RECEIVE, this.CANCEL]
+ return [this.WAIT_RECEIVE, this.CANCEL, this.PASS]
},
// 获取未完成任务状态
unComplete() {
@@ -164,3 +163,40 @@ export const ProjectMemberRole = {
QA: "QA", // 测试
NORMAL: "NORMAL", // 普通成员
}
+
+// 任务成员状态
+// 任务成员状态
+export const TaskMemberStatus = {
+ WAIT_RECEIVE: "WAIT_RECEIVE", // 待接收
+ PROCESSING: "PROCESSING", // 进行中
+ SUBMITED: "SUBMITED", // 已提交
+ REJECTED: "REJECTED", // 已驳回
+ CANCELED: "CANCELED", // 已取消
+
+ // 允许接收的成员状态
+ canReceive() {
+ return [this.WAIT_RECEIVE]
+ },
+ // 未提交的成员状态
+ unSubmit() {
+ return [
+ this.WAIT_RECEIVE,
+ this.PROCESSING,
+ this.REJECTED,
+ this.CANCELED
+ ]
+ },
+ // 已提交的成员状态
+ submited() {
+ return [this.SUBMITED]
+ },
+ // 已读的成员状态
+ received() {
+ return [
+ this.PROCESSING,
+ this.SUBMITED,
+ this.REJECTED,
+ this.CANCELED
+ ]
+ }
+}
diff --git a/src/views/bst/index/index.vue b/src/views/bst/index/index.vue
index 09e982f..0771d04 100644
--- a/src/views/bst/index/index.vue
+++ b/src/views/bst/index/index.vue
@@ -19,7 +19,7 @@
-
+
diff --git a/src/views/bst/task/index.vue b/src/views/bst/task/index.vue
index c8884c5..d740695 100644
--- a/src/views/bst/task/index.vue
+++ b/src/views/bst/task/index.vue
@@ -158,6 +158,13 @@
v-has-permi="['bst:task:query']"
@click="handleView(scope.row)"
>详情
+ 接取