diff --git a/CHANGELOG.md b/CHANGELOG.md index 99854a0..a64ce2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - | 提交到本地 | [9cbe411](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/9cbe411) - | 插件参数处理调整 | [a3e68d3](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/a3e68d3) - | 插件数据获取 | [5b91bdc](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5b91bdc) + - | 新建任务 部分提交参数 | [6a422f6](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6a422f6) - | 新建任务,分享项目弹出层样式修改 | [efbc679](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/efbc679) - | 新建形目 | [f7d7108](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/f7d7108) - | 日历定位;合并 | [ea3f937](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/ea3f937) diff --git a/src/components/Title/components/CreateTask.vue b/src/components/Title/components/CreateTask.vue index c78ac5c..ba63fee 100644 --- a/src/components/Title/components/CreateTask.vue +++ b/src/components/Title/components/CreateTask.vue @@ -90,8 +90,14 @@
交付物:
-
- +
+
@@ -138,7 +144,7 @@ export default { roleIdList: [], // 选中的负责人id checkerIdList: [], // 选中的检查人id deliverables: [], // 交付物 - deliverSort: [{ id: 1, name: '' }], // 交付物排序 + deliverSort: [{ name: '' }], // 交付物排序 }; }, @@ -222,14 +228,16 @@ export default { this.show = false; }, - // 设置交付物 TODO - addDeliver(e) { - console.log('e: ', e, this.deliverSort[0].name); + // 数组最后一项有值 添加一条交付物输入框 + addDeliverInput() { + if (this.deliverSort[this.deliverSort.length - 1].name) { + this.deliverSort.push({ name: '' }); + } }, // 设置提交参数 async setParameters() { - const { projectId, name, startTime, endTime, roleIdList, description, processTaskId, checkerIdList, isGlobal, deliverables } = this; + const { projectId, name, startTime, endTime, roleIdList, description, processTaskId, checkerIdList, isGlobal } = this; if (!name) { this.$t.ui.showToast('请输入名称'); return; @@ -242,6 +250,12 @@ export default { this.$t.ui.showToast('请选择检查人'); return; } + const deliverList = []; + this.deliverSort.forEach(item => { + if (item.name) { + deliverList.push(item.name); + } + }); const params = { name, startTime: startTime ? this.$moment(startTime).format('x') - 0 : '', @@ -253,10 +267,10 @@ export default { processTaskId, // 上道工序 TODO checkerIdList, global: isGlobal ? 1 : 0, - deliverList: deliverables, // 交付物 + deliverList, }; console.log('params: ', params); - // await this.handleSubmit(params); + await this.handleSubmit(params); }, /**