联教编辑报错
This commit is contained in:
@@ -61,13 +61,15 @@
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="tableData" stripe border highlight-current-row>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="bh" label="编号" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="mc" label="名称" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="pxlx" label="培训类型" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="pxcc" label="培训层次" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="bb" label="版本" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="xgsj" label="修改时间" width="170" show-overflow-tooltip />
|
||||
<el-table-column label="停用" width="80" align="center">
|
||||
<el-table-column prop="bh" label="编号" width="150" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="mc" label="名称" width="200" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pxlx" label="培训类型" width="200" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pxcc" label="培训层次" width="200" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="bb" label="版本" width="200" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="修改时间" width="200" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="{ row }">{{ fmtDateTime(row.xgsj) || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="停用" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
:type="scope.row.ty === 1 || scope.row.ty === true ? 'danger' : 'success'"
|
||||
@@ -78,7 +80,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" icon="el-icon-view" @click="handleView(scope.row)">详情</el-button>
|
||||
<el-button type="text" size="small" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
@@ -240,7 +242,7 @@
|
||||
<el-descriptions-item label="培训类型">{{ viewForm.pxlx || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="培训层次">{{ viewForm.pxcc || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="版本">{{ viewForm.bb || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="修改时间">{{ viewForm.xgsj || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="修改时间">{{ fmtDateTime(viewForm.xgsj) || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前学期考试不及格门数下限">{{ formatValue(viewForm.dqxqksbjgmsxx) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前学期考试不及格门数上限">{{ formatValue(viewForm.dqxqksbjgmssx) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前学期考查不及格门数下限">{{ formatValue(viewForm.dqxqkcbjgmsxx) }}</el-descriptions-item>
|
||||
@@ -514,6 +516,14 @@ export default {
|
||||
/** 空值显示占位符 */
|
||||
formatValue(val) {
|
||||
return val !== null && val !== undefined ? val : '-'
|
||||
},
|
||||
|
||||
/** 统一格式化后端 LocalDateTime(去除 T、截断到秒) */
|
||||
fmtDateTime(val) {
|
||||
if (val === null || val === undefined || val === '') {
|
||||
return ''
|
||||
}
|
||||
return String(val).replace('T', ' ').slice(0, 19)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user