From 43fca2cb16964496caafdbc34e969d2a7cde7cc0 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Thu, 30 Mar 2023 15:32:56 +0800
Subject: [PATCH] 用户接口
---
src/views/system/role/index.vue | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index ca6131f..59ba2eb 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -3,12 +3,12 @@
<el-card shadow="hover">
<div class="system-user-search mb15">
<!-- <el-input size="default" placeholder="请输入角色名称" style="max-width: 180px"> </el-input>-->
- <el-button size="default" type="primary" class="ml10" @click="handleSearch">
- <el-icon>
- <ele-Search />
- </el-icon>
- 查询
- </el-button>
+<!-- <el-button size="default" type="primary" class="ml10" @click="handleSearch">-->
+<!-- <el-icon>-->
+<!-- <ele-Search />-->
+<!-- </el-icon>-->
+<!-- 查询-->
+<!-- </el-button>-->
<el-button size="default" type="success" class="ml10" @click="onOpenDialogRef('新增', '')">
<el-icon>
<ele-FolderAdd />
@@ -18,13 +18,9 @@
</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>
@@ -84,7 +80,7 @@
// 初始化表格数据
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({
@@ -106,7 +102,7 @@
})
.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,
--
Gitblit v1.9.2