Pārlūkot izejas kodu

中台-接口申请

limeng 2 gadi atpakaļ
vecāks
revīzija
82a8fab3f3

+ 83 - 0
leiSP-admin/src/main/resources/static/ajax/libs/lustep/index.html

@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+    <link type="text/css" rel="styleSheet" href="./step.css" />
+    <!-- <script src="./jquery-3.5.1.min.js"></script> -->
+    <script src="https://www.jq22.com/jquery/jquery-2.1.1.js"></script>
+    <script src="./step.js"></script>
+</head>
+
+<style>
+    .btnext{
+      background: blue;
+      color: #fff;
+      text-align: center;
+      border-radius: 10px;
+      float: left;
+      margin-right: 10px;
+      padding: 10px 10px;
+      cursor: pointer;
+    }
+    input{
+        width: 160px;
+        height: 40px;
+        border: 1px solid #e9e9e9;
+        padding-left: 10px;
+        float: left;
+        margin-right: 10px;
+    }
+</style>
+
+<body>
+    <div id="test" style="width: 600px;margin-top: 200px;margin-left: 50px;border: 1px solid #e9e9e9;height: 40px; padding: 36px 0px;">
+
+        <div id="luStep">
+        </div>
+
+    </div>
+    <div style="margin-top: 34px; margin-left: 100px;">
+        <div class="btnext" onclick="next()">下一步</div>
+        <div class="btnext" onclick="btup()">上一步</div>
+        <input type="number" value=""  placeholder="响应式测试,输入宽度"> <div class="btnext" onclick="divWight()">确定宽度 </div>
+    </div>
+
+</body>
+
+
+<script>
+    data = {
+        data: ['开始', '政数局审批', '${deptName}审批', '完成'],
+        index: 1 //0是第一步(0~3)
+    }
+
+
+
+    var dom = $('#luStep');
+    dom.stepInit(data);
+
+
+
+    var key=0;
+    function next(){ //点击下一步
+        if(key>=3) return;
+        key++;
+        dom.toStep(key);
+    }
+    function btup(){
+        if(key<=0) return;
+        key--;
+        dom.toStep(key);
+    }
+    function divWight(){
+       var value =$('input').val();
+       $("#test").css({ width:value+'px'})
+       dom.empty();
+       dom.stepInit(data);
+    }
+
+</script>
+
+</html>

+ 60 - 0
leiSP-admin/src/main/resources/static/ajax/libs/lustep/step.css

@@ -0,0 +1,60 @@
+ul,li{
+    list-style: none;
+    margin: 0px;
+    padding: 0px;
+}
+
+.bar-box{
+    position: relative;
+    top: 11px;
+    left: 10px;
+}
+
+.bar-content{
+    position: relative;
+    z-index: 9999;
+}
+
+.bar-bg{
+    width: 100%;
+    height: 6px;
+    background: #ddd;
+    position: relative;
+}
+
+.bar-color{
+    width: 0%;
+    height: 6px;
+    background: #64bd2e;
+    position: absolute;
+    left: 0px;
+    top: 0px;
+    /* position: relative;
+    top: -32px; */
+}
+
+.bar-circle-ul{}
+
+.bar-circle-ul li{
+    float: left;
+}
+
+.bar-circle-ul li div{
+    width: 32px;
+    height: 32px;
+    text-align: center;
+    line-height: 32px;
+    display: inline-block;
+    border-radius: 50%;
+    background: #ddd;
+    color: #252525;
+    position: relative;
+}
+
+.bar-circle-ul li div span{
+    position: absolute;
+    top: -33px;
+    color: #7c7c7c;
+    left: -254%;
+    width: 200px;
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 61 - 0
leiSP-admin/src/main/resources/static/ajax/libs/lustep/step.js


+ 12 - 0
leiSP-admin/src/main/resources/templates/include.html

@@ -195,3 +195,15 @@
 <div th:fragment="bootstrap-table-fixed-columns-js">
 	<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.min.js?v=20200727}"></script>
 </div>
