feat: 优化 AuditView 样式与交互细节

This commit is contained in:
caoxiaozhu
2026-05-09 16:16:56 +00:00
parent 683c75f364
commit 0c6ac50b31
4 changed files with 33 additions and 13 deletions

View File

@@ -18,14 +18,15 @@
'workbench-main': activeView === 'workbench',
'requests-main': activeView === 'requests',
'approval-main': activeView === 'approval',
'policies-main': activeView === 'policies',
'audit-main': activeView === 'audit',
'employees-main': activeView === 'employees',
'settings-main': activeView === 'settings'
}"
'policies-main': activeView === 'policies',
'audit-main': activeView === 'audit',
'audit-detail-main': activeView === 'audit' && auditDetailOpen,
'employees-main': activeView === 'employees',
'settings-main': activeView === 'settings'
}"
>
<TopBar
v-if="activeView !== 'settings'"
<TopBar
v-if="activeView !== 'settings' && !(activeView === 'audit' && auditDetailOpen)"
:current-view="topBarView"
:search="search"
:active-view="activeView"
@@ -112,7 +113,7 @@
<ApprovalCenterView v-else-if="activeView === 'approval'" />
<PoliciesView v-else-if="activeView === 'policies'" @summary-change="knowledgeSummary = $event" />
<AuditView v-else-if="activeView === 'audit'" />
<AuditView v-else-if="activeView === 'audit'" @detail-open-change="auditDetailOpen = $event" />
<EmployeeManagementView v-else-if="activeView === 'employees'" @overview-change="employeeSummary = $event" />
<SettingsView v-else />
</section>
@@ -151,8 +152,9 @@ import { useAppShell } from '../composables/useAppShell.js'
import { useSystemState } from '../composables/useSystemState.js'
import { filterNavItemsByAccess } from '../utils/accessControl.js'
const employeeSummary = ref(null)
const knowledgeSummary = ref(null)
const employeeSummary = ref(null)
const knowledgeSummary = ref(null)
const auditDetailOpen = ref(false)
const {
activeCase,

View File

@@ -1,4 +1,4 @@
import { computed, ref } from 'vue'
import { computed, ref, watch } from 'vue'
const TYPE_META = {
skills: {
@@ -545,7 +545,8 @@ const assets = [
export default {
name: 'AuditView',
setup() {
emits: ['detail-open-change'],
setup(props, { emit }) {
const tabs = [
{ id: 'skills', label: 'Skills' },
{ id: 'mcp', label: 'MCP' },
@@ -562,6 +563,14 @@ export default {
const tableColumns = computed(() => activeMeta.value.tableColumns)
const visibleSkills = computed(() => assets.filter((item) => item.type === activeType.value))
watch(
selectedSkill,
(value) => {
emit('detail-open-change', Boolean(value))
},
{ immediate: true }
)
function openVersionSwitch(version) {
if (!selectedSkill.value || version.version === selectedSkill.value.version) {
return