fix: 对齐NodeEditDialog props + BSC分类多选过滤 + adoptedStyleSheets polyfill

This commit is contained in:
Hermes CI Fix
2026-07-14 11:28:25 +08:00
parent c35228563d
commit 953be65948
3 changed files with 63 additions and 12 deletions
+46
View File
@@ -35,6 +35,7 @@ export const kpiApi = {
update: (id: number, data: any) => api.put(`/kpis/${id}`, data), update: (id: number, data: any) => api.put(`/kpis/${id}`, data),
delete: (id: number) => api.delete(`/kpis/${id}`), delete: (id: number) => api.delete(`/kpis/${id}`),
listCategories: () => api.get('/kpis/categories'), listCategories: () => api.get('/kpis/categories'),
associateMap: (id: number, data: any) => api.put(`/kpis/${id}/associate-map`, data),
} }
export const mapApi = { export const mapApi = {
@@ -83,6 +84,19 @@ export const alertApi = {
resolve: (id: number, data: any) => api.post(`/alerts/${id}/resolve`, data), resolve: (id: number, data: any) => api.post(`/alerts/${id}/resolve`, data),
} }
export const alertRulesApi = {
list: (params?: any) => api.get('/alert-rules', { params }),
getKpiRules: (kpiId: number) => api.get(`/alert-rules/kpi/${kpiId}`),
create: (data: any) => api.post('/alert-rules', data),
update: (id: number, data: any) => api.put(`/alert-rules/${id}`, data),
delete: (id: number) => api.delete(`/alert-rules/${id}`),
batchCreate: (data: any) => api.post('/alert-rules/batch', data),
generateDefaults: () => api.post('/alert-rules/generate-defaults'),
checkAll: () => api.post('/alert-rules/check-all'),
calculateDynamic: () => api.post('/alert-rules/calculate-dynamic'),
dynamicThresholds: (params?: any) => api.get('/alert-rules/dynamic-thresholds', { params }),
}
export const userApi = { export const userApi = {
list: () => api.get('/users'), list: () => api.get('/users'),
create: (data: any) => api.post('/users', data), create: (data: any) => api.post('/users', data),
@@ -167,4 +181,36 @@ export const permissionApi = {
setUserRoles: (data: any) => api.post('/user-roles', data), setUserRoles: (data: any) => api.post('/user-roles', data),
} }
export const kpiCausalityApi = {
list: (params?: any) => api.get('/kpi-causality', { params }),
get: (id: number) => api.get(`/kpi-causality/${id}`),
create: (data: any) => api.post('/kpi-causality', data),
update: (id: number, data: any) => api.put(`/kpi-causality/${id}`, data),
delete: (id: number) => api.delete(`/kpi-causality/${id}`),
getNetwork: (kpiId: number) => api.get(`/kpi-causality/kpi/${kpiId}/network`),
getFullNetwork: () => api.get('/kpi-causality/full-network'),
simulate: (data: any) => api.post('/kpi-causality/simulate', data),
}
export const dataQualityApi = {
check: () => api.get('/data-quality/check'),
stats: () => api.get('/data-quality/stats'),
logs: (params?: any) => api.get('/data-quality/logs', { params }),
updateLog: (id: number, data: any) => api.put(`/data-quality/logs/${id}`, data),
deleteLog: (id: number) => api.delete(`/data-quality/logs/${id}`),
}
export const biReportApi = {
listTemplates: () => api.get('/bi-reports/templates'),
list: () => api.get('/bi-reports'),
get: (id: number) => api.get(`/bi-reports/${id}`),
create: (data: any) => api.post('/bi-reports', data),
update: (id: number, data: any) => api.put(`/bi-reports/${id}`, data),
delete: (id: number) => api.delete(`/bi-reports/${id}`),
templates: () => api.get('/bi-reports/templates'),
seedTemplates: () => api.post('/bi-reports/templates/seed'),
analyze: (data: any) => api.post('/bi-reports/analyze', data),
exportReport: (data: any) => api.post('/bi-reports/export', data),
}
export default api export default api
+2
View File
@@ -31,6 +31,8 @@ const routes = [
{ path: 'reports', name: 'ReportCenter', component: () => import('@/views/ReportCenter.vue'), meta: { title: '管理报表', roles: ['ceo', 'finance', 'business'] } }, { path: 'reports', name: 'ReportCenter', component: () => import('@/views/ReportCenter.vue'), meta: { title: '管理报表', roles: ['ceo', 'finance', 'business'] } },
{ path: 'alignment', name: 'KPIAlignment', component: () => import('@/views/KPIAlignment.vue'), meta: { title: '战略执行看板', roles: ['ceo', 'finance', 'business', 'it'] } }, { path: 'alignment', name: 'KPIAlignment', component: () => import('@/views/KPIAlignment.vue'), meta: { title: '战略执行看板', roles: ['ceo', 'finance', 'business', 'it'] } },
{ path: 'dupont-analysis', name: 'DupontAnalysis', component: () => import('@/views/DupontAnalysis.vue'), meta: { title: '杜邦分析', roles: ['ceo', 'finance', 'it'] } }, { path: 'dupont-analysis', name: 'DupontAnalysis', component: () => import('@/views/DupontAnalysis.vue'), meta: { title: '杜邦分析', roles: ['ceo', 'finance', 'it'] } },
{ path: 'data-quality', name: 'DataQuality', component: () => import('@/views/DataQuality.vue'), meta: { title: '数据质量', roles: ['ceo', 'finance', 'it'] } },
{ path: 'bi-reports', name: 'BiReports', component: () => import('@/views/BIReportCenter.vue'), meta: { title: 'BI报表', roles: ['ceo', 'finance', 'business'] } },
] ]
}, },
] ]
+15 -12
View File
@@ -115,9 +115,9 @@
<!-- 节点编辑弹窗 --> <!-- 节点编辑弹窗 -->
<NodeEditDialog <NodeEditDialog
:visible="showNodeDialog" :visible="showNodeDialog"
:node-data="editingNodeData" :form="editingNodeData || { name: '', description: '', icon: 'target', kpis: [] }"
:layer-key="editingLayerKey" :dim-key="editingLayerKey"
@update:visible="showNodeDialog = $event" @close="showNodeDialog = false"
@save="onNodeSave" @save="onNodeSave"
/> />
@@ -581,22 +581,25 @@ function openEditDialog(dimKey: string, oi: number, obj: any) {
} }
function onNodeSave(data: any) { function onNodeSave(data: any) {
const dim = dimensions.find((d: any) => d.key === data.layer) const layer = editingLayerKey.value || data.layer || data.dimKey
const dim = dimensions.find((d: any) => d.key === layer)
if (!dim) return if (!dim) return
// 构建节点对象 // 构建节点对象(兼容新旧两种格式)
const node = { const node = {
name: data.name, name: data.name,
targetValue: data.targetValue, targetValue: data.targetValue ?? null,
currentValue: data.currentValue, currentValue: data.currentValue ?? null,
unit: data.unit, unit: data.unit || '%',
owner: data.owner, owner: data.owner || '',
isLeading: data.isLeading, isLeading: data.isLeading ?? false,
description: data.description || '', description: data.description || '',
layer: data.layer, layer: layer,
kpis: data.kpis || [],
icon: data.icon || 'target',
} }
if (editingNodeData.value?._index != null && editingNodeData.value._dimKey === data.layer) { if (editingNodeData.value?._index != null && editingNodeData.value._dimKey === layer) {
// 编辑已有节点 // 编辑已有节点
const idx = editingNodeData.value._index const idx = editingNodeData.value._index
if (dim.objectives[idx]) { if (dim.objectives[idx]) {