| | |
| | | <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)"> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 整改信息 --> |
| | | <div v-if="dialogData.pageType ==='detail' && parentFormData.state >=30"> |
| | | <div v-if="(dialogData.pageType ==='detail'||dialogData.pageType ==='approve' )&& parentFormData.state >=30"> |
| | | <el-row class="rectificationContent"> |
| | | <el-col :span="12"><div class="grid-content bg-purple" /> |
| | | <el-descriptions title="整改信息" :column="parseInt('2')"> |
| | |
| | | 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 |
| | |
| | | searchthisFileList(newVal) { |
| | | if (newVal.fileBaseList && newVal.fileBaseList.length > 0) { |
| | | newVal.fileBaseList.forEach(item => { |
| | | // const srcApi = item.fileType === 1 ? api + 'preview/' : api + 'preview/cover/' |
| | | this.fileBaseList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | if (item.fileType === 1) { |
| | | this.fileBaseList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | } |
| | | |
| | | this.fileBaseListCover.push({ |
| | | url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, |
| | | fileType: item.fileType, |
| | |
| | | } |
| | | if (newVal.fileChangeList && newVal.fileChangeList.length > 0) { |
| | | newVal.fileChangeList.forEach(item => { |
| | | this.fileChangeList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | if (item.fileType === 1) { |
| | | this.fileChangeList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | } |
| | | this.fileChangeListCover.push({ |
| | | url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, |
| | | fileType: item.fileType, |
| | |
| | | } |
| | | if (newVal.fileApproveList && newVal.fileApproveList.length > 0) { |
| | | newVal.fileApproveList.forEach(item => { |
| | | if (item.fileType === 1) { |
| | | this.fileApproveList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | } |
| | | this.fileApproveList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | this.fileApproveListCover.push({ |
| | | url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, |
| | |
| | | } |
| | | if (newVal.fileList && newVal.fileList.length > 0) { |
| | | newVal.fileList.forEach(item => { |
| | | if (item.fileType === 1) { |
| | | this.fileDelayList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | } |
| | | this.fileDelayList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // 原图 |
| | | this.fileDelayListCover.push({ |
| | | url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, |