员工详情重置密码bug

This commit is contained in:
wuxw 2024-01-11 14:08:52 +08:00
parent 8834fb9167
commit 23aea8245c
2 changed files with 9 additions and 7 deletions

View File

@ -5,7 +5,7 @@
},
_initEvent: function () {
vc.on('resetStaffPwd', 'openResetStaffPwd', function (_staffInfo) {
vc.component.resetStaffPwdInfo = _staffInfo;
$that.resetStaffPwdInfo = _staffInfo;
$('#resetStaffPwdModel').modal('show');
});
},
@ -16,7 +16,7 @@
resetStaffPwd: function () {
var _dataObj = {
communityId: vc.getCurrentCommunity().communityId,
staffId: vc.component.resetStaffPwdInfo.userId
staffId: $that.resetStaffPwdInfo.userId
};
vc.http.apiPost(
'/user.resetStaffPwd',
@ -37,7 +37,7 @@
},
function (errInfo, error) {
console.log('请求失败处理');
vc.component.resetStaffPwdInfo.errorInfo = errInfo;
$that.resetStaffPwdInfo.errorInfo = errInfo;
}
);
}

View File

@ -24,12 +24,12 @@
if (!vc.notNull($that.staffDetailInfo.staffId)) {
return;
}
vc.component._loadStaffInfo();
$that._loadStaffInfo();
$that.changeTab($that.staffDetailInfo._currentTab);
},
_initEvent: function () {
vc.on('staffDetail', 'listStaffData', function (_info) {
vc.component._loadStaffInfo();
$that._loadStaffInfo();
$that.changeTab($that.staffDetailInfo._currentTab);
});
},
@ -69,14 +69,16 @@
$that.staffDetailInfo.photo = $that.staffDetailInfo.url;
},
errorLoadImg: function () {
vc.component.staffDetailInfo.photo = "/img/noPhoto.jpg";
$that.staffDetailInfo.photo = "/img/noPhoto.jpg";
},
_openEditStaffModel: function () {
$that.staffDetailInfo.name = $that.staffDetailInfo.userName;
$that.staffDetailInfo.userId = $that.staffDetailInfo.staffId;
vc.component.$emit('edit_staff_event', $that.staffDetailInfo);
$that.$emit('edit_staff_event', $that.staffDetailInfo);
},
_resetStaffPwd: function (_staff) {
$that.staffDetailInfo.name = $that.staffDetailInfo.userName;
$that.staffDetailInfo.userId = $that.staffDetailInfo.staffId;
vc.emit('resetStaffPwd', 'openResetStaffPwd', $that.staffDetailInfo);
},
}