fix(权限完善):1.权限优化以下模块按钮查看权限全部归属超级管理员,只有职称角色未超级管理员用户才可以查看进入操作
deploy-hxtesting / build-and-deploy (push) Successful in 1m17s

1)如图一所示点击左下角个人信息弹出框中的“空间设置”、“成员管理“、”模型管理“、”全部设置“、”系统管理“
2)点击进入”设置“页面中”空间“、”模型“、”发布集成“、”数据与扩展“、”系统管理“这几个大模块相关内容入口
2.成员管理页面增加一个字段”状态“:1-5 在职状态(试用/试用延期/正式/临时/实习)、6离职/7退休(顺便对数据进行清洗,工号首位带字母的都标记为离职其他都标记为正式)
3.检查各业务需求里所有选择员工相关都只能拉取选择正式员工!
This commit is contained in:
runny committed 2026-12-01 13:14:24 +08:00
1 parent b762deaf15
commit 7034d93256
49 files changed
+809 -130

No files matched your search

+112 -1
View File
@@ -196,6 +196,15 @@
</template>
</t-tab-panel>
</t-tabs>
<t-select
v-show="activeListTab === 'members'" v-model="employmentStatusFilter"
class="members-status-filter" clearable
:placeholder="$t('tenantMember.employmentStatus.filterPlaceholder')"
:aria-label="$t('tenantMember.columns.employmentStatus')"
@change="onEmploymentStatusFilterChange">
<t-option v-for="opt in employmentStatusOptions" :key="opt.value" :value="opt.value"
:label="$t(opt.labelKey)" />
</t-select>
<t-input v-show="activeListTab === 'members'" v-model="searchQuery" class="members-list-search"
:placeholder="$t('tenantMember.searchPlaceholder')" :aria-label="$t('tenantMember.searchPlaceholder')" clearable>
<template #prefix-icon><t-icon name="search" size="16px" /></template>
@@ -356,6 +365,21 @@
</span>
</div>
</template>
<template #employment_status="{ row }">
<div class="status-cell">
<t-select v-if="canManage && row.user_id !== currentUserId"
:model-value="row.employment_status" class="member-status-select" :borderless="true"
:popup-props="roleSelectPopupProps"
:aria-label="`${memberPrimary(row)} · ${$t('tenantMember.columns.employmentStatus')}`"
@change="(val: number) => onEmploymentStatusChange(row, val)">
<t-option v-for="opt in employmentStatusOptions" :key="opt.value" :value="opt.value"
:label="$t(opt.labelKey)" />
</t-select>
<t-tag v-else :theme="employmentStatusTagTheme(row.employment_status)" size="small">
{{ employmentStatusLabel(row.employment_status) }}
</t-tag>
</div>
</template>
<template #joined_at="{ row }">{{ formatDate(row.joined_at) }}</template>
<template #actions="{ row }">
<t-popconfirm
@@ -668,9 +692,12 @@ import { auditActionLabel } from '@/i18n/auditActionLabel'
import {
listMembers,
updateMemberRole,
updateMemberEmploymentStatus,
removeMember,
importMembers,
syncCasdoorMembers,
EMPLOYMENT_STATUS_OPTIONS,
employmentStatusTagTheme,
type TenantMember,
type TenantRole,
type MemberImportResult,
@@ -728,6 +755,52 @@ const searchQuery = ref('')
const activeListTab = ref('members')
/** 已应用到服务端筛选的检索词(相对输入框防抖) */
const memberSearchQ = ref('')
// ---- 在职状态(000167) ----------------------------------------------------
// 状态列字典 + 筛选:1试用/2试用延期/3正式/4临时/5实习/6离职/7退休。
// 存量与开户由工号规则决定(首位字母→离职,其余→正式),此处可人工修正。
const employmentStatusOptions = EMPLOYMENT_STATUS_OPTIONS
const employmentStatusFilter = ref<number | null>(null)
const employmentStatusLabel = (status: number): string => {
const opt = employmentStatusOptions.find((o) => o.value === status)
return opt ? t(opt.labelKey) : '—'
}
function onEmploymentStatusFilterChange() {
if (!activeTenantId.value) return
membersPage.value = 1
void loadMembers()
}
async function onEmploymentStatusChange(row: TenantMember, newStatus: number) {
const prev = row.employment_status
if (prev === newStatus) return
if (!activeTenantId.value) return
try {
const resp = await updateMemberEmploymentStatus(activeTenantId.value, row.user_id, newStatus)
if (resp.success) {
// 与 onRoleChange 同因:t-table 行对象可能是浅拷贝,必须替换源数组
// 中的对象才能触发单元格重渲染。
const idx = members.value.findIndex((m) => m.user_id === row.user_id)
if (idx >= 0) {
const merged = { ...members.value[idx], employment_status: newStatus }
members.value.splice(idx, 1, merged)
}
MessagePlugin.success(t('tenantMember.employmentStatus.changeSuccess'))
return
}
MessagePlugin.error(resp.message || t('tenantMember.errors.generic'))
} catch (err: any) {
const status = err?.status
if (status === 404) {
MessagePlugin.error(t('tenantMember.errors.notFound'))
} else {
MessagePlugin.error(err?.message || t('tenantMember.errors.generic'))
}
// :model-value 单向绑定,渲染值自动回退为 prev,无需手工还原。
}
}
let memberSearchDebounceTimer: number | undefined
const membersTotal = ref(0)
@@ -892,6 +965,8 @@ const columns = computed(() => [
{ colKey: 'deptName', title: t('tenantMember.columns.deptName'), ellipsis: true, width: 130 },
{ colKey: 'displayName', title: t('tenantMember.columns.displayName'), width: 120 },
{ colKey: 'role', title: t('tenantMember.columns.role'), width: 168 },
// 在职状态(000167):管理页行内下拉(Owner+),只读身份展示标签。
{ colKey: 'employment_status', title: t('tenantMember.columns.employmentStatus'), width: 120 },
{ colKey: 'joined_at', title: t('tenantMember.columns.joinedAt'), width: 154 },
{ colKey: 'actions', title: t('tenantMember.columns.operations'), width: 88, align: 'left' },
])
@@ -971,6 +1046,7 @@ async function loadMembers() {
page: membersPage.value,
page_size: membersPageSize.value,
q: memberSearchQ.value || undefined,
employment_status: employmentStatusFilter.value || undefined,
})
if (resp.success && resp.data) {
const total = resp.data.total ?? 0
@@ -1945,10 +2021,19 @@ watch(
:deep(.t-input) { border-radius: var(--app-radius-sm); }
}
// 在职状态筛选下拉(搜索框左侧)
.members-status-filter {
flex: 0 0 150px;
width: 150px;
margin-right: 8px;
:deep(.t-input) { border-radius: var(--app-radius-sm); }
}
@container (max-width: 700px) {
.members-tabbar { flex-wrap: wrap; gap: 0; }
.members-tabs { flex-basis: 100%; }
.members-list-search { flex: 1 1 100%; width: 100%; margin: 8px 0; }
.members-status-filter { flex: 1 1 100%; width: 100%; margin: 8px 0 0; }
.members-list-search { flex: 1 1 100%; width: 100%; margin: 8px 0 0; }
}
.member-role-label {
@@ -1988,6 +2073,32 @@ watch(
:deep(.t-input__prefix) { margin-right: 6px; color: var(--td-text-color-secondary); }
}
// 在职状态单元格:可编辑行内下拉与角色列同风格;只读身份展示小标签。
.status-cell {
display: flex;
align-items: center;
min-width: 0;
box-sizing: border-box;
}
.member-status-select {
width: 104px;
flex: 0 0 104px;
:deep(.t-input) {
height: 28px;
min-height: 28px;
padding: 0 8px;
border: 1px solid transparent;
border-radius: var(--app-radius-sm);
background: var(--td-bg-color-secondarycontainer);
font-size: var(--app-text-md);
&:hover { border-color: var(--td-component-stroke); }
&.t-is-focused { border-color: var(--td-brand-color); }
}
}
.data-table-shell {
.settings-data-table();