From d1d8c9c9f42ca34fe8cc7ead2778b135ea752398 Mon Sep 17 00:00:00 2001 From: huangyao <792466870@qq.com> Date: Tue, 12 Jan 2021 22:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=AD=97=E5=85=B8=E6=A0=91=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=E5=BA=95=E5=B1=82=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DictTypeViewController.java | 10 +- .../{controller => }/DictViewController.java | 39 ++---- .../dict/service/ExtendDictService.java | 38 ------ .../service/impl/ExtendDictServiceImpl.java | 125 ------------------ .../webapp/assets/modular/system/dict/dict.js | 24 ++-- .../assets/modular/system/dict/dict_add.js | 19 +-- .../assets/modular/system/dict/dict_edit.js | 56 ++++---- .../modular/system/dictType/dictType.js | 8 +- .../modular/system/dictType/dictType_edit.js | 2 +- .../pages/modular/system/dict/dict.html | 1 + .../pages/modular/system/dict/dict_add.html | 8 +- .../pages/modular/system/dict/dict_edit.html | 16 +-- 12 files changed, 64 insertions(+), 282 deletions(-) rename src/main/java/cn/stylefeng/guns/modular/dict/{controller => }/DictTypeViewController.java (87%) rename src/main/java/cn/stylefeng/guns/modular/dict/{controller => }/DictViewController.java (68%) delete mode 100644 src/main/java/cn/stylefeng/guns/modular/dict/service/ExtendDictService.java delete mode 100644 src/main/java/cn/stylefeng/guns/modular/dict/service/impl/ExtendDictServiceImpl.java diff --git a/src/main/java/cn/stylefeng/guns/modular/dict/controller/DictTypeViewController.java b/src/main/java/cn/stylefeng/guns/modular/dict/DictTypeViewController.java similarity index 87% rename from src/main/java/cn/stylefeng/guns/modular/dict/controller/DictTypeViewController.java rename to src/main/java/cn/stylefeng/guns/modular/dict/DictTypeViewController.java index 1c6b7a11..192ef6d5 100644 --- a/src/main/java/cn/stylefeng/guns/modular/dict/controller/DictTypeViewController.java +++ b/src/main/java/cn/stylefeng/guns/modular/dict/DictTypeViewController.java @@ -1,4 +1,4 @@ -package cn.stylefeng.guns.modular.dict.controller; +package cn.stylefeng.guns.modular.dict; import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource; @@ -14,7 +14,7 @@ import org.springframework.stereotype.Controller; **/ @Controller @Slf4j -@ApiResource(name = "字典类型管理相关的界面渲染", path = "dictType") +@ApiResource(name = "字典类型管理相关的界面渲染") public class DictTypeViewController { private String PREFIX = "/modular/system/dictType"; @@ -27,7 +27,7 @@ public class DictTypeViewController { * @author huangyao * @date 2021/1/6 21:08 */ - @GetResource(name = "字典类型管理-列表-视图", path = "") + @GetResource(name = "字典类型管理-列表-视图", path = "/view/dictType") public String indexView() { return PREFIX + "/dictType.html"; } @@ -40,7 +40,7 @@ public class DictTypeViewController { * @author huangyao * @date 2021/1/6 21:25 */ - @GetResource(name = "字典类型管理-添加-视图", path = "/addView") + @GetResource(name = "字典类型管理-添加-视图", path = "/view/dictType/addView") public String addView() { return PREFIX + "/dictType_add.html"; } @@ -53,7 +53,7 @@ public class DictTypeViewController { * @author huangyao * @date 2021/1/6 21:26 */ - @GetResource(name = "字典类型管理-编辑-视图", path = "/editView") + @GetResource(name = "字典类型管理-编辑-视图", path = "/view/dictType/editView") public String editView() { return PREFIX + "/dictType_edit.html"; } diff --git a/src/main/java/cn/stylefeng/guns/modular/dict/controller/DictViewController.java b/src/main/java/cn/stylefeng/guns/modular/dict/DictViewController.java similarity index 68% rename from src/main/java/cn/stylefeng/guns/modular/dict/controller/DictViewController.java rename to src/main/java/cn/stylefeng/guns/modular/dict/DictViewController.java index 00ef5d56..1ec10b50 100644 --- a/src/main/java/cn/stylefeng/guns/modular/dict/controller/DictViewController.java +++ b/src/main/java/cn/stylefeng/guns/modular/dict/DictViewController.java @@ -1,24 +1,18 @@ -package cn.stylefeng.guns.modular.dict.controller; +package cn.stylefeng.guns.modular.dict; -import cn.stylefeng.guns.modular.dict.service.ExtendDictService; import cn.stylefeng.roses.kernel.dict.modular.entity.SysDict; import cn.stylefeng.roses.kernel.dict.modular.entity.SysDictType; -import cn.stylefeng.roses.kernel.dict.modular.pojo.request.DictRequest; import cn.stylefeng.roses.kernel.dict.modular.service.DictService; import cn.stylefeng.roses.kernel.dict.modular.service.DictTypeService; import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource; import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource; -import cn.stylefeng.roses.kernel.system.pojo.ztree.ZTreeNode; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; -import java.util.List; - /** * 字典视图控制器 * @@ -27,13 +21,11 @@ import java.util.List; **/ @Controller @Slf4j -@ApiResource(name = "字典管理相关的界面渲染", path = "dict") +@ApiResource(name = "字典管理相关的界面渲染") public class DictViewController { private String PREFIX = "/modular/system/dict"; - @Autowired - private ExtendDictService extendDictService; @Autowired private DictService dictService; @Autowired @@ -47,7 +39,7 @@ public class DictViewController { * @author huangyao * @date 2021/1/9 22:37 */ - @GetResource(name = "字典管理-列表-视图", path = "") + @GetResource(name = "字典管理-列表-视图", path = "/view/dict") public ModelAndView indexView(ModelAndView view, @RequestParam Long dictTypeId) { SysDictType dictType = dictTypeService.getById(dictTypeId); view.addObject("dictTypeId", dictType.getDictTypeId()); @@ -65,7 +57,7 @@ public class DictViewController { * @author huangyao * @date 2021/1/9 22:37 */ - @GetResource(name = "字典管理-添加-视图", path = "/addView") + @GetResource(name = "字典管理-添加-视图", path = "/view/dict/addView") public ModelAndView addView(ModelAndView view, @RequestParam Long dictTypeId) { SysDictType dictType = dictTypeService.getById(dictTypeId); view.addObject("dictTypeName", dictType.getDictTypeName()); @@ -83,29 +75,18 @@ public class DictViewController { * @author huangyao * @date 2021/1/9 22:38 */ - @GetResource(name = "字典管理-编辑-视图", path = "/editView") + @GetResource(name = "字典管理-编辑-视图", path = "/view/dict/editView") public ModelAndView editView(ModelAndView view, @RequestParam Long dictId) { - SysDictType dictType = extendDictService.getDictTypeByDictId(dictId); + SysDict dict = dictService.getById(dictId); + // 根据字典获取字典类型 + SysDictType dictType = dictTypeService.getOne(new QueryWrapper().lambda().eq(SysDictType::getDelFlag, "N") + .eq(SysDictType::getDictTypeCode, dict.getDictTypeCode())); view.addObject("dictTypeName", dictType.getDictTypeName()); - view.addObject("dictTypeId", dictType.getDictTypeId()); + view.addObject("dictId", dictId); view.addObject("dictTypeCode", dictType.getDictTypeCode()); view.setViewName(PREFIX + "/dict_edit.html"); return view; } - /** - * 字典树列表 - * - * @param - * @return - * @author huangyao - * @date 2021/1/10 17:31 - */ - @GetResource(name = "获取zTree形式的字典树(layui版本)", path = "/zTree") - @ResponseBody - public List layuiSelectParentMenuTreeList(DictRequest dictRequest) { - return this.extendDictService.dictZTree(dictRequest); - } - } diff --git a/src/main/java/cn/stylefeng/guns/modular/dict/service/ExtendDictService.java b/src/main/java/cn/stylefeng/guns/modular/dict/service/ExtendDictService.java deleted file mode 100644 index c5759063..00000000 --- a/src/main/java/cn/stylefeng/guns/modular/dict/service/ExtendDictService.java +++ /dev/null @@ -1,38 +0,0 @@ -package cn.stylefeng.guns.modular.dict.service; - -import cn.stylefeng.roses.kernel.dict.modular.entity.SysDictType; -import cn.stylefeng.roses.kernel.dict.modular.pojo.request.DictRequest; -import cn.stylefeng.roses.kernel.system.pojo.ztree.ZTreeNode; - -import java.util.List; - -/** - * 字典业务接口 - * - * @param - * @author huangyao - * @return - * @date 2021/1/10 16:23 - */ -public interface ExtendDictService { - - /** - * 获取字典数据的 ztree - * - * @param - * @return - * @author huangyao - * @date 2021/1/10 16:26 - */ - List dictZTree(DictRequest dictRequest); - - /** - * 根据字典id获取字典类型 - * - * @param - * @return - * @author huangyao - * @date 2021/1/11 21:39 - */ - SysDictType getDictTypeByDictId(Long dictId); -} diff --git a/src/main/java/cn/stylefeng/guns/modular/dict/service/impl/ExtendDictServiceImpl.java b/src/main/java/cn/stylefeng/guns/modular/dict/service/impl/ExtendDictServiceImpl.java deleted file mode 100644 index 6a6b715f..00000000 --- a/src/main/java/cn/stylefeng/guns/modular/dict/service/impl/ExtendDictServiceImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -package cn.stylefeng.guns.modular.dict.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import cn.stylefeng.guns.modular.dict.service.ExtendDictService; -import cn.stylefeng.roses.kernel.dict.api.exception.DictException; -import cn.stylefeng.roses.kernel.dict.api.exception.enums.DictExceptionEnum; -import cn.stylefeng.roses.kernel.dict.modular.entity.SysDict; -import cn.stylefeng.roses.kernel.dict.modular.entity.SysDictType; -import cn.stylefeng.roses.kernel.dict.modular.pojo.request.DictRequest; -import cn.stylefeng.roses.kernel.dict.modular.service.DictService; -import cn.stylefeng.roses.kernel.dict.modular.service.DictTypeService; -import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum; -import cn.stylefeng.roses.kernel.system.pojo.ztree.ZTreeNode; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - * 字典扩展业务实现 - * - * @param - * @author huangyao - * @return - * @date 2021/1/10 16:24 - */ -@Service -public class ExtendDictServiceImpl implements ExtendDictService { - - @Autowired - private DictService dictService; - @Autowired - private DictTypeService dictTypeService; - - @Override - public List dictZTree(DictRequest dictRequest) { - // 查询条件 - LambdaQueryWrapper queryWrapper = createWrapper(dictRequest); - List dictList = dictService.list(queryWrapper); - - // 构建ztree - ArrayList zTreeNodes = new ArrayList<>(); - for (SysDict dict : dictList) { - ZTreeNode zTreeNode = new ZTreeNode(); - zTreeNode.setId(dict.getDictId()); - zTreeNode.setpId(dict.getDictParentId()); - zTreeNode.setName(dict.getDictName()); - zTreeNode.setOpen(true); - zTreeNodes.add(zTreeNode); - } - - ZTreeNode zTreeNode = new ZTreeNode(); - zTreeNode.setId(-1L); - zTreeNode.setpId(0L); - zTreeNode.setName("顶级"); - zTreeNode.setOpen(true); - zTreeNodes.add(zTreeNode); - - - // 构建已选中的状态 - return zTreeNodes; - } - - @Override - public SysDictType getDictTypeByDictId(Long dictId) { - SysDict dict = dictService.getById(dictId); - // 根据字典类型编码获取字典类型 - SysDictType dictType = dictTypeService.getOne(new QueryWrapper().lambda() - .eq(SysDictType::getDelFlag, 'N') - .eq(SysDictType::getDictTypeCode, dict.getDictTypeCode())); - if (ObjectUtil.isEmpty(dictType)) { - throw new DictException(DictExceptionEnum.DICT_TYPE_NOT_EXISTED, dictType.getDictTypeCode()); - } - return dictType; - } - - /** - * 创建字典通用的条件查询wrapper - * - * @param - * @return - * @author huangyao - * @date 2021/1/10 16:33 - */ - private LambdaQueryWrapper createWrapper(DictRequest dictRequest) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (ObjectUtil.isNotNull(dictRequest)) { - - // 拼接字典名称查询条件 - if (ObjectUtil.isNotEmpty(dictRequest.getDictName())) { - queryWrapper.like(SysDict::getDictName, dictRequest.getDictName()); - } - - // 拼接字典拼音查询条件 - if (ObjectUtil.isNotEmpty(dictRequest.getDictNamePinYin())) { - queryWrapper.eq(SysDict::getDictNamePinyin, dictRequest.getDictNamePinYin()); - } - - // 根据字典类型查询条件 - if (ObjectUtil.isNotEmpty(dictRequest.getDictTypeCode())) { - queryWrapper.eq(SysDict::getDictTypeCode, dictRequest.getDictTypeCode()); - } - - // 拼接字典父级id查询条件 - if (ObjectUtil.isNotEmpty(dictRequest.getDictParentId())) { - queryWrapper - .eq(SysDict::getDictParentId, dictRequest.getDictParentId()) - .or() - .like(SysDict::getDictPids, dictRequest.getDictPids()); - } - } - - // 查询未删除状态的 - queryWrapper.eq(SysDict::getDelFlag, YesOrNotEnum.N.getCode()); - - // 根据排序升序排列,序号越小越在前 - queryWrapper.orderByAsc(SysDict::getDictSort); - - return queryWrapper; - } -} diff --git a/src/main/webapp/assets/modular/system/dict/dict.js b/src/main/webapp/assets/modular/system/dict/dict.js index 1253573f..efcb0e7f 100644 --- a/src/main/webapp/assets/modular/system/dict/dict.js +++ b/src/main/webapp/assets/modular/system/dict/dict.js @@ -1,6 +1,7 @@ -layui.use(['treeTable', 'func', 'HttpRequest'], function () { +layui.use(['table', 'treeTable', 'func', 'HttpRequest'], function () { var $ = layui.$; var treeTable = layui.treeTable; + var table = layui.table; var func = layui.func; var HttpRequest = layui.HttpRequest; @@ -23,15 +24,6 @@ layui.use(['treeTable', 'func', 'HttpRequest'], function () { {field: 'dictName', align: "center", title: '字典名称'}, {field: 'dictCode', align: "center", title: '字典编码'}, {field: 'dictNamePinYin', align: "center", title: '字典拼音'}, - { - field: 'status', align: "center", title: '状态', templet: function (d) { - if (d.status === 1) { - return "启用"; - } else { - return "禁用"; - } - } - }, {align: 'center', toolbar: '#tableBar', title: '操作'} ]; }; @@ -51,9 +43,9 @@ layui.use(['treeTable', 'func', 'HttpRequest'], function () { */ Dict.openAddDlg = function () { func.open({ - height: 650, + height: 550, title: '添加字典', - content: Feng.ctxPath + '/dict/addView?dictTypeId=' + $("#dictTypeId").val(), + content: Feng.ctxPath + '/view/dict/addView?dictTypeId=' + $("#dictTypeId").val(), tableId: Dict.tableId, endCallback: function () { Dict.initTable(Dict.tableId); @@ -68,9 +60,9 @@ layui.use(['treeTable', 'func', 'HttpRequest'], function () { */ Dict.openEditDlg = function (data) { func.open({ - height: 650, + height: 550, title: '修改字典', - content: Feng.ctxPath + '/dict/editView?dictId=' + data.dictId, + content: Feng.ctxPath + '/view/dict/editView?dictId=' + data.dictId, tableId: Dict.tableId, endCallback: function () { Dict.initTable(Dict.tableId); @@ -115,7 +107,7 @@ layui.use(['treeTable', 'func', 'HttpRequest'], function () { height: "full-98", cols: Dict.initColumn(), reqData: function (d, callback) { - var httpRequest = new HttpRequest(Feng.ctxPath + 'dict/getDictTreeList?dictTypeCode=' + $("#dictTypeCode").val(), 'get', function (result) { + var httpRequest = new HttpRequest(Feng.ctxPath + '/dict/getDictTreeList?dictTypeCode=' + $("#dictTypeCode").val(), 'get', function (result) { callback(result.data); }, function (result) { Feng.error("加载失败!" + result.message + "!"); @@ -145,7 +137,7 @@ layui.use(['treeTable', 'func', 'HttpRequest'], function () { // 关闭页面 $('#btnBack').click(function () { - window.location.href = Feng.ctxPath + "/dictType"; + window.location.href = Feng.ctxPath + "/view/dictType"; }); // 工具条点击事件 diff --git a/src/main/webapp/assets/modular/system/dict/dict_add.js b/src/main/webapp/assets/modular/system/dict/dict_add.js index 54707c67..b340e15f 100644 --- a/src/main/webapp/assets/modular/system/dict/dict_add.js +++ b/src/main/webapp/assets/modular/system/dict/dict_add.js @@ -3,17 +3,8 @@ */ var DictInfoDlg = { data: { - dictTypeId: "", - code: "", - name: "", - parentId: "", - parentName: "", - status: "", - description: "", - createTime: "", - updateTime: "", - createUser: "", - updateUser: "" + dictParentId: "-1", + parentName: "顶级" } }; @@ -41,8 +32,8 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { //父级字典时 $('#parentName').click(function () { var formName = encodeURIComponent("parent.DictInfoDlg.data.parentName"); - var formId = encodeURIComponent("parent.DictInfoDlg.data.parentId"); - var treeUrl = encodeURIComponent("/dict/zTree?dictTypeId=" + $("#dictTypeId").val()); + var formId = encodeURIComponent("parent.DictInfoDlg.data.dictParentId"); + var treeUrl = encodeURIComponent("/dict/zTree?dictTypeCode=" + $("#dictTypeCode").val()); layer.open({ type: 2, @@ -50,7 +41,7 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { area: ['300px', '400px'], content: Feng.ctxPath + '/view/common/tree?formName=' + formName + "&formId=" + formId + "&treeUrl=" + treeUrl, end: function () { - $("#dictParentId").val(DictInfoDlg.data.parentId); + $("#dictParentId").val(DictInfoDlg.data.dictParentId); $("#parentName").val(DictInfoDlg.data.parentName); } }); diff --git a/src/main/webapp/assets/modular/system/dict/dict_edit.js b/src/main/webapp/assets/modular/system/dict/dict_edit.js index ffd692e6..90810a1f 100644 --- a/src/main/webapp/assets/modular/system/dict/dict_edit.js +++ b/src/main/webapp/assets/modular/system/dict/dict_edit.js @@ -3,61 +3,53 @@ */ var DictInfoDlg = { data: { - dictTypeId: "", - code: "", - name: "", - parentId: "", - status: "", - description: "", - createTime: "", - updateTime: "", - createUser: "", - updateUser: "" + dictParentId: "-1", + parentName: "顶级" } }; -layui.use(['form', 'admin'], function () { +layui.use(['form', 'admin', 'HttpRequest'], function () { var $ = layui.jquery; var form = layui.form; var admin = layui.admin; + var HttpRequest = layui.HttpRequest; //获取详情信息,填充表单 - // var ajax = new $ax(Feng.ctxPath + "/dict/detail?dictId=" + Feng.getUrlParam("dictId")); - // var result = ajax.start(); - // form.val('dictForm', result.data); + var request = new HttpRequest(Feng.ctxPath + "/dict/getDictDetail?dictId=" + Feng.getUrlParam("dictId"), 'get', function (result) { + form.val('dictForm', result.data); + }, function (data) { + Feng.error("加载失败!" + data.message); + }); + request.start(); //表单提交事件 form.on('submit(btnSubmit)', function (data) { - // var ajax = new $ax(Feng.ctxPath + "/dict/editItem", function (data) { - // Feng.success("更新成功!"); + var request = new HttpRequest(Feng.ctxPath + "/dict/updateDict", 'post', function (data) { + admin.closeThisDialog(); + Feng.success("更新成功!"); + admin.putTempData('formOk', true); + }, function (data) { + admin.closeThisDialog(); + Feng.error("更新失败!" + data.message); + }); - // //传给上个页面,刷新table用 - // admin.putTempData('formOk', true); - - // //关掉对话框 - // admin.closeThisDialog(); - - // }, function (data) { - // Feng.error("更新失败!" + data.responseJSON.message) - // }); - // ajax.set(data.field); - // ajax.start(); - // return false; + request.set(data.field); + request.start(true); }); //父级字典时 $('#parentName').click(function () { var formName = encodeURIComponent("parent.DictInfoDlg.data.parentName"); - var formId = encodeURIComponent("parent.DictInfoDlg.data.parentId"); - var treeUrl = encodeURIComponent("/dict/ztree?dictTypeId=" + $("#dictTypeId").val() + "&dictId=" + $("#dictId").val()); + var formId = encodeURIComponent("parent.DictInfoDlg.data.dictParentId"); + var treeUrl = encodeURIComponent("/dict/zTree?dictTypeCode=" + $("#dictTypeCode").val() + "&dictId=" + $("#dictId").val()); layer.open({ type: 2, title: '父级字典', area: ['300px', '400px'], - content: Feng.ctxPath + '/system/commonTree?formName=' + formName + "&formId=" + formId + "&treeUrl=" + treeUrl, + content: Feng.ctxPath + '/view/common/tree?formName=' + formName + "&formId=" + formId + "&treeUrl=" + treeUrl, end: function () { - $("#parentId").val(DictInfoDlg.data.parentId); + $("#dictParentId").val(DictInfoDlg.data.dictParentId); $("#parentName").val(DictInfoDlg.data.parentName); } }); diff --git a/src/main/webapp/assets/modular/system/dictType/dictType.js b/src/main/webapp/assets/modular/system/dictType/dictType.js index dbd826fc..769279e8 100644 --- a/src/main/webapp/assets/modular/system/dictType/dictType.js +++ b/src/main/webapp/assets/modular/system/dictType/dictType.js @@ -21,7 +21,7 @@ layui.use(['table', 'func', 'HttpRequest', 'form'], function () { {field: 'dictTypeId', hide: true, title: '字典类型id'}, { field: 'dictTypeName', align: "center", sort: true, title: '类型名称', templet: function (d) { - var url = Feng.ctxPath + '/dict?dictTypeId=' + d.dictTypeId; + var url = Feng.ctxPath + '/view/dict?dictTypeId=' + d.dictTypeId; return '' + d.dictTypeName + ''; } }, @@ -63,7 +63,7 @@ layui.use(['table', 'func', 'HttpRequest', 'form'], function () { func.open({ height: 700, title: '添加字典类型', - content: Feng.ctxPath + '/dictType/addView', + content: Feng.ctxPath + '/view/dictType/addView', tableId: DictType.tableId }); }; @@ -77,7 +77,7 @@ layui.use(['table', 'func', 'HttpRequest', 'form'], function () { func.open({ height: 700, title: '修改字典类型', - content: Feng.ctxPath + '/dictType/editView?dictTypeId=' + data.dictTypeId, + content: Feng.ctxPath + '/view/dictType/editView?dictTypeId=' + data.dictTypeId, tableId: DictType.tableId }); }; @@ -115,7 +115,7 @@ layui.use(['table', 'func', 'HttpRequest', 'form'], function () { Feng.success("修改成功!"); }, function (data) { table.reload(DictType.tableId); - Feng.error("修改失败!" + data.responseJSON.message); + Feng.error("修改失败!" + data.message); }); httpRequest.set({"dictTypeId": dictTypeId, "statusFlag": checked}); httpRequest.start(true); diff --git a/src/main/webapp/assets/modular/system/dictType/dictType_edit.js b/src/main/webapp/assets/modular/system/dictType/dictType_edit.js index 252887a9..7aad296d 100644 --- a/src/main/webapp/assets/modular/system/dictType/dictType_edit.js +++ b/src/main/webapp/assets/modular/system/dictType/dictType_edit.js @@ -11,7 +11,7 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { } form.val('dictTypeForm', result.data); }, function (data) { - Feng.error("添加失败!" + data.message); + Feng.error("加载失败!" + data.message); }); request.start(); diff --git a/src/main/webapp/pages/modular/system/dict/dict.html b/src/main/webapp/pages/modular/system/dict/dict.html index b5ee5f07..86ea5787 100644 --- a/src/main/webapp/pages/modular/system/dict/dict.html +++ b/src/main/webapp/pages/modular/system/dict/dict.html @@ -34,4 +34,5 @@ 修改 删除 + @} \ No newline at end of file diff --git a/src/main/webapp/pages/modular/system/dict/dict_add.html b/src/main/webapp/pages/modular/system/dict/dict_add.html index 19c161af..d9503be7 100644 --- a/src/main/webapp/pages/modular/system/dict/dict_add.html +++ b/src/main/webapp/pages/modular/system/dict/dict_add.html @@ -36,13 +36,7 @@
- -
-
-
- -
- +
diff --git a/src/main/webapp/pages/modular/system/dict/dict_edit.html b/src/main/webapp/pages/modular/system/dict/dict_edit.html index f53b2369..c93fb215 100644 --- a/src/main/webapp/pages/modular/system/dict/dict_edit.html +++ b/src/main/webapp/pages/modular/system/dict/dict_edit.html @@ -10,7 +10,7 @@
- +
@@ -18,32 +18,26 @@
- +
- +
- +
- -
-
-
- -
- +