feat: rbac查询页面
This commit is contained in:
@@ -191,7 +191,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listDept(queryParams.value).then(response => {
|
||||
deptList.value = proxy.handleTree(response.data, "id");
|
||||
deptList.value = proxy.handleTree(response.data.items, "id");
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listMenu(queryParams.value).then(response => {
|
||||
menuList.value = proxy.handleTree(response.data, "id");
|
||||
menuList.value = proxy.handleTree(response.data.items, "id");
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
@@ -338,7 +338,7 @@ function getTreeselect() {
|
||||
menuOptions.value = [];
|
||||
listMenu().then(response => {
|
||||
const menu = { id: 0, menuName: "主类目", children: [] };
|
||||
menu.children = proxy.handleTree(response.data, "id");
|
||||
menu.children = proxy.handleTree(response.data.items, "id");
|
||||
menuOptions.value.push(menu);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listPost(queryParams.value).then(response => {
|
||||
postList.value = response.data.data;
|
||||
postList.value = response.data.items;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
|
||||
@@ -442,7 +442,7 @@ function getList() {
|
||||
loading.value = true;
|
||||
listRole(proxy.addDateRange(queryParams.value, dateRange.value)).then(
|
||||
(response) => {
|
||||
roleList.value = response.data.data;
|
||||
roleList.value = response.data.items;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
@@ -525,7 +525,7 @@ function handleAuthUser(row) {
|
||||
function getMenuTreeselect() {
|
||||
listMenu().then((response) => {
|
||||
const options = [];
|
||||
response.data.forEach((m) => {
|
||||
response.data.items.forEach((m) => {
|
||||
options.push({
|
||||
id: m.id,
|
||||
label: m.menuName,
|
||||
|
||||
@@ -81,9 +81,9 @@
|
||||
@change="handleStatusChange(scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
||||
<el-table-column label="创建时间" align="center" prop="creationTime" v-if="columns[6].visible" width="160">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
<span>{{ parseTime(scope.row.creationTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||
@@ -321,7 +321,7 @@ watch(deptName, val => {
|
||||
function getDeptTree() {
|
||||
listDept().then(response => {
|
||||
const selectList = [];
|
||||
response.data.forEach(res => {
|
||||
response.data.items.forEach(res => {
|
||||
selectList.push({ id: res.id, label: res.deptName, parentId: res.parentId, orderNum: res.orderNum, children: [] })
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ function getList() {
|
||||
listUser(proxy.addDateRange(queryParams.value, dateRange.value)).then(res => {
|
||||
|
||||
loading.value = false;
|
||||
userList.value = res.data.data;
|
||||
userList.value = res.data.items;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
};
|
||||
@@ -469,10 +469,10 @@ function reset() {
|
||||
if (postOptions.value.length == 0 || roleOptions.value.length == 0) {
|
||||
roleOptionselect().then(response => {
|
||||
//岗位从另一个接口获取全量
|
||||
roleOptions.value = response.data;
|
||||
roleOptions.value = response.data.items;
|
||||
})
|
||||
postOptionselect().then(response => {
|
||||
postOptions.value = response.data;
|
||||
postOptions.value = response.data.items;
|
||||
|
||||
}
|
||||
|
||||
@@ -512,7 +512,6 @@ response.data.posts.forEach(post => {
|
||||
});
|
||||
|
||||
form.value.deptId= response.data.deptId;
|
||||
|
||||
response.data.roles.forEach(role => {
|
||||
form.value.roleIds.push(role.id)
|
||||
});
|
||||
@@ -529,7 +528,7 @@ function submitForm() {
|
||||
proxy.$refs["userRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.user.id != undefined) {
|
||||
updateUser(form.value).then(response => {
|
||||
updateUser(form.value.user.id,form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
|
||||
@@ -269,7 +269,7 @@ function setSubTableColumns(value) {
|
||||
/** 查询菜单下拉树结构 */
|
||||
function getMenuTreeselect() {
|
||||
listMenu().then(response => {
|
||||
menuOptions.value = proxy.handleTree(response.data, "menuId");
|
||||
menuOptions.value = proxy.handleTree(response.data.items, "menuId");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user