*
lsh
2025-06-06 f23352f53b2c06313ac9808c62399c7de0d44e3a
src/main/webapp/views/index.html
@@ -59,15 +59,15 @@
        }
        .station {
            position: absolute;
            width: 40px;
            height: 24px;
            /*border-radius: 50%;*/
            width: 20px;
            height: 14px;
            text-align: center;
            line-height: 24px;
            line-height: 1.5; /* 调整行高与字体大小的比值 */
            font-size: 10px; /* 设置更小的字体 */
            font-weight: bold;
            transition: transform 0.3s ease;
            background-color: #ab1839;
            transform: scale(1.2);
            transform: scale(1); /* 可选:如果不需要放大效果 */
        }
        .bus {
            font-size: 10px;
@@ -100,9 +100,35 @@
            z-index: 1000; /* 确保在其他元素之上 */
        }
        .task-bar-left1 {
            position: fixed;
            top: 8%;
            /*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); /* 半透明背景 */
            border-radius: 5px;
            padding: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0);
            z-index: 1000; /* 确保在其他元素之上 */
        }
        .task-bar-right1 {
            position: fixed;
            top: 5%;
            /*transform: translateY(-50%);*/
            width: 25%; /* 设置宽度 */
            background-color: rgba(255, 255, 255, 0); /* 半透明背景 */
@@ -218,17 +244,17 @@
"
                      style="fill:none; stroke:blue; stroke-width:4;" />
            </svg>
            <div class="bus-station">
                <div v-for="(item,i) in devpPos1" class="bus-item-top" :style="'left:' + (75 + i * 15) + 'px'">{{item.dev_no}}</div>
            </div>
            <div class="bus-station" style="flex-direction: column">
                <div v-for="(item,i) in devpPos2" class="bus-item-left" :style="'top:' + (200 + i * 50) + 'px'">{{item.dev_no}}</div>
            </div>
            <div class="bus-station" style="flex-direction: column">
                <div v-for="(item,i) in devpPos3" class="bus-item-left2" :style="'top:' + (100 + i * 10) + 'px'">{{item.dev_no}}</div>
            </div>
            <!-- Stations on outer ring -->
<!--            <div v-for="station in tableDataDev" class="station" :style="{ top: station.valueX + '%', left: station.valueY + '%' }">{{ station.index }}</div>-->
<!--            <div class="bus-station">-->
<!--                <div v-for="(item,i) in devpPos1" class="bus-item-top" :style="'left:' + (75 + i * 15) + 'px'">{{item.dev_no}}</div>-->
<!--            </div>-->
<!--            <div class="bus-station" style="flex-direction: column">-->
<!--                <div v-for="(item,i) in devpPos2" class="bus-item-left" :style="'top:' + (200 + i * 50) + 'px'">{{item.dev_no}}</div>-->
<!--            </div>-->
<!--            <div class="bus-station" style="flex-direction: column">-->
<!--                <div v-for="(item,i) in devpPos3" class="bus-item-left2" :style="'top:' + (100 + i * 10) + 'px'">{{item.dev_no}}</div>-->
<!--            </div>-->
<!--             Stations on outer ring-->
            <div v-for="station in tableDataDev" class="station" :style="{ top: station.valueY + 'px', left: station.valueX + 'px' }">{{ station.index }}</div>
            <div>
                <el-switch
                        style="display: block"
@@ -286,6 +312,14 @@
                            prop="modiTime"
                            label="下发时间">
                    </el-table-column>
                    <el-table-column
                            prop="crnStrTime"
                            label="开始执行时间">
                    </el-table-column>
                    <el-table-column
                            prop="crnEndTime"
                            label="执行结束时间">
                    </el-table-column>
<!--                    <el-table-column-->
<!--                            prop="modiTime"-->
<!--                            label="更新时间">-->
@@ -305,6 +339,50 @@
                                删除
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </div>
        <div class="task-bar-left1 left-task-bar" >
            <div>
                <el-tooltip :content="'Switch value: ' + valueLeft1" placement="top">
                    <el-switch
                            v-model="valueLeft1"
                            active-color="#13ce66"
                            inactive-color="#ff4949"
                            active-value="100"
                            inactive-value="0">
                    </el-switch>
                </el-tooltip>
            </div>
            <div v-if="valueLeft1 === '100' " class="task-bar-div1">
                <el-table
                        :data="tableDataLeft1"
                        style="width: 100%"
                        :row-class-name="tableRowClassName">
                    <el-table-column
                            prop="wrkNo1"
                            label="工作号">
                    </el-table-column>
                    <el-table-column
                            prop="rgvNo"
                            label="RGV号">
                    </el-table-column>
                    <el-table-column
                            prop="sendTime"
                            label="下发时间">
                    </el-table-column>
                    <el-table-column
                            prop="mode"
                            label="类型">
                    </el-table-column>
                    <el-table-column
                            prop="sourceSta"
                            label="起点">
                    </el-table-column>
                    <el-table-column
                            prop="posSta"
                            label="终点">
                    </el-table-column>
                </el-table>
            </div>
@@ -346,6 +424,10 @@
                            label="状态">
                    </el-table-column>
                    <el-table-column
                            prop="error$"
                            label="异常">
                    </el-table-column>
                    <el-table-column
                            label="操作"
                            type="template">
                        <template slot-scope="scope">
@@ -360,6 +442,38 @@
                </el-table>
            </div>
        </div>
        <div class="task-bar-right1 right-task-bar">
            <div>
                <el-tooltip :content="'Switch value: ' + valueRight1" placement="top">
                    <el-switch
                            v-model="valueRight1"
                            active-color="#13ce66"
                            inactive-color="#ff4949"
                            active-value="100"
                            inactive-value="0">
                    </el-switch>
                </el-tooltip>
            </div>
            <div v-if="valueRight1 === '100' " class="task-bar-div1">
                <el-table
                        :data="tableDataRight1"
                        style="width: 100%"
                        :row-class-name="tableRowClassName">
                    <el-table-column
                            prop="rgvNo"
                            label="小车号">
                    </el-table-column>
                    <el-table-column
                            prop="error"
                            label="异常">
                    </el-table-column>
                    <el-table-column
                            prop="createTime$"
                            label="记录日期">
                    </el-table-column>
                </el-table>
            </div>
        </div>
    </div>
    <script>
@@ -368,7 +482,9 @@
            data: {
                activeNames: ['1'],
                valueLeft: '0',
                valueLeft1: '0',
                valueRight: '0',
                valueRight1: '0',
                licenseDay: '已过期',
                licenseDayI: 100,
                valueSystem: false,
@@ -376,7 +492,9 @@
                tableDataDev: [],
                energyGatheringRing: [],
                tableDataLeft: [],
                tableDataLeft1: [],
                tableDataRight: [],
                tableDataRight1: [],
                devpPos1:[
                    {dev_no: 116,pos:633980},
                    {dev_no: 117,pos:604043},
@@ -431,7 +549,9 @@
                    this.getTableDataDev()
                    this.getTableDataTrack()
                    this.getTableDataLeft()
                    this.getTableDataLeft1()
                    this.getTableDataRight()
                    this.getTableDataRight1()
                    this.getValueSystem()
                    this.getLicenseDays()
@@ -440,11 +560,29 @@
                        this.getTableDataDev()
                        this.getTableDataTrack()
                        this.getTableDataLeft()
                        this.getTableDataLeft1()
                        this.getTableDataRight()
                        this.getTableDataRight1()
                        this.getValueSystem()
                        this.getLicenseDays()
                    }, 1000)
                },
                verifyPassword(callback) {
                    this.$prompt('请输入管理员密码: root', '验证', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        inputType: 'password',
                        inputPattern: /^root$/,
                        inputErrorMessage: '密码错误'
                    }).then(({ value }) => {
                        if (value === 'root') {
                            callback();
                        }
                    }).catch(() => {
                        this.$message.info('已取消操作');
                    });
                },
                handleChange(val) {
                    console.log(val);
@@ -455,6 +593,18 @@
                        if (val.length >= 1){
                            this.handleChangeValueRight(1)
                        }
                    }
                },
                handleChange1(val) {
                    console.log(val);
                    if (val.length === 0){
                        valueRight1 = '0';
                    } else {
                        console.log("2222"+val);
                        if (val.length >= 1){
                            this.handleChangeValueRight1(1)
                        }
                    }
                },
