Merge pull request !50 from Arno/dyc
This commit is contained in:
Arno 2019-03-20 16:27:53 +08:00
commit 02a75d2c00

View File

@ -9,6 +9,18 @@
padding: 20px;
}
.div-project {
width: 100%;
display: none;
}
.layui-inline {
width: 45%;
}
.text {
text-align: left;
}
</style>
</head>
@ -40,8 +52,8 @@
<td>$!item.delTime</td>
<td>$!item.delUser</td>
<td>
<button name="delete" data-name="$item.filename" data-id="$id"
class="layui-btn layui-btn-sm">详情
<button name="delete" onclick="projectDetail(this)" data-name="$item.filename"
index="$!velocityCount" data-id="$id" class="layui-btn layui-btn-sm">详情
</button>
</td>
</tr>
@ -56,5 +68,108 @@
#else
<h1>你没有权限</h1>
#end
<div class="layui-container div-project" id="div-project">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">项目名名称:</label>
<label class="layui-form-label text" id="name"></label>
</div>
<div class="layui-inline">
<label class="layui-form-label">分组名称:</label>
<label class="layui-form-label text" id="group"></label>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">项目ID:</label>
<label class="layui-form-label text" id="id"></label>
</div>
<div class="layui-inline">
<label class="layui-form-label">MainClass:</label>
<label class="layui-form-label text" id="mainClass"></label>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">项目Lib:</label>
<label class="layui-form-label text" id="lib"></label>
</div>
<div class="layui-inline">
<label class="layui-form-label">日志路径:</label>
<label class="layui-form-label text" id="path"></label>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">Jvm参数:</label>
<label class="layui-form-label text" id="jvm"></label>
</div>
<div class="layui-inline">
<label class="layui-form-label">args:</label>
<label class="layui-form-label text" id="args"></label>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">WebHooks:</label>
<label class="layui-form-label text" id="webHooks"></label>
</div>
<div class="layui-inline">
<label class="layui-form-label">Build标识:</label>
<label class="layui-form-label text" id="build"></label>
</div>
</div>
## <div class="layui-form-item" style="padding-left: 20%">
## <button class="layui-btn layui-btn-normal" lay-submit lay-filter="submitProject" id="project_submit">提交
## </button>
## #if($item)
## <a class="layui-btn layui-btn-warm" data-id="$item.id" id="delete_project">删除</a>
## ## <a class="layui-btn layui-btn-primary" type="all" data-id="$item.id" id="delete_project_all">彻底删除</a>
## #end
## </div>
</div>
</body>
<script type="text/javascript">
function projectDetail(dom) {
var index = dom.getAttribute("index");
var data = JSON.stringify($!array);
var projects = JSON.parse(data);
if (index) {
var project = projects[index - 1];
attrProject(project);
layer.open({
type: 1,
title: '查看项目',
content: $('#div-project'),
area: ['60%', '70%'],
})
}
}
function attrProject(data) {
if (!data) {
return;
}
var projectInfoModel = data.projectInfoModel;
$("#name").html(projectInfoModel.name);
$("#group").html(projectInfoModel.group);
$("#id").html(projectInfoModel.id);
$("#mainClass").html(projectInfoModel.mainClass);
$("#path").html(projectInfoModel.log);
$("#lib").html(projectInfoModel.lib);
$("#jvm").html(projectInfoModel.jvm);
$("#args").html(projectInfoModel.args);
$("#webHooks").html(projectInfoModel.token);
$("#build").html(projectInfoModel.buildTag);
}
function loadSuccess() {
}
</script>
</html>