LinkControlDesModal.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <a-modal v-model:visible="visible" :title="title" @ok="handleOk" @cancel="handleOk">
  3. <div>123</div>
  4. </a-modal>
  5. </template>
  6. <script lang="ts" setup>
  7. import { onMounted, ref, defineEmits, onUnmounted, computed } from 'vue';
  8. import { defHttp } from '/@/utils/http/axios';
  9. const getLinkAlarmInfo = (params?) => defHttp.post({ url: '/safety/ventanalyDeviceInfo/getLinkAlarmInfo', params });
  10. const emit = defineEmits(['close']);
  11. const props = withDefaults(
  12. defineProps<{
  13. deviceId?: string;
  14. modalIsShow?: boolean;
  15. modalTitle?: string;
  16. }>(),
  17. {
  18. deviceId: '',
  19. modalIsShow: false,
  20. modalTitle: '',
  21. }
  22. );
  23. const title = computed(() => props.modalTitle);
  24. const visible = computed(() => {
  25. // getLinkAlarmInfo({ id: props.deviceId + '' });
  26. return props.modalIsShow;
  27. });
  28. function handleOk() {
  29. emit('close');
  30. }
  31. onMounted(async () => {});
  32. onUnmounted(() => {});
  33. </script>
  34. <style scoped lang="less">
  35. @import '/@/design/theme.less';
  36. @import '/@/design/vent/modal.less';
  37. </style>