mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
b03d710b38
commit
b877d90384
@ -0,0 +1,51 @@
|
||||
<div id="todayAttendanceDetailModel" class="modal fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="todayAttendanceDetailModelLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="todayAttendanceDetailModelLabel">考勤详情</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class=" row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="table-responsive" style="margin-top:15px">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">名称</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">考勤时间</th>
|
||||
<th class="text-center">打卡时间</th>
|
||||
<th class="text-center">抓拍</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="detail in todayAttendanceDetailInfo.attendanceClassesTaskDetails">
|
||||
<td class="text-center">{{detail.specName}}</td>
|
||||
<td class="text-center">{{detail.state}}</td>
|
||||
<td class="text-center">{{detail.value}}</td>
|
||||
<td class="text-center">{{detail.checkTime}}</td>
|
||||
<td class="text-right ">
|
||||
<span v-for="_photo in detail.photos">
|
||||
<img style="width: 60px; height: 60px;" v-bind:src="_photo.url" v-on:click="openFile(_photo)"></img>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="common/viewImage"></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,32 @@
|
||||
(function (vc) {
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
todayAttendanceDetailInfo: {
|
||||
attendanceClassesTaskDetails: []
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('todayAttendanceDetail', 'openTodayAttendanceDetail', function (_param) {
|
||||
$that._refreshTodayAttendanceDetailInfo();
|
||||
$('#todayAttendanceDetailModel').modal('show');
|
||||
$that.todayAttendanceDetailInfo.attendanceClassesTaskDetails = _param.attendanceClassesTaskDetails;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_refreshTodayAttendanceDetailInfo: function () {
|
||||
$that.todayAttendanceDetailInfo = {
|
||||
attendanceClassesTaskDetails: []
|
||||
};
|
||||
},
|
||||
openFile: function (_photo) {
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: _photo.url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -71,7 +71,7 @@
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditAttendanceClassesModel(attendance)">详情</button>
|
||||
v-on:click="_openAttendanceDetailModel(attendance)">详情</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -91,5 +91,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="property/todayAttendanceDetail"></vc:create>
|
||||
</div>
|
||||
@ -61,12 +61,11 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddTodayAttendanceModal: function () {
|
||||
vc.emit('addTodayAttendance', 'openAddTodayAttendanceModal', {});
|
||||
_openAttendanceDetailModel: function (_attendance) {
|
||||
vc.emit('todayAttendanceDetail', 'openTodayAttendanceDetail', _attendance);
|
||||
},
|
||||
_queryTodayAttendanceMethod: function () {
|
||||
vc.component._listTodayAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.todayAttendanceManageInfo.moreCondition) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user