Explorar o código

中台-接口申请-审批、审核

limeng %!s(int64=2) %!d(string=hai) anos
pai
achega
2bedddc4f8
Modificáronse 21 ficheiros con 1679 adicións e 36 borrados
  1. 3 2
      mybusiness/src/main/java/com/business/controller/VisualizationController.java
  2. 82 0
      mybusiness/src/main/java/com/sooka/apply/controller/ApprovalController.java
  3. 81 0
      mybusiness/src/main/java/com/sooka/apply/controller/ExamineController.java
  4. 71 14
      mybusiness/src/main/java/com/sooka/apply/controller/IntRecordController.java
  5. 36 0
      mybusiness/src/main/java/com/sooka/apply/domain/IntRecord.java
  6. 8 0
      mybusiness/src/main/java/com/sooka/apply/mapper/IntRecordMapper.java
  7. 11 0
      mybusiness/src/main/java/com/sooka/apply/service/IIntRecordService.java
  8. 40 0
      mybusiness/src/main/java/com/sooka/apply/service/impl/IntRecordServiceImpl.java
  9. 47 4
      mybusiness/src/main/resources/mapper/apply/IntRecordMapper.xml
  10. 126 0
      mybusiness/src/main/resources/templates/apply/approval/approval.html
  11. 208 0
      mybusiness/src/main/resources/templates/apply/approval/approvalDetail.html
  12. 126 0
      mybusiness/src/main/resources/templates/apply/examine/examine.html
  13. 208 0
      mybusiness/src/main/resources/templates/apply/examine/examineDetail.html
  14. 246 0
      mybusiness/src/main/resources/templates/apply/record/detail.html
  15. 1 1
      mybusiness/src/main/resources/templates/apply/record/edit.html
  16. 46 9
      mybusiness/src/main/resources/templates/apply/record/record.html
  17. 178 0
      mybusiness/src/main/resources/templates/apply/record/rejectDialog.html
  18. 146 0
      mybusiness/src/main/resources/templates/apply/record/uploadFrameDisabled.html
  19. 1 1
      mybusiness/src/main/resources/templates/system/log/log.html
  20. 11 2
      mybusiness/src/main/resources/templates/visualization/index.html
  21. 3 3
      mybusiness/src/main/resources/templates/visualization/tk_iframe.html

+ 3 - 2
mybusiness/src/main/java/com/business/controller/VisualizationController.java

@@ -35,8 +35,9 @@ public class VisualizationController extends BaseController {
         return "/visualization/index";
     }
 
-    public AjaxResult initVisualization(){
-       return null;
+    @GetMapping("tk_iframe")
+    public String tk_iframe(){
+        return "/visualization/tk_iframe";
     }
 
     /**

+ 82 - 0
mybusiness/src/main/java/com/sooka/apply/controller/ApprovalController.java

@@ -0,0 +1,82 @@
+package com.sooka.apply.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.sooka.apply.domain.IntRecord;
+import com.sooka.apply.service.IIntRecordService;
+import com.sooka.common.annotation.Log;
+import com.sooka.common.core.controller.BaseController;
+import com.sooka.common.core.domain.AjaxResult;
+import com.sooka.common.core.page.TableDataInfo;
+import com.sooka.common.enums.BusinessType;
+import com.sooka.common.utils.poi.ExcelUtil;
+import com.sooka.framework.util.ShiroUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 政数局 -- 我的审批Controller
+ *
+ * @author limeng
+ * @date 2022-10-19
+ */
+@Controller
+@RequestMapping("/apply/approval")
+public class ApprovalController extends BaseController {
+
+    private String prefix = "apply/approval";
+
+    @Autowired
+    private IIntRecordService intRecordService;
+
+    @RequiresPermissions("apply:approval:view")
+    @GetMapping()
+    public String approval()
+    {
+        return prefix + "/approval";
+    }
+
+    /**
+     * 查询我的审批
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(IntRecord intRecord)
+    {
+        //只查政数局待审批的数据
+        intRecord.setStatus("3");
+        startPage();
+        List<IntRecord> list = intRecordService.selectIntRecordList(intRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出我的审批
+     */
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(IntRecord intRecord)
+    {
+        List<IntRecord> list = intRecordService.selectIntRecordList(intRecord);
+        ExcelUtil<IntRecord> util = new ExcelUtil<IntRecord>(IntRecord.class);
+        return util.exportExcel(list, "approval");
+    }
+
+    /**
+     * 审批页面
+     */
+    @GetMapping("/approval/{id}")
+    public String approval(@PathVariable("id") String id, ModelMap mmap)
+    {
+        IntRecord intRecord = intRecordService.selectIntRecordById(id);
+        JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(intRecord.getIntDetailedList()));
+        mmap.put("intRecord", intRecord);
+        mmap.put("intDetailedList", jsonArray);
+        return prefix + "/approvalDetail";
+    }
+}

+ 81 - 0
mybusiness/src/main/java/com/sooka/apply/controller/ExamineController.java

@@ -0,0 +1,81 @@
+package com.sooka.apply.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.sooka.apply.domain.IntRecord;
+import com.sooka.apply.service.IIntRecordService;
+import com.sooka.common.core.controller.BaseController;
+import com.sooka.common.core.domain.AjaxResult;
+import com.sooka.common.core.page.TableDataInfo;
+import com.sooka.common.utils.poi.ExcelUtil;
+import com.sooka.framework.util.ShiroUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 我的审核Controller
+ *
+ * @author limeng
+ * @date 2022-10-19
+ */
+@Controller
+@RequestMapping("/apply/examine")
+public class ExamineController extends BaseController {
+
+    private String prefix = "apply/examine";
+
+    @Autowired
+    private IIntRecordService intRecordService;
+
+    @RequiresPermissions("apply:examine:view")
+    @GetMapping()
+    public String examine()
+    {
+        return prefix + "/examine";
+    }
+
+    /**
+     * 查询我的审批
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(IntRecord intRecord)
+    {
+        //只查提供部门待审批的数据
+        intRecord.setStatus("4");
+        intRecord.setProvideDeptId(ShiroUtils.getSysUser().getDeptId().toString());
+        startPage();
+        List<IntRecord> list = intRecordService.selectIntRecordList(intRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出我的审批
+     */
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(IntRecord intRecord)
+    {
+        List<IntRecord> list = intRecordService.selectIntRecordList(intRecord);
+        ExcelUtil<IntRecord> util = new ExcelUtil<IntRecord>(IntRecord.class);
+        return util.exportExcel(list, "examine");
+    }
+
+    /**
+     * 审批页面
+     */
+    @GetMapping("/examine/{id}")
+    public String examine(@PathVariable("id") String id, ModelMap mmap)
+    {
+        IntRecord intRecord = intRecordService.selectIntRecordById(id);
+        JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(intRecord.getIntDetailedList()));
+        mmap.put("intRecord", intRecord);
+        mmap.put("intDetailedList", jsonArray);
+        return prefix + "/examineDetail";
+    }
+}

+ 71 - 14
mybusiness/src/main/java/com/sooka/apply/controller/IntRecordController.java

@@ -55,8 +55,6 @@ public class IntRecordController extends BaseController
     public TableDataInfo list(IntRecord intRecord)
     {
         intRecord.setApplyUserId(ShiroUtils.getUserId());
-        //状态:0新建,政数局通过1,提供部门通过2,政数局待审批3,提供部门待审批4,政数局驳回5,提供部门驳回6
-        intRecord.setStatus("0");
         startPage();
         List<IntRecord> list = intRecordService.selectIntRecordList(intRecord);
         return getDataTable(list);
@@ -123,6 +121,19 @@ public class IntRecordController extends BaseController
     }
 
     /**
+     * 附件单独用iframe
+     */
+    @GetMapping(value={"/uploadFrameDisabled/{subId}"})
+    public String uploadFrameDisabled(@PathVariable(value = "subId", required = false) String subId, ModelMap mmap)
+    {
+        if(subId != null){
+            IntDetailed intDetailed = intRecordService.selectIntRecordDetailedBySubId(subId);
+            mmap.put("file",intDetailed.getFile());
+        }
+        return prefix + "/uploadFrameDisabled";
+    }
+
+    /**
      * 修改申请记录
      */
     @RequiresPermissions("apply:record:edit")
