no message

This commit is contained in:
kuaifan 2025-09-23 09:50:39 +08:00
parent 73ca4b1ea5
commit 1c4bae2d91
7 changed files with 23 additions and 19 deletions

View File

@ -19,7 +19,7 @@ class CreateUserFavoritesTable extends Migration
Schema::create('user_favorites', function (Blueprint $table) { Schema::create('user_favorites', function (Blueprint $table) {
$table->bigIncrements('id'); $table->bigIncrements('id');
$table->bigInteger('userid')->index()->nullable()->default(0)->comment('用户ID'); $table->bigInteger('userid')->index()->nullable()->default(0)->comment('用户ID');
$table->string('favoritable_type', 50)->index()->nullable()->default('')->comment('收藏类型(task/project/file)'); $table->string('favoritable_type', 50)->index()->nullable()->default('')->comment('收藏类型(比如:task/project/file/message)');
$table->bigInteger('favoritable_id')->index()->nullable()->default(0)->comment('收藏对象ID'); $table->bigInteger('favoritable_id')->index()->nullable()->default(0)->comment('收藏对象ID');
$table->timestamps(); $table->timestamps();

View File

@ -892,3 +892,9 @@ URL格式不正确
同步完成,子部门中没有成员需要同步 同步完成,子部门中没有成员需要同步
同步完成,共同步(*)个成员 同步完成,共同步(*)个成员
同步完成,共同步(*)个成员,其中(*)个成员已在当前部门 同步完成,共同步(*)个成员,其中(*)个成员已在当前部门
无效的收藏类型
收藏成功
取消收藏成功
清理(*)收藏成功
清理全部收藏成功

View File

@ -2165,3 +2165,17 @@ API URL
当前部门没有子部门,无需同步 当前部门没有子部门,无需同步
你确定要同步部门成员吗? 你确定要同步部门成员吗?
注:此操作会同步子部门成员到当前部门 注:此操作会同步子部门成员到当前部门
我的收藏
收藏类型
全部类型
搜索收藏名称
所属项目
收藏时间
确定要取消收藏"(*)"吗?
取消收藏
收藏
没有相关的收藏
取消收藏成功
收藏项目
操作失败

View File

@ -1070,7 +1070,6 @@ export default {
}, },
projectData(newData, oldData) { projectData(newData, oldData) {
this.sortData = this.getSort(); this.sortData = this.getSort();
//
if (newData && newData.id && (!oldData || newData.id !== oldData.id)) { if (newData && newData.id && (!oldData || newData.id !== oldData.id)) {
this.checkProjectFavoriteStatus(); this.checkProjectFavoriteStatus();
} }
@ -1898,7 +1897,6 @@ export default {
type: 'project', type: 'project',
id: this.projectData.id id: this.projectData.id
}).then(({data, msg}) => { }).then(({data, msg}) => {
//
this.$set(this.projectData, 'favorited', data.favorited); this.$set(this.projectData, 'favorited', data.favorited);
$A.messageSuccess(msg); $A.messageSuccess(msg);
}).catch(({msg}) => { }).catch(({msg}) => {
@ -1918,7 +1916,6 @@ export default {
}).then(({data}) => { }).then(({data}) => {
this.$set(this.projectData, 'favorited', data.favorited || false); this.$set(this.projectData, 'favorited', data.favorited || false);
}).catch(() => { }).catch(() => {
//
this.$set(this.projectData, 'favorited', false); this.$set(this.projectData, 'favorited', false);
}); });
}, },

View File

@ -48,8 +48,8 @@
<template v-if="task.parent_id === 0"> <template v-if="task.parent_id === 0">
<template v-if="operationShow"> <template v-if="operationShow">
<EDropdownItem command="favorite" :divided="turns.length > 0"> <EDropdownItem command="favorite" :divided="turns.length > 0">
<div class="item" :class="{'favorited': isFavorited}"> <div class="item">
<Icon :type="isFavorited ? 'ios-star' : 'ios-star-outline'" />{{$L(isFavorited ? '取消收藏' : '收藏')}} <i class="taskfont movefont" v-html="isFavorited ? '&#xe683;' : '&#xe679;'"></i>{{$L(isFavorited ? '取消收藏' : '收藏')}}
</div> </div>
</EDropdownItem> </EDropdownItem>
<EDropdownItem command="send"> <EDropdownItem command="send">

View File

@ -2092,12 +2092,10 @@ export default {
type: 'file', type: 'file',
id: item.id id: item.id
}).then(({data, msg}) => { }).then(({data, msg}) => {
//
const fileIndex = this.fileList.findIndex(file => file.id === item.id); const fileIndex = this.fileList.findIndex(file => file.id === item.id);
if (fileIndex > -1) { if (fileIndex > -1) {
this.$set(this.fileList[fileIndex], 'favorited', data.favorited); this.$set(this.fileList[fileIndex], 'favorited', data.favorited);
} }
//
if (this.contextMenuItem.id === item.id) { if (this.contextMenuItem.id === item.id) {
this.$set(this.contextMenuItem, 'favorited', data.favorited); this.$set(this.contextMenuItem, 'favorited', data.favorited);
} }
@ -2117,15 +2115,12 @@ export default {
type: 'file', type: 'file',
id: file.id id: file.id
}).then(({data}) => { }).then(({data}) => {
//
this.$set(this.contextMenuItem, 'favorited', data.favorited || false); this.$set(this.contextMenuItem, 'favorited', data.favorited || false);
//
const fileIndex = this.fileList.findIndex(f => f.id === file.id); const fileIndex = this.fileList.findIndex(f => f.id === file.id);
if (fileIndex > -1) { if (fileIndex > -1) {
this.$set(this.fileList[fileIndex], 'favorited', data.favorited || false); this.$set(this.fileList[fileIndex], 'favorited', data.favorited || false);
} }
}).catch(() => { }).catch(() => {
//
this.$set(this.contextMenuItem, 'favorited', false); this.$set(this.contextMenuItem, 'favorited', false);
const fileIndex = this.fileList.findIndex(f => f.id === file.id); const fileIndex = this.fileList.findIndex(f => f.id === file.id);
if (fileIndex > -1) { if (fileIndex > -1) {

View File

@ -61,14 +61,6 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
&.favorited {
color: #faad14;
.ivu-icon {
color: #faad14;
}
}
.item-prefix { .item-prefix {
display: flex; display: flex;
align-items: center; align-items: center;