style: 积分管理

This commit is contained in:
2025-01-03 12:19:56 +08:00
parent 65017f4bc7
commit 1908146a75
2 changed files with 189 additions and 6 deletions

View File

@@ -37,9 +37,6 @@ const getRoleList = async () => {
try {
loading.value = true;
const params = { ...queryParams.value };
console.log(params);
const data = await request(authApi("rolePage"), {
method: "POST",
body: JSON.stringify(params)
@@ -61,6 +58,26 @@ const getRoleList = async () => {
}
};
// 管理用户列表数据
const managerUserOptions = ref([]);
// 获取管理用户列表
const getManagerUserList = async () => {
try {
const res = await request(authApi("getManagerUserPrimaryInfo"), {
method: "POST"
});
if (res.status === 200) {
console.info(managerUserOptions);
managerUserOptions.value = res.data.map(item => ({
value: item.id,
label: item.name
}));
}
} catch (error) {
console.error("获取管理用户列表失败:", error);
}
};
// 搜索方法
const handleSearch = () => {
queryParams.value.pageNum = 1;
@@ -98,7 +115,13 @@ const columns: TableColumnList = [
{
label: "创建者",
prop: "createUserId",
width: "260"
width: "260",
formatter: row => {
const manager = managerUserOptions.value.find(
item => item.value === row.createUserId
);
return manager ? manager.label : "-";
}
},
{
label: "描述",
@@ -167,6 +190,7 @@ const handleDelete = row => {
// 页面加载时获取数据
onMounted(() => {
getRoleList();
getManagerUserList();
});
</script>