Browse Source

feat: 新建任务 部分提交参数

wrr
song 4 years ago
parent
commit
25c78b856f
  1. 1
      CHANGELOG.md
  2. 32
      src/components/Title/components/CreateTask.vue

1
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)

32
src/components/Title/components/CreateTask.vue

@ -90,8 +90,14 @@
</div>
<div class="mt-6">
<div>交付物</div>
<div v-for="(sort, sortIndex) in deliverSort" :key="sort.id">
<u-input @click="addDeliver(sortIndex)" v-model="sort.name" placeholder="交付物名称1" :type="type" :border="border" />
<div v-for="(sort, sortIndex) in deliverSort" :key="sortIndex">
<u-input
@blur="addDeliverInput"
v-model="sort.name"
:placeholder="`交付物名称${sortIndex + 1}`"
:type="type"
:border="border"
/>
</div>
</div>
</div>
@ -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);
},
/**

Loading…
Cancel
Save