riku
2024-11-21 af5a8d80bca9b8c08543238a370ea3c70c8c59b1
src/views/fysp/check/components/CompDevicePhoto.vue
@@ -1,5 +1,6 @@
<template>
  <FYImageSelectDialog
    v-loading="loading"
    title="设备图片"
    :typeList="typeList"
    :typeImgMap="typeImgMap"
@@ -10,6 +11,7 @@
import deviceApi from '@/api/fysp/deviceApi';
import { useCloned } from '@vueuse/core';
import { $fysp } from '@/api/index.js';
const loading = ref(true)
const props = defineProps({
  // 展示模式
  mode: {
@@ -64,6 +66,7 @@
    const topTypeId = deviceTopTypeElement.typeId;
    deviceImgMap.set(topTypeId, []);
    deviceApi.fetchDevices(props.subtask.sceneId, topTypeId).then((result) => {
      loading.value = true;
      // 标准化属性名
      for (let i = 0; i < result.data.length; i++) {
        var element = convertKeys(result.data[i]);
@@ -92,7 +95,7 @@
              deviceImgMap.get(topTypeId).push(newDevice);
            }
          }
        });
        }).finally(() => (loading.value = false));
      }
    });
  }