mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-04 12:23:26 +00:00
fix: 无法清除计划时间
This commit is contained in:
parent
4dfa1c8efc
commit
6aa868c8d8
@ -384,6 +384,9 @@
|
|||||||
<EDropdownItem :command="2">
|
<EDropdownItem :command="2">
|
||||||
{{$L('修改时间')}}
|
{{$L('修改时间')}}
|
||||||
</EDropdownItem>
|
</EDropdownItem>
|
||||||
|
<EDropdownItem :command="3">
|
||||||
|
{{$L('清除时间')}}
|
||||||
|
</EDropdownItem>
|
||||||
</EDropdownMenu>
|
</EDropdownMenu>
|
||||||
</EDropdown>
|
</EDropdown>
|
||||||
<EDropdown ref="eFileRef" class="calculate-dropdown" trigger="click" placement="bottom" @command="dropFile">
|
<EDropdown ref="eFileRef" class="calculate-dropdown" trigger="click" placement="bottom" @command="dropFile">
|
||||||
@ -1060,13 +1063,21 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 弹出修改备注
|
// 弹出修改备注
|
||||||
|
let isClear = !params.start_at || !params.end_at;
|
||||||
|
let title = `修改${this.taskDetail.parent_id > 0 ? '子任务' : '任务'}时间`
|
||||||
|
let placeholder = `请输入修改备注`
|
||||||
|
if (isClear) {
|
||||||
|
title = `清除${this.taskDetail.parent_id > 0 ? '子任务' : '任务'}时间`
|
||||||
|
placeholder = `请输入清除备注`
|
||||||
|
}
|
||||||
$A.modalInput({
|
$A.modalInput({
|
||||||
title: `修改${this.taskDetail.parent_id > 0 ? '子任务' : '任务'}时间`,
|
title,
|
||||||
placeholder: `请输入修改备注`,
|
placeholder,
|
||||||
okText: "确定",
|
okText: "确定",
|
||||||
|
okType: isClear ? "warning" : "primary",
|
||||||
onOk: (desc) => {
|
onOk: (desc) => {
|
||||||
if (!desc) {
|
if (!desc) {
|
||||||
return `请输入修改备注`
|
return placeholder
|
||||||
}
|
}
|
||||||
params.desc = desc;
|
params.desc = desc;
|
||||||
this.isExistTask(params).then(() => {
|
this.isExistTask(params).then(() => {
|
||||||
@ -1143,10 +1154,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
isExistTask(params) {
|
isExistTask(params) {
|
||||||
if (!params.start_at || !params.end_at) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
if (!params.start_at || !params.end_at) {
|
||||||
|
resolve()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.updateParams = Object.assign({}, params)
|
this.updateParams = Object.assign({}, params)
|
||||||
this.$refs.taskExistTipsRef?.isExistTask({
|
this.$refs.taskExistTipsRef?.isExistTask({
|
||||||
taskid: this.taskDetail.id,
|
taskid: this.taskDetail.id,
|
||||||
@ -1777,6 +1789,9 @@ export default {
|
|||||||
case 2:
|
case 2:
|
||||||
this.openTime()
|
this.openTime()
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
this.updateData('times', {start_at: false, end_at: false})
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user