+
+<!-- lusetp.css -->
+<div th:fragment="lustep-css">
+	<link th:href="@{/ajax/libs/lustep/step.css}" rel="stylesheet"/>
+</div>
+
+<!-- lusetp.js -->
+<div th:fragment="lustep-js">
+	<script th:src="@{/ajax/libs/lustep/step.js}"></script>
+</div>
+
+

+ 167 - 126
mybusiness/src/main/resources/templates/apply/record/add.html

@@ -5,169 +5,210 @@
     <th:block th:include="include :: layout-latest-css" />
     <th:block th:include="include :: ztree-css" />
     <th:block th:include="include :: datetimepicker-css" />
+    <th:block th:include="include :: lustep-css" />
+    <th:block th:include="include :: select2-css" />
+    <th:block th:include="include :: bootstrap-fileinput-css" />
 </head>
 <body class="gray-bg">
-    <form class="form-horizontal m" id="form-record-add">
-
-        <div class="ui-layout-west">
-            <div class="box box-main">
-                <div class="box-header">
-                    <div class="box-title">
-                        <i class="fa icon-grid"></i> 组织机构
-                    </div>
-                    <div class="box-tools pull-right">
-                        <button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
-                        <button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
-                        <button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
+<div class="wrapper wrapper-content animated fadeInRight">
+    <div class="row">
+        <div class="col-sm-12">
+            <!--步骤条start-->
+            <div class="ibox">
+                <div class="ibox-title">
+                    <div id="test" style="height: 40px; padding: 36px 0px;">
+                        <div id="luStep"></div>
                     </div>
                 </div>
-                <div class="ui-layout-content">
-                    <div id="tree" class="ztree"></div>
+            </div>
+            <!--步骤条end-->
+            <!--主表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <form method="get" class="form-horizontal">
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">申请部门名称</label>
+                            <div class="col-sm-4">
+                                <input type="text" class="form-control">
+                            </div>
+                            <label class="col-sm-2 control-label">申请人</label>
+                            <div class="col-sm-4">
+                                <input type="text" class="form-control">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">联系方式</label>
+                            <div class="col-sm-4">
+                                <input type="text" class="form-control">
+                            </div>
+                            <label class="col-sm-2 control-label">调用者IP</label>
+                            <div class="col-sm-4">
+                                <input type="input" class="form-control" name="">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">提供接口部门</label>
+                            <div class="col-sm-10">
+                                <div class="input-group">
+                                    <input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
+                                    <span class="input-group-addon"><i class="fa fa-search"></i></span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">每天调用频率</label>
+                            <div class="col-sm-4">
+                                <input type="input" class="form-control" name="">
+                            </div>
+                            <label class="col-sm-2 control-label">使用时效</label>
+                            <div class="col-sm-4">
+                                <div class="input-group date">
+                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                                    <input type="text" class="form-control" id="datetime" name="datetime" placeholder="从 - 至" required>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
                 </div>
             </div>
