feat:设备管理
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
:columns="column"
|
||||
:cellStyle="setCellStyle"
|
||||
:cellHeaderStyle="setCellHeaderStyle"
|
||||
:formatter="columnFormatter"
|
||||
:data="listData"
|
||||
@detail="handleDetail"
|
||||
@pullUpLoading="pullUpLoadingAction"
|
||||
@@ -47,7 +48,8 @@ const column = reactive([
|
||||
{
|
||||
label: '维护保养日期',
|
||||
name: 'checkDate',
|
||||
width: 300
|
||||
width: 300,
|
||||
formatter: true
|
||||
},
|
||||
{
|
||||
name: 'operation',
|
||||
@@ -56,7 +58,14 @@ const column = reactive([
|
||||
renders: [{ name: '详情', func: 'detail' }]
|
||||
}
|
||||
])
|
||||
|
||||
function columnFormatter(row, column, rowIndex, columnIndex) {
|
||||
// 判断是哪一列需要格式化
|
||||
if (column.name === 'checkDate') {
|
||||
return nx.$helper.formateToDateTime(row.checkDate)
|
||||
}
|
||||
// 对于不需要特殊格式化的列,返回原始值
|
||||
return row[column.name]
|
||||
}
|
||||
const deviceId = ref('')
|
||||
const deviceText = ref('')
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user