update code
parent
732c9c705f
commit
d641a73d5e
|
@ -270,6 +270,49 @@ table {
|
|||
padding-top: 32px;
|
||||
display: flex;
|
||||
}
|
||||
.head-title-tab .head-nav {
|
||||
text-align: center;
|
||||
color: #6383aa;
|
||||
cursor: pointer;
|
||||
background: url("../images/title_tab.png") no-repeat center / 100% 100%;
|
||||
}
|
||||
.head-title-tab .head-nav.active {
|
||||
background: url("../images/title_tab_active.png") no-repeat center / 100% 100%;
|
||||
color: #ffffff;
|
||||
}
|
||||
.head-title-tab .head-nav.active.hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
.head-title-tab .head-nav.hove {
|
||||
color: #86b2e3;
|
||||
}
|
||||
@media (max-width: 1920px) {
|
||||
.head-title-tab .head-nav {
|
||||
font-size: 14px;
|
||||
padding: 0px 20px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1921px) and (max-width: 2560px) {
|
||||
.head-title-tab .head-nav {
|
||||
font-size: 20px;
|
||||
padding: 0px 30px;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 2561px) {
|
||||
.head-title-tab {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.head-title-tab .head-nav {
|
||||
font-size: 28px;
|
||||
padding: 0px 50px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
}
|
||||
}
|
||||
.head-title-select {
|
||||
padding-top: 23px;
|
||||
width: 12% ;
|
||||
|
@ -281,26 +324,6 @@ table {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.head-nav {
|
||||
width: 105px;
|
||||
height: 35px;
|
||||
padding: 0px 8px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
color: #6383aa;
|
||||
cursor: pointer;
|
||||
background: url("../images/title_tab.png") no-repeat center / 100% 100%;
|
||||
}
|
||||
.head-nav.active {
|
||||
background: url("../images/title_tab_active.png") no-repeat center / 100% 100%;
|
||||
color: #ffffff;
|
||||
}
|
||||
.head-nav:hover {
|
||||
color: #86b2e3;
|
||||
}
|
||||
.head-nav.active:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
.head-select {
|
||||
height: 35px;
|
||||
padding-left: 25px;
|
||||
|
|
|
@ -284,6 +284,55 @@ table{
|
|||
.head-title-tab{
|
||||
padding-top: 32px;
|
||||
display: flex;
|
||||
.head-nav{
|
||||
|
||||
|
||||
text-align: center;
|
||||
color: #6383aa;
|
||||
cursor: pointer;
|
||||
background: url("../images/title_tab.png") no-repeat center/100% 100%;
|
||||
&.active{
|
||||
background: url("../images/title_tab_active.png") no-repeat center/100% 100%;
|
||||
color: #ffffff;
|
||||
&.hover{
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
&.hove{
|
||||
color: #86b2e3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 1920px) {
|
||||
.head-title-tab{
|
||||
.head-nav{
|
||||
font-size:14px;
|
||||
padding:0px 20px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (min-width: 1921px) and (max-width: 2560px) {
|
||||
.head-title-tab{
|
||||
.head-nav{
|
||||
font-size:20px;
|
||||
padding:0px 30px;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (min-width: 2561px) {
|
||||
.head-title-tab{
|
||||
padding-top: 20px;
|
||||
.head-nav{
|
||||
font-size:28px;
|
||||
padding:0px 50px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.head-title-select{
|
||||
|
@ -297,26 +346,8 @@ table{
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.head-nav{
|
||||
width: 105px;
|
||||
height: 35px;
|
||||
padding:0px 8px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
color: #6383aa;
|
||||
cursor: pointer;
|
||||
background: url("../images/title_tab.png") no-repeat center/100% 100%;
|
||||
}
|
||||
.head-nav.active{
|
||||
background: url("../images/title_tab_active.png") no-repeat center/100% 100%;
|
||||
color: #ffffff;
|
||||
}
|
||||
.head-nav:hover{
|
||||
color: #86b2e3;
|
||||
}
|
||||
.head-nav.active:hover{
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
.head-select{
|
||||
height: 35px;
|
||||
padding-left: 25px;
|
||||
|
|
|
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
|||
|
||||
const getDict=(dictName)=> {
|
||||
let key='dict_'+dictName;
|
||||
let obj=window.jhcaches[key];
|
||||
let obj=window.xdcaches[key];
|
||||
if(obj && obj.length>0){
|
||||
return new Promise((resolve)=>{
|
||||
resolve(obj);
|
||||
|
@ -15,7 +15,7 @@ const getDict=(dictName)=> {
|
|||
});
|
||||
let obj=data.data||[];
|
||||
if(obj && obj.length>0){
|
||||
window.jhcaches[key]=obj;
|
||||
window.xdcaches[key]=obj;
|
||||
}
|
||||
resolve(obj);
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ import request from '@/utils/requestOthers'
|
|||
|
||||
const getDict = (dictName) => {
|
||||
let key = 'dict_' + dictName;
|
||||
let obj = window.jhcaches[key];
|
||||
let obj = window.xdcaches[key];
|
||||
if (obj && obj.length > 0) {
|
||||
return new Promise((resolve) => {
|
||||
resolve(obj);
|
||||
|
@ -15,7 +15,7 @@ const getDict = (dictName) => {
|
|||
});
|
||||
let obj = data.data || [];
|
||||
if (obj && obj.length > 0) {
|
||||
window.jhcaches[key] = obj;
|
||||
window.xdcaches[key] = obj;
|
||||
}
|
||||
resolve(obj);
|
||||
});
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
import request from "@/utils/request";
|
||||
|
||||
const groupByCraftType = (data) => {
|
||||
return request({
|
||||
url: "/manage/proProjectInfoSubdeptsUsers/groupByCraftType",
|
||||
method: "get",
|
||||
params:data
|
||||
});
|
||||
};
|
||||
|
||||
const groupByCraftTypeByAttendance = (data) => {
|
||||
return request({
|
||||
url: "/manage/proProjectInfoSubdeptsUsers/groupByCraftTypeByAttendance",
|
||||
method: "get",
|
||||
params:data
|
||||
});
|
||||
};
|
||||
|
||||
const subdeptsUsersList=(data)=>{
|
||||
return request({
|
||||
url: "/manage/proProjectInfoSubdeptsUsers/list",
|
||||
method: "get",
|
||||
params:data
|
||||
});
|
||||
}
|
||||
|
||||
const attendanceUbiDataList=(data)=>{
|
||||
return request({
|
||||
url: "/manage/attendanceUbiData/list",
|
||||
method: "get",
|
||||
params:data
|
||||
});
|
||||
}
|
||||
export default{
|
||||
groupByCraftType,
|
||||
groupByCraftTypeByAttendance,
|
||||
subdeptsUsersList,
|
||||
attendanceUbiDataList
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const getDict=(dictName)=> {
|
||||
let key='dict_'+dictName;
|
||||
let obj=window.xdcaches[key];
|
||||
if(obj && obj.length>0){
|
||||
return new Promise((resolve)=>{
|
||||
resolve(obj);
|
||||
})
|
||||
}else{
|
||||
return new Promise(async (resolve)=>{
|
||||
let data=await request({
|
||||
url: `system/dict/data/type/${dictName}`,
|
||||
method: 'get'
|
||||
});
|
||||
let obj=(data.data||[]).map(p=>{
|
||||
return {
|
||||
label:p.dictLabel,
|
||||
value:p.dictValue,
|
||||
raw:p
|
||||
}
|
||||
});
|
||||
if(obj && obj.length>0){
|
||||
window.xdcaches[key]=obj;
|
||||
}
|
||||
resolve(obj);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default getDict;
|
|
@ -2,9 +2,13 @@
|
|||
import {axios,download} from '@/utils/request'
|
||||
import project from './project'
|
||||
import weather from './weather'
|
||||
import detail from './detail'
|
||||
import dict from './dict'
|
||||
export default {
|
||||
http:axios,
|
||||
downFile:download,
|
||||
project,
|
||||
weather
|
||||
weather,
|
||||
detail,
|
||||
dict
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<div>
|
||||
<template v-for="(item, index) in options">
|
||||
<template v-if="values.includes(item.value)">
|
||||
<span v-if="item.raw.listClass == 'default' || item.raw.listClass == ''" :key="item.value" :index="index"
|
||||
:class="item.raw.cssClass">{{ item.label + ' ' }}</span>
|
||||
<el-tag v-else :disable-transitions="true" :key="item.value" :index="index"
|
||||
:type="item.raw.listClass == 'primary' ? '' : item.raw.listClass" :class="item.raw.cssClass">
|
||||
{{ item.label + ' ' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="unmatch && showValue">
|
||||
{{ unmatchArray | handleArray }}
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DictTag",
|
||||
props: {
|
||||
options: {
|
||||
type: Array,
|
||||
default: null,
|
||||
},
|
||||
value: [Number, String, Array],
|
||||
// 当未找到匹配的数据时,显示value
|
||||
showValue: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unmatchArray: [], // 记录未匹配的项
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
values() {
|
||||
if (this.value !== null && typeof this.value !== 'undefined') {
|
||||
return Array.isArray(this.value) ? this.value : [String(this.value)];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
unmatch() {
|
||||
this.unmatchArray = [];
|
||||
if (this.value !== null && typeof this.value !== 'undefined') {
|
||||
// 传入值为非数组
|
||||
if (!Array.isArray(this.value)) {
|
||||
if (this.options.some(v => v.value == this.value)) return false;
|
||||
this.unmatchArray.push(this.value);
|
||||
return true;
|
||||
}
|
||||
// 传入值为Array
|
||||
this.value.forEach(item => {
|
||||
if (!this.options.some(v => v.value == item)) this.unmatchArray.push(item)
|
||||
});
|
||||
return true;
|
||||
}
|
||||
// 没有value不显示
|
||||
return false;
|
||||
},
|
||||
|
||||
},
|
||||
filters: {
|
||||
handleArray(array) {
|
||||
if (array.length === 0) return '';
|
||||
return array.reduce((pre, cur) => {
|
||||
return pre + ' ' + cur;
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-tag+.el-tag {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
|
@ -144,16 +144,7 @@ export default {
|
|||
}
|
||||
|
||||
@media (min-width: 2561px) {
|
||||
.div-header {
|
||||
.head-nav {
|
||||
font-size: 30px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 10px 30px;
|
||||
position: relative;
|
||||
top: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.header-center {
|
||||
font-size: 52px !important;
|
||||
|
|
|
@ -59,7 +59,7 @@ window.fullscreenInterval=setInterval(()=>{
|
|||
}
|
||||
}
|
||||
},500);
|
||||
window.jhcaches={};
|
||||
window.xdcaches={};
|
||||
/*
|
||||
Api.project.getInfo().then(d=>{
|
||||
if(d.code==200){
|
||||
|
|
|
@ -212,14 +212,14 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
// let objs = window.jhcaches?.progressProjects
|
||||
// let objs = window.xdcaches?.progressProjects
|
||||
// if (objs && objs.length > 0) {
|
||||
// this.prjs = objs;
|
||||
// return;
|
||||
// }
|
||||
// this.$api.project.getProgressProjects().then(d => {
|
||||
// this.prjs = d.data || [];
|
||||
// window.jhcaches.progressProjects = this.prjs;
|
||||
// window.xdcaches.progressProjects = this.prjs;
|
||||
// });
|
||||
this.$bus.$on('fullscreen',b=>{
|
||||
setTimeout(()=>{
|
||||
|
|
|
@ -0,0 +1,378 @@
|
|||
<template>
|
||||
<MyDialog v-if="show" v-model="show" width="60vw" height="65vh" class="attendance-info-dlg">
|
||||
<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>
|
||||
<el-table v-loading="loading" :data="dataList" v-if="type == 0" class="data-list">
|
||||
<el-table-column label="头像" align="center">
|
||||
<template #default="scope">
|
||||
<el-image :src="scope.row.user.userPicture" :preview-teleported="true"
|
||||
class="att-img" :preview-src-list="[scope.row.user.userPicture]"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" prop="user.userName" />
|
||||
<el-table-column label="籍贯" align="center" prop="info.nativePlace" />
|
||||
<el-table-column label="性别" align="center" prop="user.sex" />
|
||||
<el-table-column label="状态" align="center" prop="enterState">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.enterState == 0" style="color: green;">在场</span>
|
||||
<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'">
|
||||
<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="craftType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="types" :value="scope.row.craftType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工种岗位" align="center" prop="craftPost">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" />
|
||||
</template>
|
||||
</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">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" prop="userName" />
|
||||
<el-table-column label="项目" align="center" prop="projectName" />
|
||||
<el-table-column label="单位" align="center" prop="subDeptName" />
|
||||
<el-table-column label="进场时间" align="center" prop="inTime" width="180">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.inTime">{{ scope.row.inTime | toTime }}</span>
|
||||
<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="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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离场时间" align="center" prop="outTime">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outTime">{{ scope.row.outTime | toTime }}</span>
|
||||
<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="craftType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="types" :value="scope.row.craftType" class="dict-tag" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工种岗位" align="center" prop="craftPost">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" class="dict-tag" />
|
||||
</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 {
|
||||
//在岗人员
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
title: '在岗人员',
|
||||
prjInfo: {},
|
||||
types: [],
|
||||
pro_craft_post: [],
|
||||
nav: 1,
|
||||
attendanceData: [],
|
||||
type: 0,
|
||||
size: 10,
|
||||
index: 1,
|
||||
total: 0,
|
||||
dataList: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleCurrentChange(n) {
|
||||
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();
|
||||
},
|
||||
loadData() {
|
||||
let ajax = this.$api.detail.subdeptsUsersList;
|
||||
let postData = {
|
||||
pageSize: this.size,
|
||||
pageNum: this.index,
|
||||
craftType: this.nav,
|
||||
comId: this.prjInfo.comId,
|
||||
projectId: this.prjInfo.id
|
||||
};
|
||||
if (this.type == 1) {
|
||||
ajax = this.$api.detail.attendanceUbiDataList;
|
||||
postData = {
|
||||
pageSize: this.size,
|
||||
pageNum: this.index,
|
||||
comId: this.prjInfo.comId,
|
||||
projectId: this.prjInfo.id,
|
||||
craftType: this.nav,
|
||||
inTime: '2024-10-14'
|
||||
};
|
||||
}
|
||||
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.user?.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');
|
||||
}
|
||||
return d;
|
||||
});
|
||||
} else {
|
||||
this.dataList = d.rows || [];
|
||||
}
|
||||
this.total = d.total || 0;
|
||||
});
|
||||
},
|
||||
doNav(n) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.attendance-info-dlg {
|
||||
.data-list {
|
||||
margin-top:10px;
|
||||
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 {
|
||||
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-pagination {
|
||||
* {
|
||||
font-size: 14px !important;
|
||||
height: 28px !important;
|
||||
line-height: 28px !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1921px) and (max-width: 2560px) {
|
||||
.attendance-info-dlg {
|
||||
.data-list {
|
||||
th {
|
||||
.cell {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
.cell {
|
||||
font-size: 20px;
|
||||
.el-tag{
|
||||
font-size:20px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__empty-text {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.el-table__row {
|
||||
&:nth-child(odd) {
|
||||
background-size: 100% 70px;
|
||||
}
|
||||
|
||||
td {
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-image.att-img {
|
||||
img {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.el-image__error {
|
||||
height: 60px;
|
||||
position: relative;
|
||||
top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
* {
|
||||
font-size: 20px !important;
|
||||
height: 36px !important;
|
||||
line-height: 36px !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 2561px) {
|
||||
.attendance-info-dlg {
|
||||
.data-list {
|
||||
th {
|
||||
height: 50px;
|
||||
.cell {
|
||||
font-size: 30px;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
height: 50px;
|
||||
.cell {
|
||||
font-size: 30px;
|
||||
line-height: 48px;
|
||||
.el-tag{
|
||||
font-size:30px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__empty-text {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.el-table__row {
|
||||
&:nth-child(odd) {
|
||||
background-size: 100% 90px;
|
||||
}
|
||||
|
||||
td {
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-image.att-img {
|
||||
img {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.el-image__error {
|
||||
height: 80px;
|
||||
position: relative;
|
||||
top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
* {
|
||||
font-size: 30px !important;
|
||||
height: 48px !important;
|
||||
line-height: 48px !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -13,6 +13,7 @@ import moduleOne21 from '../components/module/module-one-2-1.vue'
|
|||
import moduleOne22 from '../components/module/module-one-2-2.vue'
|
||||
import moduleOne23 from '../components/module/module-one-2-3.vue'
|
||||
import peopleNumber from '@/components/people-number.vue'
|
||||
import dictTag from '@/components/DictTag/index.vue'
|
||||
import MyDialog from '@/components/MyDialog.vue'
|
||||
//import projectOverviewChart from '../components/project-overview-chart.vue'
|
||||
//import peopleNumber from '../components/people-number.vue'
|
||||
|
@ -29,6 +30,7 @@ Vue.component("module-one-2-1",moduleOne21)
|
|||
Vue.component("module-one-2-2",moduleOne22)
|
||||
Vue.component("module-one-2-3",moduleOne23)
|
||||
Vue.component("people-number",peopleNumber)
|
||||
Vue.component("dict-tag",dictTag)
|
||||
Vue.component("MyDialog",MyDialog)
|
||||
Vue.prototype.$bus=new Vue();
|
||||
//Vue.component("people-number",peopleNumber)
|
||||
|
@ -81,4 +83,4 @@ window.fullscreenInterval=setInterval(()=>{
|
|||
}
|
||||
}
|
||||
},500);
|
||||
window.jhcaches={};
|
||||
window.xdcaches={};
|
||||
|
|
|
@ -118,18 +118,17 @@
|
|||
</div>
|
||||
</module-one-1-1>
|
||||
<module-one-1-1 label="劳务人员概况">
|
||||
<img src="images/icon2001.png" class="img-openwin" v-if="attendanceTotal > 0"
|
||||
@click="doShowAttendanceDetail" />
|
||||
<div class="attendance-info warning-info">
|
||||
<div class="attendance-info-title warning-info-title">
|
||||
<div :class="attendanceNav == 0 ? 'active' : ''" @click="doAttendanceNav(0, '在岗人数')">
|
||||
在岗人数
|
||||
<div :class="attendanceNav == 0 ? 'active' : ''" @click="doAttendanceNav(0, '在岗人员')">
|
||||
在岗人员
|
||||
</div>
|
||||
<div :class="attendanceNav == 1 ? 'active' : ''" @click="doAttendanceNav(2, '今日出勤')">
|
||||
<div :class="attendanceNav == 1 ? 'active' : ''" @click="doAttendanceNav(1, '今日出勤')">
|
||||
今日出勤
|
||||
</div>
|
||||
</div>
|
||||
<img src="images/icon2001.png" v-show="attendanceTotal > 0"
|
||||
style="position: absolute; cursor: pointer; right: 20px; top: 12px"
|
||||
@click="doShowAttendanceDetail" />
|
||||
<el-row>
|
||||
<el-col :span="8" class="attendance-tag">
|
||||
<div class="survey_content">
|
||||
|
@ -142,7 +141,7 @@
|
|||
<div class="survey_content_value">
|
||||
<span>{{ attendanceTotal }}</span> 人
|
||||
</div>
|
||||
<p>{{ attendanceNav == 0 ? '在岗人数' : '今日出勤' }}</p>
|
||||
<p>{{ attendanceNav == 0 ? '在岗人员' : '今日出勤' }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
|
@ -494,6 +493,7 @@
|
|||
</module-one-1-1>
|
||||
</el-col>
|
||||
<project-info-dialog ref="infoDlg"></project-info-dialog>
|
||||
<attendanceInfoDlg ref="attDlg"></attendanceInfoDlg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -501,13 +501,15 @@
|
|||
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 testData from './test/detail'
|
||||
import debounce from 'lodash.debounce'
|
||||
export default {
|
||||
components: {
|
||||
projectInfoDialog,
|
||||
staffSurveyChart,
|
||||
MonitAndWarning
|
||||
MonitAndWarning,
|
||||
attendanceInfoDlg,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -525,9 +527,9 @@ export default {
|
|||
attendanceNav: 0,
|
||||
attendanceTotal: 0,
|
||||
attendanceData: [
|
||||
{ text: "普通工种", value: 10 },
|
||||
{ text: "特殊工种", value: 20 },
|
||||
{ text: "管理人员", value: 30 },
|
||||
{ text: "普通工种", value: 0, id: 0, },
|
||||
{ text: "特殊工种", value: 0, id: 0, },
|
||||
{ text: "管理人员", value: 0, id: 0, },
|
||||
],
|
||||
deviceNav: 0,
|
||||
deviceData: [
|
||||
|
@ -619,6 +621,33 @@ export default {
|
|||
this.getWeatherNowInfo();
|
||||
}
|
||||
});
|
||||
this.loadAttendanceData();
|
||||
},
|
||||
loadAttendanceData() {
|
||||
let ajax = this.$api.detail.groupByCraftType;
|
||||
let posData = {
|
||||
comId: this.prjInfo.comId,
|
||||
projectId: this.prjInfo.id
|
||||
}
|
||||
if (this.attendanceNav == 1) {
|
||||
ajax = this.$api.detail.groupByCraftTypeByAttendance;
|
||||
//posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD");
|
||||
posData.createTime ='2024-10-13';
|
||||
}
|
||||
ajax(posData).then(d => {
|
||||
this.attendanceData = (d.data || []).map(it => {
|
||||
return {
|
||||
text: it.createBy,
|
||||
value: it.id || 0,
|
||||
id: it.craftType
|
||||
}
|
||||
});
|
||||
let count = 0;
|
||||
this.attendanceData.forEach(it => {
|
||||
count += it.value;
|
||||
});
|
||||
this.attendanceTotal = count;
|
||||
});
|
||||
},
|
||||
getWeatherNowInfo() {
|
||||
this.$api.weather.getCityNowInfo(this.cityId).then(cn => {
|
||||
|
@ -628,9 +657,15 @@ export default {
|
|||
},
|
||||
doAttendanceNav(n) {
|
||||
this.attendanceNav = n;
|
||||
this.loadAttendanceData();
|
||||
},
|
||||
doShowAttendanceDetail() {
|
||||
|
||||
this.$refs.attDlg.showDialog({
|
||||
prjInfo: this.prjInfo,
|
||||
attendanceData: this.attendanceData,
|
||||
type: this.attendanceNav
|
||||
}
|
||||
);
|
||||
},
|
||||
doDeviceNav(n) {
|
||||
this.deviceNav = n;
|
||||
|
@ -938,7 +973,12 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.attendance-info-title {
|
||||
* {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
}
|
||||
.attendance-tag {
|
||||
* {
|
||||
font-size: 24px;
|
||||
|
@ -1430,9 +1470,11 @@ export default {
|
|||
.dangerous-timeline-max {
|
||||
width: 1790px;
|
||||
height: 570px;
|
||||
.strip-max{
|
||||
top:136px;
|
||||
|
||||
.strip-max {
|
||||
top: 136px;
|
||||
}
|
||||
|
||||
.dangerous-timeline-con {
|
||||
width: 500px;
|
||||
font-size: 42px;
|
||||
|
|
|
@ -66,4 +66,12 @@ public interface ProProjectInfoSubdeptsUsersMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int findUserByUserPhone(String phonenumber);
|
||||
/**
|
||||
* 大屏-项目详情-在岗人员统计
|
||||
*/
|
||||
List<ProProjectInfoSubdeptsUsers> groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
/**
|
||||
* 大屏-项目详情-今日出勤期统计
|
||||
*/
|
||||
List<ProProjectInfoSubdeptsUsers> groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where);
|
||||
}
|
||||
|
|
|
@ -218,4 +218,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select count(1) from sys_user where phonenumber=#{phonenumber}
|
||||
</select>
|
||||
|
||||
<select id="groupByCraftType" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
|
||||
SELECT
|
||||
dic.dict_value craft_type,
|
||||
dic.dict_label create_by,
|
||||
u.id
|
||||
FROM
|
||||
sys_dict_data dic
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
craft_type,
|
||||
COUNT(1) AS id
|
||||
FROM
|
||||
pro_project_info_subdepts_users
|
||||
WHERE
|
||||
enter_state =0
|
||||
<if test="comId != null">and com_id = #{comId}</if>
|
||||
<if test="projectId != null">and project_id = #{projectId}</if>
|
||||
GROUP BY
|
||||
craft_type
|
||||
) u
|
||||
ON u.craft_type = dic.dict_value
|
||||
WHERE
|
||||
dic.dict_type = 'pro_craft_type';
|
||||
|
||||
</select>
|
||||
|
||||
<select id="groupByCraftTypeByAttendance" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
|
||||
SELECT
|
||||
dic.dict_value craft_type,
|
||||
dic.dict_label create_by,
|
||||
u.id
|
||||
FROM
|
||||
sys_dict_data dic
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
craft_type,
|
||||
COUNT(1) AS id
|
||||
FROM
|
||||
pro_project_info_subdepts_users
|
||||
WHERE
|
||||
user_id in (select userId
|
||||
from attendance_ubi_data
|
||||
<where>
|
||||
<if test="comId != null">and com_id = #{comId}</if>
|
||||
<if test="projectId != null">and project_id = #{projectId}</if>
|
||||
<if test="createTime != null">
|
||||
and (date(inTime)= date( #{createTime}) or date(outTime)=date( #{createTime})))</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
craft_type
|
||||
) u
|
||||
ON u.craft_type = dic.dict_value
|
||||
WHERE
|
||||
dic.dict_type = 'pro_craft_type'
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -49,6 +49,25 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏-项目详情-在岗人员统计
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list")
|
||||
@GetMapping("/groupByCraftType")
|
||||
public AjaxResult groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers){
|
||||
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.groupByCraftType(proProjectInfoSubdeptsUsers);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏-项目详情-今日出勤期统计
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list")
|
||||
@GetMapping("/groupByCraftTypeByAttendance")
|
||||
public AjaxResult groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where){
|
||||
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.groupByCraftTypeByAttendance(where);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 导出分包单位工人列表
|
||||
*/
|
||||
|
|
|
@ -59,5 +59,12 @@ public interface IProProjectInfoSubdeptsUsersService
|
|||
*/
|
||||
public int deleteProProjectInfoSubdeptsUsersById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 大屏-项目详情-在岗人员统计
|
||||
*/
|
||||
List<ProProjectInfoSubdeptsUsers> groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
/**
|
||||
* 大屏-项目详情-今日出勤期统计
|
||||
*/
|
||||
List<ProProjectInfoSubdeptsUsers> groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where);
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
@Override
|
||||
public int insertProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
{
|
||||
proProjectInfoSubdeptsUsers.setUseStatus("0");
|
||||
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
|
||||
proProjectInfoSubdeptsUsers.setCreateBy(SecurityContextHolder.getUserName());
|
||||
SysUser user=proProjectInfoSubdeptsUsers.getUser();
|
||||
|
@ -131,4 +132,18 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
uniService.syncUserRevoke(id);
|
||||
return proProjectInfoSubdeptsUsersMapper.deleteProProjectInfoSubdeptsUsersById(id);
|
||||
}
|
||||
/**
|
||||
* 大屏-项目详情-在岗人员统计
|
||||
*/
|
||||
@Override
|
||||
public List<ProProjectInfoSubdeptsUsers> groupByCraftType(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) {
|
||||
return proProjectInfoSubdeptsUsersMapper.groupByCraftType(proProjectInfoSubdeptsUsers);
|
||||
}
|
||||
/**
|
||||
* 大屏-项目详情-今日出勤期统计
|
||||
*/
|
||||
@Override
|
||||
public List<ProProjectInfoSubdeptsUsers> groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where) {
|
||||
return proProjectInfoSubdeptsUsersMapper.groupByCraftTypeByAttendance(where);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue