Browse Source

modify canvas

haojianlong 5 years ago
parent
commit
390fc4768a

+ 3 - 1
src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-dialog id="checkGraphy" title="添加平面图" :visible.sync="checkGraphyVisible" width="40%" @close="handleClose">
+  <el-dialog id="checkGraphy" title="添加平面图" :visible.sync="checkGraphyVisible" width="900px" @close="handleClose">
     <div class="bodys">
       <el-cascader :options="options" :show-all-levels="false" :props="props" @change="handleChange" @active-item-change='handleItemChange' clearable
         placeholder="请选择模型文件" v-model="casVal"></el-cascader>
@@ -144,9 +144,11 @@ export default {
 #checkGraphy {
   .bodys {
     .showBox {
+      box-sizing: border-box;
       width: 100%;
       height: 300px;
       border: 1px #ccc solid;
+      padding: 10px;
     }
   }
 }

+ 2 - 3
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -100,8 +100,8 @@ export default {
 
     //   }
     // });
-    this.cadWidth = document.getElementById("drawFloor").offsetWidth - 20;
-    this.cadHeight = document.getElementById("drawFloor").offsetHeight - 20;
+    this.cadWidth = document.getElementById("drawFloor").offsetWidth;
+    this.cadHeight = document.getElementById("drawFloor").offsetHeight;
   },
   methods: {
     clickItem(item) {
@@ -174,6 +174,5 @@ export default {
   width: 100%;
   height: 100%;
   position: relative;
-  margin-top: 10px;
 }
 </style>

+ 6 - 7
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -7,7 +7,7 @@
     </div>
     <!-- 展示图片 -->
     <div class="drawImg">
-      <drawFloor ref="drawFloor" :findGraphyItemId="findGraphyItemId" :point="point" :pointWidth="pointWidth" :cadWidth="1400" :cadHeight="700"
+      <drawFloor ref="drawFloor" :findGraphyItemId="findGraphyItemId" :point="point" :pointWidth="pointWidth"
         :isScale="false" indexs="repetion"></drawFloor>
     </div>
     <!-- 查看图片弹窗 -->
@@ -62,16 +62,15 @@ export default {
 <style lang="less">
 #repetitionGraphy {
   width: 100%;
-  margin: 0 auto;
   height: 100%;
   background: #fff;
   position: relative;
-  padding-top: 10px;
-  padding-left: 10px;
+  padding: 10px;
+  box-sizing: border-box;
   .drawImg {
-    width: calc(100% - 20px);
-    margin: 0 auto;
-    height: calc(100% - 50px);
+    width: 100%;
+    margin-top: 10px;
+    height: calc(100% - 40px);
   }
   #operateList {
     position: absolute;