-        </div>
+            <!--主表字段end-->
+            <!--接口start-->
+            <div class="ibox">
+                <div class="ibox-title">
+                    <button type="button" class="btn btn-w-m btn-success">获取部门接口</button>
+                </div>
+                <div class="ibox-content">
+                    <div class="panel-body">
+                        <div class="panel-group" id="accordion">
+                            <div class="panel panel-default">
+                                <div class="panel-heading">
+                                    <h5 class="panel-title">
+                                        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">吉林省-契税完税证信息-数据查询接口</a>
+                                    </h5>
+                                </div>
+                                <div id="collapseOne" class="panel-collapse collapse">
+                                    <div class="panel-body">
+                                        <form class="form-horizontal">
+                                            <div class="form-group">
+                                                <label class="col-sm-2 control-label">接口地址</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control"  disabled name="/api/jptssta/getQsWszInfo">
+                                                </div>
+                                            </div>
+                                            <div class="form-group">
+                                                <label class="col-sm-2 control-label">接口用途</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control"  disabled name="">
+                                                </div>
+                                            </div>
+                                            <div class="form-group">
+                                                <label class="col-sm-2 control-label">附件</label>
+                                                <div class="col-sm-10">
+                                                    <input class="file" type="file" multiple data-min-file-count="1" data-theme="fas">
+                                                </div>
+                                            </div>
+                                        </form>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="panel panel-default">
+                                <div class="panel-heading">
+                                    <h5 class="panel-title">
+                                        <a data-toggle="collapse" data-parent="#accordion" href="#collapse2">归集-市房地产-备案补录信息	</a>
+                                    </h5>
+                                </div>
+                                <div id="collapse2" class="panel-collapse collapse">
+                                    <div class="panel-body">
+                                        <form class="form-horizontal">
+                                            <div class="form-group">
+                                                <label class="col-sm-2 control-label">接口地址</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control"  disabled name="/api/jptssta/getQsWszInfo">
+                                                </div>
+                                            </div>
+                                            <div class="form-group">
+                                                <label class="col-sm-2 control-label">接口用途</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control"  disabled name="">
+                                                </div>
+                                            </div>
+                                            <div class="form-group">
+                                                <label class="col-sm-2 control-label">附件</label>
+                                                <div class="col-sm-10">
+                                                    <input class="file" type="file" multiple data-min-file-count="1" data-theme="fas">
+                                                </div>
+                                            </div>
+                                        </form>
+                                    </div>
+                                </div>
+                            </div>
 
-        <div class="ui-layout-center">
-            <div class="container-div">
-                <div class="row">
-                    <div class="btn-group-sm" id="toolbar" role="group">
-                        <a class="btn btn-success">
-                            <input type="hidden" id="deptId" name="deptId">
-                            <span id="deptName">请选择部门</span>
-                        </a>
-                        <div class="input-group date">
-                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                            <input type="text" class="form-control" id="datetime" name="datetime" placeholder="yyyy-MM-dd - yyyy-MM-dd" required>
                         </div>
                     </div>
-                    <div class="col-sm-12 select-table table-striped">
-                        <input type="hidden" id="intIds" name="intIds">
-                        <input type="hidden" id="intCodes" name="intCodes">
-                        <table id="bootstrap-table"></table>
-                    </div>
-                </div>
                 </div>
             </div>
+            <!--接口end-->
         </div>
-    </form>
+    </div>
+</body>
+
 <th:block th:include="include :: footer" />
 <th:block th:include="include :: layout-latest-js" />
 <th:block th:include="include :: ztree-js" />
 <th:block th:include="include :: datetimepicker-js" />
+<th:block th:include="include :: lustep-js" />
+<th:block th:include="include :: select2-js" />
+<th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
 
-    var prefix = ctx + "system";
-    var datas = [[${@dict.getType('share_type')}]];
-    var apply_prefix = ctx + "apply/record"
-    $("#form-record-add").validate({
-        rules:{
-            deptId: "required",
-            id: "required"
-        },
-        messages: {
-            deptId: "请选择部门",
-            id: "请选择接口"
-        },
-        ignore: "",//不验证的元素
-        focusCleanup: true
-    });
+    let prefix = ctx + "system";
+    let datas = [[${@dict.getType('share_type')}]];
+    let apply_prefix = ctx + "apply/record"
 
     $(function() {
-        var panehHidden = false;
-        if ($(this).width() < 769) {
-            panehHidden = true;
-        }
-        $('body').layout({ initClosed: panehHidden, west__size: 185 });
-        <!-- laydate示例 -->
+        /** 范围选择日期框 **/
         layui.use('laydate', function(){
-            var laydate = layui.laydate;
+            let laydate = layui.laydate;
             laydate.render({
                 elem: '#datetime',
                 range: true
             });
         });
-        queryUserList();
-        queryDeptTree();
     });
 
