|
@@ -37,6 +37,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
if (id) {
|
|
if (id) {
|
|
|
store.commit("changeLogin", true);
|
|
store.commit("changeLogin", true);
|
|
|
store.commit("changeShippingCompany", localStorage.shippingCompany);
|
|
store.commit("changeShippingCompany", localStorage.shippingCompany);
|
|
|
|
|
+
|
|
|
if (0 === to.matched.length) {
|
|
if (0 === to.matched.length) {
|
|
|
next("/index");
|
|
next("/index");
|
|
|
} else if (to.path == "/login" || to.path == "/") {
|
|
} else if (to.path == "/login" || to.path == "/") {
|
|
@@ -63,6 +64,39 @@ router.afterEach((to, from) => {
|
|
|
document.title = "船务公司 - " + title;
|
|
document.title = "船务公司 - " + title;
|
|
|
store.commit("setCurrentMenuItem", to.path);
|
|
store.commit("setCurrentMenuItem", to.path);
|
|
|
store.commit("changefirstTitle", title);
|
|
store.commit("changefirstTitle", title);
|
|
|
|
|
+ if (
|
|
|
|
|
+ store.state.shippingCompany === "汇很多船务公司" &&
|
|
|
|
|
+ store.state.menu.at(-1).items.length === 2
|
|
|
|
|
+ ) {
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/oilPriceManage",
|
|
|
|
|
+ name: "油价管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/legalAidManage",
|
|
|
|
|
+ name: "法律援助管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/annualInspectionNoticeManage",
|
|
|
|
|
+ name: "年检通知管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/crewSchoolTrainingNoticeManage",
|
|
|
|
|
+ name: "培训通知管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/newEnergyPolicyManage",
|
|
|
|
|
+ name: "新能源政策管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/shipyardManage",
|
|
|
|
|
+ name: "船厂管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ store.state.menu.at(-1).items.push({
|
|
|
|
|
+ path: "/workStation/terminalServiceStaffManage",
|
|
|
|
|
+ name: "码头人员管理",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
app.use(router).use(store).mount("#app");
|
|
app.use(router).use(store).mount("#app");
|