From a7d92cda03631d9c8691e2c35433942db6a9f4c0 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 10 Jan 2024 18:00:35 +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 --- public/index.html | 2 +- src/components/layout/UserLayout.vue | 2 +- src/components/project/taskAdd.vue | 54 ++++++--------- src/components/project/taskDetail.vue | 97 ++++++++++++++------------- src/components/tools/VUploader.vue | 3 +- src/views/home/index.vue | 14 ++-- src/views/project/space/events.vue | 4 +- src/views/project/space/features.vue | 4 +- src/views/project/space/files.vue | 4 +- src/views/project/space/overview.vue | 6 +- src/views/project/space/task.vue | 39 ++++++----- vue.config.js | 4 +- 12 files changed, 107 insertions(+), 126 deletions(-) diff --git a/public/index.html b/public/index.html index 6ea539e..af23cd7 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - Pear Project + 工单系统
diff --git a/src/components/layout/UserLayout.vue b/src/components/layout/UserLayout.vue index 666a229..1cf9540 100644 --- a/src/components/layout/UserLayout.vue +++ b/src/components/layout/UserLayout.vue @@ -33,7 +33,7 @@ desc: { type: [String], default() { - return '欢迎使用Pear Project项目管理系统'; + return '欢迎使用工单项目管理系统'; } } } diff --git a/src/components/project/taskAdd.vue b/src/components/project/taskAdd.vue index 1305551..d26fa64 100644 --- a/src/components/project/taskAdd.vue +++ b/src/components/project/taskAdd.vue @@ -350,10 +350,10 @@ + :src="item.fileUrl"/>
{{ item.title + :href="item.fileUrl">{{ item.name }}
@@ -361,33 +361,10 @@
- {{item.sourceDetail.projectName}} + {{item.projectName}} - - - - - - - - - - - 复制链接 - - - - 取消关联 - - - + + @@ -477,6 +454,7 @@ loading: false, code: this.taskCode, projectCodeCurrent: '', + projectName: '', task: { pri: 0, priText: '普通', @@ -631,13 +609,11 @@ uploader: { handler(newVal, oldVal) { //监听是否有上传文件行为 - console.log(newVal); - console.log(newVal.fileList); + console.log('上传文件', newVal); + console.log('上传文件', newVal.fileList, oldVal.fileList); const files = newVal.fileList; - const index = files.findIndex(item => item.projectName == this.task.projectName); - if (index !== -1) { - this.taskSources(); - this.getTaskLog(); + if(files[files.length-1].projectName == this.projectName){ + this.taskSourceList.push(files[files.length-1]) } }, deep: true @@ -649,6 +625,7 @@ this.getDepartment(); // console.log('router', this.$route); this.projectCode = this.$route.params.code; + this.projectName = this.$route.query.name; this.$nextTick(()=>{ this.changeModalHeight(); }) @@ -741,6 +718,10 @@ }) } }, + // 删除文件 + removeTaskSource(e, index){ + this.taskSourceList.splice(index, 1); + }, // 创建任务 addTask(){ if(!this.task.name) return notice({title: '请输入工单名称'}, 'error', 5000); @@ -755,6 +736,9 @@ task.exchangeList = task.exchangeList.map(item=>{ return item.code; }) + task.file_list = this.taskSourceList.map(item=>{ + return item.code; + }).join(','); task.exchangeList = task.exchangeList.join(','); task.copied_list = task.copied_list.map(item=>{ return item.code; @@ -841,7 +825,7 @@ // }) }, taskSources() { - // taskSources({taskCode: this.code,}).then((res) => { + // taskSources().then((res) => { // this.taskSourceList = res.data; // }) }, diff --git a/src/components/project/taskDetail.vue b/src/components/project/taskDetail.vue index 7625ce5..f4e6c9e 100644 --- a/src/components/project/taskDetail.vue +++ b/src/components/project/taskDetail.vue @@ -98,12 +98,12 @@ -
+
-