(function (vc, vm) { vc.extends({ data: { deleteRepairSettingInfo: {} }, _initMethod: function () { }, _initEvent: function () { vc.on('deleteRepairSetting', 'openDeleteRepairSettingModal', function (_params) { $that.deleteRepairSettingInfo = _params; $('#deleteRepairSettingModel').modal('show'); }); }, methods: { deleteRepairSetting: function () { $that.deleteRepairSettingInfo.communityId = vc.getCurrentCommunity().communityId; vc.http.apiPost( '/repair.deleteRepairSetting', JSON.stringify($that.deleteRepairSettingInfo), { emulateJSON: true }, function (json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); let _json = JSON.parse(json); if (_json.code == 0) { //关闭model $('#deleteRepairSettingModel').modal('hide'); vc.emit('repairSetting', 'listRepairSetting', {}); vc.toast("删除成功"); return; } else { vc.toast(_json.msg); } }, function (errInfo, error) { console.log('请求失败处理'); vc.toast(json); }); }, closeDeleteRepairSettingModel: function () { $('#deleteRepairSettingModel').modal('hide'); } } }); })(window.vc, window.$that);