From d45d98661c9664fb8fdea5e3a2b3d8d9908eb923 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 16:30:46 +0800 Subject: [PATCH] =?UTF-8?q?0.6.0=20=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E3=80=81=E4=BB=BB=E5=8A=A1=E6=88=90=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bst/task.js | 5 +- src/components/AvatarList/index.vue | 52 +- src/components/Business/User/UserCheck.vue | 58 +- src/components/Business/User/UserDialog.vue | 2 +- .../Business/User/UserRemoteSelect.vue | 143 ++++ src/components/CollapsePanel/index.vue | 75 ++ src/components/ImageUpload/index.vue | 8 +- src/utils/enums.js | 36 +- .../components/ProjectMemberEditDialog.vue | 104 +++ .../edit/components/ProjectMemberEditList.vue | 123 ++++ src/views/bst/project/edit/index.vue | 34 +- src/views/bst/project/index.vue | 32 +- src/views/bst/project/view/index.vue | 25 +- .../bst/task/components/TaskEditDialog.vue | 99 +-- .../bst/task/components/TaskProcessPanel.vue | 169 ++--- .../bst/task/components/TaskViewDialog.vue | 4 +- src/views/bst/task/index.vue | 23 +- src/views/bst/task/mixins.js | 5 +- .../system/user/components/UserFormDialog.vue | 246 +++++++ src/views/system/user/index.vue | 638 ++++++------------ src/views/system/user/view/index.vue | 21 +- 21 files changed, 1194 insertions(+), 708 deletions(-) create mode 100644 src/components/Business/User/UserRemoteSelect.vue create mode 100644 src/components/CollapsePanel/index.vue create mode 100644 src/views/bst/project/components/ProjectMemberEditDialog.vue create mode 100644 src/views/bst/project/edit/components/ProjectMemberEditList.vue create mode 100644 src/views/system/user/components/UserFormDialog.vue diff --git a/src/api/bst/task.js b/src/api/bst/task.js index 4e47801..eee0a4a 100644 --- a/src/api/bst/task.js +++ b/src/api/bst/task.js @@ -10,10 +10,11 @@ export function listTask(query) { } // 查询任务详细 -export function getTask(id) { +export function getTask(id, receive) { return request({ url: '/bst/task/' + id, - method: 'get' + method: 'get', + params: { receive } }) } diff --git a/src/components/AvatarList/index.vue b/src/components/AvatarList/index.vue index bcbd407..c6b1242 100644 --- a/src/components/AvatarList/index.vue +++ b/src/components/AvatarList/index.vue @@ -1,26 +1,20 @@ - - - + + + \ No newline at end of file diff --git a/src/components/CollapsePanel/index.vue b/src/components/CollapsePanel/index.vue new file mode 100644 index 0000000..7bff8eb --- /dev/null +++ b/src/components/CollapsePanel/index.vue @@ -0,0 +1,75 @@ + + + + diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 428e4e9..1a55396 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -271,14 +271,18 @@ export default { // 新增:鼠标进入处理 handleMouseEnter() { if (!this.isListening) { - this.$refs.pasteArea.focus(); + if (this.$refs.pasteArea) { + this.$refs.pasteArea.focus(); + } this.isListening = true; } }, // 新增:鼠标离开处理 handleMouseLeave() { if (this.isListening) { - this.$refs.pasteArea.blur(); + if (this.$refs.pasteArea) { + this.$refs.pasteArea.blur(); + } this.isListening = false; } }, diff --git a/src/utils/enums.js b/src/utils/enums.js index 48f6368..840b560 100644 --- a/src/utils/enums.js +++ b/src/utils/enums.js @@ -8,12 +8,12 @@ export const TaskType = { // 任务状态 export const TaskStatus = { - WAIT_COMPLETED: "1", // 待完成(弃用) + WAIT_RECEIVE: "1", // 待接收 PROCESSING: "2", // 进行中 - WAIT_CONFIRM: "3", // 待确认(弃用) - PASS: "4", // 通过 - REJECT: "5", // 驳回(弃用) - CANCEL: "6", // 取消 + WAIT_CONFIRM: "3", // 待确认(停用) + PASS: "4", // 通过 + REJECT: "5", // 驳回(停用) + CANCEL: "6", // 取消 // 获取可以提交的任务状态 canSubmit() { @@ -21,11 +21,23 @@ export const TaskStatus = { }, // 获取可以取消的任务状态 canCancel() { - return [this.WAIT_COMPLETED, this.PROCESSING] + return [this.WAIT_RECEIVE, this.PROCESSING] }, - // 获取可以完成的任务状态 + // 获取可以通过的任务状态 canPass() { return [this.PROCESSING] + }, + // 获取可以开始的任务状态 + canStart() { + return [this.WAIT_RECEIVE, this.CANCEL] + }, + // 获取未完成任务状态 + unComplete() { + return [this.PROCESSING] + }, + // 获取已完成任务状态 + complete() { + return [this.PASS] } } @@ -142,3 +154,13 @@ export const Role = { SYS_ADMIN: "sys_admin", // 系统管理员 ADMIN: "admin", // 管理员 } + +// 项目成员角色 +export const ProjectMemberRole = { + OWNER: "OWNER", // 项目负责人 + FOLLOWER: "FOLLOWER", // 项目跟进人 + UI: "UI", // UI设计 + DEV: "DEV", // 开发 + QA: "QA", // 测试 + NORMAL: "NORMAL", // 普通成员 +} diff --git a/src/views/bst/project/components/ProjectMemberEditDialog.vue b/src/views/bst/project/components/ProjectMemberEditDialog.vue new file mode 100644 index 0000000..00b1676 --- /dev/null +++ b/src/views/bst/project/components/ProjectMemberEditDialog.vue @@ -0,0 +1,104 @@ + + + + + \ No newline at end of file diff --git a/src/views/bst/project/edit/components/ProjectMemberEditList.vue b/src/views/bst/project/edit/components/ProjectMemberEditList.vue new file mode 100644 index 0000000..d376ce0 --- /dev/null +++ b/src/views/bst/project/edit/components/ProjectMemberEditList.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/views/bst/project/edit/index.vue b/src/views/bst/project/edit/index.vue index 25fea68..59324b5 100644 --- a/src/views/bst/project/edit/index.vue +++ b/src/views/bst/project/edit/index.vue @@ -5,7 +5,7 @@ 提 交
- + @@ -31,15 +31,6 @@ placeholder="请选择到期时间"> - - - - - - - - - @@ -47,6 +38,12 @@ + + + + + +
@@ -60,9 +57,10 @@ import EditHeader from "@/components/EditHeader/index.vue"; import CustomerInput from "@/components/Business/Customer/CustomerInput.vue"; import UserSelect from "@/components/Business/User/UserSelect.vue"; import { FileType } from '@/utils/constants'; +import ProjectMemberEditList from './components/ProjectMemberEditList.vue'; export default { name: "ProjectEdit", - components: { FormCol, EditHeader, UserSelect, CustomerInput }, + components: { FormCol, EditHeader, UserSelect, CustomerInput, ProjectMemberEditList }, dicts: ['project_status'], data() { return { @@ -70,12 +68,22 @@ export default { submitLoading: false, span: 6, // 表单参数 - form: {}, + form: { + memberList: [], + }, // 表单校验 rules: { name: [ { required: true, message: "项目名称不能为空", trigger: "blur" } ], + memberList: { + userId: [ + { required: true, message: "成员不能为空", trigger: "blur" } + ], + role: [ + { required: true, message: "角色不能为空", trigger: "blur" } + ] + } }, fileType: FileType.all(), }; @@ -121,7 +129,7 @@ export default { remark: null, attaches: [], customerId: this.$route.query.customerId, - memberIds: [], + memberList: [], // vo customerName: this.$route.query.customerName, }; diff --git a/src/views/bst/project/index.vue b/src/views/bst/project/index.vue index edd2e0b..1a88abd 100644 --- a/src/views/bst/project/index.vue +++ b/src/views/bst/project/index.vue @@ -25,11 +25,8 @@ @keyup.enter.native="handleQuery" /> - - - - - + + @@ -136,6 +133,17 @@ + + + @@ -246,7 +254,7 @@