|
@@ -114,12 +114,14 @@
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-col-md12">
|
|
|
|
+ <div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<div class="layui-card-body">
|
|
- <fieldset class="layui-elem-field layui-field-title">
|
|
|
|
- </fieldset>
|
|
|
|
<div class="" style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
|
|
<div class="" style="margin-left: 10px;margin-right: 10px;margin-top: 10px;">
|
|
<div class="layui-btn-group">
|
|
<div class="layui-btn-group">
|
|
- <button type="button" class="layui-btn layui-btn-normal btn-update">新建工程</button>
|
|
|
|
|
|
+ <button type="button" class="layui-btn layui-btn-normal btn-update" onclick="addProject()">新建工程</button>
|
|
<!--<button type="button" class="layui-btn ">编辑</button>-->
|
|
<!--<button type="button" class="layui-btn ">编辑</button>-->
|
|
<button type="button" class="layui-btn layui-btn-normal btn-update" onclick="refresh()">刷新</button>
|
|
<button type="button" class="layui-btn layui-btn-normal btn-update" onclick="refresh()">刷新</button>
|
|
</div>
|
|
</div>
|
|
@@ -314,6 +316,26 @@
|
|
function refresh(){
|
|
function refresh(){
|
|
window.location.reload();
|
|
window.location.reload();
|
|
}
|
|
}
|
|
|
|
+ function addProject(){
|
|
|
|
+ layer.prompt({title: '请输入工程名称', formType: 3}, function(text, index){
|
|
|
|
+ layer.close(index);
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "post",
|
|
|
|
+ url: "#",
|
|
|
|
+ data:{name:text},
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function(data){
|
|
|
|
+ if(data.result!=null){
|
|
|
|
+ layer.msg(data.result, {icon: 1});
|
|
|
|
+ window.location.reload();
|
|
|
|
+ }else{
|
|
|
|
+ layer.msg('添加失败', {icon: 1});
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|