|
|
@ -14,6 +14,7 @@ import { socket } from 'libs/socket' |
|
|
|
import { cmdNameMap, formatDateTime } from 'libs/utils' |
|
|
|
import { useHomeStore } from 'stores/homeStore' |
|
|
|
import { useSystemStore } from 'stores/systemStore' |
|
|
|
import { ImageViewer as TImageViewer } from 'tdesign-mobile-vue' |
|
|
|
import { onMounted, onUnmounted, provide, ref } from 'vue' |
|
|
|
|
|
|
|
const homeStore = useHomeStore() |
|
|
@ -325,6 +326,16 @@ const photoVisible = ref(false) |
|
|
|
const savePhoto = () => { |
|
|
|
photoVisible.value = true |
|
|
|
} |
|
|
|
|
|
|
|
const previewVisible = ref(false) |
|
|
|
const photos = ref([]) |
|
|
|
const previewHandle = () => { |
|
|
|
if (!photoUrl.value) { |
|
|
|
return |
|
|
|
} |
|
|
|
photos.value = [photoUrl.value] |
|
|
|
previewVisible.value = true |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
@ -341,11 +352,8 @@ const savePhoto = () => { |
|
|
|
<div class="image-box"> |
|
|
|
<el-image |
|
|
|
:src="photoUrl" |
|
|
|
:zoom-rate="1.2" |
|
|
|
:max-scale="7" |
|
|
|
:min-scale="0.2" |
|
|
|
:preview-src-list="[photoUrl]" |
|
|
|
fit="contain" |
|
|
|
@click="previewHandle" |
|
|
|
> |
|
|
|
<template #error> |
|
|
|
<div class="image-slot"> |
|
|
@ -490,6 +498,7 @@ const savePhoto = () => { |
|
|
|
<StartHeat v-if="startHeatVisible" @ok="startHeatVisible = false" @cancel="startHeatVisible = false" /> |
|
|
|
<AddLiquid v-if="addLiquidVisible" @ok="addLiquidVisible = false" @cancel="addLiquidVisible = false" /> |
|
|
|
<FillSolution v-if="fillSolutionVisible" @ok="fillSolutionVisible = false" @cancel="fillSolutionVisible = false" /> |
|
|
|
<TImageViewer v-model:images="photos" v-model:visible="previewVisible" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|