Compare commits
No commits in common. "40cf397199e2522b3f89648de678b4eb4c7f5bdc" and "6d5be9402c5fde327b8b25760939b766064f7916" have entirely different histories.
40cf397199
...
6d5be9402c
|
@ -7,30 +7,28 @@
|
||||||
<div v-for="it in types" :key="it.value" :class="nav == it.value ? 'head-nav active' : 'head-nav'"
|
<div v-for="it in types" :key="it.value" :class="nav == it.value ? 'head-nav active' : 'head-nav'"
|
||||||
@click="doNav(it)">{{ it.label }}({{ getTypeCount(it) }})</div>
|
@click="doNav(it)">{{ it.label }}({{ getTypeCount(it) }})</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table v-loading="loading" :data="dataList" v-if="type == 0" class="data-list" :height="tbHeight">
|
<el-table v-loading="loading" :data="dataList" v-if="type == 0" class="data-list">
|
||||||
<el-table-column label="头像" align="center">
|
<el-table-column label="头像" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image :src="scope.row.user.userPicture" :preview-teleported="true" class="att-img"
|
<el-image :src="scope.row.user.userPicture" :preview-teleported="true"
|
||||||
:preview-src-list="[scope.row.user.userPicture]"></el-image>
|
class="att-img" :preview-src-list="[scope.row.user.userPicture]"></el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="姓名" align="center" prop="userName" />
|
<el-table-column label="姓名" align="center" prop="user.userName" />
|
||||||
<el-table-column label="籍贯" align="center" prop="nativePlace" />
|
<el-table-column label="籍贯" align="center" prop="info.nativePlace" />
|
||||||
<el-table-column label="性别" align="center" prop="sex" />
|
<el-table-column label="性别" align="center" prop="user.sex" />
|
||||||
<el-table-column label="状态" align="center" prop="useStatus">
|
<el-table-column label="状态" align="center" prop="enterState">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.useStatus == 0" style="color: green;">在场</span>
|
<span v-if="scope.row.enterState == 0" style="color: green;">在场</span>
|
||||||
<span v-else style="color: red">离场</span>
|
<span v-else style="color: red">离场</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="进场日期" align="center" prop="createTime"
|
<el-table-column label="进场日期" align="center" prop="createTime" :width="$dpi() == '1K' ? '120px' : $dpi() == '2K'?'200px':'300px'">
|
||||||
:width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '300px'">
|
|
||||||
<template #default="scope">{{ scope.row.createTime | toDate }}</template>
|
<template #default="scope">{{ scope.row.createTime | toDate }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="所属单位" align="center" prop="subDeptName" />
|
<el-table-column label="所属单位" align="center" prop="subDeptName" />
|
||||||
<el-table-column label="班组" align="center" prop="subDeptGroupName"
|
<el-table-column label="班组" align="center" prop="subDeptGroupName" :width="$dpi() == '1K' ? '120px' : $dpi() == '2K'?'200px':'300px'"/>
|
||||||
:width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '300px'" />
|
|
||||||
<el-table-column label="工种类型" align="center" prop="craftType">
|
<el-table-column label="工种类型" align="center" prop="craftType">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="types" :value="scope.row.craftType" />
|
<dict-tag :options="types" :value="scope.row.craftType" />
|
||||||
|
@ -45,7 +43,7 @@
|
||||||
<el-table-column label="出生日期" align="center" prop="info.birthDayStr" v-if="false" />
|
<el-table-column label="出生日期" align="center" prop="info.birthDayStr" v-if="false" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table v-loading="loading" :data="dataList" v-if="type == 1" class="data-list" :height="tbHeight">
|
<el-table v-loading="loading" :data="dataList" v-if="type == 1" class="data-list">
|
||||||
<el-table-column label="进场照片" align="center" prop="inPhoto">
|
<el-table-column label="进场照片" align="center" prop="inPhoto">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image v-if="scope.row.inPhoto" :src="scope.row.inPhoto" class="att-img"
|
<el-image v-if="scope.row.inPhoto" :src="scope.row.inPhoto" class="att-img"
|
||||||
|
@ -74,8 +72,7 @@
|
||||||
<span v-else class="el-icon-close" style="color: red;font-weight: bold;"></span>
|
<span v-else class="el-icon-close" style="color: red;font-weight: bold;"></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="班组" align="center" prop="subDeptGroupName"
|
<el-table-column label="班组" align="center" prop="subDeptGroupName" :width="$dpi() == '1K' ? '120px' : $dpi() == '2K'?'200px':'400px'"/>
|
||||||
:width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '400px'" />
|
|
||||||
<el-table-column label="工种类型" align="center" prop="craftType">
|
<el-table-column label="工种类型" align="center" prop="craftType">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="types" :value="scope.row.craftType" class="dict-tag" />
|
<dict-tag :options="types" :value="scope.row.craftType" class="dict-tag" />
|
||||||
|
@ -98,7 +95,6 @@ export default {
|
||||||
//在岗人员
|
//在岗人员
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dpi: "",
|
|
||||||
show: false,
|
show: false,
|
||||||
title: '在岗人员',
|
title: '在岗人员',
|
||||||
prjInfo: {},
|
prjInfo: {},
|
||||||
|
@ -112,25 +108,9 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
tbHeight: 400,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.dpi = this.$dpi();
|
|
||||||
window.addEventListener("resize", () => {
|
|
||||||
if (this.dpi != this.$dpi()) {
|
|
||||||
this.dpi = this.$dpi();
|
|
||||||
this.resize();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.resize();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
resize() {
|
|
||||||
let is1K = this.$dpi() == "1K";
|
|
||||||
let is2K = this.$dpi() == "2K";
|
|
||||||
this.tbHeight = is1K ? 400 : is2K ? 500 : 600;
|
|
||||||
},
|
|
||||||
handleCurrentChange(n) {
|
handleCurrentChange(n) {
|
||||||
this.index = n;
|
this.index = n;
|
||||||
this.loadData();
|
this.loadData();
|
||||||
|
@ -157,7 +137,6 @@ export default {
|
||||||
pageNum: this.index,
|
pageNum: this.index,
|
||||||
craftType: this.nav,
|
craftType: this.nav,
|
||||||
comId: this.prjInfo.comId,
|
comId: this.prjInfo.comId,
|
||||||
useStatus: 0,
|
|
||||||
projectId: this.prjInfo.id
|
projectId: this.prjInfo.id
|
||||||
};
|
};
|
||||||
if (this.type == 1) {
|
if (this.type == 1) {
|
||||||
|
@ -168,7 +147,7 @@ export default {
|
||||||
comId: this.prjInfo.comId,
|
comId: this.prjInfo.comId,
|
||||||
projectId: this.prjInfo.id,
|
projectId: this.prjInfo.id,
|
||||||
craftType: this.nav,
|
craftType: this.nav,
|
||||||
inTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
inTime: '2024-10-14'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -176,15 +155,13 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.type == 0) {
|
if (this.type == 0) {
|
||||||
this.dataList = (d.rows || []).map(d => {
|
this.dataList = (d.rows || []).map(d => {
|
||||||
d.info = this.$tryToJson(d.userInfos || "{}")
|
d.info = this.$tryToJson(d.user?.userInfos || "{}")
|
||||||
d.user = d.user || {};
|
d.user = d.user || {};
|
||||||
if (d.info.birthDay) {
|
if (d.info.birthDay) {
|
||||||
let birthDay = this.$dt(d.info.birthDay).format("YYYY-MM-DD");
|
let birthDay = this.$dt(d.info.birthDay).format("YYYY-MM-DD");
|
||||||
d.info.birthDayStr = birthDay;
|
d.info.birthDayStr = birthDay;
|
||||||
d.info.age = this.$dt(new Date()).diff(d.info.birthDay, 'year');
|
d.info.age = this.$dt(new Date()).diff(d.info.birthDay, 'year');
|
||||||
}
|
}
|
||||||
d.sex = d.userSex == 0 ? '男' : '女';
|
|
||||||
d.nativePlace = d.info.nativePlace || "";
|
|
||||||
return d;
|
return d;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -208,79 +185,67 @@ export default {
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.attendance-info-dlg {
|
.attendance-info-dlg {
|
||||||
.data-list {
|
.data-list {
|
||||||
margin-top: 10px;
|
margin-top:10px;
|
||||||
|
th {
|
||||||
.el-table__body-wrapper::-webkit-scrollbar {
|
.cell {
|
||||||
width: 8px;
|
font-size: 14px;
|
||||||
height: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-table__body-wrapper::-webkit-scrollbar-thumb {
|
|
||||||
background-color: #01a9ff;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
.cell {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
.cell {
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
.el-tag {
|
|
||||||
font-size: 12px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.el-table__empty-text {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-table__row {
|
|
||||||
&:nth-child(odd) {
|
|
||||||
background-size: 100% 55px;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
td {
|
||||||
height: 60px;
|
.cell {
|
||||||
|
font-size: 14px;
|
||||||
|
.el-tag{
|
||||||
|
font-size:12px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__empty-text {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table__row {
|
||||||
|
&:nth-child(odd) {
|
||||||
|
background-size: 100% 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-image.att-img {
|
||||||
|
img {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-image__error {
|
||||||
|
height: 50px;
|
||||||
|
position: relative;
|
||||||
|
top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon-close {
|
||||||
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-image.att-img {
|
.el-pagination {
|
||||||
img {
|
* {
|
||||||
height: 40px;
|
font-size: 14px !important;
|
||||||
|
height: 28px !important;
|
||||||
|
line-height: 28px !important;
|
||||||
|
vertical-align: middle !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-image__error {
|
|
||||||
height: 50px;
|
|
||||||
position: relative;
|
|
||||||
top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon-close {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-pagination {
|
|
||||||
* {
|
|
||||||
font-size: 14px !important;
|
|
||||||
height: 28px !important;
|
|
||||||
line-height: 28px !important;
|
|
||||||
vertical-align: middle !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 1921px) and (max-width: 2560px) {
|
@media (min-width: 1921px) and (max-width: 2560px) {
|
||||||
.attendance-info-dlg {
|
.attendance-info-dlg {
|
||||||
.data-list {
|
.data-list {
|
||||||
|
@ -293,9 +258,8 @@ export default {
|
||||||
td {
|
td {
|
||||||
.cell {
|
.cell {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
.el-tag{
|
||||||
.el-tag {
|
font-size:20px;
|
||||||
font-size: 20px;
|
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
|
@ -347,10 +311,9 @@ export default {
|
||||||
|
|
||||||
@media (min-width: 2561px) {
|
@media (min-width: 2561px) {
|
||||||
.attendance-info-dlg {
|
.attendance-info-dlg {
|
||||||
.data-list {
|
.data-list {
|
||||||
th {
|
th {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
|
@ -358,14 +321,12 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
|
.el-tag{
|
||||||
.el-tag {
|
font-size:30px;
|
||||||
font-size: 30px;
|
|
||||||
height: 48px;
|
height: 48px;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue