update code

prv
haha 2024-04-09 00:00:54 +08:00
parent 1b4bde84fe
commit 390c0db928
1 changed files with 91 additions and 71 deletions

View File

@ -6,10 +6,13 @@
<div :class="nav == 8 ? 'head-nav active' : 'head-nav'" @click="doNav(102)"></div> <div :class="nav == 8 ? 'head-nav active' : 'head-nav'" @click="doNav(102)"></div>
<div :class="nav == 2 ? 'head-nav active' : 'head-nav'" @click="doNav(103)"></div> <div :class="nav == 2 ? 'head-nav active' : 'head-nav'" @click="doNav(103)"></div>
</div> </div>
<el-table v-loading="loading" :data="tableData" class="mytable" height="650" style="width: 100%;background: transparent;" ref="fbsubordinateUnit"> <el-table v-loading="loading" :data="tableData" class="mytable" height="650"
style="width: 100%;background: transparent;" ref="fbsubordinateUnit">
<el-table-column label="照片" align="center" prop="id"> <el-table-column label="照片" align="center" prop="id">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-image v-if="row.scanPhoto||row.recentPhoto||row.workerPhoto" :src="row.scanPhoto||row.recentPhoto||row.workerPhoto" :preview-src-list="[row.recentPhoto||row.scanPhoto||row.workerPhoto]" style="height:60px"/> <el-image v-if="row.scanPhoto || row.recentPhoto || row.workerPhoto"
:src="row.scanPhoto || row.recentPhoto || row.workerPhoto"
:preview-src-list="[row.recentPhoto || row.scanPhoto || row.workerPhoto]" style="height:60px" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="姓名" align="center" prop="workerName" /> <el-table-column label="姓名" align="center" prop="workerName" />
@ -33,7 +36,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination layout="total,prev, pager, next" :hide-on-single-page="true" @current-change="handleCurrentChange" :total="total" :page-size="size" :current-page.sync="index" class="bg-pagination"></el-pagination> <el-pagination layout="total,prev, pager, next" :hide-on-single-page="true"
@current-change="handleCurrentChange" :total="total" :page-size="size" :current-page.sync="index"
class="bg-pagination"></el-pagination>
</MyDialog> </MyDialog>
</template> </template>
@ -96,6 +101,18 @@ export default {
this.$api.attendance.listAttendance(postData).then(d => { this.$api.attendance.listAttendance(postData).then(d => {
this.total = d.total || 0; this.total = d.total || 0;
this.tableData = (d.rows || []).map(it => { this.tableData = (d.rows || []).map(it => {
let dt1 = it.attendanceTime;
let dt2 = it.attendanceOutTime;
if ((!dt1 || !dt2) || dt1 == dt2) {
let dt = dt1 || dt2;
if (it.remark == "E") {
it.attendanceTime = dt;
it.attendanceOutTime = "";
} else {
it.attendanceTime = "";
it.attendanceOutTime = dt;
}
}
it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto; it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto;
return it; return it;
}); });
@ -112,9 +129,11 @@ export default {
color: aquamarine; color: aquamarine;
} }
} }
.today-attendance-detail { .today-attendance-detail {
/deep/ .quality-table .el-table .el-table__row { /deep/ .quality-table .el-table .el-table__row {
background-image: none !important; background-image: none !important;
td { td {
border-bottom: solid 1px rgba(60, 170, 255, 0.3); border-bottom: solid 1px rgba(60, 170, 255, 0.3);
} }
@ -125,6 +144,7 @@ export default {
.today-attendance-detail { .today-attendance-detail {
.popup-project-introduction-min { .popup-project-introduction-min {
transform: translateY(100px); transform: translateY(100px);
.bg-pagination { .bg-pagination {
margin-top: 20px; margin-top: 20px;
} }