瀏覽代碼

* 中心点设置

chen.cheng 4 月之前
父節點
當前提交
5440e64752
共有 3 個文件被更改,包括 19 次插入14 次删除
  1. 5 1
      src/components/map/index.vue
  2. 1 1
      src/layout/components/Navbar.vue
  3. 13 12
      src/views/cons/screen/index.vue

+ 5 - 1
src/components/map/index.vue

@@ -18,13 +18,17 @@ export default {
       default: () => {
       },
     },
+    center: {
+      type: Array,
+      default: () => [121.9580475686964, 30.949993496740227]
+    },
   },
   mounted() {
     this.$nextTick(() => {
       const options = {
         mapType: BDLayers.Lib.Constant.BaseLayerType.Blank,
         mapModel: BDLayers.Lib.Constant.BaseLayerModel.Satellite,
-        center: [104.03533, 1.38137],
+        center: this.center,
         defaultZoom: 20,
         showCenter: true,
         baseControl: false,

+ 1 - 1
src/layout/components/Navbar.vue

@@ -87,7 +87,7 @@ export default {
       this.$store.dispatch('app/toggleSideBar')
     },
     async logout() {
-      this.$confirm(this.$t("logoutTips"), '提示', {
+      this.$confirm(this.$t("sysSetting.logoutTips"), this.$t("common.tip"), {
         confirmButtonText: this.$t("common.confirm"),
         cancelButtonText: this.$t("common.cancel"),
         type: 'warning'

+ 13 - 12
src/views/cons/screen/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="screen-container">
-    <bd-map :loaded="loaded"/>
+    <bd-map :center="[121.9580475686964, 30.949993496740227]" :loaded="loaded"/>
     <div class="screen-title-container"><span class="title-content">{{ $t("screen.title") }}</span></div>
     <content-block :title="$t('screen.consManage')" class="screen-left-container">
       <template v-slot:content>
@@ -13,8 +13,8 @@
           </div>
           <div class="ctl-item">
             <cons-unit-tree
-                :placeholder="$t('common.select', {name: $t('cons.consUnit')})"
-                v-model="consUnit"
+              :placeholder="$t('common.select', {name: $t('cons.consUnit')})"
+              v-model="consUnit"
             />
           </div>
         </div>
@@ -74,18 +74,18 @@
       <MachineIndex v-if="selectMachine" :select-machine="selectMachine">
         <template v-slot:title-right="scop">
           <el-tooltip
-              class="item"
-              effect="dark"
-              content="click to machine"
-              placement="top"
+            class="item"
+            effect="dark"
+            content="click to machine"
+            placement="top"
           >
             <svg-icon icon-class="location" @click="()=>{locationMachine(scop.data)}"/>
           </el-tooltip>
           <el-tooltip
-              class="item"
-              effect="dark"
-              content="close"
-              placement="top"
+            class="item"
+            effect="dark"
+            content="close"
+            placement="top"
           >
             <i class="el-icon-close" @click="()=>{locationClose()}" style="margin-left: 5px"/>
           </el-tooltip>
@@ -135,6 +135,7 @@ export default {
       type: String,
       default: '',
     },
+
   },
   computed: {
     MachineStatus() {
@@ -319,7 +320,7 @@ export default {
         this.pileHoleList.forEach((item, index) => {
           let circle = new BDLayers.Lib.Overlays.Circle(`circle${index}`, {
             center: [item.lng, item.lat], // 圆的中心点点坐标
-            radius: 2,
+            radius: 0.4,
             symbol: {
               lineColor: '#34495e',
               lineWidth: 1,