大屏增加济工网考勤

dev_xd
haha 2025-05-08 23:56:13 +08:00
parent e26c79cf23
commit 08df9489a5
6 changed files with 655 additions and 89 deletions

View File

@ -202,6 +202,30 @@ const groupAllByComany = (data) => {
method: "post",
});
};
// 查询劳务实名制管理列表
const listAttendance = (query) => {
return request({
url: "/manage/bgscreen/attendance/list",
method: "get",
params: query,
});
};
const groupByWorkerState = (data) => {
return request({
url: "/manage/bgscreen/attendance/groupByWorkerState",
method: "get",
params: data,
});
};
const queryWorkerByState = (data) => {
return request({
url: "/manage/bgscreen/attendance/queryWorkerByState",
method: "get",
params: data,
});
};
export default {
groupByCraftType,
@ -213,4 +237,7 @@ export default {
costOutputSelectYearAndMonth,
groupByComany,
groupAllByComany,
listAttendance,
groupByWorkerState,
queryWorkerByState,
};

View File

@ -0,0 +1,155 @@
<template>
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" class="today-attendance-detail">
<template slot="title">今日出勤</template>
<div class="head-title-tab" style="padding: 10px 0px;">
<div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(101)"></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>
<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">
<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"
/>
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="workerName" />
<el-table-column label="性别" align="center" prop="attendanceType">
<template slot-scope="{row}">{{ row.workerGender == 1 ? '女' : '男' }}</template>
</el-table-column>
<el-table-column label="分包单位名称" align="center" prop="companyName" />
<el-table-column label="所属班组" align="center" prop="groupName" />
<el-table-column label="工种" align="center" prop="workTypeName" />
<el-table-column label="上午打卡(首次)" align="center" prop="inTime">
<template slot-scope="{row}">
<span v-if="row.attendanceTime">{{ row.attendanceTime | formatTime }}</span>
<i style="font-size: 20px;color: red;" v-else class="el-icon-close"></i>
</template>
</el-table-column>
<el-table-column label="下午打卡(末次)" align="center" prop="outTime">
<template slot-scope="{row}">
<span v-if="row.attendanceOutTime">{{ row.attendanceOutTime | formatTime }}</span>
<i style="font-size: 20px;color: red;" v-else class="el-icon-close"></i>
</template>
</el-table-column>
</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>
</MyDialog>
</template>
<script>
export default {
components: {},
data() {
return {
loading: false,
show: false,
tableData: [],
projectId: 0,
deptId: 0,
size: 10,
index: 1,
total: 0,
nav: 101,
}
},
mounted() {},
methods: {
handleCurrentChange(n) {
this.index = n
this.loadData()
},
doNav(n) {
this.nav = n
this.index = 1
this.loadData()
},
showDialog(data) {
this.projectId = data?.projectId || 0
this.deptId = data?.deptId || 0
this.size = 10
this.index = 1
this.loadData()
this.show = true
},
loadData() {
let postData = {
attendanceTime: this.$dt(new Date()).format('YYYY-MM-DD'),
projectId: this.projectId,
pageSize: this.size,
pageNum: this.index,
companyTypeId: this.nav,
}
this.tableData = []
this.loading = true
this.$api.detail.listAttendance(postData).then((d) => {
this.total = d.total || 0
this.tableData = (d.rows || []).map((it) => {
if (it.vendorsCode != 'yanzhu') {
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
return it
})
this.loading = false
})
},
},
}
</script>
<style lang="less" scoped>
.mytable {
/deep/ th .cell {
color: aquamarine;
}
}
.today-attendance-detail {
/deep/ .quality-table .el-table .el-table__row {
background-image: none !important;
td {
border-bottom: solid 1px rgba(60, 170, 255, 0.3);
}
}
}
</style>
<style lang="less">
.today-attendance-detail {
.popup-project-introduction-min {
transform: translateY(100px);
.bg-pagination {
margin-top: 20px;
}
}
}
</style>

View File

@ -0,0 +1,337 @@
<template>
<MyDialog v-if="show" v-model="show" width="80vw" class="today-attendance-detail">
<template v-if="isGroup">
<template slot="title">{{jobType==0?'在岗':'离岗'}}人数({{ total }})</template>
<el-table :data="tableData" class="mytable" max-height="750" style="width: 100%;background: transparent;" ref="fbsubordinateUnit" :show-summary="tableData.length > 1">
<el-table-column label="项目名称" align="left" prop="prjName" />
<el-table-column label="部门" align="left" prop="dptName"></el-table-column>
<el-table-column label="总包人数" align="center" prop="data101" />
<el-table-column label="监理人数" align="center" prop="data102" />
<el-table-column label="劳务人数" align="center" prop="data103" />
<el-table-column label="合计" align="center" prop="total">
<template slot-scope="{row}">
<span style="font-size:16px;font-weight: bold;color:#87e3fa;">{{row.total }}</span>
</template>
</el-table-column>
</el-table>
</template>
<template v-else>
<template slot="title">在岗人数({{ indexData.total }})</template>
<div class="head-title-tab" style="padding: 10px 0px;">
<div :class="nav == 101 ? 'head-nav active' : 'head-nav'" @click="doNav(101)">
总包人员({{ indexData.data101
}})
</div>
<div :class="nav == 102 ? 'head-nav active' : 'head-nav'" @click="doNav(102)">
监理人员({{ indexData.data102
}})
</div>
<div :class="nav == 103 ? 'head-nav active' : 'head-nav'" @click="doNav(103)">
劳务人员({{ indexData.data103
}})
</div>
</div>
<el-table v-loading="loading" :data="tableData" class="mytable" :height="tbHeight" style="width: 100%;background: transparent;" ref="fbsubordinateUnit">
<el-table-column label="照片" align="center" prop="id">
<template slot-scope="{row}">
<el-image :src="row.recentPhoto" :preview-src-list="[row.recentPhoto]" />
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="籍贯" align="center" prop="nativePlace" />
<el-table-column label="性别" align="center" prop="attendanceType">
<template slot-scope="{row}">{{ row.gender == 1 ? '女' : '男' }}</template>
</el-table-column>
<el-table-column label="进场时间" align="center" prop="inTime" v-if="1 == 2">
<template slot-scope="{row}">{{ row.enterDate | formatDate }}</template>
</el-table-column>
<el-table-column label="分包单位名称" align="center" prop="companyName">
<template slot-scope="{row}">{{row.companyName||row.degreeName}}</template>
</el-table-column>
<el-table-column label="所属班组" align="center">
<template slot-scope="{row}">{{ row.groupName||row.remark }}</template>
</el-table-column>
<el-table-column label="岗位/工种" align="center" prop="workTypeName" />
</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>
</template>
</MyDialog>
</template>
<script>
export default {
components: {},
data() {
return {
dpi: 0,
tbHeight: '60vh',
loading: false,
show: false,
tableData: [],
projectId: 0,
deptId: 0,
isGroup: false,
size: 10,
index: 1,
total: 0,
jobType: 0,
nav: 101,
indexData: {
total: 0,
data101: 0,
data102: 0,
data103: 0,
},
}
},
mounted() {
this.dpi = this.$dpi()
window.addEventListener('resize', () => {
if (this.dpi != this.$dpi()) {
this.dpi = this.$dpi()
this.chartKey++
}
})
},
methods: {
handleCurrentChange(n) {
this.index = n
this.loadData()
},
doNav(n) {
this.nav = n
this.index = 1
this.loadData()
},
showDialog(data) {
const getData = (id) => {
var tmps = data.datas.filter((d) => d.text == id)
return tmps.length > 0 ? tmps[0].cnt : 0
}
this.indexData.total = data.total
this.jobType = data.type
this.indexData.data101 = getData('101')
this.indexData.data102 = getData('102')
this.indexData.data103 = getData('103')
this.projectId = data?.projectId || 0
this.deptId = data?.deptId || 0
this.size = 10
this.index = 1
if (this.projectId == 0) {
this.isGroup = true
this.loadGroupData()
} else {
this.isGroup = false
this.loadData()
}
this.show = true
},
loadGroupData() {
this.$api.detail.groupByWorkerState({ deptId: this.deptId, state: this.jobType == 0 ? 0 : 1 }).then((d) => {
const getTypeId = (id) => {
let typeId = { 101: [1, 6], 102: [8], 103: [0, 2, 3, 4, 5] }
for (let k in typeId) {
let v = typeId[k]
if (v.indexOf(id) >= 0) {
return k
}
}
return ''
}
let tmps = (d.data || []).map((it) => {
return {
prjName: it.name,
dptName: it.groupName,
companyId: getTypeId(+it.companyId),
cnt: it.cfgid,
}
})
let sum = 0
let obj = {}
tmps.forEach((it) => {
let k = it.prjName + '_' + it.dptName + '_'
let o = null
if (!obj[k]) {
o = {
prjName: it.prjName,
dptName: it.dptName,
data101: 0,
data102: 0,
data103: 0,
total: 0,
}
obj[k] = o
} else {
o = obj[k]
}
sum += it.cnt
o['data' + it.companyId] += it.cnt
})
this.tableData = []
for (let k in obj) {
let o = obj[k]
o.total = o.data101 + o.data102 + o.data103
this.tableData.push(o)
}
this.total = sum
})
},
loadData() {
let postData = {
projectId: this.projectId,
pageSize: this.size,
pageNum: this.index,
id: this.nav,
state: this.jobType == 0 ? 0 : 1,
}
this.tableData = []
this.loading = true
this.$api.detail.queryWorkerByState(postData).then((d) => {
this.total = d.total || 0
this.tableData = (d.rows || []).map((it) => {
it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf('/profile') == 0 ? '/jhapi' + it.scanPhoto : it.scanPhoto
return it
})
this.loading = false
})
},
},
}
</script>
<style lang="less" scoped>
.mytable {
/deep/ th .cell {
color: aquamarine;
}
}
.today-attendance-detail {
/deep/ .quality-table .el-table .el-table__row {
background-image: none !important;
td {
border-bottom: solid 1px rgba(60, 170, 255, 0.3);
}
}
}
</style>
<style lang="less">
.today-attendance-detail {
.popup-project-introduction-min {
transform: translateY(100px);
height: calc(60vh + 200px) !important;
.bg-pagination {
margin-top: 20px;
}
.head-title-tab {
.head-nav {
padding: 4px 36px;
}
}
.el-table__row {
.el-image {
height: 60px;
}
}
}
@media (min-width: 1921px) and (max-width: 2560px) {
.popup-project-introduction-min {
height: calc(60vh + 240px) !important;
.el-table__header {
th {
height: 40px;
.cell {
font-size: 24px;
line-height: 40px;
}
}
}
.el-table__row {
.el-image {
height: 90px;
}
td {
.cell {
font-size: 20px;
line-height: 24px;
}
}
}
.el-pagination {
line-height: 30px;
margin-top: 40px;
span {
font-size: 24px;
vertical-align: middle;
}
button,
.number {
font-size: 24px;
width: 32px;
height: 32px;
line-height: 32px;
}
.el-icon {
font-size: 24px;
}
}
}
}
@media (min-width: 2561px) {
.popup-project-introduction-min {
height: calc(60vh + 300px) !important;
.el-table__header {
th {
height: 60px;
.cell {
font-size: 30px;
line-height: 60px;
}
}
}
.el-table__row {
.el-image {
height: 120px;
}
td {
.cell {
font-size: 24px;
line-height: 30px;
}
}
}
.el-pagination {
line-height: 48px;
margin-top: 40px;
span {
font-size: 30px;
vertical-align: middle;
}
button,
.number {
font-size: 30px;
width: 48px;
height: 48px;
line-height: 48px;
}
.el-icon {
font-size: 30px;
}
}
}
}
}
</style>

View File

@ -1,17 +1,13 @@
<template>
<MyDialog v-if="show" v-model="show" width="60vw" height="65vh" class="attendance-info-dlg">
<template slot="title">
{{ title }}
</template>
<template slot="title">{{ title }}</template>
<div class="head-title-tab" style="padding: 10px 0px;">
<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>
<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>
</div>
<el-table v-loading="loading" :data="dataList" v-if="type == 0" class="data-list" :height="tbHeight">
<el-table-column label="头像" align="center">
<template #default="scope">
<el-image :src="scope.row.userPicture" :preview-teleported="true" class="att-img"
:preview-src-list="[scope.row.userPicture]"></el-image>
<el-image :src="scope.row.userPicture" :preview-teleported="true" class="att-img" :preview-src-list="[scope.row.userPicture]"></el-image>
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="userName" />
@ -23,14 +19,12 @@
<span v-else style="color: red">离场</span>
</template>
</el-table-column>
<el-table-column label="进场日期" align="center" prop="createTime"
:width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '300px'">
<el-table-column label="进场日期" align="center" prop="createTime" :width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '300px'">
<template #default="scope">{{ scope.row.createTime | toDate }}</template>
</el-table-column>
<el-table-column label="所属单位" align="center" prop="subDeptName" />
<el-table-column label="班组" align="center" prop="subDeptGroupName"
:width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '300px'" />
<el-table-column label="班组" align="center" prop="subDeptGroupName" :width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '300px'" />
<el-table-column label="工种类型" align="center" prop="craftType">
<template #default="scope">
<dict-tag :options="types" :value="scope.row.craftType" />
@ -43,13 +37,11 @@
</el-table-column>
<el-table-column label="出生日期" align="center" prop="info.birthDayStr" v-if="false" />
</el-table>
<el-table v-loading="loading" :data="dataList" v-if="type == 1" class="data-list" :height="tbHeight">
<el-table-column label="进场照片" align="center" prop="inPhoto">
<template #default="scope">
<el-image v-if="scope.row.inPhoto" :src="scope.row.inPhoto" class="att-img"
:preview-teleported="true" :preview-src-list="[scope.row.inPhoto]"></el-image>
<el-image v-if="scope.row.inPhoto" :src="scope.row.inPhoto" class="att-img" :preview-teleported="true" :preview-src-list="[scope.row.inPhoto]"></el-image>
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="userName" />
@ -64,8 +56,7 @@
<el-table-column label="离场照片" align="center" prop="outPhoto">
<template #default="scope">
<el-image v-if="scope.row.outPhoto" :src="scope.row.outPhoto" class="att-img"
:preview-teleported="true" :preview-src-list="[scope.row.outPhoto]"></el-image>
<el-image v-if="scope.row.outPhoto" :src="scope.row.outPhoto" class="att-img" :preview-teleported="true" :preview-src-list="[scope.row.outPhoto]"></el-image>
</template>
</el-table-column>
<el-table-column label="离场时间" align="center" prop="outTime">
@ -74,8 +65,7 @@
<span v-else class="el-icon-close" style="color: red;font-weight: bold;"></span>
</template>
</el-table-column>
<el-table-column label="班组" align="center" prop="subDeptGroupName"
:width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '400px'" />
<el-table-column label="班组" align="center" prop="subDeptGroupName" :width="$dpi() == '1K' ? '120px' : $dpi() == '2K' ? '200px' : '400px'" />
<el-table-column label="工种类型" align="center" prop="craftType">
<template #default="scope">
<dict-tag :options="types" :value="scope.row.craftType" class="dict-tag" />
@ -87,9 +77,15 @@
</template>
</el-table-column>
</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>
</template>
@ -98,7 +94,7 @@ export default {
//
data() {
return {
dpi: "",
dpi: '',
show: false,
title: '在岗人员',
prjInfo: {},
@ -116,93 +112,102 @@ export default {
}
},
mounted() {
this.dpi = this.$dpi();
window.addEventListener("resize", () => {
this.dpi = this.$dpi()
window.addEventListener('resize', () => {
if (this.dpi != this.$dpi()) {
this.dpi = this.$dpi();
this.resize();
this.dpi = this.$dpi()
this.resize()
}
});
this.resize();
})
this.resize()
},
methods: {
resize() {
let is1K = this.$dpi() == "1K";
let is2K = this.$dpi() == "2K";
this.tbHeight = is1K ? 400 : is2K ? 500 : 600;
let is1K = this.$dpi() == '1K'
let is2K = this.$dpi() == '2K'
this.tbHeight = is1K ? 400 : is2K ? 500 : 600
},
handleCurrentChange(n) {
this.index = n;
this.loadData();
this.index = n
this.loadData()
},
showDialog(opt) {
this.prjInfo = opt.prjInfo || {};
this.type = opt.type || 0;
this.title = this.type == 0 ? "在岗人员" : "今日出勤";
this.attendanceData = opt.attendanceData || [];
this.show = true;
this.$api.dict("pro_craft_type").then(dicts => {
this.types = dicts || [];
});
this.$api.dict("pro_craft_post").then(dicts => {
this.pro_craft_post = dicts || [];
});
this.index = 1;
this.loadData();
this.prjInfo = opt.prjInfo || {}
this.type = opt.type || 0
this.title = this.type == 0 ? '在岗人员' : '今日出勤'
this.attendanceData = opt.attendanceData || []
this.show = true
this.$api.dict('pro_craft_type').then((dicts) => {
this.types = dicts || []
})
this.$api.dict('pro_craft_post').then((dicts) => {
this.pro_craft_post = dicts || []
})
debugger
this.index = 1
this.loadData()
},
loadData() {
let ajax = this.$api.detail.subdeptsUsersList;
if (this.prjInfo.vendorsCode == 'uni') {
this.loadDataUni()
} else {
this.loadDataJh()
}
},
loadDataUni() {
let ajax = this.$api.detail.subdeptsUsersList
let postData = {
pageSize: this.size,
pageNum: this.index,
craftType: this.nav,
comId: this.prjInfo.comId,
useStatus: 0,
projectId: this.prjInfo.id
};
projectId: this.prjInfo.id,
}
if (this.type == 1) {
ajax = this.$api.detail.attendanceUbiDataList;
ajax = this.$api.detail.attendanceUbiDataList
postData = {
pageSize: this.size,
pageNum: this.index,
comId: this.prjInfo.comId,
projectId: this.prjInfo.id,
craftType: this.nav,
inTime: this.$dt(new Date()).format("YYYY-MM-DD")
};
inTime: this.$dt(new Date()).format('YYYY-MM-DD'),
}
this.loading = true;
ajax(postData).then(d => {
this.loading = false;
}
this.loading = true
ajax(postData).then((d) => {
this.loading = false
if (this.type == 0) {
this.dataList = (d.rows || []).map(d => {
d.info = this.$tryToJson(d.userInfos || "{}")
d.user = d.user || {};
this.dataList = (d.rows || []).map((d) => {
d.info = this.$tryToJson(d.userInfos || '{}')
d.user = d.user || {}
if (d.info.birthDay) {
let birthDay = this.$dt(d.info.birthDay).format("YYYY-MM-DD");
d.info.birthDayStr = birthDay;
d.info.age = this.$dt(new Date()).diff(d.info.birthDay, 'year');
let birthDay = this.$dt(d.info.birthDay).format('YYYY-MM-DD')
d.info.birthDayStr = birthDay
d.info.age = this.$dt(new Date()).diff(d.info.birthDay, 'year')
}
d.sex = d.userSex == 0 ? '男' : '女';
d.nativePlace = d.info.nativePlace || "";
return d;
});
d.sex = d.userSex == 0 ? '男' : '女'
d.nativePlace = d.info.nativePlace || ''
return d
})
} else {
this.dataList = d.rows || [];
this.dataList = d.rows || []
}
this.total = d.total || 0;
});
this.total = d.total || 0
})
},
loadDataJh() {},
doNav(n) {
this.nav = n.value;
this.index = 1;
this.loadData();
this.nav = n.value
this.index = 1
this.loadData()
},
getTypeCount(it) {
let tmps = this.attendanceData.filter(d => d.id == it.value)
return tmps.length > 0 ? tmps[0].value : 0;
}
}
let tmps = this.attendanceData.filter((d) => d.id == it.value)
return tmps.length > 0 ? tmps[0].value : 0
},
},
}
</script>
@ -277,7 +282,6 @@ export default {
line-height: 28px !important;
vertical-align: middle !important;
}
}
}
@ -340,7 +344,6 @@ export default {
line-height: 36px !important;
vertical-align: middle !important;
}
}
}
}
@ -410,7 +413,6 @@ export default {
line-height: 48px !important;
vertical-align: middle !important;
}
}
}
}

