674ec42c by liangyifan

材料信息功能优化

1 parent c89b862f
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 <div class="thumb-wrap"> 17 <div class="thumb-wrap">
18 <div class="thumb-wrap-button"> 18 <div class="thumb-wrap-button">
19 <el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button> 19 <el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button>
20 <el-upload class="fileUpdate" action="" :show-file-list="false" multiple :limit="5" :auto-upload="false" 20 <el-upload class="fileUpdate" action="" :show-file-list="false" multiple :auto-upload="false"
21 :on-change="handleChange" accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload"> 21 :on-change="handleChange" accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload">
22 <el-button icon="el-icon-upload" type="primary">上传</el-button> 22 <el-button icon="el-icon-upload" type="primary">上传</el-button>
23 </el-upload> 23 </el-upload>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 </el-collapse-transition> 29 </el-collapse-transition>
30 </div> 30 </div>
31 </div> 31 </div>
32 <image-preview :previewImg="previewImg" @updateList="updateList" /> 32 <image-preview ref='imageRef' :previewImg="previewImg" @updateList="updateList" />
33 </div> 33 </div>
34 </div> 34 </div>
35 <clxxAddDialog v-model="isDialog" /> 35 <clxxAddDialog v-model="isDialog" />
...@@ -233,6 +233,7 @@ export default { ...@@ -233,6 +233,7 @@ export default {
233 }) 233 })
234 }, 234 },
235 updateList (val) { 235 updateList (val) {
236 if(val!=null){ //删除最后一张图片时 val=null
236 this.tableData.forEach(item => { 237 this.tableData.forEach(item => {
237 if (item.bsmSj === val.bsmSj) { 238 if (item.bsmSj === val.bsmSj) {
238 item.children = val.children 239 item.children = val.children
...@@ -242,6 +243,15 @@ export default { ...@@ -242,6 +243,15 @@ export default {
242 if (this.previewImg.index == this.previewImg.imgList.length) { 243 if (this.previewImg.index == this.previewImg.imgList.length) {
243 this.previewImg.index = this.previewImg.index - 1 244 this.previewImg.index = this.previewImg.index - 1
244 } 245 }
246 }else{
247 this.previewImg.imgList = []
248 this.tableData.forEach(item => {
249 if(this.treeCheckId == item.bsmSj){
250 item.children = []
251 }
252 })
253 }
254
245 }, 255 },
246 // 左侧菜单点击 256 // 左侧菜单点击
247 menuClick (item) { 257 menuClick (item) {
......