|
@@ -15,9 +15,9 @@ let passwordComplexity = getCookie('passwordComplexity')
|
|
const modalDom = `
|
|
const modalDom = `
|
|
<p class="tips"><img src=${WarningIcon} /><span>为确保账号安全,请及时修改初始密码</span></p>
|
|
<p class="tips"><img src=${WarningIcon} /><span>为确保账号安全,请及时修改初始密码</span></p>
|
|
<div class="modalAction">
|
|
<div class="modalAction">
|
|
- <p><span>原密码:</span><input type="password" placeholder="请输入原密码" class="oldword" id="oldWord" autocomplete="off"><img class="eye" src=${closeEye} /><p class="oldWaring warning"><img src=${warnIcon} /><b>原密码错误</b></p></p>
|
|
|
|
- <p><span>新密码:</span><input type="password" disabled placeholder="请输入新密码" class="newword" id="newWord" autocomplete="off"><img class="eye" src=${closeEye} /><p class="newword warning"><img src=${warnIcon} /><b>密码最多12位</b></p></p>
|
|
|
|
- <p><span>确认新密码:</span><input type="password" disabled placeholder="请输入确认新密码" class="sureword" id="sureWord" autocomplete="off"><img class="eye" src=${closeEye} /><p class="sureword warning"><img src=${warnIcon} /><b>两次密码输入不一致</b></p></p>
|
|
|
|
|
|
+ <p><span class="label"><i>*</i>原密码:</span><input type="password" placeholder="请输入原密码" class="oldword" id="oldWord" autocomplete="off"><img class="eye" src=${closeEye} /><p class="oldWaring warning"><img src=${warnIcon} /><b>原密码错误</b></p></p>
|
|
|
|
+ <p><span class="label"><i>*</i>新密码:</span><input type="password" disabled placeholder="请输入新密码" class="newword" id="newWord" autocomplete="off"><img class="eye" src=${closeEye} /><p class="newword warning"><img src=${warnIcon} /><b>密码最多12位</b></p></p>
|
|
|
|
+ <p><span class="label"><i>*</i>确认新密码:</span><input type="password" disabled placeholder="请输入确认新密码" class="sureword" id="sureWord" autocomplete="off"><img class="eye" src=${closeEye} /><p class="sureword warning"><img src=${warnIcon} /><b>两次密码输入不一致</b></p></p>
|
|
</div>
|
|
</div>
|
|
`;
|
|
`;
|
|
const psdChecker = `<div class="psd-checkbox">
|
|
const psdChecker = `<div class="psd-checkbox">
|
|
@@ -40,7 +40,7 @@ $(function () {
|
|
quiteBtn: true,
|
|
quiteBtn: true,
|
|
title: "修改密码",
|
|
title: "修改密码",
|
|
type: "modal",
|
|
type: "modal",
|
|
- width: '450',
|
|
|
|
|
|
+ width: '470',
|
|
time: '1000',
|
|
time: '1000',
|
|
sureText: '保存',
|
|
sureText: '保存',
|
|
message: modalDom});
|
|
message: modalDom});
|
|
@@ -61,11 +61,11 @@ $(function () {
|
|
$(this).css("color", "#777777")
|
|
$(this).css("color", "#777777")
|
|
})
|
|
})
|
|
if (isPlacefile == 0) {
|
|
if (isPlacefile == 0) {
|
|
- $(this).find('i').html('切换病案质控')
|
|
|
|
|
|
+ $('.qiehuan i').html('切换病案质控')
|
|
$('.subtitle').html('AI运行质控平台')
|
|
$('.subtitle').html('AI运行质控平台')
|
|
getMenu()
|
|
getMenu()
|
|
} else if (isPlacefile == 1) {
|
|
} else if (isPlacefile == 1) {
|
|
- $(this).find('i').html('切换运行质控')
|
|
|
|
|
|
+ $('.qiehuan i').html('切换运行质控')
|
|
$('.subtitle').html('AI病案质控平台')
|
|
$('.subtitle').html('AI病案质控平台')
|
|
getMenu()
|
|
getMenu()
|
|
}
|
|
}
|
|
@@ -112,14 +112,21 @@ function bindModalEvent(){
|
|
})
|
|
})
|
|
$("#oldWord").off("input").on("input",function(){
|
|
$("#oldWord").off("input").on("input",function(){
|
|
const text = $(this).val();
|
|
const text = $(this).val();
|
|
|
|
+ if($(".oldWaring.warning:visible").length){//有修改则隐藏报错
|
|
|
|
+ $(".oldWaring.warning").hide();
|
|
|
|
+ if(!$(".waring:visible").length){ //无报错则激活保存按钮
|
|
|
|
+ $(".alertModal .sureChange").addClass("active");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if(text.trim()){
|
|
if(text.trim()){
|
|
$("#newWord").attr("disabled",false);
|
|
$("#newWord").attr("disabled",false);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
$("#newWord").off("input").on("input",function(){
|
|
$("#newWord").off("input").on("input",function(){
|
|
const text = $(this).val();
|
|
const text = $(this).val();
|
|
|
|
+ const checker = $(".alertModal .psd-checkbox");
|
|
if(text.trim()){ //显示密码验证标签
|
|
if(text.trim()){ //显示密码验证标签
|
|
- const checker = $(".alertModal .psd-checkbox");
|
|
|
|
if(checker.length){
|
|
if(checker.length){
|
|
checker.show()
|
|
checker.show()
|
|
}else{
|
|
}else{
|
|
@@ -129,18 +136,22 @@ function bindModalEvent(){
|
|
let psdsOk=false;
|
|
let psdsOk=false;
|
|
if(psdOk){
|
|
if(psdOk){
|
|
$("#sureWord").attr("disabled",false);
|
|
$("#sureWord").attr("disabled",false);
|
|
- psdsOk = verifyPsdPart($("#oldWord").val(),$("#newWord").val(),$("#sureWord").val());
|
|
|
|
}
|
|
}
|
|
|
|
+ psdsOk = verifyPsdPart();
|
|
if(psdsOk){
|
|
if(psdsOk){
|
|
//保存按钮启用
|
|
//保存按钮启用
|
|
- $(".sureChange .sureChange").addClass("active");
|
|
|
|
|
|
+ $(".alertModal .sureChange").addClass("active");
|
|
|
|
+ }else{
|
|
|
|
+ $(".alertModal .sureChange").removeClass("active");
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ checker.hide()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
$("#sureWord").off("input").on("input",function(){
|
|
$("#sureWord").off("input").on("input",function(){
|
|
const text = $(this).val();
|
|
const text = $(this).val();
|
|
- if(text.trim()){ //显示密码验证标签
|
|
|
|
- let psdsOk=verifyPsdPart($("#oldWord").val(),$("#newWord").val(),$("#sureWord").val());
|
|
|
|
|
|
+ if(text.trim()){
|
|
|
|
+ let psdsOk=verifyPsdPart();
|
|
if(psdsOk){
|
|
if(psdsOk){
|
|
//保存按钮启用
|
|
//保存按钮启用
|
|
$(".alertModal .sureChange").addClass("active");
|
|
$(".alertModal .sureChange").addClass("active");
|
|
@@ -190,7 +201,10 @@ function verifyPsd(text){console.log(text)
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
-function verifyPsdPart(oldP,newP,confirmP){ //验证各密码关系规则
|
|
|
|
|
|
+function verifyPsdPart(){ //验证各密码关系规则
|
|
|
|
+ const oldP = $("#oldWord").val();
|
|
|
|
+ const newP = $("#newWord").val();
|
|
|
|
+ const confirmP = $("#sureWord").val()
|
|
if(oldP.trim()===newP.trim()){
|
|
if(oldP.trim()===newP.trim()){
|
|
$(".newword b").text("原密码和新密码不能相同");
|
|
$(".newword b").text("原密码和新密码不能相同");
|
|
$(".newword").show();
|
|
$(".newword").show();
|
|
@@ -201,7 +215,7 @@ function verifyPsdPart(oldP,newP,confirmP){ //验证各密码关系规则
|
|
$(".sureword").show();
|
|
$(".sureword").show();
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- $(".warning").hide();
|
|
|
|
|
|
+ $(".newword.warning,.sureword.warning").hide();
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -398,6 +412,7 @@ function changeWord(oldword, newword) {
|
|
} else {
|
|
} else {
|
|
$(".oldWaring b").text(data.msg);
|
|
$(".oldWaring b").text(data.msg);
|
|
$(".oldWaring").show();
|
|
$(".oldWaring").show();
|
|
|
|
+ $(".alertModal .sureChange").removeClass("active");
|
|
return
|
|
return
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -418,7 +433,7 @@ $("#changeWord").click(function (e) {
|
|
quiteBtn: true,
|
|
quiteBtn: true,
|
|
title: "修改密码",
|
|
title: "修改密码",
|
|
type: "modal",
|
|
type: "modal",
|
|
- width: '450',
|
|
|
|
|
|
+ width: '470',
|
|
time: '1000',
|
|
time: '1000',
|
|
sureText: '保存',
|
|
sureText: '保存',
|
|
message: modalDom});
|
|
message: modalDom});
|