From cb0ee1254500db12525f1288c47d7499677d4eb7 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期三, 23 十月 2024 16:05:23 +0800
Subject: [PATCH] *
---
src/main/webapp/views/index.html | 210 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 188 insertions(+), 22 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index befcbfe..a055afc 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -4,6 +4,8 @@
<meta charset="utf-8">
<title>鐜舰绌挎杞︽櫤鑳界郴缁�</title>
<link rel="stylesheet" href="../static/css/element.css">
+ <link rel="stylesheet" href="../static/css/element-ui.css">
+ <link rel="icon" href="../static/images/favicon.ico" type="image/x-icon">
<script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../static/js/common.js"></script>
<script type="text/javascript" src="../static/js/vue.min.js"></script>
@@ -82,10 +84,23 @@
transform: scale(1.4);
}
- .task-bar {
+ .task-bar-left {
position: fixed;
- top: 10%;
- transform: translateY(-50%);
+ top: 1%;
+ /*transform: translateY(-50%);*/
+ width: 25%; /* 璁剧疆瀹藉害 */
+ background-color: rgba(255, 255, 255, 0); /* 鍗婇�忔槑鑳屾櫙 */
+
+ border-radius: 5px;
+ padding: 10px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0);
+ z-index: 1000; /* 纭繚鍦ㄥ叾浠栧厓绱犱箣涓� */
+ }
+
+ .task-bar-right {
+ position: fixed;
+ top: 1%;
+ /*transform: translateY(-50%);*/
width: 25%; /* 璁剧疆瀹藉害 */
background-color: rgba(255, 255, 255, 0); /* 鍗婇�忔槑鑳屾櫙 */
@@ -96,16 +111,18 @@
}
.task-bar-div1 {
- width: 100%; /* 璁剧疆瀹藉害 */
+ /*width: 100%; !* 璁剧疆瀹藉害 *!*/
background-color: rgba(255, 255, 255, 0.8); /* 鍗婇�忔槑鑳屾櫙 */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.left-task-bar {
left: 20px; /* 璺濈宸﹁竟鐨勮窛绂� */
+ /*bottom: 100px;*/
}
.right-task-bar {
+ /*bottom: 100px;*/
right: 20px; /* 璺濈鍙宠竟鐨勮窛绂� */
}
@@ -131,17 +148,27 @@
<!-- Stations on outer ring -->
<div v-for="station in tableDataDev" class="station" :style="{ top: station.valueX + '%', left: station.valueY + '%' }">{{ station.index }}</div>
-
+ <div>
+ <el-switch
+ style="display: block"
+ v-model="valueSystem"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ active-text="绯荤粺杩愯涓�..."
+ inactive-text="绯荤粺宸插仠姝�!"
+ @change='upDateValueSystem'>
+ </el-switch>
+ </div>
<!-- Buses -->
<div v-for="bus in tableDataRgv" class="bus" :style="{ top: bus.valueX + '%', left: bus.valueY + '%' , borderColor: bus.modeColor, backgroundColor: bus.statusColor}">{{ bus.index }}</div>
</div>
<!-- Left Task Bar -->
- <div class="task-bar left-task-bar" >
+ <div class="task-bar-left left-task-bar" >
<div>
- <el-tooltip :content="'Switch value: ' + value" placement="top">
+ <el-tooltip :content="'Switch value: ' + valueLeft" placement="top">
<el-switch
- v-model="value"
+ v-model="valueLeft"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="100"
@@ -149,15 +176,18 @@
</el-switch>
</el-tooltip>
</div>
- <div v-if="value === '100' ">
+ <div v-if="valueLeft === '100' " class="task-bar-div1">
<el-table
:data="tableDataLeft"
style="width: 100%"
:row-class-name="tableRowClassName">
<el-table-column
prop="wrkNo"
- label="宸ヤ綔鍙�"
- width="80">
+ label="宸ヤ綔鍙�">
+ </el-table-column>
+ <el-table-column
+ prop="rgvNo"
+ label="RGV鍙�">
</el-table-column>
<el-table-column
prop="wrkSts$"
@@ -175,24 +205,65 @@
prop="modiTime"
label="涓嬪彂鏃堕棿">
</el-table-column>
- <el-table-column
- prop="modiTime"
- label="鏇存柊鏃堕棿">
- </el-table-column>
+<!-- <el-table-column-->
+<!-- prop="modiTime"-->
+<!-- label="鏇存柊鏃堕棿">-->
+<!-- </el-table-column>-->
<el-table-column
prop="rgvSts"
label="RGV鐘舵��">
+ </el-table-column>
+ <el-table-column
+ prop=""
+ label="鎿嶄綔">
+ <el-button type="primary" icon="el-icon-edit" circle></el-button>
</el-table-column>
</el-table>
</div>
</div>
<!-- Right Task Bar -->
- <div id = "app3" class="task-bar right-task-bar">
- <h3>浠诲姟淇℃伅</h3>
- <p>浠诲姟3: 鎻忚堪3</p>
- <p>浠诲姟4: 鎻忚堪4</p>
- <!-- 杩欓噷鍙互鍔ㄦ�佺敓鎴愪换鍔′俊鎭� -->
+ <div class="task-bar-right right-task-bar">
+ <div>
+ <el-tooltip :content="'Switch value: ' + valueRight" placement="top">
+ <el-switch
+ v-model="valueRight"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ active-value="100"
+ inactive-value="0">
+ </el-switch>
+ </el-tooltip>
+ </div>
+ <div v-if="valueRight === '100' " class="task-bar-div1">
+ <el-table
+ :data="tableDataRight"
+ style="width: 100%"
+ :row-class-name="tableRowClassName">
+ <el-table-column
+ prop="rgvId"
+ label="缂栧彿"
+ width="80">
+ </el-table-column>
+ <el-table-column
+ prop="rgvNo"
+ label="灏忚溅鍙�">
+ </el-table-column>
+ <el-table-column
+ prop="position"
+ label="浣嶇疆">
+ </el-table-column>
+ <el-table-column
+ prop="status$"
+ label="鐘舵��">
+ </el-table-column>
+ <el-table-column
+ prop=""
+ label="鎿嶄綔">
+ <el-button type="primary" icon="el-icon-edit" circle></el-button>
+ </el-table-column>
+ </el-table>
+ </div>
</div>
</div>
@@ -200,11 +271,15 @@
var app = new Vue({
el: '#app',
data: {
- value: '100',
+ activeNames: ['1'],
+ valueLeft: '0',
+ valueRight: '0',
+ valueSystem: false,
tableDataRgv: [],
tableDataDev: [],
energyGatheringRing: [],
- tableDataLeft: []
+ tableDataLeft: [],
+ tableDataRight: []
},
created(){
this.init();
@@ -218,13 +293,46 @@
this.getTableDataDev()
this.getTableDataTrack()
this.getTableDataLeft()
+ this.getTableDataRight()
+ this.getValueSystem()
setInterval(() => {
this.getTableDataRgv()
this.getTableDataDev()
this.getTableDataTrack()
this.getTableDataLeft()
+ this.getTableDataRight()
+ this.getValueSystem()
+
}, 1000)
+ },
+ handleChange(val) {
+ console.log(val);
+ if (val.length === 0){
+ valueRight = '0';
+ } else {
+ console.log("2222"+val);
+
+ if (val.length >= 1){
+ this.handleChangeValueRight(1)
+ }
+ }
+ },
+ handleChangeValueRight(val) {
+ console.log("33333"+val);
+
+ switch (val){
+ case 1:
+ valueRight = '100';
+ case 2:
+ valueRight = '100';
+ case 3:
+ valueRight = '100';
+ case 4:
+ valueRight = '100';
+ default:
+ valueRight = '0';
+ }
},
tableRowClassName({row, rowIndex}) {
if (rowIndex === 1) {
@@ -233,6 +341,48 @@
return 'success-row';
}
return '';
+ },
+ getValueSystem() {
+ let that = this;
+ $.ajax({
+ url: baseUrl + "/console/system/running/status",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {},
+ dataType: 'json',
+ contentType: 'application/json;charset=UTF-8',
+ method: 'post',
+ success: function (res) {
+ that.valueSystem = res.data.status
+ }
+ });
+ },
+ upDateValueSystem: function (){
+ let that = this;
+ let operatorTypeI = 0;
+ if (that.valueSystem){
+ operatorTypeI = 1;
+ }
+ $.ajax({
+ url: baseUrl + "/console/system/switch",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {
+ operatorType : operatorTypeI
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ if (res.data.status) {
+ that.valueSystem = true;
+ } else {
+ that.valueSystem = false;
+ }
+ }
+ }
+ });
},
getTableDataLeft() {
let that = this;
@@ -250,6 +400,22 @@
}
});
},
+ getTableDataRight() {
+ let that = this;
+ $.ajax({
+ url: baseUrl + "/rgv/task/rgv/circular/shuttle/mast/position/data",
+ headers: {
+ 'token': localStorage.getItem('token')
+ },
+ data: {},
+ dataType: 'json',
+ contentType: 'application/json;charset=UTF-8',
+ method: 'post',
+ success: function (res) {
+ that.tableDataRight = res.data
+ }
+ });
+ },
getTableDataRgv() {
let that = this;
$.ajax({
--
Gitblit v1.9.1