no message

This commit is contained in:
kuaifan 2022-04-12 15:59:28 +08:00
parent be755a6f4e
commit 003ddb4016
7 changed files with 17 additions and 16 deletions

View File

@ -159,7 +159,7 @@
v-for="(item, key) in projectLists" v-for="(item, key) in projectLists"
:key="key" :key="key"
:class="classNameProject(item)" :class="classNameProject(item)"
@click="toggleRoute('project/' + item.id)" @click="toggleRoute('project', {projectId: item.id})"
@contextmenu.prevent.stop="handleRightClick($event, item)"> @contextmenu.prevent.stop="handleRightClick($event, item)">
<div class="project-h1"> <div class="project-h1">
<em @click.stop="toggleOpenMenu(item.id)"></em> <em @click.stop="toggleOpenMenu(item.id)"></em>
@ -710,15 +710,16 @@ export default {
this.$store.dispatch("setTheme", mode) this.$store.dispatch("setTheme", mode)
}, },
toggleRoute(path) { toggleRoute(path, params) {
this.show768Menu = false; this.show768Menu = false;
if (path === 'file' && $A.getStorageInt("file::pid") > 0) { let location = {name: 'manage-' + path, params: params || {}};
path += `/${$A.getStorageInt("file::pid")}` if (path === 'file' && $A.getStorageInt("file::folderId") > 0) {
location.params.folderId = $A.getStorageInt("file::folderId")
} }
if (path === 'messenger' && $A.getStorageInt("messenger::dialogId") > 0) { if (path === 'messenger' && $A.getStorageInt("messenger::dialogId") > 0) {
path += `/${$A.getStorageInt("messenger::dialogId")}` location.params.dialogId = $A.getStorageInt("messenger::dialogId")
} }
this.goForward({path: '/manage/' + path}); this.goForward(location);
}, },
toggleOpenMenu(id) { toggleOpenMenu(id) {
@ -767,7 +768,7 @@ export default {
return; return;
} }
if (this.menu.findIndex((m) => m.path == path) > -1) { if (this.menu.findIndex((m) => m.path == path) > -1) {
this.toggleRoute('setting/' + path); this.toggleRoute('setting-' + path);
} }
}, },
@ -812,7 +813,7 @@ export default {
this.addShow = false; this.addShow = false;
this.$refs.addProject.resetFields(); this.$refs.addProject.resetFields();
this.$store.dispatch("saveProject", data); this.$store.dispatch("saveProject", data);
this.toggleRoute('project/' + data.id) this.toggleRoute('project', {projectId: data.id})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.loadIng--; this.loadIng--;

View File

@ -466,7 +466,7 @@ export default {
if (!this.dialogData.group_info) { if (!this.dialogData.group_info) {
return; return;
} }
this.goForward({path: '/manage/project/' + this.dialogData.group_info.id}); this.goForward({name: 'manage-project', params: {projectId:this.dialogData.group_info.id}});
}, },
openTask() { openTask() {

View File

@ -844,7 +844,7 @@ export default {
this.$store.dispatch("getFiles", this.pid).then(() => { this.$store.dispatch("getFiles", this.pid).then(() => {
this.loadIng--; this.loadIng--;
this.openFileJudge() this.openFileJudge()
$A.setStorage("file::pid", this.pid) $A.setStorage("file::folderId", this.pid)
}).catch(({msg}) => { }).catch(({msg}) => {
this.loadIng--; this.loadIng--;
$A.modalError({ $A.modalError({
@ -899,7 +899,7 @@ export default {
browseFolder(id) { browseFolder(id) {
if (id > 0) { if (id > 0) {
this.goForward({params: {folderId: id, fileId: null}}); this.goForward({name: 'manage-file', params: {folderId: id, fileId: null}});
} else { } else {
this.goForward({name: 'manage-file'}); this.goForward({name: 'manage-file'});
} }
@ -907,7 +907,7 @@ export default {
browseFile(id) { browseFile(id) {
if (id > 0) { if (id > 0) {
this.goForward({params: {folderId: this.pid, fileId: id}}); this.goForward({name: 'manage-file', params: {folderId: this.pid, fileId: id}});
} else { } else {
this.browseFolder(this.pid); this.browseFolder(this.pid);
} }

View File

@ -57,7 +57,7 @@ export default {
onOk: () => { onOk: () => {
const project = this.cacheProjects.find(({id}) => id); const project = this.cacheProjects.find(({id}) => id);
if (project) { if (project) {
$A.goForward({path: '/manage/project/' + project.id}); $A.goForward({name: 'manage-project', params: {projectId: project.id}});
} else { } else {
$A.goForward({name: 'manage-dashboard'}); $A.goForward({name: 'manage-dashboard'});
} }

View File

@ -103,7 +103,7 @@ export default {
goProject() { goProject() {
this.$nextTick(() => { this.$nextTick(() => {
this.goForward({path: '/manage/project/' + this.project.id}); $A.goForward({name: 'manage-project', params: {projectId: this.project.id}});
}) })
} }
} }

View File

@ -95,7 +95,7 @@ export default {
return; return;
} }
this.show768Menu = false; this.show768Menu = false;
this.goForward({path: '/manage/setting/' + path}); this.goForward({name: 'manage-setting-' + path});
}, },
classNameRoute(path, divided) { classNameRoute(path, divided) {

View File

@ -644,7 +644,7 @@ export default {
if (ids.includes(state.projectId)) { if (ids.includes(state.projectId)) {
const project = state.cacheProjects.find(({id}) => id && id != project_id); const project = state.cacheProjects.find(({id}) => id && id != project_id);
if (project) { if (project) {
$A.goForward({path: '/manage/project/' + project.id}); $A.goForward({name: 'manage-project', params: {projectId: project.id}});
} else { } else {
$A.goForward({name: 'manage-dashboard'}); $A.goForward({name: 'manage-dashboard'});
} }