SOP图片上传

This commit is contained in:
JinLu.Yin 2022-07-27 21:47:39 +08:00
parent 724cf63424
commit 5e03194277
2 changed files with 18 additions and 19 deletions

View File

@ -48,12 +48,12 @@
<div v-for="(item,index) in sopList" :key="index" class="image-middle"> <div v-for="(item,index) in sopList" :key="index" class="image-middle">
<el-card shadow="hover" :body-style="{pading: '10px'}"> <el-card shadow="hover" :body-style="{pading: '10px'}">
<el-popover> <el-popover>
<img :src="sopList[index].url" slot="reference" class="image"/> <img :src="sopList[index].sopUrl" slot="reference" class="image"/>
<el-image class="imagePreview" :src="sopList[index].url" :preview-src-list="imageList"></el-image> <el-image class="imagePreview" :src="sopList[index].sopUrl" :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>
{{sopList[index].sopDescription}} {{sopList[index].sopTitle}}
</span> </span>
<el-button @click="handleUpdate(sopList[index])" type="primary" icon="el-icon-edit"></el-button> <el-button @click="handleUpdate(sopList[index])" type="primary" icon="el-icon-edit"></el-button>
<el-button @click="handleDelete(sopList[index])" type="danger" icon="el-icon-delete"></el-button> <el-button @click="handleDelete(sopList[index])" type="danger" icon="el-icon-delete"></el-button>
@ -88,28 +88,31 @@ export default{
], ],
}, },
// SOP // SOP
sopList: [ sopList: [],
{
sopId: 1,
sopTitle: '移液盒注塑作业指导书-1',
sopDescription: "请注意操作顺序",
sopUrl: "https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF"
}
],
// //
imageList: [], imageList: [],
// //
processOptions:[], processOptions:[],
queryParams: {
itemId: this.itemId
}
} }
}, },
created(){ created(){
this.getList();
this.getProcess(); this.getProcess();
}, },
methods: { methods: {
//SOP //SOP
getSopList(){ getList(){
listSop(this.queryParams).then(response =>{
debugger;
this.imageList = [];
this.sopList = response.rows;
this.sopList.forEach(row => {
this.imageList.push(row.sopUrl);
});
});
}, },
// //
getProcess(){ getProcess(){
@ -154,10 +157,6 @@ export default{
this.open = true; this.open = true;
this.title = "修改产品SOP"; this.title = "修改产品SOP";
}); });
},
//
handleSelectProcess(){
}, },
// //
handleImgUplaoded(imgUrl){ handleImgUplaoded(imgUrl){

View File

@ -316,7 +316,7 @@
<el-tab-pane label="替代品"></el-tab-pane> <el-tab-pane label="替代品"></el-tab-pane>
<el-tab-pane label="SIP"></el-tab-pane> <el-tab-pane label="SIP"></el-tab-pane>
<el-tab-pane label="SOP"> <el-tab-pane label="SOP">
<SOPTab></SOPTab> <SOPTab :itemId="form.itemId" :optType="optType"></SOPTab>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">