Pārlūkot izejas kodu

优化:点点击时候图片自适应

shaun-sheep 4 gadi atpakaļ
vecāks
revīzija
0a3bb9a89e
3 mainītis faili ar 34 papildinājumiem un 32 dzēšanām
  1. 9 9
      config/dev.env.js
  2. 9 9
      config/prod.env.js
  3. 16 14
      src/components/ledger/lib/bimDialog.vue

+ 9 - 9
config/dev.env.js

@@ -3,15 +3,15 @@ const merge = require('webpack-merge')
 const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
-    NODE_ENV: '"development"',
-    // BASE_URL: '"http://172.16.44.215"', //测试iframe地址
-    // SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
-    // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
-    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
-    // MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
-    SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
-    BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
-    MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
+  NODE_ENV: '"development"',
+  // BASE_URL: '"http://172.16.44.215"', //测试iframe地址
+  // SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
+  // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
+  // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
+  // MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
+  SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
+  BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
+  MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
 })
 
 

+ 9 - 9
config/prod.env.js

@@ -1,12 +1,12 @@
 'use strict'
 module.exports = {
-    NODE_ENV: '"production"',
-   // BASE_URL: '"http://172.16.44.215"', //测试iframe地址
-   //  SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
-    // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
-    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
-    // MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
-    BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
-    SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
-     MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
+  NODE_ENV: '"production"',
+  BASE_URL: '"http://172.16.44.215"', //测试iframe地址
+  SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
+  // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
+  // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
+  MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
+  // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
+  // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
+  //  MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
 }

+ 16 - 14
src/components/ledger/lib/bimDialog.vue

@@ -28,22 +28,23 @@
     </el-dialog>
 </template>
 <script>
-import noAllDataFloor from './noAllDataFloor'
-import { LocationPointScene, FloorView, Opt } from '@saga-web/cad-engine/lib'
-import { SColor, SPoint } from '@saga-web/draw/lib'
-import { floorQueryOutline, updateEquip } from '@/api/scan/request'
-import { SGraphyItem } from '@saga-web/graphy/lib'
-export default {
+  import noAllDataFloor from './noAllDataFloor'
+  import {FloorView, LocationPointScene} from '@saga-web/cad-engine/lib'
+  import {SPoint} from '@saga-web/draw/lib'
+  import {updateEquip} from '@/api/scan/request'
+  import {SGraphyItem} from '@saga-web/graphy/lib'
+
+  export default {
     components: {
-        noAllDataFloor,
+      noAllDataFloor,
     },
     props: {
-        dialog: {
-            type: Object,
-            default: function () {
-                return {
-                    bimcode: false,
-                }
+      dialog: {
+        type: Object,
+        default: function () {
+          return {
+            bimcode: false,
+          }
             },
         },
         bimcodeobj: {
@@ -218,7 +219,8 @@ export default {
                     X: event[0].x,
                     Y: event[0].y,
                 }
-                this.drawMainScene.addMarker(obj)
+              this.drawMainScene.addMarker(obj)
+              this.view.fitSceneToView()
             }
         },
         //清空标记