diff --git a/skyeye-dao/src/main/java/com/skyeye/smprogram/dao/RmGroupDao.java b/skyeye-dao/src/main/java/com/skyeye/smprogram/dao/RmGroupDao.java new file mode 100644 index 0000000000000000000000000000000000000000..d673e1a647e71d59429cc617953b5576b62411a5 --- /dev/null +++ b/skyeye-dao/src/main/java/com/skyeye/smprogram/dao/RmGroupDao.java @@ -0,0 +1,34 @@ +package com.skyeye.smprogram.dao; + +import java.util.List; +import java.util.Map; + +import com.github.miemiedev.mybatis.paginator.domain.PageBounds; + +public interface RmGroupDao { + + public List> queryRmGroupList(Map map, PageBounds pageBounds) throws Exception; + + public Map queryRmGroupByName(Map map) throws Exception; + + public Map queryRmGroupISTop(Map map) throws Exception; + + public int insertRmGroupMation(Map map) throws Exception; + + public Map queryRmGroupMemberNumById(Map map) throws Exception; + + public int deleteRmGroupById(Map map) throws Exception; + + public Map queryRmGroupMationToEditById(Map map) throws Exception; + + public Map queryRmGroupMationByIdAndName(Map map) throws Exception; + + public int editRmGroupMationById(Map map) throws Exception; + + public Map queryRmGroupISTopByThisId(Map map) throws Exception; + + public int editRmGroupSortTopById(Map topBean) throws Exception; + + public Map queryRmGroupISLowerByThisId(Map map) throws Exception; + +} diff --git a/skyeye-service/src/main/java/com/skyeye/smprogram/service/RmGroupService.java b/skyeye-service/src/main/java/com/skyeye/smprogram/service/RmGroupService.java new file mode 100644 index 0000000000000000000000000000000000000000..fc8ee2f392219815a38a282c70141d875560d80c --- /dev/null +++ b/skyeye-service/src/main/java/com/skyeye/smprogram/service/RmGroupService.java @@ -0,0 +1,22 @@ +package com.skyeye.smprogram.service; + +import com.skyeye.common.object.InputObject; +import com.skyeye.common.object.OutputObject; + +public interface RmGroupService { + + public void queryRmGroupList(InputObject inputObject, OutputObject outputObject) throws Exception; + + public void insertRmGroupMation(InputObject inputObject, OutputObject outputObject) throws Exception; + + public void deleteRmGroupById(InputObject inputObject, OutputObject outputObject) throws Exception; + + public void queryRmGroupMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception; + + public void editRmGroupMationById(InputObject inputObject, OutputObject outputObject) throws Exception; + + public void editRmGroupSortTopById(InputObject inputObject, OutputObject outputObject) throws Exception; + + public void editRmGroupSortLowerById(InputObject inputObject, OutputObject outputObject) throws Exception; + +} diff --git a/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmGroupServiceImpl.java b/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmGroupServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..bd079330f716511277a41abb2d34500688c3a19c --- /dev/null +++ b/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmGroupServiceImpl.java @@ -0,0 +1,187 @@ +package com.skyeye.smprogram.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.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.common.util.ToolUtil; +import com.skyeye.smprogram.dao.RmGroupDao; +import com.skyeye.smprogram.service.RmGroupService; + +@Service +public class RmGroupServiceImpl implements RmGroupService{ + + @Autowired + private RmGroupDao rmGroupDao; + + /** + * + * @Title: queryRmGroupList + * @Description: 获取小程序分组列表 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void queryRmGroupList(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + List> beans = rmGroupDao.queryRmGroupList(map, + new PageBounds(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()))); + PageList> beansPageList = (PageList>)beans; + int total = beansPageList.getPaginator().getTotalCount(); + outputObject.setBeans(beans); + outputObject.settotal(total); + } + + /** + * + * @Title: insertRmGroupMation + * @Description: 添加小程序分组 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void insertRmGroupMation(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + Map bean = rmGroupDao.queryRmGroupByName(map); + if(bean == null){ + Map user = inputObject.getLogParams(); + map.put("id", ToolUtil.getSurFaceId()); + map.put("createId", user.get("id")); + map.put("createTime", ToolUtil.getTimeAndToString()); + Map item = rmGroupDao.queryRmGroupISTop(map);//获取最靠前的小程序分类 + if(item == null){ + map.put("sort", 1); + }else{ + map.put("sort", Integer.parseInt(item.get("sort").toString()) + 1); + } + rmGroupDao.insertRmGroupMation(map); + }else{ + outputObject.setreturnMessage("该分组名称已存在,请更换。"); + } + } + + /** + * + * @Title: deleteRmGroupById + * @Description: 删除小程序分组信息 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void deleteRmGroupById(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + Map bean = rmGroupDao.queryRmGroupMemberNumById(map); + if(bean == null){ + rmGroupDao.deleteRmGroupById(map); + }else{ + if(Integer.parseInt(bean.get("groupMemberNum").toString()) == 0){//该小程序分组下没有组件 + rmGroupDao.deleteRmGroupById(map); + }else{ + outputObject.setreturnMessage("该分组下存在小程序组件,无法删除。"); + } + } + } + + /** + * + * @Title: queryRmGroupMationToEditById + * @Description: 编辑小程序分组信息时进行回显 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void queryRmGroupMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + Map bean = rmGroupDao.queryRmGroupMationToEditById(map); + outputObject.setBean(bean); + outputObject.settotal(1); + } + + /** + * + * @Title: editRmGroupMationById + * @Description: 编辑小程序分组信息 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void editRmGroupMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + Map bean = rmGroupDao.queryRmGroupMationByIdAndName(map); + if(bean == null){ + rmGroupDao.editRmGroupMationById(map); + }else{ + outputObject.setreturnMessage("该分组名称已存在,请更换。"); + } + } + + /** + * + * @Title: editRmGroupSortTopById + * @Description: 小程序分组展示顺序上移 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void editRmGroupSortTopById(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + Map topBean = rmGroupDao.queryRmGroupISTopByThisId(map);//根据排序获取这条数据的上一条数据 + if(topBean == null){ + outputObject.setreturnMessage("已经是最靠前分组,无法移动。"); + }else{ + map.put("sort", topBean.get("sort")); + topBean.put("sort", topBean.get("thisSort")); + rmGroupDao.editRmGroupSortTopById(map); + rmGroupDao.editRmGroupSortTopById(topBean); + } + } + + /** + * + * @Title: editRmGroupSortLowerById + * @Description: 小程序分组展示顺序下移 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @Override + public void editRmGroupSortLowerById(InputObject inputObject, OutputObject outputObject) throws Exception { + Map map = inputObject.getParams(); + Map topBean = rmGroupDao.queryRmGroupISLowerByThisId(map);//根据排序获取这条数据的下一条数据 + if(topBean == null){ + outputObject.setreturnMessage("已经是最靠后分组,无法移动。"); + }else{ + map.put("sort", topBean.get("sort")); + topBean.put("sort", topBean.get("thisSort")); + rmGroupDao.editRmGroupSortTopById(map); + rmGroupDao.editRmGroupSortTopById(topBean); + } + } + + + +} diff --git a/skyeye-web/src/main/java/com/skyeye/smprogram/controller/RmGroupController.java b/skyeye-web/src/main/java/com/skyeye/smprogram/controller/RmGroupController.java new file mode 100644 index 0000000000000000000000000000000000000000..4fecbb3fd8cd275e365743dc6ca09af23e77b80b --- /dev/null +++ b/skyeye-web/src/main/java/com/skyeye/smprogram/controller/RmGroupController.java @@ -0,0 +1,130 @@ +package com.skyeye.smprogram.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.common.object.InputObject; +import com.skyeye.common.object.OutputObject; +import com.skyeye.smprogram.service.RmGroupService; + +@Controller +public class RmGroupController { + + @Autowired + private RmGroupService rmGroupService; + + /** + * + * @Title: queryRmGroupList + * @Description: 获取小程序分组列表 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/queryRmGroupList") + @ResponseBody + public void queryRmGroupList(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.queryRmGroupList(inputObject, outputObject); + } + + /** + * + * @Title: insertRmGroupMation + * @Description: 添加小程序分组 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/insertRmGroupMation") + @ResponseBody + public void insertRmGroupMation(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.insertRmGroupMation(inputObject, outputObject); + } + + /** + * + * @Title: deleteRmGroupById + * @Description: 删除小程序分组信息 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/deleteRmGroupById") + @ResponseBody + public void deleteRmGroupById(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.deleteRmGroupById(inputObject, outputObject); + } + + /** + * + * @Title: queryRmGroupMationToEditById + * @Description: 编辑小程序分组信息时进行回显 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/queryRmGroupMationToEditById") + @ResponseBody + public void queryRmGroupMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.queryRmGroupMationToEditById(inputObject, outputObject); + } + + /** + * + * @Title: editRmGroupMationById + * @Description: 编辑小程序分组信息 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/editRmGroupMationById") + @ResponseBody + public void editRmGroupMationById(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.editRmGroupMationById(inputObject, outputObject); + } + + /** + * + * @Title: editRmGroupSortTopById + * @Description: 小程序分组展示顺序上移 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/editRmGroupSortTopById") + @ResponseBody + public void editRmGroupSortTopById(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.editRmGroupSortTopById(inputObject, outputObject); + } + + /** + * + * @Title: editRmGroupSortLowerById + * @Description: 小程序分组展示顺序下移 + * @param @param inputObject + * @param @param outputObject + * @param @throws Exception 参数 + * @return void 返回类型 + * @throws + */ + @RequestMapping("/post/RmGroupController/editRmGroupSortLowerById") + @ResponseBody + public void editRmGroupSortLowerById(InputObject inputObject, OutputObject outputObject) throws Exception{ + rmGroupService.editRmGroupSortLowerById(inputObject, outputObject); + } + +} diff --git a/skyeye-web/src/main/resources/dbmapper/RmGroupMapper.xml b/skyeye-web/src/main/resources/dbmapper/RmGroupMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..66465ea328db850ba9d49cd55ae2e43c2dd294c7 --- /dev/null +++ b/skyeye-web/src/main/resources/dbmapper/RmGroupMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + INSERT into rm_group + (id, name, create_id, create_time, sort, icon, rm_type_id) + VALUES + (#{id}, #{rmGroupName}, #{createId}, #{createTime}, #{sort}, #{icon}, #{rmTypeId}) + + + + + + DELETE + FROM + rm_group + WHERE + id = #{id} + + + + + + + + UPDATE rm_group + + + name = #{rmGroupName}, + + + icon = #{icon}, + + + rm_type_id = #{rmTypeId}, + + + WHERE id = #{id} + + + + + + UPDATE rm_group + + + sort = #{sort}, + + + WHERE id = #{id} + + + + + \ No newline at end of file diff --git a/skyeye-web/src/main/resources/mapping/reqmapping.xml b/skyeye-web/src/main/resources/mapping/reqmapping.xml index 97f98ead91b50543d7a8d0aa03dbadecadd27f59..922cd3394d193977dc57526a61c9ed92b91aa87f 100644 --- a/skyeye-web/src/main/resources/mapping/reqmapping.xml +++ b/skyeye-web/src/main/resources/mapping/reqmapping.xml @@ -178,6 +178,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skyeye-web/src/main/webapp/js/rmgroup/rmgroupadd.js b/skyeye-web/src/main/webapp/js/rmgroup/rmgroupadd.js new file mode 100644 index 0000000000000000000000000000000000000000..9553818ead4ed6f4834065271fdd260002295b55 --- /dev/null +++ b/skyeye-web/src/main/webapp/js/rmgroup/rmgroupadd.js @@ -0,0 +1,76 @@ + +var childIcon = "";//分组ICON + +layui.config({ + base: basePath, + version: skyeyeVersion +}).define(['table', 'jquery', 'winui'], function (exports) { + winui.renderColor(); + layui.use(['form'], function (form) { + var index = parent.layer.getFrameIndex(window.name); //获取窗口索引 + var $ = layui.$, + form = layui.form; + + showGrid({ + id: "rmTypeId", + url: reqBasePath + "common001", + params: {}, + pagination: false, + template: getFileContent('tpl/template/select-option.tpl'), + ajaxSendLoadBefore: function(hdb){ + }, + ajaxSendAfter:function(json){ + //搜索表单 + form.render(); + form.on('select(selectParent)', function(data){ + + }); + form.render(); + + form.on('submit(formAddBean)', function (data) { + //表单验证 + if (winui.verifyForm(data.elem)) { + var params = { + rmTypeId: $("#rmTypeId").val(), + rmGroupName: $("#rmGroupName").val(), + icon: $("#rmGroupIcon").val(), + }; + + AjaxPostUtil.request({url:reqBasePath + "rmxcx009", 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("focus", "#rmGroupIcon", function(e){ + _openNewWindows({ + url: "../../tpl/sysevemenu/icon.html", + title: "选择ICON图标", + pageId: "icon", + area: ['640px', '360px'], + callBack: function(refreshCode){ + if (refreshCode == '0') { + $("#rmGroupIcon").val(childIcon); + } else if (refreshCode == '-9999') { + top.winui.window.msg("操作失败", {icon: 2,time: 2000}); + } + }}); + }); + + //取消 + $("body").on("click", "#cancle", function(){ + parent.layer.close(index); + }); + + }); + +}); \ No newline at end of file diff --git a/skyeye-web/src/main/webapp/js/rmgroup/rmgroupedit.js b/skyeye-web/src/main/webapp/js/rmgroup/rmgroupedit.js new file mode 100644 index 0000000000000000000000000000000000000000..71d5862d2c9c8e2fb3d2c3cb54e6cfcfa3159562 --- /dev/null +++ b/skyeye-web/src/main/webapp/js/rmgroup/rmgroupedit.js @@ -0,0 +1,93 @@ + +var childIcon = "";//分组ICON + +layui.config({ + base: basePath, + version: skyeyeVersion +}).define(['table', 'jquery', 'winui'], function (exports) { + winui.renderColor(); + layui.use(['form'], function (form) { + var index = parent.layer.getFrameIndex(window.name); //获取窗口索引 + var $ = layui.$, + form = layui.form; + + showGrid({ + id: "showForm", + url: reqBasePath + "rmxcx011", + params: {rowId: parent.rowId}, + pagination: false, + template: getFileContent('tpl/rmgroup/rmgroupeditTemplate.tpl'), + ajaxSendLoadBefore: function(hdb){ + }, + ajaxSendAfter:function(json){ + + showGrid({ + id: "rmTypeId", + url: reqBasePath + "common001", + params: {}, + pagination: false, + template: getFileContent('tpl/template/select-option.tpl'), + ajaxSendLoadBefore: function(hdb){ + }, + ajaxSendAfter:function(json1){ + + $("#rmTypeId").val(json.bean.rmTypeId); + + //搜索表单 + form.render(); + + form.on('select(selectParent)', function(data){ + + }); + + form.on('submit(formEditBean)', function (data) { + //表单验证 + if (winui.verifyForm(data.elem)) { + var params = { + rmTypeId: $("#rmTypeId").val(), + rmGroupName: $("#rmGroupName").val(), + icon: $("#rmGroupIcon").val(), + rowId: parent.rowId + }; + + AjaxPostUtil.request({url:reqBasePath + "rmxcx012", 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("focus", "#rmGroupIcon", function(e){ + _openNewWindows({ + url: "../../tpl/sysevemenu/icon.html", + title: "选择ICON图标", + pageId: "icon", + area: ['640px', '360px'], + callBack: function(refreshCode){ + if (refreshCode == '0') { + $("#rmGroupIcon").val(childIcon); + } else if (refreshCode == '-9999') { + top.winui.window.msg("操作失败", {icon: 2,time: 2000}); + } + }}); + }); + + //取消 + $("body").on("click", "#cancle", function(){ + parent.layer.close(index); + }); + + }); + +}); \ No newline at end of file diff --git a/skyeye-web/src/main/webapp/js/rmgroup/rmgrouplist.js b/skyeye-web/src/main/webapp/js/rmgroup/rmgrouplist.js new file mode 100644 index 0000000000000000000000000000000000000000..fc5ce1e3073c9fabcf381c96b037b81434386fc7 --- /dev/null +++ b/skyeye-web/src/main/webapp/js/rmgroup/rmgrouplist.js @@ -0,0 +1,161 @@ + +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; + + showGrid({ + id: "rmTypeId", + url: reqBasePath + "common001", + params: {}, + pagination: false, + template: getFileContent('tpl/template/select-option.tpl'), + ajaxSendLoadBefore: function(hdb){ + }, + ajaxSendAfter:function(json){ + //搜索表单 + form.render(); + form.on('select(selectParent)', function(data){ + + }); + form.on('submit(formSearch)', function (data) { + //表单验证 + if (winui.verifyForm(data.elem)) { + loadTable(); + } + return false; + }); + } + }); + + //表格渲染 + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: reqBasePath + 'rmxcx008', + where:{rmGroupName:$("#rmGroupName").val(), rmTypeId:$("#rmTypeId").val()}, + even:true, //隔行变色 + page: true, + limits: [8, 16, 24, 32, 40, 48, 56], + limit: 8, + cols: [[ + { title: '序号', type: 'numbers'}, + { field: 'rmGroupName', title: '分组名称', width: 120 }, + { field: 'icon', title: '图标码', width: 520 }, + { field: 'icon', title: '图标', width: 120, templet: function(d){ + return ''; + }}, + { field: 'typeName', title: '所属分类', width: 120 }, + { field: 'groupMemberNum', 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); + }else if (layEvent === 'top') { //上移 + topOne(data); + }else if (layEvent === 'lower') { //下移 + lowerOne(data); + } + }); + + //删除 + function del(data, obj){ + var msg = obj ? '确认删除分组【' + obj.data.rmGroupName + '】吗?' : '确认删除选中数据吗?'; + layer.confirm(msg, { icon: 3, title: '删除分组' }, function (index) { + layer.close(index); + //向服务端发送删除指令 + AjaxPostUtil.request({url:reqBasePath + "rmxcx010", 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 topOne(data){ + AjaxPostUtil.request({url:reqBasePath + "rmxcx013", 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 lowerOne(data){ + AjaxPostUtil.request({url:reqBasePath + "rmxcx014", 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/rmgroup/rmgroupedit.html", + title: "编辑分组", + pageId: "rmgroupedit", + 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/rmgroup/rmgroupadd.html", + title: "新增分组", + pageId: "rmgroupadd", + 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:{rmGroupName:$("#rmGroupName").val(), rmTypeId:$("#rmTypeId").val()}}); + } + + exports('rmgrouplist', {}); +}); diff --git a/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupadd.html b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupadd.html new file mode 100644 index 0000000000000000000000000000000000000000..0e08203a36f6284d467a6e90f0d697a08d34e6d7 --- /dev/null +++ b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupadd.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + +
+
+
+
+ + + + + \ No newline at end of file diff --git a/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupedit.html b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupedit.html new file mode 100644 index 0000000000000000000000000000000000000000..629b11573d4d1e44cce7f210904da984c85300e7 --- /dev/null +++ b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupedit.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupeditTemplate.tpl b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupeditTemplate.tpl new file mode 100644 index 0000000000000000000000000000000000000000..a0396fcfee72bbf72e9ea7eafb15682a52190580 --- /dev/null +++ b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgroupeditTemplate.tpl @@ -0,0 +1,28 @@ +{{#bean}} +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + +
+
+{{/bean}} \ No newline at end of file diff --git a/skyeye-web/src/main/webapp/tpl/rmgroup/rmgrouplist.html b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgrouplist.html new file mode 100644 index 0000000000000000000000000000000000000000..bdca56fcb8ad12e5c2a1d479b95f34f09fdd7c5a --- /dev/null +++ b/skyeye-web/src/main/webapp/tpl/rmgroup/rmgrouplist.html @@ -0,0 +1,59 @@ + + + + + + + + + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+ +
+ + + + + \ No newline at end of file