@@ -529,6 +679,22 @@
                            valueRight = '0';
                    }
                },
                handleChangeValueRight1(val) {
                    console.log("33333"+val);
                    switch (val){
                        case 1:
                            valueRight1 = '100';
                        case 2:
                            valueRight1 = '100';
                        case 3:
                            valueRight1 = '100';
                        case 4:
                            valueRight1 = '100';
                        default:
                            valueRight1 = '0';
                    }
                },
                tableRowClassName({row, rowIndex}) {
                    if (rowIndex === 1) {
                        return 'warning-row';
@@ -578,20 +744,22 @@
                },
                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;
                            }
                    this.verifyPassword(() => {
                        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() {
@@ -610,6 +778,22 @@
                        }
                    });
                },
                getTableDataLeft1() {
                    let that = this;
                    $.ajax({
                        url: baseUrl + "/rgv/ring/through/task/wrk/mast/position/data/v1",
                        headers: {
                            'token': localStorage.getItem('token')
                        },
                        data: {},
                        dataType: 'json',
                        contentType: 'application/json;charset=UTF-8',
                        method: 'post',
                        success: function (res) {
                            that.tableDataLeft1 = res.data
                        }
                    });
                },
                getTableDataRight() {
                    let that = this;
                    $.ajax({
@@ -626,6 +810,22 @@
                        }
                    });
                },
                getTableDataRight1() {
                    let that = this;
                    $.ajax({
                        url: baseUrl + "/rgv/task/rgv/circular/shuttle/mast/position/data/v1",
                        headers: {
                            'token': localStorage.getItem('token')
                        },
                        data: {},
                        dataType: 'json',
                        contentType: 'application/json;charset=UTF-8',
                        method: 'post',
                        success: function (res) {
                            that.tableDataRight1 = res.data
                        }
                    });
                },
                getTableDataRgv() {
                    let that = this;
                    // that.tableDataRgv = busPsto