limeng hace 2 años
padre
commit
8d34df8790

+ 1 - 2
mybusiness/src/main/java/com/sooka/system/controller/TUInterfaceinfoController.java

@@ -62,7 +62,6 @@ public class TUInterfaceinfoController extends BaseController {
     public TableDataInfo list(@PathVariable(value = "shareType", required = false) String shareType, TUInterfaceinfo tUInterfaceinfo) {
         startPage();
         tUInterfaceinfo.setShareType(shareType);
-        tUInterfaceinfo.setShareType(null);//按照接口类型拆分接口信息列表
         List<TUInterfaceinfo> list = tUInterfaceinfoService.selectTUInterfaceinfoList(tUInterfaceinfo);
         return getDataTable(list);
     }
@@ -71,7 +70,7 @@ public class TUInterfaceinfoController extends BaseController {
      * 导出【请填写功能名称】列表
      */
     @RequiresPermissions("system:interfaceinfo:export")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @Log(title = "省共享接口", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @ResponseBody
     public AjaxResult export(TUInterfaceinfo tUInterfaceinfo) {

+ 22 - 0
mybusiness/src/main/java/com/sooka/system/domain/TUInterfaceinfo.java

@@ -82,6 +82,28 @@ public class TUInterfaceinfo extends BaseEntity
     /** 占比 */
     private String percent;
 
+    /** 所属部门ID **/
+    private String deptId;
+
+    /** 所属部门NAME **/
+    private String deptName;
+
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
     public String getCount() {
         return count;
     }

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

@@ -26,12 +26,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="code"    column="code"    />
         <result property="callsuccnum"    column="callsuccnum"    />
         <result property="callfailnum"    column="callfailnum"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
         <result property="count"    column="count"    />
         <result property="percent"    column="percent"    />
     </resultMap>
 
     <sql id="selectTUInterfaceinfoVo">
-        select id, status, remark, del_flag, create_by, create_time, update_by, update_time, interface_name, info_item, usage_scenarios, share_type, interface_type, env, sign_serveraddress, interface_address, type_iam, type_aksk,code,callsuccnum,callfailnum from t_u_interfaceinfo
+        select id, status, remark, del_flag, create_by, create_time, update_by, update_time, interface_name, info_item, usage_scenarios, share_type, interface_type, env, sign_serveraddress, interface_address, type_iam, type_aksk,dept_id,dept_name,code,callsuccnum,callfailnum from t_u_interfaceinfo
     </sql>
 
     <select id="selectTUInterfaceinfoList" parameterType="TUInterfaceinfo" resultMap="TUInterfaceinfoResult">
@@ -81,6 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="interfaceAddress != null">interface_address,</if>
             <if test="typeIam != null">type_iam,</if>
             <if test="typeAksk != null">type_aksk,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
             <if test="code != null">code,</if>
             <if test="callsuccnum != null">callsuccnum,</if>
             <if test="callfailnum != null">callfailnum,</if>
@@ -104,6 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="interfaceAddress != null">#{interfaceAddress},</if>
             <if test="typeIam != null">#{typeIam},</if>
             <if test="typeAksk != null">#{typeAksk},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
             <if test="code != null">#{code},</if>
             <if test="callsuccnum != null">#{callsuccnum},</if>
             <if test="callfailnum != null">#{callfailnum},</if>
@@ -130,6 +136,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="interfaceAddress != null">interface_address = #{interfaceAddress},</if>
             <if test="typeIam != null">type_iam = #{typeIam},</if>
             <if test="typeAksk != null">type_aksk = #{typeAksk},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
             <if test="code != null">code = #{code},</if>
             <if test="callsuccnum != null">callsuccnum = #{callsuccnum},</if>
             <if test="callfailnum != null">callfailnum = #{callfailnum},</if>

+ 0 - 4
mybusiness/src/main/resources/static/visualization/js/echarts_div.js

@@ -203,12 +203,8 @@ function jkzb(percent) {
 }
 
 // 归集数据/接口排名
-
 function jkgj() {
-
-
 	var myChart22 = echarts.init(document.getElementById('jkgj'));
-
 	let data = [
 		{name: '1不动产', value: 227},
 		{name: '房山交易中心', value: 218},

+ 32 - 1
mybusiness/src/main/resources/templates/system/interfaceinfo/add.html

@@ -13,6 +13,13 @@
                 </div>
             </div>
             <div class="form-group">
+                <label class="col-sm-3 control-label is-required">所属部门:</label>
+                <div class="col-sm-8">
+                    <input name="deptName" class="form-control" type="text" onclick="selectDeptTree()" id="treeName" placeholder="请选择归属部门" required>
+                    <input name="deptId" id="treeId" type="hidden">
+                </div>
+            </div>
+            <div class="form-group">
                 <label class="col-sm-3 control-label">信息项:</label>
                 <div class="col-sm-8">
                     <input name="infoItem" class="form-control" type="text">
@@ -27,7 +34,7 @@
             <div class="form-group">
                 <label class="col-sm-3 control-label">共享方式:</label>
                 <div class="col-sm-8">
-                    <select name="shareType" class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
+                    <select name="shareType" disabled class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                     </select>
                 </div>
@@ -91,6 +98,30 @@
                 $.operate.save(prefix + "/add", data);
             }
         }
+
+        /*用户管理-新增-选择部门树*/
+        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);
+                $("#treeId").val(body.find('#treeId').val());
+                $("#treeName").val(body.find('#treeName').val());
+                layer.close(index);
+            }
+        }
     </script>
 </body>
 </html>

+ 32 - 1
mybusiness/src/main/resources/templates/system/interfaceinfo/edit.html

@@ -14,6 +14,13 @@
                 </div>
             </div>
             <div class="form-group">
+                <label class="col-sm-3 control-label is-required">所属部门:</label>
+                <div class="col-sm-8">
+                    <input name="deptName" class="form-control" th:field="*{deptName}" type="text" onclick="selectDeptTree()" id="treeName" placeholder="请选择归属部门" required>
+                    <input name="deptId" id="treeId" type="hidden" th:field="*{deptId}">
+                </div>
+            </div>
+            <div class="form-group">
                 <label class="col-sm-3 control-label">信息项:</label>
                 <div class="col-sm-8">
                     <input name="infoItem" th:field="*{infoItem}" class="form-control" type="text">
@@ -28,7 +35,7 @@
             <div class="form-group">
                 <label class="col-sm-3 control-label">共享方式:</label>
                 <div class="col-sm-8">
-                    <select name="shareType" class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
+                    <select name="shareType" disabled class="form-control m-b" th:with="type=${@dict.getType('share_type')}">
                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{shareType}"></option>
                     </select>
                 </div>
@@ -87,6 +94,30 @@
                 $.operate.save(prefix + "/edit", data);
             }
         }
