Browse Source

中台-接口申请

limeng 2 years ago
parent
commit
a322f0cf00

+ 25 - 23
mybusiness/src/main/java/com/sooka/apply/controller/IntRecordController.java

@@ -1,6 +1,7 @@
 package com.sooka.apply.controller;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 import com.sooka.apply.domain.IntBo;
 import com.sooka.apply.domain.IntDetailed;
@@ -60,6 +61,30 @@ public class IntRecordController extends BaseController
     }
 
     /**
+     * 新增申请记录
+     */
+    @GetMapping("/add")
+    public String add(ModelMap mmap)
+    {
+        SysUser sysUser = ShiroUtils.getSysUser();
+        mmap.put("applyDeptName", sysUser.getDept().getDeptName());
+        mmap.put("applyUserName", sysUser.getUserName());
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存申请记录
+     */
+    @RequiresPermissions("apply:record:add")
+    @Log(title = "申请记录", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(IntRecord intRecord)
+    {
+        return toAjax(intRecordService.insertIntRecord(intRecord));
+    }
+
+    /**
      * 查询申请记录列表
      */
     @RequiresPermissions("apply:record:list")
@@ -86,29 +111,6 @@ public class IntRecordController extends BaseController
         return util.exportExcel(list, "record");
     }
 
-    /**
-     * 新增申请记录
-     */
-    @GetMapping("/add")
-    public String add(ModelMap mmap)
-    {
-        SysUser sysUser = ShiroUtils.getSysUser();
-        mmap.put("applyDeptName", sysUser.getDept().getDeptName());
-        mmap.put("applyUserName", sysUser.getUserName());
-        return prefix + "/add";
-    }
-
-    /**
-     * 新增保存申请记录
-     */
-    @RequiresPermissions("apply:record:add")
-    @Log(title = "申请记录", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    @ResponseBody
-    public AjaxResult addSave(IntRecord intRecord)
-    {
-        return toAjax(intRecordService.insertIntRecord(intRecord));
-    }
 
     /**
      * 申请记录

+ 3 - 3
mybusiness/src/main/java/com/sooka/apply/domain/IntRecord.java

@@ -54,15 +54,15 @@ public class IntRecord extends BaseEntity
 
     /** 申请时间 */
     @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date applyTime;
+    private String applyTime;
 
     /** 调用频率 */
     @Excel(name = "调用频率")
-    private Integer frequency;
+    private String frequency;
 
     /** 使用时效开始时间 */
     @Excel(name = "使用时效开始时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Integer startTime;
+    private String startTime;
 
     /** 使用时效结束时间 */
     @Excel(name = "使用时效结束时间", width = 30, dateFormat = "yyyy-MM-dd")

+ 8 - 0
mybusiness/src/main/java/com/sooka/apply/service/impl/IntRecordServiceImpl.java

@@ -77,6 +77,14 @@ public class IntRecordServiceImpl implements IIntRecordService
     @Override
     public int insertIntRecord(IntRecord intRecord)
     {
+        SysUser sysUser = ShiroUtils.getSysUser();
+        intRecord.setApplyDeptId(sysUser.getDept().getDeptId());
+        intRecord.setApplyDeptName(sysUser.getDept().getDeptName());
+        intRecord.setApplyUserId(sysUser.getUserId());
+        intRecord.setApplyUserName(sysUser.getUserName());
+        intRecord.setApplyTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD));
+        intRecord.setStartTime(intRecord.getDuration().split(" - ")[0]);
+        intRecord.setEndTime(intRecord.getDuration().split(" - ")[1]);
         return intRecordMapper.insertIntRecord(intRecord);
     }
 

+ 29 - 0
mybusiness/src/main/java/com/sooka/system/controller/TUInterfaceinfoController.java

@@ -1,7 +1,9 @@
 package com.sooka.system.controller;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
+import com.sooka.apply.domain.IntRecord;
 import com.sooka.common.annotation.Log;
 import com.sooka.common.core.controller.BaseController;
 import com.sooka.common.core.domain.AjaxResult;
@@ -67,6 +69,33 @@ public class TUInterfaceinfoController extends BaseController {
     }
 
     /**
+     * 根据部门ID获取接口
+     */
+    @GetMapping("/selectInterfaceByDeptId/{deptId}")
+    public String selectInterfaceByDeptId(@PathVariable("deptId") String deptId, ModelMap mmap)
+    {
+        TUInterfaceinfo tuInterfaceinfo = new TUInterfaceinfo();
+        tuInterfaceinfo.setDeptId(deptId);
+        startPage();
+        List<TUInterfaceinfo> list = tUInterfaceinfoService.selectTUInterfaceinfoList(tuInterfaceinfo);
+        mmap.put("list", list.stream().collect(Collectors.toList()));
+        return prefix + "/selectInterface";
+    }
+
+    /**
+     * 根据部门ID获取接口
+     */
+    @RequestMapping("/selectInterfaceByIds/{ids}")
+    public String selectInterfaceByDeptId(@PathVariable("ids") String[] ids, ModelMap mmap)
+    {
+        if(ids.length > 0){
+            mmap.put("list", tUInterfaceinfoService.selectTUInterfaceinfoList(ids));
+        }
+        return prefix + "/interfaceFrame";
+    }
+
+
+    /**
      * 导出【请填写功能名称】列表
      */
     @RequiresPermissions("system:interfaceinfo:export")

+ 5 - 0
mybusiness/src/main/java/com/sooka/system/mapper/TUInterfaceinfoMapper.java

@@ -29,6 +29,11 @@ public interface TUInterfaceinfoMapper
     public List<TUInterfaceinfo> selectTUInterfaceinfoList(TUInterfaceinfo tUInterfaceinfo);
 
     /**
+     * 根据接口IDS获取接口LIST
+     * */
+    public List<TUInterfaceinfo> selectTUInterfaceinfoListByIds(String[] ids);
+
+    /**
      * 新增【请填写功能名称】
      *
      * @param tUInterfaceinfo 【请填写功能名称】

+ 5 - 0
mybusiness/src/main/java/com/sooka/system/service/ITUInterfaceinfoService.java

@@ -28,6 +28,11 @@ public interface ITUInterfaceinfoService
     public List<TUInterfaceinfo> selectTUInterfaceinfoList(TUInterfaceinfo tUInterfaceinfo);
 
     /**
+     * 根据接口IDS获取接口LIST
+     * */
+    public List<TUInterfaceinfo> selectTUInterfaceinfoList(String[] ids);
+
+    /**
      * 新增【请填写功能名称】
      *
      * @param tUInterfaceinfo 【请填写功能名称】

+ 8 - 0
mybusiness/src/main/java/com/sooka/system/service/impl/TUInterfaceinfoServiceImpl.java

@@ -49,6 +49,14 @@ public class TUInterfaceinfoServiceImpl implements ITUInterfaceinfoService
     }
 
     /**
+     * 根据接口IDS获取接口LIST
+     * */
+    @Override
+    public List<TUInterfaceinfo> selectTUInterfaceinfoList(String[] ids){
+        return tUInterfaceinfoMapper.selectTUInterfaceinfoListByIds(ids);
+    }
+
+    /**
      * 新增【请填写功能名称】
      *
      * @param tUInterfaceinfo 【请填写功能名称】

+ 12 - 3
mybusiness/src/main/resources/mapper/apply/IntRecordMapper.xml

@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="provideDeptName"    column="provide_dept_name"    />
         <result property="applyTime"    column="apply_time"    />
         <result property="frequency"    column="frequency"    />
+        <result property="duration"    column="duration"    />
         <result property="startTime"    column="start_time"    />
         <result property="endTime"    column="end_time"    />
     </resultMap>
@@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="intName"    column="interface_name"    />
         <result property="strAt"    column="str_at"    />
         <result property="endAt"    column="end_at"    />
+        <result property="endAt"    column="end_at"    />
         <result property="secretKey"    column="secret_key"    />
         <result property="status"    column="status"    />
     </resultMap>
@@ -49,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             provide_dept_name,
             apply_time,
             frequency,
+            CONCAT(start_time,' - ',end_time) duration,
             start_time,
             end_time
         FROM
@@ -75,7 +78,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectIntRecordList" parameterType="IntRecord" resultMap="IntRecordResult">
         <include refid="selectIntRecordVo"/>
-        ORDER BY apply_time DESC
+        <where>
+            <if test="provideDeptId != null and provideDeptId != ''"> and provide_dept_id = #{provideDeptId}</if>
+            <if test="provideDeptName != null and provideDeptName != ''"> and provide_dept_name like concat('%', #{provideDeptName}, '%')</if>
+        </where>
+        ORDER BY
+        end_time ASC,
+        apply_time DESC
     </select>
 
     <select id="selectIntDetailedList" parameterType="IntDetailed" resultMap="IntDetailedResult">
@@ -105,8 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="provideDeptName != null">provide_dept_name,</if>
             <if test="applyTime != null">apply_time,</if>
             <if test="frequency != null">frequency,</if>
-            <if test="startTime != null">startTime,</if>
-            <if test="endTime != null">endTime,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="endTime != null">end_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="applyDeptId != null">#{applyDeptId},</if>

+ 9 - 0
mybusiness/src/main/resources/mapper/system/TUInterfaceinfoMapper.xml

@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTUInterfaceinfoList" parameterType="TUInterfaceinfo" resultMap="TUInterfaceinfoResult">
         <include refid="selectTUInterfaceinfoVo"/>
         <where>
+            <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
             <if test="interfaceName != null  and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
             <if test="infoItem != null  and infoItem != ''"> and info_item = #{infoItem}</if>
@@ -57,6 +58,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by create_time desc
     </select>
 
+    <select id="selectTUInterfaceinfoListByIds" parameterType="String" resultMap="TUInterfaceinfoResult">
+        <include refid="selectTUInterfaceinfoVo"/>
+        where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+
     <select id="selectTUInterfaceinfoById" parameterType="String" resultMap="TUInterfaceinfoResult">
         <include refid="selectTUInterfaceinfoVo"/>
         where id = #{id}

+ 34 - 61
mybusiness/src/main/resources/templates/apply/record/add.html

@@ -27,27 +27,27 @@
                 <div class="ibox-content">
                     <form method="get" class="form-horizontal" id="form-record-add">
                         <div class="form-group">
-                            <label class="col-sm-2 control-label">申请部门名称</label>
+                            <label class="col-sm-2 control-label is-required">申请部门名称</label>
                             <div class="col-sm-4">
                                 <input type="text" disabled class="form-control" th:value="${applyDeptName}">
                             </div>
-                            <label class="col-sm-2 control-label">申请人</label>
+                            <label class="col-sm-2 control-label is-required">申请人</label>
                             <div class="col-sm-4">
                                 <input type="text" disabled class="form-control" th:value="${applyUserName}">
                             </div>
                         </div>
                         <div class="form-group">
-                            <label class="col-sm-2 control-label">联系方式</label>
+                            <label class="col-sm-2 control-label is-required">联系方式</label>
                             <div class="col-sm-4">
-                                <input type="text" name="tel" class="form-control">
+                                <input type="text" name="tel" class="form-control" maxlength="11" required>
                             </div>
-                            <label class="col-sm-2 control-label">调用者IP</label>
+                            <label class="col-sm-2 control-label is-required">调用者IP</label>
                             <div class="col-sm-4">
-                                <input type="input" name="ip" class="form-control">
+                                <input type="input" name="ip" class="form-control" maxlength="15" required>
                             </div>
                         </div>
                         <div class="form-group">
-                            <label class="col-sm-2 control-label">提供接口部门</label>
+                            <label class="col-sm-2 control-label is-required">接口提供部门</label>
                             <div class="col-sm-10">
                                 <div class="input-group">
                                     <input name="provideDeptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
@@ -57,11 +57,11 @@
                             </div>
                         </div>
                         <div class="form-group">
-                            <label class="col-sm-2 control-label">每天调用频率</label>
+                            <label class="col-sm-2 control-label is-required">每天调用频率</label>
                             <div class="col-sm-4">
-                                <input type="input" class="form-control" name="frequency">
+                                <input type="input" class="form-control" name="frequency" maxlength="10" required>
                             </div>
-                            <label class="col-sm-2 control-label">使用时效</label>
+                            <label class="col-sm-2 control-label is-required">使用时效</label>
                             <div class="col-sm-4">
                                 <div class="input-group date">
                                     <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
@@ -73,51 +73,18 @@
                 </div>
             </div>
             <!--主表字段end-->
-            <!--接口start-->
+            <!--子表字段start-->
             <div class="ibox">
                 <div class="ibox-title">
-                    <button type="button" class="btn btn-w-m btn-success">获取部门接口</button>
+                    <button type="button" class="btn btn-w-m btn-success" onclick="selectInterface()">获取部门接口</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" onclick="openOrClose(this)">吉林省-契税完税证信息-数据查询接口</a>
-                                        <span class="panel_sj on" name="collapseOne"></span>
-                                    </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>
+                    <div class="panel-group" id="accordion">
+                        <iframe id="interface_frame" src="/system/interfaceinfo/selectInterfaceByIds/1" width="100%" height="100%" frameborder="0" seamless></iframe>
                     </div>
                 </div>
             </div>
-            <!--接口end-->
+            <!--子表字段end-->
         </div>
     </div>
 </div>
@@ -158,27 +125,33 @@
     function submitHandler() {
         if ($.validate.form()) {
             let data = $("#form-record-add").serializeArray();
-            // var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
-            // var roleIds = $.form.selectCheckeds("role");
-            // var postIds = $.form.selectSelects("post");
-            // data.push({"name": "status", "value": status});
-            // data.push({"name": "roleIds", "value": roleIds});
-            // data.push({"name": "postIds", "value": postIds});
             $.operate.saveTab(apply_prefix + "/add", data);
         }
     }
 
-
-    /**手风琴右侧上下箭头样式变换控制**/
-    function openOrClose(dom) {
-        let name = $(dom).attr("href").substr(1);
-        if($("span[name="+name+"]").hasClass("on")){
-            $("span[name="+name+"]").removeClass("on");
+    /**获取部门接口弹窗**/
+    function selectInterface() {
+        let deptId = $("#treeId").val();
+        if(deptId == "" || deptId == null){
+            $.modal.alertError('请先选择接口提供部门');
         }else{
-            $("span[name="+name+"]").eq(0).addClass("on");
+            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId;
+            $.modal.open("请选择接口", url,1050,380,interfaceCallback);
         }
     }
 
+    /**取得子页面选择的接口ids**/
+    function interfaceCallback(index, layero) {
+        let rows = layero.find("iframe")[0].contentWindow.$.table.selectFirstColumns();
+        renderInterfaceHtml(rows.join());
+        layer.close(index);
+    }
+
+    /**根据数据渲染接口手风琴**/
+    function renderInterfaceHtml(ids) {
+        $("#interface_frame").attr("src","/system/interfaceinfo/selectInterfaceByIds/"+ids);
+    }
+
 
     /**选择部门树**/
     function selectDeptTree() {

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

@@ -11,26 +11,8 @@
                     <div class="select-list">
                         <ul>
                             <li>
-                                <label>申请部门:</label>
-                                <input type="text" name="applyOid"/>
-                            </li>
-                            <li>
-                                <label>登记部门:</label>
-                                <input type="text" name="orgId"/>
-                            </li>
-                            <li class="select-time">
-                                <label>申请时间:</label>
-                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginApplyTime]"/>
-                                <span>-</span>
-                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endApplyTime]"/>
-                            </li>
-                            <li>
-                                <label>接口数量:</label>
-                                <input type="text" name="intNumbers"/>
-                            </li>
-                            <li>
-                                <label>备注:</label>
-                                <input type="text" name="remarks"/>
+                                <label>提供部门:</label>
+                                <input type="text" name="provideDeptName" onclick="selectDeptTree()" id="treeName" placeholder="请选择接口提供部门"/>
                             </li>
                             <li>
                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@@ -83,20 +65,20 @@
                     visible: false
                 },
                 {
-                    field: 'applyName',
-                    title: '申请部门'
-                },
-                {
-                    field: 'orgName',
-                    title: '登记部门'
+                    field: 'provideDeptName',
+                    title: '接口提供部门'
                 },
                 {
                     field: 'applyTime',
                     title: '申请时间'
                 },
                 {
-                    field: 'intNumbers',
-                    title: '接口数量'
+                    field: 'duration',
+                    title: '使用时效'
+                },
+                {
+                    field: 'frequency',
+                    title: '调用频次'
                 },
                 {
                     title: '操作',
@@ -112,8 +94,27 @@
             $.table.init(options);
         });
 
