From 36b254dc45b4acf883407de509be810a8cd8ce0a Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Tue, 6 Feb 2024 22:10:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=8A=A0=E5=85=A5=E9=97=A8?= =?UTF-8?q?=E7=A6=81=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/components/frame/nav2/nav2.js | 1 + .../parkingAreaManage/parkingAreaManage.js | 43 ++++++++++--------- .../parkingBoxManage/parkingBoxManage.js | 2 + 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/public/components/frame/nav2/nav2.js b/public/components/frame/nav2/nav2.js index a86bd562f..3375a7091 100644 --- a/public/components/frame/nav2/nav2.js +++ b/public/components/frame/nav2/nav2.js @@ -212,6 +212,7 @@ let param = { params:{ targetUrl: '/', + communityId:vc.getCurrentCommunity().communityId } }; //发送get请求 diff --git a/public/pages/property/parkingAreaManage/parkingAreaManage.js b/public/pages/property/parkingAreaManage/parkingAreaManage.js index e42794e31..62d3a0107 100644 --- a/public/pages/property/parkingAreaManage/parkingAreaManage.js +++ b/public/pages/property/parkingAreaManage/parkingAreaManage.js @@ -22,27 +22,27 @@ }, _initMethod: function () { $that._getColumns(function () { - vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); + $that._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); }); }, _initEvent: function () { vc.on('parkingAreaManage', 'listParkingArea', function (_param) { - vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); + $that._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('pagination', 'page_event', function (_currentPage) { - vc.component._listParkingAreas(_currentPage, DEFAULT_ROWS); + $that._listParkingAreas(_currentPage, DEFAULT_ROWS); } ); }, methods: { _listParkingAreas: function (_page, _rows) { - vc.component.parkingAreaManageInfo.conditions.page = _page; - vc.component.parkingAreaManageInfo.conditions.row = _rows; - vc.component.parkingAreaManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId; - var param = { - params: vc.component.parkingAreaManageInfo.conditions + $that.parkingAreaManageInfo.conditions.page = _page; + $that.parkingAreaManageInfo.conditions.row = _rows; + $that.parkingAreaManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId; + let param = { + params: $that.parkingAreaManageInfo.conditions }; param.params.num = param.params.num.trim(); param.params.paId = param.params.paId.trim(); @@ -50,13 +50,13 @@ vc.http.apiGet('/parkingArea.listParkingAreas', param, function (json, res) { var _parkingAreaManageInfo = JSON.parse(json); - vc.component.parkingAreaManageInfo.total = _parkingAreaManageInfo.total; - vc.component.parkingAreaManageInfo.records = _parkingAreaManageInfo.records; - vc.component.parkingAreaManageInfo.parkingAreas = _parkingAreaManageInfo.parkingAreas; + $that.parkingAreaManageInfo.total = _parkingAreaManageInfo.total; + $that.parkingAreaManageInfo.records = _parkingAreaManageInfo.records; + $that.parkingAreaManageInfo.parkingAreas = _parkingAreaManageInfo.parkingAreas; $that.dealParkingAreaAttr(_parkingAreaManageInfo.parkingAreas); vc.emit('pagination', 'init', { - total: vc.component.parkingAreaManageInfo.records, - dataCount: vc.component.parkingAreaManageInfo.total, + total: $that.parkingAreaManageInfo.records, + dataCount: $that.parkingAreaManageInfo.total, currentPage: _page }); }, @@ -75,20 +75,20 @@ }, //查询 _queryParkingAreaMethod: function () { - vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); + $that._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); }, //删除 _resetParkingAreaMethod: function () { - vc.component.parkingAreaManageInfo.conditions.num = ""; - vc.component.parkingAreaManageInfo.conditions.typeCd = ""; - vc.component.parkingAreaManageInfo.conditions.paId = ""; - vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); + $that.parkingAreaManageInfo.conditions.num = ""; + $that.parkingAreaManageInfo.conditions.typeCd = ""; + $that.parkingAreaManageInfo.conditions.paId = ""; + $that._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); }, _moreCondition: function () { - if (vc.component.parkingAreaManageInfo.moreCondition) { - vc.component.parkingAreaManageInfo.moreCondition = false; + if ($that.parkingAreaManageInfo.moreCondition) { + $that.parkingAreaManageInfo.moreCondition = false; } else { - vc.component.parkingAreaManageInfo.moreCondition = true; + $that.parkingAreaManageInfo.moreCondition = true; } }, dealParkingAreaAttr: function (parkingAreas) { @@ -141,6 +141,7 @@ let param = { params:{ targetUrl: encodeURIComponent('/#/pages/car/parkingAreaTotalControl?paId=' + _parkingArea.paId), + communityId:vc.getCurrentCommunity().communityId } }; //发送get请求 diff --git a/public/pages/property/parkingBoxManage/parkingBoxManage.js b/public/pages/property/parkingBoxManage/parkingBoxManage.js index d788a8261..16716a846 100644 --- a/public/pages/property/parkingBoxManage/parkingBoxManage.js +++ b/public/pages/property/parkingBoxManage/parkingBoxManage.js @@ -97,6 +97,8 @@ let param = { params:{ targetUrl: encodeURIComponent('/#/pages/car/parkingAreaControl?boxId=' + _parkingBox.boxId + "&paId=" + _parkingBox.paId), + communityId:vc.getCurrentCommunity().communityId + } }; //发送get请求