|
|
|
@ -1,6 +1,9 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card>
|
|
|
|
|
<el-tabs type="border-card" v-model="activeName" style="margin: 15px" @tab-click="handleClick">
|
|
|
|
|
<!--单据业务详情-->
|
|
|
|
|
<el-tab-pane name="server">
|
|
|
|
|
<span slot="label">监管平台</span>
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch">
|
|
|
|
|
<el-form-item label="角色名称:" prop="roleName">
|
|
|
|
|
<el-input
|
|
|
|
@ -37,8 +40,6 @@
|
|
|
|
|
border highlight-current-row>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<!-- <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150"/>-->
|
|
|
|
|
<!-- <el-table-column label="显示顺序" prop="roleSort" width="100"/>-->
|
|
|
|
|
<el-table-column label="状态">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag :type="scope.row.status | statusFilterType">{{
|
|
|
|
@ -49,16 +50,6 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="状态" align="center" width="100">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <el-switch-->
|
|
|
|
|
<!-- v-model="scope.row.status"-->
|
|
|
|
|
<!-- active-value="0"-->
|
|
|
|
|
<!-- inactive-value="1"-->
|
|
|
|
|
<!-- @change="handleStatusChange(scope.row)"-->
|
|
|
|
|
<!-- ></el-switch>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
|
@ -78,20 +69,6 @@
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <span class="el-dropdown-link">-->
|
|
|
|
|
<!-- <i class="el-icon-d-arrow-right el-icon--right"></i>更多-->
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
<!-- <el-dropdown-menu slot="dropdown">-->
|
|
|
|
|
<!-- <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"-->
|
|
|
|
|
<!-- >数据权限-->
|
|
|
|
|
<!-- </el-dropdown-item>-->
|
|
|
|
|
<!-- <el-dropdown-item command="handleAuthUser" icon="el-icon-user"-->
|
|
|
|
|
<!-- >分配用户-->
|
|
|
|
|
<!-- </el-dropdown-item>-->
|
|
|
|
|
<!-- </el-dropdown-menu>-->
|
|
|
|
|
<!-- </el-dropdown>-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -103,6 +80,87 @@
|
|
|
|
|
:limit.sync="queryParams.limit"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane name="client">
|
|
|
|
|
<span slot="label">客户端</span>
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch">
|
|
|
|
|
<el-form-item label="角色名称:" prop="roleName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.roleName"
|
|
|
|
|
placeholder="请输入角色名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="状态:" prop="status">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.status"
|
|
|
|
|
placeholder="请选择角色状态"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option label="正常" :value="0"/>
|
|
|
|
|
<el-option label="禁用" :value="1"/>
|
|
|
|
|
<el-option label="全部" value=""/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table v-loading="loading" :data="roleList"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
border highlight-current-row>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="状态">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag :type="scope.row.status | statusFilterType">{{
|
|
|
|
|
scope.row.status | statusFilterName
|
|
|
|
|
}}
|
|
|
|
|
</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="scope.row.roleId === 1"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
:disabled="scope.row.roleId === '1'"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.page"
|
|
|
|
|
:limit.sync="queryParams.limit"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改角色配置对话框 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
|
|
|
@ -110,15 +168,6 @@
|
|
|
|
|
<el-form-item label="角色名称" prop="roleName">
|
|
|
|
|
<el-input v-model="form.roleName" placeholder="请输入角色名称" clearable/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item prop="roleKey">-->
|
|
|
|
|
<!-- <span slot="label">-->
|
|
|
|
|
<!-- <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">-->
|
|
|
|
|
<!-- <i class="el-icon-question"></i>-->
|
|
|
|
|
<!-- </el-tooltip>-->
|
|
|
|
|
<!-- 权限字符-->
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
<!-- <el-input v-model="form.roleKey" placeholder="请输入权限字符"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="角色顺序" prop="roleSort">
|
|
|
|
|
<el-input-number v-model="form.roleSort" controls-position="right" :min="0"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -195,8 +244,6 @@
|
|
|
|
|
<el-button @click="cancelDataScope">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -219,6 +266,7 @@ export default {
|
|
|
|
|
dicts: ['sys_normal_disable'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
activeName: 'server',
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
@ -237,6 +285,7 @@ export default {
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
businessType:"0",
|
|
|
|
|
// 是否显示弹出层(数据权限)
|
|
|
|
|
openDataScope: false,
|
|
|
|
|
menuExpand: false,
|
|
|
|
@ -329,6 +378,7 @@ export default {
|
|
|
|
|
/** 查询角色列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.queryParams.businessType = this.businessType
|
|
|
|
|
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
|
|
this.roleList = response.data.list;
|
|
|
|
|
this.total = response.data.total;
|
|
|
|
@ -338,7 +388,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 查询菜单树结构 */
|
|
|
|
|
getMenuTreeselect() {
|
|
|
|
|
menuTreeselect().then(response => {
|
|
|
|
|
var data = {};
|
|
|
|
|
data.businessType = this.businessType
|
|
|
|
|
menuTreeselect(data).then(response => {
|
|
|
|
|
this.menuOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -362,7 +414,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 根据角色ID查询菜单树结构 */
|
|
|
|
|
getRoleMenuTreeselect(roleId) {
|
|
|
|
|
return roleMenuTreeselect(roleId).then(response => {
|
|
|
|
|
return roleMenuTreeselect(roleId,this.businessType).then(response => {
|
|
|
|
|
this.menuOptions = response.data.menus;
|
|
|
|
|
return response;
|
|
|
|
|
});
|
|
|
|
@ -436,6 +488,15 @@ export default {
|
|
|
|
|
this.single = selection.length != 1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
handleClick(tab, event) {
|
|
|
|
|
this.activeName = tab.name;
|
|
|
|
|
if("client" == this.activeName){
|
|
|
|
|
this.businessType = "1"
|
|
|
|
|
}else{
|
|
|
|
|
this.businessType = "0"
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
// 更多操作触发
|
|
|
|
|
handleCommand(command, row) {
|
|
|
|
|
switch (command) {
|
|
|
|
@ -535,6 +596,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm: function () {
|
|
|
|
|
this.form.businessType = this.businessType
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.roleId != undefined) {
|
|
|
|
|