Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop

fujunwen 4 years ago
parent
commit
00ecb58fa0

+ 1 - 1
src/utils/format.js

@@ -6,7 +6,7 @@ const formatter = (date) => {
     return moment.unix(date / 1000).format("YYYY.MM.DD")
 }
 const formatterTime = (date) => {
-    return moment.unix(date / 1000).format("YYYY.MM.DD hh:mm")
+    return moment.unix(date / 1000).format("YYYY.MM.DD HH:mm")
 }
 const number_format = (number, decimals, dec_point, thousands_sep) => {
     /*

+ 21 - 10
src/views/equipment/eqDialog.vue

@@ -14,7 +14,7 @@
             <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='padding-top:16px;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' :size='sizePic' :rotationImg='rotationImg'></rotation>
+                    <rotation :key='`rotaion_${rotationKey}`' 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> -->
@@ -133,7 +133,13 @@
                                 >
                                     <!-- 有tab的原理图 -->
                                     <div style='width:100%;height:600px;'>
-                                        <rotation :size='sizePic' v-if='rotationImg.length>0' type='3' :rotationImg='rotationImg'></rotation>
+                                        <rotation
+                                            :key='`tab_rotaion_${rotationKey}`'
+                                            :size='sizePic'
+                                            v-if='rotationImg.length>0'
+                                            type='3'
+                                            :rotationImg='rotationImg'
+                                        ></rotation>
                                     </div>
                                 </el-tab-pane>
                                 <!-- 发布之后的编辑器的分支图 -->
@@ -183,6 +189,7 @@ export default {
             diff: '',
             difference: '', //区分给水排水
             rotationImg: [],
+            rotationKey: 1,
             tabLabel: '',
             tabCount: [],
             sizePic: '',
@@ -332,7 +339,7 @@ export default {
                 plazaId: this.$store.state.plazaId,
                 module: '1002',
                 neTypename: '位置布置图',
-                typecode: typecode,
+                typecode,
             }
             switch (this.systemName) {
                 case '暖通系统':
@@ -364,15 +371,19 @@ export default {
                 this.rotationImg = res.data || []
                 let img = new Image()
                 img.src = this.rotationImg && this.rotationImg[0] ? 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'
+                if (!img.src) {
+                    this.rotationKey++
+                    return true
+                }
+                img.onload = () => {
+                    this.$set(this.imgInfo, 'width', img.width)
+                    this.$set(this.imgInfo, 'height', img.height)
+                    if (this.imgInfo.width > this.imgInfo.height) {
+                        this.sizePic = 'width'
                     } else {
-                        vm.sizePic = 'height'
+                        this.sizePic = 'height'
                     }
+                    this.rotationKey++
                 }
             })
         },

+ 6 - 2
src/views/equipment/table/eqListTable.vue

@@ -99,7 +99,7 @@
             append-to-body
             :fullscreen='true'
         >
-            <eq-detail ref='qdDialog' :row='row' :major='major' :smsxt='smsxt' :diff='diff' :sign='sign'></eq-detail>
+            <eq-detail :key='`eqDetail${key}`' ref='qdDialog' :row='row' :major='major' :smsxt='smsxt' :diff='diff' :sign='sign'></eq-detail>
         </el-dialog>
     </div>
 </template>
@@ -128,6 +128,7 @@ export default {
             type_name: '',
             floorAllSelect: [],
             sign: 1,
+            key: 1,
         }
     },
     computed: {
@@ -140,9 +141,12 @@ export default {
         },
         rowHandle(row) {
             this.type_name = row.type_name
-            this.innerVisible = true
             this.row = row
             this.sign = 1
+            this.$nextTick(() => {
+                this.key++
+                this.innerVisible = true
+            })
         },
         pageChanged(page) {
             this.currentPage = page

+ 6 - 5
src/views/equipment/table/recordDialog.vue

@@ -115,18 +115,19 @@ export default {
 <style lang="less">
 .detail-dialog {
     .el-dialog__wrapper {
-        overflow: hidden !important;
+        // overflow: hidden !important;
     }
     .el-dialog__header {
-        background: #fff !important;
-        color: #909399 !important;
+        // background: #fff !important;
+        // color: #909399 !important;
     }
     .el-dialog__close {
-        color: #909399 !important;
+        // color: #909399 !important;
     }
     /deep/.el-dialog {
         margin-top: 7vh !important;
-        overflow-y: scroll !important;
+        padding-bottom: 5px;
+        // overflow-y: scroll !important;
     }
 }
 </style>