fanlocal-history.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div class="alarm-history">
  3. <template v-if="globalConfig.History_Type == 'remote'">
  4. <HistoryTable
  5. :columns-type="`${selectDatas.deviceType}`"
  6. :device-type="`${devicekide}`"
  7. designScope="fanlocal-history"
  8. :scroll="scroll"
  9. />
  10. </template>
  11. <template v-else>
  12. <HistoryTable1 class="w-100% h-100%" :device-code="`${devicekide}`" :scroll="scroll" dict-code="fanlocal_dict" />
  13. </template>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. import { onBeforeMount, ref, watch, onMounted, nextTick, defineAsyncComponent, reactive, onUnmounted, inject, unref } from 'vue';
  18. import HistoryTable from '../../comment/HistoryTable.vue'
  19. import HistoryTable1 from '../../../../vent/comment/history/HistoryTable.vue'
  20. const props = defineProps({
  21. selectData: {
  22. type: Object,
  23. default: () => {
  24. return {}
  25. }
  26. },
  27. devicekide:{
  28. type:String,
  29. default:'',
  30. },
  31. globalConfig:{
  32. type:Object,
  33. default:()=>{
  34. return {}
  35. },
  36. }
  37. });
  38. let selectDatas = reactive({})
  39. let scroll = reactive({
  40. y: 700,
  41. });
  42. watch(() => props.selectData, (newS, oldS) => {
  43. selectDatas = Object.assign({}, newS)
  44. }, {
  45. immediate: true,
  46. deep: true
  47. })
  48. </script>
  49. <style lang="less" scoped>
  50. .alarm-history {
  51. width: 100%;
  52. height: 730px;
  53. position: fixed;
  54. top: 100px;
  55. }
  56. </style>