@@ -147,22 +158,14 @@ public class IntRecordController extends BaseController
         return toAjax(intRecordService.editIntRecord(intRecord));
     }
 
-
-
-
-
-
     /**
-     * 查询申请记录列表
+     * 保存驳回信息字段
      */
-    @RequiresPermissions("apply:record:list")
-    @PostMapping("/intDetailedList")
+    @PostMapping("/reject")
     @ResponseBody
-    public TableDataInfo intDetailedList(IntDetailed intDetailed)
+    public AjaxResult reject(IntRecord intRecord)
     {
-        startPage();
-        List<IntDetailed> list = intRecordService.selectIntDetailedList(intDetailed);
-        return getDataTable(list);
+        return toAjax(intRecordService.rejectIntRecord(intRecord));
     }
 
     /**
@@ -192,6 +195,60 @@ public class IntRecordController extends BaseController
     }
 
     /**
+     * 修改状态
+     */
+    @PostMapping("/updateStatus")
+    @ResponseBody
+    public AjaxResult updateStatus(String id,String status)
+    {
+        return toAjax(intRecordService.updateStatus(id,status));
+    }
+
+    /**
+     * 查看详情
+     */
+    @GetMapping("/detail/{id}")
+    public String detail(@PathVariable("id") String id, ModelMap mmap)
+    {
+        IntRecord intRecord = intRecordService.selectIntRecordById(id);
+        JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(intRecord.getIntDetailedList()));
+        mmap.put("intRecord", intRecord);
+        mmap.put("intDetailedList", jsonArray);
+        return prefix + "/detail";
+    }
+
+    /**
+     * 驳回原因弹框
+     */
+    @GetMapping("/rejectDialog/{id}")
+    public String rejectDialog(@PathVariable("id") String id, ModelMap mmap)
+    {
+        IntRecord intRecord = intRecordService.selectIntRecordById(id);
+        mmap.put("intRecord", intRecord);
+        return prefix + "/rejectDialog";
+    }
+
+
+
+
+
+
+/***********************以下为一期原有方法******************************/
+
+    /**
+     * 查询申请记录列表
+     */
+    @RequiresPermissions("apply:record:list")
+    @PostMapping("/intDetailedList")
+    @ResponseBody
+    public TableDataInfo intDetailedList(IntDetailed intDetailed)
+    {
+        startPage();
+        List<IntDetailed> list = intRecordService.selectIntDetailedList(intDetailed);
+        return getDataTable(list);
+    }
+
+    /**
      * 状态修改
      */
     @Log(title = "接口管理", businessType = BusinessType.UPDATE)

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

@@ -77,4 +77,40 @@ public class IntRecord extends BaseEntity
     /** 用于接收前台JSONArray **/
     private String subData;
 
+    /** 政数局审批人ID */
+    private String approvalUserId;
+
+    /** 政数局审批人 */
+    private String approvalUserName;
+
+    /** 政数局审批时间 */
+    private String approvalTime;
+
+    /** 政数局审批附件 */
+    private String approvalFile;
+
+    /** 政数局审批内容 */
+    private String approvalContent;
+
+    /** 接口提供部门审批人ID */
+    private String examineUserId;
+
+    /** 接口提供部门审批人 */
+    private String examineUserName;
+
+    /** 接口提供部门审批时间 */
+    private String examineTime;
+
+    /** 接口提供部门审批附件 */
+    private String examineFile;
+
+    /** 接口提供部门审批内容 */
+    private String examineContent;
+
+    /** 仅用于接收驳回弹窗里的通用file字段 */
+    private String file;
+
+    /** 仅用于接收驳回弹窗里的通用content字段 */
+    private String content;
+
 }

+ 8 - 0
mybusiness/src/main/java/com/sooka/apply/mapper/IntRecordMapper.java

@@ -3,6 +3,7 @@ package com.sooka.apply.mapper;
 import java.util.List;
 import com.sooka.apply.domain.IntRecord;
 import com.sooka.apply.domain.IntDetailed;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 申请记录Mapper接口
@@ -93,4 +94,11 @@ public interface IntRecordMapper
      */
     public int changeStatus(IntDetailed intDetailed);
 
+    /**
+     * 提交审核
+     * @return 结果
+     */
+    public int updateStatus(@Param("id") String id, @Param("status") String status);
+
+
 }

+ 11 - 0
mybusiness/src/main/java/com/sooka/apply/service/IIntRecordService.java

@@ -63,6 +63,11 @@ public interface IIntRecordService
     public int editIntRecord(IntRecord intBo);
 
     /**
+     * 保存驳回信息字段
+     */
+    public int rejectIntRecord(IntRecord intBo);
+
+    /**
      * 批量删除申请记录
      *
      * @param ids 需要删除的数据ID
@@ -78,4 +83,10 @@ public interface IIntRecordService
      */
     public int changeStatus(IntDetailed intDetailed);
 
+    /**
+     * 提交审核
+     * @return 结果
+     */
+    public int updateStatus(String id, String status);
+
 }

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

@@ -10,6 +10,7 @@ import com.sooka.common.utils.StringUtils;
 import com.sooka.common.utils.uuid.IdUtils;
 import com.sooka.common.utils.uuid.UUID;
 import com.sooka.framework.util.ShiroUtils;
