Revert "调整权限弹窗"

This reverts commit 998992cf0b.
This commit is contained in:
liuwei
2025-06-04 14:10:18 +08:00
parent 050840ee55
commit ea08f5fb2c

View File

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