提交 b4abf8eb 编写于 作者: doc_wei's avatar doc_wei

使用模板

上级 6d0ba7d2
......@@ -41,6 +41,8 @@ layui.config({
edit(data);
}else if (layEvent === 'modelConcle') { //模板管理
modelConcle(data);
}else if (layEvent === 'useModelGroup') { //使用模板
useModelGroup(data);
}
});
......@@ -99,6 +101,17 @@ layui.config({
});
}
//使用模板
function useModelGroup(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/codemodel/usemodelgroup.html",
title: "代码生成",
maxmin: true,
pageId: "usemodelgroup",
});
}
//刷新数据
$("body").on("click", "#reloadTable", function(){
loadTable();
......
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
exports('usemodelgroup', {});
});
......@@ -43,6 +43,8 @@
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
{{# if(d.modelNum == 0){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
{{# } else{ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="useModelGroup">代码生成</a>
{{# } }}
<a class="layui-btn layui-btn-xs" lay-event="modelConcle">模板管理</a>
</script>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="width:700px;margin:0 auto;padding-top:20px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">分组编号</label>
<div class="layui-input-inline">
<input type="text" id="groupNum" name="groupNum" placeholder="请输入分组编号" class="layui-input" />
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">分组名称</label>
<div class="layui-input-inline">
<input type="text" id="groupName" name="groupName" placeholder="请输入分组名称" class="layui-input" />
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block" style="margin:0;">
<button class="layui-btn" lay-submit lay-filter="formSearch">搜索</button>
</div>
</div>
</form>
</div>
<div style="margin:auto 10px;">
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/codemodelgroup/'}).use('usemodelgroup');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册