From 551ddc669ad152a4c8bb70a84b5a5027a52959bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Fri, 14 Oct 2022 01:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jlw/web/query/UniversitySystemQuery.java | 8 +- .../static/js/jlw/universityFaculty/index.js | 250 +++++++++--------- .../static/js/jlw/universitySystem/index.js | 234 ++++++++-------- .../templates/jlw/universityFaculty/add.html | 88 +++--- .../jlw/universityFaculty/index.html | 16 +- .../templates/jlw/universitySystem/add.html | 90 ++++--- .../templates/jlw/universitySystem/index.html | 44 ++- 7 files changed, 392 insertions(+), 338 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/web/query/UniversitySystemQuery.java b/web/src/main/java/com/ibeetl/jlw/web/query/UniversitySystemQuery.java index 188bbbf8..5151e563 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/query/UniversitySystemQuery.java +++ b/web/src/main/java/com/ibeetl/jlw/web/query/UniversitySystemQuery.java @@ -17,16 +17,16 @@ public class UniversitySystemQuery extends PageParam { @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class) @Query(name = "专业ID", display = false) private Long universitySystemId; - @Query(name = "专业名称", display = true) + @Query(name = "专业名称", display = false) private String universitySystemName; - @Query(name = "联系人", display = true) + @Query(name = "联系人", display = false) private String universitySystemContact; - @Query(name = "联系人电话", display = true) + @Query(name = "联系人电话", display = false) private String universitySystemContactTel; @Query(name = "创建时间", display = false) private Date universitySystemAddTime; // @Query(name = "状态 (1正常 2删除)", display = true,type=Query.TYPE_DICT,dict="global_status") - @Query(name = "状态", display = true,type=Query.TYPE_DICT,dict=GLOBAL_STATUS) + @Query(name = "状态", display = false,type=Query.TYPE_DICT,dict=GLOBAL_STATUS) private Integer universitySystemStatus; // @Query(name = "院系ID(学院ID)", display = false) @Query(name = "院系ID", display = false) diff --git a/web/src/main/resources/static/js/jlw/universityFaculty/index.js b/web/src/main/resources/static/js/jlw/universityFaculty/index.js index 1d5775ba..beb2ad74 100644 --- a/web/src/main/resources/static/js/jlw/universityFaculty/index.js +++ b/web/src/main/resources/static/js/jlw/universityFaculty/index.js @@ -1,151 +1,155 @@ -layui.define([ 'form', 'laydate', 'table' ], function(exports) { +layui.define(['form', 'laydate', 'table'], function (exports) { var form = layui.form; var laydate = layui.laydate; var table = layui.table; var universityFacultyTable = null; - var view ={ - init:function(){ + var view = { + init: function () { this.initTable(); this.initSearchForm(); this.initToolBar(); - window.dataReload = function(){ - Lib.doSearchForm($("#searchForm"),universityFacultyTable) + window.dataReload = function () { + Lib.doSearchForm($("#searchForm"), universityFacultyTable) } }, - initTable:function(){ - var sx_ = localStorage.getItem("universityFacultyTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存 - if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);} + initTable: function () { + var sx_ = localStorage.getItem("universityFacultyTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存 + if ($.isEmpty(sx_)) { + sx_ = {}; + } else { + sx_ = JSON.parse(sx_); + } universityFacultyTable = table.render({ - elem : '#universityFacultyTable', - height : Lib.getTableHeight(1), + elem: '#universityFacultyTable', + height: Lib.getTableHeight(1), cellMinWidth: 100, - method : 'post', - url : Common.ctxPath + '/jlw/universityFaculty/list.json' // 数据接口 - ,page : Lib.tablePage // 开启分页 - ,toolbar: '#toolbar_universityFaculty' //自定义头部左侧工具栏 - ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏 - ,limit : 10, - cols : [ [ // 表头 - { - type : 'checkbox', + method: 'post', + url: Common.ctxPath + '/jlw/universityFaculty/list.json' // 数据接口 + , page: Lib.tablePage // 开启分页 + /*,toolbar: '#toolbar_universityFaculty' //自定义头部左侧工具栏 + ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/ + , limit: 10, + cols: [[ // 表头 + /*{ + type: 'checkbox', + },*/ + { + field: 'universityFacultyId', + // title : '院系ID(学院ID)', + title: '院系ID', + align: "center", + hideField: false, + hide: true,/*$.isEmpty(sx_['universityFacultyId']) ? false : sx_['universityFacultyId'],*/ + width: 60, + }, + { + field: 'universitiesCollegesIdText', + title: '院校名称', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universitiesCollegesIdText']) ? false : sx_['universitiesCollegesIdText'], + }, + { + field: 'universityFacultyName', + title: '院系名称', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universityFacultyName']) ? false : sx_['universityFacultyName'], + }, + { + field: 'universityFacultyContact', + title: '联系人', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universityFacultyContact']) ? false : sx_['universityFacultyContact'], + }, + { + field: 'universityFacultyContactTel', + title: '联系人电话', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universityFacultyContactTel']) ? false : sx_['universityFacultyContactTel'], + }, + { + field: 'universityFacultyContactAddress', + title: '联系人地址', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universityFacultyContactAddress']) ? false : sx_['universityFacultyContactAddress'], }, - { - field : 'universityFacultyId', - // title : '院系ID(学院ID)', - title : '院系ID', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyId'])?false:sx_['universityFacultyId'], - width : 60, - }, - { - field : 'universityFacultyName', - title : '院系名称', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyName'])?false:sx_['universityFacultyName'], - }, - { - field : 'universityFacultyContact', - title : '联系人', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyContact'])?false:sx_['universityFacultyContact'], - }, - { - field : 'universityFacultyContactTel', - title : '联系人电话', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyContactTel'])?false:sx_['universityFacultyContactTel'], - }, - { - field : 'universityFacultyContactAddress', - title : '联系人地址', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyContactAddress'])?false:sx_['universityFacultyContactAddress'], - }, - { - field : 'universitiesCollegesIdText', - title : '院校名称', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitiesCollegesIdText'])?false:sx_['universitiesCollegesIdText'], - }, - { - field : 'universityFacultyStatusText', //数据字典类型为 global_status - title : '状态', - // title : '状态( 1 正常 2删除)', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyStatusText'])?false:sx_['universityFacultyStatusText'], - }, - { - field : 'universityFacultyAddTime', - title : '创建时间', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyAddTime'])?false:sx_['universityFacultyAddTime'], - }, - // { - // field : 'userId', - // title : '用户ID', - // align:"center", - // hideField :false, - // hide:$.isEmpty(sx_['userId'])?false:sx_['userId'], - // }, - // { - // field : 'orgId', - // title : '组织ID', - // align:"center", - // hideField :false, - // hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'], - // } - { - field : 'operation_',title : '操作',align:"center", templet: function (d) { - var htm = ''; - htm += ''; - return htm; + { + field: 'universityFacultyStatusText', //数据字典类型为 global_status + title: '状态', + // title : '状态( 1 正常 2删除)', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universityFacultyStatusText']) ? false : sx_['universityFacultyStatusText'], + }, + { + field: 'universityFacultyAddTime', + title: '创建时间', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universityFacultyAddTime']) ? false : sx_['universityFacultyAddTime'], + }, + // { + // field : 'userId', + // title : '用户ID', + // align:"center", + // hideField :false, + // hide:$.isEmpty(sx_['userId'])?false:sx_['userId'], + // }, + // { + // field : 'orgId', + // title : '组织ID', + // align:"center", + // hideField :false, + // hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'], + // } + { + field: 'operation_', title: '操作', align: "center", templet: function (d) { + var htm = '编辑'; + htm += '删除'; + return htm; + } } - } - ] ] + ]] - }); + }); - table.on('checkbox(universityFacultyTable)', function(obj){ + table.on('checkbox(universityFacultyTable)', function (obj) { var universityFaculty = obj.data; - if(obj.checked){ + if (obj.checked) { //按钮逻辑Lib.buttonEnable() - }else{ + } else { } }) }, - initSearchForm:function(){ - Lib.initSearchForm( $("#searchForm"),universityFacultyTable,form); + initSearchForm: function () { + Lib.initSearchForm($("#searchForm"), universityFacultyTable, form); }, - initToolBar:function(){ + initToolBar: function () { toolbar = { add: function () { var url = "/jlw/universityFaculty/add.do"; - Common.openDlg(url,"院系管理管理>新增"); + Common.openDlg(url, "院系管理管理>新增"); }, edit: function () { - var data = Common.getOneFromTable(table,"universityFacultyTable"); - if(data==null){ - return ; + var data = Common.getOneFromTable(table, "universityFacultyTable"); + if (data == null) { + return; } - var url = "/jlw/universityFaculty/add.do?universityFacultyId="+data.universityFacultyId; - Common.openDlg(url,"院系管理管理>"+data.universityFacultyId+">编辑"); + var url = "/jlw/universityFaculty/add.do?universityFacultyId=" + data.universityFacultyId; + Common.openDlg(url, "院系管理管理>" + data.universityFacultyId + ">编辑"); }, del: function () { - layui.use(['del'], function(){ + layui.use(['del'], function () { var delView = layui.del delView.delBatch(); }); @@ -161,7 +165,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { }, } //触发事件 - $('.ext-toolbar').on('click', function() { + $('.ext-toolbar').on('click', function () { var type = $(this).data('type'); toolbar[type] ? toolbar[type].call(this) : ''; }); @@ -169,17 +173,17 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { }, initTableTool: table.on('tool(universityFacultyTable)', function (obj) { var data = obj.data; if (obj.event === 'edit') { - var url = "/jlw/universityFaculty/add.do?universityFacultyId="+data.universityFacultyId; - Common.openDlg(url,"院系管理管理>"+data.universityFacultyId+">编辑"); - }else if(obj.event === "del"){ + var url = "/jlw/universityFaculty/add.do?universityFacultyId=" + data.universityFacultyId; + Common.openDlg(url, "院系管理管理>" + data.universityFacultyId + ">编辑"); + } else if (obj.event === "del") { layer.confirm('是否确定删除该信息?', function (index) { - var ret = Common.postAjax("/jlw/universityFaculty/delete.json",{ids:data.universityFacultyId}); - layer.msg(ret.code == 0?"删除成功!":ret.msg, { + var ret = Common.postAjax("/jlw/universityFaculty/delete.json", {ids: data.universityFacultyId}); + layer.msg(ret.code == 0 ? "删除成功!" : ret.msg, { offset: ['50%'], - icon: ret.code == 0?1:2, + icon: ret.code == 0 ? 1 : 2, time: 1500 //2秒关闭(如果不配置,默认是3秒) - },function (){ - if(ret.code == 0){ + }, function () { + if (ret.code == 0) { Lib.tableRefresh(); } }); @@ -187,6 +191,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { } }) } - exports('index',view); + exports('index', view); }); diff --git a/web/src/main/resources/static/js/jlw/universitySystem/index.js b/web/src/main/resources/static/js/jlw/universitySystem/index.js index f23520c7..6ad20acb 100644 --- a/web/src/main/resources/static/js/jlw/universitySystem/index.js +++ b/web/src/main/resources/static/js/jlw/universitySystem/index.js @@ -1,143 +1,147 @@ -layui.define([ 'form', 'laydate', 'table' ], function(exports) { +layui.define(['form', 'laydate', 'table'], function (exports) { var form = layui.form; var laydate = layui.laydate; var table = layui.table; var universitySystemTable = null; - var view ={ - init:function(){ + var view = { + init: function () { this.initTable(); this.initSearchForm(); this.initToolBar(); - window.dataReload = function(){ - Lib.doSearchForm($("#searchForm"),universitySystemTable) + window.dataReload = function () { + Lib.doSearchForm($("#searchForm"), universitySystemTable) } }, - initTable:function(){ - var sx_ = localStorage.getItem("universitySystemTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存 - if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);} + initTable: function () { + var sx_ = localStorage.getItem("universitySystemTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存 + if ($.isEmpty(sx_)) { + sx_ = {}; + } else { + sx_ = JSON.parse(sx_); + } universitySystemTable = table.render({ - elem : '#universitySystemTable', - height : Lib.getTableHeight(1), + elem: '#universitySystemTable', + height: Lib.getTableHeight(1), cellMinWidth: 100, - method : 'post', - url : Common.ctxPath + '/jlw/universitySystem/list.json' // 数据接口 - ,page : Lib.tablePage // 开启分页 - ,toolbar: '#toolbar_universitySystem' //自定义头部左侧工具栏 - ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏 - ,limit : 10, - cols : [ [ // 表头 - { - type : 'checkbox', + method: 'post', + url: Common.ctxPath + '/jlw/universitySystem/list.json' // 数据接口 + , page: Lib.tablePage // 开启分页 + /*, toolbar: '#toolbar_universitySystem' //自定义头部左侧工具栏 + , defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/ + , limit: 10, + cols: [[ // 表头 + /*{ + type: 'checkbox', + },*/ + { + field: 'universitySystemId', + title: '专业ID', + align: "center", + hideField: false, + hide: true,/*$.isEmpty(sx_['universitySystemId']) ? false : sx_['universitySystemId'],*/ + width: 60, + }, + { + field : 'universityFacultyIdText', + title : '院系名称', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['universityFacultyIdText'])?false:sx_['universityFacultyIdText'], + }, + { + field: 'universitySystemName', + title: '专业名称', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universitySystemName']) ? false : sx_['universitySystemName'], + }, + { + field: 'universitySystemContact', + title: '联系人', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universitySystemContact']) ? false : sx_['universitySystemContact'], + }, + { + field: 'universitySystemContactTel', + title: '联系人电话', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universitySystemContactTel']) ? false : sx_['universitySystemContactTel'], + }, + { + field: 'universitySystemAddTime', + title: '创建时间', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universitySystemAddTime']) ? false : sx_['universitySystemAddTime'], + }, + { + field: 'universitySystemStatusText', //数据字典类型为 global_status + // title : '状态 (1正常 2删除)', + title: '状态', + align: "center", + hideField: false, + hide: $.isEmpty(sx_['universitySystemStatusText']) ? false : sx_['universitySystemStatusText'], }, - { - field : 'universitySystemId', - title : '专业ID', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitySystemId'])?false:sx_['universitySystemId'], - width : 60, - }, - { - field : 'universitySystemName', - title : '专业名称', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitySystemName'])?false:sx_['universitySystemName'], - }, - { - field : 'universitySystemContact', - title : '联系人', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitySystemContact'])?false:sx_['universitySystemContact'], - }, - { - field : 'universitySystemContactTel', - title : '联系人电话', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitySystemContactTel'])?false:sx_['universitySystemContactTel'], - }, - { - field : 'universitySystemAddTime', - title : '创建时间', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitySystemAddTime'])?false:sx_['universitySystemAddTime'], - }, - { - field : 'universitySystemStatusText', //数据字典类型为 global_status - // title : '状态 (1正常 2删除)', - title : '状态', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universitySystemStatusText'])?false:sx_['universitySystemStatusText'], - }, - { - field : 'universityFacultyIdText', - title : '院系', - align:"center", - hideField :false, - hide:$.isEmpty(sx_['universityFacultyIdText'])?false:sx_['universityFacultyIdText'], - }, - // { - // field : 'userId', - // title : '用户ID', - // align:"center", - // hideField :false, - // hide:$.isEmpty(sx_['userId'])?false:sx_['userId'], - // }, - // { - // field : 'orgId', - // title : '组织ID', - // align:"center", - // hideField :false, - // hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'], - // } - { - field : 'operation_',title : '操作',align:"center", templet: function (d) { - var htm = ''; - htm += ''; - return htm; + // { + // field : 'userId', + // title : '用户ID', + // align:"center", + // hideField :false, + // hide:$.isEmpty(sx_['userId'])?false:sx_['userId'], + // }, + // { + // field : 'orgId', + // title : '组织ID', + // align:"center", + // hideField :false, + // hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'], + // } + { + field: 'operation_', title: '操作', align: "center", templet: function (d) { + var htm = '编辑'; + htm += '删除'; + return htm; + } } - } - ] ] + ]] - }); + }); - table.on('checkbox(universitySystemTable)', function(obj){ + table.on('checkbox(universitySystemTable)', function (obj) { var universitySystem = obj.data; - if(obj.checked){ + if (obj.checked) { //按钮逻辑Lib.buttonEnable() - }else{ + } else { } }) }, - initSearchForm:function(){ - Lib.initSearchForm( $("#searchForm"),universitySystemTable,form); + initSearchForm: function () { + Lib.initSearchForm($("#searchForm"), universitySystemTable, form); }, - initToolBar:function(){ + initToolBar: function () { toolbar = { add: function () { var url = "/jlw/universitySystem/add.do"; - Common.openDlg(url,"专业管理管理>新增"); + Common.openDlg(url, "专业管理管理>新增"); }, edit: function () { - var data = Common.getOneFromTable(table,"universitySystemTable"); - if(data==null){ - return ; + var data = Common.getOneFromTable(table, "universitySystemTable"); + if (data == null) { + return; } - var url = "/jlw/universitySystem/add.do?universitySystemId="+data.universitySystemId; - Common.openDlg(url,"专业管理管理>"+data.universitySystemId+">编辑"); + var url = "/jlw/universitySystem/add.do?universitySystemId=" + data.universitySystemId; + Common.openDlg(url, "专业管理管理>" + data.universitySystemId + ">编辑"); }, del: function () { - layui.use(['del'], function(){ + layui.use(['del'], function () { var delView = layui.del delView.delBatch(); }); @@ -153,7 +157,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { }, } //触发事件 - $('.ext-toolbar').on('click', function() { + $('.ext-toolbar').on('click', function () { var type = $(this).data('type'); toolbar[type] ? toolbar[type].call(this) : ''; }); @@ -161,17 +165,17 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { }, initTableTool: table.on('tool(universitySystemTable)', function (obj) { var data = obj.data; if (obj.event === 'edit') { - var url = "/jlw/universitySystem/add.do?universitySystemId="+data.universitySystemId; - Common.openDlg(url,"专业管理管理>"+data.universitySystemId+">编辑"); - }else if(obj.event === "del"){ + var url = "/jlw/universitySystem/add.do?universitySystemId=" + data.universitySystemId; + Common.openDlg(url, "专业管理管理>" + data.universitySystemId + ">编辑"); + } else if (obj.event === "del") { layer.confirm('是否确定删除该信息?', function (index) { - var ret = Common.postAjax("/jlw/universitySystem/delete.json",{ids:data.universitySystemId}); - layer.msg(ret.code == 0?"删除成功!":ret.msg, { + var ret = Common.postAjax("/jlw/universitySystem/delete.json", {ids: data.universitySystemId}); + layer.msg(ret.code == 0 ? "删除成功!" : ret.msg, { offset: ['50%'], - icon: ret.code == 0?1:2, + icon: ret.code == 0 ? 1 : 2, time: 1500 //2秒关闭(如果不配置,默认是3秒) - },function (){ - if(ret.code == 0){ + }, function () { + if (ret.code == 0) { Lib.tableRefresh(); } }); @@ -179,6 +183,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { } }) } - exports('index',view); + exports('index', view); }); diff --git a/web/src/main/resources/templates/jlw/universityFaculty/add.html b/web/src/main/resources/templates/jlw/universityFaculty/add.html index 562e8ebf..5ce453d3 100644 --- a/web/src/main/resources/templates/jlw/universityFaculty/add.html +++ b/web/src/main/resources/templates/jlw/universityFaculty/add.html @@ -1,53 +1,65 @@ - +
-
-
-
- -
- -
+
+ +
+
+
+ +
+
-
- -
- -
+
+
+
+
+ +
+
-
- -
- -
+
+
+
+
+ +
+
-
-
-
- -
- -
+
+
+ +
+
-
- -
- -
+
+
+
+
+ +
+
- - - + + + diff --git a/web/src/main/resources/templates/jlw/universityFaculty/index.html b/web/src/main/resources/templates/jlw/universityFaculty/index.html index a96f8186..c1baaae2 100644 --- a/web/src/main/resources/templates/jlw/universityFaculty/index.html +++ b/web/src/main/resources/templates/jlw/universityFaculty/index.html @@ -15,25 +15,25 @@
- +--> diff --git a/web/src/main/resources/templates/jlw/universitySystem/index.html b/web/src/main/resources/templates/jlw/universitySystem/index.html index 73161159..7056b2fd 100644 --- a/web/src/main/resources/templates/jlw/universitySystem/index.html +++ b/web/src/main/resources/templates/jlw/universitySystem/index.html @@ -5,38 +5,60 @@ } +
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
-
+
- 添加 + 添加 + - 刷新 + 刷新 +
- +-->