674ec42c by liangyifan

材料信息功能优化

1 parent c89b862f
......@@ -17,7 +17,7 @@
<div class="thumb-wrap">
<div class="thumb-wrap-button">
<el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button>
<el-upload class="fileUpdate" action="" :show-file-list="false" multiple :limit="5" :auto-upload="false"
<el-upload class="fileUpdate" action="" :show-file-list="false" multiple :auto-upload="false"
:on-change="handleChange" accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload">
<el-button icon="el-icon-upload" type="primary">上传</el-button>
</el-upload>
......
......@@ -29,7 +29,7 @@
</el-collapse-transition>
</div>
</div>
<image-preview :previewImg="previewImg" @updateList="updateList" />
<image-preview ref='imageRef' :previewImg="previewImg" @updateList="updateList" />
</div>
</div>
<clxxAddDialog v-model="isDialog" />
......@@ -233,7 +233,8 @@ export default {
})
},
updateList (val) {
this.tableData.forEach(item => {
if(val!=null){ //删除最后一张图片时 val=null
this.tableData.forEach(item => {
if (item.bsmSj === val.bsmSj) {
item.children = val.children
}
......@@ -242,6 +243,15 @@ export default {
if (this.previewImg.index == this.previewImg.imgList.length) {
this.previewImg.index = this.previewImg.index - 1
}
}else{
this.previewImg.imgList = []
this.tableData.forEach(item => {
if(this.treeCheckId == item.bsmSj){
item.children = []
}
})
}
},
// 左侧菜单点击
menuClick (item) {
......