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

View File

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

View File

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

View File

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