+
+        /*用户管理-新增-选择部门树*/
+        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);
+                $("#treeId").val(body.find('#treeId').val());
+                $("#treeName").val(body.find('#treeName').val());
+                layer.close(index);
+            }
+        }
     </script>
 </body>
 </html>

+ 1 - 1
mybusiness/src/main/resources/templates/system/interfaceinfo/interfaceinfo.html

@@ -92,7 +92,7 @@
             updateUrl: prefix + "/edit/{id}",
             removeUrl: prefix + "/remove",
             exportUrl: prefix + "/export",
-            modalName: "【请填写功能名称】",
+            modalName: "接口",
             columns: [{
                 checkbox: true
             },

+ 1 - 0
mybusiness/src/main/resources/templates/system/tempPer/tempPer.html

@@ -21,6 +21,7 @@
                             <li>
                                 <label>所属部门:</label>
                                 <input type="text" name="deptName" onclick="selectDeptTree()" id="treeName" placeholder="请选择归属部门"/>
+                                <input type="hidden" name="deptId" id="treeId"/>
                             </li>
                             <li>
                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>

+ 10 - 9
mybusiness/src/main/resources/templates/visualization/index.html

@@ -62,15 +62,10 @@
                 <div class="tit_date">
 
                     <i></i>
-                    <select>
-                        <option selected>2022年</option>
-                        <option>2021年</option>
-                        <option>2020年</option>
-                        <option>2019年</option>
-                        <option>2018年</option>
-                        <option>2017年</option>
-                        <option>2016年</option>
-                        <option>2015年</option>
+                    <select id="pie" th:onchange="selectYear()">
+                        <option selected th:value="2022">2022年</option>
+                        <option th:value="2021">2021年</option>
+                        <option th:value="2020">2020年</option>
                     </select>
                 </div>
             </div>
@@ -319,6 +314,12 @@
     }
 
     animation();
+
+    //占比选择年份方法
+    function selectYear(){
+        console.log($("#pie").val());
+        countAndPercent($("#pie").val());
+    }
 </script>
 <script type="text/javascript" th:src="@{/visualization/js/echarts_div.js}"></script>
 <script type="text/javascript" th:src="@{/visualization/js/echarts-tooltip-carousel.js}"></script>