yanghao 1 день назад
Родитель
Сommit
2afb744ba1
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      src/views/pms/device/DeviceMaintainRecord.vue

+ 10 - 0
src/views/pms/device/DeviceMaintainRecord.vue

@@ -263,6 +263,7 @@ type MaintainRecordRow = IotMaintainVO & {
 }
 
 const { ZmTable, ZmTableColumn } = useTableComponents<MaintainRecordRow>()
+const { push } = useRouter()
 const loading = ref(false)
 const list = ref<MaintainRecordRow[]>([])
 const total = ref(0)
@@ -318,6 +319,15 @@ const formatRecordTime = (value?: Date | string | number) => {
   return value ? formatDate(value as Date) : '-'
 }
 
+const view = (row: MaintainRecordRow) => {
+  if (!row?.id) return
+
+  push({
+    name: 'MaintainDetail',
+    params: { id: row.id }
+  })
+}
+
 watch(
   () => props.deviceId,
   () => {