-        function info(recordId) {
+        /**选择部门树**/
+        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,
+                callBack: doSubmit
+            };
+            $.modal.openOptions(options);
+        }
 
+        function doSubmit(index, layero){
+            var tree = layero.find("iframe")[0].contentWindow.$._tree;
+            if ($.tree.notAllowParents(tree)) {
+                var body = layer.getChildFrame('body', index);
+                $("#treeName").val(body.find('#treeName').val());
+                layer.close(index);
+            }
         }
 
     </script>

+ 57 - 0
mybusiness/src/main/resources/templates/system/interfaceinfo/interfaceFrame.html

@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <th:block th:include="include :: header('用户列表')" />
+    <th:block th:include="include :: bootstrap-fileinput-css" />
+</head>
+    <div class="panel-group" id="accordion">
+        <div class="panel panel-default" th:each="interface : ${list}">
+            <div class="panel-heading">
+                <h5 class="panel-title">
+                    <a data-toggle="collapse" data-parent="#accordion" onclick="openOrClose(this)" th:href="|#${interface.id}|">[[${interface.interfaceName}]]</a>
+                    <span class="panel_sj on"></span>
+                </h5>
+            </div>
+            <div th:id="${interface.id}" 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 th:value="${interface.interfaceAddress}">
+                            </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>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: bootstrap-fileinput-js" />
+<script>
+
+
+    /**手风琴右侧上下箭头样式变换控制**/
+    function openOrClose(dom) {
+        let name = $(dom).attr("href").substr(1);
+        if($("span[name="+name+"]").hasClass("on")){
+            $("span[name="+name+"]").removeClass("on");
+        }else{
+            $("span[name="+name+"]").eq(0).addClass("on");
+        }
+    }
+</script>
+</html>
+

