mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 14:12:51 +00:00
fix: 清空子任务的时间报错闪现的问题
This commit is contained in:
parent
95a3aa7290
commit
152aa0f92b
14
resources/assets/js/store/actions.js
vendored
14
resources/assets/js/store/actions.js
vendored
@ -1484,7 +1484,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
taskUpdate({state, dispatch}, data) {
|
taskUpdate({state, dispatch}, data) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
dispatch("taskBeforeUpdate", data).then(post => {
|
dispatch("taskBeforeUpdate", data).then(({confirm, post}) => {
|
||||||
dispatch("taskLoadStart", post.task_id)
|
dispatch("taskLoadStart", post.task_id)
|
||||||
dispatch("call", {
|
dispatch("call", {
|
||||||
url: 'project/task/update',
|
url: 'project/task/update',
|
||||||
@ -1498,7 +1498,7 @@ export default {
|
|||||||
console.warn(e);
|
console.warn(e);
|
||||||
dispatch("taskLoadEnd", post.task_id)
|
dispatch("taskLoadEnd", post.task_id)
|
||||||
dispatch("getTaskOne", post.task_id).catch(() => {})
|
dispatch("getTaskOne", post.task_id).catch(() => {})
|
||||||
reject(e)
|
setTimeout(() => { reject(e) }, confirm === true ? 301 : 0)
|
||||||
});
|
});
|
||||||
}).catch(reject)
|
}).catch(reject)
|
||||||
});
|
});
|
||||||
@ -1585,14 +1585,20 @@ export default {
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (content === null) {
|
if (content === null) {
|
||||||
resolve(post);
|
resolve({
|
||||||
|
confirm: false,
|
||||||
|
post
|
||||||
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$A.modalConfirm({
|
$A.modalConfirm({
|
||||||
title,
|
title,
|
||||||
content,
|
content,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
resolve(post);
|
resolve({
|
||||||
|
confirm: true,
|
||||||
|
post
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
reject({msg: false})
|
reject({msg: false})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user