Shan9312 11 månader sedan
förälder
incheckning
bfcea5e3d7

+ 17 - 17
.env.development

@@ -1,18 +1,18 @@
-# just a flag
-ENV = 'development'
-
-# base api
-# 测试线
-# VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
+# just a flag
+ENV = 'development'
+
+# base api
+# 测试线
+# VUE_APP_BASE_API = 'http://192.168.1.70:8082/'
 VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
-# 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.56:8081/'
-# VUE_APP_BASE_API = 'http://192.168.1.93/'
-# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
-# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
-# It only does one thing by converting all import() to require().
-# This configuration can significantly increase the speed of hot updates,
-# when you have a large number of pages.
-# Detail:  https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
-
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
+# 白少后台本地
+# VUE_APP_BASE_API = 'http://192.168.1.56:8081/'
+# VUE_APP_BASE_API = 'http://192.168.1.93/'
+# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
+# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
+# It only does one thing by converting all import() to require().
+# This configuration can significantly increase the speed of hot updates,
+# when you have a large number of pages.
+# Detail:  https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
+
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

BIN
src/assets/images/guiji2.jpeg


+ 147 - 146
src/utils/request.js

@@ -1,148 +1,149 @@
-import axios from 'axios'
-import { MessageBox, Message } from 'element-ui'
-import store from '@/store'
-import { getToken } from '@/utils/auth'
-import Cookies from 'js-cookie';
-
-//获取当前url
-const DoMainString = document.querySelector("html").getAttribute("domain");
-var URL = process.env.VUE_APP_BASE_API
-if (DoMainString) {
-  URL = DoMainString
-}
-
-var reg =  /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)/;
-var browserUrl = window.location.hostname
-console.log("========url===",reg.test(browserUrl))
-if (reg.test(browserUrl)){
-  URL = window.location.protocol +"//"+ browserUrl + ":80/"
-}
-
-Cookies.set('url',URL)
-console.log(process.env.VUE_APP_BASE_API,'===========URL1111')
-console.log(URL,'===========URL')
-
-const service = axios.create({
-  baseURL: URL, // url = base url + request url
-  withCredentials: true, // send cookies when cross-domain requests
-  timeout: 60000 ,// request timeout
-})
-// request interceptor
-service.interceptors.request.use(
-  config => {
-    // do something before request is sent
-    // config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'  //此处是增加的代码,设置请求头的类型
-    if (process.env.VUE_APP_BASE_API !== '/dev-api') {
-      config.headers['Content-Type'] = 'application/json'
-      config.withCredentials = false
-    }
-
-    if (store.getters.token) {
-      // let each request carry token
-      // ['Authorization'] is a custom headers key
-      // please modify it according to the actual situation
-      if (process.env.VUE_APP_BASE_API === '/dev-api') {
-        config.headers['X-Token'] = getToken()
-      } else {
-        config.headers['token'] = getToken()
-      }
-    }
-    return config
-  },
-  error => {
-    // do something with request error
-    console.log(error) // for debug
-    return Promise.reject(error)
-  }
-)
-
-// response interceptor
-service.interceptors.response.use(
-  /**
-   * If you want to get http information such as headers or status
-   * Please return  response => response
-  */
-
-  /**
-   * Determine the request status by custom code
-   * Here is just an example
-   * You can also judge the status by HTTP Status Code
-   */
-  response => {
-    const res = response.data
-
-    // if the custom code is not 20000, it is judged as an error.
-    if (res.code !== 200) {
-      Message({
-        // message: res.msg + res.code,
-        message: '请求超时',
-        type: 'error',
-        duration: 5 * 1000
-      })
-
-      // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
-      if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
-        // to re-login
-        MessageBox.confirm('你已经注销登陆,你可以取消或重新登陆', '确认注销', {
-          confirmButtonText: '重新登陆',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          store.dispatch('user/resetToken').then(() => {
-            location.reload()
-          })
-        })
-      }
-      if (res.code === 20002) {
-        store.dispatch('user/resetToken').then(() => {
-          location.reload()
-        })
-      }
-      if (res.code === undefined) {
-        return res
-      } else {
-        return Promise.reject(new Error(res.message || 'Error'))
-      }
-    } else {
-      return res
-    }
-  },
-  error => {
-    console.log('err' + error) // for debug
-    let config = error.config
-    if (!config) {
-      Message({ message: error.message, type: 'error', duration: 5 * 1000 })
-      return Promise.reject(error)
-    }
-    console.log('config==>', config) // for debug
-    console.log('config.__retryCount==>', config.__retryCount) // for debug
-    // 设置请求超时次数
+import axios from 'axios'
+import { MessageBox, Message } from 'element-ui'
+import store from '@/store'
+import { getToken } from '@/utils/auth'
+import Cookies from 'js-cookie';
+
+//获取当前url
+const DoMainString = document.querySelector("html").getAttribute("domain");
+var URL = process.env.VUE_APP_BASE_API
+if (DoMainString) {
+  URL = DoMainString
+}
+
+var reg =  /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)/;
+var browserUrl = window.location.hostname
+console.log("========url===",reg.test(browserUrl))
+// 打包的时候打开,日常关掉
+if (reg.test(browserUrl)){
+  URL = window.location.protocol +"//"+ browserUrl + ":80/"
+}
+
+Cookies.set('url',URL)
+console.log(process.env.VUE_APP_BASE_API,'===========URL1111')
+console.log(URL,'===========URL')
+
+const service = axios.create({
+  baseURL: URL, // url = base url + request url
+  withCredentials: true, // send cookies when cross-domain requests
+  timeout: 60000 ,// request timeout
+})
+// request interceptor
+service.interceptors.request.use(
+  config => {
+    // do something before request is sent
+    // config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'  //此处是增加的代码,设置请求头的类型
+    if (process.env.VUE_APP_BASE_API !== '/dev-api') {
+      config.headers['Content-Type'] = 'application/json'
+      config.withCredentials = false
+    }
+
+    if (store.getters.token) {
+      // let each request carry token
+      // ['Authorization'] is a custom headers key
+      // please modify it according to the actual situation
+      if (process.env.VUE_APP_BASE_API === '/dev-api') {
+        config.headers['X-Token'] = getToken()
+      } else {
+        config.headers['token'] = getToken()
+      }
+    }
+    return config
+  },
+  error => {
+    // do something with request error
+    console.log(error) // for debug
+    return Promise.reject(error)
+  }
+)
+
+// response interceptor
+service.interceptors.response.use(
+  /**
+   * If you want to get http information such as headers or status
+   * Please return  response => response
+  */
+
+  /**
+   * Determine the request status by custom code
+   * Here is just an example
+   * You can also judge the status by HTTP Status Code
+   */
+  response => {
+    const res = response.data
+
+    // if the custom code is not 20000, it is judged as an error.
+    if (res.code !== 200) {
+      Message({
+        // message: res.msg + res.code,
+        message: '请求超时',
+        type: 'error',
+        duration: 5 * 1000
+      })
+
+      // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
+      if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
+        // to re-login
+        MessageBox.confirm('你已经注销登陆,你可以取消或重新登陆', '确认注销', {
+          confirmButtonText: '重新登陆',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          store.dispatch('user/resetToken').then(() => {
+            location.reload()
+          })
+        })
+      }
+      if (res.code === 20002) {
+        store.dispatch('user/resetToken').then(() => {
+          location.reload()
+        })
+      }
+      if (res.code === undefined) {
+        return res
+      } else {
+        return Promise.reject(new Error(res.message || 'Error'))
+      }
+    } else {
+      return res
+    }
+  },
+  error => {
+    console.log('err' + error) // for debug
+    let config = error.config
+    if (!config) {
+      Message({ message: error.message, type: 'error', duration: 5 * 1000 })
+      return Promise.reject(error)
+    }
+    console.log('config==>', config) // for debug
+    console.log('config.__retryCount==>', config.__retryCount) // for debug
+    // 设置请求超时次数
     config.__retryCount = config.__retryCount || 0
-    // 君盛牧场不需要多次请求
+    // 君盛牧场不需要多次请求
     // if (config.__retryCount >= 0) {
-    // 其他牧场失败后需要多次尝试
-    if (config.__retryCount >= 3) {
-      // Message({ message:error.message, type: 'error', duration: 5 * 1000 })
-      Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })
-      // Message.error((error && error.data && error.data.msg) || '请求超时')
-      return Promise.reject(error)
-    }
-    config.__retryCount += 1
-    let backoff = new Promise((resolve) => {
-      setTimeout(() => {
-        resolve()
-      }, config.retryDelay || 1000)
-    })
-    return backoff.then(() => {
-      return service(config)
-    })
-    // Message({
-    //   message: error.message,
-    //   type: 'error',
-    //   duration: 5 * 1000
-    // })
-    // return Promise.reject(error)
-  }
-)
-
-export default service
+    // 其他牧场失败后需要多次尝试
+    if (config.__retryCount >= 3) {
+      // Message({ message:error.message, type: 'error', duration: 5 * 1000 })
+      Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })
+      // Message.error((error && error.data && error.data.msg) || '请求超时')
+      return Promise.reject(error)
+    }
+    config.__retryCount += 1
+    let backoff = new Promise((resolve) => {
+      setTimeout(() => {
+        resolve()
+      }, config.retryDelay || 1000)
+    })
+    return backoff.then(() => {
+      return service(config)
+    })
+    // Message({
+    //   message: error.message,
+    //   type: 'error',
+    //   duration: 5 * 1000
+    // })
+    // return Promise.reject(error)
+  }
+)
+
+export default service

