Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-manage-shell
Commits
4331b1dd
Commit
4331b1dd
authored
Jul 05, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改打包
parent
bed93281
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
38 deletions
+37
-38
index.html
public/index.html
+0
-1
main.js
src/main.js
+37
-37
No files found.
public/index.html
View file @
4331b1dd
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
<script
src=
"https://unpkg.com/vue@2.6.10/dist/vue.js"
></script>
<script
src=
"https://unpkg.com/vue@2.6.10/dist/vue.js"
></script>
<script
src=
"https://unpkg.com/vuex@3.1.0/dist/vuex.js"
></script>
<script
src=
"https://unpkg.com/vuex@3.1.0/dist/vuex.js"
></script>
<script
src=
"https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"
></script>
<script
src=
"https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"
></script>
<link
rel=
"stylesheet"
href=
"<%= VUE_APP_DEV_LIB_URL %>/lib/manageShell.css"
/>
<title>
多彩综合管理系统
</title>
<title>
多彩综合管理系统
</title>
</head>
</head>
...
...
src/main.js
View file @
4331b1dd
import
CreatSystem
from
'./lib/main'
;
import
asyncRouterMap
from
'./router/asyncRoutes'
;
import
asyncRouterMap
from
'./router/asyncRoutes'
;
window
.
manageShell
=
{
default
:
CreatSystem
};
window
.
allAasyncRouterMap
=
[...
asyncRouterMap
];
window
.
allAasyncRouterMap
=
[...
asyncRouterMap
];
const
routeFilter
=
(
routes
,
allRoute
)
=>
{
const
routeFilter
=
(
routes
,
allRoute
)
=>
{
...
@@ -32,47 +34,45 @@ script.text = `
...
@@ -32,47 +34,45 @@ script.text = `
'deviceManage',
'deviceManage',
'smaproManage',
'smaproManage',
];
];
System.import(
Promise.all(
'
${
process
.
env
.
VUE_APP_DEV_LIB_URL
}
/lib/manageShell.umd.min.js'
routeNameList.map(function(name) {
).then(function(module) {
return System.import('
${
var manageShell = module.default;
process
.
env
.
VUE_APP_SUBSYSTEM
return Promise.all(
}
/' + name + '/lib/' + name + '.umd.min.js?t=
${
new
Date
().
getTime
()}
');
routeNameList.map(function(name) {
})
return System.import('
${
process
.
env
.
VUE_APP_SUBSYSTEM
}
/' + name + '/lib/' + name + '.umd.min.js?t=
${
new
Date
().
getTime
()}
');
)
})
.then(function(res) {
).then(function(res) {
for (let index = 0; index < res.length; index++) {
for (let index = 0; index < res.length; index++) {
const element = res[index];
const element = res[index];
allAasyncRouterMap = allAasyncRouterMap.concat(element.default.default);
allAasyncRouterMap = allAasyncRouterMap.concat(element.default.default);
}
}
manageShell.default.createSystem({
manageShell.default.createSystem({
basePath: '
${
process
.
env
.
VUE_APP_BASE_URL
}
',
basePath: '
${
process
.
env
.
VUE_APP_BASE_URL
}
',
routers: allAasyncRouterMap,
routers: allAasyncRouterMap,
routeFilter: function(routes, allRoute) {
routeFilter: function(routes, allRoute) {
if (allRoute && allRoute.length) {
if (allRoute && allRoute.length) {
let addRoute = manageShell.default.utils.route.formatRouteLink(
let addRoute = manageShell.default.utils.route.formatRouteLink(
allRoute
allRoute
);
);
for (let index = 0; index < addRoute.length; index++) {
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
const element = addRoute[index];
if (element.children) {
if (element.children) {
routes = routes.concat(element.children);
routes = routes.concat(element.children);
} else if (
} else if (
element.menuCode ===
${
element.menuCode ===
${
process
.
env
.
VUE_APP_REGISTER_DASHBOARD_CODE
process
.
env
.
VUE_APP_REGISTER_DASHBOARD_CODE
}
) {
routes.unshift(element);
}
}
) {
routes.unshift(element);
}
}
}
}
}
return {
return {
allRoute,
allRoute,
routes,
routes,
};
};
},
},
});
});
});
});
});
`
;
`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment