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); }, /** 查询部门下拉树结构 */