diff --git a/.env.development b/.env.development index de691bc..3707f58 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 金鸡湖现代服务业品牌管理系统 ENV = 'development' # 金鸡湖现代服务业品牌管理系统/开发环境 -VUE_APP_BASE_API = 'https://vue.ruoyi.vip/prod-api' +VUE_APP_BASE_API = 'http://192.168.0.114:9040' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 6b956cd..a35513f 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -45,7 +45,6 @@ export default { // matched = [{ path: "/index", meta: { title: "首页" } }].concat(matched); // } - console.log(this.levelList, "aaa111"); this.levelList = matched.filter( (item) => item.meta && item.meta.title && item.meta.breadcrumb !== false ); diff --git a/src/layout/components/FixedHeader/components/MenuItem.vue b/src/layout/components/FixedHeader/components/MenuItem.vue deleted file mode 100644 index 0af2a0d..0000000 --- a/src/layout/components/FixedHeader/components/MenuItem.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/src/layout/components/FixedHeader/components/MenuItem/index.vue b/src/layout/components/FixedHeader/components/MenuItem/index.vue new file mode 100644 index 0000000..227dadf --- /dev/null +++ b/src/layout/components/FixedHeader/components/MenuItem/index.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/layout/components/FixedHeader/components/MenuMain/index.vue b/src/layout/components/FixedHeader/components/MenuMain/index.vue new file mode 100644 index 0000000..9ad48c3 --- /dev/null +++ b/src/layout/components/FixedHeader/components/MenuMain/index.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/layout/components/FixedHeader/components/item.vue b/src/layout/components/FixedHeader/components/item.vue deleted file mode 100644 index dad6601..0000000 --- a/src/layout/components/FixedHeader/components/item.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - - diff --git a/src/layout/components/FixedHeader/index.vue b/src/layout/components/FixedHeader/index.vue index adc6b35..d0bfc93 100644 --- a/src/layout/components/FixedHeader/index.vue +++ b/src/layout/components/FixedHeader/index.vue @@ -8,7 +8,7 @@
{{ systemTitle }}
- +
@@ -43,17 +43,17 @@ import Breadcrumb from "@/components/Breadcrumb"; import { mapGetters } from "vuex"; import variables from "@/assets/styles/variables.scss"; -import MenuItem from "./components/MenuItem.vue"; +import MenuMain from "./components/MenuMain"; export default { + components: { + Breadcrumb, + MenuMain, + }, data() { return { systemTitle: process.env.VUE_APP_TITLE, }; }, - components: { - MenuItem, - Breadcrumb, - }, computed: { ...mapGetters(["avatar", "name", "sidebarRouters"]), variables() { @@ -98,7 +98,7 @@ export default { margin-right: 10px; } .system-title { - margin-right: 20px; + margin-right: 30px; cursor: pointer; font-size: 22px; } diff --git a/src/router/index.js b/src/router/index.js index 71907b6..f156ce3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,10 +1,10 @@ -import Vue from 'vue' -import Router from 'vue-router' +import Vue from "vue"; +import Router from "vue-router"; -Vue.use(Router) +Vue.use(Router); /* Layout */ -import Layout from '@/layout' +import Layout from "@/layout"; /** * Note: 路由配置项 @@ -31,153 +31,153 @@ import Layout from '@/layout' // 公共路由 export const constantRoutes = [ { - path: '/redirect', + path: "/redirect", component: Layout, hidden: true, children: [ { - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect') - } - ] + path: "/redirect/:path(.*)", + component: () => import("@/views/redirect"), + }, + ], }, { - path: '/login', - component: () => import('@/views/login'), - hidden: true + path: "/login", + component: () => import("@/views/login"), + hidden: true, }, { - path: '/register', - component: () => import('@/views/register'), - hidden: true + path: "/register", + component: () => import("@/views/register"), + hidden: true, }, { - path: '/404', - component: () => import('@/views/error/404'), - hidden: true + path: "/404", + component: () => import("@/views/error/404"), + hidden: true, }, { - path: '/401', - component: () => import('@/views/error/401'), - hidden: true + path: "/401", + component: () => import("@/views/error/401"), + hidden: true, }, { - path: '', + path: "", component: Layout, - redirect: 'index', + redirect: "index", children: [ { - path: 'index', - component: () => import('@/views/index'), - name: 'Index', - meta: { title: '首页', icon: 'dashboard', affix: true } - } - ] + path: "index", + component: () => import("@/views/index"), + name: "Index", + meta: { title: "首页", icon: "dashboard", affix: true }, + }, + ], }, { - path: '/user', + path: "/user", component: Layout, hidden: true, - redirect: 'noredirect', + redirect: "noredirect", children: [ { - path: 'profile', - component: () => import('@/views/system/user/profile/index'), - name: 'Profile', - meta: { title: '个人中心', icon: 'user' } - } - ] - } -] + path: "profile", + component: () => import("@/views/system/user/profile/index"), + name: "Profile", + meta: { title: "个人中心", icon: "user" }, + }, + ], + }, +]; // 动态路由,基于用户权限动态去加载 export const dynamicRoutes = [ { - path: '/system/user-auth', + path: "/system/user-auth", component: Layout, hidden: true, - permissions: ['system:user:edit'], + permissions: ["system:user:edit"], children: [ { - path: 'role/:userId(\\d+)', - component: () => import('@/views/system/user/authRole'), - name: 'AuthRole', - meta: { title: '分配角色', activeMenu: '/system/user' } - } - ] + path: "role/:userId(\\d+)", + component: () => import("@/views/system/user/authRole"), + name: "AuthRole", + meta: { title: "分配角色", activeMenu: "/system/user" }, + }, + ], }, { - path: '/system/role-auth', + path: "/system/role-auth", component: Layout, hidden: true, - permissions: ['system:role:edit'], + permissions: ["system:role:edit"], children: [ { - path: 'user/:roleId(\\d+)', - component: () => import('@/views/system/role/authUser'), - name: 'AuthUser', - meta: { title: '分配用户', activeMenu: '/system/role' } - } - ] + path: "user/:roleId(\\d+)", + component: () => import("@/views/system/role/authUser"), + name: "AuthUser", + meta: { title: "分配用户", activeMenu: "/system/role" }, + }, + ], }, { - path: '/system/dict-data', + path: "/system/dict-data", component: Layout, hidden: true, - permissions: ['system:dict:list'], + permissions: ["system:dict:list"], children: [ { - path: 'index/:dictId(\\d+)', - component: () => import('@/views/system/dict/data'), - name: 'Data', - meta: { title: '字典数据', activeMenu: '/system/dict' } - } - ] + path: "index/:dictId(\\d+)", + component: () => import("@/views/system/dict/data"), + name: "Data", + meta: { title: "字典数据", activeMenu: "/system/dict" }, + }, + ], }, { - path: '/monitor/job-log', + path: "/monitor/job-log", component: Layout, hidden: true, - permissions: ['monitor:job:list'], + permissions: ["monitor:job:list"], children: [ { - path: 'index/:jobId(\\d+)', - component: () => import('@/views/monitor/job/log'), - name: 'JobLog', - meta: { title: '调度日志', activeMenu: '/monitor/job' } - } - ] + path: "index/:jobId(\\d+)", + component: () => import("@/views/monitor/job/log"), + name: "JobLog", + meta: { title: "调度日志", activeMenu: "/monitor/job" }, + }, + ], }, { - path: '/tool/gen-edit', + path: "/tool/gen-edit", component: Layout, hidden: true, - permissions: ['tool:gen:edit'], + permissions: ["tool:gen:edit"], children: [ { - path: 'index/:tableId(\\d+)', - component: () => import('@/views/tool/gen/editTable'), - name: 'GenEdit', - meta: { title: '修改生成配置', activeMenu: '/tool/gen' } - } - ] - } -] + path: "index/:tableId(\\d+)", + component: () => import("@/views/tool/gen/editTable"), + name: "GenEdit", + meta: { title: "修改生成配置", activeMenu: "/tool/gen" }, + }, + ], + }, +]; // 防止连续点击多次路由报错 let routerPush = Router.prototype.push; let routerReplace = Router.prototype.replace; // push Router.prototype.push = function push(location) { - return routerPush.call(this, location).catch(err => err) -} + return routerPush.call(this, location).catch((err) => err); +}; // replace Router.prototype.replace = function push(location) { - return routerReplace.call(this, location).catch(err => err) -} + return routerReplace.call(this, location).catch((err) => err); +}; export default new Router({ - mode: 'history', // 去掉url中的# + mode: "history", // 去掉url中的# scrollBehavior: () => ({ y: 0 }), - routes: constantRoutes -}) + routes: constantRoutes, +}); diff --git a/src/views/dataCloudMap/index.vue b/src/views/dataCloudMap/index.vue new file mode 100644 index 0000000..473b9f5 --- /dev/null +++ b/src/views/dataCloudMap/index.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/onlineReporting/index.vue b/src/views/onlineReporting/index.vue new file mode 100644 index 0000000..b644267 --- /dev/null +++ b/src/views/onlineReporting/index.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/project/index.vue b/src/views/project/index.vue new file mode 100644 index 0000000..62c5597 --- /dev/null +++ b/src/views/project/index.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/vue.config.js b/vue.config.js index 4ea7e4b..7626e31 100644 --- a/vue.config.js +++ b/vue.config.js @@ -12,7 +12,7 @@ const name = process.env.VUE_APP_TITLE || "金鸡湖现代服务业品牌管理 const port = process.env.port || process.env.npm_config_port || 80; // 端口 // vue.config.js 配置说明 -//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions +// 官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions // 这里只列一部分,具体配置参考文档 module.exports = { // 部署生产环境和开发环境下的URL。 @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, + target: `http://localhost:9040`, changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: "",