From da1c0be7b573ca68fef10f9627bb4225bb327a2d Mon Sep 17 00:00:00 2001
From: hmpc <hmpc>
Date: 星期一, 04 十一月 2024 13:35:49 +0800
Subject: [PATCH] *
---
src/main/webapp/views/index.html | 120 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 85 insertions(+), 35 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 0b16eeb..9bdc716 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -86,8 +86,8 @@
.task-bar-left {
position: fixed;
- top: 10%;
- transform: translateY(-50%);
+ top: 1%;
+ /*transform: translateY(-50%);*/
width: 25%; /* 璁剧疆瀹藉害 */
background-color: rgba(255, 255, 255, 0); /* 鍗婇�忔槑鑳屾櫙 */
@@ -99,8 +99,8 @@
.task-bar-right {
position: fixed;
- top: 20%;
- transform: translateY(-50%);
+ top: 1%;
+ /*transform: translateY(-50%);*/
width: 25%; /* 璁剧疆瀹藉害 */
background-color: rgba(255, 255, 255, 0); /* 鍗婇�忔槑鑳屾櫙 */
@@ -111,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; /* 璺濈鍙宠竟鐨勮窛绂� */
}
@@ -146,14 +148,35 @@
<!-- 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="#A64036"
+ 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 left-task-bar" >
- <div v-if="valueLeft === '100' " class="task-bar-div1" style="margin-top: 200px">
+ <div>
+ <el-tooltip :content="'Switch value: ' + valueLeft" placement="top">
+ <el-switch
+ v-model="valueLeft"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ active-value="100"
+ inactive-value="0">
+ </el-switch>
+ </el-tooltip>
+ </div>
+ <div v-if="valueLeft === '100' " class="task-bar-div1">
<el-table
:data="tableDataLeft"
style="width: 100%"
@@ -190,17 +213,21 @@
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-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 class="task-bar-right right-task-bar">
<div>
- <el-tooltip :content="'Switch value: ' + valueLeft" placement="top">
+ <el-tooltip :content="'Switch value: ' + valueRight" placement="top">
<el-switch
- v-model="valueLeft"
+ v-model="valueRight"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="100"
@@ -208,11 +235,7 @@
</el-switch>
</el-tooltip>
</div>
- </div>
-
- <!-- Right Task Bar -->
- <div class="task-bar-right right-task-bar">
- <div v-if="valueRight === '100' " class="task-bar-div1" style="margin-top: 200px">
+ <div v-if="valueRight === '100' " class="task-bar-div1">
<el-table
:data="tableDataRight"
style="width: 100%"
@@ -234,23 +257,12 @@
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-column-->
+<!-- prop=""-->
+<!-- label="鎿嶄綔">-->
+<!-- <el-button type="primary" icon="el-icon-edit" circle></el-button>-->
+<!-- </el-table-column>-->
</el-table>
- </div>
- <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>
</div>
@@ -262,6 +274,7 @@
activeNames: ['1'],
valueLeft: '0',
valueRight: '0',
+ valueSystem: false,
tableDataRgv: [],
tableDataDev: [],
energyGatheringRing: [],
@@ -281,6 +294,7 @@
this.getTableDataTrack()
this.getTableDataLeft()
this.getTableDataRight()
+ this.getValueSystem()
setInterval(() => {
this.getTableDataRgv()
@@ -288,6 +302,8 @@
this.getTableDataTrack()
this.getTableDataLeft()
this.getTableDataRight()
+ this.getValueSystem()
+
}, 1000)
},
handleChange(val) {
@@ -326,6 +342,40 @@
}
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(){
+ 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) {
+ that.valueSystem = res.data.status;
+ }
+ }
+ });
+ },
getTableDataLeft() {
let that = this;
$.ajax({
--
Gitblit v1.9.1