no message

This commit is contained in:
kuaifan 2025-04-14 14:01:36 +08:00
parent b560c0bafd
commit 79f256976e
5 changed files with 26 additions and 7 deletions

View File

@ -1424,11 +1424,12 @@ class ProjectTask extends AbstractModel
$this->archived_at = null;
$this->archived_userid = User::userid();
$this->archived_follow = 0;
$this->addLog("任务取消归档");
$logText = "任务取消归档";
$userid = 0;
} else {
// 归档任务
if ($isAuto === true) {
$logText = "自动任务归档";
$logText = "任务自动归档";
$userid = 0;
} else {
$logText = "任务归档";
@ -1437,13 +1438,20 @@ class ProjectTask extends AbstractModel
$this->archived_at = $archived_at;
$this->archived_userid = $userid;
$this->archived_follow = 0;
$this->addLog($logText, [], $userid);
}
// 添加日志
$this->addLog($logText, [], $userid);
// 推送状态
$this->pushMsg($archived_at === null ? 'recovery' : 'archived', [
'id' => $this->id,
'archived_at' => $this->archived_at,
'archived_userid' => $this->archived_userid,
]);
// 更新对话时间
if ($this->dialog_id > 0) {
WebSocketDialogUser::whereDialogId($this->dialog_id)->update(['updated_at' => Carbon::now()]); // 因为是若提醒,可以直接使用 update 更新
}
// 更新保存
self::whereParentId($this->id)->change([
'archived_at' => $this->archived_at,
'archived_userid' => $this->archived_userid,

View File

@ -27,7 +27,7 @@
{{ $L("汇报对象") }}
</div>
<div class="report-value">
<template v-if="data.receives_user.length === 0">-</template>
<template v-if="data.receives_user && data.receives_user.length === 0">-</template>
<UserAvatar v-else v-for="(item, key) in data.receives_user" :key="key" :userid="item.userid" :size="28"/>
</div>
</li>

View File

@ -12,7 +12,7 @@
:size="120"
:show-state-dot="false"
@on-click="onOpenAvatar"/>
<ul>
<ul class="user-select-auto">
<li>
<h1>{{userData.nickname}}</h1>
<em v-if="userData.delete_at" class="deleted no-dark-content">{{$L('已删除')}}</em>

View File

@ -709,7 +709,11 @@ export default {
state.userId = userInfo.userid;
state.userToken = userInfo.token;
state.userIsAdmin = $A.inArray('admin', userInfo.identity);
await $A.IDBSet("userInfo", state.userInfo);
if ($A.isSubElectron) {
// 子窗口Electron保存
} else {
await $A.IDBSet("userInfo", state.userInfo);
}
//
$A.eeuiAppSendMessage({
action: 'userChatList',

View File

@ -54,8 +54,15 @@ function __callData(key, requestData, state) {
} else {
deleted_id = []
}
if ($A.isEEUiApp) {
hasUpdate = state.isFirstPage
}
if (hasUpdate) {
await $A.IDBSet("callAt", state.callAt)
if ($A.isSubElectron || ($A.isEEUiApp && !state.isFirstPage)) {
// 子窗口Electron、不是第一个页面App 不保存
} else {
await $A.IDBSet("callAt", state.callAt)
}
}
resolve(deleted_id)
})