提交 d6d10bc5 编写于 作者: tony001's avatar tony001

update:调整应用路由

上级 2ba62cd4
import {{page.codeName}} from "./{{spinalCase page.codeName}}.vue";
export { {{page.codeName}} };
export default {{page.codeName}};
import {{page.codeName}} from "./{{spinalCase page.codeName}}.vue";
export { {{page.codeName}} };
export default {{page.codeName}};
import {{page.codeName}} from "./{{spinalCase page.codeName}}.vue";
export { {{page.codeName}} };
export default {{page.codeName}};
......@@ -2,7 +2,7 @@ import { createRouter, createWebHashHistory } from 'vue-router';
const routes = [
{
path: "/{{lowerCase app.defaultPSAppIndexView.codeName}}/:{{lowerCase app.defaultPSAppIndexView.codeName}}?",
path: "/apps/:app?",
{{!-- beforeEnter: (to: any, from: any, next: any) => {
next();
}, --}}
......@@ -10,94 +10,47 @@ const routes = [
captionTag: "{{#if app.defaultPSAppIndexView.capPSLanguageRes}}{{app.defaultPSAppIndexView.capPSLanguageRes.lanResTag}}{{/if}}",
caption: "{{app.defaultPSAppIndexView.caption}}",
viewType: "{{app.defaultPSAppIndexView.viewType}}",
dynaModelFilePath: "{{app.defaultPSAppIndexView.dynaModelFilePath}}",
{{#if app.defaultPSAppIndexView.psSysImage}}
imgPath: "{{app.defaultPSAppIndexView.psSysImage.imagePath}}",
iconCls: "{{app.defaultPSAppIndexView.psSysImage.cssClass}}",
{{/if}}
parameters: [
{ pathName: "views", parameterName: "{{lowerCase app.defaultPSAppIndexView.codeName}}" },
{ pathName: "apps", parameterName: "app" },
],
requireAuth: {{#eq app.defaultPSAppIndexView.accUserMode 0}}false{{else}}{{#eq app.defaultPSAppIndexView.accUserMode 3}}false{{else}}true{{/eq}}{{/eq}},
},
component: () => import("@page/{{#if app.defaultPSAppIndexView.psAppDataEntity}}{{spinalCase app.defaultPSAppIndexView.psAppDataEntity.codeName}}{{else}}default{{/if}}/{{spinalCase app.defaultPSAppIndexView.codeName}}/{{spinalCase app.defaultPSAppIndexView.codeName}}.vue"),
component: () => import("@page/default/{{spinalCase app.defaultPSAppIndexView.codeName}}"),
children: [
{{#each app.allPSAppViews as | appView |}}
{{!-- 实体视图 --}}
{{#if appView.psAppDataEntity}}
{{!-- 多重路径 --}}
{{#if appView.psAppDataEntity.psAppDERSPathCount}}
{{#if (or (eq appView.viewType 'DEEDITVIEW') (eq appView.viewType 'DEGRIDVIEW'))}}
{
path: "{{lowerCase (pluralize appView.psAppDataEntity.codeName)}}/:{{lowerCase appView.psAppDataEntity.codeName}}?/{{lowerCase appView.codeName}}/:{{lowerCase appView.codeName}}?",
meta: {
captionTag: "{{#if appView.capPSLanguageRes}}{{appView.capPSLanguageRes.lanResTag}}{{/if}}",
caption: "{{appView.caption}}",
viewType: "{{appView.viewType}}",
info:'',
{{#if appView.psSysImage}}
imgPath: "{{appView.psSysImage.imagePath}}",
iconCls: "{{appView.psSysImage.cssClass}}",
{{#each app.appEntityResources as |appEntityResource|}}
{{#if appEntityResource.appDataEntity.allPSAppViews}}
{{#each appEntityResource.appDataEntity.allPSAppViews as |appView|}}
{{#if (or (eq appView.viewType 'DEEDITVIEW') (eq appView.viewType 'DEGRIDVIEW'))}}
{
path: "{{appEntityResource.path}}/views/{{lowerCase appView.codeName}}",
meta: {
{{#if appView.capPSLanguageRes}}
captionTag: "{{appView.capPSLanguageRes.lanResTag}}",
{{/if}}
caption: "{{appView.caption}}",
viewType: "{{appView.viewType}}",
{{#if appView.psSysImage}}
imgPath: "{{appView.psSysImage.imagePath}}",
iconCls: "{{appView.psSysImage.cssClass}}",
{{/if}}
parameters: [
{ pathName: "apps", parameterName: "app" },
{{#if appEntityResource.majorCodeName}}
{ pathName: "{{pluralize appEntityResource.majorCodeName}}", parameterName: "{{appEntityResource.majorCodeName}}" },
{{/if}}
{ pathName: "{{pluralize appEntityResource.curCodeName}}", parameterName: "{{appEntityResource.curCodeName}}" }
],
requireAuth: false,
},
component: () => import("@page/{{#if psAppDataEntity}}{{spinalCase psAppDataEntity.codeName}}{{else}}default{{/if}}/{{spinalCase appView.codeName}}"),
},
{{/if}}
parameters: [
{ pathName: "{{lowerCase app.defaultPSAppIndexView.codeName}}", parameterName: "{{lowerCase app.defaultPSAppIndexView.codeName}}" },
{ pathName: "{{lowerCase (pluralize appView.psAppDataEntity.codeName)}}", parameterName: "{{lowerCase codeName}}" },
{ pathName: "{{lowerCase appView.codeName}}", parameterName: "{{lowerCase appView.codeName}}" },
],
resource: "{{lowerCase entity.codeName}}",
requireAuth: false,
},
component: () => import("@page/{{#if appView.psAppDataEntity}}{{spinalCase appView.psAppDataEntity.codeName}}{{else}}default{{/if}}/{{spinalCase appView.codeName}}/{{spinalCase appView.codeName}}.vue"),
},
{{/if}}
{{else}}
{{#if (or (eq appView.viewType 'DEEDITVIEW') (eq appView.viewType 'DEGRIDVIEW'))}}
{
path: "{{lowerCase (pluralize appView.psAppDataEntity.codeName)}}/:{{lowerCase appView.psAppDataEntity.codeName}}?/{{lowerCase appView.codeName}}/:{{lowerCase appView.codeName}}?",
meta: {
captionTag: "{{#if appView.capPSLanguageRes}}{{appView.capPSLanguageRes.lanResTag}}{{/if}}",
caption: "{{appView.caption}}",
viewType: "{{appView.viewType}}",
info:'',
{{#if appView.psSysImage}}
imgPath: "{{appView.psSysImage.imagePath}}",
iconCls: "{{appView.psSysImage.cssClass}}",
{{/if}}
parameters: [
{ pathName: "{{lowerCase app.defaultPSAppIndexView.codeName}}", parameterName: "{{lowerCase app.defaultPSAppIndexView.codeName}}" },
{ pathName: "{{lowerCase (pluralize appView.psAppDataEntity.codeName)}}", parameterName: "{{lowerCase appView.psAppDataEntity.codeName}}" },
{ pathName: "{{lowerCase appView.codeName}}", parameterName: "{{lowerCase appView.codeName}}" },
],
resource: "{{lowerCase entity.codeName}}",
requireAuth: false,
},
component: () => import("@page/{{#if appView.psAppDataEntity}}{{spinalCase appView.psAppDataEntity.codeName}}{{else}}default{{/if}}/{{spinalCase appView.codeName}}/{{spinalCase appView.codeName}}.vue"),
},
{{/if}}
{{/if}}
{{else}}
{{#neq app.defaultPSAppIndexView.codeName (appView.codeName)}}
{
path: "{{lowerCase appView.codeName}}/:{{lowerCase appView.codeName}}?",
meta: {
captionTag: "{{#if appView.capPSLanguageRes}}{{appView.capPSLanguageRes.lanResTag}}{{/if}}",
caption: "{{appView.caption}}",
viewType: "{{appView.viewType}}",
info:'',
{{#if appView.psSysImage}}
imgPath: "{{appView.psSysImage.imagePath}}",
iconCls: "{{appView.psSysImage.cssClass}}",
{{/if}}
parameters: [
{ pathName: "{{lowerCase app.defaultPSAppIndexView.codeName}}", parameterName: "{{lowerCase app.defaultPSAppIndexView.codeName}}" },
{ pathName: "{{lowerCase appView.codeName}}", parameterName: "{{lowerCase appView.codeName}}" },
],
requireAuth: false,
},
component: () => import("@page/{{#if appView.psAppDataEntity}}{{spinalCase appView.psAppDataEntity.codeName}}{{else}}default{{/if}}/{{spinalCase appView.codeName}}/{{spinalCase appView.codeName}}.vue"),
},
{{/neq}}
{{/if}}
{{/each}}
{{/if}}
{{/each}}
]
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册