View File

@ -474,6 +474,8 @@
</el-col>
<project-info-dialog ref="infoDlg"></project-info-dialog>
<attendanceInfoDlg ref="attDlg"></attendanceInfoDlg>
<jh-attendance-detail-dialog ref="jhAttDlg"></jh-attendance-detail-dialog>
<jh-job-worker-dialog ref="jhJobWorkerDlg"></jh-job-worker-dialog>
</div>
</template>
@ -482,6 +484,8 @@ import projectInfoDialog from './detail/projectInfoDialog.vue'
import staffSurveyChart from '@/components/staffSurveyChart.vue'
import MonitAndWarning from './components/MonitAndWarning.vue'
import attendanceInfoDlg from './detail/attendanceInfoDlg.vue'
import jhAttendanceDetailDialog from './detail/AttendanceDetailDialog.vue'
import jhJobWorkerDialog from './detail/JobWorkerDialog.vue'
import debounce from 'lodash.debounce'
export default {
components: {
@ -489,6 +493,8 @@ export default {
staffSurveyChart,
MonitAndWarning,
attendanceInfoDlg,
jhAttendanceDetailDialog,
jhJobWorkerDialog,
},
data() {
return {
@ -654,7 +660,6 @@ export default {
})
},
loadAttendanceData() {
debugger
if (this.prjInfo.vendorsCode != 'uni') {
this.loadJhAttendanceData()
} else {
@ -731,11 +736,34 @@ export default {
this.loadAttendanceData()
},
doShowAttendanceDetail() {
if (this.prjInfo.vendorsCode == 'uni') {
this.$refs.attDlg.showDialog({
prjInfo: this.prjInfo,
attendanceData: this.attendanceData,
type: this.attendanceNav,
})
} else {
let data = {
deptId: this.prjInfo.deptId || 0,
projectId: this.prjInfo.id || 0,
attendanceTime: this.$dt(new Date()).format('YYYY-MM-DD'),
}
if (this.attendanceNav === 1) {
this.$refs.jhAttDlg.showDialog(data)
} else {
this.$refs.jhJobWorkerDlg.showDialog({
...data,
type: this.attendanceNav,
total: this.attendanceTotal,
datas: this.attendanceData.map((it) => {
return {
text: it.text.replace('总包人员', '101').replace('监理人员', '102').replace('劳务人员', '103'),
cnt: it.value,
}
}),
})
}
}
},
doDeviceNav(n) {
this.deviceNav = n

View File

@ -2,6 +2,7 @@ package com.yanzhu.manage.controller.bigscreen;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* Conller
@ -102,4 +104,19 @@ public class ProjectAttendanceController extends BaseController {
return getDataTable(list);
}
@GetMapping("/list")
public TableDataInfo list(SurProjectAttendanceData surProjectAttendanceData)
{
startPage();
String tmp=surProjectAttendanceData.getAttendanceTime();
if(StrUtil.isNotEmpty(tmp)){
int year= DateUtil.parse(tmp).year();
surProjectAttendanceData.setYear(year);
}
List<SurProjectAttendanceData> list = attendanceDataService.selectSurProjectAttendanceDataList(surProjectAttendanceData);
return getDataTable(list);
}
}