IT-KIMI_SHI\SINOIT.KIMI
2018-06-01 64c40fb427bff513f575f11e4c1e7bd9a1bfe3e3
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
109
110
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>流程列表</title>
        <link href="../../../css/common.css" rel="stylesheet" type="text/css">
        <link href="../../../css/control.css" rel="stylesheet" type="text/css"/>
        
        <script src="../../../js/jquery-1.7.2.min.js"></script>
        <script src="../../../js/foundation-2.0.js"></script>
        <script src="../../../js/control.js"></script>    
        
    
        <script type="text/javascript">
        var selectedId ;
        
        function editModel(){
            if(selectedId){
                location.href = "../../designer/modeler.html?modelId="+selectedId ;   
                //location.href = "../../designer/modeler.html?modelId="+selectedId ;
            }
            else{
                alert("请选择要编辑model");
            }
            
        }
        
        function createmodel(data){
            if(data){
            
                Server.postData("root/process/repository/createModel",data,function(callback){
                if(callback.success){
                    location.href ="../../designer/modeler.html?modelId="+callback.string ;
                }
            });
            }
        }
        
        function createModel(){
            Win.popup({url: '../../process/page/process/createModel.html', callback: createmodel});
        }
        
        function deleteModel(){
            if(selectedId){
                Server.call("root/process/repository/deleteModel","modelId="+selectedId,function(callback){
                    if(callback.success){
                        location.reload();
                        alert(callback.string);
                    }
                });
            }
            else{
                alert("请选择要删除model");
            }
        }
 
        $(document).ready(function() {
            Server.call("root/data/getmodelname/getDataSet",null,function(callback){
                if(callback.success){
                    list.loadData(callback.entityset);
                }
            });
            
            list = new DataList({
                    element: "list",
                    evenActive: false,
                    items: [
                        {text: "编码", field: "id", width: "18%", align: "center"},
                        {text: "model名称", field: "name", width: "70%", align: "center"},
                        {text: "版本", field: "version", width: "0%", align: "center"},
                        {text: "更新时间", field: "updatetime", width: "0%", align: "center"}
                    ],
                    onRowSelected: function(data) {
                        selectedId = data.id;
                        $("#mode_img").attr('src',"../../../model/"+selectedId+".png"); 
                        $("#model_name").html(data.name);
                        $("#model_version").html(data.version);
                        $("#model_updatetime").html(data.updatetime);
                    }
                });
        
        });
        </script>        
    </head>
  
<body>
    <div id="list" style="position: absolute; left: 0px; top: 0px; width: 25%; bottom: 0px; border: 1px solid blue"></div>
    <div style="position: absolute; left: 25%; right: 0px; top: 0px; bottom: 0px;">
        <div style="position: absolute; top: 0px; left: 0px; height: 60px; right: 0px; border: 1px solid blue">
            <div style="height: 30px; line-height: 30px; margin-top: 15px; margin-right: 50px;" align="right">
                <div class="btn btn-green" onclick="editModel();">编辑</div>
                <div class="btn btn-green" onclick="createModel();">新建</div>
                <div class="btn btn-green" onclick="deleteModel();">删除</div>
            </div>    
        </div>
        <div id="diagram" style="position: absolute; left: 0px; top: 60px; right: 0px; bottom: 0px; border: 1px solid blue">
            <div style="margin-bottom : 80px;vertical-align:middle;">
                <div id="model_name" style=" margin-left:10px; margin-top:10px;font-size:15px; height:60px; line-height:60px; padding-left:65px; background:url(../../../image/process/process_set.png) no-repeat left center "></div>
                
                <div id="model_version"></div>
                <div id="model_updatetime"></div>
            </div>    
            <hr color="blue" size="1">
            <img id="mode_img"  style="position: absolute;top:130px; ">        
        
        </div>
    </div>
    
</body>
</html>