*
lsh
2024-10-23 d14e024c23bb32162725af7cb5405cbd97b575f0
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,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>
@@ -212,10 +224,18 @@
        <!-- Right Task Bar -->
        <div class="task-bar-right right-task-bar">
            <div style="top: 20%;margin-top: 10px">
            <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"  style="margin-top: 200px">
            <div v-if="valueRight === '100' " class="task-bar-div1">
                <el-table
                        :data="tableDataRight"
                        style="width: 100%"
@@ -244,17 +264,6 @@
                    </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>
@@ -265,6 +274,7 @@
                activeNames: ['1'],
                valueLeft: '0',
                valueRight: '0',
                valueSystem: false,
                tableDataRgv: [],
                tableDataDev: [],
                energyGatheringRing: [],
@@ -284,6 +294,7 @@
                    this.getTableDataTrack()
                    this.getTableDataLeft()
                    this.getTableDataRight()
                    this.getValueSystem()
                    setInterval(() => {
                        this.getTableDataRgv()
@@ -291,6 +302,8 @@
                        this.getTableDataTrack()
                        this.getTableDataLeft()
                        this.getTableDataRight()
                        this.getValueSystem()
                    }, 1000)
                },
                handleChange(val) {
@@ -329,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: 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) {
                                that.valueSystem = res.data.status;
                            }
                        }
                    });
                },
                getTableDataLeft() {
                    let that = this;
                    $.ajax({