230320a303 hai 1 ano
pai
achega
654c044f4b

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/static/css/chunk-2485a2f7.f6e47832.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/static/js/app.8f49c3eb.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/static/js/chunk-2485a2f7.f2f6c7f5.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/static/js/chunk-403c5b90.cf2f501b.js


+ 5 - 1
src/views/shop/components/searchForm/Index.vue

@@ -3,6 +3,7 @@
     <div slot="footer">
       <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
       <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
+      <el-button :loading="listLoading" class="xl-form-btn bgc3" @click="linkMap">地图</el-button>
     </div>
   </base-form>
 </template>
@@ -22,6 +23,9 @@ export default {
     this.getDef()
   },
   methods: {
+    linkMap () {
+      this.$router.push('/shop/map')
+    },
     addHandle () {
       this.parentData.isDtlShow = true
       this.parentData.curObj = {}
@@ -34,7 +38,7 @@ export default {
         { label: '店长', key: 'store_manager' },
         { label: '店长电话', key: 'manager_phone' },
       ]
-      this.setDefaultValue(params, 'searchData')
+      // this.setDefaultValue(params, 'searchData')
     },
     searchHandle() {
       const oldform = this.$refs.ruleForm.baseForm

+ 164 - 0
src/views/shop/map.vue

@@ -0,0 +1,164 @@
+<template>
+  <div class="app-container">
+    <el-amap
+      class="amap-box"
+      :vid="'amap-vue'"
+      :amap-manager="amapManager"
+      :zoom="mapDiyObj.zoom"
+      :zooms="mapDiyObj.zooms"
+      :mapStyle="mapDiyObj.mapStyle"
+      :center="mapDiyObj.center"
+      :events="mapEvents"
+      :plugin="plugin"
+    >
+      <el-amap-marker class="scoped-m-box" v-for="(marker, index) in markerList" :key="3000 + index"
+          icon="https://img2.honglounews.com/20220110041435-6276.png"
+          width="20"
+          height="20"
+          :position="marker.position"
+          :title="marker.store_name"
+          :label="{content: `${marker.signing == 1 ? 'Y' : 'N'}${marker.store_name}[${marker.clerk_num}]`, offset: [-10 * marker.store_name.length / 2, -20]}"
+          :extData="{id: marker.id}"
+        >
+        </el-amap-marker>
+    </el-amap>
+  </div>
+</template>
+<script>
+import { AMapManager, lazyAMapApiLoaderInstance } from 'vue-amap'
+const amapManager = new AMapManager()
+import { arrToObj } from '@/utils'
+export default {
+  name: 'shopMap',
+  components: {},
+  mixins,
+  data() {
+    const that = this
+    return {
+      markerList: [],
+      mapDiyObj: {
+        center: [115.852386, 28.684076],
+        zoom: 13,
+        zooms: [11, 21],
+      },
+      amapManager,
+      mapEvents: {
+        init(map) {
+          // map.setFeatures(['road', 'point', 'bg', 'building']); // 多个种类要素显示
+          map.setFeatures(['road', 'bg', 'building']); // 多个种类要素显示
+          // map.setMapStyle('amap://styles/647a4a7f773b3c7143b46e7c3e499f1f');
+          // AMapUI.loadUI(['control/BasicControl'], function(BasicControl) {
+          //   //图层切换控件
+          //   var layerControl = new BasicControl.LayerSwitcher({
+          //     baseLayers: [
+          //       {
+          //         id: 'basic',//图层id,需唯一
+          //         enable: false, //是否启用
+          //         name: '基础地图',//显示名称,html
+          //         layer: new AMap.TileLayer()
+          //       },
+          //       // {
+          //       //   id: 'Satellite',//图层id,需唯一
+          //       //   enable: true, //是否启用
+          //       //   name: '卫星图',//显示名称,html
+          //       //   layer: new AMap.TileLayer.Satellite()
+          //       // },
+          //     ],
+          //     overlayLayers:[
+          //     ],
+          //     position: {
+          //       left:'230px',
+          //       top:'2px',
+          //     },
+          //   });
+          //   map.addControl(layerControl);
+          // })
+        },
+        // zoomchange (e) {
+        //   const curMap = amapManager.getMap()
+        //   that.mapDiyObj.zoom = curMap.getZoom() || 17
+        // },
+        // moveend () {
+        //   // console.log(this.mapDiyObj.center)
+        // },
+        // click(e) {
+        //   if (!that.isDbShow) {
+        //     return
+        //   }
+        //   const { lng, lat } = e.lnglat
+        //   // console.log(lng, lat)
+        //   that.mapDiyObj.center = [lng, lat]
+        // },
+      },
+      // plugin: [{
+      //   pName: 'MouseTool',
+      // }],
+    }
+  },
+  computed: {},
+  created() {
+    this.getData()
+  },
+  mounted() {},
+  methods: {
+    getData () {
+      this.$api.shop.admstorelist({
+        page_size: 10000
+      }).then(res => {
+        const list = res.list || []
+        let markerList = list.map(item => {
+          return {
+            position: [item.longitude, item.latitude],
+            id: item.id,
+            store_name: item.store_name,
+            clerk_num: item.clerk_num,
+            signing: item.signing,
+          }
+        })
+        this.markerList = [...markerList]
+      })
+    },
+
+  }
+}
+</script>
+<style lang="scss" scoped>
+.app-container {
+  height: calc(100vh - 84px);
+  padding: 0;
+  margin: 0;
+  position: relative;
+  .amap-box {
+    height: 100%;
+  }
+}
+
+
+
+::v-deep .amap-marker-label {
+  border-color: #dcdcdc;
+  border-radius: 2px;
+  padding: 3px 5px;
+  color: #666;
+  background: #fff;
+  box-shadow: 0 0 3px #ccc;
+}
+::v-deep .amap-logo{
+    display: none!important;;
+}
+::v-deep .amap-copyright {
+  opacity:0;
+}
+::v-deep .amap-icon img {
+  width: 11px !important;
+  height: 11px !important;
+  // width: 20px !important;
+  // height: 20px !important;
+}
+
+
+
+
+
+
+</style>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio