Commit 5d0aa268 by ningjihai

角色管理

parent c4c6d36d
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<PageTitle>
<template #buttons>
<el-button
type="primary"
plain
icon="el-icon-plus"
size="medium"
@click="handleAdd"
v-hasPermi="['system:role:add']"
>新增</el-button>
<el-button
type="success"
plain
icon="el-icon-edit"
size="medium"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:role:edit']"
>修改</el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
size="medium"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:role:remove']"
>删除</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="medium"
@click="handleExport"
v-hasPermi="['system:role:export']"
>导出</el-button>
<el-button
type="info"
plain
icon="el-icon-upload2"
size="medium"
@click="handleImport"
v-hasPermi="['system:role:import']"
>导入</el-button>
</template>
</PageTitle>
<div class="page-container">
<page-wrapper-search
:model="queryParams"
ref="queryForm"
size="small"
@search="handleQuery"
@reset="resetQuery"
>
<el-form-item label="角色名称" prop="roleName"> <el-form-item label="角色名称" prop="roleName">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.roleName"
...@@ -45,69 +112,10 @@ ...@@ -45,69 +112,10 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8"> </page-wrapper-search>
<el-col :span="1.5"> <div class="table-container">
<el-button <el-table v-loading="loading" :data="roleList" height="100%" @selection-change="handleSelectionChange">
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:role:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:role:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:role:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:role:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
v-hasPermi="['system:role:import']"
>导入</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="角色编号" prop="roleId" width="120" /> <el-table-column label="角色编号" prop="roleId" width="120" />
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" /> <el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
...@@ -156,7 +164,7 @@ ...@@ -156,7 +164,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
...@@ -164,6 +172,11 @@ ...@@ -164,6 +172,11 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
</div>
<!-- 添加或修改角色配置对话框 --> <!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
...@@ -466,8 +479,12 @@ export default { ...@@ -466,8 +479,12 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.roleName = ''
this.queryParams.roleKey = ''
this.queryParams.status = ''
this.queryParams.pageNum = 1
this.dateRange = [] this.dateRange = []
this.resetForm("queryForm")
this.handleQuery() this.handleQuery()
}, },
// 多选框选中数据 // 多选框选中数据
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论