fix:物料产品管理中SIP和SOP图片预览功能问题解决

This commit is contained in:
zhangxuanming 2024-12-23 15:08:33 +08:00
parent f434915779
commit 3837511fba

View File

@ -36,7 +36,7 @@
</el-form-item> </el-form-item>
<el-form-item label="图片"> <el-form-item label="图片">
<ImageUpload :limit="1" :value="form.sipUrl" :fileSize="5" @onUploaded="handleImgUplaoded" @onRemoved="handleImgRemoved" ></ImageUpload> <ImageUpload :limit="1" :value="form.sipUrl" :fileSize="5" @onUploaded="handleImgUplaoded" @onRemoved="handleImgRemoved" ></ImageUpload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -49,7 +49,7 @@
<el-card shadow="hover" :body-style="{pading: '10px'}"> <el-card shadow="hover" :body-style="{pading: '10px'}">
<el-popover> <el-popover>
<img :src="sipList[index].sipUrl" slot="reference" class="image"/> <img :src="sipList[index].sipUrl" slot="reference" class="image"/>
<el-image class="imagePreview" :src="sipList[index].sopUrl" :preview-src-list="imageList"></el-image> <el-image class="imagePreview" :src="sipList[index].sipUrl" :preview-src-list="imageList"></el-image>
</el-popover> </el-popover>
<div style="text-align:center;padding-top:12px"> <div style="text-align:center;padding-top:12px">
<span> <span>
@ -78,7 +78,7 @@ export default{
return { return {
title: "新增SIP信息", title: "新增SIP信息",
loading: true, loading: true,
open: false, open: false,
// //
form: {}, form: {},
// //
@ -86,16 +86,16 @@ export default{
itemId: [ itemId: [
{ required: true, message: "物料产品ID不能为空", trigger: "blur" } { required: true, message: "物料产品ID不能为空", trigger: "blur" }
], ],
}, },
// SOP // SOP
sipList: [], sipList: [],
// //
imageList: [], imageList: [],
// //
processOptions:[], processOptions:[],
queryParams: { queryParams: {
itemId: this.itemId itemId: this.itemId
} }
} }
}, },
created(){ created(){
@ -136,7 +136,7 @@ export default{
processName: null, processName: null,
sopTitle: null, sopTitle: null,
sopDescription: null, sopDescription: null,
sopUrl: null sopUrl: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -159,12 +159,12 @@ export default{
}); });
}, },
// //
handleImgUplaoded(imgUrl){ handleImgUplaoded(imgUrl){
this.form.sipUrl = imgUrl; this.form.sipUrl = imgUrl;
}, },
// //
handleImgRemoved(imgUrl){ handleImgRemoved(imgUrl){
this.form.sipUrl = null; this.form.sipUrl = null;
}, },
// //
submitForm(){ submitForm(){
@ -228,4 +228,4 @@ export default{
width: 600px; width: 600px;
height: 500px; height: 500px;
} }
</style> </style>