| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | v-loading="loading" |
| | | title="设备图片" |
| | | :typeList="typeList" |
| | | :typeImgMap="typeImgMap" |
| | |
| | | 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: { |
| | |
| | | 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]); |
| | |
| | | deviceImgMap.get(topTypeId).push(newDevice); |
| | | } |
| | | } |
| | | }); |
| | | }).finally(() => (loading.value = false)); |
| | | } |
| | | }); |
| | | } |