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