no message
This commit is contained in:
parent
3f69a3e6dd
commit
7b91a53a71
@ -162,6 +162,7 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.$store.dispatch("getUserInfo");
|
||||
this.$store.dispatch("getTaskPriority");
|
||||
},
|
||||
|
||||
deactivated() {
|
||||
|
@ -293,7 +293,7 @@
|
||||
maxWidth: '640px'
|
||||
}"
|
||||
:mask-closable="false">
|
||||
<TaskAdd v-model="addData"/>
|
||||
<TaskAdd ref="add" v-model="addData"/>
|
||||
<div slot="footer">
|
||||
<Button type="default" @click="addShow=false">{{$L('取消')}}</Button>
|
||||
<Button type="primary" :loading="taskLoad > 0" @click="onAddTask">{{$L('添加')}}</Button>
|
||||
@ -619,6 +619,7 @@ export default {
|
||||
this.$set(this.addData, 'column_id', column_id);
|
||||
this.$set(this.addData, 'project_id', this.projectDetail.id);
|
||||
}
|
||||
this.$refs.add.defaultPriority();
|
||||
this.addShow = true;
|
||||
},
|
||||
|
||||
|
@ -159,13 +159,6 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('getTaskPriority').then(() => {
|
||||
if (!this.value.p_name && this.taskPriority.length > 0) {
|
||||
this.choosePriority(this.taskPriority[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userId', 'projectDetail', 'taskPriority']),
|
||||
},
|
||||
@ -259,6 +252,15 @@ export default {
|
||||
this.$set(this.value, 'p_level', item.priority)
|
||||
this.$set(this.value, 'p_name', item.name)
|
||||
this.$set(this.value, 'p_color', item.color)
|
||||
},
|
||||
defaultPriority() {
|
||||
if (this.taskPriority.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (this.value.p_name) {
|
||||
return;
|
||||
}
|
||||
this.choosePriority(this.taskPriority[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,18 +105,8 @@ export default {
|
||||
|
||||
openAdd() {
|
||||
this.active = true;
|
||||
this.defaultPriority();
|
||||
this.$nextTick(() => {
|
||||
if (this.taskPriority.length === 0) {
|
||||
this.$store.dispatch('getTaskPriority').then(() => {
|
||||
if (!this.addData.p_name && this.taskPriority.length > 0) {
|
||||
this.choosePriority(this.taskPriority[0])
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!this.addData.p_name && this.taskPriority.length > 0) {
|
||||
this.choosePriority(this.taskPriority[0])
|
||||
}
|
||||
}
|
||||
this.$refs.input.focus();
|
||||
});
|
||||
},
|
||||
@ -178,6 +168,16 @@ export default {
|
||||
this.$set(this.addData, 'p_name', item.name)
|
||||
this.$set(this.addData, 'p_color', item.color)
|
||||
this.$refs.input.focus()
|
||||
},
|
||||
|
||||
defaultPriority() {
|
||||
if (this.taskPriority.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (this.addData.p_name) {
|
||||
return;
|
||||
}
|
||||
this.choosePriority(this.taskPriority[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -444,7 +444,6 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$store.dispatch('getTaskPriority');
|
||||
this.nowInterval = setInterval(() => {
|
||||
this.nowTime = Math.round(new Date().getTime() / 1000);
|
||||
}, 1000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user