Commit 3f7cfa5d authored by Data Governance Dev's avatar Data Governance Dev

fix(web): 字段长度异常 tab 二轮修复 — 合并展示列 + 表格撑满

上一轮改完后,用户截图反馈:
  - 表名/字段名/国家标准/规则 4 列内容不显示(show-overflow-tooltip + 窄列下被截断到看不见)
  - 表注释、字段注释两个数据字段没列展示
  - 表格没铺满 tab 区域,右边大量空白

修复(6 列合并布局,总宽 1240px):
  - 表名 / 表注释       width=260   模板展示:粗体表名 + 小字表注释(无则斜体)
  - 字段名 / 字段注释   width=240   模板展示:粗体字段名 + 小字字段注释
  - 长度 (实际/标准)    width=130   模板:实际值红色加粗 / 灰色 / 标准值
  - 浪费字节           width=90    模板渲染
  - 国家标准 / 规则    width=320   模板:粗体标准号 + 小字规则说明
  - 建议               width=200   直接 prop
- el-table 加 style="width: 100%",强制撑满 tab 容器宽度
- 去掉全部 show-overflow-tooltip,避免窄列截断到不可见
- max-height=560,行多时纵向滚动

数据字段 table_comment/column_comment 在 step6 产出里就有,无需改后端。
parent 984dadff
...@@ -459,22 +459,44 @@ ...@@ -459,22 +459,44 @@
<!-- 字段长度异常 --> <!-- 字段长度异常 -->
<el-tab-pane label="字段长度异常" name="length"> <el-tab-pane label="字段长度异常" name="length">
<el-alert :title="`${jobResult.sections.length_issues?.summary?.total_issues || 0} 条异常,应用 ${jobResult.sections.length_issues?.summary?.rules_applied || 0} 条规则`" type="warning" :closable="false" /> <el-alert :title="`${jobResult.sections.length_issues?.summary?.total_issues || 0} 条异常,应用 ${jobResult.sections.length_issues?.summary?.rules_applied || 0} 条规则`" type="warning" :closable="false" />
<el-table :data="jobResult.sections.length_issues?.issues || []" stripe size="small" style="margin-top: 12px" max-height="560"> <el-table :data="jobResult.sections.length_issues?.issues || []" stripe size="small" style="margin-top: 12px; width: 100%" max-height="560">
<el-table-column prop="table_name" label="表名" min-width="140" show-overflow-tooltip /> <el-table-column label="表名 / 表注释" width="260">
<el-table-column prop="column_name" label="字段名" min-width="130" show-overflow-tooltip /> <template #default="{ row }">
<el-table-column label="长度 (实际/标准)" min-width="130" align="center"> <div>
<strong style="color: #303133">{{ row.table_name }}</strong>
<div v-if="row.table_comment" class="muted" style="font-size: 12px; margin-top: 2px">{{ row.table_comment }}</div>
<div v-else class="muted" style="font-size: 12px; margin-top: 2px; font-style: italic">(无表注释)</div>
</div>
</template>
</el-table-column>
<el-table-column label="字段名 / 字段注释" width="240">
<template #default="{ row }">
<div>
<strong style="color: #303133">{{ row.column_name }}</strong>
<div v-if="row.column_comment" class="muted" style="font-size: 12px; margin-top: 2px">{{ row.column_comment }}</div>
<div v-else class="muted" style="font-size: 12px; margin-top: 2px; font-style: italic">(无字段注释)</div>
</div>
</template>
</el-table-column>
<el-table-column label="长度 (实际/标准)" width="130" align="center">
<template #default="{ row }"> <template #default="{ row }">
<span style="color: #f56c6c; font-weight: 600">{{ row.actual_length }}</span> <span style="color: #f56c6c; font-weight: 600">{{ row.actual_length }}</span>
<span class="muted"> / </span> <span class="muted"> / </span>
<span>{{ row.required_length }}</span> <span>{{ row.required_length }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="wasted_bytes_per_row" label="浪费字节" width="90" align="right"> <el-table-column label="浪费字节" width="90" align="right">
<template #default="{ row }">{{ row.wasted_bytes_per_row }}</template> <template #default="{ row }">{{ row.wasted_bytes_per_row }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="standard" label="国家标准" min-width="120" show-overflow-tooltip /> <el-table-column label="国家标准 / 规则" width="320">
<el-table-column prop="rule" label="规则" min-width="160" show-overflow-tooltip /> <template #default="{ row }">
<el-table-column prop="suggestion" label="建议" min-width="160" show-overflow-tooltip /> <div>
<strong style="color: #303133">{{ row.standard }}</strong>
<div class="muted" style="font-size: 12px; margin-top: 2px">{{ row.rule }}</div>
</div>
</template>
</el-table-column>
<el-table-column prop="suggestion" label="建议" width="200" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment