From 99cb6a6e16a62dc7ecefb32063167a6be944209a Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 8 Jan 2024 18:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/task.js | 4 +- src/components/layout/UserLayout.vue | 2 +- src/components/project/taskAdd.vue | 9 +- src/components/project/taskDetail.vue | 161 +- src/components/project/taskSearch.vue | 6 +- src/const/common.js | 2 +- src/main.js | 40 + src/views/project/space/task.vue | 3328 ++++++++++++++----------- 8 files changed, 2010 insertions(+), 1542 deletions(-) diff --git a/src/api/task.js b/src/api/task.js index 72e2c38..cccd754 100644 --- a/src/api/task.js +++ b/src/api/task.js @@ -42,8 +42,8 @@ export function star(code, star) { return $http.post('project/task/star', {star: star, taskCode: code}); } -export function createComment(code, comment, mentions) { - return $http.post('project/task/createComment', {taskCode: code, comment: comment, mentions: mentions}); +export function createComment(code, comment, mentions, type=0) { + return $http.post('project/task/createComment', {taskCode: code, comment: comment, mentions: mentions, type: type}); } export function assignTask(data) { diff --git a/src/components/layout/UserLayout.vue b/src/components/layout/UserLayout.vue index 9797a97..666a229 100644 --- a/src/components/layout/UserLayout.vue +++ b/src/components/layout/UserLayout.vue @@ -6,7 +6,7 @@ - Pear Project + 工单系统 diff --git a/src/components/project/taskAdd.vue b/src/components/project/taskAdd.vue index 932af21..1305551 100644 --- a/src/components/project/taskAdd.vue +++ b/src/components/project/taskAdd.vue @@ -743,8 +743,11 @@ }, // 创建任务 addTask(){ + if(!this.task.name) return notice({title: '请输入工单名称'}, 'error', 5000); + if(!this.task.description) return notice({title: '请输入工作内容'}, 'error', 5000); + if(!this.task.end_time) return notice({title: '请选择完成期限'}, 'error', 5000); + if(!this.department.code) return notice({title: '请选择处理部门'}, 'error', 5000); this.createTask(); - return console.log(this.task); }, // 创建任务 createTask(){ @@ -758,6 +761,8 @@ }) task.copied_list = task.copied_list.join(','); task.assign_to = ""; + task.department_code = this.department.code; + task.liasion_code = this.liasionMan.code; // task.executor = task.executor.code; task.stage_code = this.$route.query.stage_code; task.project_code = this.$route.params.code; @@ -773,7 +778,7 @@ }, detailClose() { this.$emit('close', this.task); - this.$router.push(`/project/space/task/${this.$route.params.code}?re=1&from=${this.$route.query.from}`); + // this.$router.push(`/project/space/task/${this.$route.params.code}?re=1&from=${this.$route.query.from}`); // this.$router.push(`/project/space/task/${this.task.project_code}`); }, clearMemberMenu() { diff --git a/src/components/project/taskDetail.vue b/src/components/project/taskDetail.vue index d12604f..7625ce5 100644 --- a/src/components/project/taskDetail.vue +++ b/src/components/project/taskDetail.vue @@ -27,7 +27,7 @@ - + + -