|
@@ -19,7 +19,7 @@
|
|
|
<div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 0 0 24px;height:100%'>
|
|
|
<!-- 原理图 -->
|
|
|
<div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:100%;overflow:auto;height:100%;margin:0 auto'>
|
|
|
- <rotation type='3' v-if='rotationImg.length>0' :rotationImg='rotationImg'></rotation>
|
|
|
+ <rotation type='3' v-if='rotationImg.length>0' :size='sizePic' :rotationImg='rotationImg'></rotation>
|
|
|
</div>
|
|
|
<!-- 土建装饰主要材料清单 -->
|
|
|
<tj-table v-else-if='dialogInfo.id.slice(0,4)=="TJQD"' :param='param'></tj-table>
|
|
@@ -113,6 +113,8 @@ export default {
|
|
|
rotationImg: [],
|
|
|
tabLabel: '',
|
|
|
tabCount: [],
|
|
|
+ sizePic: '',
|
|
|
+ imgInfo: {},
|
|
|
showFenbuPic: false //显示楼层分布组件
|
|
|
}
|
|
|
},
|
|
@@ -210,7 +212,19 @@ export default {
|
|
|
}
|
|
|
queryPic({ getParams }).then(res => {
|
|
|
this.rotationImg = res.data || []
|
|
|
- console.log(this.rotationImg)
|
|
|
+ this.rotationImg[0].url
|
|
|
+ let img = new Image()
|
|
|
+ img.src = this.rotationImg[0].url
|
|
|
+ const vm = this
|
|
|
+ img.onload = function() {
|
|
|
+ vm.$set(vm.imgInfo, 'width', img.width)
|
|
|
+ vm.$set(vm.imgInfo, 'height', img.height)
|
|
|
+ if (vm.imgInfo.width > vm.imgInfo.height) {
|
|
|
+ vm.sizePic = 'width'
|
|
|
+ } else {
|
|
|
+ vm.sizePic = 'height'
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
//原理图没图片不显示tab 因为供电和燃气系统没有tab所以分开判断
|