tunFaceHandleHistory.vue 884 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class="handle-history">
  3. <HandlerHistoryTable v-if="refresh" columns-type="operator_history" :device-type="type"
  4. :sys-id="deviceId"
  5. designScope="juejin_history" :scroll="{ y: 650 }"/>
  6. </div>
  7. </template>
  8. <script setup lang="ts">
  9. import { watch, ref, nextTick } from 'vue'
  10. import HandlerHistoryTable from '../../comment/WorkFaceHandlerHistoryTable.vue';
  11. const props = defineProps({
  12. deviceType: {
  13. type: String,
  14. required: true,
  15. },
  16. deviceId: {
  17. type: String,
  18. required: true,
  19. }
  20. })
  21. const type = ref(props.deviceType)
  22. const refresh = ref(true)
  23. watch(() => props.deviceType, (newVal) => {
  24. type.value = newVal
  25. refresh.value = false
  26. nextTick(() => {
  27. refresh.value = true
  28. })
  29. })
  30. </script>
  31. <style lang="less" scoped>
  32. .handle-history {
  33. width: 100%;
  34. pointer-events: auto;
  35. }
  36. </style>