自动化立体仓库 - WCS系统
*
lsh
2024-10-23 cb0ee1254500db12525f1288c47d7499677d4eb7
*
3个文件已修改
64 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/ConsoleController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/param/SystemSwitchParam.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/index.html 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -49,13 +49,13 @@
    private BasDevpService basDevpService;
    @PostMapping("/system/running/status")
    @ManagerAuth(memo = "系统运行状态")
//    @ManagerAuth(memo = "系统运行状态")
    public R systemRunningStatus(){
        return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get()));
    }
    @PostMapping("/system/switch")
    @ManagerAuth(memo = "系统运行开关操作")
//    @ManagerAuth(memo = "系统运行开关操作")
    public R systemSwitch(SystemSwitchParam param) throws InterruptedException {
        if (Cools.isEmpty(param.getOperatorType())){
            return R.error();
src/main/java/com/zy/asrs/domain/param/SystemSwitchParam.java
@@ -10,7 +10,7 @@
    private Integer operatorType;
    // 密码口令
    private String password;
    private String password = "root";
    public Integer getOperatorType() {
        return operatorType;
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({