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 @@ -
+
-