update code

dev-login
haha 2023-09-30 23:04:00 +08:00
parent d938a781d4
commit 126365f2af
7 changed files with 249 additions and 63 deletions

View File

@ -23,8 +23,16 @@ const groupByComany=(data)=> {
method: 'post'
})
}
const todayAttendance=(data)=>{
return request({
url: `bgscreen/attendance/todayAttendance`,
data:data,
method: 'post'
})
}
export default{
getDeptWorksList,
getWorkAttendanceList,
groupByComany
groupByComany,
todayAttendance
}

View File

@ -0,0 +1,131 @@
<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(1)"></div>
<div :class="nav == 8 ? 'head-nav active' : 'head-nav'" @click="doNav(8)"></div>
<div :class="nav == 2 ? 'head-nav active' : 'head-nav'" @click="doNav(2)"></div>
</div>
<el-table :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.recentPhoto" :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="attendanceType" >
<template slot-scope="{row}">{{ row.gender==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.inTime">{{ row.inTime|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.outTime">{{ row.outTime|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="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>
import MyDialog from '../components/MyDialog'
export default {
components: {
MyDialog,
},
name: 'JhbigscreenIndexDlg1',
data() {
return {
show: false,
tableData: [],
projectId:0,
deptId:0,
size:10,
index:1,
total:0,
nav:1
};
},
mounted() {
this.tableData = [
{ prj: '项目一', node: '招采', days: 5, date: '2023.06.04',username:'haha' },
{ prj: '项目二', node: '报建审批及地勘施工', days: 10, date: '2023.05.31' },
{ prj: '项目三', node: '前期工作', days: 3, date: '2023.06.06' },
{ prj: '项目四', node: '市政道路施工', days: 4, date: '2023.06.05' }
]
},
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={
projectId:this.projectId,
deptId:this.deptId,
size:this.size,
index:this.index,
id:this.nav
}
this.$api.attendance.todayAttendance(postData).then(d=>{
this.total=d.total||0;
this.tableData=d.rows||[];
})
}
},
};
</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

@ -42,17 +42,17 @@
<div :class="nav == 5 ? 'head-nav active' : 'head-nav'" @click="doNav(5)">({{ count['5'] }})</div>
</div>
<div class="data-list scroll" style="max-height:712px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;" v-if="dataTable.length>0">
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item"
:class="it.timeout ? 'time-out' : ''">
<div class="data-list scroll" style="max-height:712px;overflow-y: auto;margin:12px 0px;overflow-x: hidden;"
v-if="dataTable.length > 0">
<div v-for="(it, idx) in dataTable" :key="idx" class="data-item" :class="it.timeout ? 'time-out' : ''">
<div class="item-left">
<el-image ref="preview" style="width: 400px; " :preview-src-list="[it.marksPicture]"
:src="it.marksPicture + '.1000.jpg'">
</el-image>
</div>
<div class="item-right">
<div v-if="it.timeout && it.checkState!=4" class="text-timeout"></div>
<div class="text-state" :class="'state'+it.checkState">{{ getCheckState(it.checkState) }}</div>
<div v-if="it.timeout && it.checkState != 4" class="text-timeout"></div>
<div class="text-state" :class="'state' + it.checkState">{{ getCheckState(it.checkState) }}</div>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">总包单位:</span>
<div class="div-text">{{ it.deptName }}</div>
@ -73,7 +73,7 @@
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">抄送人:</span>
<div class="div-text">{{ it.copySend }}</div>
</el-col>
<template v-if="it.checkState==4">
<template v-if="it.checkState == 4">
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交用户:</span>
<div class="div-text">{{ it.createBy }}</div>
@ -92,19 +92,19 @@
</el-col>
</template>
<template v-else>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交用户:</span>
<div class="div-text">{{ it.createBy }}</div>
</el-col>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交时间:</span>
<div class="div-text">{{ it.createTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">截止时间:</span>
<div class="div-text">{{ it.nickedTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
</template>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交用户:</span>
<div class="div-text">{{ it.createBy }}</div>
</el-col>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">提交时间:</span>
<div class="div-text">{{ it.createTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
<el-col :span="12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">截止时间:</span>
<div class="div-text">{{ it.nickedTime | formatDate('YYYY-MM-DD') }}</div>
</el-col>
</template>
<el-col :span="24" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">隐患描述:</span>
<div class="div-text">{{ it.workParts }}
@ -139,7 +139,7 @@ export default {
elKey: 0,
nav: 0,
infoType: 0,
roleType:0,
roleType: 0,
row: null,
show: false,
count: {
@ -152,7 +152,7 @@ export default {
dataTable: [],
dicts: [],
checkStateDicts: [],
selDate:[]
selDate: []
};
},
@ -183,15 +183,15 @@ export default {
} else {
postData.checkState = n
}
if(this.selDate.length>0){
postData.startDate=this.$dt(this.selDate[0]).format("YYYY-MM-DD");
if (this.selDate.length > 0) {
postData.startDate = this.$dt(this.selDate[0]).format("YYYY-MM-DD");
}
if(this.selDate.length>1){
postData.endDate=this.$dt(this.selDate[1]).format("YYYY-MM-DD");
if (this.selDate.length > 1) {
postData.endDate = this.$dt(this.selDate[1]).format("YYYY-MM-DD");
}
this.$api.problemmodify.listSspProblemmodify(postData).then(d => {
this.dataTable = (d.data || []).map(it => {
if(it.updateTime){
this.dataTable = (d.data || []).map(it => {
if (it.updateTime) {
let dt1 = +this.$dt(this.$dt(it.nickedTime).format("YYYY-MM-DD"));
let dt2 = +this.$dt(this.$dt(it.updateTime).format("YYYY-MM-DD"));
if (dt1 < dt2) {
@ -199,7 +199,7 @@ export default {
} else {
it.timeout = false;
}
}else if (it.nickedTime) {
} else if (it.nickedTime) {
let dt1 = +this.$dt(this.$dt(it.nickedTime).format("YYYY-MM-DD"));
let dt2 = +this.$dt(this.$dt(new Date()).format("YYYY-MM-DD"));
if (dt1 < dt2) {
@ -209,17 +209,17 @@ export default {
}
} else {
it.timeout = false;
}
}
return it;
});
this.elKey++;
})
},
showDialog(row, infoType,roleType,selDate) {
this.selDate=selDate;
showDialog(row, infoType, roleType, selDate) {
this.selDate = selDate;
this.row = row;
this.infoType = infoType;
this.roleType=roleType;
this.roleType = roleType;
if (infoType == 0) {
this.$api.dict('ssp_aqyhlx').then(d => {
this.dicts = d || [];
@ -234,16 +234,16 @@ export default {
});
this.show = true
this.doNav(0, true);
let postData={
let postData = {
projectId: this.row.projectId,
infoType: this.infoType,
roleType:this.roleType
roleType: this.roleType
};
if(this.selDate.length>0){
postData.startDate=this.$dt(this.selDate[0]).format("YYYY-MM-DD");
if (this.selDate.length > 0) {
postData.startDate = this.$dt(this.selDate[0]).format("YYYY-MM-DD");
}
if(this.selDate.length>1){
postData.endDate=this.$dt(this.selDate[1]).format("YYYY-MM-DD");
if (this.selDate.length > 1) {
postData.endDate = this.$dt(this.selDate[1]).format("YYYY-MM-DD");
}
this.$api.problemmodify.groupByInfotypeCheckState(postData).then(d => {
for (let i = 0; i <= 5; i++) {
@ -346,8 +346,9 @@ export default {
&.time-out {
box-shadow: inset 7px 0px 11px 5px rgb(167, 36, 36);
.text-state {
color: rgba(167, 36, 36,0.6) !important;
color: rgba(167, 36, 36, 0.6) !important;
}
}
@ -365,7 +366,8 @@ export default {
transform: rotate(45deg);
top: 60px;
left: calc(50% - 100px);
&.state4{
&.state4 {
color: rgba(5, 248, 5, 0.5);
}
}
@ -375,7 +377,7 @@ export default {
margin-left: 10px;
width: calc(100% - 414px);
position: relative;
.sp-lbl {
display: inline-block;
color: aquamarine;
@ -384,11 +386,23 @@ export default {
.text-timeout {
position: absolute;
right: 0px;
font-size: 64px;
color: red;
transform: rotate(45deg);
top: 27px;
right: -4px;
font-size: 24px;
color: #fff;
display: block;
padding: 20px;
background: linear-gradient(-135deg, red, red 50%, transparent 50%, transparent 100%);
height: 50px;
width: 50px;
&::after {
content: "超时";
transform: rotate(45deg);
display: block;
position: absolute;
left: 42px;
top: 15px;
}
}
.item-data {

View File

@ -48,8 +48,10 @@
<index-map></index-map>
</module-one-2-1>
<el-row>
<el-col :span="12">
<el-col :span="12" style="position: relative;">
<module-one-1-1 label="人员统计" :key="elDeptWorks">
<img src="images/icon2001.png" v-if="infoNav == 1" style="position: absolute;cursor: pointer;right: 20px;top: 48px;"
@click="doShowAttendanceDetail">
<div class="warning-info-title" style="padding-left: 20px;">
<div :class="infoNav == 0 ? 'active' : ''" @click="onWarningInfoNav(0)"></div>
<div :class="infoNav == 1 ? 'active' : ''" @click="onWarningInfoNav(1)"></div>
@ -222,6 +224,7 @@
<index-dlg2 ref="dlg2"></index-dlg2>
<index-dlg3 ref="dlg3"></index-dlg3>
<journalismDlg ref="journalismDlg"></journalismDlg>
<AttendanceDetailDialog ref="attDetailDlg"></AttendanceDetailDialog>
</div>
</template>
<script>
@ -238,6 +241,7 @@ import indexMap from './index/map.vue'
import MonitAndWarning from './components/MonitAndWarning.vue'
import journalismDlg from './dlg/journalismDlg.vue'
import debounce from 'lodash.debounce'
import AttendanceDetailDialog from './components/AttendanceDetailDialog.vue'
export default {
name: 'App',
components: {
@ -246,7 +250,8 @@ export default {
indexDlg3,
indexMap,
MonitAndWarning,
journalismDlg
journalismDlg,
AttendanceDetailDialog
},
data() {
return {
@ -503,6 +508,14 @@ export default {
}));
},
methods: {
doShowAttendanceDetail(){
let data={
deptId:this.deptInfo.id||0,
projectId:this.prj.id||0,
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
}
this.$refs.attDetailDlg.showDialog(data);
},
loadAttendanceData(){
let data={
subDeptId:this.deptInfo.id||0,

View File

@ -93,38 +93,38 @@
<template v-if="scheduleInfo.plannedNode">
<div><img src="images/title_icon.png"><span class="sp-lbl">计划节点</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.plannedNode }}</div>
<div><pre>{{ scheduleInfo.plannedNode }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.actualNode">
<div><img src="images/title_icon.png"><span class="sp-lbl">实际节点</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.actualNode }}</div>
<div><pre>{{ scheduleInfo.actualNode }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.dataTemplate!=4">
<template v-if="scheduleInfo.purchaseProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">融资招采进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.purchaseProgress }}</div>
<div><pre>{{ scheduleInfo.purchaseProgress }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.designProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">报建设计进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.designProgress }}</div>
<div><pre>{{ scheduleInfo.designProgress }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.constructionProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">施工进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.constructionProgress }}</div>
<div><pre>{{ scheduleInfo.constructionProgress }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.acceptanceProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">验收进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.acceptanceProgress }}</div>
<div><pre>{{ scheduleInfo.acceptanceProgress }}</pre></div>
</div>
</template>
</template>
@ -132,46 +132,46 @@
<template v-if="scheduleInfo.constructionProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">施工进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.constructionProgress }}</div>
<div><pre>{{ scheduleInfo.constructionProgress }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.acceptanceProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">验收进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.acceptanceProgress }}</div>
<div><pre>{{ scheduleInfo.acceptanceProgress }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.purchaseProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">结算进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.purchaseProgress }}</div>
<div><pre>{{ scheduleInfo.purchaseProgress }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.designProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">运维进展</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.designProgress }}</div>
<div><pre>{{ scheduleInfo.designProgress }}</pre></div>
</div>
</template>
</template>
<template v-if="scheduleInfo.planForNextWeek">
<div><img src="images/title_icon.png"><span class="sp-lbl">下周计划</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.planForNextWeek }}</div>
<div><pre>{{ scheduleInfo.planForNextWeek }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.existingProblem">
<div><img src="images/title_icon.png"><span class="sp-lbl">存在问题</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.existingProblem }}</div>
<div><pre>{{ scheduleInfo.existingProblem }}</pre></div>
</div>
</template>
<template v-if="scheduleInfo.problemProgress">
<div><img src="images/title_icon.png"><span class="sp-lbl">问题推进情况</span></div>
<div class="div-text ">
<div>{{ scheduleInfo.problemProgress }}</div>
<div><pre>{{ scheduleInfo.problemProgress }}</pre></div>
</div>
</template>

View File

@ -74,7 +74,7 @@
<module-one-1-2 label="项目季度考核目标">
<img src="images/icon2001.png" style="position: absolute;cursor: pointer;right: 12px;top: 12px;"
@click="doShowDlg1">
<div class="quality-table special-table">
<div class="quality-table special-table scheduled-alerts-list">
<el-table :data="getAssessData()" style="width: 100%;background: transparent;" height="265"
ref="fbsubordinateUnit">

View File

@ -108,4 +108,24 @@
height: 100px;
}
}
}
.el-pagination.bg-pagination{
text-align: center;
.btn-next,.btn-prev{
background-color: rgba(1, 169, 255,0.4);
color: #fff;
}
.btn-next{
margin-left:20px;
}
.el-pager {
li{
background-color: rgba(1, 169, 255,0.4);
margin-left:20px;
color: #fff;
&.active{
background-color: rgba(1, 169, 255,1);
}
}
}
}