cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>DSL配置管理</title>
[#include "/business/pages/include/static.html" /]
</head>
 
<body>
<div class="facieditlistright">
      <div class="fs_navtitle facieditlistright_navtitle" id="fsNavtitle">
        <h2>DSL列表</h2>
        <div class="fsnt_btn">
            <a class="operating_conmon"  href="javascript:addCate();">
                <span class="facilistright_forticon">增加</span>
            </a>
        </div>
      </div>
                <div id="mainData"></div>
                <div class="paging clearfix" id="pagination"></div>
</div>
<script type="text/javascript">
var pId = '${pId}';
function query(){
    var params = {"pId":pId};
    pagination("${base}/business/pages/dslcate/dslCateData.html","${base}/business/pages/dslcate/dslCateCount.html","mainData","pagination",{psize:10},params);
}
 
$(function() {
    
    query(pId);
})
 
 
function addCate(){
        var url = "${base}/business/pages/dslcate/dslcateAdd.html?pId="+pId;
        window.top.openDialog("0","新增DSL分类",
                         {},
                         {"width":60,"height":60},
                         [{btnId:"btnSure", btnName:"提交", btnStyle:"bluebtn"}],
                         url);  
}
 
 
function updateCate(id) {
    var url = "${base}/business/pages/dslcate/dslcateAdd.html?id="+id;
        window.top.openDialog("0","修改DSL分类",
                         {},
                         {"width":60,"height":60},
                         [{btnId:"btnSure", btnName:"提交", btnStyle:"bluebtn"}],
                         url);  
}
 
 
function delCate(id,index){
            
             var tip = "";
            var url = "";
            if(index == 1 ){
              tip = '确定要启用该数据吗?';
              url = "${base}/business/pages/dslcate/open.html";
            }else{
              tip = '确定要禁用该数据吗?';
              url = "${base}/business/pages/dslcate/delCategory.html";
            }
            
            window.top.confirmInfo('提示', tip, function(){
                $.post(url,{"id":id},function(data){
                      if(data.result == "1"){
                          window.top.popupTips("操作成功");
                          query(pId);
                          window.top.queryTree(data.firstCate,data.secondCate);
                      } else {
                        window.top.popupTips(data.result);                  
                      }
                },"json");
            });
     }
     
     function preview(id) {
        var url = "${base}/business/pages/dslcate/dslview.html?id="+id;
        window.top.openDialog("0","表单预览",
                         {},
                         {"width":70,"height":70},
                         [],
                         url);  
}
     
</script>
 
</body>
</html>