|
@@ -2,7 +2,7 @@
|
|
|
<div class="page-container">
|
|
<div class="page-container">
|
|
|
<div class="page-header">
|
|
<div class="page-header">
|
|
|
<PageTitle title="角色管理" />
|
|
<PageTitle title="角色管理" />
|
|
|
- <el-button type="danger" @click="handleAdd">新增角色</el-button>
|
|
|
|
|
|
|
+ <!-- <el-button type="danger" @click="handleAdd">新增角色</el-button> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<el-table :data="paginatedRoleList" border>
|
|
<el-table :data="paginatedRoleList" border>
|
|
@@ -19,8 +19,8 @@
|
|
|
<el-table-column prop="remark" label="备注" min-width="150" align="center" show-overflow-tooltip />
|
|
<el-table-column prop="remark" label="备注" min-width="150" align="center" show-overflow-tooltip />
|
|
|
<el-table-column label="操作" width="150" align="center" fixed="right">
|
|
<el-table-column label="操作" width="150" align="center" fixed="right">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
- <el-button type="primary" link size="small" @click="handleEdit(row)">编辑</el-button>
|
|
|
|
|
- <el-button type="danger" link size="small" @click="handleDelete(row)">删除</el-button>
|
|
|
|
|
|
|
+ <!-- <el-button type="primary" link size="small" @click="handleEdit(row)">编辑</el-button> -->
|
|
|
|
|
+ <el-button disabled type="danger" link size="small" @click="handleDelete(row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -68,6 +68,7 @@ import { ref, reactive, computed, onMounted } from 'vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { PageTitle } from '@/components';
|
|
import { PageTitle } from '@/components';
|
|
|
import { getRoleList, addRole, updateRole, deleteRole } from '@/api/pc/organization';
|
|
import { getRoleList, addRole, updateRole, deleteRole } from '@/api/pc/organization';
|
|
|
|
|
+import { create } from 'domain';
|
|
|
|
|
|
|
|
const roleList = ref([]);
|
|
const roleList = ref([]);
|
|
|
const currentPage = ref(1);
|
|
const currentPage = ref(1);
|
|
@@ -100,10 +101,16 @@ const paginatedRoleList = computed(() => {
|
|
|
|
|
|
|
|
const loadRoleList = async () => {
|
|
const loadRoleList = async () => {
|
|
|
try {
|
|
try {
|
|
|
- const res = await getRoleList();
|
|
|
|
|
- if (res.code === 200 && res.data) {
|
|
|
|
|
- roleList.value = res.data;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // const res = await getRoleList();
|
|
|
|
|
+ // if (res.code === 200 && res.data) {
|
|
|
|
|
+ // roleList.value = res.data;
|
|
|
|
|
+ // }
|
|
|
|
|
+ roleList.value = [
|
|
|
|
|
+ { roleId: 1, roleName: '管理角色', roleSort: 1, status: '0', createTime: '2026-01-27 09:36:27' },
|
|
|
|
|
+ { roleId: 2, roleName: '采购角色', roleSort: 2, status: '0', createTime: '2026-01-27 09:36:38' },
|
|
|
|
|
+ { roleId: 3, roleName: '查询角色', roleSort: 3, status: '0', createTime: '2026-01-27 09:37:33' },
|
|
|
|
|
+ { roleId: 4, roleName: '审核角色', roleSort: 4, status: '0', createTime: '2026-01-27 09:37:50' }
|
|
|
|
|
+ ];
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('获取角色列表失败:', error);
|
|
console.error('获取角色列表失败:', error);
|
|
|
ElMessage.error('获取角色列表失败');
|
|
ElMessage.error('获取角色列表失败');
|