mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
no message
This commit is contained in:
parent
5bb80b5f50
commit
17ce620abf
@ -781,14 +781,11 @@ class ProjectTask extends AbstractModel
|
|||||||
// 更新任务时间也要更新重复周期
|
// 更新任务时间也要更新重复周期
|
||||||
$this->refreshLoop();
|
$this->refreshLoop();
|
||||||
}
|
}
|
||||||
$oldLoop = Carbon::parse($loopAt);
|
$oldLoop = $loopAt ? Carbon::parse($loopAt)->toDateTimeString() : null;
|
||||||
$newLoop = Carbon::parse($this->loop_at);
|
$newLoop = $this->loop_at ? Carbon::parse($this->loop_at)->toDateTimeString() : null;
|
||||||
if ($oldLoop->ne($newLoop)) {
|
if ($oldLoop != $newLoop) {
|
||||||
$this->addLog("修改{任务}下一个周期", [
|
$this->addLog("修改{任务}下个周期", [
|
||||||
'change' => [
|
'change' => [$oldLoop, $newLoop]
|
||||||
$loopAt ? $oldLoop->toDateTimeString() : null,
|
|
||||||
$this->loop_at ? $newLoop->toDateTimeString() : null,
|
|
||||||
]
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if ($loopDesc != $this->loopDesc()) {
|
if ($loopDesc != $this->loopDesc()) {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ class LoopTask extends AbstractTask
|
|||||||
if ($task->start_at) {
|
if ($task->start_at) {
|
||||||
$diffSecond = Carbon::parse($task->start_at)->diffInSeconds(Carbon::parse($task->end_at), true);
|
$diffSecond = Carbon::parse($task->start_at)->diffInSeconds(Carbon::parse($task->end_at), true);
|
||||||
$task->start_at = Carbon::parse($task->loop_at);
|
$task->start_at = Carbon::parse($task->loop_at);
|
||||||
$task->end_at = $task->start_at->addSeconds($diffSecond);
|
$task->end_at = $task->start_at->clone()->addSeconds($diffSecond);
|
||||||
}
|
}
|
||||||
$task->refreshLoop(true);
|
$task->refreshLoop(true);
|
||||||
$task->addLog("创建任务来自周期任务ID:" . $item->id, [], $task->userid);
|
$task->addLog("创建任务来自周期任务ID:" . $item->id, [], $task->userid);
|
||||||
|
|||||||
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
ad35f0f8f397a654
|
f252c016b432380a
|
||||||
|
|||||||
32
resources/assets/js/store/actions.js
vendored
32
resources/assets/js/store/actions.js
vendored
@ -1114,8 +1114,10 @@ export default {
|
|||||||
increaseTaskMsgNum({state}, dialog_id) {
|
increaseTaskMsgNum({state}, dialog_id) {
|
||||||
$A.execMainDispatch("increaseTaskMsgNum", dialog_id)
|
$A.execMainDispatch("increaseTaskMsgNum", dialog_id)
|
||||||
//
|
//
|
||||||
const task = state.cacheTasks.find(task => task.dialog_id === dialog_id);
|
if (dialog_id) {
|
||||||
if (task) task.msg_num++;
|
const task = state.cacheTasks.find(task => task.dialog_id === dialog_id);
|
||||||
|
if (task) task.msg_num++;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1129,10 +1131,22 @@ export default {
|
|||||||
//
|
//
|
||||||
if (reply_id > 0) {
|
if (reply_id > 0) {
|
||||||
const msg = state.dialogMsgs.find(({id}) => id == reply_id)
|
const msg = state.dialogMsgs.find(({id}) => id == reply_id)
|
||||||
if (msg) {
|
if (msg) msg.reply_num++;
|
||||||
msg.reply_num++
|
}
|
||||||
dispatch("saveDialogMsg", msg)
|
},
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 减少回复数量
|
||||||
|
* @param state
|
||||||
|
* @param dispatch
|
||||||
|
* @param reply_id
|
||||||
|
*/
|
||||||
|
decrementMsgReplyNum({state, dispatch}, reply_id) {
|
||||||
|
$A.execMainDispatch("decrementMsgReplyNum", reply_id)
|
||||||
|
//
|
||||||
|
if (reply_id > 0) {
|
||||||
|
const msg = state.dialogMsgs.find(({id}) => id == reply_id)
|
||||||
|
if (msg) msg.reply_num--;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2146,15 +2160,17 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 忘记消息数据
|
* 忘记消息数据
|
||||||
* @param state
|
* @param state
|
||||||
|
* @param dispatch
|
||||||
* @param msg_id
|
* @param msg_id
|
||||||
*/
|
*/
|
||||||
forgetDialogMsg({state}, msg_id) {
|
forgetDialogMsg({state, dispatch}, msg_id) {
|
||||||
$A.execMainDispatch("forgetDialogMsg", msg_id)
|
$A.execMainDispatch("forgetDialogMsg", msg_id)
|
||||||
//
|
//
|
||||||
let ids = $A.isArray(msg_id) ? msg_id : [msg_id];
|
const ids = $A.isArray(msg_id) ? msg_id : [msg_id];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
const index = state.dialogMsgs.findIndex(item => item.id == id);
|
const index = state.dialogMsgs.findIndex(item => item.id == id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
|
dispatch("decrementMsgReplyNum", state.dialogMsgs[index].reply_id);
|
||||||
Store.set('audioSubscribe', id);
|
Store.set('audioSubscribe', id);
|
||||||
state.dialogMsgs.splice(index, 1);
|
state.dialogMsgs.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user