中水北方需求

This commit is contained in:
jiayu 2025-06-16 16:13:26 +08:00
parent 0eacffa460
commit 47db9192bd
8 changed files with 200 additions and 27 deletions

View File

@ -4,9 +4,9 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用) # 本地环境接口地址(/api/index.ts文件中使用)
# 后端本地 # 后端本地
# VITE_API_URL = 'http://192.168.34.155:28890' #彭杰鞍钢本地 # VITE_API_URL = 'http://192.168.34.155:28890' #彭杰鞍钢本地
VITE_API_URL = 'http://192.168.34.155:19111' # VITE_API_URL = 'http://192.168.34.155:19111'
# VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地 # VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
# VITE_API_URL = 'http://192.168.34.221:19112' #雄哥本地 VITE_API_URL = 'http://192.168.34.221:19112' #雄哥本地
# VITE_API_URL = 'http://192.168.34.221:28890' #雄哥本地 # VITE_API_URL = 'http://192.168.34.221:28890' #雄哥本地
# VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程 # VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程
# VITE_API_URL = 'http://192.168.34.221:28889' # VITE_API_URL = 'http://192.168.34.221:28889'

View File

@ -68,3 +68,13 @@ export const getComapnyWorkTotalListApi = (params: {}) => {
export const getUfaceDevListApi = (params: {}) => { export const getUfaceDevListApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/ufaceDev/list`, params, { headers: { noLoading: true } }); return http.post(BASEURL + `/xmgl/ufaceDev/list`, params, { headers: { noLoading: true } });
}; };
// 获取闸机分组列表
export const getUfaceDevGroupListApi = (params: {}) => {
return http.get(BASEURL + `/xmgl/ufaceDevGroup/list`, params, { headers: { noLoading: true } });
};
// 获取人员分布
export const getPresentByRegionApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/workerAttendance/getPresentByRegion`, params, { headers: { noLoading: true } });
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

View File

@ -85,14 +85,15 @@
:index="item.modulePath" :index="item.modulePath"
:class="{ :class="{
subMenu: true, subMenu: true,
active: activeTab === item.modulePath, active: activeTab === item.modulePath
zsbf: COMPANY === 'zsbf'
}" }"
> >
<!-- zsbf: COMPANY === 'zsbf' -->
<span @click="navigateTo(item, 1)">{{ item.moduleName }}</span> <span @click="navigateTo(item, 1)">{{ item.moduleName }}</span>
</div> </div>
</div> </div>
<div :class="{ subMenuList: true, zsbf: COMPANY === 'zsbf' }" v-if="itemList != null && itemList.length >= 1"> <div :class="{ subMenuList: true }" v-if="itemList != null && itemList.length >= 1">
<!-- , zsbf: COMPANY === 'zsbf' -->
<el-scrollbar class="scrollItem"> <el-scrollbar class="scrollItem">
<div class="subMenuItem"> <div class="subMenuItem">
<div <div

View File

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="political-outlook" v-if="postData.type == 1"> <div class="political-outlook" v-if="postData.type == 1">
<memberCountList ref="historyAlarmList" :tip="postData.tip"></memberCountList> <memberCountList ref="historyAlarmList" :tip="postData.tip" :regionIdForUface="postData.regionIdForUface"></memberCountList>
</div> </div>
<div class="political-outlook" v-if="postData.type == 2"> <div class="political-outlook" v-if="postData.type == 2">
<MemberAllShow ref="memberAllShow" :tip="postData.tip"></MemberAllShow> <MemberAllShow ref="memberAllShow" :tip="postData.tip"></MemberAllShow>

View File

@ -1,26 +1,88 @@
<template> <template>
<div class="LeftTopBox"> <div class="LeftTopBox">
<div class="leftData"> <div class="leftData">
<div class="numberPeople" @click="openDialogData('实时')"> <template v-if="COMPANY !== 'zsbf'">
<div class="text"> <div class="numberPeople" @click="openDialogData('实时')">
<i>实时人数</i> <div class="text">
<i>实时人数</i>
</div>
<div class="num">
<i>{{ presencePerson }}</i>
</div>
</div> </div>
<div class="num"> <div class="numberPeople" @click="openDialogData('日累积')">
<i>{{ presencePerson }}</i> <div class="text"><i>日累积人数</i></div>
<div class="num">
<i>{{ attendancePerson }}</i>
</div>
</div> </div>
</div> </template>
<div class="numberPeople" @click="openDialogData('日累积')">
<div class="text"><i>日累积人数</i></div>
<div class="num">
<i>{{ attendancePerson }}</i>
</div>
</div>
<div class="numberPeople" @click="openDialogData('总')"> <div class="numberPeople" @click="openDialogData('总')">
<div class="text"><i>总人数</i></div> <div class="text"><i>总人数</i></div>
<div class="num"> <div class="num">
<i>{{ toaltPerson }}</i> <i>{{ toaltPerson }}</i>
</div> </div>
</div> </div>
<template v-if="COMPANY === 'zsbf'">
<el-scrollbar style="height: 60%">
<div
class="sd-item"
:class="index == 0 ? 'mt' : ''"
@click="openDialogData('实时', item.id)"
v-for="(item, index) in regionList"
:key="item.id"
>
<div class="sd-item-top">
<img src="@/assets/images/larborManagement/xd-ic.png" alt="" />
<span>{{ item.regionName }}</span>
</div>
<div class="sd-item-bottom">
<span class="title">洞内实时人数:</span>
<span class="num">{{ item.present }}</span>
</div>
</div>
<!-- <div class="sd-item mt" @click="openDialogData('实时')">
<div class="sd-item-top">
<img src="@/assets/images/larborManagement/xd-ic.png" alt="" />
<span>拉林隧道进口</span>
</div>
<div class="sd-item-bottom">
<span class="title">洞内实时人数:</span>
<span class="num">100</span>
</div>
</div>
<div class="sd-item" @click="openDialogData('实时')">
<div class="sd-item-top">
<img src="@/assets/images/larborManagement/xd-ic.png" alt="" />
<span>拉林隧洞出口</span>
</div>
<div class="sd-item-bottom">
<span class="title">洞内实时人数:</span>
<span class="num">100</span>
</div>
</div>
<div class="sd-item" @click="openDialogData('实时')">
<div class="sd-item-top">
<img src="@/assets/images/larborManagement/xd-ic.png" alt="" />
<span>纳金隧洞进口</span>
</div>
<div class="sd-item-bottom">
<span class="title">洞内实时人数:</span>
<span class="num">100</span>
</div>
</div>
<div class="sd-item" @click="openDialogData('实时')">
<div class="sd-item-top">
<img src="@/assets/images/larborManagement/xd-ic.png" alt="" />
<span>纳金隧洞出口</span>
</div>
<div class="sd-item-bottom">
<span class="title">洞内实时人数:</span>
<span class="num">100</span>
</div>
</div> -->
</el-scrollbar>
</template>
</div> </div>
<div class="rightEcharts"> <div class="rightEcharts">
<!-- 今日作业人员趋势 --> <!-- 今日作业人员趋势 -->
@ -75,6 +137,17 @@
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<div class="search-item">
<el-select
v-model="searchForm.groupId"
placeholder="请选择闸机分组"
size="small"
clearable
@change="handleChangeUfaceDevGroup"
>
<el-option v-for="item in ufaceDevGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div class="search-item"> <div class="search-item">
<el-select v-model="searchForm.devSn" placeholder="请选择闸机" size="small" clearable> <el-select v-model="searchForm.devSn" placeholder="请选择闸机" size="small" clearable>
<el-option v-for="item in ufaceDevList" :key="item.devSn" :label="item.devName" :value="item.devSn"></el-option> <el-option v-for="item in ufaceDevList" :key="item.devSn" :label="item.devName" :value="item.devSn"></el-option>
@ -192,7 +265,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { COMPANY } from "@/config/config";
import * as echarts from "echarts"; import * as echarts from "echarts";
import { onMounted, reactive, ref, nextTick } from "vue"; import { onMounted, reactive, ref, nextTick } from "vue";
import noDataImage from "@/assets/images/vehicleManagement/car.png"; import noDataImage from "@/assets/images/vehicleManagement/car.png";
@ -203,7 +276,9 @@ import {
getDepartDataList, getDepartDataList,
getTeamDataList, getTeamDataList,
getCompanyDataList, getCompanyDataList,
getUfaceDevListApi getUfaceDevListApi,
getUfaceDevGroupListApi,
getPresentByRegionApi
} from "@/api/modules/labor"; } from "@/api/modules/labor";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
const BASEURL = import.meta.env.VITE_API_URL; const BASEURL = import.meta.env.VITE_API_URL;
@ -229,6 +304,9 @@ const searchForm = reactive({
}); });
const rangeTime = ref([]); const rangeTime = ref([]);
const ufaceDevList = ref([]); const ufaceDevList = ref([]);
const allUfaceDevList = ref([]);
const ufaceDevGroupList = ref([]);
const regionList = ref([]);
let xData = ref([]); let xData = ref([]);
let yData = ref([]); let yData = ref([]);
@ -412,17 +490,48 @@ const option = reactive({
}); });
// //
const openDialogData = (tip: any) => { const openDialogData = (tip: any, regionIdForUface = "") => {
emits("openDialog", { type: 1, tip }); emits("openDialog", { type: 1, tip, regionIdForUface });
}; };
const openDialogHistoryData = (tip: any) => { const openDialogHistoryData = (tip: any) => {
emits("openDialog", { type: 2, tip }); emits("openDialog", { type: 2, tip });
}; };
//
const getPresentByRegion = async () => {
const res = await getPresentByRegionApi({ projectSn: store.sn });
if (res.code == 200) {
regionList.value = res.result || [];
}
console.log("人员分布", res);
};
//
const getUfaceDevGroupList = async () => {
const res = await getUfaceDevGroupListApi({ projectSn: store.sn });
if (res.code == 200) {
console.log("闸机分组列表", res);
ufaceDevGroupList.value = res.result;
}
};
//
const handleChangeUfaceDevGroup = () => {
searchForm.devSn = "";
const list = ufaceDevGroupList.value.find(item => item.id == searchForm.groupId)?.ufaceDevList;
console.log("list", list);
ufaceDevList.value = list || [];
if (searchForm.groupId == "") {
ufaceDevList.value = allUfaceDevList.value;
}
// getUfaceDevList();
};
// //
const getUfaceDevList = async () => { const getUfaceDevList = async () => {
const res = await getUfaceDevListApi({ projectSn: store.sn }); const res = await getUfaceDevListApi({ projectSn: store.sn });
if (res.code == 200) { if (res.code == 200) {
allUfaceDevList.value = res.result;
ufaceDevList.value = res.result; ufaceDevList.value = res.result;
} }
}; };
@ -561,6 +670,7 @@ const reset = () => {
searchForm.startTime = null; searchForm.startTime = null;
searchForm.endTime = null; searchForm.endTime = null;
searchForm.devSn = ""; searchForm.devSn = "";
searchForm.groupId = "";
rangeTime.value = []; rangeTime.value = [];
getCrewRealTimeData(); getCrewRealTimeData();
}; };
@ -575,6 +685,8 @@ defineExpose({
}); });
onMounted(async () => { onMounted(async () => {
getUfaceDevList(); getUfaceDevList();
getPresentByRegion();
getUfaceDevGroupList();
getPersonList(); getPersonList();
getQueryTodayList(); getQueryTodayList();
getCrewRealTimeData(); getCrewRealTimeData();
@ -590,6 +702,7 @@ onMounted(async () => {
.leftData { .leftData {
float: left; float: left;
width: 15%; width: 15%;
height: 100%;
.numberPeople { .numberPeople {
margin: auto; margin: auto;
width: 100%; width: 100%;
@ -681,14 +794,14 @@ onMounted(async () => {
} }
.selBox { .selBox {
width: 100%; width: 100%;
height: 10%; height: 13%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 24px; padding: 0 24px;
gap: 4px; gap: 4px;
.search-item { .search-item {
@include flex; @include flex;
max-width: 14%; max-width: 20%;
// margin-right: 20px; // margin-right: 20px;
span { span {
color: white; color: white;
@ -697,7 +810,7 @@ onMounted(async () => {
} }
} }
.listBox { .listBox {
height: 78%; height: 75%;
margin-bottom: 16px; margin-bottom: 16px;
.listStyle { .listStyle {
display: flex; display: flex;
@ -874,4 +987,52 @@ onMounted(async () => {
} }
} }
} }
.sd-item {
width: 210px;
height: 65px;
margin-bottom: 18px;
background: url("@/assets/images/larborManagement/xd-bg.png") no-repeat;
background-size: 100% 100%;
padding: 6px 18px;
box-sizing: border-box;
&.mt {
margin-top: 24px;
}
// background: rgba(39, 88, 192, 0.06);
.sd-item-top {
display: flex;
align-items: center;
img {
width: 16px;
height: 16px;
margin-right: 12px;
}
span {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 14px;
color: #ffffff;
line-height: 20px;
}
}
.sd-item-bottom {
display: flex;
align-items: center;
margin-top: 8px;
margin-left: 28px;
.title {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 12px;
color: #a8abb2;
margin-right: 30px;
}
.num {
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
font-weight: 400;
font-size: 20px;
color: #65d7f9;
}
}
}
</style> </style>

View File

@ -100,7 +100,7 @@ import { ref, onMounted } from "vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { getCompanyDataList, getMemberInfoList } from "@/api/modules/labor"; import { getCompanyDataList, getMemberInfoList } from "@/api/modules/labor";
const store = GlobalStore(); const store = GlobalStore();
const props = defineProps(["tip"]); const props = defineProps(["tip", "regionIdForUface"]);
const BASEURL = import.meta.env.VITE_API_URL; const BASEURL = import.meta.env.VITE_API_URL;
const onlineWorkList = ref([ const onlineWorkList = ref([
{ name: "在职", value: 1 }, { name: "在职", value: 1 },
@ -148,7 +148,8 @@ const getMemberCountList = async (tip:any) => {
idCard: searchForm.value.idCard, // idCard: searchForm.value.idCard, //
workerName: searchForm.value.name, // workerName: searchForm.value.name, //
pageNo: tip == 'search'?1:pageNo.value, pageNo: tip == 'search'?1:pageNo.value,
pageSize: 100 pageSize: 100,
regionIdForUface: props.regionIdForUface
} }
if(props.tip == '实时'){ if(props.tip == '实时'){
requestData.presence = 1; requestData.presence = 1;