+ 0 - 317
src/views/statisticalAnalysis/pushingplan/index - 副本.vue

@@ -1,317 +0,0 @@
- <template>
-  <div class="app-container">
-    <div class="search">
-      <el-date-picker v-model="table.parammaps.inputDatetime" type="daterange" class="inputDatetime filter-item" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
-      <el-input v-model="table.parammaps.tname" placeholder="推料车" style="width: 180px;" class="filter-item" clearable />
-      <el-button class="successBorder" @click="handleRefresh">重置</el-button>
-      <el-button class="successBorder" @click="form_search">查询</el-button>
-    </div>
-    <div class="table">
-      <el-table
-        :key="tableKey"
-        ref="table"
-        v-loading="listLoading"
-        element-loading-text="给我一点时间"
-        :data="list"
-        border
-        fit
-        highlight-current-row
-        style="width: 100%;"
-        :row-style="rowStyle"
-        :cell-style="cellStyle"
-        class="elTable table-fixed"
-        :max-height="myHeight"
-      >
-        <el-table-column label="序号" align="center" type="index" width="50px" />
-        <el-table-column label="推料车" min-width="100px" align="center" prop="tname" />
-        <el-table-column label="备注" min-width="100px" align="center" prop="remark" />
-        <el-table-column label="开始时间" min-width="100px" align="center" prop="startdate" />
-        <el-table-column label="结束时间" min-width="100px" align="center" prop="enddate" />
-        <el-table-column label="运行时间" min-width="100px" align="center" prop="date" />
-        <el-table-column label="运行轨迹" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
-          <template slot-scope="{row}">
-            <el-button v-if="isRoleEdit" class="miniSuccess" @click="handleRunning_trajectory(row)">查看</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <span v-if="listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{total }}条</span>
-    </div>
-
-    <el-dialog  :visible.sync="run.dialogFormVisible" :close-on-click-modal="false" width="50%">
-     <template slot="title">
-       <div class="avue-crud__dialog__header">
-         <span class="el-dialog__title">
-           <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-           运行轨迹
-         </span>
-         <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
-           <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
-           <svg-icon v-else icon-class="fullscreen" />
-         </div>
-       </div>
-     </template>
-    <div ref="map" class="map-container"></div>
-    <div slot="footer" class="dialog-footer">
-       <el-button class="cancelClose1" @click="run.dialogFormVisible = false;getList()">关闭</el-button>
-    </div>
-   </el-dialog>
-
-  </div>
-</template>
-
-<script>
-import { GetDataByName, postJson,getJson, formatNum, checkButtons } from '@/api/common'
-import { parseTime} from '@/utils/index.js'
-import { MessageBox } from 'element-ui'
-import Cookies from 'js-cookie'
-import axios from 'axios'
-import { getToken } from '@/utils/auth'
-import { createApp } from 'vue';
-import AMapLoader from '@amap/amap-jsapi-loader';
-window._AMapSecurityConfig = {
-  securityJsCode: '0133db0118e961029dc45a2d5039cbb1' // '「申请的安全密钥」',
-}
-export default {
-  name: 'Pushingplan',
-  data() {
-    return {
-      table: {
-        name:'getTmrEqipmemtList',
-        parammaps: {
-          // pastureid: Cookies.get('pastureid'),
-          tname:'',
-          startdate:'',
-          enddate: '',
-          inputDatetime: null,
-          // startdate: parseTime(new Date(), '{y}-{m}-{d}'),
-          // enddate: parseTime(new Date(), '{y}-{m}-{d}'),
-          // inputDatetime: [new Date(), new Date()],
-        },
-      },
-      tableKey: 0,
-      list: [],
-      total: 0,
-      listLoading: true,
-
-      run: {
-        dialogFormVisible: false,
-        dialogStatus: '',
-        temp:{}
-      },
-      dialogFull: false,
-      isRoleEdit: [],
-      isokDisable: false,
-      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      myHeight: document.documentElement.clientHeight - 85- 150,
-       map: null,
-       path:[],
-      // path: [
-      //   [116.405285, 39.904989], // 示例轨迹点1
-      //   [116.407516, 39.904717], // 示例轨迹点2
-      //   [3118.407366, 39.91344],  // 示例轨迹点3
-      //   // 添加更多轨迹点
-      // ],
-      index: 0,
-      latitude: 40.878730, // 实景图所在位置的纬度
-      longitude: 113.216553, // 实景图所在位置的经度
-      zoom: 17, // 实景
-      apiKey:'fb6a0e88dbad4931d96a121bcf7c4442'
-    }
-  },
-
-   mounted() {
-      // this.initMap();
-    },
-  created() {
-    this.getButtons()
-    this.getList()
-  },
-
-  methods: {
-    getButtons() {
-      const Edit = 'Pushingplan'
-      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
-      this.isRoleEdit = isRoleEdit
-    },
-
-    getList() {
-      this.listLoading = true
-      let url = '/authdata/GetDataByName'
-      let data = this.table
-      if(this.table.parammaps.inputDatetime !== null){
-        data.parammaps.startdate = parseTime(this.table.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-        data.parammaps.enddate = parseTime(this.table.parammaps.inputDatetime[1], '{y}-{m}-{d}')
-      }else{
-        data.parammaps.startdate = ''
-        data.parammaps.enddate = ''
-      }
-      postJson(url,data).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.list = response.data.list
-        } else {
-          this.list = []
-        }
-        this.total = response.data.total
-        setTimeout(() => {
-          this.listLoading = false
-        }, 100)
-      })
-    },
-
-
-
-    form_search() {
-      console.log('点击了查询')
-      this.getList()
-    },
-    handleRefresh(){
-      this.table.parammaps.tname = ''
-      this.table.parammaps.inputDatetime = null
-      this.getList()
-    },
-    handleRunning_trajectory(row){
-      console.log('点击了运行轨迹')
-      this.run.dialogStatus = 'run'
-      this.run.dialogFormVisible = true
-      this.run.temp = Object.assign({}, row)
-      this.getRuningList()
-    },
-    getRuningList(){
-      let url = '/authdata/equipment/muster'
-      let data = '?id='+this.run.temp.id
-      getJson(url,data).then(response => {
-        // path
-        // console.log('table数据', response.data.list)
-        if (response.data !== null) {
-          // let arrList = []
-          // for(let i=0;i<response.data.length;i++){
-          //   let list = []
-          //   list.push(parseFloat(response.data[i].N),parseFloat(response.data[i].A))
-          //   arrList.push(list)
-          // }
-
-          // console.log(JSON.stringify(arrList),'arrList')
-          // this.path = arrList
-          // this.path = [  //测试数据
-          //   [116.405285, 39.904989], // 示例轨迹点1
-          //   [116.407516, 39.904987], // 示例轨迹点2
-          //   [116.407517, 39.91344]  // 示例轨迹点3
-          //   // 添加更多轨迹点
-          // ]
-          this.path = [
-            [121.461525,31.312628],
-            // [121.461526,31.312628],[121.461527,31.312628],[121.461527,31.312628]
-          ]
-          console.log(this.path[0][0])
-          this.longitude = this.path[0][0] // 实景图所在位置的经度
-          this.latitude = this.path[0][1] // 实景图所在位置的纬度
-          // zoom: 15, // 实景
-          this.initMap();
-        } else {
-          this.path = []
-        }
-        // this.initMap();
-      })
-    },
-    async initMap() {
-      await AMapLoader.load({
-        key: 'fb6a0e88dbad4931d96a121bcf7c4442', // 替换为你的高德地图API Key
-        version: '2.0',
-        plugins: [],
-      }).then(()=>{
-        
-      })
-
-      this.map = new window.AMap.Map(this.$refs.map, {
-        zoom: 16,
-        center: this.path[0],
-        // layers: [
-        //   new window.AMap.TileLayer.Satellite() // 使用卫星地图图层
-        // ]
-      });
-      const startMarker = new window.AMap.Marker({
-        position: this.path[0], // 起始点位置
-        map: this.map,
-        icon: 'https://webapi.amap.com/theme/v1.3/markers/n/start.png', // 起始点图标
-      });
-      // const endMarker = new window.AMap.Marker({
-      //   position: this.path[this.path.length - 1],
-      //   map: this.map,
-      //   icon: 'https://webapi.amap.com/theme/v1.3/markers/n/end.png', // 终点图标
-      // });
-      this.correctPath();
-      this.drawPath();
-      // this.addStartMarker()
-    },
-    correctPath() {
-      // 调用高德地图的轨迹纠偏服务进行处理
-      
-      // 处理返回结果并在地图上展示纠偏后的轨迹
-    },
-    drawDrop(){
-      var that = this
-      that.path.forEach(function(coord, index) {
-        // console.log(coord, index,'coord, index')
-          var marker = new AMap.Marker({
-              position: coord, // 对应点的经/纬度
-              map: that.map, // 显示在地图上
-              icon: new AMap.Icon({
-                // size: new AMap.Size(36, 36),  // 图标尺寸
-                image: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b'+ (index + 1) +'.png',  // 自定义图标
-                // imageSize: new AMap.Size(36, 36),  // 图标尺寸
-              }),
-              offset: new AMap.Pixel(-10, -30) // 调整图标的偏移,使图标中心显示在点位置
-          });
-          // var label = new AMap.Text({
-          //     text: (index + 1).toString(), // 显示的数字
-          //     position: coord, // 标签位置与点位置相同
-          //     offset: new AMap.Pixel(-10, -20), // 调整标签的偏移,使数字显示在点的正上方
-          //     map: that.map // 显示在地图上
-          // });
-          // 添加信息窗体
-          marker.on('click', function() {
-              var infoWindow = new AMap.InfoWindow({
-                  content: '经度:' + coord[0] + '<br>纬度:' + coord[1]
-              });
-              infoWindow.open(that.map, marker.getPosition());
-          });
-      });
-    },
-    drawPath() {
-      const polyline = new window.AMap.Polyline({
-        path: this.path,
-        strokeStyle: 'red',
-        strokeColor: '#3366FF',
-        strokeOpacity: 1,
-        strokeWeight: 3,
-        map: this.map,
-        dirArrowStyle: true,
-      });
-      // 调整地图视图以适应轨迹
-      this.map.setFitView();
-      this.map.setZoom(16)
-    },
-  }
-}
-</script>
-<style lang="scss" scoped>
-  .map-container {
-    height: 400px;
-    width: 100%;
-  }
-  .search {
-    clear: both;
-  }
-
-  .table {
-    margin-top: 10px;
-  }
-  .el-tag{margin-right: 5px;}
-</style>
-<style lang="scss">
-  .red-row{
-    background: #fde2e2 !important;
-  }
-</style>

