#
Junjie
4 天以前 e1e1a2d934f6bd630abb67784ba18d38f6bea28e
src/main/webapp/views/watch/console.html
@@ -1,22 +1,24 @@
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>WCS控制中心</title>
      <link rel="stylesheet" href="../../static/css/animate.min.css">
      <link rel="stylesheet" href="../../static/vue/element/element.css">
      <link rel="stylesheet" href="../../static/css/watch/console_vue.css">
      <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
      <script type="text/javascript" src="../../static/layui/layui.js"></script>
      <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
      <script type="text/javascript" src="../../static/js/common.js"></script>
      <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script>
      <script type="text/javascript" src="../../static/vue/element/element.js"></script>
   </head>
      <head>
         <meta charset="UTF-8">
         <title>WCS控制中心</title>
         <link rel="stylesheet" href="../../static/css/animate.min.css">
         <link rel="stylesheet" href="../../static/vue/element/element.css">
         <link rel="stylesheet" href="../../static/css/watch/console_vue.css">
         <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
         <script type="text/javascript" src="../../static/layui/layui.js"></script>
         <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
         <script type="text/javascript" src="../../static/js/common.js"></script>
         <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script>
         <script type="text/javascript" src="../../static/vue/element/element.js"></script>
         <script src="../../static/js/gsap.min.js"></script>
         <script src="../../static/js/pixi-legacy.min.js"></script>
      </head>
   <body>
      <div id="app">
         <div style="display: flex;margin-top: 30px;margin-left: 20px;">
            <div style="width: 20%;height: 60vh;margin-right: 20px;">
         <div style="display: flex;margin-left: 20px;">
            <div style="width: 20%;height: 60vh;margin-right: 20px;margin-top: 30px;">
               <el-tabs type="border-card" v-model="activateCard" @tab-click="handleCardClick">
                  <el-tab-pane label="堆垛机" name="crn">
                     <watch-crn-card :param="crnParam"></watch-crn-card>
@@ -27,53 +29,18 @@
                  <el-tab-pane label="RGV" name="rgv">
                     <watch-rgv-card :param="rgvParam"></watch-rgv-card>
                  </el-tab-pane>
                  <el-tab-pane label="地图配置" name="mapSetting">
                  <!-- <el-tab-pane label="地图配置" name="mapSetting">
                     <map-setting-card :param="mapSettingParam"></map-setting-card>
                  </el-tab-pane>
                  </el-tab-pane> -->
               </el-tabs>
            </div>
            <map-canvas :lev="currentLev" :crn-param="crnParam" :rgv-param="rgvParam" :devp-param="devpParam" @crn-click="openCrn" @station-click="openSite" style="width: 80%; height: 100vh;"></map-canvas>
            <div style="position: absolute;top: 15px;left: 50%;display: flex;">
               <div v-if="levList.length > 1" v-for="(lev,index) in levList" :key="index" style="margin-right: 10px;">
                  <el-button :type="currentLev == lev ? 'primary' : ''" @click="switchLev(lev)" size="mini">{{ lev }}F</el-button>
               </div>
            </div>
            <div id="mapDataId" style="position: relative;margin-top: 50px;" :style="{zoom: mapSettingParam.zoom / 100}">
               <table class="excel-table">
                  <tr v-for="(row,index) in map" :key="index">
                     <td
                           v-for="(col,idx) in row" :key="idx"
                           :rowspan="col.rowSpan"
                           :colspan="col.colSpan"
                           :style="{width: col.width}"
                           v-if="col.type != 'merge'"
                     >
                        <div v-if="col.type == 'none'">
                           <div class="item" style="visibility: hidden">{{idx}}</div>
                        </div>
                        <div v-else-if="col.type == 'shelf'">
                           <div class="shelf">
                              <div class="shelf-loc-info" v-if="getShelfLocInfo(index, idx)">{{getShelfLocInfo(index, idx)}}</div>
                           </div>
                        </div>
                        <div v-else-if="col.type == 'devp'">
                           <div class="site" :style="{height: col.rowPx}" :id="'site-' + getStationId(col.value)" @click="openSite(getStationId(col.value))">{{getStationId(col.value)}}</div>
                        </div>
                        <div v-else-if="col.type == 'rgv'" style="position: relative;">
                           <div class="rgv-item" v-if="getDeviceNo(col.value) != -1" :style="{width: col.width}" :id="'rgv-' + getDeviceNo(col.value)" @click="openRgv(getDeviceNo(col.value))">{{getDeviceNo(col.value)}}</div>
                           <div class="track-item" v-if="getTrackSiteNo(col.value) == -1"></div>
                           <div class="track-item" v-else :id="'rgvTrackSiteNo-' + getTrackSiteNo(col.value)"></div>
                        </div>
                        <div v-else-if="col.type == 'crn'">
                           <div class="crn-item" v-if="getDeviceNo(col.value) != -1" :style="{width: col.width}" :id="'crn-' + getDeviceNo(col.value)" @click="openCrn(getDeviceNo(col.value))">{{getDeviceNo(col.value)}}</div>
                           <div class="track-item track-crn" v-if="getTrackSiteNo(col.value) == -1"></div>
                           <div class="track-item track-crn" v-else :id="'crnTrackSiteNo-' + getTrackSiteNo(col.value)"></div>
                        </div>
                     </td>
                  </tr>
               </table>
            </div>
         </div>
@@ -83,6 +50,7 @@
      <script src="../../components/DevpCard.js"></script>
      <script src="../../components/MapSettingCard.js"></script>
      <script src="../../components/WatchRgvCard.js"></script>
      <script src="../../components/MapCanvas.js"></script>
      <script>
         var app = new Vue({
            el: '#app',
@@ -111,6 +79,8 @@
            created() {
               this.init()
            },
            mounted() {
            },
            watch: {
            },
@@ -120,13 +90,8 @@
                  this.getSystemRunningStatus() //获取系统运行状态
                  this.getLevList() //获取地图层级列表
                  this.getLocMastData() //获取库位数据
                  this.consoleInterval = setInterval(() => {
                     this.getCrnInfo() //获取堆垛机数据
                     this.getSiteInfo() //获取输送站点数据
                     this.getRgvInfo() //获取RGV数据
                  }, 1000)
               },
               getLevList() {
                  let that = this;
                  $.ajax({
@@ -177,7 +142,7 @@
               switchLev(lev) {
                  this.currentLev = lev;
                  this.getMap()
                  this.getLocMastData() //切换层级时重新获取库位数据
                  this.getLocMastData()
               },
               openCrn(id) {
                  this.crnParam.crnNo = id;
@@ -512,19 +477,15 @@
               getLocMastData() {
                  let that = this;
                  $.ajax({
                     url: baseUrl + "/locMast/list/auth",
                     url: baseUrl + "/console/map/locList",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     method: "get",
                     data: {
                        curr: 1,
                        limit: 10000,
                        lev1: this.currentLev
                     },
                     data: {},
                     success: (res) => {
                        if (res.code === 200) {
                           that.locMastData = res.data.records;
                           that.locMastData = res.data;
                        }
                     }
                  })
@@ -545,7 +506,7 @@
                     }
                     return false;
                  });
                  if (locInfo && locInfo.row1 && locInfo.bay1) {
                     return locInfo.row1 + '-' + locInfo.bay1;
                  }
@@ -553,6 +514,6 @@
               }
            }
         })
      </script>
   </body>
</html>
         </script>
      </body>
      </html>