feat:设备管理
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ref, reactive } from 'vue'
|
||||
import nx from '@/nx'
|
||||
export const detailSchema = [
|
||||
{ label: '设备名称', value: 'deviceName' },
|
||||
{ label: '别名', value: 'alias' },
|
||||
@@ -11,12 +12,13 @@ export const column = reactive([
|
||||
{
|
||||
label: '点检人',
|
||||
name: 'checkUserName',
|
||||
width: 160
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
label: '点检日期',
|
||||
name: 'checkDate',
|
||||
width: 180
|
||||
width: 200,
|
||||
formatter: true
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
@@ -30,3 +32,11 @@ export const column = reactive([
|
||||
renders: [{ name: '详情', func: 'detail' }]
|
||||
}
|
||||
])
|
||||
export function columnFormatter(row, column, rowIndex, columnIndex) {
|
||||
// 判断是哪一列需要格式化
|
||||
if (column.name === 'checkDate') {
|
||||
return nx.$helper.formateToDateTime(row.checkDate)
|
||||
}
|
||||
// 对于不需要特殊格式化的列,返回原始值
|
||||
return row[column.name]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<up-sticky v-if="!isComponent">
|
||||
<navbar-back title="点检记录"> </navbar-back>
|
||||
<navbar-back title="巡检记录"> </navbar-back>
|
||||
</up-sticky>
|
||||
<uni-card spacing="0">
|
||||
<uni-section v-if="!isComponent" titleFontSize="20px" type="line" :title="deviceText"> </uni-section>
|
||||
@@ -15,6 +15,7 @@
|
||||
:cellStyle="setCellStyle"
|
||||
:cellHeaderStyle="setCellHeaderStyle"
|
||||
:data="listData"
|
||||
:formatter="columnFormatter"
|
||||
@detail="handleDetail"
|
||||
@pullUpLoading="pullUpLoadingAction"
|
||||
></zb-table>
|
||||
@@ -31,7 +32,7 @@ import { setCellHeaderStyle, setCellStyle } from '@/nx/config/zbTable'
|
||||
import DailyCheckDetailPopup from './detail.vue'
|
||||
import dailyCheckApi from '@/nx/api/dailyCheck'
|
||||
import { useListData } from '@/nx/hooks/usePageListData'
|
||||
import { column } from './dailyCheck.data'
|
||||
import { column, columnFormatter } from './dailyCheck.data'
|
||||
import nx from '@/nx'
|
||||
let props = defineProps({
|
||||
isComponent: {
|
||||
|
||||
Reference in New Issue
Block a user