+ 58 - 26
src/views/statisticalAnalysis/pushingplan/index.vue

@@ -70,8 +70,8 @@ import axios from 'axios'
 import { getToken } from '@/utils/auth'
 import { createApp } from 'vue';
 import AMapLoader from '@amap/amap-jsapi-loader';
-import vLoUrl from '../../../assets/images/guiji.png';
-// import vLoUrl from '../../../assets/images/logo.png';
+// import vLoUrl from '../../../assets/images/tet.png'
+import vLoUrl from '../../../assets/images/guiji2.jpeg';
 window._AMapSecurityConfig = {
   securityJsCode: '0133db0118e961029dc45a2d5039cbb1' // '「申请的安全密钥」',
 }
@@ -183,6 +183,7 @@ export default {
       this.run.temp = Object.assign({}, row)
       this.getRuningList()
     },
+
     getRuningList(){
       let url = '/authdata/equipment/muster'
       let data = '?id='+this.run.temp.id
@@ -193,24 +194,47 @@ export default {
           let arrList = []
           for(let i=0;i<response.data.length;i++){
             let list = []
+            // let str= `${parseFloat(response.data[i].N)} ${parseFloat(response.data[i].A)} `
             list.push(parseFloat(response.data[i].N),parseFloat(response.data[i].A))
+
             arrList.push(list)
+            ////////
+            // let testArr =[];
+            // testArr.push(parseFloat(response.data[i].A),parseFloat(response.data[i].N));
+            // arrList.push(testArr);
+            //////
+
           }
 
-          // console.log(JSON.stringify(arrList),'arrList')
-          // this.path = arrList  //真实数据
+
+          this.path = arrList  //真实数据
+          //  console.log(JSON.stringify(arrList),'arrList')
+          //  console.log(arrList.join('\n'),'9999999');
           // 测试数据
-          this.path =  [
-            // [116.317911, 39.939229], // 示例轨迹点1
-            // [116.327911, 39.939229], // 示例轨迹点1
-            // [116.328911, 39.939329], // 示例轨迹点1
-            // [116.338911, 39.939429], // 示例轨迹点1
-            // [116.342659, 39.946275]
-            [113.2268105910612,40.88140752472374],
-            [113.210637000,40.8765545]
-          ]
-          this.longitude = this.path[0][0] // 实景图所在位置的经度
-          this.latitude = this.path[0][1] // 实景图所在位置的纬度
+          // this.path =  [
+          //   // [116.317911, 39.939229], // 示例轨迹点1
+          //   // [116.327911, 39.939229], // 示例轨迹点1
+          //   // [116.328911, 39.939329], // 示例轨迹点1
+          //   // [116.338911, 39.939429], // 示例轨迹点1
+          //   // [116.342659, 39.946275]
+          //   // [113.2268105910612,40.88140752472374],
+          //   // [113.210637000,40.8765545]
+          //    [113.210637000,40.8765548] ,// 左下
+          //   // [113.210637002,40.8765551],
+          //   // [113.210637012,40.8765561],
+          //   // [113.210637015,40.8765562],
+          //   // [113.210637020,40.8765564],
+          //   // [113.210637021,40.8765568],
+          //   //  [113.213728833,40.8798781621],
+          //   //  [113.214728833,40.8798781624],
+          //   //  [113.215728833,40.8798781342],
+          //   //  [113.216728833,40.8798781664],
+          //    [113.210637000,40.8798781666], //左上
+
+          //    [113.219728833,40.8798781666],//// 右上
+          // ]
+          // this.longitude = this.path[0][0] // 实景图所在位置的经度
+          // this.latitude = this.path[0][1] // 实景图所在位置的纬度
           // zoom: 15, // 实景
         } else {
           this.path = []
@@ -231,34 +255,39 @@ export default {
       var imageLayer = new AMap.ImageLayer({
           url: backgroundImageUrl,
           bounds: new AMap.Bounds(
-              [113.2268105910612,40.88140752472374],
-              [113.210637000,40.8765545]
+            // this.path[0],
+            // this.path[this.path.length - 1]
+              // [113.20750428,40.87528624] ,// 左下
+              // [113.22348518,40.88395588], // 右上
+              [113.21478078,40.87649131], //左下角;
+               [113.23067741,40.88588863] ,   // 右上角
           ),//图片范围大小的经纬度,传入西南和东北的经纬度坐标
           zooms: [15, 20]
       });
       this.map = new window.AMap.Map(this.$refs.map, {
-        zoom: 16,
-        zIndex:2,
-        center: this.path[0],
+        zoom: 18,
+        // zIndex:2,
+        center: [113.21549472999999,40.879621060000005],
         layers: [
             AMap.createDefaultLayer(),
             imageLayer,
         ]
       });
-      const startMarker = new window.AMap.Marker({
-        position: this.path[0], // 起始点位置
+      const startMarker  = new window.AMap.Marker({
+        position: this.path[this.path.length - 1], // 起始点位置
         map: this.map,
         icon: 'https://webapi.amap.com/theme/v1.3/markers/n/start.png', // 起始点图标
       });
-      const endMarker = new window.AMap.Marker({
-        position: this.path[this.path.length - 1],
+      const  endMarker = new window.AMap.Marker({
+        position: this.path[0],
         map: this.map,
         icon: 'https://webapi.amap.com/theme/v1.3/markers/n/end.png', // 终点图标
       });
-      
+
       this.drawPath();
     },
     drawPath() {
+
       const polyline = new window.AMap.Polyline({
         path: this.path,
         strokeStyle: 'red',
@@ -268,9 +297,12 @@ export default {
         map: this.map,
         dirArrowStyle: true,
       });
+
       // 调整地图视图以适应轨迹
+
       this.map.setFitView();
-      this.map.setZoom(16)
+      this.map.setZoom(18)
+
     },
   }
 }