Преглед изворни кода

只读模式位置不可改变

haojianlong пре 4 година
родитељ
комит
7f7e444adf

+ 1 - 1
src/components/ledger/handsontables/device.vue

@@ -26,7 +26,7 @@
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
     <!-- bim坐标弹框 -->
     <bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true"
-               ref="bimdialog"></bimDialog>
+               ref="bimdialog" :read="onlyRead ? true : false"></bimDialog>
     <!--      上传文件-->
     <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
                          :firmDataType="firmDataType"

+ 8 - 2
src/components/ledger/lib/bimDialog.vue

@@ -22,7 +22,7 @@
         <p v-show='!isdata'>当前楼层暂无平面图,请前往“建筑楼层管理”中给楼层添加平面图</p>
       </div>
     </div>
-    <div slot='footer' class='footer'>
+    <div slot='footer' class='footer' v-if="!read">
       <el-button @click='handleClose'>取 消</el-button>
       <el-button type='primary' @click='save'>确 定</el-button>
     </div>
@@ -51,6 +51,10 @@ export default {
     bimcodeobj: {
       default: {},
     },
+    read: {
+      default: true,
+      type: Boolean
+    }
   },
   data() {
     return {
@@ -154,7 +158,9 @@ export default {
       }
       this.view.fitSceneToView()
       this.drawMainScene.isSpaceSelectable = false
-      this.drawMainScene.spaceClick(this, this.canvasClick) //锚点触发
+      if (!this.read) {
+        this.drawMainScene.spaceClick(this, this.canvasClick) //锚点触发
+      }
       if (this.floorData.outline && this.floorData.outline.length) {
         let newArr = this.floorData.outline.map((t) => {
           return new SPoint(t.X, t.Y)