فهرست منبع

接口应用审批管理 数据应用审批管理

wangzhe 2 سال پیش
والد
کامیت
41a15263e8

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

@@ -42,13 +42,13 @@ public class IntRecord extends BaseEntity
     @Excel(name = "调用者IP")
     private String ip;
 
-    /** 提供部门ID */
-    private String provideDeptId;
-
     /** 共享类型 */
     @Excel(name = "数据来源")
     private String shareType;
 
+    /** 提供部门ID */
+    private String provideDeptId;
+
     /** 提供部门 */
     @Excel(name = "提供部门")
     private String provideDeptName;

+ 4 - 0
mybusiness/src/main/java/com/sooka/applyData/domain/DataRecord.java

@@ -42,6 +42,10 @@ public class DataRecord extends BaseEntity
     @Excel(name = "调用者IP")
     private String ip;
 
+    /** 共享类型 */
+    @Excel(name = "数据来源")
+    private String shareType;
+
     /** 提供部门ID */
     private String provideDeptId;
 

+ 2 - 1
mybusiness/src/main/resources/mapper/apply/IntRecordMapper.xml

@@ -121,7 +121,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             b.secret_key,
             b.purpose,
             b.file,
-            d.dict_label share_type,
+            c.share_type,
+            d.dict_label share_type_abandon,
             c.interface_name,
             c.interface_address,
             c.code

+ 2 - 0
mybusiness/src/main/resources/mapper/applyData/DataRecordMapper.xml

@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="frequency"    column="frequency"    />
         <result property="duration"    column="duration"    />
         <result property="startTime"    column="start_time"    />
+        <result property="shareType"    column="share_type"    />
         <result property="endTime"    column="end_time"    />
         <result property="status"    column="status"    />
         <result property="approvalUserId"    column="approval_user_id"    />
@@ -120,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             b.secret_key,
             b.purpose,
             b.file,
+            c.share_type,
             c.interface_name,
             c.interface_address,
             c.code

+ 30 - 2
mybusiness/src/main/resources/templates/apply/approval/approvalDetail.html

@@ -49,10 +49,16 @@
                             </div>
                         </div>
                         <div class="form-group">
+                            <label class="col-sm-2 control-label is-required">接口来源</label>
+                            <div class="col-sm-4">
+                                <label><input name="shareType" type="radio" value="share_type_1" th:field="${intRecord.shareType}" disabled style="cursor: auto;"/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" th:field="${intRecord.shareType}" disabled style="cursor: auto;"/>省共享</label>
+                                <!--<input type="input" readonly name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>-->
+                            </div>
                             <label class="col-sm-2 control-label is-required">接口提供部门</label>
-                            <div class="col-sm-10">
+                            <div class="col-sm-4">
                                 <div class="input-group">
-                                    <input name="provideDeptName" readonly th:value="${intRecord.provideDeptName}" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
+                                    <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>
@@ -102,6 +108,28 @@
 <th:block th:include="include :: select2-js" />
 <th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
+    $(document).ready(function(){
+        init();
+    })
+    function init() {
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
+    }
 
     let prefix = ctx + "system";
     let datas = [[${@dict.getType('share_type')}]];

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

@@ -49,10 +49,12 @@
                         <div class="form-group">
                             <label class="col-sm-2 control-label is-required">接口来源</label>
                             <div class="col-sm-4">
-                                <select class='form-control' id="shareType" name='shareType' onchange="changeShareType()">
+                                <label><input name="shareType" type="radio" value="share_type_1" onchange="changeShareType()" checked/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" onchange="changeShareType()"/>省共享</label>
+                                <!--<select class='form-control' id="shareType" name='shareType' onchange="changeShareType()">
                                     <option value="share_type_1">市共享</option>
                                     <option value="share_type_4">省共享</option>
-                                </select>
+                                </select>-->
                             </div>
                             <label class="col-sm-2 control-label is-required">接口提供部门</label>
                             <div class="col-sm-4">
@@ -143,7 +145,7 @@
         if(deptId == "" || deptId == null){
             $.modal.alertError('请先选择接口提供部门');
         }else{
-            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_3';
+            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_4';
             $.modal.open("请选择接口", url, ($(window).width() - 50),($(window).height() - 50), interfaceCallback);
         }
     }
