Kaynağa Gözat

修复详情因加载问题导致的图片不显示

master
王饶冀 2 yıl önce
ebeveyn
işleme
ab051c9e20

+ 0
- 1
digital-park-web/digital-park/src/views/park-enterprises/Detail.vue Dosyayı Görüntüle

@@ -273,7 +273,6 @@ export default {
this.pageLoading = true;
getCompanyById(params)
.then(res => {
console.log(res.data);
if (res.data.status == 0) {
this.companyInfo = res.data.data;
this.canEdit =

+ 27
- 15
digital-park-web/digital-park/src/views/park-enterprises/components/OtherInfo.vue Dosyayı Görüntüle

@@ -118,6 +118,11 @@ export default {
default: false,
},
},
computed: {
myCompanyInfo: function () {
return this.companyInfo;
},
},
//import引入的组件需要注入到对象中才能使用
components: {},
mixins: [uploadFile],
@@ -130,12 +135,26 @@ export default {
dialogVisible: false,
};
},
//监听属性 类似于data概念
computed: {},
//监控data中的数据变化
watch: {},
watch: {
myCompanyInfo: function (newVal) {
// console.log(JSON.stringify(newVal), "dataset---滚动组件输出");
this.initData();
},
},
//方法集合
methods: {
initData(){
this.uploadFileList = this.companyInfo.enterpriseFeatures
? this.companyInfo.enterpriseFeatures
: [];
if (this.companyInfo.enterpriseFeatures) {
this.uploadFileList.forEach(item => {
this.fileList.push({
url: this.formatImg(item),
});
});
}
},
formatImg,
// 删除图片
handleBeforeRemove(file, fileList) {
@@ -155,19 +174,12 @@ export default {
},
//生命周期 - 创建完成(可以访问当前this实例)
created() {
this.uploadFileList = this.companyInfo.enterpriseFeatures
? this.companyInfo.enterpriseFeatures
: [];
if (this.companyInfo.enterpriseFeatures) {
this.uploadFileList.forEach(item => {
this.fileList.push({
url: this.formatImg(item),
});
});
}
},
//生命周期 - 挂载完成(可以访问DOM元素)
mounted() {},
mounted() {
},
};
</script>
<style lang="scss" scoped>

Loading…
İptal
Kaydet