Browse Source

修改日志,登录页,系统名称,增加按部门查询

limeng 2 năm trước cách đây
mục cha
commit
bd63737b38

+ 1 - 1
leiSP-admin/src/main/resources/templates/index.html

@@ -180,7 +180,7 @@
                     </a>
                 </div>
 				<h6 >
-					通化市接口中台智能管理平台
+					通化市数据共享交换前置机平台
 				</h6>
                 <ul class="nav navbar-top-links navbar-right welcome-message">
 					<li><a title="可视化" th:href="@{/visualization/index}" target="_blank"><i class="fa fa-bar-chart"></i> 可视化</a></li>

+ 1 - 1
leiSP-admin/src/main/resources/templates/login.html

@@ -26,7 +26,7 @@
             <div class="col-sm-7">
                 <div class="signin-info">
 
-                    <h6> 通化市接口中台智能管理平台</h6>
+                    <h6>通化市数据共享交换前置机平台</h6>
 
                     <strong th:if="${@config.getKey('sys.account.registerUser')}">还没有账号? <a th:href="@{/register}">立即注册&raquo;</a></strong>
                 </div>

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

@@ -206,6 +206,9 @@ public class TUInterfaceinfoController extends BaseController {
     @ResponseBody
     public TableDataInfo interfaceLogList(TUInterfaceinfo interfaceinfo)
     {
+        System.out.println(interfaceinfo.getShareType());
+        /**解决shareType传过来有个逗号(如:share_type_2,)的问题**/
+        interfaceinfo.setShareType(interfaceinfo.getShareType().split(",")[0]);
         startPage();
         List<TUInterfaceinfo> list = tUInterfaceinfoService.interfaceLogList(interfaceinfo);
         return getDataTable(list);

+ 10 - 6
mybusiness/src/main/java/com/sooka/system/controller/TULogController.java

@@ -53,19 +53,21 @@ public class TULogController extends BaseController
 
 
     @RequiresPermissions("system:log:view")
-    @GetMapping()
-    public String log()
+    @GetMapping("/{shareType}")
+    public String log(@PathVariable("shareType") String shareType, ModelMap modelMap)
     {
+        modelMap.put("shareType",shareType);
         return prefix + "/log";
     }
 
     /**
      * 跳转日志列表
      */
-    @GetMapping("/logList/{id}")
-    public String logList(@PathVariable("id") String id, ModelMap modelMap)
+    @GetMapping("/logList/{id}/{shareType}")
+    public String logList(@PathVariable("id") String id, @PathVariable("shareType") String shareType, ModelMap modelMap)
     {
         modelMap.put("intId",id);
+        modelMap.put("shareType",shareType);
         return prefix + "/logList";
     }
 
@@ -75,12 +77,14 @@ public class TULogController extends BaseController
     @RequiresPermissions("system:log:list")
     @PostMapping("/list")
     @ResponseBody
-    public TableDataInfo list(String id,String loginName, String platformInterfacetype)
+    public TableDataInfo list(String id,String loginName, String platformInterfacetype,String deptName)
     {
         TULog tULog = new TULog();
         tULog.setInterfaceinfoId(id);
         tULog.setLoginName(loginName);
-        tULog.setPlatformInterfacetype(platformInterfacetype);
+        /**解决shareType传过来有个逗号(如:share_type_2,)的问题**/
+        tULog.setPlatformInterfacetype(platformInterfacetype.split(",")[0]);
+        tULog.setDeptName(deptName);
         startPage();
         List<TULog> list = tULogService.selectTULogList(tULog);
         return getDataTable(list);

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

@@ -182,7 +182,7 @@
             '	<div class="panel-heading">' +
             '		<h5 class="panel-title">' +
             '			<a data-toggle="collapse" data-parent="#accordion" href="##id#" onclick="openOrClose(this)">#interfaceName#</a>' +
-            '           <a class="btn-outline btn-success" data="#interfaceAddress#,#code#,#secretKey#" target="#id#" onclick="copy(this)">复制接口信息</a>' +
+            '           <a class="btn-outline btn-success" data="#interfaceAddress#,#code#,#secretKey#" target="#id#" onclick="copy(this)" style="margin-left: 30px;">复制接口信息</a>' +
             '			<span class="panel_sj on" name="#id#"></span>' +
             '		</h5>' +
             '	</div>' +

+ 5 - 11
mybusiness/src/main/resources/templates/system/log/log.html

@@ -33,20 +33,12 @@
                         <ul>
                             <input type="hidden" id="deptId" name="deptId">
                             <input type="hidden" id="parentId" name="parentId">
+                            <input type="hidden" id="shareType" name="shareType" th:value="${shareType}">
                             <li>
                                 <label>接口名称:</label>
                                 <input type="text" name="interfaceName"/>
                             </li>
                             <li>
-                                <label>接口类型:</label>
-                                <select name="shareType"
-                                        th:with="type=${@dict.getType('share_type')}">
-                                    <option value="">所有</option>
-                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
-                                            th:value="${dict.dictValue}"></option>
-                                </select>
-                            </li>
-                            <li>
                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                         class="fa fa-search"></i>&nbsp;搜索</a>
                                 <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
@@ -73,6 +65,7 @@
     let log_prefix = ctx + "system/log";
     let platform_interfacetype_datas = [[${@dict.getType('platform_interfacetype')}]];
     let shareType_datas = [[${@dict.getType('share_type')}]];
+    let shareType = [[${shareType}]];
 
     $(function() {
         let panehHidden = false;
@@ -86,7 +79,7 @@
 
     function queryLogList() {
         let options = {
-            url: prefix + "/interfaceLogList",
+            url: prefix + "/interfaceLogList?shareType="+shareType,
             exportUrl: prefix + "/export",
             modalName: "接口调用",
             columns: [{
@@ -156,7 +149,7 @@
 
     function getLogList(id){
         let title = "接口日志列表";
-        let url = log_prefix + "/logList/" + id;
+        let url = log_prefix + "/logList/"+id+"/"+shareType;
         $.modal.openTab(title, url);
     }
 
@@ -211,6 +204,7 @@
             }
         }
     }
+
 </script>
 </body>
 </html>

+ 30 - 8
mybusiness/src/main/resources/templates/system/log/logList.html

@@ -10,18 +10,14 @@
             <form id="formId">
                 <div class="select-list">
                     <ul>
+                        <input type="hidden" id="platformInterfacetype" name="platformInterfacetype" th:value="${shareType}">
                         <li>
                             <label>登录名:</label>
                             <input type="text" name="loginName"/>
                         </li>
                         <li>
-                            <label>接口类型:</label>
-                            <select name="platformInterfacetype"
-                                    th:with="type=${@dict.getType('share_type')}">
-                                <option value="">所有</option>
-                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
-                                        th:value="${dict.dictValue}"></option>
-                            </select>
+                            <label>调用部门:</label>
+                            <input type="text" name="deptName" onclick="selectDeptTree()" id="treeName" placeholder="请选择接口调用部门"/>
                         </li>
                         <li>
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
@@ -51,10 +47,11 @@
     let platform_interfacetype_datas = [[${@dict.getType('platform_interfacetype')}]];
     let shareType_datas = [[${@dict.getType('share_type')}]];
     let intId = [[${intId}]];
+    let shareType = [[${shareType}]];
 
     $(function () {
         var options = {
-            url: prefix + "/list?id=" + intId,
+            url: prefix + "/list?id="+intId+"&platformInterfacetype="+shareType,
             detailUrl: prefix + "/detail/{id}",
             exportUrl: prefix + "/export",
             modalName: "接口调用日志",
@@ -129,6 +126,7 @@
                 {
                     field: 'platformInterfacetype',
                     title: '接口类型',
+                    visible: false,
                     formatter: function (value, item, index) {
                         return $.table.selectDictLabel(shareType_datas, item.platformInterfacetype);
                     }
@@ -195,6 +193,30 @@
             }
         }
     }
+
+
+    /**选择部门树**/
+    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>
 </body>
 </html>