From 6d8fecb5e6c410b705baf4082b3fd23c5e3214dc Mon Sep 17 00:00:00 2001 From: JIAL <2287346125@qq.com> Date: Tue, 28 Nov 2023 20:46:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 2 +- bin | 1 + .../controller/EmployeeController.java | 6 ++--- src/main/resources/backend/js/validate.js | 4 ++-- .../resources/backend/page/member/add.html | 22 +++++++++--------- .../resources/backend/page/member/list.html | 8 +++---- target/classes/backend/js/validate.js | 4 ++-- target/classes/backend/page/member/add.html | 22 +++++++++--------- target/classes/backend/page/member/list.html | 8 +++---- .../controller/EmployeeController.class | Bin 8098 -> 8146 bytes 10 files changed, 39 insertions(+), 38 deletions(-) create mode 160000 bin diff --git a/.idea/misc.xml b/.idea/misc.xml index 5c50e16..3fe3051 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + diff --git a/bin b/bin new file mode 160000 index 0000000..2329fea --- /dev/null +++ b/bin @@ -0,0 +1 @@ +Subproject commit 2329fea1f84e829d3a703c60cfd8da9014766e91 diff --git a/src/main/java/com/JIAL/FMSystem/controller/EmployeeController.java b/src/main/java/com/JIAL/FMSystem/controller/EmployeeController.java index 9171cff..c583ccb 100644 --- a/src/main/java/com/JIAL/FMSystem/controller/EmployeeController.java +++ b/src/main/java/com/JIAL/FMSystem/controller/EmployeeController.java @@ -81,8 +81,8 @@ public class EmployeeController { log.info("新增员工,员工信息:{}",employee.toString()); //设置初始密码123456,需要进行md5加密处理 - employee.setPassword(DigestUtils.md5DigestAsHex("123456".getBytes())); - + employee.setPassword(DigestUtils.md5DigestAsHex(employee.getPassword().getBytes())); + employee.setIdNumber("64222420001025301X"); //employee.setCreateTime(LocalDateTime.now()); //employee.setUpdateTime(LocalDateTime.now()); @@ -94,7 +94,7 @@ public class EmployeeController { employeeService.save(employee); - return R.success("新增员工成功"); + return R.success("新增账号成功"); } /** diff --git a/src/main/resources/backend/js/validate.js b/src/main/resources/backend/js/validate.js index fad2f64..2891cff 100644 --- a/src/main/resources/backend/js/validate.js +++ b/src/main/resources/backend/js/validate.js @@ -49,9 +49,9 @@ function checkPhone (rule, value, callback){ } -function validID (rule,value,callback) { +function checkPassword (rule,value,callback) { // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X - let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/ + let reg = /^[a-zA-Z0-9]{1,32}$/ if(value == '') { callback(new Error('请输入身份证号码')) } else if (reg.test(value)) { diff --git a/src/main/resources/backend/page/member/add.html b/src/main/resources/backend/page/member/add.html index f343c73..744aa97 100644 --- a/src/main/resources/backend/page/member/add.html +++ b/src/main/resources/backend/page/member/add.html @@ -21,16 +21,16 @@ label-width="180px" class="demo-ruleForm" > - - + + @@ -55,12 +55,12 @@ @@ -109,7 +109,7 @@ 'name': '', 'phone': '', 'sex': '男', - 'idNumber': '', + 'password': '', username: '' } } @@ -126,7 +126,7 @@ //姓名 name: [{ required: true, 'validator': checkName, 'trigger': 'blur' }], 'phone': [{ 'required': true, 'validator': checkPhone, 'trigger': 'blur' }], - 'idNumber': [{ 'required': true, 'validator': validID, 'trigger': 'blur' }] + 'password': [{ 'required': true, 'validator': checkPassword, 'trigger': 'blur' }] } } }, @@ -174,7 +174,7 @@ // 'password': '', // 'rePassword': '',/ 'sex': '男', - 'idNumber': '' + 'password': '' } } } else { diff --git a/src/main/resources/backend/page/member/list.html b/src/main/resources/backend/page/member/list.html index 546e3fd..17f8031 100644 --- a/src/main/resources/backend/page/member/list.html +++ b/src/main/resources/backend/page/member/list.html @@ -22,7 +22,7 @@
- + 添加员工 + + 添加账号
- - + + @@ -55,12 +55,12 @@ @@ -109,7 +109,7 @@ 'name': '', 'phone': '', 'sex': '男', - 'idNumber': '', + 'password': '', username: '' } } @@ -126,7 +126,7 @@ //姓名 name: [{ required: true, 'validator': checkName, 'trigger': 'blur' }], 'phone': [{ 'required': true, 'validator': checkPhone, 'trigger': 'blur' }], - 'idNumber': [{ 'required': true, 'validator': validID, 'trigger': 'blur' }] + 'password': [{ 'required': true, 'validator': checkPassword, 'trigger': 'blur' }] } } }, @@ -174,7 +174,7 @@ // 'password': '', // 'rePassword': '',/ 'sex': '男', - 'idNumber': '' + 'password': '' } } } else { diff --git a/target/classes/backend/page/member/list.html b/target/classes/backend/page/member/list.html index 546e3fd..17f8031 100644 --- a/target/classes/backend/page/member/list.html +++ b/target/classes/backend/page/member/list.html @@ -22,7 +22,7 @@
- + 添加员工 + + 添加账号
Z#4dB-~;`VXuj`xYfjM__~hUO=!5qVwHPj?|_K+`q74i z0o;dg>bT#)w@iE+56GzpMW@HaLpWrhH-N)<*uW}TOb5`1j41XC8ZdA~tfU?>a8&jm z4d56a6ZE)&@5uaJaqxtJ?-_Vf$M?nP4@BvQI-W97jvtx$F`l+S5}AgdTJX5&XL9ga zQT@4zU*I_zere!WCVq|QW$!lzerw=&0$2Xtz#mM!fEOkF;|5+b@UnpuvNR~eNdrSt z8P4nlykg*#%zrd6Ec2fX+%NN=4ZLb#M8{tY{ME!_{7uK-P5cA@?Cqe4m;Tke&NnZw zXgS&yUc-pO>v%)QzZKrZTZB3GGkVm1(QK}LJB;Cc4MrHJy@yrXb}&k=|e zK7?gDc@%lcXP*~nxKLA+N4g?|{EAEp=%f?{DMZMBi$SHLDhw-Zrnnp^)+wRrY^s)+YY5??fn!4luUWJDL}p;* zkz2QH)u~p|cuFd&BflLCHhFhZy}dLzCD5Q~suXP+h3qSWmBw@mDVl*1yC*nnOe01J z+Nup3)@@QWQ-moMcC2u$JvQVwX34Q8)~pU~^)9Dk`@v9sUbCVWnr)v7?bPScT*9;p z`vOnIKALCs-j+Yhs{-9!m$t5M+j#LsU668nLIyM0RulkKhSy1TF{)yBOB?&M-AzJr)R&+)_CwaC+iUVThHGOD?r`&J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