1
zhang
2025-08-19 afc12f9bbd372b55a4539c1fc40b17dbd5949cb1
src/main/webapp/views/console.html
@@ -60,8 +60,8 @@
               <!--输出小车-->
               <div v-for="(car,idx) in currentLevShuttleList"
                   :style="{
                   left: getCarPosition(car.wcsPoint.x,car.wcsPoint.y)[1]
                   ,top: getCarPosition(car.wcsPoint.x,car.wcsPoint.y)[0]
                   left: getCarPosition(car.point.x,car.point.y)[1]
                   ,top: getCarPosition(car.point.x,car.point.y)[0]
                   ,color: shuttleColorList[car.shuttleNo]
                   }"
                   class="sxcar" :id="'sxcar-' + car.shuttleNo">
@@ -76,8 +76,9 @@
                  <el-button :style="{background:currentLev === lev ? '#7DCDFF':''}" @click="changFloor(lev)">{{lev}}F</el-button>
               </div>
               <div>
                  <el-button @click="testMove()">测试移动车</el-button>
<!--                  <el-button @click="testMove()">测试移动车</el-button>-->
                  <el-button @click="resetMap()">重置地图</el-button>
<!--                  <el-button @click="initLoc()">初始化库位</el-button>-->
               </div>
            </div>
         </div>
@@ -333,7 +334,7 @@
               map: [],//地图数据
               currentLev: 1,//地图当前楼层
               siteWindow: false, //站点弹窗显示默认不显示
               floorList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //当前项目楼层
               floorList: [], //当前项目楼层
               shuttleList: [], //四向穿梭车集合
               currentLevShuttleList: [],//当前楼层四向穿梭车集合
               shuttleColorList: [],//四向穿梭车颜色集合
@@ -360,6 +361,7 @@
                  this.getMap(this.currentLev)
                  this.getSystemRunningStatus() //获取系统运行状态
                  this.initLev()//初始化楼层信息
                  this.consoleInterval = setInterval(() => {
                     this.getShuttleStateInfo() //获取四向穿梭车信息
@@ -414,7 +416,10 @@
               },
               getSiteInfo() {
                  //获取输送站点数据
                  this.sendWs("{\"url\":\"/console/latest/data/site\",\"data\":{}}")
                  this.sendWs(JSON.stringify({
                     "url": "/console/latest/data/site",
                     "data": {}
                  }))
               },
               setSiteInfo(res) {
                  //获取输送站点数据
@@ -441,7 +446,10 @@
                  this.getMap(lev)
               },
               getShuttleStateInfo() {
                  this.sendWs("{\"url\":\"/shuttle/table/shuttle/state\",\"data\":{}}")
                  this.sendWs(JSON.stringify({
                     "url": "/shuttle/table/shuttle/state",
                     "data": {}
                  }))
               },
               setShuttleStateInfo(res) {
                  // 四向穿梭车信息表获取
@@ -469,7 +477,10 @@
               },
               getLiftStateInfo() {
                  // 提升机信息表获取
                  this.sendWs("{\"url\":\"/lift/table/lift/state\",\"data\":{}}")
                  this.sendWs(JSON.stringify({
                     "url": "/lift/table/lift/state",
                     "data": {}
                  }))
               },
               setLiftStateInfo(res) {
                  // 提升机信息表获取
@@ -589,8 +600,8 @@
                        let tmp = null
                        tmp = setInterval(() => {
                           if (index < res.length) {
                              that.currentLevShuttleList[0].wcsPoint.y = res[index].y
                              that.currentLevShuttleList[0].wcsPoint.x = res[index].x
                              that.currentLevShuttleList[0].point.y = res[index].y
                              that.currentLevShuttleList[0].point.x = res[index].x
                              index++
                           }else {
                              clearInterval(tmp)
@@ -653,6 +664,29 @@
                     }
                  })
               },
               initLev(){
                  let that = this
                  $.ajax({
                     url: baseUrl + "/console/map/lev/list",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: {},
                     method: 'get',
                     success: function(res) {
                        if (res.code === 200) {
                           that.floorList = res.data;
                        } else if (res.code === 403) {
                           parent.location.href = baseUrl + "/login";
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               },
               getCodeData(){
                  this.sendWs(JSON.stringify({
                     "url": "/console/barcode/output/site",