fix param

This commit is contained in:
Qiuxia Fan 2022-03-26 21:21:06 +08:00
parent e95a4d6c41
commit 37aab6f41f
2 changed files with 3 additions and 4 deletions

View File

@ -125,7 +125,6 @@ function changeMetric(val: string) {
calculation: "", calculation: "",
...config[index], ...config[index],
}; };
console.log(currentConfig.value);
} }
watch( watch(
() => props.type, () => props.type,
@ -143,7 +142,6 @@ watch(
calculation: "", calculation: "",
...config[0], ...config[0],
}; };
console.log(config);
} }
); );
</script> </script>

View File

@ -403,6 +403,7 @@ function updateSettings(config?: { [key: string]: MetricConfigOpt[] }) {
(d: any) => d.name && d.value && d.condition (d: any) => d.name && d.value && d.condition
); );
const param = { const param = {
...dashboardStore.selectedGrid,
linkDashboard: states.linkDashboard, linkDashboard: states.linkDashboard,
nodeDashboard: isService nodeDashboard: isService
? items.filter((d: { scope: string; dashboard: string }) => d.dashboard) ? items.filter((d: { scope: string; dashboard: string }) => d.dashboard)
@ -413,8 +414,8 @@ function updateSettings(config?: { [key: string]: MetricConfigOpt[] }) {
legend: metrics, legend: metrics,
...config, ...config,
}; };
dashboardStore.selectWidget({ ...dashboardStore.selectedGrid, ...param }); dashboardStore.selectWidget(param);
dashboardStore.setConfigs({ ...dashboardStore.selectedGrid, ...param }); dashboardStore.setConfigs(param);
emit("update", param); emit("update", param);
} }
function updateLinkServerMetrics(options: Option[] | any) { function updateLinkServerMetrics(options: Option[] | any) {