#
zjj
2025-06-05 cedd5aee429acab8abece922505ab37a66be7528
src/main/webapp/views/deviceOperate/rgvOperate.html
@@ -13,12 +13,47 @@
<body>
   <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;">
      <div style="width: 100%;" class="demo-container">
            <el-card class="box-card" >
               <div slot="header" class="clearfix">
                  <span>设备位置</span>
               </div>
               <el-row >
                  <el-col :span="1" :offset="9"><div class="card-bg">7</div></el-col>
                  <el-col :span="1" ><div class="card-bg">5</div></el-col>
                  <el-col :span="1" ><div class="card-bg">3</div></el-col>
                  <el-col :span="1" ><div class="card-bg">1</div></el-col>
               </el-row>
               <el-row  type="flex" justify="center">
                  <el-col :span="7" >
                     <el-slider v-model="value1" :min="min" :max="max" :format-tooltip="formatTooltip" >
                     </el-slider>
                  </el-col>
               </el-row>
               <el-row >
                  <el-col :span="1" :offset="8"><div class="card-bg">10</div></el-col>
                  <el-col :span="1" ><div class="card-bg">9</div></el-col>
                  <el-col :span="1" ><div class="card-bg">8</div></el-col>
                  <el-col :span="1" ><div class="card-bg">6</div></el-col>
                  <el-col :span="1" ><div class="card-bg">4</div></el-col>
                  <el-col :span="1" :offset="2"><div class="card-bg">2</div></el-col>
                  <el-col :span="1" ><div class="card-bg"></div></el-col>
               </el-row>
            </el-card>
      </div>
      <div style="width: 100%;">
         <el-table border ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick"
            max-height="350" style="width: 100%">
            <el-table-column property="rgvNo" label="RGV号">
            </el-table-column>
            <el-table-column property="workNo1" label="工作号">
            </el-table-column>
            <el-table-column property="wrkSts$" label="任务状态">
            </el-table-column>
            <el-table-column property="statusType" label="模式">
            </el-table-column>
@@ -27,6 +62,10 @@
            <el-table-column property="walkPos" label="设备状态">
            </el-table-column>
            <el-table-column property="pakMk" label="锁定状态">
            </el-table-column>
            <el-table-column property="warnCode" label="异常代码">
            </el-table-column>
            <el-table-column property="alarm" label="异常描述">
            </el-table-column>
         </el-table>
      </div>
@@ -38,7 +77,7 @@
                  <span>设备调试</span>
               </div>
               <div>
                  <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline">
                  <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"  v-if="rgvMode !== 2 && rgvMode !== 1 ">
