数据看板

This commit is contained in:
lSun 2024-12-18 21:32:31 +08:00
parent 56a3c5a248
commit 810e94e043
1 changed files with 20 additions and 18 deletions

View File

@ -37,7 +37,7 @@
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList"> <el-table v-loading="loading" :data="typeList">
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
@ -118,7 +118,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -126,7 +126,7 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 相关记录 --> <!-- 相关记录 -->
<el-dialog :title="title" :visible.sync="showRecord" width="1300px" height="1000px" append-to-body @close="cancelRecord"> <el-dialog :title="title" :visible.sync="showRecord" width="1300px" height="1000px" append-to-body @close="cancelRecord">
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch" label-width="110px"> <el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch" label-width="110px">
@ -161,23 +161,23 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ formatDate(scope.row.attCurrent) }}</span> <span>{{ formatDate(scope.row.attCurrent) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上班打卡时间" align="center" prop="goWorkTime" width="180" sortable/> <el-table-column label="上班打卡时间" align="center" prop="goWorkTime" width="180" sortable/>
<el-table-column label="上班状态" align="center" prop="goWorkStatus" width="100" sortable> <el-table-column label="上班状态" align="center" prop="goWorkStatus" width="100" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.att_status" :value="scope.row.goWorkStatus"/> <dict-tag :options="dict.type.att_status" :value="scope.row.goWorkStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上班打卡地址" align="center" prop="goWorkAddress" sortable width="180"/> <el-table-column label="上班打卡地址" align="center" prop="goWorkAddress" sortable width="180"/>
<el-table-column label="下班打卡时间" align="center" prop="offWorkTime" width="180" ortable/> <el-table-column label="下班打卡时间" align="center" prop="offWorkTime" width="180" ortable/>
<el-table-column label="下班状态" align="center" prop="offWorkStatus" width="100" sortable> <el-table-column label="下班状态" align="center" prop="offWorkStatus" width="100" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.att_status" :value="scope.row.offWorkStatus"/> <dict-tag :options="dict.type.att_status" :value="scope.row.offWorkStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下班打卡地址" align="center" prop="offWorkAddress" width="180" sortable/> <el-table-column label="下班打卡地址" align="center" prop="offWorkAddress" width="180" sortable/>
</el-table> </el-table>
<pagination <pagination
v-show="totalTwo>0" v-show="totalTwo>0"
:total="totalTwo" :total="totalTwo"
@ -187,10 +187,10 @@
/> />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getDetail} from "@/api/report/monthlyError"; import { getDetail} from "@/api/report/monthlyError";
import { getMonthAttReport,exportMonthReport } from "@/api/report/monthReport"; import { getMonthAttReport,exportMonthReport } from "@/api/report/monthReport";
@ -230,7 +230,7 @@
title8: "轮休记录", title8: "轮休记录",
title9: "临时外出记录", title9: "临时外出记录",
// //
open: false, open: false,
showRecord:false, showRecord:false,
dateRange: [], dateRange: [],
attCurrentMonth:"", attCurrentMonth:"",
@ -242,6 +242,7 @@
pageSize: 10, pageSize: 10,
userId: undefined, userId: undefined,
attStatis: undefined, attStatis: undefined,
attCurrentMonth:undefined
}, },
tableDataRecord: [], tableDataRecord: [],
totalTwo: 0, totalTwo: 0,
@ -251,7 +252,7 @@
}, },
dialogList:[], dialogList:[],
dialogTotal: 0, dialogTotal: 0,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -270,7 +271,7 @@
this.getList(); this.getList();
}, },
methods: { methods: {
formatDate(dateString){ formatDate(dateString){
const date = new Date(dateString); // const date = new Date(dateString); //
const year = date.getFullYear(); // const year = date.getFullYear(); //
@ -308,7 +309,7 @@
children: node.children children: node.children
}; };
}, },
handleSelect(value, instanceId) { handleSelect(value, instanceId) {
console.log('Selected:', value); console.log('Selected:', value);
// //
this.queryParams.orgName=value.orgName; this.queryParams.orgName=value.orgName;
@ -340,6 +341,7 @@
this.id = row.id; this.id = row.id;
this.title = titleBoss; this.title = titleBoss;
this.queryRecord.userId = row.userId; this.queryRecord.userId = row.userId;
this.queryRecord.attCurrentMonth = row.attCurrentMonth;
this.attCurrentMonth = row.attCurrentMonth; this.attCurrentMonth = row.attCurrentMonth;
if(titleBoss=='打卡记录'){ if(titleBoss=='打卡记录'){
this.queryRecord.attStatis=1; this.queryRecord.attStatis=1;
@ -364,7 +366,7 @@
this.getListRecord(); this.getListRecord();
}, },
disabledDate(time) { disabledDate(time) {
const str=this.attCurrentMonth+'-01'; const str=this.attCurrentMonth+'-01';
// //
var currentDate = new Date(str); var currentDate = new Date(str);
// //
@ -374,10 +376,10 @@
return time < firstDayOfMonth || time > lastDayOfMonth; return time < firstDayOfMonth || time > lastDayOfMonth;
}, },
/** 查询月异常详情列表 */ /** 查询月异常详情列表 */
getListRecord() { getListRecord() {
getDetail(this.addDateRange(this.queryRecord, this.dateRange)).then(response => { getDetail(this.addDateRange(this.queryRecord, this.dateRange)).then(response => {
this.tableDataRecord = response.rows; this.tableDataRecord = response.rows;
this.totalTwo = response.total; this.totalTwo = response.total;
}); });
}, },
@ -403,7 +405,7 @@
this.downloadFile({ fileName: `月报表记录_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' }) this.downloadFile({ fileName: `月报表记录_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
}) })
}, },
} }
}; };
</script> </script>