| @@ -0,0 +1,147 @@ | |||
| package com.rwk.web.controller.ability; | |||
| import java.util.List; | |||
| import org.apache.shiro.authz.annotation.RequiresPermissions; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Controller; | |||
| import org.springframework.ui.ModelMap; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.PathVariable; | |||
| import org.springframework.web.bind.annotation.PostMapping; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.ResponseBody; | |||
| import com.rwk.common.annotation.Log; | |||
| import com.rwk.common.enums.BusinessType; | |||
| import com.rwk.system.domain.RwkAddressBook; | |||
| import com.rwk.system.service.IRwkAddressBookService; | |||
| import com.rwk.common.core.controller.BaseController; | |||
| import com.rwk.common.core.domain.AjaxResult; | |||
| import com.rwk.common.utils.poi.ExcelUtil; | |||
| import com.rwk.common.core.page.TableDataInfo; | |||
| /** | |||
| * 通讯录主Controller | |||
| * | |||
| * @author ruoyi | |||
| * @date 2024-12-11 | |||
| */ | |||
| @Controller | |||
| @RequestMapping("/system/addressbook") | |||
| public class RwkAddressBookController extends BaseController | |||
| { | |||
| private String prefix = "system/addressbook"; | |||
| @Autowired | |||
| private IRwkAddressBookService rwkAddressBookService; | |||
| @RequiresPermissions("system:addressbook:view") | |||
| @GetMapping() | |||
| public String book() | |||
| { | |||
| return prefix + "/addressbook"; | |||
| } | |||
| /** | |||
| * 查询通讯录主列表 | |||
| */ | |||
| @RequiresPermissions("system:book:list") | |||
| @PostMapping("/list") | |||
| @ResponseBody | |||
| public TableDataInfo list(RwkAddressBook rwkAddressBook) | |||
| { | |||
| List<RwkAddressBook> list = rwkAddressBookService.selectRwkAddressBookList(rwkAddressBook); | |||
| return getDataTable(list); | |||
| } | |||
| /** | |||
| * 导出通讯录主列表 | |||
| */ | |||
| @RequiresPermissions("system:book:export") | |||
| @Log(title = "通讯录主", businessType = BusinessType.EXPORT) | |||
| @PostMapping("/export") | |||
| @ResponseBody | |||
| public AjaxResult export(RwkAddressBook rwkAddressBook) | |||
| { | |||
| List<RwkAddressBook> list = rwkAddressBookService.selectRwkAddressBookList(rwkAddressBook); | |||
| ExcelUtil<RwkAddressBook> util = new ExcelUtil<RwkAddressBook>(RwkAddressBook.class); | |||
| return util.exportExcel(list, "通讯录主数据"); | |||
| } | |||
| /** | |||
| * 新增通讯录人员 | |||
| */ | |||
| @GetMapping("/add") | |||
| public String add() | |||
| { | |||
| return prefix + "/add"; | |||
| } | |||
| /** | |||
| * 新增通讯录分组 | |||
| */ | |||
| @GetMapping("/addgroup") | |||
| public String addgroup() | |||
| { | |||
| return prefix + "/addgroup"; | |||
| } | |||
| /** | |||
| * 新增通讯录分组 | |||
| */ | |||
| @GetMapping("/addbook") | |||
| public String addbook() | |||
| { | |||
| return prefix + "/addbook"; | |||
| } | |||
| /** | |||
| * 新增保存通讯录 | |||
| */ | |||
| @RequiresPermissions("system:book:add") | |||
| @Log(title = "通讯录主", businessType = BusinessType.INSERT) | |||
| @PostMapping("/add") | |||
| @ResponseBody | |||
| public AjaxResult addSave(RwkAddressBook rwkAddressBook) | |||
| { | |||
| return toAjax(rwkAddressBookService.insertRwkAddressBook(rwkAddressBook)); | |||
| } | |||
| /** | |||
| * 修改通讯录 | |||
| */ | |||
| @RequiresPermissions("system:book:edit") | |||
| @GetMapping("/edit/{id}") | |||
| public String edit(@PathVariable("id") Long id, ModelMap mmap) | |||
| { | |||
| RwkAddressBook rwkAddressBook = rwkAddressBookService.selectRwkAddressBookById(id); | |||
| mmap.put("rwkAddressBook", rwkAddressBook); | |||
| return prefix + "/edit"; | |||
| } | |||
| /** | |||
| * 修改保存通讯录 | |||
| */ | |||
| @RequiresPermissions("system:book:edit") | |||
| @Log(title = "通讯录主", businessType = BusinessType.UPDATE) | |||
| @PostMapping("/edit") | |||
| @ResponseBody | |||
| public AjaxResult editSave(RwkAddressBook rwkAddressBook) | |||
| { | |||
| return toAjax(rwkAddressBookService.updateRwkAddressBook(rwkAddressBook)); | |||
| } | |||
| /** | |||
| * 删除通讯录 | |||
| */ | |||
| @RequiresPermissions("system:book:remove") | |||
| @Log(title = "通讯录主", businessType = BusinessType.DELETE) | |||
| @PostMapping( "/remove") | |||
| @ResponseBody | |||
| public AjaxResult remove(String ids) | |||
| { | |||
| return toAjax(rwkAddressBookService.deleteRwkAddressBookByIds(ids)); | |||
| } | |||
| } | |||
| @@ -57,11 +57,6 @@ public class RwkStaffInformationController extends BaseController | |||
| return prefix + "/information"; | |||
| } | |||
| @GetMapping("/addressBook") | |||
| public String addressBook() | |||
| { | |||
| return prefix + "/addressBook"; | |||
| } | |||
| /** | |||
| * 查看收文 | |||
| @@ -0,0 +1,80 @@ | |||
| ::-webkit-scrollbar{ | |||
| width:0px!important; | |||
| height: 0px!important; | |||
| } | |||
| .group-list { | |||
| margin-top: 25px; | |||
| } | |||
| .group-list ul{ | |||
| margin: 0; | |||
| padding: 0; | |||
| } | |||
| .group-list li{ | |||
| list-style-type: none; | |||
| padding: 5px 0 5px 20px; | |||
| margin: 5px 0; | |||
| cursor: pointer; | |||
| } | |||
| .group-list li:hover{ | |||
| background-color: #CECECE; | |||
| } | |||
| .bootstrap-table .fixed-table-container.fixed-height:not(.has-footer){ | |||
| border: 0px!important; | |||
| } | |||
| .bootstrap-table .fixed-table-container.fixed-height .fixed-table-border{ | |||
| border: 0px!important; | |||
| } | |||
| .btn-style1{ | |||
| padding: 6px 20px; | |||
| border-radius: 5px 5px 0 0; | |||
| background-color: #EAF9FD; | |||
| color: #000000; | |||
| } | |||
| .btn-style2{ | |||
| padding: 6px 20px; | |||
| border-radius: 0; | |||
| color: #185EFF; | |||
| border-color: #185EFF; | |||
| } | |||
| .btn-style3{ | |||
| color: #417EFA; | |||
| padding: 0 10px; | |||
| } | |||
| .btn-style1:hover,.btn-style2:hover{ | |||
| background-color: #185EFF; | |||
| color: #ffffff; | |||
| } | |||
| .address-btn layui-layer-title{ | |||
| background-color: #185EFF; | |||
| text-align: center; | |||
| font-size: 16px; | |||
| } | |||
| .address-btn layui-layer-btn{ | |||
| text-align: center; | |||
| } | |||
| .addgroup_frame{ | |||
| height: 32px; | |||
| width: 360px; | |||
| } | |||
| .layui-layer-btn{ | |||
| text-align: center!important; | |||
| } | |||
| .address-from-left{ | |||
| height: 32px ; | |||
| width: 25%; | |||
| display: inline-block; | |||
| text-align: right; | |||
| } | |||
| .address-from-right{ | |||
| height: 32px ; | |||
| width: 55%; | |||
| display: inline-block; | |||
| text-align: right; | |||
| margin-left: 14px; | |||
| } | |||
| @@ -52,15 +52,15 @@ var table = { | |||
| toolbar: "toolbar", | |||
| loadingFontSize: 13, | |||
| striped: false, | |||
| escape: false, | |||
| escape: true, | |||
| firstLoad: true, | |||
| showFooter: false, | |||
| search: false, | |||
| showSearch: false, | |||
| showSearch: true, | |||
| showPageGo: false, | |||
| showRefresh: false, | |||
| showColumns: false, | |||
| showToggle: false, | |||
| showRefresh: true, | |||
| showColumns: true, | |||
| showToggle: true, | |||
| showExport: false, | |||
| showPrint: false, | |||
| exportDataType: 'all', | |||
| @@ -260,7 +260,6 @@ var table = { | |||
| type: 1, | |||
| closeBtn: true, | |||
| shadeClose: true, | |||
| area: ['auto', 'auto'], | |||
| content: "<img src='" + src + "' height='" + height + "' width='" + width + "'/>" | |||
| }); | |||
| } else if ($.common.equals("blank", target)) { | |||
| @@ -504,26 +503,6 @@ var table = { | |||
| } | |||
| return distinct ? $.common.uniqueFn(rows) : rows; | |||
| }, | |||
| // 查询表格指定列值 deDuplication(true去重、false不去重) | |||
| selectMoreColumns: function(columns, deDuplication) { | |||
| var distinct = $.common.isEmpty(deDuplication) ? false : deDuplication; | |||
| var data = $("#" + table.options.id).bootstrapTable('getSelections'); | |||
| var rows = data.map(item => { | |||
| const newItem = {}; | |||
| columns.forEach(column => { | |||
| if (item[column]) { // 确保字段存在 | |||
| newItem[column] = item[column]; | |||
| } | |||
| }); | |||
| return newItem; | |||
| }); | |||
| if (distinct){ | |||
| rows = rows.filter((item, index) => | |||
| rows.findIndex(obj => obj.userId === item.userId) === index | |||
| ); | |||
| } | |||
| return rows; | |||
| }, | |||
| // 获取当前页选中或者取消的行ID | |||
| affectedRowIds: function(rows) { | |||
| var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId; | |||
| @@ -572,23 +551,6 @@ var table = { | |||
| } | |||
| return actions.join(''); | |||
| }, | |||
| // 回显数据字典单字符串 | |||
| selectDictLabelStr: function(datas, value) { | |||
| if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { | |||
| return ''; | |||
| } | |||
| var actions = []; | |||
| $.each(datas, function(index, dict) { | |||
| if (dict.dictValue == value) { | |||
| actions.push($.common.sprintf("%s",dict.dictLabel)); | |||
| return false; | |||
| } | |||
| }); | |||
| if (actions.length === 0) { | |||
| return ''; | |||
| } | |||
| return actions.join(''); | |||
| }, | |||
| // 回显数据字典(字符串数组) | |||
| selectDictLabels: function(datas, value, separator) { | |||
| if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { | |||
| @@ -889,7 +851,7 @@ var table = { | |||
| url = "/404.html"; | |||
| } | |||
| if ($.common.isEmpty(width)) { | |||
| width = 1000; | |||
| width = 800; | |||
| } | |||
| if ($.common.isEmpty(height)) { | |||
| height = ($(window).height() - 50); | |||
| @@ -957,8 +919,10 @@ var table = { | |||
| fix: false, | |||
| area: [_width + 'px', _height + 'px'], | |||
| content: _url, | |||
| closeBtn: $.common.isEmpty(options.closeBtn) ? 1 : options.closeBtn, | |||
| shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose, | |||
| skin: options.skin, | |||
| offset: options.offset, | |||
| // options.btn设置为0表示不显示按钮 | |||
| btn: $.common.isEmpty(options.btn) ? _btn : options.btn, | |||
| yes: options.yes, | |||
| @@ -0,0 +1,59 @@ | |||
| <!DOCTYPE html> | |||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | |||
| <head> | |||
| <th:block th:include="include :: header('新增联系人')" /> | |||
| <!-- <link th:href="@{/css/use/css1.css}" rel="stylesheet"/>--> | |||
| <link th:href="@{/ruoyi/css/address.css}" rel="stylesheet"/> | |||
| <th:block th:include="include :: bootstrap-duallistbox-css" /> | |||
| </head> | |||
| <body class="white-bg"> | |||
| <!-- <ul class="nav head_top" id="tab">--> | |||
| <!-- <div class="text-right hidden-print" style="float: right">--> | |||
| <!-- <button class="btn btn-unite" onclick="submitHandler()">保存</button>--> | |||
| <!-- </div>--> | |||
| <!-- </ul>--> | |||
| <form class="form-horizontal"> | |||
| <div class="col-md-12" > | |||
| <div class="form-group" > | |||
| <div class="address-from-left"> | |||
| <span style="color: red">*</span>姓名: | |||
| </div> | |||
| <div class="address-from-right"> | |||
| <input type="text" name="" class="form-control" placeholder="请输入姓名"> | |||
| </div> | |||
| </div> | |||
| <div class="form-group" style="margin-top: 30px"> | |||
| <div class="address-from-left"> | |||
| 电话: | |||
| </div> | |||
| <div class="address-from-right"> | |||
| <input type="text" name="" class="form-control" placeholder="请输入电话"> | |||
| </div> | |||
| </div> | |||
| <div class="form-group" style="margin-top: 30px"> | |||
| <div class="address-from-left"> | |||
| Email: | |||
| </div> | |||
| <div class="address-from-right"> | |||
| <input type="text" name="" class="form-control" placeholder="请输入Email"> | |||
| </div> | |||
| </div> | |||
| <div class="form-group" style="margin-top: 30px"> | |||
| <div class="address-from-left"> | |||
| 分组归类: | |||
| </div> | |||
| <div class="address-from-right"> | |||
| <input type="text" name="" class="form-control" placeholder="请输入分组归类"> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </form> | |||
| <th:block th:include="include :: footer" /> | |||
| <script th:inline="javascript"> | |||
| </script> | |||
| </body> | |||
| </html> | |||
| @@ -0,0 +1,30 @@ | |||
| <!DOCTYPE html> | |||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | |||
| <head> | |||
| <th:block th:include="include :: header('新增培训/活动信息')" /> | |||
| <link th:href="@{/css/use/css1.css}" rel="stylesheet"/> | |||
| <link th:href="@{/ruoyi/css/address.css}" rel="stylesheet"/> | |||
| <th:block th:include="include :: bootstrap-duallistbox-css" /> | |||
| </head> | |||
| <body class="white-bg"> | |||
| <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |||
| <!-- <ul class="nav head_top" id="tab">--> | |||
| <!-- <div class="text-right hidden-print" style="float: right">--> | |||
| <!-- <button class="btn btn-unite" onclick="submitHandler()">保存</button>--> | |||
| <!-- </div>--> | |||
| <!-- </ul>--> | |||
| <form class="form-horizontal"> | |||
| <div class="form-group" style="margin-left:48px;margin-top: 20px"> | |||
| <label class="col-sm-4 control-label is-required" style="float: left">组名称 :</label> | |||
| <div class="col-sm-8" style="float: left"> | |||
| <input name="groupname" class="form-control addgroup_frame" placeholder="请填写组名称" > | |||
| </div> | |||
| </div> | |||
| </form> | |||
| </div> | |||
| <th:block th:include="include :: footer" /> | |||
| <script th:inline="javascript"> | |||
| </script> | |||
| </body> | |||
| </html> | |||
| @@ -0,0 +1,203 @@ | |||
| <!DOCTYPE html> | |||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | |||
| <head> | |||
| <th:block th:include="include :: header('通讯录')" /> | |||
| <link th:href="@{/css/use/css1.css}" rel="stylesheet"/> | |||
| <link th:href="@{/ruoyi/css/address.css}" rel="stylesheet"/> | |||
| </head> | |||
| <body class="white-bg"> | |||
| <div class="container-div"> | |||
| <div class="col-md-12 select-table" > | |||
| <div class="col-md-12 search-collapse" style="border:none;padding-right: 0;padding-left: 0;margin-bottom: 10px;"> | |||
| <form id="formId"> | |||
| <div class="select-list"> | |||
| <ul> | |||
| <li style="margin-left: 20px;"> | |||
| <label>通讯录:</label> | |||
| </li> | |||
| <li class="flexLayout" style="float: right;"> | |||
| <input type="text" class="form-control searchTag" placeholder="搜索姓名关键字"/> | |||
| <button class="btn btn-success" style="width:65px;margin-left: 10px;height: 36px;background-color: #185EFF;" onclick="$.table.search()"> | |||
| 搜索 | |||
| </button> | |||
| </li> | |||
| </ul> | |||
| </div> | |||
| </form> | |||
| </div> | |||
| <div class="col-md-12"> | |||
| <div style="border-bottom: 3px solid #F1F3F7;"> | |||
| <a class="btn btn-style1"> | |||
| 我的联系人 | |||
| </a> | |||
| <a class="btn btn-style1"> | |||
| 导入联系人 | |||
| </a> | |||
| <a class="btn btn-style1"> | |||
| 导出联系人 | |||
| </a> | |||
| <a class="btn btn-style1"> | |||
| 使用帮助 | |||
| </a> | |||
| </div> | |||
| <div style="margin-top: 10px;"> | |||
| <a class="btn btn-style2" onclick="addressAdd()"> | |||
| 新建联系人 | |||
| </a> | |||
| <a class="btn btn-style2 multiple disabled"> | |||
| 删除联系人 | |||
| </a> | |||
| <a class="btn btn-style2" onclick="addressgroupAdd()"> | |||
| 创建组 | |||
| </a> | |||
| <a class="btn btn-style2"> | |||
| 复制到组 | |||
| </a> | |||
| <a class="btn btn-style2"> | |||
| 移动到组 | |||
| </a> | |||
| <a class="btn btn-style2" onclick="$.table.search()"> | |||
| 刷新 | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="col-md-12" style="margin-top: 5px;height: 6px"> | |||
| <div style="border: 6px solid #F1F3F7;"></div> | |||
| </div> | |||
| <div class="col-md-12"> | |||
| <div class="col-md-3"> | |||
| <div id="groups" class="group-list"> | |||
| <ul> | |||
| <li><div>所有联系人(<span id="manTotal">11</span>)</div></li> | |||
| <li><div>分组1(<span>4</span>)</div></li> | |||
| <li><div>分组2(<span>7</span>)</div></li> | |||
| <li><div>分组3(<span>1</span>)</div></li> | |||
| <li><div>分组4(<span>0</span>)</div></li> | |||
| <li><div>未分组联系人(<span id="notDivide">1</span>)</div></li> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| <div class=" table-striped" style="float: right;width: 75%"> | |||
| <table id="bootstrap-table"></table> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </body> | |||
| <th:block th:include="include :: footer" /> | |||
| <script th:inline="javascript"> | |||
| // 分组前缀 | |||
| // 通讯录人员前缀 | |||
| var prefix = ctx + "system/addressbook"; | |||
| var editFlag =""; | |||
| $(function() { | |||
| queryUserList(); | |||
| queryGroupTree(); | |||
| }); | |||
| //新增 | |||
| function addressgroupAdd() { | |||
| var options = { | |||
| title: ['创建组','text-align:center;font-size:18px;color:white;height:60px;line-height:60px;background-color:#0042a4'], | |||
| url: prefix + "/addgroup", | |||
| type:1, | |||
| btn: ['确定','取消'], | |||
| closeBtn: 0, | |||
| width: 650, | |||
| height: 260, | |||
| offset:'150px', | |||
| anim:2, | |||
| yes: function (index, layero) { | |||
| $.modal.close(index); | |||
| $.table.refresh(); // 关闭后刷新表格数据(不刷新页面) | |||
| } | |||
| }; | |||
| $.modal.openOptions(options); | |||
| } | |||
| //新增 | |||
| function addressAdd() { | |||
| var options = { | |||
| title: ['新建联系人','text-align:center;font-size:18px;color:white;height:60px;line-height:60px;background-color:#0042a4'], | |||
| url: prefix + "/addbook", | |||
| type:1, | |||
| btn: ['确定','取消'], | |||
| closeBtn: 0, | |||
| width: 750, | |||
| height: 520, | |||
| offset:'150px', | |||
| anim:2, | |||
| yes: function (index, layero) { | |||
| $.modal.close(index); | |||
| $.table.refresh(); // 关闭后刷新表格数据(不刷新页面) | |||
| } | |||
| }; | |||
| $.modal.openOptions(options); | |||
| } | |||
| function queryUserList() { | |||
| var options = { | |||
| url: prefix + "/list", | |||
| height: 580, | |||
| pagination:false, | |||
| sidePagination: "client", | |||
| virtualScroll: true, | |||
| modalName: "人员信息", | |||
| columns: [{ | |||
| checkbox: true, | |||
| }, | |||
| { | |||
| field: 'id', | |||
| title: '主键id', | |||
| visible: false | |||
| }, | |||
| { | |||
| field: 'bookName', | |||
| title: '姓名', | |||
| align:"center", | |||
| width: 10, | |||
| widthUnit:"%" | |||
| }, | |||
| { | |||
| field: 'information', | |||
| title: '电话', | |||
| align:"center", | |||
| width: 20, | |||
| widthUnit:"%" | |||
| }, | |||
| { | |||
| field: 'email', | |||
| title: '电子邮箱', | |||
| align:"center", | |||
| width: 20, | |||
| widthUnit:"%" | |||
| }, | |||
| { | |||
| field: 'email', | |||
| title: '其他联系方式', | |||
| align:"center", | |||
| width: 20, | |||
| widthUnit:"%" | |||
| }, | |||
| { | |||
| title: '操作', | |||
| align: 'center', | |||
| formatter: function(value, row, index) { | |||
| var actions = []; | |||
| actions.push('<a class="btn-style3 ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')">编辑</a> '); | |||
| actions.push('|'); | |||
| actions.push('<a class="btn-style3" href="javascript:void(0)">详情</a>'); | |||
| return actions.join(''); | |||
| } | |||
| }] | |||
| }; | |||
| $.table.init(options); | |||
| } | |||
| function queryGroupTree() { | |||
| } | |||
| </script> | |||
| </html> | |||
| @@ -3,6 +3,7 @@ | |||
| <head> | |||
| <th:block th:include="include :: header('通讯录')" /> | |||
| <link th:href="@{/css/use/css1.css}" rel="stylesheet"/> | |||
| <link th:href="@{/ruoyi/css/address.css}" rel="stylesheet"/> | |||
| <style> | |||
| .btn-style1{ | |||
| padding: 6px 20px; | |||
| @@ -26,7 +27,6 @@ | |||
| } | |||
| .groupDiv{ | |||
| width:calc(24% + 7px); | |||
| height: 70vh; | |||
| position: absolute; | |||
| top:192px; | |||
| z-index: 99; | |||
| @@ -34,9 +34,8 @@ | |||
| } | |||
| /* 左侧分组栏 */ | |||
| .left-panel { | |||
| width: 100%; | |||
| width: 25%; | |||
| padding: 10px 0 10px 10px; | |||
| margin-top: 20px; | |||
| } | |||
| .group-list { | |||
| margin-bottom: 10px; | |||
| @@ -84,7 +83,7 @@ | |||
| <a class="btn btn-style2 multiple disabled"> | |||
| 删除联系人 | |||
| </a> | |||
| <a class="btn btn-style2"> | |||
| <a class="btn btn-style2" onclick="addressgroupAdd()"> | |||
| 创建组 | |||
| </a> | |||
| <a class="btn btn-style2"> | |||
| @@ -116,71 +115,67 @@ | |||
| </div> | |||
| </form> | |||
| </div> | |||
| <div id="grouping" class="groupDiv"> | |||
| <div class="left-panel"> | |||
| <div style="margin-bottom: 10px;color: #A9B2C2;">联系人分组</div> | |||
| <div id="groups" class="group-list"> | |||
| <ul> | |||
| <li><div>所有联系人(<span id="manTotal">11</span>)</div></li> | |||
| <li><div>分组1(<span>4</span>)</div></li> | |||
| <li><div>分组2(<span>7</span>)</div></li> | |||
| <li><div>分组3(<span>1</span>)</div></li> | |||
| <li><div>分组4(<span>0</span>)</div></li> | |||
| <li><div>未分组联系人(<span id="notDivide">1</span>)</div></li> | |||
| </ul> | |||
| <div> | |||
| <div id="grouping" class="groupDiv"> | |||
| <div class="left-panel"> | |||
| <div style="margin-bottom: 10px;color: #A9B2C2;">联系人分组</div> | |||
| <div id="groups" class="group-list"> | |||
| <ul> | |||
| <li><div>所有联系人(<span id="manTotal">11</span>)</div></li> | |||
| <li><div>分组1(<span>4</span>)</div></li> | |||
| <li><div>分组2(<span>7</span>)</div></li> | |||
| <li><div>分组3(<span>1</span>)</div></li> | |||
| <li><div>分组4(<span>0</span>)</div></li> | |||
| <li><div>未分组联系人(<span id="notDivide">1</span>)</div></li> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <div > | |||
| <table id="bootstrap-table"></table> | |||
| </div> | |||
| </div> | |||
| <table id="bootstrap-table"></table> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <th:block th:include="include :: footer" /> | |||
| <script th:inline="javascript"> | |||
| var editFlag = [[${@permission.hasPermi('system:information:edit')}]]; | |||
| var removeFlag = [[${@permission.hasPermi('system:information:remove')}]]; | |||
| var prefix = ctx + "system/information"; | |||
| // 分组前缀 | |||
| // 通讯录人员前缀 | |||
| var prefix = ctx + "system/addressbook"; | |||
| var editFlag =""; | |||
| $(function() { | |||
| queryUserList(); | |||
| queryGroupTree(); | |||
| }); | |||
| //新增 | |||
| function addressgroupAdd() { | |||
| var options = { | |||
| title: '新增通讯录-组', | |||
| url: addbook + "/addgroup", | |||
| skin: 'layui-layer-gray', | |||
| btn: ['关闭'], | |||
| width: 400, | |||
| height: 180, | |||
| maxmin: false, | |||
| full: false, | |||
| yes: function (index, layero) { | |||
| $.modal.close(index); | |||
| $.table.refresh(); // 关闭后刷新表格数据(不刷新页面) | |||
| } | |||
| }; | |||
| $.modal.openOptions(options); | |||
| } | |||
| function queryUserList() { | |||
| var options = { | |||
| // url: prefix + "/list", | |||
| // createUrl: prefix + "/add", | |||
| // updateUrl: prefix + "/edit/{id}", | |||
| // removeUrl: prefix + "/remove", | |||
| // exportUrl: prefix + "/export", | |||
| url: prefix + "/list", | |||
| height: 200, | |||
| pagination:false, | |||
| sidePagination: "client", | |||
| virtualScroll: true, | |||
| data:[ | |||
| {id:1,name:"姓名1",phone:"18756365787",email:"18756365787@163.c0m",subset:1}, | |||
| {id:2,name:"姓名2",phone:"16754367898",email:"16754367898@163.c0m",subset:1}, | |||
| {id:3,name:"姓名3",phone:"17865454565",email:"17865454565@163.c0m",subset:1}, | |||
| {id:4,name:"姓名4",phone:"19877685789",email:"19877685789@163.c0m",subset:1}, | |||
| {id:5,name:"姓名5",phone:"16758987656",email:"16758987656@163.c0m",subset:1}, | |||
| {id:6,name:"姓名6",phone:"18988765676",email:"18988765676@163.c0m",subset:1}, | |||
| {id:7,name:"姓名7",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:8,name:"姓名8",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:9,name:"姓名9",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:10,name:"姓名10",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:11,name:"姓名11",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:12,name:"姓名12",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:13,name:"姓名13",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:14,name:"姓名14",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:15,name:"姓名15",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:16,name:"姓名16",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:17,name:"姓名17",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:18,name:"姓名18",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:19,name:"姓名19",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:20,name:"姓名20",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:21,name:"姓名21",phone:"19876342223",email:"19876342223@163.c0m",subset:1}, | |||
| {id:22,name:"姓名22",phone:"19876342223",email:"19876342223@163.c0m",subset:1} | |||
| ], | |||
| modalName: "人员信息", | |||
| columns: [{ | |||
| checkbox: true, | |||
| @@ -191,14 +186,14 @@ | |||
| visible: false | |||
| }, | |||
| { | |||
| field: 'name', | |||
| field: 'bookName', | |||
| title: '姓名', | |||
| align:"center", | |||
| width: 25, | |||
| widthUnit:"%" | |||
| }, | |||
| { | |||
| field: 'phone', | |||
| field: 'information', | |||
| title: '电话', | |||
| align:"center", | |||
| width: 25, | |||
| @@ -217,14 +212,14 @@ | |||
| formatter: function(value, row, index) { | |||
| var actions = []; | |||
| actions.push('<a class="btn-style3 ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')">编辑</a> '); | |||
| actions.push('<a class="btn-style3" href="javascript:void(0)">|</a> '); | |||
| actions.push('|'); | |||
| actions.push('<a class="btn-style3" href="javascript:void(0)">详情</a>'); | |||
| return actions.join(''); | |||
| } | |||
| }] | |||
| }; | |||
| $.table.init(options); | |||
| $(".fixed-table-container.fixed-height").css({width: "calc(75% - 20px)",height:parseInt($("#grouping").css("height")),float: "right","margin-right": "20px"}); | |||
| $(".fixed-table-container.fixed-height").css({width: "calc(75% - 20px)",height:"73vh",float: "right","margin-right": "20px"}); | |||
| } | |||
| function queryGroupTree() { | |||
| @@ -0,0 +1,130 @@ | |||
| package com.rwk.system.domain; | |||
| import java.util.Date; | |||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||
| import org.apache.commons.lang3.builder.ToStringBuilder; | |||
| import org.apache.commons.lang3.builder.ToStringStyle; | |||
| import com.rwk.common.annotation.Excel; | |||
| import com.rwk.common.core.domain.BaseEntity; | |||
| /** | |||
| * 通讯录主对象 rwk_address_book | |||
| * | |||
| * @author ruoyi | |||
| * @date 2024-12-12 | |||
| */ | |||
| public class RwkAddressBook extends BaseEntity | |||
| { | |||
| private static final long serialVersionUID = 1L; | |||
| /** $column.columnComment */ | |||
| private Long id; | |||
| /** 通讯录姓名 */ | |||
| @Excel(name = "通讯录姓名") | |||
| private String bookName; | |||
| /** 联系方式 */ | |||
| @Excel(name = "联系方式") | |||
| private String information; | |||
| /** 归属部门/个人 */ | |||
| @Excel(name = "归属部门/个人") | |||
| private Long addressGroup; | |||
| /** 创建时间 */ | |||
| @JsonFormat(pattern = "yyyy-MM-dd") | |||
| @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") | |||
| private Date createDate; | |||
| /** email */ | |||
| @Excel(name = "email") | |||
| private String email; | |||
| /** 其他联系方式 */ | |||
| @Excel(name = "其他联系方式") | |||
| private String othersInf; | |||
| public void setId(Long id) | |||
| { | |||
| this.id = id; | |||
| } | |||
| public Long getId() | |||
| { | |||
| return id; | |||
| } | |||
| public void setBookName(String bookName) | |||
| { | |||
| this.bookName = bookName; | |||
| } | |||
| public String getBookName() | |||
| { | |||
| return bookName; | |||
| } | |||
| public void setInformation(String information) | |||
| { | |||
| this.information = information; | |||
| } | |||
| public String getInformation() | |||
| { | |||
| return information; | |||
| } | |||
| public void setAddressGroup(Long addressGroup) | |||
| { | |||
| this.addressGroup = addressGroup; | |||
| } | |||
| public Long getAddressGroup() | |||
| { | |||
| return addressGroup; | |||
| } | |||
| public void setCreateDate(Date createDate) | |||
| { | |||
| this.createDate = createDate; | |||
| } | |||
| public Date getCreateDate() | |||
| { | |||
| return createDate; | |||
| } | |||
| public void setEmail(String email) | |||
| { | |||
| this.email = email; | |||
| } | |||
| public String getEmail() | |||
| { | |||
| return email; | |||
| } | |||
| public void setOthersInf(String othersInf) | |||
| { | |||
| this.othersInf = othersInf; | |||
| } | |||
| public String getOthersInf() | |||
| { | |||
| return othersInf; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||
| .append("id", getId()) | |||
| .append("bookName", getBookName()) | |||
| .append("information", getInformation()) | |||
| .append("addressGroup", getAddressGroup()) | |||
| .append("createDate", getCreateDate()) | |||
| .append("email", getEmail()) | |||
| .append("othersInf", getOthersInf()) | |||
| .toString(); | |||
| } | |||
| } | |||
| @@ -0,0 +1,61 @@ | |||
| package com.rwk.system.mapper; | |||
| import java.util.List; | |||
| import com.rwk.system.domain.RwkAddressBook; | |||
| /** | |||
| * 通讯录主Mapper接口 | |||
| * | |||
| * @author ruoyi | |||
| * @date 2024-12-11 | |||
| */ | |||
| public interface RwkAddressBookMapper | |||
| { | |||
| /** | |||
| * 查询通讯录主 | |||
| * | |||
| * @param id 通讯录主主键 | |||
| * @return 通讯录主 | |||
| */ | |||
| public RwkAddressBook selectRwkAddressBookById(Long id); | |||
| /** | |||
| * 查询通讯录主列表 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 通讯录主集合 | |||
| */ | |||
| public List<RwkAddressBook> selectRwkAddressBookList(RwkAddressBook rwkAddressBook); | |||
| /** | |||
| * 新增通讯录主 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 结果 | |||
| */ | |||
| public int insertRwkAddressBook(RwkAddressBook rwkAddressBook); | |||
| /** | |||
| * 修改通讯录主 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 结果 | |||
| */ | |||
| public int updateRwkAddressBook(RwkAddressBook rwkAddressBook); | |||
| /** | |||
| * 删除通讯录主 | |||
| * | |||
| * @param id 通讯录主主键 | |||
| * @return 结果 | |||
| */ | |||
| public int deleteRwkAddressBookById(Long id); | |||
| /** | |||
| * 批量删除通讯录主 | |||
| * | |||
| * @param ids 需要删除的数据主键集合 | |||
| * @return 结果 | |||
| */ | |||
| public int deleteRwkAddressBookByIds(String[] ids); | |||
| } | |||
| @@ -0,0 +1,61 @@ | |||
| package com.rwk.system.service; | |||
| import java.util.List; | |||
| import com.rwk.system.domain.RwkAddressBook; | |||
| /** | |||
| * 通讯录主Service接口 | |||
| * | |||
| * @author ruoyi | |||
| * @date 2024-12-11 | |||
| */ | |||
| public interface IRwkAddressBookService | |||
| { | |||
| /** | |||
| * 查询通讯录主 | |||
| * | |||
| * @param id 通讯录主主键 | |||
| * @return 通讯录主 | |||
| */ | |||
| public RwkAddressBook selectRwkAddressBookById(Long id); | |||
| /** | |||
| * 查询通讯录主列表 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 通讯录主集合 | |||
| */ | |||
| public List<RwkAddressBook> selectRwkAddressBookList(RwkAddressBook rwkAddressBook); | |||
| /** | |||
| * 新增通讯录主 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 结果 | |||
| */ | |||
| public int insertRwkAddressBook(RwkAddressBook rwkAddressBook); | |||
| /** | |||
| * 修改通讯录主 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 结果 | |||
| */ | |||
| public int updateRwkAddressBook(RwkAddressBook rwkAddressBook); | |||
| /** | |||
| * 批量删除通讯录主 | |||
| * | |||
| * @param ids 需要删除的通讯录主主键集合 | |||
| * @return 结果 | |||
| */ | |||
| public int deleteRwkAddressBookByIds(String ids); | |||
| /** | |||
| * 删除通讯录主信息 | |||
| * | |||
| * @param id 通讯录主主键 | |||
| * @return 结果 | |||
| */ | |||
| public int deleteRwkAddressBookById(Long id); | |||
| } | |||
| @@ -0,0 +1,94 @@ | |||
| package com.rwk.system.service.impl; | |||
| import java.util.List; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.rwk.system.mapper.RwkAddressBookMapper; | |||
| import com.rwk.system.domain.RwkAddressBook; | |||
| import com.rwk.system.service.IRwkAddressBookService; | |||
| import com.rwk.common.core.text.Convert; | |||
| /** | |||
| * 通讯录主Service业务层处理 | |||
| * | |||
| * @author ruoyi | |||
| * @date 2024-12-11 | |||
| */ | |||
| @Service | |||
| public class RwkAddressBookServiceImpl implements IRwkAddressBookService | |||
| { | |||
| @Autowired | |||
| private RwkAddressBookMapper rwkAddressBookMapper; | |||
| /** | |||
| * 查询通讯录主 | |||
| * | |||
| * @param id 通讯录主主键 | |||
| * @return 通讯录主 | |||
| */ | |||
| @Override | |||
| public RwkAddressBook selectRwkAddressBookById(Long id) | |||
| { | |||
| return rwkAddressBookMapper.selectRwkAddressBookById(id); | |||
| } | |||
| /** | |||
| * 查询通讯录主列表 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 通讯录主 | |||
| */ | |||
| @Override | |||
| public List<RwkAddressBook> selectRwkAddressBookList(RwkAddressBook rwkAddressBook) | |||
| { | |||
| return rwkAddressBookMapper.selectRwkAddressBookList(rwkAddressBook); | |||
| } | |||
| /** | |||
| * 新增通讯录主 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 结果 | |||
| */ | |||
| @Override | |||
| public int insertRwkAddressBook(RwkAddressBook rwkAddressBook) | |||
| { | |||
| return rwkAddressBookMapper.insertRwkAddressBook(rwkAddressBook); | |||
| } | |||
| /** | |||
| * 修改通讯录主 | |||
| * | |||
| * @param rwkAddressBook 通讯录主 | |||
| * @return 结果 | |||
| */ | |||
| @Override | |||
| public int updateRwkAddressBook(RwkAddressBook rwkAddressBook) | |||
| { | |||
| return rwkAddressBookMapper.updateRwkAddressBook(rwkAddressBook); | |||
| } | |||
| /** | |||
| * 批量删除通讯录主 | |||
| * | |||
| * @param ids 需要删除的通讯录主主键 | |||
| * @return 结果 | |||
| */ | |||
| @Override | |||
| public int deleteRwkAddressBookByIds(String ids) | |||
| { | |||
| return rwkAddressBookMapper.deleteRwkAddressBookByIds(Convert.toStrArray(ids)); | |||
| } | |||
| /** | |||
| * 删除通讯录主信息 | |||
| * | |||
| * @param id 通讯录主主键 | |||
| * @return 结果 | |||
| */ | |||
| @Override | |||
| public int deleteRwkAddressBookById(Long id) | |||
| { | |||
| return rwkAddressBookMapper.deleteRwkAddressBookById(id); | |||
| } | |||
| } | |||
| @@ -0,0 +1,82 @@ | |||
| <?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.rwk.system.mapper.RwkAddressBookMapper"> | |||
| <resultMap type="RwkAddressBook" id="RwkAddressBookResult"> | |||
| <result property="id" column="id" /> | |||
| <result property="bookName" column="book_name" /> | |||
| <result property="information" column="information" /> | |||
| <result property="addressGroup" column="address_group" /> | |||
| <result property="createDate" column="create_date" /> | |||
| <result property="email" column="email" /> | |||
| <result property="othersInf" column="others_inf" /> | |||
| </resultMap> | |||
| <sql id="selectRwkAddressBookVo"> | |||
| select id, book_name, information, address_group, create_date, email, others_inf from rwk_address_book | |||
| </sql> | |||
| <select id="selectRwkAddressBookList" parameterType="RwkAddressBook" resultMap="RwkAddressBookResult"> | |||
| <include refid="selectRwkAddressBookVo"/> | |||
| <where> | |||
| <if test="bookName != null and bookName != ''"> and book_name like concat('%', #{bookName}, '%')</if> | |||
| <if test="information != null and information != ''"> and information = #{information}</if> | |||
| <if test="addressGroup != null "> and address_group = #{addressGroup}</if> | |||
| <if test="createDate != null "> and create_date = #{createDate}</if> | |||
| <if test="email != null and email != ''"> and email = #{email}</if> | |||
| <if test="othersInf != null and othersInf != ''"> and others_inf = #{othersInf}</if> | |||
| </where> | |||
| </select> | |||
| <select id="selectRwkAddressBookById" parameterType="Long" resultMap="RwkAddressBookResult"> | |||
| <include refid="selectRwkAddressBookVo"/> | |||
| where id = #{id} | |||
| </select> | |||
| <insert id="insertRwkAddressBook" parameterType="RwkAddressBook" useGeneratedKeys="true" keyProperty="id"> | |||
| insert into rwk_address_book | |||
| <trim prefix="(" suffix=")" suffixOverrides=","> | |||
| <if test="bookName != null">book_name,</if> | |||
| <if test="information != null">information,</if> | |||
| <if test="addressGroup != null">address_group,</if> | |||
| <if test="createDate != null">create_date,</if> | |||
| <if test="email != null">email,</if> | |||
| <if test="othersInf != null">others_inf,</if> | |||
| </trim> | |||
| <trim prefix="values (" suffix=")" suffixOverrides=","> | |||
| <if test="bookName != null">#{bookName},</if> | |||
| <if test="information != null">#{information},</if> | |||
| <if test="addressGroup != null">#{addressGroup},</if> | |||
| <if test="createDate != null">#{createDate},</if> | |||
| <if test="email != null">#{email},</if> | |||
| <if test="othersInf != null">#{othersInf},</if> | |||
| </trim> | |||
| </insert> | |||
| <update id="updateRwkAddressBook" parameterType="RwkAddressBook"> | |||
| update rwk_address_book | |||
| <trim prefix="SET" suffixOverrides=","> | |||
| <if test="bookName != null">book_name = #{bookName},</if> | |||
| <if test="information != null">information = #{information},</if> | |||
| <if test="addressGroup != null">address_group = #{addressGroup},</if> | |||
| <if test="createDate != null">create_date = #{createDate},</if> | |||
| <if test="email != null">email = #{email},</if> | |||
| <if test="othersInf != null">others_inf = #{othersInf},</if> | |||
| </trim> | |||
| where id = #{id} | |||
| </update> | |||
| <delete id="deleteRwkAddressBookById" parameterType="Long"> | |||
| delete from rwk_address_book where id = #{id} | |||
| </delete> | |||
| <delete id="deleteRwkAddressBookByIds" parameterType="String"> | |||
| delete from rwk_address_book where id in | |||
| <foreach item="id" collection="array" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </delete> | |||
| </mapper> | |||