mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 09:09:20 +08:00
refactor: 岗位改名为职位
- 数据库 sys_menu:岗位管理 → 职位管理,岗位菜单分配 → 职位菜单分配,岗位权限分配 → 职位权限分配 - 路由:所有 position-related route titles 更新 - 前端页面:职位列表、职位菜单分配、职位权限分配 - 表单:职位名称、职位ID 等 label 更新 - API 注释同步更新
This commit is contained in:
+15
-15
@@ -35,7 +35,7 @@ const searchForm = ref({
|
||||
status: undefined as number | undefined,
|
||||
});
|
||||
|
||||
// 岗位列表
|
||||
// 职位列表
|
||||
const positionList = ref<PositionVO.PositionInfoVO[]>([]);
|
||||
const positionLoading = ref(false);
|
||||
const positionPagination = ref({
|
||||
@@ -44,7 +44,7 @@ const positionPagination = ref({
|
||||
total: 0,
|
||||
});
|
||||
|
||||
// 当前选中的岗位
|
||||
// 当前选中的职位
|
||||
const currentPosition = ref<null | PositionVO.PositionInfoVO>(null);
|
||||
|
||||
// 所有权限列表
|
||||
@@ -55,7 +55,7 @@ const permissionLoading = ref(false);
|
||||
const assignedPermissionIds = ref<number[]>([]);
|
||||
const selectedPermissionIds = ref<number[]>([]);
|
||||
|
||||
// 搜索岗位列表
|
||||
// 搜索职位列表
|
||||
async function searchPositions() {
|
||||
positionLoading.value = true;
|
||||
try {
|
||||
@@ -71,7 +71,7 @@ async function searchPositions() {
|
||||
positionList.value = result.records;
|
||||
positionPagination.value.total = result.total;
|
||||
} catch (error: any) {
|
||||
message.error(error?.message || '获取岗位列表失败');
|
||||
message.error(error?.message || '获取职位列表失败');
|
||||
} finally {
|
||||
positionLoading.value = false;
|
||||
}
|
||||
@@ -90,13 +90,13 @@ async function loadAllPermissions() {
|
||||
}
|
||||
}
|
||||
|
||||
// 选择岗位
|
||||
// 选择职位
|
||||
async function selectPosition(position: PositionVO.PositionInfoVO) {
|
||||
currentPosition.value = position;
|
||||
await loadAssignedPermissions();
|
||||
}
|
||||
|
||||
// 加载岗位已分配的权限ID列表
|
||||
// 加载职位已分配的权限ID列表
|
||||
async function loadAssignedPermissions() {
|
||||
if (!currentPosition.value?.id) return;
|
||||
|
||||
@@ -106,7 +106,7 @@ async function loadAssignedPermissions() {
|
||||
assignedPermissionIds.value = result;
|
||||
selectedPermissionIds.value = [...result];
|
||||
} catch (error: any) {
|
||||
message.error(error?.message || '获取岗位权限失败');
|
||||
message.error(error?.message || '获取职位权限失败');
|
||||
} finally {
|
||||
permissionLoading.value = false;
|
||||
}
|
||||
@@ -193,9 +193,9 @@ onMounted(() => {
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<Flex gap="middle" class="h-full">
|
||||
<!-- 左栏:岗位列表 -->
|
||||
<!-- 左栏:职位列表 -->
|
||||
<Card
|
||||
title="岗位列表"
|
||||
title="职位列表"
|
||||
class="flex h-full max-w-[400px] flex-col"
|
||||
:body-style="{
|
||||
height: '100%',
|
||||
@@ -208,7 +208,7 @@ onMounted(() => {
|
||||
<Flex class="flex-wrap gap-2">
|
||||
<Input
|
||||
v-model:value="searchForm.name"
|
||||
placeholder="请输入岗位名称"
|
||||
placeholder="请输入职位名称"
|
||||
allow-clear
|
||||
style="width: 200px; margin-right: 8px"
|
||||
/>
|
||||
@@ -225,7 +225,7 @@ onMounted(() => {
|
||||
<Button @click="resetSearch"> 重置 </Button>
|
||||
</Flex>
|
||||
|
||||
<!-- 岗位列表区域 -->
|
||||
<!-- 职位列表区域 -->
|
||||
<Flex vertical class="flex-1">
|
||||
<Spin :spinning="positionLoading">
|
||||
<div class="flex-1">
|
||||
@@ -290,14 +290,14 @@ onMounted(() => {
|
||||
</Flex>
|
||||
</Card>
|
||||
|
||||
<!-- 右栏:岗位权限分配 -->
|
||||
<!-- 右栏:职位权限分配 -->
|
||||
<Card
|
||||
title="岗位权限分配"
|
||||
title="职位权限分配"
|
||||
class="flex h-full flex-1 flex-col"
|
||||
:body-style="{ height: '100%' }"
|
||||
>
|
||||
<template v-if="currentPosition">
|
||||
<!-- 岗位信息 + 统计与操作 -->
|
||||
<!-- 职位信息 + 统计与操作 -->
|
||||
<div class="mb-4 rounded bg-gray-50 p-4 dark:bg-neutral-800">
|
||||
<div class="mb-3 flex items-center justify-between gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
@@ -415,7 +415,7 @@ onMounted(() => {
|
||||
<div v-else class="flex h-full flex-1 items-center justify-center">
|
||||
<div class="text-center text-gray-500">
|
||||
<div class="mb-4 text-5xl">👈</div>
|
||||
<div class="text-base">请先选择一个岗位</div>
|
||||
<div class="text-base">请先选择一个职位</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user