+import com.sooka.framework.web.domain.server.Sys;
 import com.sooka.system.domain.SysUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -134,6 +135,45 @@ public class IntRecordServiceImpl implements IIntRecordService
     }
 
     /**
+     * 提交审核
+     * @return 结果
+     */
+    @Override
+    public int updateStatus(String id, String status){
+        return intRecordMapper.updateStatus(id,status);
+    }
+
+    /**
+     * 修改申请记录
+     *
+     * @param intBo 申请记录
+     * @return 结果
+     */
+    @Override
+    public int rejectIntRecord(IntRecord intBo){
+        SysUser sysUser = ShiroUtils.getSysUser();
+        //如果是政数局驳回,status = 5
+        String zsj_reject = "3";
+        if(zsj_reject.equals(intBo.getStatus())){
+            intBo.setApprovalUserId(sysUser.getUserId().toString());
+            intBo.setApprovalUserName(sysUser.getUserName());
+            intBo.setApprovalTime(DateUtils.getDate());
+            intBo.setApprovalFile(intBo.getFile());
+            intBo.setApprovalContent(intBo.getContent());
+            intBo.setStatus("5");
+        }else{
+            //否则 status = 6
+            intBo.setExamineUserId(sysUser.getUserId().toString());
+            intBo.setExamineUserName(sysUser.getUserName());
+            intBo.setExamineTime(DateUtils.getDate());
+            intBo.setExamineFile(intBo.getFile());
+            intBo.setExamineContent(intBo.getContent());
+            intBo.setStatus("6");
+        }
+        return intRecordMapper.editIntRecord(intBo);
+    }
+
+    /**
      * 删除申请记录对象
      *
      * @param ids 需要删除的数据ID

+ 47 - 4
mybusiness/src/main/resources/mapper/apply/IntRecordMapper.xml

@@ -20,6 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="startTime"    column="start_time"    />
         <result property="endTime"    column="end_time"    />
         <result property="status"    column="status"    />
+        <result property="approvalUserId"    column="approval_user_id"    />
+        <result property="approvalUserName"    column="approval_user_name"    />
+        <result property="approvalTime"    column="approval_time"    />
+        <result property="approvalFile"    column="approval_file"    />
+        <result property="approvalContent"    column="approval_content"    />
+        <result property="examineUserId"    column="examine_user_id"    />
+        <result property="examineUserName"    column="examine_user_name"    />
+        <result property="examineTime"    column="examine_time"    />
+        <result property="examineFile"    column="examine_file"    />
+        <result property="examineContent"    column="examine_content"    />
     </resultMap>
 
     <resultMap id="IntRecordIntDetailedResult" type="IntRecord" extends="IntRecordResult">
@@ -52,7 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             frequency,
             CONCAT(start_time,' - ',end_time) duration,
             start_time,
-            end_time
+            end_time,
+            status
         FROM
             int_record
     </sql>
@@ -66,8 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null and status != ''"> and status = #{status}</if>
         </where>
         ORDER BY
-        end_time ASC,
-        apply_time DESC
+        status ASC,
+        apply_time DESC,
+        end_time ASC
     </select>
 
     <select id="selectIntRecordById" parameterType="String" resultMap="IntRecordIntDetailedResult">
@@ -91,6 +103,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             a.start_time,
             a.end_time,
             a.status,
+            a.approval_user_id,
+            a.approval_user_name,
+            a.approval_time,
+            a.approval_file,
+            a.approval_content,
+            a.examine_user_id,
+            a.examine_user_name,
+            a.examine_time,
+            a.examine_file,
+            a.examine_content,
             b.id sub_id,
             b.record_id,
             b.int_id,
@@ -98,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             b.purpose,
             b.file,
             c.interface_name,
-	        c.interface_address
+            c.interface_address
         FROM
             int_record a
         LEFT JOIN int_detailed b ON b.record_id = a.id
@@ -179,10 +201,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="startTime != null">start_time = #{startTime},</if>
             <if test="endTime != null">end_time = #{endTime},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="approvalUserId != null">approval_user_id = #{approvalUserId},</if>
+            <if test="approvalUserName != null">approval_user_name = #{approvalUserName},</if>
+            <if test="approvalTime != null">approval_time = #{approvalTime},</if>
+            <if test="approvalFile != null">approval_file = #{approvalFile},</if>
+            <if test="approvalContent != null">approval_content = #{approvalContent},</if>
+            <if test="examineUserId != null">examine_user_id = #{examineUserId},</if>
+            <if test="examineUserName != null">examine_user_name = #{examineUserName},</if>
+            <if test="examineTime != null">examine_time = #{examineTime},</if>
+            <if test="examineFile != null">examine_file = #{examineFile},</if>
+            <if test="examineContent != null">examine_content = #{examineContent},</if>
         </trim>
         WHERE id = #{id}
     </update>
 
+    <update id="updateStatus" parameterType="String">
+        update int_record
+        <set>
+            <if test="status != null and status != ''">status = #{status},</if>
+        </set>
+        where id = #{id}
+    </update>
+
+
+
+
 
 
 

+ 126 - 0
mybusiness/src/main/resources/templates/apply/approval/approval.html

@@ -0,0 +1,126 @@
+<!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('申请记录列表')" />
+</head>
+<body class="gray-bg">
+<div class="container-div">
+    <div class="row">
+        <div class="col-sm-12 search-collapse">
+            <form id="formId">
+                <div class="select-list">
+                    <ul>
+                        <li>
+                            <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>
+                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                        </li>
+                    </ul>
+                </div>
+            </form>
+        </div>
+
+        <div class="btn-group-sm" id="toolbar" role="group">
+            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="apply:record:export">
+                <i class="fa fa-download"></i> 导出
+            </a>
+        </div>
+        <div class="col-sm-12 select-table table-striped">
+            <table id="bootstrap-table"></table>
+        </div>
+    </div>
+</div>
+<th:block th:include="include :: footer" />
+<script th:inline="javascript">
+    let editFlag = [[${@permission.hasPermi('apply:record:edit')}]];
+    let removeFlag = [[${@permission.hasPermi('apply:record:remove')}]];
+    let status = [[${@dict.getType('status')}]];
+    let prefix = ctx + "apply/approval";
+
+    $(function() {
+        let options = {
+            url: prefix + "/list",
+            exportUrl: prefix + "/export",
+            modalName: "申请记录",
+            columns: [{
+                checkbox: true
+            },
+                {
+                    field: 'id',
+                    title: 'null',
+                    visible: false
+                },
+                {
+                    field: 'provideDeptName',
+                    title: '接口提供部门'
+                },
+                {
+                    field: 'applyTime',
+                    title: '申请时间',
+                    sortable: true
+                },
+                {
+                    field: 'duration',
+                    title: '使用时效',
+                    sortable: true
+                },
+                {
+                    field: 'frequency',
+                    title: '调用频次'
+                },
+                {
+                    field: 'status',
+                    title: '当前状态',
+                    sortable: true,
+                    formatter: function (value, item, index) {
+                        return $.table.selectDictLabel(status, item.status);
+                    }
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        let actions = [];
+                        /**政数局待审批**/
+                        actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="approval(\'' + row.id + '\')"><i class="fa fa-check"></i>立即审批</a>');
+                        return actions.join('');
+                    }
+                }]
+        };
+        $.table.init(options);
+    });
+
+    /**审批**/
+    function approval(id) {
+        $.modal.openTab("申请审批", prefix + "/approval/"+id);
+    }
+
+    /**选择部门树**/
+    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>

+ 208 - 0
mybusiness/src/main/resources/templates/apply/approval/approvalDetail.html

