start.html 4.85 KB
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
    .startPage {
        margin-top: 13%;
        margin-left: 20%;
        font-size: 19px;
    }

    .btn {
        display: inline-block;
        padding: 6px 12px;
        margin-bottom: 0;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.42857143;
        text-align: center;
        white-space: nowrap;
        vertical-align: middle;
        -ms-touch-action: manipulation;
        touch-action: manipulation;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        background-image: none;
        border: 1px solid transparent;
        border-radius: 4px;
    }

    /*.btn-sm {*/
    /*    font-size: 14px;*/
    /*    line-height: 1.5;*/
    /*    padding: 5px 10px;*/
    /*    border-radius: 3px;*/
    /*}*/
</style>
<body class="gray-bg">

<div class="container-div">
    <div class="row">
        <div>

        </div>


        <div class="col-sm-12 ">
            <form id="job-form">
                <div class="select-list startPage">
                    <ul>

                        <li>
                            展厅任务类型:<select name="presentationType" id="presentationType">
                            <option value="1">AGV堆垛机出库演示</option>
                            <option value="2">堆垛机移库演示</option>
                        </select>
                        </li>
                        <li>
                            是否开启叉车AGV库:<select name="startAgvZone" id="startAgvZone">
                            <option value="1">开启</option>
                            <option value="2">不开启</option>
                        </select>
                        </li>
                        <br/>
                        <br/>
                        <br/>
                        <li style="margin-left: 30%;">
                            <!--                            <li>-->
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="startPresentationMode(1)"><i
                                    class="fa fa-play"></i>&nbsp;开启</a>
                            <a class="btn btn-warning btn-rounded btn-sm" style="margin-left: 22px;"
                               onclick="startPresentationMode(2)"><i
                                    class="fa fa-pause"></i>&nbsp;关闭</a>
                            <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
                            <!--                            </li>-->
                        </li>
                    </ul>

                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    var prefix = ctx + "monitor/presentationMode";

    $(function () {
    })

    function startPresentationMode(type) {
        var presentationType = $("#presentationType").val()
        var startAgvZone = $("#startAgvZone").val();
        if (type == 1) {
            let data = {
                "presentationType": presentationType,
                "startAgvZone": startAgvZone,
                "startTag": 1
            }
            $.modal.confirm("确认要启用演示模式吗?", function () {
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: prefix + "/startPresentationMode",
                    data: data,
                    async: false,
                    error: function (request) {
                        $.modal.alertError("请求失败!");
                    },
                    success: function (data) {
                        $.modal.msgSuccess("关闭成功");
                    }
                });
            })
        } else {
            let data = {
                "presentationType": presentationType,
                "startAgvZone": startAgvZone,
                "startTag": 2
            }
            $.modal.confirm("确认要关闭演示模式吗?", function () {
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: prefix + "/startPresentationMode",
                    data: data,
                    async: false,
                    error: function (request) {
                        $.modal.alertError("请求失败!");
                    },
                    success: function (data) {
                        $.modal.msgSuccess("关闭成功");
                    }
                });
            })
        }

    }
</script>
</body>
</html>