| | |
| | | </div> |
| | | <el-table :data="tableData.data" style="width: 100%"> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="roleName" label="角色名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="roleCode" label="角色标识" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="roleInfo" label="角色描述" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="name" label="角色名称" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('新增', '')">新增</el-button> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" style="color: red" text type="primary" @click="onRowDel(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | // 初始化表格数据 |
| | | const initRoleTableData = async () => { |
| | | let res = await useRoleApi().getRoleList(); |
| | | if (res.data.code === '200') { |
| | | if (res.data.code === 100) { |
| | | state.tableData.data = res.data.data; |
| | | } else { |
| | | ElMessage({ |
| | |
| | | }) |
| | | .then(async () => { |
| | | let res = await useRoleApi().deleteRole({ roleId: row.roleId }); |
| | | if (res.data.code === '200') { |
| | | if (res.data.code === 100) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |