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