+ 133 - 0
mybusiness/src/main/resources/templates/system/interfaceinfo/selectInterface.html

@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('用户分配角色')" />
+</head>
+<body>
+<div class="main-content">
+    <form id="form-user-add" class="form-horizontal">
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="col-sm-12 select-table table-striped">
+                    <table id="bootstrap-table"></table>
+                </div>
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<script th:inline="javascript">
+    let prefix = ctx + "system/interfaceinfo";
+    let list = [[${list}]]
+    let shareType = [[${shareType}]];
+
+    $(function() {
+        let options = {
+            data: list,
+            sidePagination: "client",
+            sortName: "roleSort",
+            showSearch: false,
+            showRefresh: false,
+            showToggle: false,
+            showColumns: false,
+            clickToSelect: true,
+            maintainSelected: true,
+            columns: [{
+                checkbox: true,
+                formatter:function (value, row, index) {
+                    if($.common.isEmpty(value)) {
+                        return { checked: row.flag };
+                    } else {
+                        return { checked: value }
+                    }
+                }
+            },
+            {
+                field: 'id',
+                title: '主键ID',
+                visible: false
+            },
+
+            {
+                field: 'remark',
+                title: '注释',
+                visible: false
+            },
+            {
+                field: 'code',
+                title: '接口码',
+                visible: false
+            },
+            {
+                field: 'interfaceName',
+                title: '接口名称'
+            },
+            {
+                field: 'infoItem',
+                title: '信息项',
+                visible: false
+            },
+            {
+                field: 'usageScenarios',
+                title: '使用场景描述'
+            },
+            {
+                field: 'shareType',
+                title: '接口方式'
+            },
+            {
+                field: 'interfaceType',
+                title: '请求方式'
+            },
+            {
+                field: 'env',
+                title: '环境',
+                visible: false
+            },
+            {
+                field: 'signServeraddress',
+                title: '签名服务地址'
+            },
+            {
+                field: 'interfaceAddress',
+                title: '接口地址'
+            },
+            {
+                title: '接口状态',
+                align: 'center',
+                formatter: function (value, row, index) {
+                    return statusTools(row);
+                }
+            },
+            {
+                field: 'typeIam',
+                title: 'IAM方式',
+                visible: false
+            },
+            {
+                field: 'typeAksk',
+                title: 'AK/SK方式',
+                visible: false
+            }]
+        };
+        $.table.init(options);
+    });
+
+    /* 状态显示 */
+    function statusTools(row) {
+        if (row.status === '1') {
+            return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id + '\')"></i> ';
+        } else {
+            return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id + '\')"></i> ';
+        }
+    }
+
+    /* 提交 */
+    function submitHandler(index, layero){
+        let rows = $.table.selectFirstColumns();
+        parent.interfaceCallback("123");
+        closeItem();
+    }
+</script>
+</body>
+</html>