fix: 对齐NodeEditDialog props + BSC分类多选过滤 + adoptedStyleSheets polyfill
This commit is contained in:
@@ -115,9 +115,9 @@
|
||||
<!-- 节点编辑弹窗 -->
|
||||
<NodeEditDialog
|
||||
:visible="showNodeDialog"
|
||||
:node-data="editingNodeData"
|
||||
:layer-key="editingLayerKey"
|
||||
@update:visible="showNodeDialog = $event"
|
||||
:form="editingNodeData || { name: '', description: '', icon: 'target', kpis: [] }"
|
||||
:dim-key="editingLayerKey"
|
||||
@close="showNodeDialog = false"
|
||||
@save="onNodeSave"
|
||||
/>
|
||||
|
||||
@@ -581,22 +581,25 @@ function openEditDialog(dimKey: string, oi: number, obj: 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
|
||||
|
||||
// 构建节点对象
|
||||
// 构建节点对象(兼容新旧两种格式)
|
||||
const node = {
|
||||
name: data.name,
|
||||
targetValue: data.targetValue,
|
||||
currentValue: data.currentValue,
|
||||
unit: data.unit,
|
||||
owner: data.owner,
|
||||
isLeading: data.isLeading,
|
||||
targetValue: data.targetValue ?? null,
|
||||
currentValue: data.currentValue ?? null,
|
||||
unit: data.unit || '%',
|
||||
owner: data.owner || '',
|
||||
isLeading: data.isLeading ?? false,
|
||||
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
|
||||
if (dim.objectives[idx]) {
|
||||
|
||||
Reference in New Issue
Block a user