-    function queryUserList() {
-        var options = {
-            url: prefix + "/interfaceinfo/list",
-            showSearch: false,
-            showColumns: false,
-            showToggle: false,
-            rememberSelected: true,
-            columns: [{
-                field: 'state',
-                checkbox: true
-            },{
-                field: 'interfaceName',
-                title: '接口名称'
-            },{
-                field: 'code',
-                title: '接口编码'
-            },{
-                field: 'usageScenarios',
-                title: '使用场景'
-            },{
-                field: 'shareType',
-                title: '共享方式',
-                formatter: function(value, item, index) {
-                    return $.table.selectDictLabel(datas, item.shareType);
-                }
-            }]
-        };
-        $.table.init(options);
-    }
 
-    function queryDeptTree()
-    {
-        var url = prefix + "/dept/treeData";
+    /**选择部门树**/
+    function selectDeptTree() {
+        var treeId = $("#treeId").val();
+        var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
+        var url = ctx + "system/dept/selectDeptTree/" + deptId;
         var options = {
+            title: '选择部门',
+            width: "380",
             url: url,
-            expandLevel: 2,
-            onClick : zOnClick
+            callBack: doSubmit
         };
-        $.tree.init(options);
-
-        function zOnClick(event, treeId, treeNode) {
-            $("#deptName").html(treeNode.name);
-            $('#deptId').val(treeNode.id);
-        }
-    }
-
-    // 选中数据
-    function checkItem(){
-        // var arrays = $.table.selectColumns("userId");
-        var intIds = $.table.selectColumns("id");
-        $("#intIds").val(intIds);
-        var intCodes = $.table.selectColumns("code");
-        $("#intCodes").val(intCodes);
+        $.modal.openOptions(options);
     }
 
-    $('#btnExpand').click(function() {
-        $._tree.expandAll(true);
-        $(this).hide();
-        $('#btnCollapse').show();
-    });
-
-    $('#btnCollapse').click(function() {
-        $._tree.expandAll(false);
-        $(this).hide();
-        $('#btnExpand').show();
-    });
-
-    $('#btnRefresh').click(function() {
-        queryDeptTree();
-    });
-
-    function submitHandler() {
-        checkItem();
-        if ($.validate.form()) {
-            $.operate.save(apply_prefix + "/add", $('#form-record-add').serialize());
+    function doSubmit(index, layero){
+        var tree = layero.find("iframe")[0].contentWindow.$._tree;
+        if ($.tree.notAllowParents(tree)) {
+            var body = layer.getChildFrame('body', index);
+            $("#treeId").val(body.find('#treeId').val());
+            $("#treeName").val(body.find('#treeName').val());
+            layer.close(index);
         }
     }
 
+    /**step步骤条**/
+    let data = {
+        data: ['开始', '政数局审批', '${deptName}审批', '完成'],
+        index: 1 //0是第一步(0~3)
+    };
+    let dom = $('#luStep');
+    dom.stepInit(data);
+
 </script>
 </body>
 </html>

+ 173 - 0
mybusiness/src/main/resources/templates/apply/record/add_bk.html

@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('用户列表')" />
+    <th:block th:include="include :: layout-latest-css" />
+    <th:block th:include="include :: ztree-css" />
+    <th:block th:include="include :: datetimepicker-css" />
+</head>
+<body class="gray-bg">
+<form class="form-horizontal m" id="form-record-add">
+
+    <div class="ui-layout-west">
+        <div class="box box-main">
+            <div class="box-header">
+                <div class="box-title">
+                    <i class="fa icon-grid"></i> 组织机构
+                </div>
+                <div class="box-tools pull-right">
+                    <button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
+                    <button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
+                    <button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
+                </div>
+            </div>
+            <div class="ui-layout-content">
+                <div id="tree" class="ztree"></div>
+            </div>
+        </div>
+    </div>
+
+    <div class="ui-layout-center">
+        <div class="container-div">
+            <div class="row">
+                <div class="btn-group-sm" id="toolbar" role="group">
+                    <a class="btn btn-success">
+                        <input type="hidden" id="deptId" name="deptId">
+                        <span id="deptName">请选择部门</span>
+                    </a>
+                    <div class="input-group date">
+                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                        <input type="text" class="form-control" id="datetime" name="datetime" placeholder="yyyy-MM-dd - yyyy-MM-dd" required>
+                    </div>
+                </div>
+                <div class="col-sm-12 select-table table-striped">
+                    <input type="hidden" id="intIds" name="intIds">
+                    <input type="hidden" id="intCodes" name="intCodes">
+                    <table id="bootstrap-table"></table>
+                </div>
+            </div>
+        </div>
+    </div>
+    </div>
+</form>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: layout-latest-js" />
+<th:block th:include="include :: ztree-js" />
+<th:block th:include="include :: datetimepicker-js" />
+<script th:inline="javascript">
+
+    var prefix = ctx + "system";
+    var datas = [[${@dict.getType('share_type')}]];
+    var apply_prefix = ctx + "apply/record"
+    $("#form-record-add").validate({
+        rules:{
+            deptId: "required",
+            id: "required"
+        },
+        messages: {
+            deptId: "请选择部门",
+            id: "请选择接口"
+        },
+        ignore: "",//不验证的元素
+        focusCleanup: true
+    });
+
+    $(function() {
+        var panehHidden = false;
+        if ($(this).width() < 769) {
+            panehHidden = true;
+        }
+        $('body').layout({ initClosed: panehHidden, west__size: 185 });
+        <!-- laydate示例 -->
+        layui.use('laydate', function(){
+            var laydate = layui.laydate;
+            laydate.render({
+                elem: '#datetime',
+                range: true
+            });
+        });
+        queryUserList();
+        queryDeptTree();
+    });
+
+    function queryUserList() {
+        var options = {
+            url: prefix + "/interfaceinfo/list",
+            showSearch: false,
+            showColumns: false,
+            showToggle: false,
+            rememberSelected: true,
+            columns: [{
+                field: 'state',
+                checkbox: true
+            },{
+                field: 'interfaceName',
+                title: '接口名称'
+            },{
+                field: 'code',
+                title: '接口编码'
+            },{
+                field: 'usageScenarios',
+                title: '使用场景'
+            },{
+                field: 'shareType',
+                title: '共享方式',
+                formatter: function(value, item, index) {
+                    return $.table.selectDictLabel(datas, item.shareType);
+                }
+            }]
+        };
+        $.table.init(options);
+    }
+
+    function queryDeptTree()
+    {
+        var url = prefix + "/dept/treeData";
+        var options = {
+            url: url,
+            expandLevel: 2,
+            onClick : zOnClick
+        };
+        $.tree.init(options);
+
+        function zOnClick(event, treeId, treeNode) {
+            $("#deptName").html(treeNode.name);
+            $('#deptId').val(treeNode.id);
+        }
+    }
+
+    // 选中数据
+    function checkItem(){
+        // var arrays = $.table.selectColumns("userId");
+        var intIds = $.table.selectColumns("id");
+        $("#intIds").val(intIds);
+        var intCodes = $.table.selectColumns("code");
+        $("#intCodes").val(intCodes);
+    }
+
+    $('#btnExpand').click(function() {
+        $._tree.expandAll(true);
+        $(this).hide();
+        $('#btnCollapse').show();
+    });
+
+    $('#btnCollapse').click(function() {
+        $._tree.expandAll(false);
+        $(this).hide();
+        $('#btnExpand').show();
+    });
+
+    $('#btnRefresh').click(function() {
+        queryDeptTree();
+    });
+
+    function submitHandler() {
+        checkItem();
+        if ($.validate.form()) {
+            $.operate.save(apply_prefix + "/add", $('#form-record-add').serialize());
+        }
+    }
+
+</script>
+</body>
+</html>

+ 2 - 2
mybusiness/src/main/resources/templates/apply/record/record.html

@@ -42,7 +42,7 @@
             </div>
 
             <div class="btn-group-sm" id="toolbar" role="group">
-                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="apply:record:add">
+                <a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="apply:record:add">
                     <i class="fa fa-plus"></i> 添加
                 </a>
                 <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="apply:record:edit">
@@ -118,4 +118,4 @@
 
     </script>
 </body>
-</html>
+</html>