From 021d78a1f6fcfcab2f1ddfc1030c378c8b057507 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期一, 12 五月 2025 11:24:24 +0800 Subject: [PATCH] art: 设备管理-我的待办-点检-增加作业指导图片预览 --- src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue index c99495f..2ae88f7 100644 --- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue +++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue @@ -65,6 +65,11 @@ <a-input v-model="tableRowRecord.operator_dictText" readOnly/> </a-form-model-item> </a-col> + <a-col :span='span'> + <a-form-model-item label="浣滀笟鎸囧"> + <a-button @click="handlePreview(tableRowRecord.referenceFile)" type="primary" icon="eye">棰勮</a-button> + </a-form-model-item> + </a-col> </a-row> <a-row> @@ -190,6 +195,8 @@ </template> </a-form-model> </a-spin> + + <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> </j-modal> </template> @@ -309,7 +316,8 @@ selectedRowKeys: [], disableSubmit: false, activeTabKey: '1', - title: '' + title: '', + fileUrl: '', } }, computed: { @@ -414,10 +422,11 @@ }) }, - autoCompleteForm({ standardName, maintenancePeriod, standardCode }) { + autoCompleteForm({ standardName, maintenancePeriod, standardCode, referenceFile }) { this.$set(this.tableRowRecord, 'standardName', standardName) this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod) this.$set(this.tableRowRecord, 'standardCode', standardCode) + this.$set(this.tableRowRecord, 'referenceFile', referenceFile) }, // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉 @@ -482,6 +491,19 @@ }) } }, + handlePreview: function (fileJson) { + if(fileJson) { + let obj = JSON.parse(fileJson) + if(obj.filePath) { + this.$refs.lxFilePreview.preview(obj.filePath); + }else { + that.$message.warning('娌℃湁涓婁紶鎿嶄綔鎸囧鍥剧墖') + } + }else { + that.$message.warning('娌℃湁涓婁紶鎿嶄綔鎸囧鍥剧墖') + } + + }, } } </script> -- Gitblit v1.9.3