|
|
@ -3,65 +3,92 @@ |
|
|
|
<el-card class="flex1"> |
|
|
|
<div class="now-name"> |
|
|
|
当前客户: {{customerName}} |
|
|
|
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
size="small" |
|
|
|
@click="handleSaveSort">保存顺序</el-button> |
|
|
|
</div> |
|
|
|
<el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleId" border style="width: 100%"> |
|
|
|
<el-table-column type="index" width="50"></el-table-column> |
|
|
|
<el-table ref="roleTable" |
|
|
|
v-loading="loading1" |
|
|
|
:data="roleList" |
|
|
|
row-key="roleId" |
|
|
|
border |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column type="index" |
|
|
|
width="50"></el-table-column> |
|
|
|
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> --> |
|
|
|
<el-table-column prop="roleName" label="角色名称" width="160"> |
|
|
|
<el-table-column prop="roleName" |
|
|
|
label="角色名称" |
|
|
|
width="160"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-if="scope.row.isEdit" v-model="scope.row.roleName" clearable> |
|
|
|
<el-input v-if="scope.row.isEdit" |
|
|
|
v-model="scope.row.roleName" |
|
|
|
clearable> |
|
|
|
</el-input> |
|
|
|
<span v-else>{{scope.row.constName}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column> |
|
|
|
<el-table-column v-if="!funcShow" |
|
|
|
prop="roleKey" |
|
|
|
label="角色Key"></el-table-column> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="toOperationConfig(scope.row.roleId, scope.row.roleName)">功能权限</el-button> |
|
|
|
<span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;"> |
|
|
|
<el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button> |
|
|
|
<el-button size="small" @click="scope.row.isEdit=false">取消</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
size="mini" |
|
|
|
@click="toOperationConfig(scope.row.roleId, scope.row.roleName)">功能权限</el-button> |
|
|
|
<span v-if="scope.row.isEdit" |
|
|
|
style="display: inline-block; margin-left: 10px;"> |
|
|
|
<el-button type="primary" |
|
|
|
size="small" |
|
|
|
@click="handleSaveChange(scope.row)">保存</el-button> |
|
|
|
<el-button size="small" |
|
|
|
@click="scope.row.isEdit=false">取消</el-button> |
|
|
|
</span> |
|
|
|
<el-button v-else type="primary" size="mini" @click="handleChangeName(scope.row)">修改名称</el-button> |
|
|
|
<el-button v-else |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
@click="handleChangeName(scope.row)">修改名称</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-card> |
|
|
|
<el-card v-show="funcShow" style="flex: 1; margin: 0 10px;"> |
|
|
|
<el-card v-show="funcShow" |
|
|
|
style="flex: 1; margin: 0 10px;"> |
|
|
|
<div class="now-name">当前角色: {{roleName}}</div> |
|
|
|
<el-table |
|
|
|
v-loading="loading2" |
|
|
|
<el-table v-loading="loading2" |
|
|
|
max-height="580" |
|
|
|
ref="opeTable" |
|
|
|
:data="opeList" |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
@select="handleSelectionChange" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
@select="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" |
|
|
|
width="55"></el-table-column> |
|
|
|
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> --> |
|
|
|
<el-table-column prop="operationName" label="操作名称"></el-table-column> |
|
|
|
<el-table-column prop="operationName" |
|
|
|
label="操作名称"></el-table-column> |
|
|
|
<!-- <el-table-column prop="brief" label="简介"></el-table-column> --> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="small" @click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">权限配置</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
size="small" |
|
|
|
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">权限配置</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-card> |
|
|
|
<el-card v-show="roleShow" style="width: 250px;"> |
|
|
|
<el-card v-show="roleShow" |
|
|
|
style="width: 250px;"> |
|
|
|
<div class="now-name">当前功能: {{funcName}}</div> |
|
|
|
<div> |
|
|
|
<el-row :gutter="12"> |
|
|
|
<el-col v-loading="loading3"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-checkbox-group class="t" v-model="checkedScopes" @change="roleChange"> |
|
|
|
<el-checkbox |
|
|
|
v-for="scope in scopeOptions" |
|
|
|
<el-checkbox-group class="t" |
|
|
|
v-model="checkedScopes" |
|
|
|
@change="roleChange"> |
|
|
|
<el-checkbox v-for="scope in scopeOptions" |
|
|
|
:label="scope.scopeKey" |
|
|
|
:key="scope.scopeKey" |
|
|
|
>{{scope.scopeName}}</el-checkbox> |
|
|
|
:key="scope.scopeKey">{{scope.scopeName}}</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
@ -211,7 +238,8 @@ export default { |
|
|
|
saveOperations4Role (val) { |
|
|
|
let param = { |
|
|
|
roleId: this.roleId, |
|
|
|
opes: val |
|
|
|
opes: val, |
|
|
|
customerId: this.customerId |
|
|
|
} |
|
|
|
this.$http.post('/gov/access/config/saveroleopes', param).then( |
|
|
|
resp => { |
|
|
@ -228,7 +256,8 @@ export default { |
|
|
|
roleId: this.roleId, |
|
|
|
operationKey: this.operationKey, |
|
|
|
scopeKeys: val, |
|
|
|
settingKeys: this.checkedSettings |
|
|
|
settingKeys: this.checkedSettings, |
|
|
|
customerId: this.customerId |
|
|
|
} |
|
|
|
|
|
|
|
this.$http.post('/gov/access/config/saveconfig', param).then( |
|
|
|