<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <title>无纸化集中业务管理系统</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link charset="utf-8" rel="stylesheet" href="/static/css/layui.css?v=1.0.0">
        <link rel="stylesheet" href="/static/css/temp.css" media="all">
        <script src="/static/js/jquery-1.8.2.min.js?v=1.0.0"></script>
        <script src="/static/js/layui.js?v=1.0.0"></script>
        <script src="/static/js/api.config.js"></script>
        <script src="/static/js/util.js?v=1.0.0"></script>
        <script src="/static/js/customform.js?v=1.0.0"></script>
        <script src="/static/js/url.js?v=1.0.0"></script>
        <script src="/static/js/lay/lay-config.js?v=1.0.0"></script>
        <script src="/static/css/inconfont/iconfont.js"></script>
        <script src="/static/js/jquery-ui.min.js"></script>
    </head>
    <body class="bg-info">

        <div>

            <div>

                <form class="ag-form layui-form" ag-data-index="1" ag-data-ctx="bpm" ag-data-url="/api/nodeInit"
                    ag-form-callBack="initNode">


                    <div class="layui-inline ">
                        <label class="layui-form-label">环节名称：</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="stepId">
                            <input class='myinput' type="text" name="stepName" ag-verify="required" autocomplete="off"
                                placeholder="环节名称" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline ">
                        <label class="layui-form-label">处理角色：</label>
                        <div class="layui-input-block">
                            <select class='mysel' name="roleCode" ag-sel-name="roleName">

                            </select>
                        </div>
                    </div>

                    <div class="layui-inline ">
                        <label class="layui-form-label">派单方式：</label>
                        <div class="layui-input-block">
                            <select class='mysel' name="dispatchType" ag-sel-name="dispathTypeDesc">

                            </select>
                        </div>
                    </div>

                    <div class="layui-inline ">
                        <label class="layui-form-label">处理表单：</label>
                        <div class="layui-input-block">
                            <select class='mysel' name="actionUrl" ag-sel-name="actionName">

                            </select>
                        </div>
                    </div>

                    <div class="layui-inline ">
                        <label class="layui-form-label">插件：</label>
                        <div class="layui-input-block">
                            <select class='mysel' id="selopt" name="prePluginDesc" lay-filter="aihao">

                            </select>
                            <input type="hidden" name="getPrePluginDesc" id="seloptDesc">
                            <input type="hidden" name="getPrePluginName" id="seloptname">
                        </div>
                    </div>
					
					<div class="layui-inline">
					    <label class="layui-form-label">预警时间：</label>
						<div class="layui-input-block">
						    <input class='myinput' type="text" 
						        placeholder="预警时间" class="layui-input">
						</div>
					</div>
					
					<div class="layui-inline">
					    <label class="layui-form-label">告警时间：</label>
						<div class="layui-input-block">
						    <input class='myinput' type="text" 
						        placeholder="告警时间" class="layui-input">
						</div>
					</div>

                </form>
                <div class="layui-card-footer">
                    <button class="layui-btn layui-btn-sm layui-btn-normal flow-save " ag-data-index="1">
                        <i class="layui-icon layui-icon-ok-circle "></i>
                        <span class="btn-span-middle">保存</span>
                    </button>
                    <button class="ag-btn-cancel  layui-btn layui-btn-sm layui-btn-normal flow-nosave">
                        <i class="layui-icon layui-icon-close "></i>
                        <span class="btn-span-middle">取消</span>
                    </button>
                </div>
            </div>



        </div>
    </body>
    <script src="../../js/flowNode.js"></script>
    <script>
        var actionName = [];
        util.ajaxJson("", '/bpm/api/queryBpmPrePluginList', {}, function (page) {
            actionName = page;
            let opt = '';
            for(let i=0;i<page.length;i++){
                opt += '<option value ="'+page[i].implClassDesc+'">'+page[i].implClassDesc+'</option>'
            }
            document.getElementById('selopt').innerHTML = opt;
            document.getElementById("selopt").value = '';
            // document.getElementsByName("getPrePluginDesc")[0].value = actionName[0].implClassDesc;
            // document.getElementsByName("getPrePluginName")[0].value = actionName[0].implClassName;
        })

        layui.use(['form', 'layedit', 'laydate'], function () {
            var form = layui.form;
            form.on('select(aihao)', function (data) {
                for(let i=0;i<actionName.length;i++){
                    if(actionName[i].implClassDesc == data.value){
                        document.getElementsByName("getPrePluginDesc")[0].value = actionName[i].implClassDesc;
                        document.getElementsByName("getPrePluginName")[0].value = actionName[i].implClassName;
                    }
                }
            });
        });
    </script>