<!--                     <el-form-item label="源站/源库位">-->
<!--                        <el-input v-model="formParam.sourceStaNo" placeholder="源站/源库位"></el-input>-->
<!--                     </el-form-item>-->
@@ -53,49 +92,80 @@
                     </el-form-item>
                  </el-form>
                  <div v-if="rgvMode === 2 ">
                     <el-form :model="formParamD" label-position="top" :inline="true" class="demo-form-inline">
                        <el-form-item label="起始站">
                           <el-input v-model="formParamD.sourceRow" placeholder="起始站"></el-input>
                        </el-form-item>
                        <el-form-item label="目标站">
                           <el-input v-model="formParamD.sourceBay" placeholder="目标站"></el-input>
                        </el-form-item>
                        <el-form-item label="启动">
                           <el-button @click="initiateD(1)" type="warning">取货</el-button>
                           <el-button @click="initiateD(2)" type="warning">放货</el-button>
                           <el-button @click="initiateD(3)" type="warning">X移动</el-button>
                           <el-button @click="initiateD(4)" type="warning">搬运</el-button>
                        </el-form-item>
                     </el-form>
                  </div>
                  <div  v-if="demo === 'N' ">
                     <el-button v-if="rgvMode === 0 " type="danger">未知</el-button>
                     <el-button v-if="rgvMode === -1 " type="danger">未知</el-button>
                     <el-button v-if="rgvMode === 3 " type="primary">联机</el-button>
                     <el-button v-if="rgvMode === 2 " type="primary">单机</el-button>
                     <el-button v-if="rgvMode === 1 " type="warning">手动</el-button>
                  </div>
                  <div  v-if="demo === 'N' ">
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button v-if="rgvMode !== 3 " @click="rgvStatus(15)" type="primary">联机</el-button>
                        <el-button v-if="rgvMode !== 2 " @click="rgvStatus(14)" type="primary">单机</el-button>
                        <el-button v-if="rgvMode !== 1 " @click="rgvStatus(12)" type="warning">手动</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button @click="rgvStatus(8)" type="primary">启动</el-button>
                        <el-button @click="rgvStatus(9)" type="primary">停止</el-button>
                        <el-button @click="rgvStatus(11)" type="primary">复位按钮</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button @click="rgvStatus(7)" type="warning">报警消音</el-button>
                        <el-button v-if="rgvMode === 1 " @click="rgvStatus(13)" type="warning">手动定位</el-button>
                        <el-button v-if="rgvMode === 3 " @click="rgvStatus(17)" type="warning">恢复联机任务</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button :style="" @click="rgvStatus(5)" type="danger">强制启动</el-button>
                        <el-button @click="rgvStatus(10)" type="danger">急停</el-button>
                        <el-button @click="rgvStatus(16)" type="danger">货叉定位回中</el-button>
                        <el-button @click="rgvStatus(18)" type="danger">清除任务</el-button>
                     </div>
                  </div>
                  <div>
                     <el-button v-if="demo === 'N' " @click="demos('true')" type="info">演示</el-button>
                     <el-button v-if="demo === 'Y' " @click="demos('false')" type="info">取消演示</el-button>
                  </div>
                  <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                     <el-button @click="rgvStatus(8)" type="primary">启动</el-button>
                     <el-button @click="rgvStatus(9)" type="primary">停止</el-button>
                     <el-button @click="rgvStatus(14)" type="primary">单机</el-button>
                     <el-button @click="rgvStatus(15)" type="primary">联机</el-button>
                     <el-button @click="rgvStatus(11)" type="primary">复位按钮</el-button>
                  </div>
                  <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                     <el-button @click="rgvStatus(7)" type="warning">报警消音</el-button>
                     <el-button @click="rgvStatus(12)" type="warning">手动</el-button>
                     <el-button @click="rgvStatus(13)" type="warning">手动定位</el-button>
                  </div>
                  <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                     <el-button :style="" @click="rgvStatus(5)" type="danger">强制启动</el-button>
                     <el-button @click="rgvStatus(10)" type="danger">急停</el-button>
                     <el-button @click="rgvStatus(16)" type="danger">货叉定位回中</el-button>
                  </div>
                  <div style="margin-top: 5px" v-if="demo === 'Y'">
                     <el-button  @click="staTova(2,1)" type="warning">输送-置换1</el-button>
                     <el-button  @click="staTova(2,3)" type="warning">输送-置换2</el-button>
                     <el-button  @click="staTova(2,5)" type="warning">输送-置换3</el-button>
                     <el-button  @click="staTova(2,7)" type="warning">输送-置换4</el-button>
                  </div>
                  <div style="margin-top: 5px" v-if="demo === 'Y'">
                     <el-button  @click="staTova(2,4)" type="warning">输送-灌装1</el-button>
                     <el-button  @click="staTova(2,6)" type="warning">输送-灌装2</el-button>
                     <el-button  @click="staTova(2,8)" type="warning">输送-灌装3</el-button>
                  </div>
                  <div style="margin-top: 5px" v-if="demo === 'Y'">
                     <el-button  @click="staTova(1,10)" type="warning">置换1-放货</el-button>
                     <el-button  @click="staTova(2,10)" type="warning">置换2-放货</el-button>
                     <el-button  @click="staTova(3,10)" type="warning">置换3-放货</el-button>
                     <el-button  @click="staTova(4,10)" type="warning">置换4-放货</el-button>
                     <div style="margin: 10px auto 10px auto">
                        <el-button v-if="demo === 'N' " @click="demos('true')" type="info">演示</el-button>
                        <el-button v-if="demo === 'Y' " @click="demos('false')" type="info">取消演示</el-button>
                     </div>
                     <div style="margin-top: 5px" v-if="demo === 'Y'">
                        <el-button  @click="staTova(2,1)" type="warning">输送-置换1</el-button>
                        <el-button  @click="staTova(2,3)" type="warning">输送-置换2</el-button>
                        <el-button  @click="staTova(2,5)" type="warning">输送-置换3</el-button>
                        <el-button  @click="staTova(2,7)" type="warning">输送-置换4</el-button>
                     </div>
                     <div style="margin-top: 5px" v-if="demo === 'Y'">
                        <el-button  @click="staTova(2,4)" type="warning">输送-灌装1</el-button>
                        <el-button  @click="staTova(2,6)" type="warning">输送-灌装2</el-button>
                        <el-button  @click="staTova(2,8)" type="warning">输送-灌装3</el-button>
                     </div>
                     <div style="margin-top: 5px" v-if="demo === 'Y'">
                        <el-button  @click="staTova(1,10)" type="warning">置换1-放货</el-button>
                        <el-button  @click="staTova(2,10)" type="warning">置换2-放货</el-button>
                        <el-button  @click="staTova(3,10)" type="warning">置换3-放货</el-button>
                        <el-button  @click="staTova(4,10)" type="warning">置换4-放货</el-button>
                     </div>
                  </div>
               </div>
            </el-card>
         </div>
         <div style="width: 45%;">
            <el-card class="box-card">
            <el-card style="width: 100%;">
               <div slot="header" class="clearfix">
                  <span>设备状态</span>
               </div>
