|
|
@@ -3,61 +3,75 @@
|
|
|
<SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
|
|
|
|
|
|
<div ref="pictureAreaBox" class="main">
|
|
|
- <div class="view-area">
|
|
|
- <!-- 播放列表 -->
|
|
|
- <div v-if="'list' === data.property.view_method">
|
|
|
- <el-carousel
|
|
|
- ref="pictureCarousel"
|
|
|
- indicator-position="none"
|
|
|
- :autoplay="false"
|
|
|
- :style="{ height: `${elementHeight - 144 - 32}px` }"
|
|
|
- @change="handleChange"
|
|
|
+ <div class="view-area" :style="data.file_list.length === 1 ? { justifyContent: 'center' } : {}">
|
|
|
+ <template v-if="1 !== data.file_list.length">
|
|
|
+ <!-- 播放列表 -->
|
|
|
+ <div v-if="'list' === data.property.view_method">
|
|
|
+ <el-carousel
|
|
|
+ ref="pictureCarousel"
|
|
|
+ indicator-position="none"
|
|
|
+ :autoplay="false"
|
|
|
+ :style="{ height: `${elementHeight - 144 - 32}px` }"
|
|
|
+ @change="handleChange"
|
|
|
+ >
|
|
|
+ <el-carousel-item v-for="(file, i) in data.file_list" :key="i">
|
|
|
+ <el-image
|
|
|
+ :id="file.file_id"
|
|
|
+ :src="file.file_url"
|
|
|
+ fit="contain"
|
|
|
+ :preview-src-list="data.file_list.map((x) => x.file_url)"
|
|
|
+ />
|
|
|
+ </el-carousel-item>
|
|
|
+ </el-carousel>
|
|
|
+ <div class="container-box">
|
|
|
+ <button v-if="viewLeftRightBtn" class="arrow left" @click="scroll(-1)">
|
|
|
+ <i class="el-icon-arrow-left"></i>
|
|
|
+ </button>
|
|
|
+ <ul ref="container" class="view-list-bottom" :style="{ width: elementWidth + 'px' }">
|
|
|
+ <li v-for="(file, i) in data.file_list" :key="i" @click="handleIndicatorClick(i)">
|
|
|
+ <el-image :id="file.file_id" :src="file.file_url" fit="contain" />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <button v-if="viewLeftRightBtn" class="arrow right" @click="scroll(1)">
|
|
|
+ <i class="el-icon-arrow-right"></i>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-for="file in data.file_list"
|
|
|
+ v-else
|
|
|
+ :key="file.file_id"
|
|
|
+ class="alone-pic-area"
|
|
|
+ :style="getVideoItemStyle()"
|
|
|
>
|
|
|
- <el-carousel-item v-for="(file, i) in data.file_list" :key="i">
|
|
|
- <el-image
|
|
|
- :id="file.file_id"
|
|
|
- :src="file.file_url"
|
|
|
- fit="contain"
|
|
|
- :preview-src-list="data.file_list.map((x) => x.file_url)"
|
|
|
- />
|
|
|
- </el-carousel-item>
|
|
|
- </el-carousel>
|
|
|
- <div class="container-box">
|
|
|
- <button v-if="viewLeftRightBtn" class="arrow left" @click="scroll(-1)">
|
|
|
- <i class="el-icon-arrow-left"></i>
|
|
|
- </button>
|
|
|
- <ul ref="container" class="view-list-bottom" :style="{ width: elementWidth + 'px' }">
|
|
|
- <li v-for="(file, i) in data.file_list" :key="i" @click="handleIndicatorClick(i)">
|
|
|
- <el-image :id="file.file_id" :src="file.file_url" fit="contain" />
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <button v-if="viewLeftRightBtn" class="arrow right" @click="scroll(1)">
|
|
|
- <i class="el-icon-arrow-right"></i>
|
|
|
- </button>
|
|
|
+ <el-image
|
|
|
+ :id="file.file_id"
|
|
|
+ :src="file.file_url"
|
|
|
+ fit="contain"
|
|
|
+ :preview-src-list="data.file_list.map((x) => x.file_url)"
|
|
|
+ :style="{ height: elementHeight + 'px' }"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="'list' === data.property.view_method && isEnable(data.property.view_memo)" class="memo-area">
|
|
|
+ <div v-for="(file, i) in data.file_info_list" :key="i">
|
|
|
+ <div v-if="curPictureMemoIndex === i" class="title-div">{{ file.title ?? file.title }}</div>
|
|
|
+ <div v-if="curPictureMemoIndex === i" class="memo-div">{{ file.intro ?? file.intro }}</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- v-for="file in data.file_list"
|
|
|
- v-else
|
|
|
- :key="file.file_id"
|
|
|
- class="alone-pic-area"
|
|
|
- :style="getVideoItemStyle()"
|
|
|
- >
|
|
|
- <el-image
|
|
|
- :id="file.file_id"
|
|
|
- :src="file.file_url"
|
|
|
- fit="contain"
|
|
|
- :preview-src-list="data.file_list.map((x) => x.file_url)"
|
|
|
- :style="{ height: elementHeight + 'px' }"
|
|
|
- />
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-if="'list' === data.property.view_method && isEnable(data.property.view_memo)" class="memo-area">
|
|
|
- <div v-for="(file, i) in data.file_info_list" :key="i">
|
|
|
- <div v-if="curPictureMemoIndex === i" class="title-div">{{ file.title ?? file.title }}</div>
|
|
|
- <div v-if="curPictureMemoIndex === i" class="memo-div">{{ file.intro ?? file.intro }}</div>
|
|
|
+ </template>
|
|
|
+ <!-- 独立排放 -->
|
|
|
+ <template v-else>
|
|
|
+ <div v-for="file in data.file_list" :key="file.file_id">
|
|
|
+ <el-image
|
|
|
+ :id="file.file_id"
|
|
|
+ :src="file.file_url"
|
|
|
+ fit="contain"
|
|
|
+ :preview-src-list="data.file_list.map((x) => x.file_url)"
|
|
|
+ :style="{ height: elementHeight + 'px' }"
|
|
|
+ />
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|