doum
2 天以前 1423fa6ccb0e6d24e7f019cd08699c2dce58f535
admin/src/components/business/OperaJkSketchLineMapWindow.vue
@@ -69,6 +69,7 @@
import Pagination from '@/components/common/Pagination'
import GlobalWindow from '@/components/common/GlobalWindow'
import AMapLoader from '@amap/amap-jsapi-loader'
import greenIcon from '@/assets/icons/location-green.png'
import blueIcon from '@/assets/icons/location-blue.png'
import redIcon from '@/assets/icons/location-red.png'
export default {
@@ -170,7 +171,7 @@
          var allsteps = []
          allsteps.push([item.startLogitude, item.startLatitude])
          const steps = (item.steps || '').split(';')
          if (index != that.dataList.length - 1 || true) {
          if (index != that.dataList.length - 1) {
            steps.forEach(item1 => {
              const ll = (item1 || '').split(',')
              allsteps.push(ll)
@@ -216,12 +217,13 @@
          const icon = new AMap.Icon({
            size: new AMap.Size(30, 50), // 图标尺寸
            image: index === 0 ? redIcon : blueIcon
            image: index === 0 ? greenIcon : (index === that.dataList.length - 1 ? redIcon : blueIcon)
          })
          console.log("=====index====",index)
          var marker = new AMap.Marker({
            position: new AMap.LngLat(item.startLogitude, item.startLatitude),
            icon: index === 0 ? redIcon : blueIcon,
            icon: icon,
            anchor: 'bottom-center',
            offset: new AMap.Pixel(0, 0)
          })