From 97c4a3bf80ff63ceafbf036985d3f09463ef6df3 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 22 Aug 2023 17:51:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8E=82=E7=BB=99=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=88=86=E9=85=8D=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 16 +++++++++++++++- src/views/system/datasource/index.vue | 17 +++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index b370bdd..894e579 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -161,7 +161,21 @@ export const dynamicRoutes = [ meta: { title: '修改生成配置', activeMenu: '/tool/gen' } } ] - } + }, + { + path: "/system/datasource-auth", + component: Layout, + hidden: true, + permissions: ["system:datasource:edit"], + children: [ + { + path: "user/:datasourceId", + component: () => import("@/views/system/datasource/authUser"), + name: "AuthDatasource", + meta: { title: "数据源分配用户", activeMenu: "/system/datasource" }, + }, + ], + }, ] // 防止连续点击多次路由报错 diff --git a/src/views/system/datasource/index.vue b/src/views/system/datasource/index.vue index 9f45e51..d3e3068 100644 --- a/src/views/system/datasource/index.vue +++ b/src/views/system/datasource/index.vue @@ -32,7 +32,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['energy:datasource:add']" + v-hasPermi="['system:datasource:add']" >新增 @@ -43,7 +43,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['energy:datasource:edit']" + v-hasPermi="['system:datasource:edit']" >修改 @@ -54,7 +54,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['energy:datasource:remove']" + v-hasPermi="['system:datasource:remove']" >删除 @@ -64,7 +64,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['energy:datasource:export']" + v-hasPermi="['system:datasource:export']" >导出 @@ -102,28 +102,28 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['energy:datasource:edit']" + v-hasPermi="['system:datasource:edit']" >修改 删除 分配用户 测试链接 @@ -371,6 +371,7 @@ export default { /** 分配用户操作 */ handleAuthUser: function(row) { const datasourceId = row.id; + debugger this.$router.push("/system/datasource-auth/user/" + datasourceId); }, /** 查询部门下拉树结构 */