@@ -212,7 +214,8 @@
 
     /**选择部门树**/
     function selectDeptTree() {
-        let shareType = $("#shareType").val();
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
         var treeId = $("#treeId").val();
         var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
         // var url = ctx + "system/dept/selectDeptTree/" + deptId;
@@ -241,7 +244,8 @@
     function changeShareType(){
         $("#treeId").val("");
         $("#treeName").val("");
-        let shareType = $("#shareType").val();
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
         let data;
         if(shareType == "share_type_1"){//市共享 4步
             data = {

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

@@ -50,7 +50,9 @@
                         <div class="form-group">
                             <label class="col-sm-2 control-label is-required">接口来源</label>
                             <div class="col-sm-4">
-                                <input type="input" readonly name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>
+                                <label><input name="shareType" type="radio" value="share_type_1" th:field="${intRecord.shareType}" disabled style="cursor: auto;"/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" th:field="${intRecord.shareType}" disabled style="cursor: auto;"/>省共享</label>
+                                <!--<input type="input" readonly name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>-->
                             </div>
                             <label class="col-sm-2 control-label is-required">接口提供部门</label>
                             <div class="col-sm-4">
@@ -125,6 +127,28 @@
 <th:block th:include="include :: select2-js" />
 <th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
+    $(document).ready(function(){
+        // init();
+    })
+    function init() {
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
+    }
 
     let prefix = ctx + "system";
     let datas = [[${@dict.getType('share_type')}]];
@@ -171,10 +195,23 @@
                 break;//	审核通过
         }
 
-        let data = {
-            data: ['开始', '政数局审批', deptName+'审批', '完成'],
-            index: index //0是第一步(0~3)
-        };
+        // let data = {
+        //     data: ['开始', '政数局审批', deptName+'审批', '完成'],
+        //     index: index //0是第一步(0~3)
+        // };
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
         let dom = $('#luStep');
         dom.stepInit(data);
     });

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

@@ -50,7 +50,9 @@
                         <div class="form-group">
                             <label class="col-sm-2 control-label is-required">接口来源</label>
                             <div class="col-sm-4">
-                                <input type="input" readonly name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>
+                                <label><input name="shareType" type="radio" value="share_type_1" th:field="${intRecord.shareType}" onchange="changeShareType()"/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" th:field="${intRecord.shareType}" onchange="changeShareType()"/>省共享</label>
+                                <!--<input type="input" name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>-->
                             </div>
                             <label class="col-sm-2 control-label is-required">接口提供部门</label>
                             <div class="col-sm-4">
@@ -108,6 +110,28 @@
 <th:block th:include="include :: select2-js" />
 <th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
+    $(document).ready(function(){
+        init();
+    })
+    function init() {
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
+    }
 
     let prefix = ctx + "system";
     let datas = [[${@dict.getType('share_type')}]];
@@ -195,7 +219,7 @@
         if(deptId == "" || deptId == null){
             $.modal.alertError('请先选择接口提供部门');
         }else{
-            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_3';
+            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_4';
             $.modal.open("请选择接口", url, ($(window).width() - 50),($(window).height() - 50), interfaceCallback);
         }
     }
@@ -287,6 +311,13 @@
         }
     }
 
+    //切换接口来源
+    function changeShareType(){
+        $("#treeId").val("");
+        $("#treeName").val("");
+        init();
+    }
+
     /**step步骤条**/
     let data = {
         data: ['开始', '政数局审批', deptName+'审批', '完成'],

+ 56 - 21
mybusiness/src/main/resources/templates/applyData/approval/approvalDetail.html

@@ -26,50 +26,63 @@
             <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}">
+                        <input type="hidden" name="id" th:value="${DataRecord.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}">
+                                <input type="text" readonly class="form-control" th:value="${DataRecord.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}">
+                                <input type="text" readonly class="form-control" th:value="${DataRecord.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>
+                                <input type="text" readonly name="tel" class="form-control" maxlength="11" th:value="${DataRecord.tel}" required>
                             </div>
-                            <label class="col-sm-2 control-label is-required">调用者IP</label>
+                            <label class="col-sm-2 control-label is-required">使用时效</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 class="input-group date">
+                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                                    <input type="text" class="form-control" id="duration" name="duration" placeholder="从 - 至" th:value="${DataRecord.duration}" required>
                                 </div>
                             </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="${DataRecord.ip}" required>-->
+                            <!--</div>-->
                         </div>
                         <div class="form-group">
-                            <label class="col-sm-2 control-label is-required">每天调用频率</label>
+                            <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>
+                                <label><input name="shareType" type="radio" value="share_type_1" th:field="${DataRecord.shareType}" disabled style="cursor: auto;"/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" th:field="${DataRecord.shareType}" disabled style="cursor: auto;"/>省共享</label>
+                                <!--<input type="input" readonly name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>-->
                             </div>
-                            <label class="col-sm-2 control-label is-required">使用时效</label>
+                            <label class="col-sm-2 control-label is-required">数据应用提供部门</label>
                             <div class="col-sm-4">
