| | |
| | | <div class="info-item"> |
| | | <div class="info-label">报备材料</div> |
| | | <div class="info-list"> |
| | | <div style="margin-bottom: 8px" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file"> |
| | | <el-link type="primary" @click="handleDownload(file)"> |
| | | <div style="margin-bottom: 8px" v-for="file in scope.row.reportMaterials!=null ? scope.row.reportMaterials.split(',') : scope.row.reportMaterials" :key="file"> |
| | | <el-image |
| | | v-if="isImageFile(file)" |
| | | :src="getPreview(file)" |
| | | :preview-src-list="[getPreview(file)]" |
| | | fit="cover" |
| | | class="material-preview" |
| | | style="width: 100px; height: 100px; margin: 5px;" |
| | | > |
| | | </el-image> |
| | | <el-link v-else type="primary" @click="handleDownload(file)"> |
| | | {{file.match(/\/([^\/]*)$/)[1]}} |
| | | </el-link> |
| | | </div> |
| | |
| | | <div class="content" v-html="getHtmlContent(record.reportContent)"></div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="报备材料"> |
| | | <el-link |
| | | <div |
| | | v-for="item in record.reportMaterials != null ? record.reportMaterials.split(',') : record.reportMaterials" |
| | | :underline="false" type="primary" :key="item" @click="handleDownload(item)"> |
| | | {{ item.substring(item.lastIndexOf("/") + 1) }} |
| | | </el-link> |
| | | :key="item"> |
| | | <el-image |
| | | v-if="isImageFile(item)" |
| | | :src="getPreview(item)" |
| | | :preview-src-list="[getPreview(item)]" |
| | | fit="cover" |
| | | style="width: 100px; height: 100px; margin: 5px;"> |
| | | </el-image> |
| | | <el-link |
| | | v-else |
| | | :underline="false" type="primary" @click="handleDownload(item)"> |
| | | {{ item.substring(item.lastIndexOf("/") + 1) }} |
| | | </el-link> |
| | | </div> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | |
| | | <span v-html="auditingForm.reportContent"></span> |
| | | </el-form-item> |
| | | <el-form-item label="报备材料"> |
| | | <el-link |
| | | <!-- 添加空行 --> |
| | | <div class="material-spacer">{{''}}</div> |
| | | <div |
| | | v-for="item in auditingForm.reportMaterials != null ? auditingForm.reportMaterials.split(',') : auditingForm.reportMaterials" |
| | | :underline="false" type="primary" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) |
| | | }}</el-link> |
| | | :key="item"> |
| | | <el-image |
| | | v-if="isImageFile(item)" |
| | | :src="getPreview(item)" |
| | | :preview-src-list="[getPreview(item)]" |
| | | fit="cover" |
| | | style="width: 100px; height: 100px; margin: 5px;"> |
| | | </el-image> |
| | | <el-link |
| | | v-else |
| | | :underline="false" type="primary" @click="handleDownload(item)"> |
| | | {{ item.substring(item.lastIndexOf("/") + 1) }} |
| | | </el-link> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | <el-button type="primary" @click="auditingSubmit">审 核</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | getPreview(url) { |
| | | // 使用全局配置的图片前缀 |
| | | return this.$img + url; |
| | | }, |
| | | isImageFile(url) { |
| | | const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp']; |
| | | return imageExtensions.some(ext => |
| | | url.toLowerCase().endsWith(ext) |
| | | ); |
| | | }, |
| | | getHtmlContent(content) { |
| | | if (content) { |
| | | return content |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .material-spacer { |
| | | height: 50px; /* 可以调整空行的高度 */ |
| | | } |
| | | .content { |
| | | height: 100px; |
| | | max-height: 300px; |