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 |   70 +++++++++++++++++++++++++++++-----
 1 files changed, 59 insertions(+), 11 deletions(-)

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index e58f38b..9bdc716 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -148,7 +148,17 @@
 
             <!-- 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>
@@ -203,11 +213,11 @@
                             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>
@@ -247,11 +257,11 @@
                             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>
@@ -264,6 +274,7 @@
                 activeNames: ['1'],
                 valueLeft: '0',
                 valueRight: '0',
+                valueSystem: false,
                 tableDataRgv: [],
                 tableDataDev: [],
                 energyGatheringRing: [],
@@ -283,6 +294,7 @@
                     this.getTableDataTrack()
                     this.getTableDataLeft()
                     this.getTableDataRight()
+                    this.getValueSystem()
 
                     setInterval(() => {
                         this.getTableDataRgv()
@@ -290,6 +302,8 @@
                         this.getTableDataTrack()
                         this.getTableDataLeft()
                         this.getTableDataRight()
+                        this.getValueSystem()
+
                     }, 1000)
                 },
                 handleChange(val) {
@@ -328,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