-                                <div class="input-group date">
-                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                                    <input type="text" class="form-control" readonly id="duration" name="duration" placeholder="从 - 至" th:value="${intRecord.duration}" required>
+                                <div class="input-group">
+                                    <input name="provideDeptName" readonly th:value="${DataRecord.provideDeptName}" id="treeName" type="text" placeholder="请选择提供部门" class="form-control" required>
+                                    <input name="provideDeptId" th:value="${DataRecord.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="${DataRecord.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="${DataRecord.duration}" required>-->
+                                <!--</div>-->
+                            <!--</div>-->
+                        <!--</div>-->
                     </form>
                 </div>
             </div>
@@ -101,6 +114,28 @@
 <th:block th:include="include :: select2-js" />
 <th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
+    $(document).ready(function(){
+        init();
+    })
+    function init() {
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
+    }
 
     let prefix = ctx + "system";
     let datas = [[${@dict.getType('share_type')}]];

+ 25 - 7
mybusiness/src/main/resources/templates/applyData/record/add.html

@@ -56,10 +56,12 @@
                         <div class="form-group">
                             <label class="col-sm-2 control-label is-required">数据应用来源</label>
                             <div class="col-sm-4">
-                                <select class='form-control' id="shareType" name='shareType' onchange="changeShareType()">
-                                    <option value="share_type_1">市共享</option>
-                                    <option value="share_type_4">省共享</option>
-                                </select>
+                                <label><input name="shareType" type="radio" value="share_type_1" onchange="changeShareType()" checked/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" onchange="changeShareType()"/>省共享</label>
+                                <!--<select class='form-control' id="shareType" name='shareType' onchange="changeShareType()">-->
+                                    <!--<option value="share_type_1">市共享</option>-->
+                                    <!--<option value="share_type_4">省共享</option>-->
+                                <!--</select>-->
                             </div>
                             <label class="col-sm-2 control-label is-required">数据应用提供部门</label>
                             <div class="col-sm-4">
@@ -121,7 +123,22 @@
         $("#treeId").val("");
         $("#treeName").val("");
         // let shareType = $("#shareType").val();
-        // alert(shareType)
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
     }
 
 
@@ -158,7 +175,7 @@
         if(deptId == "" || deptId == null){
             $.modal.alertError('请先选择数据应用提供部门');
         }else{
-            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_3';
+            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_4';
             $.modal.open("请选择接口", url, ($(window).width() - 50),($(window).height() - 50), interfaceCallback);
         }
     }
@@ -227,7 +244,8 @@
 
     /**选择部门树**/
     function selectDeptTree() {
-        let shareType = $("#shareType").val();
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
         var treeId = $("#treeId").val();
         var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
         // var url = ctx + "system/dept/selectDeptTree/" + deptId;

+ 46 - 6
mybusiness/src/main/resources/templates/applyData/record/detail.html

@@ -55,8 +55,14 @@
                             <!--</div>-->
                         </div>
                         <div class="form-group">
-                            <label class="col-sm-2 control-label is-required">接口提供部门</label>
-                            <div class="col-sm-10">
+                            <label class="col-sm-2 control-label is-required">数据应用</label>
+                            <div class="col-sm-4">
+                                <label><input name="shareType" type="radio" value="share_type_1" th:field="${DataRecord.shareType}" disabled style="cursor: auto;"/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" th:field="${DataRecord.shareType}" disabled style="cursor: auto;"/>省共享</label>
+                                <!--<input type="input" name="shareType" class="form-control" maxlength="15" th:value="${intRecord.shareType}" required>-->
+                            </div>
+                            <label class="col-sm-2 control-label is-required">数据应用提供部门</label>
+                            <div class="col-sm-4">
                                 <div class="input-group">
                                     <input name="provideDeptName" readonly th:value="${DataRecord.provideDeptName}" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
                                     <input name="provideDeptId" th:value="${DataRecord.provideDeptId}" type="hidden" id="treeId"/>
@@ -128,6 +134,28 @@
 <th:block th:include="include :: select2-js" />
 <th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
+    $(document).ready(function(){
+        // init();
+    })
+    function init() {
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
+    }
 
     let prefix = ctx + "system";
     let datas = [[${@dict.getType('share_type')}]];
@@ -174,10 +202,22 @@
                 break;//	审核通过
         }
 
-        let data = {
-            data: ['开始', '政数局审批', deptName+'审批', '完成'],
-            index: index //0是第一步(0~3)
-        };
+        // let data = {
+        //     data: ['开始', '政数局审批', deptName+'审批', '完成'],
+        //     index: index //0是第一步(0~3)
+        // };
+        let shareType = $("input[name='shareType']:checked").val();
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
         let dom = $('#luStep');
         dom.stepInit(data);
     });

