mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 17:08:11 +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,43 +1103,43 @@ export default {
|
||||
task_id: this.taskDetail.id,
|
||||
},
|
||||
}).then(({data}) => {
|
||||
this.$store.dispatch("saveTask", data);
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id).then(() => {
|
||||
if ($A.isSubElectron) {
|
||||
this.resizeDialog().then(() => {
|
||||
this.sendDialogMsg();
|
||||
});
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
if (this.windowSmall) {
|
||||
$A.onBlur();
|
||||
this.$store.state.dialogMsgTransfer = {
|
||||
time: $A.Time() + 10,
|
||||
msgRecord: this.msgRecord,
|
||||
msgFile: this.msgFile,
|
||||
msgText: typeof msgText === 'string' && msgText ? msgText : this.msgText,
|
||||
};
|
||||
this.msgRecord = {};
|
||||
this.msgFile = [];
|
||||
this.msgText = "";
|
||||
if (this.dialogId > 0) {
|
||||
// 如果当前打开着对话窗口则关闭任务窗口
|
||||
this.$store.dispatch("openTask", 0);
|
||||
}
|
||||
this.$store.dispatch('openDialog', data.dialog_id)
|
||||
} else {
|
||||
this.sendDialogMsg();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.sendLoad--;
|
||||
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();
|
||||
});
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
if (this.windowSmall) {
|
||||
$A.onBlur();
|
||||
this.$store.state.dialogMsgTransfer = {
|
||||
time: $A.Time() + 10,
|
||||
msgRecord: this.msgRecord,
|
||||
msgFile: this.msgFile,
|
||||
msgText: typeof msgText === 'string' && msgText ? msgText : this.msgText,
|
||||
};
|
||||
this.msgRecord = {};
|
||||
this.msgFile = [];
|
||||
this.msgText = "";
|
||||
if (this.dialogId > 0) {
|
||||
// 如果当前打开着对话窗口则关闭任务窗口
|
||||
this.$store.dispatch("openTask", 0);
|
||||
}
|
||||
this.$store.dispatch('openDialog', data.dialog_id)
|
||||
} else {
|
||||
this.sendDialogMsg();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
this.sendLoad--;
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.sendLoad--;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user