diff --git a/public/components/frame/dataPrivilegeUnit/dataPrivilegeUnit.js b/public/components/frame/dataPrivilegeUnit/dataPrivilegeUnit.js index c08921102..221a2ae8e 100644 --- a/public/components/frame/dataPrivilegeUnit/dataPrivilegeUnit.js +++ b/public/components/frame/dataPrivilegeUnit/dataPrivilegeUnit.js @@ -1,7 +1,7 @@ /** 入驻小区 **/ -(function (vc) { +(function(vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; var ALL_ROWS = 100; @@ -15,34 +15,33 @@ dpId: '' } }, - _initMethod: function () { - }, - _initEvent: function () { - vc.on('dataPrivilegeUnitInfo', 'openDataPrivilegeUnit', function (_param) { + _initMethod: function() {}, + _initEvent: function() { + vc.on('dataPrivilegeUnitInfo', 'openDataPrivilegeUnit', function(_param) { vc.copyObject(_param, vc.component.dataPrivilegeUnitInfo); vc.component._listDataPrivilegeUnits(DEFAULT_PAGE, DEFAULT_ROWS); }); - vc.on('dataPrivilegeUnitInfo', 'listDataPrivilegeUnit', function (_param) { + vc.on('dataPrivilegeUnitInfo', 'listDataPrivilegeUnit', function(_param) { //vc.copyObject(_param, vc.component.dataPrivilegeUnitInfo.conditions); vc.component._listDataPrivilegeUnits(DEFAULT_PAGE, DEFAULT_ROWS); }); - vc.on('dataPrivilegeUnitInfo', 'paginationPlus', 'page_event', function (_currentPage) { + vc.on('dataPrivilegeUnitInfo', 'paginationPlus', 'page_event', function(_currentPage) { vc.component._listDataPrivilegeUnits(_currentPage, DEFAULT_ROWS); }); }, methods: { - _listDataPrivilegeUnits: function (_page, _rows) { + _listDataPrivilegeUnits: function(_page, _rows) { var param = { params: { page: _page, row: _rows, - roleId: vc.component.dataPrivilegeUnitInfo.pgId + dpId: vc.component.dataPrivilegeUnitInfo.dpId } }; //发送get请求 vc.http.apiGet('/dataPrivilegeUnit.listDataPrivilegeUnit', param, - function (json, res) { + function(json, res) { var _dataPrivilegeUnitInfo = JSON.parse(json); vc.component.dataPrivilegeUnitInfo.total = _dataPrivilegeUnitInfo.total; vc.component.dataPrivilegeUnitInfo.records = _dataPrivilegeUnitInfo.records; @@ -52,34 +51,34 @@ dataCount: vc.component.dataPrivilegeUnitInfo.total, currentPage: _page }); - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _openAddDataPrivilegeUnitModal: function () { + _openAddDataPrivilegeUnitModal: function() { vc.emit('addDataPrivilegeUnit', 'openAddDataPrivilegeUnitModal', { dpId: vc.component.dataPrivilegeUnitInfo.dpId, }); }, - _openDeleteDataPrivilegeUnitModel: function (_dataPrivilegeUnit) { + _openDeleteDataPrivilegeUnitModel: function(_dataPrivilegeUnit) { vc.emit('deleteDataPrivilegeUnit', 'openDeleteDataPrivilegeUnitModal', _dataPrivilegeUnit); }, - _openBeyondDataPrivilegeUnit: function (_dataPrivilegeUnit) { - }, - _queryDataPrivilegeUnitMethod: function () { + _openBeyondDataPrivilegeUnit: function(_dataPrivilegeUnit) {}, + _queryDataPrivilegeUnitMethod: function() { vc.component._listDataPrivilegeUnits(DEFAULT_PAGE, DEFAULT_ROWS); }, - _moreCondition: function () { + _moreCondition: function() { if (vc.component.dataPrivilegeUnitInfo.moreCondition) { vc.component.dataPrivilegeUnitInfo.moreCondition = false; } else { vc.component.dataPrivilegeUnitInfo.moreCondition = true; } }, - _goBack: function () { + _goBack: function() { vc.emit('orgManage', 'onBack', {}); } } }); -})(window.vc); +})(window.vc); \ No newline at end of file