*
lsh
2024-10-23 cb0ee1254500db12525f1288c47d7499677d4eb7
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="#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>
@@ -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,48 @@
                    }
                    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;
                    $.ajax({