@@ -91,38 +91,33 @@
|
||||
<el-dialog
|
||||
:title="currentGroupName + ' 功能权限管理'"
|
||||
:visible.sync="permissionDialogVisible"
|
||||
width="50%"
|
||||
:style="{ maxHeight: '70vh' }"
|
||||
custom-class="permission-dialog">
|
||||
<div class="permission-table-container">
|
||||
<el-table :data="permissions" style="width: 100%" border size="small">
|
||||
<el-table-column prop="feature_id" label="功能ID" width="60"></el-table-column>
|
||||
<el-table-column prop="feature_description" label="功能描述" min-width="200"></el-table-column>
|
||||
<el-table-column label="状态" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
size="small"
|
||||
:type="scope.row.status === 'enabled' ? 'success' : 'danger'">
|
||||
{% raw %}{{ scope.row.status === 'enabled' ? '已启用' : '已关闭' }}{% endraw %}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.statusBool"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="togglePermission(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
width="70%">
|
||||
<el-table :data="permissions" style="width: 100%" border>
|
||||
<el-table-column prop="feature_id" label="功能ID" width="80"></el-table-column>
|
||||
<el-table-column prop="feature_description" label="功能描述"></el-table-column>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
:type="scope.row.status === 'enabled' ? 'success' : 'danger'">
|
||||
{% raw %}{{ scope.row.status === 'enabled' ? '已启用' : '已关闭' }}{% endraw %}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.statusBool"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="togglePermission(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="enableAllPermissions" type="success" size="small">一键启用全部</el-button>
|
||||
<el-button @click="disableAllPermissions" type="danger" size="small">一键关闭全部</el-button>
|
||||
<el-button @click="permissionDialogVisible = false" size="small">关闭</el-button>
|
||||
<el-button @click="enableAllPermissions" type="success">一键启用全部</el-button>
|
||||
<el-button @click="disableAllPermissions" type="danger">一键关闭全部</el-button>
|
||||
<el-button @click="permissionDialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -153,16 +148,6 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.permission-dialog .el-dialog__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.permission-table-container {
|
||||
max-height: calc(70vh - 150px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
||||
Reference in New Issue
Block a user