<!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("model 名称 :"+data.name);
|
$("#model_version").html("model 版本 :"+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 >
|
<div id="model_name" style=" margin-left:10px; margin-top:10px;font-size:20px; color:green; 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" style="position: absolute;top:100px">
|
<img id="mode_img" style="position: absolute;top:130px; ">
|
|
</div>
|
</div>
|
|
</body>
|
</html>
|