mirror of
https://github.com/kuaifan/dootask.git
synced 2026-04-04 19:50:09 +00:00
fix: 不是任务负责人不能通过小窗口发送任务消息的问题
This commit is contained in:
parent
f05914f2a1
commit
66961197f6
@ -1504,7 +1504,7 @@ class ProjectController extends AbstractController
|
||||
*/
|
||||
public function task__dialog()
|
||||
{
|
||||
User::auth();
|
||||
$user = User::auth();
|
||||
//
|
||||
$task_id = intval(Request::input('task_id'));
|
||||
//
|
||||
@ -1529,9 +1529,11 @@ class ProjectController extends AbstractController
|
||||
});
|
||||
//
|
||||
$task->pushMsg('dialog');
|
||||
$dialogData = WebSocketDialog::find($task->dialog_id)?->formatData($user->userid);
|
||||
return Base::retSuccess('success', [
|
||||
'id' => $task->id,
|
||||
'dialog_id' => $task->dialog_id,
|
||||
'dialog_data' => $dialogData,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -1103,8 +1103,12 @@ export default {
|
||||
task_id: this.taskDetail.id,
|
||||
},
|
||||
}).then(({data}) => {
|
||||
this.$store.dispatch("saveTask", data);
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id).then(() => {
|
||||
this.$store.dispatch("saveTask", {
|
||||
id: data.id,
|
||||
dialog_id: data.dialog_id,
|
||||
});
|
||||
this.$store.dispatch("saveDialog", data.dialog_data);
|
||||
//
|
||||
if ($A.isSubElectron) {
|
||||
this.resizeDialog().then(() => {
|
||||
this.sendDialogMsg();
|
||||
@ -1137,10 +1141,6 @@ export default {
|
||||
}).finally(_ => {
|
||||
this.sendLoad--;
|
||||
});
|
||||
}).catch(({msg}) => {
|
||||
this.sendLoad--;
|
||||
$A.modalError(msg);
|
||||
});
|
||||
},
|
||||
|
||||
sendDialogMsg() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user