mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-27 00:20:01 +08:00
49 lines
1.5 KiB
JavaScript
49 lines
1.5 KiB
JavaScript
(function(vc, vm) {
|
|
|
|
vc.extends({
|
|
data: {
|
|
deleteRoleStaffInfo: {
|
|
|
|
}
|
|
},
|
|
_initMethod: function() {
|
|
|
|
},
|
|
_initEvent: function() {
|
|
vc.on('deleteRoleStaff', 'openDeleteRoleStaffModal', function(_params) {
|
|
|
|
vc.component.deleteRoleStaffInfo = _params;
|
|
$('#deleteRoleStaffModel').modal('show');
|
|
|
|
});
|
|
},
|
|
methods: {
|
|
deleteRoleStaff: function() {
|
|
vc.http.apiPost(
|
|
'/role.deleteRoleStaff',
|
|
JSON.stringify(vc.component.deleteRoleStaffInfo), {
|
|
emulateJSON: true
|
|
},
|
|
function(json, res) {
|
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
|
if (res.status == 200) {
|
|
//关闭model
|
|
$('#deleteRoleStaffModel').modal('hide');
|
|
vc.emit('roleStaffInfo', 'listRoleStaff', {});
|
|
return;
|
|
}
|
|
vc.toast(json);
|
|
},
|
|
function(errInfo, error) {
|
|
console.log('请求失败处理');
|
|
vc.toast(json);
|
|
|
|
});
|
|
},
|
|
closeDeleteRoleStaffModel: function() {
|
|
$('#deleteRoleStaffModel').modal('hide');
|
|
}
|
|
}
|
|
});
|
|
|
|
})(window.vc, window.vc.component); |