guoxiaohuan 4 years ago
parent
commit
03ee67c7f9

+ 10 - 0
src/assets/css/rotation.css

@@ -93,6 +93,11 @@
   right: 8px;
   cursor: pointer;
 }
+.overview .view-box .view-left .lb-left .lb-left-noImg {
+  width: 100%;
+  height: 100%;
+  object-fit: fill;
+}
 .overview .view-box .view-left .lb-bottom {
   height: 34%;
   background: #ffffff;
@@ -223,6 +228,11 @@
   right: 8px;
   cursor: pointer;
 }
+.overview .view-box .view-right .view-right-box .lb-right .lb-left-noImg {
+  width: 100%;
+  height: 100%;
+  object-fit: fill;
+}
 .overview .view-box .view-right .view-right-box .lb-right-bottom {
   height: 53%;
   background: #ffffff;

+ 10 - 0
src/assets/css/rotation.less

@@ -94,6 +94,11 @@
                     right: 8px;
                     cursor: pointer;
                 }
+                .lb-left-noImg {
+                    width: 100%;
+                    height: 100%;
+                    object-fit: fill;
+                }
             }
             .lb-bottom {
                 height: 34%;
@@ -224,6 +229,11 @@
                         right: 8px;
                         cursor: pointer;
                     }
+                    .lb-left-noImg {
+                        width: 100%;
+                        height: 100%;
+                        object-fit: fill;
+                    }
                 }
                 .lb-right-bottom {
                     height: 53%;

BIN
src/assets/imgs/nkt.jpg


BIN
src/assets/imgs/qwt.jpg


+ 17 - 6
src/views/overview/index.vue

@@ -18,9 +18,12 @@
         <div class='view-box'>
             <div class='view-left'>
                 <div class='lb-left'>
-                    <rotation :rotationImg='pic2'></rotation>
-                    <div class='lb-icon' @click='picClick("2")'></div>
-                    <img class='lb-img' @click='picClick("2")' src='../../assets/imgs/zk.png' alt />
+                    <div v-if='pic2.length>0'>
+                        <rotation :rotationImg='pic2'></rotation>
+                        <div class='lb-icon' @click='picClick("2")'></div>
+                        <img class='lb-img' @click='picClick("2")' src='../../assets/imgs/zk.png' alt />
+                    </div>
+                    <img v-else class='lb-left-noImg' src='@/assets/imgs/nkt.jpg' alt />
                 </div>
                 <div class='lb-bottom'>
                     <nav>
@@ -74,9 +77,12 @@
             <div class='view-right'>
                 <div class='view-right-box'>
                     <div class='lb-right'>
-                        <rotation :rotationImg='pic1'></rotation>
-                        <div class='lb-icon' @click='picClick("1")'></div>
-                        <img class='lb-img' @click='picClick("1")' src='../../assets/imgs/zk.png' alt />
+                        <div v-if='pic1.length>0'>
+                            <rotation :rotationImg='pic1'></rotation>
+                            <div class='lb-icon' @click='picClick("1")'></div>
+                            <img class='lb-img' @click='picClick("1")' src='../../assets/imgs/zk.png' alt />
+                        </div>
+                        <img v-else class='lb-left-noImg' src='@/assets/imgs/qwt.jpg' alt />
                     </div>
                     <div class='lb-right-bottom'>
                         <nav>
@@ -219,6 +225,11 @@ export default {
             queryFact(params).then(res => {
                 if (res.result == 'success') {
                     this.loading = false
+                    this.pic1 = []
+                    this.pic2 = []
+                    this.build = {}
+                    this.constructions = []
+                    this.shuzihuayijiao = ''
                     this.pic1 = res.pic1 ? res.pic1 : []
                     this.pic2 = res.pic2 ? res.pic2 : []
                     this.build = res.build ? res.build : {}