| | |
| | | 浙江优步体育用品股份有限公司工序SOP |
| | | </div> |
| | | |
| | | <screenfull id="screenfull" class="right-menu-item hover-effect" /> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- sop--> |
| | | <el-dialog |
| | | title="浙江优步体育用品股份有限公司SOP预览" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div style="border: 5px solid #ccc;"> |
| | | <!-- <vue-office-pdf--> |
| | | <!-- :src="baseUrl+dialogSopForm.sop"--> |
| | | <!-- style="width: 100%;height: 80vh"--> |
| | | <!-- @rendered="renderedHandler"--> |
| | | <!-- @error="errorHandler"--> |
| | | <!-- />--> |
| | | <iframe |
| | | <div style="border: 5px solid #ccc;" class="sop-preview-container"> |
| | | |
| | | <!-- 图片类型预览 --> |
| | | <el-image |
| | | v-if="isImageType(dialogSopForm.sop)" |
| | | :src="baseUrl+dialogSopForm.sop" |
| | | fit="contain" |
| | | class="sop-image-preview" |
| | | /> |
| | | |
| | | <!-- PDF 或其他类型使用 iframe --> |
| | | <iframe |
| | | v-else |
| | | id="iframe" |
| | | :src="`${baseUrl}${dialogSopForm.sop}#view=FitH`" |
| | | style="width: 100%;height: 80vh" |
| | | frameborder="0" |
| | | /> |
| | | <!-- <pdf--> |
| | | <!-- v-for="item in numPages"--> |
| | | <!-- :key="item"--> |
| | | <!-- ref="pdf"--> |
| | | <!-- :src="baseUrl+dialogSopForm.sop"--> |
| | | <!-- :page="item"--> |
| | | <!-- style="display: inline-block;width: 800px;height: 500px;"--> |
| | | <!-- />--> |
| | | |
| | | <!-- :src="baseUrl+dialogSopForm.sop"--> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | // 引入VueOfficePdf组件 |
| | | import VueOfficePdf from '@vue-office/pdf' |
| | | import pdf from 'vue-pdf' |
| | | import Screenfull from '@/components/Screenfull' |
| | | |
| | | export default { |
| | | name: 'WorkOrderList', |
| | | components: { |
| | | VueOfficePdf, |
| | | Pagination |
| | | Pagination, |
| | | Screenfull |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | |
| | | sop: '', |
| | | v: '' |
| | | } |
| | | }, |
| | | // 判断是否为图片类型 |
| | | isImageType(filepath) { |
| | | if (!filepath) return false |
| | | const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp'] |
| | | const lowerPath = filepath.toLowerCase() |
| | | return imageExtensions.some(ext => lowerPath.endsWith(ext)) |
| | | }, |
| | | sopChange(val) { |
| | | this.dialogSopForm.v = this.sopArr.find(i => i.filepath === val).version |
| | |
| | | height: 26px !important; |
| | | } |
| | | } |
| | | |
| | | #screenfull{ |
| | | position: absolute; |
| | | right: 20px; |
| | | top:20px; |
| | | font-size: 28px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .sop-preview-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | min-height: 80vh; |
| | | } |
| | | |
| | | .sop-image-preview { |
| | | max-width: 100%; |
| | | max-height: 80vh; |
| | | display: block; |
| | | } |
| | | </style> |