Browse Source

bug修复

master
zhanyunjiu 2 years ago
parent
commit
e2285febb8
  1. 2
      src/views/farm/crop/index.vue
  2. 21
      src/views/farm/resource/index.vue

2
src/views/farm/crop/index.vue

@ -37,7 +37,7 @@
<el-table-column label="作物图片" align="center" prop="images" >
<template slot-scope="scope">
<el-image
v-if="scope.row.images[0] != null"
v-if="scope.row.images != null && scope.row.images[0] != null"
:src="scope.row.images[0]" :preview-src-list="scope.row.images">
</el-image>
</template>

21
src/views/farm/resource/index.vue

@ -329,21 +329,16 @@ export default {
},
/*判断图片是否存在*/
judgePictureExists(){
if (this.form.id != null) {
if (this.form.images == "") {
if (this.form.images == "") {
this.form.images = [];
}else{
let imgType = typeof(this.form.images);
if(imgType == "string"){
let imgArr = this.form.images.split(",");
this.form.images = imgArr;
}
}else{
let imagesType = typeof(this.form.images);
if (imagesType == "string") {
let imgArr = this.form.images.split(",")
this.form.images = imgArr;
}
return;
}
if (this.form.images == undefined || this.form.images == "") {
this.form.images = [];
}
}
return;
},
/** 删除按钮操作 */
handleDelete(row) {

Loading…
Cancel
Save