diff --git a/README-zh.md b/README-zh.md index 1beec9b..3112476 100644 --- a/README-zh.md +++ b/README-zh.md @@ -52,7 +52,7 @@ cd vue-admin-template npm install # 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 -npm install --registry=https://registry.npm.taobao.org +npm install --registry=https://registry.npmmirror.com # 启动服务 npm run dev diff --git a/package.json b/package.json index dbeb8ba..123ee37 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "echarts": "^5.4.3", "element-ui": "2.13.2", "js-cookie": "2.2.0", + "lodash": "^4.17.21", "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", diff --git a/src/router/index.js b/src/router/index.js index f1cf124..07885f8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -140,19 +140,6 @@ export const constantRoutes = [ ] }, - { - path: '/device', - component: Layout, - children: [ - { - path: 'index', - name: 'Device', - component: () => import('@/views/device/index'), - meta: { title: '设备管理', icon: 'el-icon-mobile-phone' } - } - ] - }, - { path: '/customer', component: Layout, @@ -359,6 +346,28 @@ export const constantRoutes = [ ] }, + { + path: '/system', + component: Layout, + redirect: '/system/device', + name: 'SystemRoot', + meta: { title: '系统设置', icon: 'el-icon-setting', alwaysShow: true }, + children: [ + { + path: 'device', + name: 'Device', + component: () => import('@/views/device/index'), + meta: { title: '设备管理', icon: 'el-icon-mobile-phone' } + }, + { + path: 'tenant', + name: 'Tenant', + component: () => import('@/views/tenant/index'), + meta: { title: '租户管理', icon: 'el-icon-office-building' } + } + ] + }, + // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/views/tenant/index.vue b/src/views/tenant/index.vue new file mode 100644 index 0000000..bd04c4f --- /dev/null +++ b/src/views/tenant/index.vue @@ -0,0 +1,371 @@ + + + + + + diff --git a/vue.config.js b/vue.config.js index c4a0e47..acef527 100644 --- a/vue.config.js +++ b/vue.config.js @@ -56,7 +56,9 @@ module.exports = { }, proxy: { '/api': { - target: 'http://localhost:9060', // 本地后端服务器地址 + // 可以通过环境变量 VUE_APP_API_BASE_URL 来配置后端地址 + // 例如: VUE_APP_API_BASE_URL=http://localhost:8090 npm run dev + target: process.env.VUE_APP_API_BASE_URL || 'http://localhost:8090', // 本地后端服务器地址 // target: 'https://api.huayang-star.com/', // 生产环境后端地址 changeOrigin: true, pathRewrite: {