Browse Source

显示隐藏按钮

feature-banli
是小王呀\24601 1 year ago
parent
commit
8fac4bf10f
  1. 67
      src/views/modules/portrayal/jumin/index.vue

67
src/views/modules/portrayal/jumin/index.vue

@ -123,7 +123,7 @@
class="div-table-button--blue"
size="small"
@click="handelCLickShowCheckPassword('idCard')"
>{{ showFlagIdCardBtn ? "显示" : "隐藏" }}</el-button
>{{ showFlagnameBtn ? "显示" : "隐藏" }}</el-button
>
</div>
<div class="f-flex">
@ -154,7 +154,7 @@
class="div-table-button--blue"
size="small"
@click="handelCLickShowCheckPassword('mobile')"
>{{ showFlagMobileBtn ? "显示" : "隐藏" }}</el-button
>{{ showFlagnameBtn ? "显示" : "隐藏" }}</el-button
>
</div>
@ -629,6 +629,7 @@ import { idTypeList } from "@/js/columns/constants";
export default {
data() {
return {
clicktype:"",
showFlagnameBtn:true,
loading: false,
checkType: "edit", //editview
@ -1482,10 +1483,8 @@ export default {
const topPos = bottomElement.getBoundingClientRect().top + window.pageYOffset + topOffset;
window.scrollTo({ top: topPos, behavior: "smooth" });
},
handelCLickShowCheckPassword(type){
if (!this.showFlagnameBtn) {
if(type=="name"){
this.showFlagnameBtn = true;
this.$set(
this.resiDetailObj.baseInfoDto,
@ -1493,10 +1492,6 @@ export default {
"*" +
this.resiDetailObj.baseInfoDto.name.substr(1, this.resiDetailObj.baseInfoDto.name.length-1)
);
}
}else if(!this.showFlagMobileBtn){
if(type=="mobile"){
this.showFlagMobileBtn = true;
this.$set(
this.resiDetailObj.baseInfoDto,
"mobile",
@ -1504,9 +1499,6 @@ export default {
"****" +
this.resiDetailObj.baseInfoDto.mobile.substr(7, 4)
);
}
}else if(!this.showFlagIdCardBtn){
if(type=="idCard"){
this.showFlagIdCardBtn = true;
this.$set(
this.resiDetailObj.baseInfoDto,
@ -1515,13 +1507,12 @@ export default {
"****" +
this.resiDetailObj.baseInfoDto.idNum.substr(16, 2)
);
}
}else {
this. handelCLickShowCheckPasswordclike(type)
}
},
async handelCLickShowCheckPasswordclike(type) {
// console.log(this.showFlagnameBtn,"dsflkjdjfsk");
const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${this.resiId}`;
let parm = {
};
@ -1529,53 +1520,11 @@ export default {
if (!data) {
this.form.password = "";
this.checkType = "view";
if (type === "idCard") {
if (this.showFlagIdCardBtn) {
this.showCheckPassword = true;
} else {
this.showFlagIdCardBtn = true;
this.$set(
this.resiDetailObj.baseInfoDto,
"idNum",
this.resiDetailObj.baseInfoDto.idNum.substr(0, 11) +
"****" +
this.resiDetailObj.baseInfoDto.idNum.substr(16, 2)
);
}
} else if (type === "mobile") {
if (this.showFlagMobileBtn) {
this.showCheckPassword = true;
} else {
this.showFlagMobileBtn = true;
this.$set(
this.resiDetailObj.baseInfoDto,
"mobile",
this.resiDetailObj.baseInfoDto.mobile.substr(0, 3) +
"****" +
this.resiDetailObj.baseInfoDto.mobile.substr(7, 4)
);
}
}else if(type=="name"){
if (this.showFlagnameBtn) {
this.showCheckPassword = true;
} else {
this.showFlagnameBtn = true;
this.$set(
this.resiDetailObj.baseInfoDto,
"name",
this.resiDetailObj.baseInfoDto.name.substr(0, 1) +
"*" +
this.resiDetailObj.baseInfoDto.name.substr(16, 2)
);
}
}
this.tuominType = type;
this.showCheckPassword = true;
}else{
// if (showFlagMobileBtn) {
// }
this.checkType = "view"
this.handleSaveTuomin()
this.clicktype=type
}
},
@ -1642,11 +1591,9 @@ export default {
if (code === 0) {
this.showCheckPassword=false
if (this.checkType == "view") {
this.$set(this.resiDetailObj.baseInfoDto, "name", data.name);
this.$set(this.resiDetailObj.baseInfoDto, "mobile", data.mobile);
this.$set(this.resiDetailObj.baseInfoDto, "idNum", data.idNum);
this.$set(this.resiDetailObj.baseInfoDto, "name", data.name);
this.showFlagMobileBtn = !this.showFlagMobileBtn;
this.showFlagIdCardBtn = !this.showFlagIdCardBtn;
this.showFlagnameBtn = !this.showFlagnameBtn;
} else if (this.checkType == "edit") {
this.showCheckPassword = false;

Loading…
Cancel
Save