mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 05:12:49 +00:00
perf: 优化数据结构
This commit is contained in:
parent
38fa72e9da
commit
b643fe56d5
@ -93,15 +93,15 @@ export default {
|
||||
|
||||
computed: {
|
||||
showSSO() {
|
||||
return this.$isSoftware && ['login'].includes(this.$route.name)
|
||||
return this.$isSoftware && ['login'].includes(this.routeName)
|
||||
},
|
||||
|
||||
showDown() {
|
||||
return !this.$isEEUiApp && !this.windowTouch && ['login', 'index', 'manage-dashboard'].includes(this.$route.name)
|
||||
return !this.$isEEUiApp && !this.windowTouch && ['login', 'index', 'manage-dashboard'].includes(this.routeName)
|
||||
},
|
||||
|
||||
showPrivacy() {
|
||||
return $A.isDooServer() && this.$isEEUiApp && ['login'].includes(this.$route.name)
|
||||
return $A.isDooServer() && this.$isEEUiApp && ['login'].includes(this.routeName)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -366,7 +366,7 @@ export default {
|
||||
},
|
||||
|
||||
qrcodeStatus() {
|
||||
if (this.$route.name !== 'login' || this.loginMode != 'qrcode') {
|
||||
if (this.routeName !== 'login' || this.loginMode != 'qrcode') {
|
||||
return;
|
||||
}
|
||||
if (this.qrcodeLoad) {
|
||||
|
||||
@ -381,7 +381,7 @@ export default {
|
||||
}
|
||||
}).then(({msg}) => {
|
||||
$A.messageSuccess(msg);
|
||||
if (this.$route.name == 'manage-approve-details' || this.$route.name == 'manage-messenger') {
|
||||
if (this.routeName == 'manage-approve-details' || this.routeName == 'manage-messenger') {
|
||||
this.getInfo()
|
||||
} else {
|
||||
this.$emit('approve')
|
||||
@ -411,7 +411,7 @@ export default {
|
||||
}).then(({msg}) => {
|
||||
$A.messageSuccess(msg);
|
||||
resolve();
|
||||
if (this.$route.name == 'manage-approve-details' || this.$route.name == 'manage-messenger') {
|
||||
if (this.routeName == 'manage-approve-details' || this.routeName == 'manage-messenger') {
|
||||
this.getInfo()
|
||||
} else {
|
||||
this.$emit('revocation')
|
||||
|
||||
@ -188,7 +188,7 @@ export default {
|
||||
if (num <= 1) return
|
||||
this.wsTimer && clearTimeout(this.wsTimer)
|
||||
this.wsTimer = setTimeout(() => {
|
||||
this.$route.name == 'manage-calendar' && this.setDateRangeText();
|
||||
this.routeName == 'manage-calendar' && this.setDateRangeText();
|
||||
}, 5000)
|
||||
}
|
||||
},
|
||||
|
||||
@ -2648,7 +2648,8 @@ export default {
|
||||
onDialogMenu(cmd) {
|
||||
switch (cmd) {
|
||||
case "single":
|
||||
this.$store.dispatch('openDialog', {dialog_id: this.dialogData.id});
|
||||
this.$store.dispatch('openDialog', {dialog_id: this.dialogData.id, single: true});
|
||||
this.routeName !== 'manage-messenger' && this.$store.dispatch('openDialog', 0);
|
||||
break;
|
||||
|
||||
case "searchMsg":
|
||||
@ -3000,9 +3001,13 @@ export default {
|
||||
},
|
||||
|
||||
handleBack() {
|
||||
if ($A.isSubElectron) {
|
||||
window.close()
|
||||
return
|
||||
}
|
||||
const {name, params} = this.$store.state.routeHistoryLast;
|
||||
if (name === this.$route.name && /^\d+$/.test(params.dialogId)) {
|
||||
this.goForward({name: this.$route.name});
|
||||
if (name === this.routeName && /^\d+$/.test(params.dialogId)) {
|
||||
this.goForward({name: this.routeName});
|
||||
} else {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
@ -1717,8 +1717,8 @@ export default {
|
||||
|
||||
onBack() {
|
||||
const {name, params} = this.$store.state.routeHistoryLast;
|
||||
if (name === this.$route.name && /^\d+$/.test(params.projectId)) {
|
||||
this.goForward({name: this.$route.name, params: {projectId: 'all'}});
|
||||
if (name === this.routeName && /^\d+$/.test(params.projectId)) {
|
||||
this.goForward({name: this.routeName, params: {projectId: 'all'}});
|
||||
} else {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
@ -378,6 +378,9 @@ export default {
|
||||
this.$store.dispatch("updateDialogLastMsg", data.msgs);
|
||||
$A.messageSuccess(msg);
|
||||
resolve();
|
||||
if (data.msgs.length > 0) {
|
||||
this.$store.dispatch("openDialog", data.msgs[0].dialog_id);
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
reject();
|
||||
|
||||
@ -1755,7 +1755,7 @@ export default {
|
||||
},
|
||||
|
||||
openNewWin() {
|
||||
let config = {
|
||||
const config = {
|
||||
title: this.taskDetail.name,
|
||||
titleFixed: true,
|
||||
parent: null,
|
||||
|
||||
@ -956,7 +956,7 @@ export default {
|
||||
if (num <= 1) return
|
||||
this.wsOpenTimeout && clearTimeout(this.wsOpenTimeout)
|
||||
this.wsOpenTimeout = setTimeout(() => {
|
||||
this.$route.name == 'manage-file' && this.getFileList();
|
||||
this.routeName == 'manage-file' && this.getFileList();
|
||||
}, 5000)
|
||||
},
|
||||
|
||||
@ -975,7 +975,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
getFileList() {
|
||||
if (this.$route.name !== 'manage-file') {
|
||||
if (this.routeName !== 'manage-file') {
|
||||
return;
|
||||
}
|
||||
this.loadIng++;
|
||||
@ -1076,7 +1076,7 @@ export default {
|
||||
},
|
||||
|
||||
openFileJudge() {
|
||||
if (this.$route.name !== 'manage-file') {
|
||||
if (this.routeName !== 'manage-file') {
|
||||
this.fileShow = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1115,7 +1115,7 @@ export default {
|
||||
break;
|
||||
|
||||
case 'single':
|
||||
this.$store.dispatch('openDialog', this.operateItem.id);
|
||||
this.$store.dispatch('openDialog', {dialog_id: this.operateItem.id, single: true});
|
||||
break;
|
||||
|
||||
case 'hide':
|
||||
|
||||
@ -37,7 +37,7 @@ export default {
|
||||
if (num <= 1) return
|
||||
this.wsOpenTimeout && clearTimeout(this.wsOpenTimeout)
|
||||
this.wsOpenTimeout = setTimeout(() => {
|
||||
this.$route.name == 'manage-project' && this.getProjectData();
|
||||
this.routeName == 'manage-project' && this.getProjectData();
|
||||
}, 5000)
|
||||
}
|
||||
},
|
||||
|
||||
9
resources/assets/js/store/actions.js
vendored
9
resources/assets/js/store/actions.js
vendored
@ -3031,15 +3031,16 @@ export default {
|
||||
*/
|
||||
openDialog({state, dispatch}, dialogId) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let singleWindow = state.routeName !== 'manage-messenger',
|
||||
searchMsgId = 0,
|
||||
dialogMsgId = 0;
|
||||
let singleWindow,
|
||||
searchMsgId,
|
||||
dialogMsgId;
|
||||
if ($A.isJson(dialogId)) {
|
||||
singleWindow = singleWindow || !!dialogId.single;
|
||||
singleWindow = dialogId.single;
|
||||
searchMsgId = dialogId.search_msg_id;
|
||||
dialogMsgId = dialogId.dialog_msg_id;
|
||||
dialogId = dialogId.dialog_id;
|
||||
}
|
||||
singleWindow = typeof singleWindow === "boolean" ? singleWindow : $A.isSubElectron;
|
||||
searchMsgId = /^\d+$/.test(searchMsgId) ? parseInt(searchMsgId) : 0;
|
||||
dialogMsgId = /^\d+$/.test(dialogMsgId) ? parseInt(dialogMsgId) : 0;
|
||||
dialogId = /^\d+$/.test(dialogId) ? parseInt(dialogId) : 0;
|
||||
|
||||
@ -38,7 +38,7 @@ body {
|
||||
.ivu-modal {
|
||||
.ivu-modal-content {
|
||||
.ivu-modal-close {
|
||||
top: 12px;
|
||||
top: 11px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@ -53,6 +53,12 @@ body {
|
||||
.nav-wrapper {
|
||||
padding: 0 20px;
|
||||
|
||||
&.completed {
|
||||
&:after {
|
||||
right: 102px;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-menu {
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 52px;
|
||||
right: 60px;
|
||||
transform: translateY(-50%);
|
||||
font-size: 40px;
|
||||
color: #19be6b;
|
||||
@ -109,7 +109,7 @@
|
||||
}
|
||||
|
||||
.dialog-title {
|
||||
padding-right: 52px;
|
||||
padding-right: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user