+ 56 - 19
mybusiness/src/main/resources/templates/applyData/record/edit.html

@@ -42,15 +42,24 @@
                             <div class="col-sm-4">
                                 <input type="text" name="tel" class="form-control" maxlength="11" th:value="${DataRecord.tel}" required>
                             </div>
-                            <label class="col-sm-2 control-label is-required">调用者IP</label>
+                            <label class="col-sm-2 control-label is-required">使用时效</label>
                             <div class="col-sm-4">
-                                <input type="input" name="ip" class="form-control" maxlength="15" th:value="${DataRecord.ip}" required>
+                                <div class="input-group date">
+                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                                    <input type="text" class="form-control" id="duration" name="duration" placeholder="从 - 至" th:value="${DataRecord.duration}" required>
+                                </div>
                             </div>
+                            <!--<label class="col-sm-2 control-label is-required">调用者IP</label>-->
+                            <!--<div class="col-sm-4">-->
+                                <!--<input type="input" name="ip" class="form-control" maxlength="15" th:value="${DataRecord.ip}" required>-->
+                            <!--</div>-->
                         </div>
                         <div class="form-group">
                             <label class="col-sm-2 control-label is-required">数据应用来源</label>
                             <div class="col-sm-4">
-                                <input type="input" readonly name="shareType" class="form-control" maxlength="15" th:value="${DataRecord.shareType}" required>
+                                <label><input name="shareType" type="radio" value="share_type_1" th:field="${DataRecord.shareType}" onchange="changeShareType()"/>市共享</label>
+                                <label><input name="shareType" type="radio" value="share_type_4" th:field="${DataRecord.shareType}" onchange="changeShareType()"/>省共享</label>
+                                <!--<input type="input" name="shareType" class="form-control" maxlength="15" th:value="${DataRecord.shareType}" required>-->
                             </div>
                             <label class="col-sm-2 control-label is-required">数据应用提供部门</label>
                             <div class="col-sm-4">
@@ -61,19 +70,19 @@
                                 </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" name="frequency" maxlength="10" th:value="${DataRecord.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" id="duration" name="duration" placeholder="从 - 至" th:value="${DataRecord.duration}" required>
-                                </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" name="frequency" maxlength="10" th:value="${DataRecord.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" id="duration" name="duration" placeholder="从 - 至" th:value="${DataRecord.duration}" required>-->
+                                <!--</div>-->
+                            <!--</div>-->
+                        <!--</div>-->
                     </form>
                 </div>
             </div>
@@ -108,6 +117,28 @@
 <th:block th:include="include :: select2-js" />
 <th:block th:include="include :: bootstrap-fileinput-js" />
 <script th:inline="javascript">
+    $(document).ready(function(){
+        init();
+    })
+    function init() {
+        // let shareType = $("#shareType").val();
+        let shareType = $("input[name='shareType']:checked").val();
+        let data;
+        if(shareType == "share_type_1"){//市共享 4步
+            data = {
+                data: ['开始', '政数局审批', deptName+'审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }if(shareType == "share_type_4"){//省共享 3步
+            data = {
+                data: ['开始', '政数局审批', '完成'],
+                index: 0 //0是第一步(0~3)
+            };
+        }
+        let dom = $('#luStep');
+        dom.html("");
+        dom.stepInit(data);
+    }
 
     let prefix = ctx + "system";
     let datas = [[${@dict.getType('share_type')}]];
@@ -195,7 +226,7 @@
         if(deptId == "" || deptId == null){
             $.modal.alertError('请先选择数据应用提供部门');
         }else{
-            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_3';
+            let url = prefix + '/interfaceinfo/selectInterfaceByDeptId/' + deptId + '/share_type_1/share_type_4';
             $.modal.open("请选择接口", url, ($(window).width() - 50),($(window).height() - 50), interfaceCallback);
         }
     }
@@ -287,15 +318,21 @@
         }
     }
 
+    //切换数据应用来源
+    function changeShareType() {
+        $("#treeId").val("");
+        $("#treeName").val("");
+        init();
+    }
+
     /**step步骤条**/
     let data = {
-        data: ['开始', '政数局审批', deptName+'审批', '完成'],
+        data: ['开始', '政数局审批', deptName + '审批', '完成'],
         index: 0 //0是第一步(0~3)
     };
     let dom = $('#luStep');
     dom.stepInit(data);
 
-
     /**表单提交方法**/
     function submitHandler() {
         let subData = [];

+ 146 - 0
mybusiness/src/main/resources/templates/applyData/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>
+