54 lines
1.0 KiB
Vue
54 lines
1.0 KiB
Vue
|
|
<template>
|
||
|
|
<div class="result_box">
|
||
|
|
|
||
|
|
<el-image v-for="url in resultImgs" class="img_box" :src="url" :max-scale="7" :min-scale="0.2"
|
||
|
|
:preview-src-list="resultImgs" show-progress :initial-index="4" />
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup lang="ts">
|
||
|
|
import { ref, watch, toRefs, onMounted, computed } from 'vue'
|
||
|
|
import { resultgraph } from "@/api/liswork/work/LisWork";
|
||
|
|
|
||
|
|
|
||
|
|
const props = defineProps({
|
||
|
|
// 主键
|
||
|
|
queryParams: {
|
||
|
|
type: Object,
|
||
|
|
default: {}
|
||
|
|
},
|
||
|
|
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
// 解构 props
|
||
|
|
const { queryParams } = toRefs(props);
|
||
|
|
|
||
|
|
const resultImgs = ref([])
|
||
|
|
|
||
|
|
const getResultGraph = () => {
|
||
|
|
resultgraph(queryParams.value).then((res: any) => {
|
||
|
|
if (res.code == 0) {
|
||
|
|
resultImgs.value = res.data?.map((item: any) => { return "data:image/png;base64," + item })
|
||
|
|
}
|
||
|
|
})
|
||
|
|
};
|
||
|
|
|
||
|
|
watch(() => props.queryParams, (newValue) => {
|
||
|
|
getResultGraph()
|
||
|
|
}, { immediate: true })
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped lang="scss">
|
||
|
|
.result_box {
|
||
|
|
height: 82vh;
|
||
|
|
overflow-y: auto;
|
||
|
|
background-color: #fffbf0;
|
||
|
|
|
||
|
|
.img_box {
|
||
|
|
// box-shadow: ;
|
||
|
|
margin-right: 20px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|