update code
parent
47720295c5
commit
7977b43ec0
|
@ -3401,7 +3401,13 @@ table{
|
|||
.quality-table .el-table::before{
|
||||
background: none;
|
||||
}
|
||||
|
||||
.quality-table .el-table__footer-wrapper tbody td.el-table__cell{
|
||||
background: none ;
|
||||
color: #fff ;
|
||||
font-weight: bold;
|
||||
font-size:16px;
|
||||
border-bottom: solid 1px rgba(60, 170, 255, 0.3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -45,6 +45,21 @@ const todayAttendance=(data)=>{
|
|||
})
|
||||
}
|
||||
|
||||
const workerOnDuty=(data)=>{
|
||||
return request({
|
||||
url:"bgscreen/attendance/workerOnDuty",
|
||||
method:"get",
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
const groupByWorkerOnDuty=(data)=>{
|
||||
return request({
|
||||
url:"bgscreen/attendance/groupByWorkerOnDuty",
|
||||
method:"get",
|
||||
params:data
|
||||
})
|
||||
}
|
||||
const selectList=(data,pageNum,pageSize)=>{
|
||||
return request({
|
||||
url: `bgscreen/attendance/selectList?pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||
|
@ -59,5 +74,7 @@ export default{
|
|||
todayAttendance,
|
||||
selectList,
|
||||
groupAllByComany,
|
||||
listAttendance
|
||||
listAttendance,
|
||||
workerOnDuty,
|
||||
groupByWorkerOnDuty
|
||||
}
|
|
@ -1,16 +1,51 @@
|
|||
<template>
|
||||
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" class="job-worker-dialog">
|
||||
<template slot="title">在岗人数({{ cnt}})</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="projectName" />
|
||||
<el-table-column label="部门" align="left" prop="deptName" ></el-table-column>
|
||||
<el-table-column label="劳务人数" align="center" prop="servicePersonnel" />
|
||||
<el-table-column label="监理人数" align="center" prop="supervisorPersonnel" />
|
||||
<el-table-column label="总包人数" align="center" prop="contractorPersonnel" />
|
||||
</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 v-if="show" v-model="show" width="1600px" height="850px" class="today-attendance-detail">
|
||||
<template v-if="isGroup">
|
||||
<template slot="title">在岗人数({{ 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>
|
||||
|
||||
</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="650"
|
||||
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]" style="height:60px" />
|
||||
</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" />
|
||||
<el-table-column label="所属班组" align="center" prop="groupName" />
|
||||
<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>
|
||||
|
||||
|
@ -25,56 +60,124 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
show: false,
|
||||
tableData: [],
|
||||
projectId:0,
|
||||
deptId:0,
|
||||
size:10,
|
||||
index:1,
|
||||
total:0,
|
||||
nav:1,
|
||||
cnt:0,
|
||||
projectId: 0,
|
||||
deptId: 0,
|
||||
isGroup: false,
|
||||
size: 10,
|
||||
index: 1,
|
||||
total: 0,
|
||||
nav: 101,
|
||||
indexData: {
|
||||
total: 0,
|
||||
data101: 0,
|
||||
data102: 0,
|
||||
data103: 0
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleCurrentChange(n){
|
||||
this.index=n;
|
||||
handleCurrentChange(n) {
|
||||
this.index = n;
|
||||
this.loadData();
|
||||
},
|
||||
doNav(n){
|
||||
this.nav=n;
|
||||
this.index=1;
|
||||
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();
|
||||
showDialog(data) {debugger
|
||||
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.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
|
||||
},
|
||||
loadData(){
|
||||
let postData={
|
||||
projectId:this.projectId,
|
||||
deptId:this.deptId,
|
||||
id:this.nav
|
||||
loadGroupData() {
|
||||
this.$api.attendance.groupByWorkerOnDuty({ deptId: this.deptId }).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
|
||||
};
|
||||
obj[k] = o;
|
||||
} else {
|
||||
o = obj[k];
|
||||
}
|
||||
sum += it.cnt;
|
||||
o['data' + it.companyId] += it.cnt;
|
||||
});
|
||||
this.tableData = [];
|
||||
for (let k in obj) {
|
||||
this.tableData.push(obj[k]);
|
||||
}
|
||||
this.total = sum;
|
||||
})
|
||||
},
|
||||
loadData() {
|
||||
let postData = {
|
||||
projectId: this.projectId,
|
||||
pageSize: this.size,
|
||||
pageNum: this.index,
|
||||
id: this.nav
|
||||
}
|
||||
this.$api.attendance.selectList(postData,this.index,this.size).then(d=>{
|
||||
let cnt=0;
|
||||
this.total=(d.total||0)
|
||||
this.tableData=(d.rows||[]).map(it=>{
|
||||
cnt+=(it.servicePersonnel||0);
|
||||
cnt+=(it.supervisorPersonnel||0);
|
||||
cnt+=(it.contractorPersonnel||0);
|
||||
this.tableData = [];
|
||||
this.loading = true;
|
||||
this.$api.attendance.workerOnDuty(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.cnt=cnt;
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -82,34 +185,37 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.mytable{
|
||||
/deep/ th .cell{
|
||||
.mytable {
|
||||
/deep/ th .cell {
|
||||
color: aquamarine;
|
||||
}
|
||||
}
|
||||
.job-worker-dialog{
|
||||
/deep/ .quality-table {
|
||||
.el-table__footer-wrapper td{
|
||||
background: transparent;
|
||||
background-image: none !important;
|
||||
border-bottom:solid 1px rgba(60,170,255,0.3);
|
||||
}
|
||||
.el-table .el-table__row{
|
||||
|
||||
.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);
|
||||
|
||||
td {
|
||||
border-bottom: solid 1px rgba(60, 170, 255, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.job-worker-dialog{
|
||||
.popup-project-introduction-min {
|
||||
.today-attendance-detail {
|
||||
.popup-project-introduction-min {
|
||||
transform: translateY(100px);
|
||||
.bg-pagination{
|
||||
margin-top:20px;
|
||||
|
||||
.bg-pagination {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.head-title-tab {
|
||||
.head-nav {
|
||||
padding: 4px 36px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -46,7 +46,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12" style="position: relative;">
|
||||
<module-one-1-1 label="人员统计" :key="elDeptWorks">
|
||||
<img src="images/icon2001.png" v-show="infoNav == 1" style="position: absolute;cursor: pointer;right: 20px;top: 12px;"
|
||||
<img src="images/icon2001.png" v-show="laborPersonnelTotal>0" style="position: absolute;cursor: pointer;right: 20px;top: 12px;"
|
||||
@click="doShowAttendanceDetail">
|
||||
<div class="warning-info-title" style="padding-left: 20px;">
|
||||
<div :class="infoNav == 0 ? 'active' : ''" @click="onWarningInfoNav(0)">在岗人数</div>
|
||||
|
@ -220,6 +220,7 @@
|
|||
<index-dlg3 ref="dlg3"></index-dlg3>
|
||||
<journalismDlg ref="journalismDlg"></journalismDlg>
|
||||
<AttendanceDetailDialog ref="attDetailDlg"></AttendanceDetailDialog>
|
||||
<AttendanceWorkerDialog ref="workerDlg"></AttendanceWorkerDialog>
|
||||
<JobWorkerDialog ref="jobWorkerdlg"></JobWorkerDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -234,6 +235,7 @@ import MonitAndWarning from './components/MonitAndWarning.vue'
|
|||
import journalismDlg from './dlg/journalismDlg.vue'
|
||||
import debounce from 'lodash.debounce'
|
||||
import AttendanceDetailDialog from './components/AttendanceDetailDialog.vue'
|
||||
import AttendanceWorkerDialog from './components/AttendanceWorkerDialog.vue'
|
||||
import mapIndex from './index/mapIndex.vue'
|
||||
import JobWorkerDialog from './components/JobWorkerDialog.vue'
|
||||
export default {
|
||||
|
@ -244,7 +246,7 @@ export default {
|
|||
indexDlg3,
|
||||
MonitAndWarning,
|
||||
journalismDlg,
|
||||
AttendanceDetailDialog,mapIndex,JobWorkerDialog
|
||||
AttendanceDetailDialog,mapIndex,JobWorkerDialog,AttendanceWorkerDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -532,7 +534,16 @@ export default {
|
|||
if(this.infoNav == 1){
|
||||
this.$refs.attDetailDlg.showDialog(data);
|
||||
}else{
|
||||
this.$refs.jobWorkerdlg.showDialog(data);
|
||||
this.$refs.jobWorkerdlg.showDialog({
|
||||
...data,
|
||||
total:this.laborPersonnelTotal,
|
||||
datas:this.laborPersonnelData.map(it=>{
|
||||
return {
|
||||
text:it.text.replace("总包人员","101").replace("监理人员","102").replace("劳务人员","103"),
|
||||
cnt:it.value
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
//查询在岗人数
|
||||
|
@ -546,7 +557,7 @@ export default {
|
|||
if (this.infoNav == 0) {
|
||||
ajax=this.$api.attendance.groupAllByComany
|
||||
}
|
||||
ajax(data).then(d=>{
|
||||
ajax(data).then(d=>{
|
||||
let tmps=d.data||[];
|
||||
const func=(ids)=>{
|
||||
let sum=0;
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<div :class="infoNav == 1 ? 'active' : ''" @click="onWarningInfoNav(1, '今日出勤')">今日出勤
|
||||
</div>
|
||||
</div>
|
||||
<img src="images/icon2001.png" v-show="infoNav == 1 " style="position: absolute;cursor: pointer;right: 20px;top: 12px;"
|
||||
<img src="images/icon2001.png" v-show="laborPersonnelTotal>0" style="position: absolute;cursor: pointer;right: 20px;top: 12px;"
|
||||
@click="doShowAttendanceDetail">
|
||||
<el-row :key="elDeptWorks">
|
||||
<el-col :span="8">
|
||||
|
@ -781,7 +781,16 @@ export default {
|
|||
if (this.infoNav == 1) {
|
||||
this.$refs.attDetailDlg.showDialog(data);
|
||||
} else {
|
||||
this.$refs.jobWorkerdlg.showDialog(data);
|
||||
this.$refs.jobWorkerdlg.showDialog({
|
||||
...data,
|
||||
total:this.laborPersonnelTotal,
|
||||
datas:this.laborPersonnelData.map(it=>{
|
||||
return {
|
||||
text:it.text.replace("总包人员","101").replace("监理人员","102").replace("劳务人员","103"),
|
||||
cnt:it.value
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue