fix(richedit): 修复表格中空数据未显示占位符的问题

为信号规则和媒体来源列添加空数据检查,当数据为空时显示"-"作为占位符
This commit is contained in:
zzp 2025-11-11 20:18:22 +08:00
parent 5ab6a5dd39
commit 54f794e22a
2 changed files with 18 additions and 5 deletions

View File

@ -219,13 +219,23 @@
<el-table-column label="信号规则" align="center" width="120"> <el-table-column label="信号规则" align="center" width="120">
<template v-slot="scope"> <template v-slot="scope">
<div v-for="item in scope.row.ruleName" :key="item" class="label_item"> <div v-if="scope.row.ruleName && scope.row.ruleName.length > 0">
{{ item }} <div v-for="item in scope.row.ruleName" :key="item" class="label_item">
{{ item }}
</div>
</div> </div>
<div v-else>-</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="媒体来源" align="center" width="120" prop="sourceName"></el-table-column> <el-table-column label="媒体来源" align="center" width="120">
<template v-slot="scope">
<div v-if="scope.row.sourceName">
{{ scope.row.sourceName }}
</div>
<div v-else>-</div>
</template>
</el-table-column>
<el-table-column prop="status" align="center" width="120"> <el-table-column prop="status" align="center" width="120">
<template #header> <template #header>
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">

View File

@ -348,9 +348,12 @@
<el-table-column label="信号规则" align="center" width="120" v-if="Session.get('userInfoLocal').userType == '00'"> <el-table-column label="信号规则" align="center" width="120" v-if="Session.get('userInfoLocal').userType == '00'">
<template v-slot="scope"> <template v-slot="scope">
<div v-for="item in scope.row.ruleName" :key="item" class="label_item"> <div v-if="scope.row.ruleName && scope.row.ruleName.length > 0">
{{ item }} <div v-for="item in scope.row.ruleName" :key="item" class="label_item">
{{ item }}
</div>
</div> </div>
<div v-else>-</div>
</template> </template>
</el-table-column> </el-table-column>