| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="dialogData.title" :visible.sync="visible" width="900px" center :before-close="close"> |
| | | <el-dialog :title="dialogData.title" top="30px" :visible.sync="visible" width="900px" center :before-close="close"> |
| | | <div slot="title" class="titBox"> |
| | | <div>{{ parentFormData.allocationNum }}</div> |
| | | <div>{{ dialogData.title }}</div> |
| | |
| | | v-if="file.fileType ===1" |
| | | style="width: 100px; height: 100px" |
| | | :src="file.url" |
| | | :preview-src-list="fileBaseList" |
| | | :preview-src-list="getPreviewImages(file.id,fileBaseList)" |
| | | :initial-index="index" |
| | | /> |
| | | <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> |
| | |
| | | v-if="file.fileType ===1" |
| | | style="width: 100px; height: 100px" |
| | | :src="file.url" |
| | | :preview-src-list="fileChangeList" |
| | | :preview-src-list="getPreviewImages(file.id,fileChangeList)" |
| | | :initial-index="index" |
| | | /> |
| | | <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> |
| | |
| | | v-if="file.fileType ===1" |
| | | style="width: 100px; height: 100px" |
| | | :src="file.url" |
| | | :preview-src-list="fileApproveList" |
| | | :preview-src-list="getPreviewImages(file.id,fileApproveList)" |
| | | :initial-index="index" |
| | | /> |
| | | <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> |
| | |
| | | v-if="file.fileType ===1" |
| | | style="width: 100px; height: 100px" |
| | | :src="file.url" |
| | | :preview-src-list="fileDelayList" |
| | | :preview-src-list="getPreviewImages(file.id,fileDelayList)" |
| | | :initial-index="index" |
| | | /> |
| | | <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> |
| | |
| | | return { |
| | | centerDialogVisible: true, |
| | | workForme: { |
| | | isChange: '', |
| | | isChange: 0, |
| | | changeName: '', |
| | | changeDescribe: '' |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | getPreviewImages(index, list) { |
| | | let startIndex = 0 |
| | | const chechList = _.cloneDeep(list) |
| | | chechList.forEach((item, i) => { |
| | | const str = item.substring(item.lastIndexOf('/') + 1) |
| | | if (Number(str) === Number(index)) { |
| | | startIndex = i |
| | | } |
| | | }) |
| | | console.log('startIndex', startIndex) |
| | | var imgList = [...list] |
| | | if (index === 0) return imgList |
| | | var start = imgList.splice(startIndex) |
| | | var remain = imgList.splice(0, startIndex) |
| | | return start.concat(remain) |
| | | }, |
| | | openVideo(item) { |
| | | console.log('item', item) |
| | | this.dialogImageUrl = item.url |