From 6151ed40d73b298e36f3196f31f6c95361eed56f Mon Sep 17 00:00:00 2001 From: luJianJun <2587063613@qq.com> Date: Thu, 31 Aug 2023 19:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 30 +- .../components/StoreConversionData.vue | 1 + src/views/system/application/index.vue | 111 ++++++ src/views/system/application/pluginMarket.vue | 171 +++++++++ src/views/system/application/popInfo.vue | 353 ++++++++++++++++++ 5 files changed, 659 insertions(+), 7 deletions(-) create mode 100644 src/views/system/application/index.vue create mode 100644 src/views/system/application/pluginMarket.vue create mode 100644 src/views/system/application/popInfo.vue diff --git a/src/router/index.js b/src/router/index.js index 5e770b4..2fbd18e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -24,9 +24,9 @@ const routes_404 = { path: "/:pathMatch(.*)*", hidden: true, component: () => - import ( /* webpackChunkName: "404" */ '@/layout/other/404'), + import( /* webpackChunkName: "404" */ '@/layout/other/404'), } -let routes_404_r = () => {} +let routes_404_r = () => { } const router = createRouter({ history: createWebHashHistory(), routes: routes @@ -72,6 +72,19 @@ router.beforeEach(async (to, from, next) => { api.system.index.get().then((response) => { if (response.code == 200) { // 缓存 + // console.log(response.data) + response.data.menu[1].children.push({ + component: "system/application", + meta:{ type: "application", icon: "x-icon-chrome-filled", title: "应用插件管理", app: "admin" }, + app:"admin", + icon:"x-icon-code", + title:"应用插件管理", + type:"application", + name:"systemapplication", + path:"/system/application", + redirect:"" + }) + for (const key in response.data) { tool.data.set(key, response.data[key]); if (key == 'layout') { @@ -145,22 +158,24 @@ function filterAsyncRouter(routerMap) { function loadComponent(component) { if (component) { return () => - import (`@/views/${component}`) + import(`@/views/${component}`) } else { return () => - import (`@/layout/other/empty`) + import(`@/layout/other/empty`) } } //路由扁平化 function flatAsyncRoutes(routes, breadcrumb = []) { let res = [] routes.forEach(route => { - const tmp = { ...route + const tmp = { + ...route } if (tmp.children) { let childrenBreadcrumb = [...breadcrumb] childrenBreadcrumb.push(route) - let tmpRoute = { ...route + let tmpRoute = { + ...route } tmpRoute.meta.breadcrumb = childrenBreadcrumb delete tmpRoute.children @@ -180,7 +195,8 @@ function flatAsyncRoutes(routes, breadcrumb = []) { } //过滤树 function treeFilter(tree, func) { - return tree.map(node => ({ ...node + return tree.map(node => ({ + ...node })).filter(node => { node.children = node.children && treeFilter(node.children, func) return func(node) || (node.children && node.children.length) diff --git a/src/views/home/widgets/components/StoreConversionData.vue b/src/views/home/widgets/components/StoreConversionData.vue index 53f283b..479b243 100644 --- a/src/views/home/widgets/components/StoreConversionData.vue +++ b/src/views/home/widgets/components/StoreConversionData.vue @@ -213,6 +213,7 @@ export default { margin-bottom: 16px; border:1px solid #e4e7ed; border-radius:4px; + min-width:280px; } .tab-box { diff --git a/src/views/system/application/index.vue b/src/views/system/application/index.vue new file mode 100644 index 0000000..bf92ee5 --- /dev/null +++ b/src/views/system/application/index.vue @@ -0,0 +1,111 @@ + + + + + {{ item.title }} + + + + + 1 + + + + + + + + + + + + + diff --git a/src/views/system/application/pluginMarket.vue b/src/views/system/application/pluginMarket.vue new file mode 100644 index 0000000..cbfccb7 --- /dev/null +++ b/src/views/system/application/pluginMarket.vue @@ -0,0 +1,171 @@ + + + + + + + + + + 123456 + + + Tag {{ item }} + + + 111111111111111111111111111111111111111 + + + + + + + + + diff --git a/src/views/system/application/popInfo.vue b/src/views/system/application/popInfo.vue new file mode 100644 index 0000000..c39929f --- /dev/null +++ b/src/views/system/application/popInfo.vue @@ -0,0 +1,353 @@ + + + + {{ 123456 }} + + + + + + + + + + 123 + 123456 + + 免费 + + + + + 安装 + + + + 插件详情 + + + + + + + 1234567894513 + + + 相关详情 + + + + + 版本 + + + v1.10.1 版本历史 + + + + + 开发者 + + 123456456456456 + + + + + 业务场景 + + 123456 + 2 + + + + + + 帮助 + + + + + 使用说明 + + + + + + + + + + +