From 6167f28734148e7c39a0ef8159a9b62fbe727b4a Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 15 Dec 2025 15:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AE=9E=E5=90=8D=E5=88=B6-?= =?UTF-8?q?=E6=96=BD=E5=B7=A5=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smz-web/js/work/basic/commonProblemList.js | 12 +- .../js/work/sysMag/UserOperationHistory.js | 108 +-- smz-web/js/work/sysMag/user.js | 58 +- smz-web/js/work/sysMag/userHistory.js | 4 +- smz-web/pages/menu/addMenu.html | 39 +- smz-web/pages/menu/menuList.html | 82 ++- smz-web/pages/menu/updateMenu.html | 53 +- smz-web/pages/role/addRole.html | 680 +++++++++--------- smz-web/pages/role/roleList.html | 85 ++- .../pages/work/basic/commonProblemForm.html | 4 +- .../pages/work/basic/commonProblemList.html | 32 +- smz-web/pages/work/sysMag/UserHistory.html | 4 +- .../work/sysMag/UserOperationHistory.html | 35 +- smz-web/pages/work/sysMag/addUser.html | 26 +- smz-web/pages/work/sysMag/facePhotoForm.html | 6 +- smz-web/pages/work/sysMag/updateUser.html | 53 +- smz-web/pages/work/sysMag/userList.html | 21 +- 17 files changed, 724 insertions(+), 578 deletions(-) diff --git a/smz-web/js/work/basic/commonProblemList.js b/smz-web/js/work/basic/commonProblemList.js index 415b3cf..80573b9 100644 --- a/smz-web/js/work/basic/commonProblemList.js +++ b/smz-web/js/work/basic/commonProblemList.js @@ -138,8 +138,8 @@ function init() { * 新增页面 * */ function addCommonProblem() { - var height = '525px'; - var width = '925px'; + var height = '75%'; + var width = '75%'; var index = layer.open({ title: ['新增','color:#3B70A1;background-color:#E8ECEB;font-size:20px'], type: 2, @@ -172,7 +172,7 @@ function buttonEdits(id, permission, pers) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); } @@ -187,8 +187,8 @@ function edit(id) { data: {"id": id}, dataType: 'json', success: function (data) { - var height = '85%'; - var width = '85%'; + var height = '75%'; + var width = '75%'; var index = layer.open({ title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], type: 2, @@ -222,7 +222,7 @@ function buttonDel(id,permission, pers) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); diff --git a/smz-web/js/work/sysMag/UserOperationHistory.js b/smz-web/js/work/sysMag/UserOperationHistory.js index 7f8ad75..67d0424 100644 --- a/smz-web/js/work/sysMag/UserOperationHistory.js +++ b/smz-web/js/work/sysMag/UserOperationHistory.js @@ -8,94 +8,22 @@ layui.use(['laydate','form','layer'], function () { var laydate = layui.laydate; pers = checkPermission(); - var minListDate = $('#hidMinListDate').val();//最小可选时间,例:1990-02-01 - var maxListDate = $('#hidMaxListDate').val();//最大可选时间,例:2200-12-31 - $('#startTime').val(getNowTime()); - $('#endTime').val(getNowTime()); - var begin = "#startTime", end = "#endTime";//开始时间选择框、结束时间选择框:文本框 - var endChange = function (val, date) { - if (date && date.year) - begindate.config.max = { - year: date.year, - month: date.month - 1,//必须减1才是正确值 - date: date.date, - hours: date.hours, - minutes: date.minutes, - seconds: date.seconds - }; - else { - var dateInit = new Date(maxListDate.replace(/-/g, "/")); - begindate.config.max = { - year: dateInit.getFullYear(), - month: dateInit.getMonth(), - date: dateInit.getDate(), - hours: dateInit.getHours(), - minutes: dateInit.getMinutes(), - seconds: dateInit.getSeconds() - }; - } - }; - var beginChange = function (val, date) { - if (date && date.year) - enddate.config.min = { - year: date.year, - month: date.month - 1, - date: date.date, - hours: date.hours, - minutes: date.minutes, - seconds: date.seconds - }; - else { - var dateInit = new Date(minListDate.replace(/-/g, "/")); - enddate.config.min = { - year: dateInit.getFullYear(), - month: dateInit.getMonth(), - date: dateInit.getDate(), - hours: dateInit.getHours(), - minutes: dateInit.getMinutes(), - seconds: dateInit.getSeconds() - }; - } - }; - var enddate = laydate.render({ - elem: end, - format: 'yyyy-MM-dd', - min: minListDate, - max: maxListDate, - done: endChange - }); - var begindate = laydate.render({ - elem: begin, - format: 'yyyy-MM-dd', - min: minListDate, - max: maxListDate, - done: beginChange - }); - $("#searchBt").click(function () { - var startTime = $("#startTime").val(); - var endTime = $("#endTime").val(); - var dateStart = new Date(startTime); - var dateEnd = new Date(endTime); - var difValue = (dateEnd - dateStart) / (1000 * 60 * 60 * 24); - if ((startTime == '' && endTime != '') || (startTime != '' && endTime == '')) { - return top.layer.msg('时间填写不完整', { - icon: 2, - time: 2000 //2秒关闭(如果不配置,默认是3秒) - }); - } - var startDateTemp = startTime.split("-"); - var endDateTemp = endTime.split("-"); - var allStartDate = new Date(startDateTemp[0], startDateTemp[1], startDateTemp[2]); - var allEndDate = new Date(endDateTemp[0], endDateTemp[1], endDateTemp[2]); - if (allStartDate.getTime() > allEndDate.getTime()) { - return top.layer.msg('时间选择不合理,请重新选择', { - icon: 2, - time: 2000 //2秒关闭(如果不配置,默认是3秒) - }); - } + var today = getNowTime(); // 假设你的 getNowTime() 返回 'yyyy-MM-dd' 格式 + $('#test6').val(today + ' - ' + today); + laydate.render({ + elem: '#test6', + range: true, + min: $('#hidMinListDate').val(), + max: $('#hidMaxListDate').val() }); + init(); + $("#searchBt").click(function () { + var dateRange = $.trim($('#test6').val()); + if (!dateRange) { + return layer.msg('请选择日期范围', { icon: 2, time: 2000 }); + } example.ajax.reload(); }); }); @@ -124,10 +52,14 @@ function init() { "url": smz_ht_url + "/userHistory/operationLog", "type": "post", "data": function (d) { + var dateRange = $.trim($('#test6').val()); + var parts = dateRange.split(' - '); + var startTime = parts[0]; + var endTime = parts[1]; d.module = $("#module").val(); d.keyWord = $("#keyWord").val().trim();//关键字部分,查询功能 - d.startTime = $("#startTime").val(); - d.endTime = $("#endTime").val(); + d.startTime = startTime; + d.endTime = endTime; }, "error": function (xhr, textStatus, errorThrown) { var msg = xhr.responseText; @@ -254,4 +186,4 @@ function getPartialRemarksHtml(remarks){ //全部备注信息 function getTotalRemarksHtml(remarks){ return remarks + ' 收起'; -} \ No newline at end of file +} diff --git a/smz-web/js/work/sysMag/user.js b/smz-web/js/work/sysMag/user.js index a27de0d..1ccede8 100644 --- a/smz-web/js/work/sysMag/user.js +++ b/smz-web/js/work/sysMag/user.js @@ -51,19 +51,23 @@ var example; // 新增 function adds(){ listUser(); - location.href = "addUser.html"; + var height = '75%'; + var width = '75%'; + var index = layer.open({ + title: ['新增', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], + type: 2, + content: 'addUser.html', + area: [width, height], + maxmin: false, + }); } function listUser() { - // var orgIdUser = $("#orgId").val(); var proIdUser = $("#proId").val(); var examineStatusUser = $("#examineStatus").val(); var usernameUser = $("#username").val(); var phoneUser = $("#phone").val(); var keyWordUser = $("#keyWord").val(); - - - // localStorage.setItem("orgIdUser",orgIdUser); localStorage.setItem("proIdUser",proIdUser); localStorage.setItem("examineStatusUser",examineStatusUser); localStorage.setItem("usernameUser",usernameUser); @@ -281,15 +285,15 @@ function init() { }else{ if (examineStatus == 0) { var audit = buttonAudit(id,phone,userName, "", pers); - var href = encodeURI("updateUser.html?id=" + id + "&status=" + status + "&proId=" + proId + "&proName=" + proName + "&companyName=" +companyName); - var edit = buttonEdit(href, "", pers); + // var href = encodeURI("updateUser.html?id=" + id + "&status=" + status + "&proId=" + proId + "&proName=" + proName + "&companyName=" +companyName); + var edit = buttonEdit(id, "", pers); var del = buttonDel(id, "", pers); var update = buttonEdits(id, "sys:user:password", pers); var updatePhone = buttonEditsUser(id, "sys:user:admin", pers); return audit + edit + del + update + updatePhone; }else if (examineStatus == 1) { - var href = encodeURI("updateUser.html?id=" + id + "&status=" + status + "&proId=" + proId + "&proName=" + proName +"&companyName=" +companyName); - var edit = buttonEdit(href, "", pers); + // var href = encodeURI("updateUser.html?id=" + id + "&status=" + status + "&proId=" + proId + "&proName=" + proName +"&companyName=" +companyName); + var edit = buttonEdit(id, "", pers); var del = buttonDel(id, "", pers); var update = buttonEdits(id, "sys:user:password", pers); var updatePhone = buttonEditsUser(id, "sys:user:admin", pers); @@ -313,7 +317,7 @@ function buttonAudit(id,phone,userName, permission, pers) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); } @@ -324,8 +328,8 @@ function audit(id,phone,userName) { localStorage.setItem("id",id) localStorage.setItem("phone",phone) localStorage.setItem("userName",userName) - var height = '100%'; - var width = '100%'; + var height = '75%'; + var width = '75%'; var index = layer.open({ title: ['审核', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], type: 2, @@ -388,25 +392,35 @@ function buttonDel(id, permission, pers){ return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); } // 修改按钮 -function buttonEdit(href, permission, pers){ +function buttonEdit(id, permission, pers){ if(permission != ""){ if ($.inArray(permission, pers) < 0) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); } -function update(href){ +function update(id){ listUser(); - window.location=href; + localStorage.setItem("editId",id) + var height = '75%'; + var width = '75%'; + var index = layer.open({ + title: ['编辑', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], + type: 2, + content: 'updateUser.html', + area: [width, height], + maxmin: false, + }); + } // 密码按钮 @@ -416,7 +430,7 @@ function buttonEdits(id, permission, pers) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); } //照片查看 @@ -432,8 +446,8 @@ function photoView(id) { localStorage.setItem("collectTime", data.collectTime); localStorage.setItem("userName", data.userName); localStorage.setItem("phone", data.phone); - var height = '585px'; - var width = '675px'; + var height = '75%'; + var width = '75%'; var index = layer.open({ title: ['查看图片','color:#3B70A1;background-color:#E8ECEB;font-size:20px'], type: 2, @@ -479,7 +493,7 @@ function buttonEditsUser(id, permission, pers) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); } @@ -558,4 +572,4 @@ function getProjectUser() { form.render(); } }) -} \ No newline at end of file +} diff --git a/smz-web/js/work/sysMag/userHistory.js b/smz-web/js/work/sysMag/userHistory.js index bb8f82e..2cb1107 100644 --- a/smz-web/js/work/sysMag/userHistory.js +++ b/smz-web/js/work/sysMag/userHistory.js @@ -143,6 +143,6 @@ function buttonDel(data, permission, pers) { return ""; } } - var btn = $(""); + var btn = $(""); return btn.prop("outerHTML"); -} \ No newline at end of file +} diff --git a/smz-web/pages/menu/addMenu.html b/smz-web/pages/menu/addMenu.html index 7baadbf..29ec49b 100644 --- a/smz-web/pages/menu/addMenu.html +++ b/smz-web/pages/menu/addMenu.html @@ -4,9 +4,12 @@ + -
-