fix:物料产品管理中SIP和SOP图片预览功能问题解决
This commit is contained in:
parent
f434915779
commit
3837511fba
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user