From 979010dd6087572eb2e4915ba8a030ae21622e99 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 17 Apr 2023 02:42:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=90=9C=E7=B4=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../searchCommunityData.js | 64 ++++++++++--------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/public/components/frame/searchCommunityData/searchCommunityData.js b/public/components/frame/searchCommunityData/searchCommunityData.js index c551280d0..f02cb8823 100644 --- a/public/components/frame/searchCommunityData/searchCommunityData.js +++ b/public/components/frame/searchCommunityData/searchCommunityData.js @@ -1,32 +1,32 @@ -(function(vc) { +(function (vc) { vc.extends({ data: { searchCommunityDataInfo: { - searchValue:'', - rooms:[], - owners:[], - ownerMembers:[], - cars:[], - carMembers:[], - contracts:[], - repairs:[], - visits:[], - staffs:[], - noData:true + searchValue: '', + rooms: [], + owners: [], + ownerMembers: [], + cars: [], + carMembers: [], + contracts: [], + repairs: [], + visits: [], + staffs: [], + noData: true }, }, - _initMethod: function() { + _initMethod: function () { }, - _initEvent: function() { - vc.on('searchCommunityDataModel', '_loadData', function(_param) { + _initEvent: function () { + vc.on('searchCommunityDataModel', '_loadData', function (_param) { $that._clearSearchCommunityData(); //$('#searchCommunityDataModel').modal('show'); }); }, methods: { - _doSearchCommunityData:function(){ + _doSearchCommunityData: function () { if (!vc.isNotEmpty($that.searchCommunityDataInfo.searchValue)) { vc.toast('请输入查询条件'); return; @@ -57,6 +57,12 @@ $that.searchCommunityDataInfo.repairs = _ownerJson.repairs; $that.searchCommunityDataInfo.visits = _ownerJson.visitDtos; $that.searchCommunityDataInfo.staffs = _ownerJson.staffs; + if (_ownerJson.rooms.length < 1 && _ownerJson.owners.length < 1 && _ownerJson.ownerMembers.length < 1 + && _ownerJson.cars.length < 1 && _ownerJson.carMembers.length < 1 && _ownerJson.contracts.length < 1 + && _ownerJson.repairs.length < 1 && _ownerJson.visitDtos.length < 1 && _ownerJson.staffs.length < 1 + ) { + $that.searchCommunityDataInfo.noData = true; + } }, function (errInfo, error) { console.log('请求失败处理'); @@ -73,19 +79,19 @@ }) window.open('/#/pages/property/simplifyAcceptance?tab=业务受理'); }, - _clearSearchCommunityData:function(){ - $that.searchCommunityDataInfo ={ - searchValue:'', - noData:true, - rooms:[], - owners:[], - ownerMembers:[], - cars:[], - carMembers:[], - contracts:[], - repairs:[], - visits:[], - staffs:[], + _clearSearchCommunityData: function () { + $that.searchCommunityDataInfo = { + searchValue: '', + noData: true, + rooms: [], + owners: [], + ownerMembers: [], + cars: [], + carMembers: [], + contracts: [], + repairs: [], + visits: [], + staffs: [], }; } }