Prechádzať zdrojové kódy

设备详情加检测证书

yanghao 19 hodín pred
rodič
commit
2afb744ba1

+ 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,
   () => {