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

update:调整应用路由

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