cy
2022-06-28 2ba5c891b24d4d0cd6ce7ef833592e4f576ee5e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
[#include "/business/pages/include/static.html" /]
<title>配置资料</title>
</head>
 
<body>
<div class="table_basic">
    <div class="table_basic_info">
        <div class="tbi_ways">
        </div>
        <div class="tbi_btn">
            <a class="common" id="addLinkDsl"><span>添加DSL</span></a>
        </div>    
    </div>
    <table>
            <tr class="title">
                 <td style="width:7%">序号</td>
                 <td style="width:28%">分类名称</td>
                 <td style="width:28%">搜索码</td>
                 <td style="width:15%">名称</td>
                 <td style="width:8%">版本</td>
                 <td style="width:12%">操作</td>
            </tr>
    [#if list??&&list?size>0]
            [#list list as dsl]
            <tr>
                <td><input type="hidden" name="dslId" value="${dsl.DSL_ID}">${dsl_index+1}</td>
                <td>${dsl.CATE_NAME}</td>
                <td>${dsl.DSL_SEARCHCODE}</td>
                <td>${dsl.DSL_NAME}</td>
                <td>${dsl.EDITION}</td>
                <td  class="list_btnmore_wrap">
                    <a class="blue_txt lb_button"  id="version" href="javascript:editVersion('${dsl.LINK_ID}','${dsl.DSL_ID}','${dsl.FLAG}','${dsl.NEW_VERSION_ID}');"><span>修改</span></a>
                    <a class="blue_txt"  id="info" href="javascript:delLinkDsl('${dsl.LINK_ID}','${dsl.FLAG}');"><span>删除</span></a>
                </td>
            </tr>
            [/#list]
    [#else]
        <tr>
            <td align="center" colspan="6">暂无信息</td>
        </tr>
    [/#if]
    </table>
</div>
<script type="text/javascript">
 
    var flowId = '${RequestParameters.flowId}';
    var proId = '${RequestParameters.proId}';
    var configId = '${RequestParameters.configId}';
    $(function(){
        //添加管关联dsl
        $('#addLinkDsl').click(function(){
            var dslIds = '';
            $('input[name=dslId]').each(function(){
                var dslId = $(this).val();
                if(dslIds==''){
                    dslIds = dslIds + dslId;
                }else{
                    dslIds = dslIds +','+ dslId;
                }
            });
            window.top.openDialog("link","dsl列表",
                {},
                {"width":80,"height":65},
                [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],
                "${base}/business/pages/ciadd/configProDsl.html?proId="+proId+"&flowId="+flowId+"&dslIds="+dslIds+"&configId="+configId);
        })
    });
    
    function addLinkDsl(dslIds,verIds,delFlags){
        var param = {"flowId":flowId,"configId":configId,"dslIds":dslIds,"verIds":verIds,"delFlags":delFlags};
        $.post("${base}/business/pages/ciadd/addConfigLinkDsl.html",param,function(){
            document.location.reload();
        })
    }
    
    function delLinkDsl(linkId,flag){
        window.top.confirmInfo('提示', '确定要删除吗?', function(){
        var param = {"linkId":linkId,"flag":flag,"flowId":flowId};
        $.post("${base}/business/pages/ciadd/delConfigLinkDsl.html",param,function(){
            window.top.popupTips('删除成功', 2);
            document.location.reload();
        })
        });
    }
    
    function editVersion(linkId,dslId,flag,verId){
        window.top.openDialog("Ver","DSL版本",
                 {},
                 {"width":80,"height":80},
                 [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],
                 "${base}/business/pages/ciadd/configDslVersion.html?id="+dslId+"&flowId=${RequestParameters.flowId}&linkId="+linkId+"&flag="+flag+"&verId="+verId);
        
    }
    
    function editLinkDsl(linkId,verId,flag){
        var param = {"linkId":linkId,"verId":verId,"flag":flag,"flowId":flowId};
        $.post("${base}/business/pages/ciadd/updateConfigLinkDsl.html",param,function(){
            window.top.popupTips('修改成功', 2);
            document.location.reload();
        });
    }
</script>
</body>
</html>