|
|
@ -1,28 +1,28 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
|
|
<el-form-item label="角色名称" prop="roleName"> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('page.system.role.name')+':'" prop="roleName"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="queryParams.roleName" |
|
|
v-model="queryParams.roleName" |
|
|
placeholder="请输入角色名称" |
|
|
|
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" |
|
|
clearable |
|
|
clearable |
|
|
style="width: 240px" |
|
|
style="width: 240px" |
|
|
@keyup.enter.native="handleQuery" |
|
|
@keyup.enter.native="handleQuery" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="权限字符" prop="roleKey"> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('page.system.role.key')+':'" prop="roleKey"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="queryParams.roleKey" |
|
|
v-model="queryParams.roleKey" |
|
|
placeholder="请输入权限字符" |
|
|
|
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" |
|
|
clearable |
|
|
clearable |
|
|
style="width: 240px" |
|
|
style="width: 240px" |
|
|
@keyup.enter.native="handleQuery" |
|
|
@keyup.enter.native="handleQuery" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="状态" prop="status"> |
|
|
|
|
|
|
|
|
<el-form-item :label="$t('page.system.role.status')+':'" prop="status"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="queryParams.status" |
|
|
v-model="queryParams.status" |
|
|
placeholder="角色状态" |
|
|
|
|
|
|
|
|
:placeholder="$t('form.placeholderSelect')" |
|
|
clearable |
|
|
clearable |
|
|
style="width: 240px" |
|
|
style="width: 240px" |
|
|
> |
|
|
> |
|
|
@ -34,7 +34,7 @@ |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="创建时间"> |
|
|
|
|
|
|
|
|
<!-- <el-form-item label="创建时间"> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="dateRange" |
|
|
v-model="dateRange" |
|
|
style="width: 240px" |
|
|
style="width: 240px" |
|
|
@ -44,10 +44,10 @@ |
|
|
start-placeholder="开始日期" |
|
|
start-placeholder="开始日期" |
|
|
end-placeholder="结束日期" |
|
|
end-placeholder="结束日期" |
|
|
></el-date-picker> |
|
|
></el-date-picker> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</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-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('form.search')}}</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('form.reset')}}</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -60,9 +60,9 @@ |
|
|
size="mini" |
|
|
size="mini" |
|
|
@click="handleAdd" |
|
|
@click="handleAdd" |
|
|
v-hasPermi="['system:role:add']" |
|
|
v-hasPermi="['system:role:add']" |
|
|
>新增</el-button> |
|
|
|
|
|
|
|
|
>{{$t('form.add')}}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
|
|
|
|
|
|
<!-- <el-col :span="1.5"> |
|
|
<el-button |
|
|
<el-button |
|
|
type="success" |
|
|
type="success" |
|
|
plain |
|
|
plain |
|
|
@ -94,16 +94,23 @@ |
|
|
v-hasPermi="['system:role:export']" |
|
|
v-hasPermi="['system:role: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> --> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> |
|
|
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
|
|
<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="roleKey" :show-overflow-tooltip="true" width="150" /> |
|
|
|
|
|
<el-table-column label="显示顺序" prop="roleSort" width="100" /> |
|
|
|
|
|
<el-table-column label="状态" align="center" width="100"> |
|
|
|
|
|
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" /> --> |
|
|
|
|
|
<!-- <el-table-column label="角色编号" prop="roleId" width="120" /> --> |
|
|
|
|
|
<el-table-column :label="$t('page.system.role.name')" prop="roleName" :show-overflow-tooltip="true" width="250" /> |
|
|
|
|
|
<el-table-column :label="$t('page.system.role.key')" prop="roleKey" :show-overflow-tooltip="true" width="250" /> |
|
|
|
|
|
<el-table-column :label="$t('page.system.role.remark')" prop="remark" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<!-- <el-table-column label="显示顺序" prop="roleSort" width="100" /> --> |
|
|
|
|
|
<el-table-column :label="$t('page.system.role.status')" prop="status" :show-overflow-tooltip="true" width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.status==='0'">{{$t('page.system.role.statusEnable')}}</span> |
|
|
|
|
|
<span v-if="scope.row.status==='1'">{{$t('page.system.role.statusDisable')}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<!-- <el-table-column label="状态" align="center" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-switch |
|
|
<el-switch |
|
|
v-model="scope.row.status" |
|
|
v-model="scope.row.status" |
|
|
@ -117,20 +124,48 @@ |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ parseTime(scope.row.createTime) }}</span> |
|
|
<span>{{ parseTime(scope.row.createTime) }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width" width="200"> |
|
|
<template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
|
|
<template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
|
|
<el-button |
|
|
<el-button |
|
|
size="mini" |
|
|
size="mini" |
|
|
type="text" |
|
|
type="text" |
|
|
icon="el-icon-edit" |
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
@click="handleUpdate(scope.row)" |
|
|
v-hasPermi="['system:role:edit']" |
|
|
v-hasPermi="['system:role:edit']" |
|
|
>修改</el-button> |
|
|
|
|
|
|
|
|
>{{$t('page.system.role.edit')}}</el-button> |
|
|
|
|
|
|
|
|
<el-button |
|
|
<el-button |
|
|
size="mini" |
|
|
size="mini" |
|
|
type="text" |
|
|
type="text" |
|
|
icon="el-icon-delete" |
|
|
|
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
|
v-hasPermi="['system:role:edit']" |
|
|
|
|
|
v-if="scope.row.status==='0'" |
|
|
|
|
|
>{{$t('page.system.role.statusDisable')}}</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
|
v-hasPermi="['system:role:edit']" |
|
|
|
|
|
v-if="scope.row.status==='1'" |
|
|
|
|
|
>{{$t('page.system.role.statusEnable')}}</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
|
v-hasPermi="['system:role:edit']" |
|
|
|
|
|
>{{$t('page.system.role.allocate')}}</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
|
>{{$t('page.system.role.detail')}}</el-button> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-button |
|
|
|
|
|
size="mini" |
|
|
|
|
|
type="text" |
|
|
@click="handleDelete(scope.row)" |
|
|
@click="handleDelete(scope.row)" |
|
|
v-hasPermi="['system:role:remove']" |
|
|
v-hasPermi="['system:role:remove']" |
|
|
>删除</el-button> |
|
|
>删除</el-button> |
|
|
@ -142,7 +177,7 @@ |
|
|
<el-dropdown-item command="handleAuthUser" icon="el-icon-user" |
|
|
<el-dropdown-item command="handleAuthUser" icon="el-icon-user" |
|
|
v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item> |
|
|
v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item> |
|
|
</el-dropdown-menu> |
|
|
</el-dropdown-menu> |
|
|
</el-dropdown> |
|
|
|
|
|
|
|
|
</el-dropdown> --> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|