工厂给人员分配数据源

master
zhaoxiaolin 1 year ago
parent 8728f13a8c
commit 97c4a3bf80

@ -161,7 +161,21 @@ export const dynamicRoutes = [
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } 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" },
},
],
},
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错

@ -32,7 +32,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['energy:datasource:add']" v-hasPermi="['system:datasource:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -43,7 +43,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['energy:datasource:edit']" v-hasPermi="['system:datasource:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -54,7 +54,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['energy:datasource:remove']" v-hasPermi="['system:datasource:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -64,7 +64,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['energy:datasource:export']" v-hasPermi="['system:datasource:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -102,28 +102,28 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['energy:datasource:edit']" v-hasPermi="['system:datasource:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['energy:datasource:remove']" v-hasPermi="['system:datasource:remove']"
>删除</el-button> >删除</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-add" icon="el-icon-add"
@click="handleAuthUser(scope.row)" @click="handleAuthUser(scope.row)"
v-hasPermi="['energy:datasource:edit']" v-hasPermi="['system:datasource:edit']"
>分配用户</el-button> >分配用户</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-add" icon="el-icon-add"
@click="handleTestDB(scope.row)" @click="handleTestDB(scope.row)"
v-hasPermi="['energy:datasource:add']" v-hasPermi="['system:datasource:add']"
>测试链接</el-button> >测试链接</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -371,6 +371,7 @@ export default {
/** 分配用户操作 */ /** 分配用户操作 */
handleAuthUser: function(row) { handleAuthUser: function(row) {
const datasourceId = row.id; const datasourceId = row.id;
debugger
this.$router.push("/system/datasource-auth/user/" + datasourceId); this.$router.push("/system/datasource-auth/user/" + datasourceId);
}, },
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */

Loading…
Cancel
Save