谐波溯源删除,新增,左侧表格联动

This commit is contained in:
stt
2025-10-27 13:19:27 +08:00
parent 791893ca38
commit 920fecc9a7
4 changed files with 22 additions and 2 deletions

View File

@@ -611,7 +611,11 @@ const handleChartClick = (params: any) => {
};
// 定义 emit
const emit = defineEmits(["flag-changed", "expand-detail"]);
const emit = defineEmits([
"flag-changed",
"expand-detail",
"refresh-security-detail",
]);
watch(flag, (newVal) => {
// 向父组件发送 flag 变化事件
@@ -950,6 +954,8 @@ const initialResponsibilityList = () => {
}
loading.value = false;
}
// 通知父组件刷新 manage/securityDetail.vue 中的数据
emit("refresh-security-detail");
})
.catch((error) => {
traceabilityTableData.value = [];

View File

@@ -420,7 +420,7 @@ const submit = () => {
// 执行
const execute = async (item: any, index: number) => {
if (item.time == undefined) {
if (time.value == undefined || time.value.length == 0) {
return ElMessage.warning("请选择时间范围");
}
tabList.value[activeName.value].showDynamic = false;

View File

@@ -526,6 +526,7 @@ const loading = ref(false);
const trendChartRef = ref();
// 页码
const params = reactive({
pageNum: 1,
@@ -945,9 +946,14 @@ const init = () => {
eventList();
};
const refreshResponsibilityList = () => {
initialResponsibilityList();
};
defineExpose({
init,
setShowDetail, // 暴露方法给父组件调用
refreshResponsibilityList
});
</script>

View File

@@ -213,6 +213,7 @@
@data-updated="handleDataUpdate"
@flag-changed="handleFlagChange"
@expand-detail="handleExpandDetail"
@refresh-security-detail="refreshSecurityDetail"
/>
</dv-border-box-13>
<!-- <dv-border-box-13 :color="color[0]">
@@ -294,6 +295,13 @@ const handleDataUpdate = (data: string[]) => {
eventListData.value = data;
};
const refreshSecurityDetail = () => {
// 调用 securityDetail 组件的刷新方法
if (securityDetail.value) {
securityDetail.value.refreshResponsibilityList();
}
};
// 初始化并获取数据
const initComponents = () => {
if (eventStatistics.value) {