Skip to content

Commit

Permalink
fix: 添加任务时选择任务组无效
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jan 27, 2022
1 parent 53550b8 commit 09d3131
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions resources/assets/js/pages/manage/components/TaskAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:clearable="false"
:placeholder="$L('请选择项目')"
:load-data="cascaderLoadData"
@on-change="cascaderChange"
@on-input-change="cascaderInputChange"
@on-visible-change="cascaderShow=!cascaderShow"
filterable/>
Expand Down Expand Up @@ -269,18 +270,22 @@ export default {
}
},
'addData.project_id'(id) {
$A.setStorage("cacheAddTaskProjectId", id);
if (id > 0) {
$A.setStorage("cacheAddTaskProjectId", id);
}
},
'addData.column_id'(id) {
const {project_id, column_id} = this.addData;
const {project_id} = this.addData;
this.$nextTick(() => {
if (project_id && column_id) {
this.$set(this.addData, 'cascader', [project_id, column_id]);
if (project_id && id) {
this.$set(this.addData, 'cascader', [project_id, id]);
} else {
this.$set(this.addData, 'cascader', []);
}
})
$A.setStorage("cacheAddTaskColumnId", id);
if (id > 0) {
$A.setStorage("cacheAddTaskColumnId", id);
}
}
},
methods: {
Expand Down Expand Up @@ -425,6 +430,10 @@ export default {
});
},
cascaderChange(value) {
value[1] && this.$set(this.addData, 'column_id', value[1])
},
cascaderInputChange(key) {
this.cascaderValue = key || "";
//
Expand Down

0 comments on commit 09d3131

Please sign in to comment.