| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <el-dialog
- v-model="dialogVisible"
- width="60%"
- height="80%"
- class="picture-preview-wrap v-dialog"
- :show-close="false"
- top="10vh"
- append-to-body
- >
- <album-carousel-item v-if="images" :farmId="farmId" :images="images" :lock="lock"></album-carousel-item>
- </el-dialog>
- </template>
- <script setup>
- import { ref, computed, onMounted, onUnmounted } from "vue";
- import "./cacheImg.js"
- import AlbumCarouselItem from "./albumCarouselItem";
- import {dateFormat} from "@/utils/date_util.js"
- import eventBus from "@/api/eventBus";
- const lock = ref(false);
- const farmId = ref(766);
- const images = ref(null);
- const dialogVisible = ref(false)
- // 获取当前日期
- const currentDate = new Date();
- // 获取当前日期的前一个月
- const startDate = new Date(currentDate);
- startDate.setMonth(currentDate.getMonth() - 1);
- // 格式化日期
- const formattedStartDate = dateFormat(startDate, 'YY-mm-dd');
- const formattedEndDate = dateFormat(currentDate, 'YY-mm-dd');
- eventBus.on("click:point",function({farmId,sampleId}){
- let params = {sampleId,farmId}
- VE_API.miniimage.list(params).then(res => {
- if(res.code === 0){
- images.value = res.data
- dialogVisible.value = true
- }
- })
- })
- </script>
- <style lang="scss" scoped>
- @import "src/styles/index";
- </style>
|