<template>
    <el-table :data="tableData" border stripe  height="335" style="overflow-y: auto;">
        <el-table-column prop="time" label="时间" width="100">
            <template #default="scope">
              {{ scope.row.time ? scope.row.time.slice(10, 19) : '' }}
          </template>
        </el-table-column>
        <el-table-column prop="name" label="事件"></el-table-column>
        <el-table-column prop="deviceName" label="设备" width="200"></el-table-column>
        <el-table-column prop="statue" label="状态" width="100">
          <template #default="scope">
            <span v-if="scope.row.statue !=1">自动恢复</span>
            <el-button type="text"  style="color: #409eff" @click.prevent="Update(scope.row)" v-if="scope.row.statue == 1">
              确定
            </el-button>
          </template>
        </el-table-column>
    </el-table>
</template>
<script setup>
import {  defineComponent, onMounted, ref, watch } from 'vue'
const props = defineProps({
  data: {
    type: Object,
    default: null,
  },
});
const tableData = ref(props.data)
</script>
<style lang="scss" scoped>

</style>