no message

This commit is contained in:
kuaifan 2022-04-27 15:48:09 +08:00
parent 092506e9ab
commit 7b757d68b4
3 changed files with 31 additions and 31 deletions

View File

@ -384,7 +384,7 @@ export default {
return {
loadIng: 0,
routePath: this.$route.path,
routeName: this.$route.name,
mateName: /macintosh|mac os x/i.test(navigator.userAgent) ? '⌘' : 'Ctrl',
addShow: false,
@ -423,7 +423,7 @@ export default {
natificationHidden: false,
natificationReady: false,
notificationClass: null,
notificationManage: null,
reportTabs: "my",
reportUnreadNumber: 0,
@ -625,7 +625,7 @@ export default {
watch: {
'$route' (route) {
this.routePath = route.path;
this.routeName = route.name;
this.chackPass();
},
@ -652,9 +652,9 @@ export default {
natificationHidden(val) {
clearTimeout(this.notificationTimeout);
if (!val && this.notificationClass) {
if (!val && this.notificationManage) {
this.notificationTimeout = setTimeout(() => {
this.notificationClass.close();
this.notificationManage.close();
}, 6000);
}
},
@ -786,16 +786,14 @@ export default {
classNameRoute(path) {
return {
"active": $A.leftExists(this.routePath, '/manage/' + path),
"active": this.routeName === `manage-${path}`,
};
},
classNameProject(item) {
let path = 'project/' + item.id;
let openMenu = this.openMenu[item.id];
return {
"active": this.routePath === '/manage/' + path,
"open-menu": openMenu === true,
"active": this.routeName === 'manage-project' && this.$route.params.projectId === item.id,
"open-menu": this.openMenu[item.id] === true,
"operate": item.id == this.topOperateItem.id && this.topOperateVisible
};
},
@ -883,10 +881,12 @@ export default {
addDialogMsg(data) {
if (!this.natificationReady) {
return;
return; //
}
if (!this.natificationHidden && $A.leftExists(this.routePath, "/manage/messenger") && this.$route.params.id == data.dialog_id) {
return;
if (!this.natificationHidden
&& this.routeName === 'manage-messenger'
&& this.$route.params.dialogId == data.dialog_id) {
return; //
}
//
const {id, dialog_id, type, msg} = data;
@ -902,7 +902,7 @@ export default {
return;
}
this._notificationId = id;
this.notificationClass.replaceOptions({
this.notificationManage.replaceOptions({
icon: $A.originUrl('images/logo.png'),
body: body,
data: data,
@ -911,13 +911,13 @@ export default {
});
let dialog = this.cacheDialogs.find((item) => item.id == dialog_id);
if (dialog) {
this.notificationClass.replaceTitle(dialog.name);
this.notificationClass.userAgreed();
this.notificationManage.replaceTitle(dialog.name);
this.notificationManage.userAgreed();
} else {
this.$store.dispatch("getDialogOne", dialog_id).then(({data}) => {
if (this._notificationId === id) {
this.notificationClass.replaceTitle(data.name);
this.notificationClass.userAgreed();
this.notificationManage.replaceTitle(data.name);
this.notificationManage.userAgreed();
}
}).catch(() => {})
}
@ -1005,13 +1005,13 @@ export default {
},
notificationInit() {
this.notificationClass = new notificationKoro(this.$L("打开通知成功"));
if (this.notificationClass.support) {
this.notificationClass.notificationEvent({
this.notificationManage = new notificationKoro(this.$L("打开通知成功"));
if (this.notificationManage.support) {
this.notificationManage.notificationEvent({
onclick: ({target}) => {
console.log("[Notification] Click", target);
this.notificationClass.close();
window.focus();
this.notificationManage.close();
try {window.focus()}catch (e) {}
//
const {tag, data} = target;
if (tag == 'dialog') {
@ -1040,7 +1040,7 @@ export default {
//
case 'close':
return this.notificationClass.initNotification(userSelectFn);
return this.notificationManage.initNotification(userSelectFn);
// ||
case 'denied':
@ -1053,7 +1053,7 @@ export default {
break;
}
};
this.notificationClass.initNotification(userSelectFn);
this.notificationManage.initNotification(userSelectFn);
},
onVisibilityChange() {

View File

@ -82,7 +82,7 @@ export default {
align: 'center',
width: 100,
render: (h, {index, row, column}) => {
if (index === 0) {
if (index === 0 && this.page === 1) {
return h('div', '-');
}
return h('TableAction', {

View File

@ -46,7 +46,7 @@ import {Store} from "le5le-store";
export default {
data() {
return {
routePath: this.$route.path,
routeName: this.$route.name,
show768Menu: true,
version: window.systemInfo.version
@ -72,10 +72,10 @@ export default {
},
titleNameRoute() {
const {routePath, menu} = this;
const {routeName, menu} = this;
let name = '';
menu.some((item) => {
if ($A.leftExists(routePath, '/manage/setting/' + item.path)) {
if (routeName === `manage-setting-${item.path}`) {
name = item.name;
return true;
}
@ -85,7 +85,7 @@ export default {
},
watch: {
'$route' (route) {
this.routePath = route.path;
this.routeName = route.name;
}
},
methods: {
@ -100,7 +100,7 @@ export default {
classNameRoute(path, divided) {
return {
"active": $A.leftExists(this.routePath, '/manage/setting/' + path),
"active": this.routeName === `manage-setting-${path}`,
"divided": !!divided
};
},