@@ -0,0 +1,208 @@
+<!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" />
+    <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">
+<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>
+            <!--步骤条end-->
+            <!--主表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <form method="get" class="form-horizontal" id="form-record-edit">
+                        <input type="hidden" name="id" th:value="${intRecord.id}">
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">申请部门名称</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly class="form-control" th:value="${intRecord.applyDeptName}">
+                            </div>
+                            <label class="col-sm-2 control-label is-required">申请人</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly class="form-control" th:value="${intRecord.applyUserName}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">联系方式</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly name="tel" class="form-control" maxlength="11" th:value="${intRecord.tel}" required>
+                            </div>
+                            <label class="col-sm-2 control-label is-required">调用者IP</label>
+                            <div class="col-sm-4">
+                                <input type="input" readonly name="ip" class="form-control" maxlength="15" th:value="${intRecord.ip}" required>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">接口提供部门</label>
+                            <div class="col-sm-10">
+                                <div class="input-group">
+                                    <input name="provideDeptName" readonly th:value="${intRecord.provideDeptName}" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
+                                    <input name="provideDeptId" th:value="${intRecord.provideDeptId}" type="hidden" id="treeId"/>
+                                    <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 is-required">每天调用频率</label>
+                            <div class="col-sm-4">
+                                <input type="input" class="form-control" readonly name="frequency" maxlength="10" th:value="${intRecord.frequency}" required>
+                            </div>
+                            <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>
+                                    <input type="text" class="form-control" readonly id="duration" name="duration" placeholder="从 - 至" th:value="${intRecord.duration}" required>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+            <!--主表字段end-->
+            <!--子表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <div class="panel-group" id="accordion">
+                    </div>
+                </div>
+            </div>
+            <!--子表字段end-->
+        </div>
+    </div>
+</div>
+<div class="row">
+    <div class="col-sm-offset-5 col-sm-10">
+        <button type="button" class="btn btn-sm btn-primary" onclick="ok()"><i class="fa fa-check"></i>申请通过</button>&nbsp;
+        <button type="button" class="btn btn-sm btn-danger" onclick="reject()"><i class="fa fa-reply-all"></i>申请驳回</button>
+    </div>
+</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">
+
+    let prefix = ctx + "system";
+    let datas = [[${@dict.getType('share_type')}]];
+    let apply_prefix = ctx + "apply/record"
+    let deptName = "提供部门";
+    let num = 0;
+    let interfaces = [[${intDetailedList}]];
+
+    $(function() {
+        /** 回显接口 **/
+        renderInterface(interfaces);
+    });
+
+    /** 回显接口 **/
+    function renderInterface(data){
+        let html =
+            '<div class="panel panel-default">' +
+            '	<div class="panel-heading">' +
+            '		<h5 class="panel-title">' +
+            '			<a data-toggle="collapse" data-parent="#accordion" href="##id#" onclick="openOrClose(this)">#interfaceName#</a>' +
+            '			<span class="panel_sj on" name="#id#"></span>' +
+            '		</h5>' +
+            '	</div>' +
+            '	<div id="#id#" class="panel-collapse collapse">' +
+            '		<div class="panel-body">' +
+            '			<form class="form-horizontal" id="#formId#">' +
+            '           <input type="hidden" name="intId" value="#id#">' +
+            '				<div class="form-group">' +
+            '					<label class="col-sm-2 control-label">接口地址</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" disabled value="#interfaceAddress#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group">' +
+            '					<label class="col-sm-2 control-label">接口用途</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" name="purpose" value="#purpose#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group">' +
+            '                   <label class="col-sm-2 control-label">附件</label>' +
+            '                   <div class="col-sm-10">' +
+            '					    <iframe id="#file_upload#" src="/apply/record/uploadFrameDisabled/#subId#" width="100%" height="412px" frameborder="0" seamless></iframe>' +
+            '				    </div>' +
+            '				</div>' +
+            '			</form>' +
+            '		</div>' +
+            '	</div>' +
+            '</div>';
+        for(let i=0;i<data.length;i++){
+            let docm = html.replace(/#interfaceName#/g,data[i].interfaceName);
+            docm = docm.replace(/#interfaceAddress#/g,data[i].interfaceAddress);
+            docm = docm.replace(/#purpose#/g,data[i].purpose);
+            docm = docm.replace(/#id#/g,data[i].intId);
+            docm = docm.replace(/#subId#/g,data[i].subId);
+            docm = docm.replace(/#formId#/g,"sub-form"+num);
+            docm = docm.replace(/#file_upload#/g,"file_upload"+num);
+            $("#accordion").append(docm);
+            num += 1;
+        }
+    }
+
+    /**手风琴右侧上下箭头样式变换控制**/
+    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");
+        }
+    }
+
+    /**step步骤条**/
+    let data = {
+        data: ['开始', '政数局审批', deptName+'审批', '完成'],
+        index: 1 //0是第一步(0~3)
+    };
+    let dom = $('#luStep');
+    dom.stepInit(data);
+
+    function ok() {
+        let id = $("input[name='id']").val();
+        $.modal.confirm("确认审批通过吗?", function() {
+            let url = ctx + "apply/record/updateStatus";
+            $.operate.post(url,{ "id": id, "status": "4" },function(res){
+                $.operate.successTabCallback(res);
+            });
+        });
+    }
+
+    function reject() {
+        let id = $("input[name='id']").val();
+        $.modal.confirm("确认审批驳回吗?", function() {
+            let url = ctx + "apply/record/rejectDialog/" + id;
+            $.modal.open("请填写驳回原因", url, '700', '540');
+        });
+    }
+
+    function callBack(res){
+        $.operate.successTabCallback(res);
+    }
+
+</script>
+</body>
+</html>

+ 126 - 0
mybusiness/src/main/resources/templates/apply/examine/examine.html

@@ -0,0 +1,126 @@
+<!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('申请记录列表')" />
+</head>
+<body class="gray-bg">
+<div class="container-div">
+    <div class="row">
+        <div class="col-sm-12 search-collapse">
+            <form id="formId">
+                <div class="select-list">
+                    <ul>
+                        <li>
+                            <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>
+                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                        </li>
+                    </ul>
+                </div>
+            </form>
+        </div>
+
+        <div class="btn-group-sm" id="toolbar" role="group">
+            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="apply:record:export">
+                <i class="fa fa-download"></i> 导出
+            </a>
+        </div>
+        <div class="col-sm-12 select-table table-striped">
+            <table id="bootstrap-table"></table>
+        </div>
+    </div>
+</div>
+<th:block th:include="include :: footer" />
+<script th:inline="javascript">
+    let editFlag = [[${@permission.hasPermi('apply:record:edit')}]];
+    let removeFlag = [[${@permission.hasPermi('apply:record:remove')}]];
+    let status = [[${@dict.getType('status')}]];
+    let prefix = ctx + "apply/examine";
+
+    $(function() {
+        let options = {
+            url: prefix + "/list",
+            exportUrl: prefix + "/export",
+            modalName: "申请记录",
+            columns: [{
+                checkbox: true
+            },
+                {
+                    field: 'id',
+                    title: 'null',
+                    visible: false
+                },
+                {
+                    field: 'provideDeptName',
+                    title: '接口提供部门'
+                },
+                {
+                    field: 'applyTime',
+                    title: '申请时间',
+                    sortable: true
+                },
+                {
+                    field: 'duration',
+                    title: '使用时效',
+                    sortable: true
+                },
+                {
+                    field: 'frequency',
+                    title: '调用频次'
+                },
+                {
+                    field: 'status',
+                    title: '当前状态',
+                    sortable: true,
+                    formatter: function (value, item, index) {
+                        return $.table.selectDictLabel(status, item.status);
+                    }
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        let actions = [];
+                        /**政数局待审批**/
+                        actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="approval(\'' + row.id + '\')"><i class="fa fa-check"></i>立即审批</a>');
+                        return actions.join('');
+                    }
+                }]
+        };
+        $.table.init(options);
+    });
+
+    /**审批**/
+    function approval(id) {
+        $.modal.openTab("申请审批", prefix + "/examine/"+id);
+    }
+
+    /**选择部门树**/
+    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>

+ 208 - 0
mybusiness/src/main/resources/templates/apply/examine/examineDetail.html

@@ -0,0 +1,208 @@
+<!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" />
+    <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">
+<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>
+            <!--步骤条end-->
+            <!--主表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <form method="get" class="form-horizontal" id="form-record-edit">
+                        <input type="hidden" name="id" th:value="${intRecord.id}">
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">申请部门名称</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly class="form-control" th:value="${intRecord.applyDeptName}">
+                            </div>
+                            <label class="col-sm-2 control-label is-required">申请人</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly class="form-control" th:value="${intRecord.applyUserName}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">联系方式</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly name="tel" class="form-control" maxlength="11" th:value="${intRecord.tel}" required>
+                            </div>
+                            <label class="col-sm-2 control-label is-required">调用者IP</label>
+                            <div class="col-sm-4">
+                                <input type="input" readonly name="ip" class="form-control" maxlength="15" th:value="${intRecord.ip}" required>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">接口提供部门</label>
+                            <div class="col-sm-10">
+                                <div class="input-group">
+                                    <input name="provideDeptName" readonly th:value="${intRecord.provideDeptName}" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
+                                    <input name="provideDeptId" th:value="${intRecord.provideDeptId}" type="hidden" id="treeId"/>
+                                    <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 is-required">每天调用频率</label>
+                            <div class="col-sm-4">
+                                <input type="input" class="form-control" readonly name="frequency" maxlength="10" th:value="${intRecord.frequency}" required>
+                            </div>
+                            <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>
+                                    <input type="text" class="form-control" readonly id="duration" name="duration" placeholder="从 - 至" th:value="${intRecord.duration}" required>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+            <!--主表字段end-->
+            <!--子表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <div class="panel-group" id="accordion">
+                    </div>
+                </div>
+            </div>
+            <!--子表字段end-->
+        </div>
+    </div>
+</div>
+<div class="row">
+    <div class="col-sm-offset-5 col-sm-10">
+        <button type="button" class="btn btn-sm btn-primary" onclick="ok()"><i class="fa fa-check"></i>申请通过</button>&nbsp;
+        <button type="button" class="btn btn-sm btn-danger" onclick="reject()"><i class="fa fa-reply-all"></i>申请驳回</button>
+    </div>
+</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">
+
+    let prefix = ctx + "system";
+    let datas = [[${@dict.getType('share_type')}]];
+    let apply_prefix = ctx + "apply/record"
+    let deptName = "提供部门";
+    let num = 0;
+    let interfaces = [[${intDetailedList}]];
+
+    $(function() {
+        /** 回显接口 **/
+        renderInterface(interfaces);
+    });
+
+    /** 回显接口 **/
+    function renderInterface(data){
+        let html =
+            '<div class="panel panel-default">' +
+            '	<div class="panel-heading">' +
+            '		<h5 class="panel-title">' +
+            '			<a data-toggle="collapse" data-parent="#accordion" href="##id#" onclick="openOrClose(this)">#interfaceName#</a>' +
+            '			<span class="panel_sj on" name="#id#"></span>' +
+            '		</h5>' +
+            '	</div>' +
+            '	<div id="#id#" class="panel-collapse collapse">' +
+            '		<div class="panel-body">' +
+            '			<form class="form-horizontal" id="#formId#">' +
+            '           <input type="hidden" name="intId" value="#id#">' +
+            '				<div class="form-group">' +
+            '					<label class="col-sm-2 control-label">接口地址</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" disabled value="#interfaceAddress#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group">' +
+            '					<label class="col-sm-2 control-label">接口用途</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" name="purpose" value="#purpose#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group">' +
+            '                   <label class="col-sm-2 control-label">附件</label>' +
+            '                   <div class="col-sm-10">' +
+            '					    <iframe id="#file_upload#" src="/apply/record/uploadFrameDisabled/#subId#" width="100%" height="412px" frameborder="0" seamless></iframe>' +
+            '				    </div>' +
+            '				</div>' +
+            '			</form>' +
+            '		</div>' +
+            '	</div>' +
+            '</div>';
+        for(let i=0;i<data.length;i++){
+            let docm = html.replace(/#interfaceName#/g,data[i].interfaceName);
+            docm = docm.replace(/#interfaceAddress#/g,data[i].interfaceAddress);
+            docm = docm.replace(/#purpose#/g,data[i].purpose);
+            docm = docm.replace(/#id#/g,data[i].intId);
+            docm = docm.replace(/#subId#/g,data[i].subId);
+            docm = docm.replace(/#formId#/g,"sub-form"+num);
+            docm = docm.replace(/#file_upload#/g,"file_upload"+num);
+            $("#accordion").append(docm);
+            num += 1;
+        }
+    }
+
+    /**手风琴右侧上下箭头样式变换控制**/
+    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");
+        }
+    }
+
+    /**step步骤条**/
+    let data = {
+        data: ['开始', '政数局审批', deptName+'审批', '完成'],
+        index: 2 //0是第一步(0~3)
+    };
+    let dom = $('#luStep');
+    dom.stepInit(data);
+
+    function ok() {
+        let id = $("input[name='id']").val();
+        $.modal.confirm("确认审批通过吗?", function() {
+            let url = ctx + "apply/record/updateStatus";
+            $.operate.post(url,{ "id": id, "status": "2" },function(res){
+                $.operate.successTabCallback(res);
+            });
+        });
+    }
+
+    function reject() {
+        let id = $("input[name='id']").val();
+        $.modal.confirm("确认审批驳回吗?", function() {
+            let url = ctx + "apply/record/rejectDialog/" + id;
+            $.modal.open("请填写驳回原因", url, '700', '540');
+        });
+    }
+
+    function callBack(res){
+        $.operate.successTabCallback(res);
+    }
+
+</script>
+</body>
+</html>

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

@@ -0,0 +1,246 @@
+<!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" />
+    <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">
+<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>
+            <!--步骤条end-->
+            <!--主表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <form method="get" class="form-horizontal" id="form-record-edit">
+                        <input type="hidden" name="id" th:value="${intRecord.id}">
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">申请部门名称</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly class="form-control" th:value="${intRecord.applyDeptName}">
+                            </div>
+                            <label class="col-sm-2 control-label is-required">申请人</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly class="form-control" th:value="${intRecord.applyUserName}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">联系方式</label>
+                            <div class="col-sm-4">
+                                <input type="text" readonly name="tel" class="form-control" maxlength="11" th:value="${intRecord.tel}" required>
+                            </div>
+                            <label class="col-sm-2 control-label is-required">调用者IP</label>
+                            <div class="col-sm-4">
+                                <input type="input" readonly name="ip" class="form-control" maxlength="15" th:value="${intRecord.ip}" required>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">接口提供部门</label>
+                            <div class="col-sm-10">
+                                <div class="input-group">
+                                    <input name="provideDeptName" readonly th:value="${intRecord.provideDeptName}" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
+                                    <input name="provideDeptId" th:value="${intRecord.provideDeptId}" type="hidden" id="treeId"/>
+                                    <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 is-required">每天调用频率</label>
+                            <div class="col-sm-4">
+                                <input type="input" class="form-control" readonly name="frequency" maxlength="10" th:value="${intRecord.frequency}" required>
+                            </div>
+                            <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>
+                                    <input type="text" class="form-control" readonly id="duration" name="duration" placeholder="从 - 至" th:value="${intRecord.duration}" required>
+                                </div>
+                            </div>
+                        </div>
+
+                        <div class="form-group" style="display: none;" id="rejectDiv">
+                            <!--政数局驳回部分-->
+                            <label class="col-sm-2 control-label is-required" style="display: none;" name="approval">驳回原因</label>
+                            <div class="col-sm-4" style="display: none;" name="approval">
+                                <textarea class="form-control" readonly name="approvalContent">[[${intRecord.approvalContent}]]</textarea>
+                            </div>
+                            <!--政数局驳回部分-->
+                            <!--接口提供部门驳回部分-->
+                            <label class="col-sm-2 control-label is-required" style="display: none;" name="examine">驳回原因</label>
+                            <div class="col-sm-4" style="display: none;" name="examine">
+                                <textarea class="form-control" readonly name="examineContent">[[${intRecord.examineContent}]]</textarea>
+                            </div>
+                            <!--接口提供部门驳回部分-->
+                            <!--通用部分-->
+                            <label class="col-sm-2 control-label is-required">驳回依据</label>
+                            <div class="col-sm-4">
+                                <a class="btn btn-block btn-outline btn-primary" id="file">点此查看附件</a>
+                            </div>
+                            <!--通用部分-->
+                        </div>
+                    </form>
+                </div>
+            </div>
+            <!--主表字段end-->
+            <!--子表字段start-->
+            <div class="ibox">
+                <div class="ibox-content">
+                    <div class="panel-group" id="accordion">
+                    </div>
+                </div>
+            </div>
+            <!--子表字段end-->
+        </div>
+    </div>
+</div>
+<div class="row">
+    <div class="col-sm-offset-5 col-sm-10">
+        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
+    </div>
+</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">
+
+    let prefix = ctx + "system";
+    let datas = [[${@dict.getType('share_type')}]];
+    let apply_prefix = ctx + "apply/record"
+    let deptName = "提供部门";
+    let num = 0;
+    let interfaces = [[${intDetailedList}]];
+    let status = [[${intRecord.status}]];
+    let index = 0;
+    let approval_file = [[${intRecord.approvalFile}]];
+    let examine_file = [[${intRecord.examineFile}]];
+
+    $(function() {
+        /** 回显接口 **/
+        renderInterface(interfaces);
+
+        /**step步骤条**/
+        switch(status){
+            case "3" : index = 1; break;//政数局待审批
+            case "5" :
+                index = 1;
+                if(approval_file == null){
+                    $("#file").text("未查询到附件");
+                }
+                $("#file").attr("href",approval_file);
+                $("#rejectDiv").show();
+                $("label[name='approval']").show();
+                $("div[name='approval']").show();
+                break;//政数局驳回
+            case "4" : index = 2; break;//提供部门待审批
+            case "6" :
+                index = 2;
+                if(examine_file == null){
+                    $("#file").text("未查询到附件");
+                }
+                $("#file").attr("href",examine_file);
+                $("#rejectDiv").show();
+                $("label[name='examine']").show();
+                $("div[name='examine']").show();
+                break;//申请驳回
+            case "2" :
+                index = 3;
+                $("div[name='secretKey']").show();
+                break;//	审核通过
+        }
+
+        let data = {
+            data: ['开始', '政数局审批', deptName+'审批', '完成'],
+            index: index //0是第一步(0~3)
+        };
+        let dom = $('#luStep');
+        dom.stepInit(data);
+    });
+
+    /** 回显接口 **/
+    function renderInterface(data){
+        let html =
+            '<div class="panel panel-default">' +
+            '	<div class="panel-heading">' +
+            '		<h5 class="panel-title">' +
+            '			<a data-toggle="collapse" data-parent="#accordion" href="##id#" onclick="openOrClose(this)">#interfaceName#</a>' +
+            '			<span class="panel_sj on" name="#id#"></span>' +
+            '		</h5>' +
+            '	</div>' +
+            '	<div id="#id#" class="panel-collapse collapse">' +
+            '		<div class="panel-body">' +
+            '			<form class="form-horizontal" id="#formId#">' +
+            '           <input type="hidden" name="intId" value="#id#">' +
+            '				<div class="form-group">' +
+            '					<label class="col-sm-2 control-label">接口地址</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" disabled value="#interfaceAddress#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group" style="display: none" name="secretKey">' +
+            '					<label class="col-sm-2 control-label">秘钥</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" disabled value="#secretKey#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group">' +
+            '					<label class="col-sm-2 control-label">接口用途</label>' +
+            '					<div class="col-sm-10">' +
+            '						<input type="text" readonly class="form-control" name="purpose" value="#purpose#">' +
+            '					</div>' +
+            '				</div>' +
+            '				<div class="form-group">' +
+            '                   <label class="col-sm-2 control-label">附件</label>' +
+            '                   <div class="col-sm-10">' +
+            '					    <iframe id="#file_upload#" src="/apply/record/uploadFrameDisabled/#subId#" width="100%" height="412px" frameborder="0" seamless></iframe>' +
+            '				    </div>' +
+            '				</div>' +
+            '			</form>' +
+            '		</div>' +
+            '	</div>' +
+            '</div>';
+        for(let i=0;i<data.length;i++){
+            let docm = html.replace(/#interfaceName#/g,data[i].interfaceName);
+            docm = docm.replace(/#interfaceAddress#/g,data[i].interfaceAddress);
+            docm = docm.replace(/#purpose#/g,data[i].purpose);
+            docm = docm.replace(/#id#/g,data[i].intId);
+            docm = docm.replace(/#subId#/g,data[i].subId);
+            docm = docm.replace(/#secretKey#/g,data[i].secretKey);
+            docm = docm.replace(/#formId#/g,"sub-form"+num);
+            docm = docm.replace(/#file_upload#/g,"file_upload"+num);
+            $("#accordion").append(docm);
+            num += 1;
+        }
+    }
+
+    /**手风琴右侧上下箭头样式变换控制**/
+    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>
+</body>
+</html>

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

@@ -286,7 +286,7 @@
     /**step步骤条**/
     let data = {
         data: ['开始', '政数局审批', deptName+'审批', '完成'],
-        index: 1 //0是第一步(0~3)
+        index: 0 //0是第一步(0~3)
     };
     let dom = $('#luStep');
     dom.stepInit(data);

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

@@ -15,6 +15,13 @@
                                 <input type="text" name="provideDeptName" onclick="selectDeptTree()" id="treeName" placeholder="请选择接口提供部门"/>
                             </li>
                             <li>
+                                <label>当前状态:</label>
+                                <select name="status" th:with="type=${@dict.getType('status')}">
+                                    <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 class="fa fa-refresh"></i>&nbsp;重置</a>
                             </li>
@@ -44,12 +51,13 @@
     </div>
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
-        var editFlag = [[${@permission.hasPermi('apply:record:edit')}]];
-        var removeFlag = [[${@permission.hasPermi('apply:record:remove')}]];
-        var prefix = ctx + "apply/record";
+        let editFlag = [[${@permission.hasPermi('apply:record:edit')}]];
+        let removeFlag = [[${@permission.hasPermi('apply:record:remove')}]];
+        let status = [[${@dict.getType('status')}]];
+        let prefix = ctx + "apply/record";
 
         $(function() {
-            var options = {
+            let options = {
                 url: prefix + "/list",
                 createUrl: prefix + "/add",
                 updateUrl: prefix + "/edit/{id}",
@@ -70,23 +78,39 @@
                 },
                 {
                     field: 'applyTime',
-                    title: '申请时间'
+                    title: '申请时间',
+                    sortable: true
                 },
                 {
                     field: 'duration',
-                    title: '使用时效'
+                    title: '使用时效',
+                    sortable: true
                 },
                 {
                     field: 'frequency',
                     title: '调用频次'
                 },
                 {
+                    field: 'status',
+                    title: '当前状态',
+                    sortable: true,
+                    formatter: function (value, item, index) {
+                        return $.table.selectDictLabel(status, item.status);
+                    }
+                },
+                {
                     title: '操作',
                     align: 'center',
                     formatter: function(value, row, index) {
-                        var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
-                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        let actions = [];
+                        /**新建状态**/
+                        if(row.status == 0){
+                            actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="report(\'' + row.id + '\')"><i class="fa fa-check"></i>提交审核</a> ');
+                            actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                            actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        }else{
+                            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-search"></i>查看详情</a>');
+                        }
                         return actions.join('');
                     }
                 }]
@@ -94,6 +118,19 @@
             $.table.init(options);
         });
 
+        /**提交审核**/
+        function report(id) {
+            $.modal.confirm("确认要提交审核吗?", function() {
+                let url = ctx + "apply/record/updateStatus";
+                $.operate.post(url,{ "id": id, "status": "3" });
+            });
+        }
+
+        /**查看详情**/
+        function detail(id) {
+            $.modal.openTab("查看详情", prefix + "/detail/"+id);
+        }
+
         /**选择部门树**/
         function selectDeptTree() {
             var treeId = $("#treeId").val();

+ 178 - 0
mybusiness/src/main/resources/templates/apply/record/rejectDialog.html

@@ -0,0 +1,178 @@
+<!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>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-record-reject">
+        <input name="id"  type="hidden"  th:value="${intRecord.id}" />
+        <input name="status"  type="hidden"  th:value="${intRecord.status}" />
+        <div class="form-group">
+            <label class="col-sm-3 control-label is-required">驳回原因:</label>
+            <div class="col-sm-8">
+                <input class="form-control" type="text" name="content" id="content" maxlength="2000" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">附  件:</label>
+            <div class="col-sm-8">
+                <input class="file-upload" id="file" name="file" type="file" data-min-file-count="1">
+                <input type="hidden" name="_file">
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: bootstrap-fileinput-js" />
+<script type="text/javascript">
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            let data = $('#form-record-reject').serializeArray();
+            data.push({"name": "file", "value": $("input[name='_file']").val()});
+            $.operate.save(ctx + "apply/record/reject",data,function(res){
+                if(res.code == 0){
+                    parent.callBack(res);
+                }else{
+                    $.modal.alertError('操作失败!');
+                }
+            });
+        }
+    }
+
+
+    /**附件组件多图片回显JS**/
+    let newFilePs = []; //图片回显
+    let imgConfig = []; //预览参数
+    let uploadImageArray = [];//所有已上传的图片路径
+    let fileP=$("input[name='_file']").val();
+    let urlsArr = ($("input[name='_file']").val()).split(",");
+    for(let i in urlsArr) {
+        if (urlsArr[i] != "") {
+            uploadImageArray.push(urlsArr[i]);
+            newFilePs[i] = urlsArr[i];
+            let fileType = urlsArr[i].substr(urlsArr[i].lastIndexOf(".")+1,urlsArr[i].length-1);
+            let ftype ="image"; //文件类型
+            if(fileType=="pdf"){
+                ftype = "pdf";
+            }
+            imgConfig[i] = {
+                url: "/common/removeFile",
+                downloadUrl:urlsArr[i], //下载路径,此项不设置的话下载按钮不显示
+                type:ftype,             //文件类型
+                key: urlsArr[i],        //参数,用于文件删除向后台传参
+                caption:urlsArr[i].substr(urlsArr[i].lastIndexOf("/")+1,urlsArr[i].length-1)    //文件名,用于预览文件显示的文件名
+            };
+        }
+    }
+
+
+    $(".file-upload").each(function (i) {
+        $(this).fileinput({
+            language: 'zh', //设置语言
+            uploadUrl: '/common/upload',
+            deleteUrl: '/common/removeFile',
+            allowedFileExtensions: ['pdf','docx','doc','jpg','png'],//接收的文件后缀
+            showUpload: false, //是否显示上传按钮
+            showRemove: false, //显示移除按钮
+            showPreview: true, //是否显示预览
+            showCaption: false,//是否显示标题
+            browseClass: "btn btn-primary", //按钮样式
+            dropZoneEnabled: true,//是否显示拖拽区域
+            initialPreviewAsData: true,
+            enctype: 'multipart/form-data',
+            initialPreview: newFilePs,
+            uploadAsync: true, //默认异步上传(true),回调fileuploaded,false为同步上传,回调filebatchuploadsuccess
+            maxFileCount: 6,
+            overwriteInitial:false,    //不覆盖已存在的图片
+            initialPreviewConfig: imgConfig, //配置预览的参数
+            autoReplace: true,
+            preferIconicPreview: true,// 强制缩略图显示以下文件扩展名的图标
+            previewFileIconSettings: {
+                'doc': '<i class="fa fa-file-word-o text-primary"></i>',
+                'xls': '<i class="fa fa-file-excel-o text-success"></i>',
+                'ppt': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
+                'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
+                'htm': '<i class="fa fa-file-code-o text-info"></i>',
+                'txt': '<i class="fa fa-file-text-o text-info"></i>',
+                'mov': '<i class="fa fa-file-movie-o text-warning"></i>',
+                'mp3': '<i class="fa fa-file-audio-o text-warning"></i>',
+            },
+            previewFileExtSettings: { // configure the logic for determining icon file extensions
+                'doc': function(ext) {
+                    return ext.match(/(doc|docx)$/i);
+                },
+                'xls': function(ext) {
+                    return ext.match(/(xls|xlsx)$/i);
+                },
+                'ppt': function(ext) {
+                    return ext.match(/(ppt|pptx)$/i);
+                },
+                'zip': function(ext) {
+                    return ext.match(/(zip|rar|tar|gzip|gz|7z)$/i);
+                },
+                'htm': function(ext) {
+                    return ext.match(/(htm|html)$/i);
+                },
+                'txt': function(ext) {
+                    return ext.match(/(txt|ini|csv|java|php|js|css)$/i);
+                },
+                'mov': function(ext) {
+                    return ext.match(/(avi|mpg|mkv|mov|mp4|3gp|webm|wmv)$/i);
+                },
+                'mp3': function(ext) {
+                    return ext.match(/(mp3|wav)$/i);
+                }
+            }
+        }).on('fileuploaded', function (event, data, previewId, index) {
+            fileP += data.response.fileName+",";
+            $('#zoom-'+previewId).find(".kv-preview-data").attr("src",data.response.fileName);//上传成功后替换文件路径(替换为实际数据库的存储路径)
+            $("input[name='_" + event.currentTarget.id + "']").val(data.response.fileName);
+        }).on("filebatchselected", function (event, previewId, files) {//选中文件后执行
+            $(".file-upload").fileinput("upload");
+        }).on('fileremoved', function (event, id, index) {//预览时点击缩略图上的删除按钮才能触发的
+            console.log('fileremoved');
+            getMeg();
+        }).on("filepredelete", function (event, key, jqXHR, data) {   //预览图片删除
+            console.log('filepredelete')
+            getMeg();
+        }).on("filesuccessremove", function (event, id) {   //使用缩略图删除按钮删除成功上传的缩略图后
+            console.log('filesuccessremove')
+            getMeg();
+        })
+        $(this).fileinput('_initFileActions');
+    });
+
+    function nowImgTotal() {
+        return $(".file-preview-thumbnails").find('.file-preview-frame').length / 2;
+    }
+
+    function getMeg() {
+        if (nowImgTotal() >= 6) {
+            $('#file').attr('disabled', 'disabled');
+            $.modal.alert("图片允许上传的最大数值为6,请删除需要被替换的图片后再进行上传操作!")
+            return false;
+        }else{
+            $('#file').removeAttr("disabled");
+        }
+    }
+
+    /*
+        获取当前页面图片附件的存储路径
+     */
+    function getImgUrl(){
+        var initFileDiv = $(".kv-zoom-cache");
+        var imgUrl = [];
+        initFileDiv.each(function(i,e){
+            debugger
+            var fullPath = $(this).find(".kv-preview-data").attr("src");
+            if(fullPath!=null&&fullPath!=""&&fullPath.length>=2)
+                imgUrl[i]="/profile/upload/"+(fullPath.split("upload/",fullPath.length-1))[1];
+        });
+        return imgUrl;
+    }
+</script>
+</body>
+</html>

+ 146 - 0
mybusiness/src/main/resources/templates/apply/record/uploadFrameDisabled.html

@@ -0,0 +1,146 @@
+<!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>
+    <input class="file-upload" id="file" disabled name="file" type="file" data-min-file-count="1">
+    <input type="hidden" name="_file" th:value="${file}">
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: bootstrap-fileinput-js" />
+<script>
+
+    /**附件组件多图片回显JS**/
+    let newFilePs = []; //图片回显
+    let imgConfig = []; //预览参数
+    let uploadImageArray = [];//所有已上传的图片路径
+    let fileP=$("input[name='_file']").val();
+    let urlsArr = ($("input[name='_file']").val()).split(",");
+    for(let i in urlsArr) {
+        if (urlsArr[i] != "") {
+            uploadImageArray.push(urlsArr[i]);
+            newFilePs[i] = urlsArr[i];
+            let fileType = urlsArr[i].substr(urlsArr[i].lastIndexOf(".")+1,urlsArr[i].length-1);
+            let ftype ="image"; //文件类型
+            if(fileType=="pdf"){
+                ftype = "pdf";
+            }
+            imgConfig[i] = {
+                url: "/common/removeFile",
+                downloadUrl:urlsArr[i], //下载路径,此项不设置的话下载按钮不显示
+                type:ftype,             //文件类型
+                key: urlsArr[i],        //参数,用于文件删除向后台传参
+                caption:urlsArr[i].substr(urlsArr[i].lastIndexOf("/")+1,urlsArr[i].length-1)    //文件名,用于预览文件显示的文件名
+            };
+        }
+    }
+
+
+    $(".file-upload").each(function (i) {
+        $(this).fileinput({
+            language: 'zh', //设置语言
+            uploadUrl: '/common/upload',
+            deleteUrl: '/common/removeFile',
+            allowedFileExtensions: ['pdf','docx','doc','jpg','png'],//接收的文件后缀
+            showUpload: false, //是否显示上传按钮
+            showRemove: false, //显示移除按钮
+            showPreview: true, //是否显示预览
+            showCaption: false,//是否显示标题
+            browseClass: "btn btn-primary", //按钮样式
+            dropZoneEnabled: true,//是否显示拖拽区域
+            initialPreviewAsData: true,
+            enctype: 'multipart/form-data',
+            initialPreview: newFilePs,
+            uploadAsync: true, //默认异步上传(true),回调fileuploaded,false为同步上传,回调filebatchuploadsuccess
+            maxFileCount: 6,
+            overwriteInitial:false,    //不覆盖已存在的图片
+            initialPreviewConfig: imgConfig, //配置预览的参数
+            autoReplace: true,
+            preferIconicPreview: true,// 强制缩略图显示以下文件扩展名的图标
+            previewFileIconSettings: {
+                'doc': '<i class="fa fa-file-word-o text-primary"></i>',
+                'xls': '<i class="fa fa-file-excel-o text-success"></i>',
+                'ppt': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
+                'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
+                'htm': '<i class="fa fa-file-code-o text-info"></i>',
+                'txt': '<i class="fa fa-file-text-o text-info"></i>',
+                'mov': '<i class="fa fa-file-movie-o text-warning"></i>',
+                'mp3': '<i class="fa fa-file-audio-o text-warning"></i>',
+            },
+            previewFileExtSettings: { // configure the logic for determining icon file extensions
+                'doc': function(ext) {
+                    return ext.match(/(doc|docx)$/i);
+                },
+                'xls': function(ext) {
+                    return ext.match(/(xls|xlsx)$/i);
+                },
+                'ppt': function(ext) {
+                    return ext.match(/(ppt|pptx)$/i);
+                },
+                'zip': function(ext) {
+                    return ext.match(/(zip|rar|tar|gzip|gz|7z)$/i);
+                },
+                'htm': function(ext) {
+                    return ext.match(/(htm|html)$/i);
+                },
+                'txt': function(ext) {
+                    return ext.match(/(txt|ini|csv|java|php|js|css)$/i);
+                },
+                'mov': function(ext) {
+                    return ext.match(/(avi|mpg|mkv|mov|mp4|3gp|webm|wmv)$/i);
+                },
+                'mp3': function(ext) {
+                    return ext.match(/(mp3|wav)$/i);
+                }
+            }
+        }).on('fileuploaded', function (event, data, previewId, index) {
+            fileP += data.response.fileName+",";
+            $('#zoom-'+previewId).find(".kv-preview-data").attr("src",data.response.fileName);//上传成功后替换文件路径(替换为实际数据库的存储路径)
+            $("input[name='_" + event.currentTarget.id + "']").val(data.response.fileName);
+        }).on("filebatchselected", function (event, previewId, files) {//选中文件后执行
+            $(".file-upload").fileinput("upload");
+        }).on('fileremoved', function (event, id, index) {//预览时点击缩略图上的删除按钮才能触发的
+            console.log('fileremoved');
+            getMeg();
+        }).on("filepredelete", function (event, key, jqXHR, data) {   //预览图片删除
+            console.log('filepredelete')
+            getMeg();
+        }).on("filesuccessremove", function (event, id) {   //使用缩略图删除按钮删除成功上传的缩略图后
+            console.log('filesuccessremove')
+            getMeg();
+        })
+        $(this).fileinput('_initFileActions');
+    });
+
+    function nowImgTotal() {
+        return $(".file-preview-thumbnails").find('.file-preview-frame').length / 2;
+    }
+
+    function getMeg() {
+        if (nowImgTotal() >= 6) {
+            $('#file').attr('disabled', 'disabled');
+            $.modal.alert("图片允许上传的最大数值为6,请删除需要被替换的图片后再进行上传操作!")
+            return false;
+        }else{
+            $('#file').removeAttr("disabled");
+        }
+    }
+
+    /*
+        获取当前页面图片附件的存储路径
+     */
+    function getImgUrl(){
+        var initFileDiv = $(".kv-zoom-cache");
+        var imgUrl = [];
+        initFileDiv.each(function(i,e){
+            debugger
+            var fullPath = $(this).find(".kv-preview-data").attr("src");
+            if(fullPath!=null&&fullPath!=""&&fullPath.length>=2)
+                imgUrl[i]="/profile/upload/"+(fullPath.split("upload/",fullPath.length-1))[1];
+        });
+        return imgUrl;
+    }
+
+</script>
+</html>
+

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

@@ -15,7 +15,7 @@
                             <input type="text" name="loginName"/>
                         </li>
                         <li>
-                            <label>平台接口类型:</label>
+                            <label>接口类型:</label>
                             <select name="platformInterfacetype"
                                     th:with="type=${@dict.getType('platform_interfacetype')}">
                                 <option value="">所有</option>

+ 11 - 2
mybusiness/src/main/resources/templates/visualization/index.html

@@ -24,7 +24,7 @@
         <div class="nav_a nav_la">
             <span>接入部门</span>
             <div class="nav_div">
-                <a>血站</a>
+                <a onclick="openFrame()">血站</a>
                 <a>体检中心</a>
                 <a>图书馆</a>
                 <a>自来水公司</a>
@@ -370,7 +370,7 @@
 </div>
 
 <!-- 弹框 开始-->
-<!--<iframe id="tk_iframe" th:src="@{/VisualizationController/edition2/tk_iframe}"></iframe>-->
+<iframe id="tk_iframe" style="display:none" th:src="@{/visualization/tk_iframe}"></iframe>
 <!-- 弹框 结束-->
 <script>
     //宇宙特效
@@ -487,6 +487,15 @@
         imputationDataList($("#line").val());
     }
 
+    //iframe 显示方法
+    function openFrame(){
+        $("#tk_iframe").show();
+    }
+    //iframe 关闭方法
+    function closeFrame(){
+        $("#tk_iframe").hide();
+    }
+
 
 </script>
 <script type="text/javascript" th:src="@{/visualization/js/echarts_div.js}"></script>

+ 3 - 3
mybusiness/src/main/resources/templates/visualization/tk_iframe.html

@@ -1,5 +1,5 @@
 <!doctype html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
 	<head>
 		<meta charset="utf-8">
 		<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -16,7 +16,7 @@
 	<body>
 		<div class="tk_tit">
 			<span>XXXX部门</span>
-			<u class="tk_close">X</u>
+			<u class="tk_close" onclick="parent.closeFrame()">X</u>
 		</div>
 		<div class="tk_con clearfix">
 			<div class="tk_jklb tk_bg fl">
@@ -536,4 +536,4 @@
 			$('#FontScroll').FontScroll({time: 2000,num: 1});
 		</script>
 	</body>
-</html>
+</html>