谐波溯源删除,新增,左侧表格联动
This commit is contained in:
@@ -611,7 +611,11 @@ const handleChartClick = (params: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 定义 emit
|
// 定义 emit
|
||||||
const emit = defineEmits(["flag-changed", "expand-detail"]);
|
const emit = defineEmits([
|
||||||
|
"flag-changed",
|
||||||
|
"expand-detail",
|
||||||
|
"refresh-security-detail",
|
||||||
|
]);
|
||||||
|
|
||||||
watch(flag, (newVal) => {
|
watch(flag, (newVal) => {
|
||||||
// 向父组件发送 flag 变化事件
|
// 向父组件发送 flag 变化事件
|
||||||
@@ -950,6 +954,8 @@ const initialResponsibilityList = () => {
|
|||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
// 通知父组件刷新 manage/securityDetail.vue 中的数据
|
||||||
|
emit("refresh-security-detail");
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
traceabilityTableData.value = [];
|
traceabilityTableData.value = [];
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ const submit = () => {
|
|||||||
|
|
||||||
// 执行
|
// 执行
|
||||||
const execute = async (item: any, index: number) => {
|
const execute = async (item: any, index: number) => {
|
||||||
if (item.time == undefined) {
|
if (time.value == undefined || time.value.length == 0) {
|
||||||
return ElMessage.warning("请选择时间范围");
|
return ElMessage.warning("请选择时间范围");
|
||||||
}
|
}
|
||||||
tabList.value[activeName.value].showDynamic = false;
|
tabList.value[activeName.value].showDynamic = false;
|
||||||
|
|||||||
@@ -526,6 +526,7 @@ const loading = ref(false);
|
|||||||
|
|
||||||
const trendChartRef = ref();
|
const trendChartRef = ref();
|
||||||
|
|
||||||
|
|
||||||
// 页码
|
// 页码
|
||||||
const params = reactive({
|
const params = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -945,9 +946,14 @@ const init = () => {
|
|||||||
eventList();
|
eventList();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const refreshResponsibilityList = () => {
|
||||||
|
initialResponsibilityList();
|
||||||
|
};
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
init,
|
init,
|
||||||
setShowDetail, // 暴露方法给父组件调用
|
setShowDetail, // 暴露方法给父组件调用
|
||||||
|
refreshResponsibilityList
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,7 @@
|
|||||||
@data-updated="handleDataUpdate"
|
@data-updated="handleDataUpdate"
|
||||||
@flag-changed="handleFlagChange"
|
@flag-changed="handleFlagChange"
|
||||||
@expand-detail="handleExpandDetail"
|
@expand-detail="handleExpandDetail"
|
||||||
|
@refresh-security-detail="refreshSecurityDetail"
|
||||||
/>
|
/>
|
||||||
</dv-border-box-13>
|
</dv-border-box-13>
|
||||||
<!-- <dv-border-box-13 :color="color[0]">
|
<!-- <dv-border-box-13 :color="color[0]">
|
||||||
@@ -294,6 +295,13 @@ const handleDataUpdate = (data: string[]) => {
|
|||||||
eventListData.value = data;
|
eventListData.value = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const refreshSecurityDetail = () => {
|
||||||
|
// 调用 securityDetail 组件的刷新方法
|
||||||
|
if (securityDetail.value) {
|
||||||
|
securityDetail.value.refreshResponsibilityList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化并获取数据
|
// 初始化并获取数据
|
||||||
const initComponents = () => {
|
const initComponents = () => {
|
||||||
if (eventStatistics.value) {
|
if (eventStatistics.value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user