@@ -104,7 +174,7 @@
                     <el-empty description="请选择设备"></el-empty>
                  </div>
                  <div v-else>
                     <el-descriptions :title="currentTitle" direction="vertical" :column="4" border>
                     <el-descriptions :title="currentTitle" direction="vertical" :column="8" border>
                        <el-descriptions-item label="RGV">{{ tableData[currentIndex].rgvNo }}
                        </el-descriptions-item>
                        <el-descriptions-item label="工作号">
@@ -115,20 +185,70 @@
                        </el-descriptions-item>
                        <el-descriptions-item label="任务状态">
                              <el-tag>{{ tableData[currentIndex].status}}</el-tag>
                           <el-tag>{{ tableData[currentIndex].status}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="设备状态">
                           <el-tag>{{ tableData[currentIndex].walkPos }}</el-tag>
                        <el-descriptions-item label="前后极限">
                           {{ tableData[currentIndex].list32[0]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="故障代码">{{ tableData[currentIndex].warnCode }}
                        <el-descriptions-item label="货叉中位1">{{ tableData[currentIndex].list32[1]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="故障描述">{{ tableData[currentIndex].alarm }}
                        <el-descriptions-item label="货叉中位2">{{ tableData[currentIndex].list32[2]}}
                        </el-descriptions-item>
<!--                        <el-descriptions-item label="源站">{{ tableData[currentIndex].staNo }}-->
<!--                        </el-descriptions-item>-->
<!--                        <el-descriptions-item label="目标站">{{ tableData[currentIndex].sourceStaNo }}-->
<!--                        </el-descriptions-item>-->
                        <el-descriptions-item label="货叉前极限">{{ tableData[currentIndex].list32[3]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="货叉后极限">{{ tableData[currentIndex].list32[4]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="行走强减速">{{ tableData[currentIndex].list32[5]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="急停">{{ tableData[currentIndex].list32[6]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="点动前进">{{ tableData[currentIndex].list32[7]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="点动后退">{{ tableData[currentIndex].list33[0]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="点动左伸">{{ tableData[currentIndex].list33[1]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="点动右伸">{{ tableData[currentIndex].list33[2]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="本地远程">{{ tableData[currentIndex].list33[3]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="复位">{{ tableData[currentIndex].list33[4]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="行走抱闸">{{ tableData[currentIndex].list33[5]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="手动顶升">{{ tableData[currentIndex].list34[0]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="顶升上到位">{{ tableData[currentIndex].list34[1]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="顶升下到位">{{ tableData[currentIndex].list34[2]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="左超限">{{ tableData[currentIndex].list34[3]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="右超限">{{ tableData[currentIndex].list34[4]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="前凸出">{{ tableData[currentIndex].list34[5]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="后凸出">{{ tableData[currentIndex].list34[6]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="超高">{{ tableData[currentIndex].list34[7]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="载货台有物">{{ tableData[currentIndex].list32[0]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="左探货1">{{ tableData[currentIndex].list32[1]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="左探货2">{{ tableData[currentIndex].list32[2]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="右探货1">{{ tableData[currentIndex].list32[3]}}
                        </el-descriptions-item>
                        <el-descriptions-item label="右探货2">{{ tableData[currentIndex].list32[4]}}
                        </el-descriptions-item>
                     </el-descriptions>
                  </div>
@@ -159,6 +279,20 @@
               barcodeType:null,
               emptyContainer:null
            },
            formParamD: {
               rgvNo: 1,
               sourceStaNo: null,
               sourceRow: 1,
               sourceBay: 0,
               sourceLev: 1,
               staNo: null,
               row: 1,
               bay: 0,
               lev: 1,
               barcode:null,
               barcodeType:null,
               emptyContainer:null
            },
            enableIn: false,
            enableOut: false,
            options:[
@@ -171,7 +305,11 @@
                  label:'否'
               }
            ],
            demo: 'X'
            demo: 'X',
            rgvMode: 0,
            value1:50000,
            min:8300,
            max:75000
         },
         created() {
            this.init()
@@ -180,6 +318,9 @@
         },
         methods: {
            formatTooltip(){
               return "RGV 1"
            },
            staTova(sta,end){
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
@@ -244,6 +385,8 @@
                  method: 'post',
                  success: function (res) {
                     that.tableData = res.data
                     that.value1 = res.data[0].rgvPos
                  }
               });
            },
@@ -260,8 +403,9 @@
                  contentType: 'application/json;charset=UTF-8',
                  method: 'get',
                  success: function (res) {
                     that.demo = res.msg
                     // console.log(res)
                     that.demo = res.data.demo
                     that.rgvMode = res.data.rgvMode
                  }
               });
            },
@@ -278,6 +422,46 @@
                        'token': localStorage.getItem('token')
                     },
                     data: this.formParam,
                     method: 'POST',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            initiateD(method){
               let urlS = "/rgv/operator/single/step/three/put";
               if (method===1){
                  urlS = "/rgv/operator/single/step/one/put";
               }else if (method === 2){
                  urlS = "/rgv/operator/single/step/two/put";
               }else if (method === 3){
                  urlS = "/rgv/operator/single/step/three/put";
               }else if (method === 4){
                  urlS = "/rgv/operator/single/step/four/put";
               }
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + urlS,
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: this.formParamD,
                     method: 'POST',
                     success: function (res) {
                        if (res.code == 200) {
@@ -431,6 +615,39 @@
         }
      })
   </script>
   <style>
       .el-slider__bar {
         background-color: #e4e7ed;
      }
       .el-slider__button{
          width: 30px !important;
          height: 30px !important;
          border-radius: 2px !important; /* 关键属性 */
          border: 2px solid #409EFF !important;
       }
       .el-slider__runway {
          cursor: not-allowed !important;
          pointer-events: none !important;
       }
       .card-bg{
          width: 100%;
          height: 40px;
          border-radius: 10px;
          display: flex;
          justify-content: center; /* 水平居中 */
          align-items: center; /* 垂直居中 */
          color: #f0f0f0;
          background-color: #9d9d9d;
       }
       .el-slider {
          transform: scaleX(-1);
       }
       /*.el-slider__button-wrapper {*/
         /* transform: scaleX(-1);*/
       /*}*/
   </style>
</body>
</html>