fix: BUG修改

This commit is contained in:
kun 2023-06-08 14:11:59 +08:00
parent 14c6580dc1
commit 0e486e0485
6 changed files with 62 additions and 31 deletions

View File

@ -3,8 +3,8 @@ NODE_ENV = "production"
# 线上环境接口地址(easymock)
# VITE_API_URL = "http://139.9.66.234:6688"
VITE_API_URL = "http://182.90.224.147:6688"
# VITE_API_URL = "http://101.43.164.214:6688"
# VITE_API_URL = "http://182.90.224.147:6688"
VITE_API_URL = "http://101.43.164.214:6688"
# 打包
VITE_ULD_API_URL = 'http://182.90.224.147:8012/onlinePreview?url='

View File

@ -348,6 +348,12 @@ export const smallStoreDelete = (params: { id: string }) => {
return http.post(BASEURL + `/gov/inspectLibraryDetail/delete`, params);
};
// 劳务实名制--------
// 人员出勤监管-顶部统计数据
export const attendanceStatistics = () => {
return http.get(BASEURL + `/gov/workerStat/attendStatistics`);
};
// 列表查询视频管理表信息
// export const getVideo = (params: { projectSn?: string; engineeringSn?: string }) => {
// return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/projectMonitor/engineeringTree`, params);

View File

@ -11,7 +11,7 @@
background
>
<template #formButton="scope">
<div>
<div class="attendance-label">
<span class="successCircle"></span>
<span class="text">正常出勤</span>
<span class="errorCircle"></span>
@ -398,6 +398,9 @@ onBeforeMount(() => {
</script>
<style lang="scss" scoped>
.table-box {
.attendance-label {
min-width: 160px;
}
.successCircle {
display: inline-block;
width: 11px;

View File

@ -1,33 +1,16 @@
<template>
<div class="table-box">
<div class="statistics-top">
<div class="sta-item">
<div class="sta-item" v-for="(item, index) in statisticsOption" :key="index">
<div class="sta-num">
<span>在职人数</span>
<span>2162207</span>
<span>{{ item.name }}</span>
<span v-if="item.prop == 'inServiceWorker' || item.prop == 'workerAttendanceTotal'">{{
item.value ? item.value + "人" : 0
}}</span>
<span v-if="item.prop == 'ratio'">{{ item.value ? item.value + "%" : 0 }}</span>
<span v-if="item.prop == 'workerAttendanceNum'">{{ item.value ? item.value + "人次" : 0 }}</span>
</div>
<img src="@/assets/images/govermentImg/在职人数.png" alt="" />
</div>
<div class="sta-item">
<div class="sta-num">
<span>今日出勤总数</span>
<span>2162207</span>
</div>
<img src="@/assets/images/govermentImg/出勤总数.png" alt="" />
</div>
<div class="sta-item">
<div class="sta-num">
<span>今日出勤率</span>
<span>2162207</span>
</div>
<img src="@/assets/images/govermentImg/出勤率.png" alt="" />
</div>
<div class="sta-item">
<div class="sta-num">
<span>今日考勤次数</span>
<span>2162207</span>
</div>
<img src="@/assets/images/govermentImg/考勤次数.png" alt="" />
<img :src="item.img" alt="" />
</div>
</div>
<div class="statistics-search">
@ -73,13 +56,39 @@ import TreeFilter from "@/components/TreeFilter/index.vue";
import AMap from "@/components/AMap/AMap.vue";
import { editRolePermissions, getTreemRoleList, getTreeByIdList } from "@/api/modules/goverment";
import DialogForm from "@/components/DialogForm/index.vue";
import { addEquipment, equipmentList, updateEquipment, deleteEquipment } from "@/api/modules/project";
import { attendanceStatistics } from "@/api/modules/goverment";
import { Delete } from "@element-plus/icons-vue";
import { GlobalStore } from "@/stores";
import * as echarts from "echarts";
import { useEcharts } from "@/hooks/useEcharts";
import { start } from "repl";
const statisticsOption = ref([
{
name: "在职人数",
value: 0,
img: new URL("@/assets/images/govermentImg/在职人数.png", import.meta.url).href,
prop: "inServiceWorker"
},
{
name: "今日出勤总数",
value: 0,
img: new URL("@/assets/images/govermentImg/出勤总数.png", import.meta.url).href,
prop: "workerAttendanceTotal"
},
{
name: "今日出勤率",
value: 0,
img: new URL("@/assets/images/govermentImg/出勤率.png", import.meta.url).href,
prop: "ratio"
},
{
name: "今日考勤次数",
value: 0,
img: new URL("@/assets/images/govermentImg/考勤次数.png", import.meta.url).href,
prop: "workerAttendanceNum"
}
]);
const echartsRef = ref<HTMLElement>();
const searchForm = ref({
@ -111,7 +120,15 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
}
});
};
const getStatistics = async () => {
const res = await attendanceStatistics();
statisticsOption.value.map(item => {
item.value = res.result[item.prop];
});
console.log(res);
};
onMounted(() => {
getStatistics();
let myChart: echarts.ECharts = echarts.init(echartsRef.value as HTMLElement);
let option: echarts.EChartsOption = {
tooltip: {
@ -213,6 +230,7 @@ onMounted(() => {
display: flex;
justify-content: space-between;
.sta-item {
width: 405px;
min-width: 320px;
height: 113px;
background: rgba(255, 255, 255, 0.9);

View File

@ -154,7 +154,7 @@
<span>月份</span>
<el-date-picker style="width: 160px" type="month" placeholder="选择月"> </el-date-picker>
<el-button type="primary" style="margin-left: 20px; margin-right: auto">查询</el-button>
<div>
<div class="attendance-label">
<span class="successCircle"></span>
<span class="text">正常出勤</span>
<span class="errorCircle"></span>
@ -393,6 +393,7 @@ onMounted(() => {
margin-left: 10px;
}
> div {
min-width: 160px;
.successCircle {
@include successCircle();
}

View File

@ -11,7 +11,7 @@
background
>
<template #formButton="scope">
<div>
<div class="attendance-label">
<span class="successCircle"></span>
<span class="text">正常出勤</span>
<span class="errorCircle"></span>
@ -398,6 +398,9 @@ onBeforeMount(() => {
</script>
<style lang="scss" scoped>
.table-box {
.attendance-label {
min-width: 160px;
}
.successCircle {
display: inline-block;
width: 11px;