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

代码生成器模板分组完成

上级 099d8d94
......@@ -10,6 +10,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Random;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -432,6 +433,26 @@ public class ToolUtil {
}
}
/**
* 随机不重复的6-8位
* @return
*/
public static int card() {
int[] array = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Random rand = new Random();
for (int i = 10; i > 1; i--) {
int index = rand.nextInt(i);
int tmp = array[index];
array[index] = array[i - 1];
array[i - 1] = tmp;
}
int result = 0;
for (int i = 0; i < 6; i++) {
result = result * 10 + array[i];
}
return result;
}
public static void main(String[] args) throws Exception {
String str = "123456";
for(int i = 0; i < 5; i++){
......
package com.skyeye.codemodel.dao;
import java.util.List;
import java.util.Map;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
public interface CodeModelGroupDao {
public List<Map<String, Object>> queryCodeModelGroupList(Map<String, Object> map, PageBounds pageBounds) throws Exception;
public Map<String, Object> queryCodeModelGroupMationByName(Map<String, Object> map) throws Exception;
public int insertCodeModelGroupMation(Map<String, Object> map) throws Exception;
public Map<String, Object> queryCodeModelNumById(Map<String, Object> map) throws Exception;
public int deleteCodeModelGroupById(Map<String, Object> map) throws Exception;
public Map<String, Object> queryCodeModelGroupMationToEditById(Map<String, Object> map) throws Exception;
public Map<String, Object> queryCodeModelGroupMationByIdAndName(Map<String, Object> map) throws Exception;
public int editCodeModelGroupMationById(Map<String, Object> map) throws Exception;
}
package com.skyeye.codemodel.service;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
public interface CodeModelGroupService {
public void queryCodeModelGroupList(InputObject inputObject, OutputObject outputObject) throws Exception;
public void insertCodeModelGroupMation(InputObject inputObject, OutputObject outputObject) throws Exception;
public void deleteCodeModelGroupById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void queryCodeModelGroupMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void editCodeModelGroupMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
}
package com.skyeye.codemodel.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.skyeye.codemodel.dao.CodeModelGroupDao;
import com.skyeye.codemodel.service.CodeModelGroupService;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.ToolUtil;
@Service
public class CodeModelGroupServiceImpl implements CodeModelGroupService{
@Autowired
private CodeModelGroupDao codeModelGroupDao;
/**
*
* @Title: queryCodeModelGroupList
* @Description: 获取模板分组列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void queryCodeModelGroupList(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
List<Map<String, Object>> beans = codeModelGroupDao.queryCodeModelGroupList(map,
new PageBounds(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())));
PageList<Map<String, Object>> beansPageList = (PageList<Map<String, Object>>)beans;
int total = beansPageList.getPaginator().getTotalCount();
outputObject.setBeans(beans);
outputObject.settotal(total);
}
/**
*
* @Title: insertCodeModelGroupMationMation
* @Description: 新增模板分组列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void insertCodeModelGroupMation(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = codeModelGroupDao.queryCodeModelGroupMationByName(map);
if(bean == null){
Map<String, Object> user = inputObject.getLogParams();
map.put("id", ToolUtil.getSurFaceId());
map.put("createId", user.get("id"));
map.put("createTime", ToolUtil.getTimeAndToString());
map.put("groupNum", ToolUtil.card());
codeModelGroupDao.insertCodeModelGroupMation(map);
}else{
outputObject.setreturnMessage("该模板分组已存在,请更换。");
}
}
/**
*
* @Title: deleteCodeModelGroupMationMationById
* @Description: 删除模板分组信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void deleteCodeModelGroupById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = codeModelGroupDao.queryCodeModelNumById(map);
if(bean == null){
codeModelGroupDao.deleteCodeModelGroupById(map);
}else{
if(Integer.parseInt(bean.get("modelNum").toString()) == 0){//该模板分组下没有模板
codeModelGroupDao.deleteCodeModelGroupById(map);
}else{
outputObject.setreturnMessage("该模板分组下存在模板,无法删除。");
}
}
}
/**
*
* @Title: queryCodeModelGroupMationMationToEditById
* @Description: 编辑模板分组信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void queryCodeModelGroupMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = codeModelGroupDao.queryCodeModelGroupMationToEditById(map);
outputObject.setBean(bean);
outputObject.settotal(1);
}
/**
*
* @Title: editCodeModelGroupMationMationById
* @Description: 编辑模板分组信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void editCodeModelGroupMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = codeModelGroupDao.queryCodeModelGroupMationByIdAndName(map);
if(bean == null){
codeModelGroupDao.editCodeModelGroupMationById(map);
}else{
outputObject.setreturnMessage("该模板分组已存在,请更换。");
}
}
}
package com.skyeye.codemodel.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.skyeye.codemodel.service.CodeModelGroupService;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
@Controller
public class CodeModelGroupController {
@Autowired
private CodeModelGroupService codeModelGroupService;
/**
*
* @Title: queryCodeModelGroupList
* @Description: 获取模板分组列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/CodeModelGroupController/queryCodeModelGroupList")
@ResponseBody
public void queryCodeModelGroupList(InputObject inputObject, OutputObject outputObject) throws Exception{
codeModelGroupService.queryCodeModelGroupList(inputObject, outputObject);
}
/**
*
* @Title: insertCodeModelGroupMation
* @Description: 新增模板分组列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/CodeModelGroupController/insertCodeModelGroupMation")
@ResponseBody
public void insertCodeModelGroupMation(InputObject inputObject, OutputObject outputObject) throws Exception{
codeModelGroupService.insertCodeModelGroupMation(inputObject, outputObject);
}
/**
*
* @Title: deleteCodeModelGroupById
* @Description: 删除模板分组信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/CodeModelGroupController/deleteCodeModelGroupById")
@ResponseBody
public void deleteCodeModelGroupById(InputObject inputObject, OutputObject outputObject) throws Exception{
codeModelGroupService.deleteCodeModelGroupById(inputObject, outputObject);
}
/**
*
* @Title: queryCodeModelGroupMationToEditById
* @Description: 编辑模板分组信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/CodeModelGroupController/queryCodeModelGroupMationToEditById")
@ResponseBody
public void queryCodeModelGroupMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception{
codeModelGroupService.queryCodeModelGroupMationToEditById(inputObject, outputObject);
}
/**
*
* @Title: editCodeModelGroupMationById
* @Description: 编辑模板分组信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/CodeModelGroupController/editCodeModelGroupMationById")
@ResponseBody
public void editCodeModelGroupMationById(InputObject inputObject, OutputObject outputObject) throws Exception{
codeModelGroupService.editCodeModelGroupMationById(inputObject, outputObject);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.skyeye.codemodel.dao.CodeModelGroupDao">
<select id="queryCodeModelGroupList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.group_name groupName,
a.group_num groupNum,
a.group_desc groupDesc,
CONVERT(a.create_time, char) createTime,
(SELECT COUNT(*) FROM code_model b WHERE b.group_id = a.id) modelNum
FROM
code_model_group a
WHERE 1 = 1
<if test="groupName != '' and groupName != null">
AND a.group_name LIKE '%${groupName}%'
</if>
<if test="groupNum != '' and groupNum != null">
AND a.group_num LIKE '%${groupNum}%'
</if>
ORDER BY a.create_time DESC
</select>
<select id="queryCodeModelGroupMationByName" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.group_name groupName
FROM
code_model_group a
WHERE a.group_name = #{groupName}
</select>
<insert id="insertCodeModelGroupMation" parameterType="java.util.Map">
INSERT into code_model_group
(id, group_name, group_num, group_desc, create_id, create_time)
VALUES
(#{id}, #{groupName}, #{groupNum}, #{groupDesc}, #{createId}, #{createTime})
</insert>
<select id="queryCodeModelNumById" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
COUNT(*) modelNum
FROM
code_model b
WHERE
b.group_id = #{id}
</select>
<delete id="deleteCodeModelGroupById" parameterType="java.util.Map">
DELETE
FROM
code_model_group
WHERE
id = #{id}
</delete>
<select id="queryCodeModelGroupMationToEditById" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.group_name groupName,
a.group_desc groupDesc
FROM
code_model_group a
WHERE a.id = #{id}
</select>
<select id="queryCodeModelGroupMationByIdAndName" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.group_name groupName
FROM
code_model_group a
WHERE a.id != #{id}
AND a.group_name = #{rmTypeName}
</select>
<update id="editCodeModelGroupMationById" parameterType="java.util.Map">
UPDATE code_model_group
<set>
<if test="groupName != '' and groupName != null">
group_name = #{groupName},
</if>
<if test="groupDesc != '' and groupDesc != null">
group_desc = #{groupDesc},
</if>
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
......@@ -281,4 +281,28 @@
<!-- 小程序系列结束 -->
<!-- 代码生成器系列开始 -->
<url id="codemodel001" path="/post/CodeModelGroupController/queryCodeModelGroupList" val="获取模板分组列表" allUse="1">
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
<property id="groupName" name="groupName" ref="" var="分组名称"/>
<property id="groupNum" name="groupNum" ref="" var="分组编号"/>
</url>
<url id="codemodel002" path="/post/CodeModelGroupController/insertCodeModelGroupMation" val="新增模板分组列表" allUse="1">
<property id="groupDesc" name="groupDesc" ref="required" var="分组简介"/>
<property id="groupName" name="groupName" ref="required" var="分组名称"/>
</url>
<url id="codemodel003" path="/post/CodeModelGroupController/deleteCodeModelGroupById" val="删除模板分组信息" allUse="1">
<property id="rowId" name="id" ref="required" var="分组id"/>
</url>
<url id="codemodel004" path="/post/CodeModelGroupController/queryCodeModelGroupMationToEditById" val="编辑模板分组信息时进行回显" allUse="1">
<property id="rowId" name="id" ref="required" var="分组id"/>
</url>
<url id="codemodel005" path="/post/CodeModelGroupController/editCodeModelGroupMationById" val="编辑模板分组信息" allUse="1">
<property id="groupDesc" name="groupDesc" ref="required" var="分组简介"/>
<property id="groupName" name="groupName" ref="required" var="分组名称"/>
<property id="rowId" name="id" ref="required" var="分组id"/>
</url>
<!-- 代码生成器系列结束 -->
</controller>
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['table', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form', 'layedit'], function (form) {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
var $ = layui.$,
form = layui.form,
layedit = layui.layedit;;
var layContent = layedit.build('groupDesc', {
tool: [
'strong' //加粗
,'italic' //斜体
,'underline' //下划线
,'del' //删除线
,'|' //分割线
,'left' //左对齐
,'center' //居中对齐
,'right' //右对齐
,'link' //超链接
,'unlink' //清除链接
,'face' //表情
]
});
form.render();
form.on('submit(formAddBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
groupName: $("#groupName").val(),
groupDesc: encodeURI(layedit.getContent(layContent)),
};
AjaxPostUtil.request({url:reqBasePath + "codemodel002", params:params, type:'json', callback:function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
}else{
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
}
return false;
});
//取消
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['table', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form', 'layedit'], function (form) {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
var $ = layui.$,
form = layui.form;
layedit = layui.layedit;;
showGrid({
id: "showForm",
url: reqBasePath + "codemodel004",
params: {rowId: parent.rowId},
pagination: false,
template: getFileContent('tpl/codemodelgroup/codemodelgroupeditTemplate.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
var layContent = layedit.build('groupDesc', {
tool: [
'strong' //加粗
,'italic' //斜体
,'underline' //下划线
,'del' //删除线
,'|' //分割线
,'left' //左对齐
,'center' //居中对齐
,'right' //右对齐
,'link' //超链接
,'unlink' //清除链接
,'face' //表情
]
});
form.render();
form.on('submit(formEditBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
groupName: $("#groupName").val(),
groupDesc: encodeURI(layedit.getContent(layContent)),
rowId: parent.rowId
};
AjaxPostUtil.request({url:reqBasePath + "codemodel005", params:params, type:'json', callback:function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
}else{
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
}
return false;
});
}
});
//取消
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
});
});
\ No newline at end of file
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;
//表格渲染
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'codemodel001',
where:{groupName:$("#groupName").val(), groupNum:$("#groupNum").val()},
even:true, //隔行变色
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
cols: [[
{ title: '序号', type: 'numbers'},
{ field: 'groupNum', title: '分组编号', width: 120 },
{ field: 'groupName', title: '分组名称', width: 120 },
{ field: 'groupDesc', title: '分组简介', width: 120 },
{ field: 'modelNum', title: '模板数量', width: 120 },
{ field: 'createTime', title: '创建时间', width: 180 },
{ title: '操作', fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'}
]]
});
table.on('tool(messageTable)', function (obj) { //注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var data = obj.data; //获得当前行数据
var layEvent = obj.event; //获得 lay-event 对应的值
if (layEvent === 'del') { //删除
del(data, obj);
}else if (layEvent === 'edit') { //编辑
edit(data);
}
});
//搜索表单
form.render();
form.on('submit(formSearch)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
//删除
function del(data, obj){
var msg = obj ? '确认删除分组【' + obj.data.groupName + '】吗?' : '确认删除选中数据吗?';
layer.confirm(msg, { icon: 3, title: '删除分组' }, function (index) {
layer.close(index);
//向服务端发送删除指令
AjaxPostUtil.request({url:reqBasePath + "codemodel003", params:{rowId: data.id}, type:'json', callback:function(json){
if(json.returnCode == 0){
top.winui.window.msg("删除成功", {icon: 1,time: 2000});
loadTable();
}else{
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
});
}
//编辑
function edit(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/codemodelgroup/codemodelgroupedit.html",
title: "编辑模块组",
pageId: "codemodelgroupedit",
callBack: function(refreshCode){
if (refreshCode == '0') {
top.winui.window.msg("操作成功", {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
top.winui.window.msg("操作失败", {icon: 2,time: 2000});
}
}});
}
//刷新数据
$("body").on("click", "#reloadTable", function(){
loadTable();
});
//新增
$("body").on("click", "#addBean", function(){
_openNewWindows({
url: "../../tpl/codemodelgroup/codemodelgroupadd.html",
title: "新增模块组",
pageId: "codemodelgroupadd",
callBack: function(refreshCode){
if (refreshCode == '0') {
top.winui.window.msg("操作成功", {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
top.winui.window.msg("操作失败", {icon: 2,time: 2000});
}
}});
});
function loadTable(){
table.reload("messageTable", {where:{groupName:$("#groupName").val(), groupNum:$("#groupNum").val()}});
}
exports('codemodelgrouplist', {});
});
......@@ -20,3 +20,4 @@ allMenuToTree(); 使用递归方法建树
findChildren(); 递归查找子节点
getIPPropertiesPath(); 获取ip.properties路径
deleteFile(); 删除单个文件
card(); 随机不重复的6-8位
<!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" />
<link href="../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css" rel="stylesheet" />
</head>
<body>
<div style="width:600px;margin:0 auto;padding-top:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item">
<label class="layui-form-label">分组名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="groupName" name="groupName" win-verify="required" placeholder="请输入模块分组名" class="layui-input" maxlength="20"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">分组描述<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="groupDesc" name="groupDesc" style="display: none;"></textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="winui-btn" id="cancle">取消</button>
<button class="winui-btn" lay-submit lay-filter="formAddBean">保存</button>
</div>
</div>
</form>
</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('codemodelgroupadd');
</script>
</body>
</html>
\ No newline at end of file
<!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" />
<link href="../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css" rel="stylesheet" />
</head>
<body>
<div style="width:600px;margin:0 auto;padding-top:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
</form>
</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('codemodelgroupedit');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item">
<label class="layui-form-label">分组名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="groupName" name="groupName" win-verify="required" placeholder="请输入模块分组名" class="layui-input" maxlength="20" value="{{groupName}}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">分组描述<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="groupDesc" name="groupDesc" style="display: none;">{{groupDesc}}</textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="winui-btn" id="cancle">取消</button>
<button class="winui-btn" lay-submit lay-filter="formEditBean">保存</button>
</div>
</div>
{{/bean}}
\ No newline at end of file
<!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 class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i>刷新数据</button>
<button id="addBean" class="winui-toolbtn"><i class="fa fa-plus" aria-hidden="true"></i>新增分组</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
<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>
{{# } }}
</script>
</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('codemodelgrouplist');
</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.
先完成此消息的编辑!
想要评论请 注册