业主详情加入 开门记录

This commit is contained in:
Your Name 2023-03-30 02:14:57 +08:00
parent 0db6cda5c6
commit a63ce59dca
5 changed files with 144 additions and 4 deletions

View File

@ -0,0 +1,63 @@
<div class="margin-top">
<div class="row margin-top-lg">
</div>
<div class="margin-top">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name="人脸" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="设备" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="设备位置" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="用户名称" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="开门方式" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="身份证" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="开门时间" namespace="ownerDetailAccessControlRecord"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="machineRecord in ownerDetailAccessControlRecordInfo.machineRecords">
<td class="text-center" style="white-space: nowrap;">
<img style="width: 60px; height: 60px;" class="border-radius" v-if="machineRecord.faceUrl" v-bind:src="machineRecord.faceUrl" v-on:click="_viewOwnerFace(machineRecord.faceUrl)" />
<img style="width: 60px; height: 60px;" class="border-radius" v-else src="/img/noPhoto.jpg" />
</td>
<td class="text-center">{{machineRecord.machineName}}({{machineRecord.machineCode}})</td>
<td class="text-center">{{machineRecord.locationObjName}}</td>
<td class="text-center">{{machineRecord.name}}({{machineRecord.tel == '-1'?'无':machineRecord.tel}})</td>
<td class="text-center">{{machineRecord.openTypeName}}</td>
<!-- <td class="text-center">{{machineRecord.tel}}</td> -->
<td class="text-center">{{machineRecord.idCard == '-1'?'无':machineRecord.idCard }}</td>
<td class="text-center">{{machineRecord.createTime}}</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<div class="row">
<div class="col-sm-4">
</div>
<div class="col-sm-8">
<vc:create namespace="ownerDetailAccessControl" path="frame/paginationPlus"></vc:create>
</div>
</div>
</div>
<vc:create path="common/viewImage"></vc:create>
</div>

View File

@ -0,0 +1,67 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
ownerDetailAccessControlRecordInfo: {
machineRecords: [],
ownerId: '',
link: '',
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('ownerDetailAccessControlRecord', 'switch', function (_data) {
$that.ownerDetailAccessControlRecordInfo.ownerId = _data.ownerId;
$that.ownerDetailAccessControlRecordInfo.link = _data.link;
$that._loadOwnerDetailAccessControlRecordData(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('ownerDetailAccessControlRecord', 'paginationPlus', 'page_event',
function (_currentPage) {
vc.component._loadOwnerDetailAccessControlRecordData(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_loadOwnerDetailAccessControlRecordData: function (_page, _row) {
let param = {
params: {
page: _page,
row: _row,
communityId: vc.getCurrentCommunity().communityId,
tel: $that.ownerDetailAccessControlRecordInfo.link,
}
};
//发送get请求
vc.http.apiGet('/machineRecord.listMachineRecords',
param,
function (json) {
let _roomInfo = JSON.parse(json);
vc.component.ownerDetailAccessControlRecordInfo.machineRecords = _roomInfo.machineRecords;
vc.emit('ownerDetailAccessControlRecord', 'paginationPlus', 'init', {
total: _roomInfo.records,
dataCount: _roomInfo.total,
currentPage: _page
});
},
function () {
console.log('请求失败处理');
}
);
},
//查询
_qureyOwnerDetailAccessControlRecord: function () {
$that._loadOwnerDetailAccessControlRecordData(DEFAULT_PAGE, DEFAULT_ROWS);
},
_viewOwnerFace: function(_url) {
vc.emit('viewImage', 'showImage', {
url: _url
});
},
}
});
})(window.vc);

View File

@ -68,7 +68,7 @@
</div>
</div>
<div class="row">
<div class="col-sm-3">
<!-- <div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">
<span>
@ -77,7 +77,7 @@
</label>
<label class="">{{ownerDetailInfo.age}}</label>
</div>
</div>
</div> -->
<div class="col-sm-3">
<div class="form-group">
<label class="col-form-label">
@ -98,7 +98,7 @@
<label class="">{{ownerDetailInfo.link}}</label>
</div>
</div>
<div class="col-sm-3">
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">
<span>
@ -204,6 +204,12 @@
<vc:i18n name="人脸同步" namespace="ownerDetail"></vc:i18n>
</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:ownerDetailInfo._currentTab == 'ownerDetailAccessControlRecord'}"
v-on:click="changeTab('ownerDetailAccessControlRecord')">
<vc:i18n name="开门记录" namespace="ownerDetail"></vc:i18n>
</a>
</li>
</ul>
</div>
<div v-if="ownerDetailInfo._currentTab == 'ownerDetailRoom'">
@ -237,6 +243,9 @@
<div v-if="ownerDetailInfo._currentTab == 'ownerDetailAccessControl'">
<vc:create path="owner/ownerDetailAccessControl"></vc:create>
</div>
<div v-if="ownerDetailInfo._currentTab == 'ownerDetailAccessControlRecord'">
<vc:create path="owner/ownerDetailAccessControlRecord"></vc:create>
</div>

View File

@ -68,6 +68,7 @@
vc.emit(_tab, 'switch', {
ownerId: $that.ownerDetailInfo.ownerId,
ownerName:$that.ownerDetailInfo.name,
link:$that.ownerDetailInfo.link,
})
},
_loadOwnerPhoto: function () {

View File

@ -84,7 +84,7 @@
<thead>
<tr>
<th class="text-center">
<vc:i18n name="人脸" namespace="listOwner"></vc:i18n>
<vc:i18n name="人脸" namespace="machineRecordManage"></vc:i18n>
</th>
<th class="text-center">