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