风险矩阵配置无数据显示修改

This commit is contained in:
2026-08-31 15:25:43 +08:00
parent a3e03466e1
commit 83132dc31c
+8 -4
View File
@@ -328,8 +328,8 @@ const cellLevel = (s:number, l:number) => {
// 风险矩阵tabs切换
const handleTabChange = (v: string) => {
activeMatrix.value = v;
matrixConfig();
activeMatrix.value = v;
matrixConfig();
}
// 打开风险矩阵编辑弹窗
@@ -438,6 +438,8 @@ const matrixConfig = async () => {
const {data,error} = await matrixConfigApi(activeMatrix.value);
if(!error){
curMatrix.value = data;
}else{
curMatrix.value = null;
}
}
@@ -747,7 +749,7 @@ onMounted(() => {
<div class="py-3 px-4">
<NTabs type="segment" animated :on-update:value="handleTabChange">
<NTabPane name="HAZOP" tab="HAZOP分析矩阵">
<div class="flex flex-wrap items-start gap-6">
<div v-if="curMatrix" class="flex flex-wrap items-start gap-6">
<div class="shrink-0">
<table class="border-collapse text-center text-[11px]">
<thead>
@@ -855,9 +857,10 @@ onMounted(() => {
</p>
</div>
</div>
<div v-else class="py-5 text-center">暂无矩阵配置</div>
</NTabPane>
<NTabPane name="JSA" tab="JSA分析矩阵">
<div class="flex flex-wrap items-start gap-6">
<div v-if="curMatrix" class="flex flex-wrap items-start gap-6">
<div class="shrink-0">
<table class="border-collapse text-center text-[11px]">
<thead>
@@ -955,6 +958,7 @@ onMounted(() => {
</p>
</div>
</div>
<div v-else class="py-5 text-center">暂无矩阵配置</div>
</NTabPane>
</NTabs>
</div>