</html>
<style>
    .layui-unselect {
        width: 101%;
    }

    .ag-form {
        /* height: 400px !important; */
        /* overflow: hidden!important; */
        padding-top: 20px;
    }

    .layui-inline {
        margin-bottom: 20px;
        width: 100%;
    }

    .layui-card {
        padding: 20px;
    }

    .layui-form-label {
        height: 28px;
        line-height: 28px;
    }

    .layui-input-block {
        display: inline-block;
        width: 75%;
    }

    .myinput {
        width: 100%;
        display: inline-block;
        outline: none;
        border: 1px solid #ddd;
        height: 32px;
        padding-left: 10px;
        border-radius: 5px;
    }

    .myinput:focus {
        border: 1px solid #48A2FF;
    }

    .mysel {
        width: 103%;
        display: inline-block;
        outline: none;
        border: 1px solid #ddd;
        height: 36px;
        padding-left: 10px;
        border-radius: 5px;
    }

    .mysel:focus {
        border: 1px solid #48A2FF;
    }

    .layui-card-footer {
        position: absolute;
        bottom: 20px;
        right: 20px;
    }

    .layui-btn {
        width: 80px;
        height: 32px;
        border: transparent;
        color: #fff;
        background: #48A2FF;
        border-radius: 5px;
        outline: none;
        cursor: pointer;
        margin-left: 10px;
    }

    .layui-btn:hover {
        background: #48a2ffab;
    }

    .ag-btn-cancel {
        border: 1px solid #ddd;
        background: #fff;
        color: #999;
    }

    .ag-btn-cancel:hover {
        border: 1px solid #40B6FF;
        background: #ECF5FF;
        color: #40B6FF;
    }
</style>
<style type="text/css">
    .ag-form {
        /* height: auto !important; */
    }

    .layui-card-footer {
        border: transparent;
        position: absolute;
        bottom: 20px;
        right: 20px;
    }

    .layui-btn {
        width: 80px;
        height: 32px;
        border: transparent;
        color: #fff;
        background: #48A2FF;
        border-radius: 5px;
        outline: none;
        cursor: pointer;
        margin-left: 10px;
    }

    .layui-btn:hover {
        background: #48a2ffab;
    }

    .ag-btn-cancel {
        border: 1px solid #ddd;
        background: #fff;
        color: #999;
    }

    .ag-btn-cancel:hover {
        border: 1px solid #40B6FF;
        background: #ECF5FF;
        color: #40B6FF;
    }

    .bg-info {
        background: #fff;
    }

    .layui-card {
        box-shadow: none;
    }

    .layui-card-body {
        padding: 0;
        overflow: hidden;
    }

    .layui-card-form {
        margin: 0;
        padding: 20px;
        position: static;
    }

    .btn-span-middle {
        float: none;
    }

    .layui-form-label {
        height: 36px;
        line-height: 36px;
        padding: 0;
        float: none;
        display: inline-block;
        width: 15%;
        text-align: right;
    }

    .layui-input-block {
        display: inline-block;
        width: 75%;
        margin: 0;
    }

    .myinput {
        width: 100%;
        display: inline-block;
        outline: none;
        border: 1px solid #ddd;
        height: 36px;
        padding-left: 10px;
        border-radius: 5px;
    }

    .myinput:focus {
        border: 1px solid #48A2FF;
    }
</style>
