加入搜素页面

This commit is contained in:
Your Name 2023-04-17 02:42:42 +08:00
parent d6beaea6b2
commit 979010dd60

View File

@ -1,32 +1,32 @@
(function(vc) { (function (vc) {
vc.extends({ vc.extends({
data: { data: {
searchCommunityDataInfo: { searchCommunityDataInfo: {
searchValue:'', searchValue: '',
rooms:[], rooms: [],
owners:[], owners: [],
ownerMembers:[], ownerMembers: [],
cars:[], cars: [],
carMembers:[], carMembers: [],
contracts:[], contracts: [],
repairs:[], repairs: [],
visits:[], visits: [],
staffs:[], staffs: [],
noData:true noData: true
}, },
}, },
_initMethod: function() { _initMethod: function () {
}, },
_initEvent: function() { _initEvent: function () {
vc.on('searchCommunityDataModel', '_loadData', function(_param) { vc.on('searchCommunityDataModel', '_loadData', function (_param) {
$that._clearSearchCommunityData(); $that._clearSearchCommunityData();
//$('#searchCommunityDataModel').modal('show'); //$('#searchCommunityDataModel').modal('show');
}); });
}, },
methods: { methods: {
_doSearchCommunityData:function(){ _doSearchCommunityData: function () {
if (!vc.isNotEmpty($that.searchCommunityDataInfo.searchValue)) { if (!vc.isNotEmpty($that.searchCommunityDataInfo.searchValue)) {
vc.toast('请输入查询条件'); vc.toast('请输入查询条件');
return; return;
@ -57,6 +57,12 @@
$that.searchCommunityDataInfo.repairs = _ownerJson.repairs; $that.searchCommunityDataInfo.repairs = _ownerJson.repairs;
$that.searchCommunityDataInfo.visits = _ownerJson.visitDtos; $that.searchCommunityDataInfo.visits = _ownerJson.visitDtos;
$that.searchCommunityDataInfo.staffs = _ownerJson.staffs; $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) { function (errInfo, error) {
console.log('请求失败处理'); console.log('请求失败处理');
@ -73,19 +79,19 @@
}) })
window.open('/#/pages/property/simplifyAcceptance?tab=业务受理'); window.open('/#/pages/property/simplifyAcceptance?tab=业务受理');
}, },
_clearSearchCommunityData:function(){ _clearSearchCommunityData: function () {
$that.searchCommunityDataInfo ={ $that.searchCommunityDataInfo = {
searchValue:'', searchValue: '',
noData:true, noData: true,
rooms:[], rooms: [],
owners:[], owners: [],
ownerMembers:[], ownerMembers: [],
cars:[], cars: [],
carMembers:[], carMembers: [],
contracts:[], contracts: [],
repairs:[], repairs: [],
visits:[], visits: [],
staffs:[], staffs: [],
}; };
} }
} }