fix: BUG修改

This commit is contained in:
kun 2024-05-11 02:49:17 +08:00
parent 6c78be10b7
commit ec424858c7
5 changed files with 506 additions and 18 deletions

View File

@ -2,7 +2,7 @@
<div class="projectContent">
<div class="left">
<leftTop class="leftTop"></leftTop>
<leftBottom class="leftBottom"></leftBottom>
<leftBottom class="leftBottom" @openDialog="openPeopleCountDialog"></leftBottom>
</div>
<div class="center">
<centerTop class="centerTop" @openDialog="openPeopleCountDialog"></centerTop>

View File

@ -11,12 +11,13 @@
<div class="centerBottom">
<div class="leftTop">
<div class="header">
<div class="hLeft" @click="dialogVisible = true">人员履职情况分析</div>
<div class="hLeft" @click="openDialogData({index: 7, title: '人员履职情况分析(整改人)'})">人员履职情况分析</div>
<div class="hRight">
<el-date-picker
style="width: 85%"
v-model="dateRange"
type="daterange"
value-format="YYYY-MM-DD"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -96,9 +97,11 @@ import { onMounted, ref } from "vue";
import * as echarts from "echarts";
import { selectQualityStatisticsApi } from "@/api/modules/projectOverview";
import { getMemberJobStatusApi, getInspectManStatusApi, getEnterpriseStatusApi } from "@/api/modules/agjtCommandApi";
import { getPersonTypeAndEduStatisticsApi } from "@/api/modules/labor";
import type { TabsPaneContext, ElMessageBox } from "element-plus";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const emits = defineEmits(["openDialog"])
const activeName = ref("first");
const activeIndex = ref("0" as any);
const dialogVisible = ref(false);
@ -153,11 +156,28 @@ let dataList2 = ref([
}
}
]);
//
const openDialogData = (obj:any) => {
emits("openDialog",obj)
}
//
const getPersonList = async () => {
const res = await getPersonTypeAndEduStatisticsApi({
projectSn: store.sn
});
if (res.result) {
console.log('安全教育智能分析666',res)
}
};
// --
const getMemberJobStatusFn = async () => {
let requestData = {
let requestData:any = {
projectSn: store.sn
}
if(dateRange.value.length > 0){
requestData.inspectTime_begin = dateRange.value[0];
requestData.inspectTime_end = dateRange.value[1];
}
const res = await getMemberJobStatusApi(requestData);
console.log('人员履职情况res--整改人',res)
if(res.result){
@ -168,9 +188,13 @@ const getMemberJobStatusFn = async () => {
}
// --
const getInspectManStatusFn = async () => {
let requestData = {
let requestData:any = {
projectSn: store.sn
}
if(dateRange.value.length > 0){
requestData.inspectTime_begin = dateRange.value[0];
requestData.inspectTime_end = dateRange.value[1];
}
const res = await getInspectManStatusApi(requestData);
console.log('人员履职情况res--检查人',res)
if(res.result){
@ -181,9 +205,13 @@ const getInspectManStatusFn = async () => {
}
// --
const getEnterpriseStatusFn = async () => {
let requestData = {
let requestData:any = {
projectSn: store.sn
}
if(dateRange.value.length > 0){
requestData.inspectTime_begin = dateRange.value[0];
requestData.inspectTime_end = dateRange.value[1];
}
const res = await getEnterpriseStatusApi(requestData);
console.log('人员履职情况res--按分包单位分析',res)
if(res.result){
@ -473,6 +501,7 @@ defineExpose({
onMounted(async () => {
qualityInfo();
getMemberJobStatusFn();
getPersonList();
});
</script>

View File

@ -1,8 +1,8 @@
<template>
<div class="leftTop">
<div class="header">
<div class="hLeft" @click="dialogVisible = true">项目基本信息</div>
<div class="hRight">
<div class="hLeft">项目基本信息</div>
<!-- <div class="hRight">
<el-date-picker
style="width: 85%"
v-model="dateRange"
@ -11,49 +11,84 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</div>
</div> -->
</div>
<div class="content">
<div class="content-info">
<span>项目名称</span>
<span>深圳市宝安区</span>
<span>{{ projectData.projectName || "" }}</span>
</div>
<div class="content-info">
<span>项目地址</span>
<span>深圳市宝安区</span>
<span>{{addressData()}}</span>
</div>
<div class="content-info">
<span>项目经理</span>
<span>深圳市宝安区</span>
<span>{{ projectData.projectManage || "" }}</span>
</div>
<div class="content-info">
<span>联系电话</span>
<span>深圳市宝安区</span>
<span>{{ projectData.projectTel || "" }}</span>
</div>
<div class="content-info">
<span>建筑面积</span>
<span>深圳市宝安区</span>
<span>{{ projectData.projectAcreage || "" }} </span>
</div>
<div class="content-info">
<span>开工日期</span>
<span>深圳市宝安区</span>
<span>{{ projectData.startWorkDate || "" }}</span>
</div>
<div class="content-info">
<span>项目编号</span>
<span>深圳市宝安区</span>
<span>{{ projectData.projectNumber || "" }}</span>
</div>
<div class="content-info">
<span>工程类别</span>
<span>深圳市宝安区</span>
<span>{{ projectData.projectType && projectTypeEnumList.length > 0 ? projectTypeEnumList[projectData.projectType - 1].name : "" }}</span>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { GlobalStore } from "@/stores";
import { ref, onMounted, watch } from "vue";
onMounted(async () => {});
import { getProjectDetail, getStageOption } from "@/api/modules/projectOverview";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const projectData = ref({} as any);
const projectTypeEnumList:any = ref([]); //
const addressData = () => {
return projectData.value.provinceName +
projectData.value.cityName +
projectData.value.areaName +
projectData.value.projectAddress;
}
//
const projectTypeEnum = async () => {
const res: any = await getStageOption({ dictionaryEncoding: "project_type", projectSn: store.sn });
if (res.result.length > 0) {
let newArray = res.result.map((item: any) => {
return {
name: item.name,
id: Number(item.data)
};
});
projectTypeEnumList.value = newArray
} else {
projectTypeEnumList.value = []
}
};
//
const getProjectInfo = async () => {
const res = await getProjectDetail({ projectSn: store.sn });
console.log("获取项目信息666", res);
// console.log("", projectTypeEnum);
projectData.value = res.result;
};
onMounted(async () => {
getProjectInfo();
projectTypeEnum();
});
</script>
<style lang="scss" scoped>
.leftTop {

View File

@ -28,6 +28,9 @@
<div class="political-outlook" v-if="showIndex == 6">
<aiAlarm ref="historyAlarmList" tip="安全教育"></aiAlarm>
</div>
<div class="political-outlook" v-if="showIndex == 7">
<safeEducationDialog ref="historyAlarmList" tip="安全教育"></safeEducationDialog>
</div>
</div>
</div>
</template>
@ -40,6 +43,7 @@ import weatherInfo from "./weather-info.vue";
import riskCount from "./risk-count.vue";
import safeHidden from "./safe-hidden.vue";
import aiAlarm from "./ai-alarm.vue";
import safeEducationDialog from "./safe-education-dialog.vue";
import { GlobalStore } from "@/stores";
let showDialog = ref(false as any);
const showIndex = ref(0);

View File

@ -0,0 +1,420 @@
<template>
<div class="political-outlook">
<div class="content">
<div class="table-one">
<div class="tabList">
<div>序号</div>
<div>整改总数</div>
<div>超期整改数</div>
<div>超期未整改数</div>
<div>整改率</div>
<div>及时整改率</div>
</div>
<el-scrollbar class="listBox" ref="refScrollbar">
<div v-for="(item, index) in partyMemberList" class="listStyle" :key="item.id">
<div>{{index + 1}}</div>
<div>{{item.workerName}}</div>
<div>{{item.workerName}}</div>
<div>{{item.phoneNumber}}</div>
<div>{{item.personType == 1?item.teamName:item.personType == 2?item.departmentName:''}}</div>
<div>{{item.phoneNumber}}</div>
</div>
<div class="notoDta" v-if="partyMemberList.length == 0">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</el-scrollbar>
</div>
</div>
<div class="list-detail" v-if="showDialog" @click="handleDetailClick">
<div class="dialog-content">
<div class="dialog-icon"><img src="@/assets/images/titleIcon.png" /></div>
<div class="dialog-title"><i>抓拍详情</i></div>
<div class="dialog-detail">
<div class="detail-text">
<div class="text-box">
<div class="type">告警类型</div>
<div class="text">{{ detailData.alarmType ? getWarnName(detailData.alarmType) : "" }}</div>
</div>
<div class="text-box" style="margin-top: 5%">
<div class="type">设备名称</div>
<div class="text">{{ detailData.hardwareName || "" }}</div>
</div>
<div class="text-box" style="margin-top: 5%">
<div class="type">记录时间</div>
<div class="text">{{ detailData.createTime }}</div>
</div>
</div>
</div>
<div class="big-pic">
<img :src="BASEURL + '/image/' + detailData.imageUrl" />
</div>
<div class="close-icon" @click="closeDialog">
<el-icon><Close /></el-icon>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import { GlobalStore } from "@/stores";
import { getCompanyDataList, getMemberInfoList } from "@/api/modules/labor";
import type { TabsPaneContext } from 'element-plus'
import { getAlarmTypeOption } from "@/api/modules/aIEarlyWarn";
const store = GlobalStore();
const props = defineProps(["tip"]);
const BASEURL = import.meta.env.VITE_API_URL;
let showDialog = ref(false as any);
const activeName = ref('first')
const activeIndex = ref('1' as any)
const onlineWorkList = ref([
{ name: "在职", value: 1 },
{ name: "离职", value: 2 }
])
const enterpriseListData = ref([] as any);
const memberTypeList = ref([
{ name: "劳务人员", value: 1 },
{ name: "管理人员", value: 2 },
{ name: "临时人员", value: 3 }
]);
const alarmTypeList = ref(["报警", "预警"]);
let pageNo = ref(1 as any);
let moreScroll = ref(true as any);
const refScrollbar = ref(null as any); //
const deviceList = ref([] as any); //
const detailData = ref({} as any);
const searchForm = ref({
memberType: '',
belongCompany: '',
workState: '',
name: '',
idCard: ''
});
const partyMemberList = ref({} as any);
let aiAlarmTypeEnum = ref([] as any);
//
const getWarnTypeOption = async () => {
const res: any = await getAlarmTypeOption({ projectSn: store.sn });
// console.log("", res.result);
let warnType = res.result.map((item: any) => {
return {
id: Number(item.data),
value: item.name
};
});
aiAlarmTypeEnum.value = warnType;
console.log("获取告警类型**", aiAlarmTypeEnum.value);
};
//
function getWarnName(warnType: any) {
let enumObj = aiAlarmTypeEnum.value.find((item: any) => item.id === warnType);
return enumObj ? enumObj.value : "";
}
//
function openDetailDialog(item: any) {
// console.log(item, "");
detailData.value = item;
showDialog.value = true;
}
//
function closeDialog() {
showDialog.value = false;
detailData.value = {};
}
function handleDetailClick(event: any) {
// console.log("", event.target.className);
if (event.target.className == "list-detail") {
closeDialog();
}
}
//
const getCompanyList = async () => {
let data = {
projectSn: store.sn,
enterpriseName: "",
userEnterpriseId: store.userInfo?.userEnterpriseId
};
const res: any = await getCompanyDataList(data);
if (res.code == 200) {
enterpriseListData.value = res.result;
}
};
//
const getMemberCountList = async (tip:any) => {
let requestData:any = {
projectSn: store.sn,
personType: searchForm.value.memberType, //
enterpriseId: searchForm.value.belongCompany, //
inserviceType: searchForm.value.workState, //
idCard: searchForm.value.idCard, //
workerName: searchForm.value.name, //
pageNo: tip == 'search'?1:pageNo.value,
pageSize: 100
}
if(props.tip == '实时'){
requestData.presence = 1;
} else if(props.tip == '日累积') {
requestData.attendance = 1;
} else {
requestData.inserviceType = 1;
}
const res: any = await getMemberInfoList(requestData);
console.log("获取人员信息列表", res);
if(tip == 'more'){
partyMemberList.value = partyMemberList.value.concat(res.result.records);
} else {
partyMemberList.value = res.result.records;
}
// IP
// partyMemberList.value.map((item:any) => {
// item.fieldAcquisitionUrl = BASEURL + '/image/' + item.fieldAcquisitionUrl
// })
if (res.result.pages == pageNo.value) {
moreScroll.value = false;
} else {
pageNo.value = pageNo.value + 1;
}
};
onMounted(async () => {
await getCompanyList();
await getMemberCountList('search');
getWarnTypeOption();
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
// console.log("", e);
const scrollTop = e.target.scrollTop;
const scrollHeight = e.target.scrollHeight;
const clientHeight = e.target.clientHeight;
// console.log("", scrollTop, scrollHeight, clientHeight);
//
if (scrollTop >= scrollHeight - clientHeight - 1) {
// console.log("");
if (moreScroll.value) {
getMemberCountList("more");
}
}
});
});
</script>
<style lang="scss" scoped>
@mixin flex {
display: flex;
align-items: center;
}
.list-detail {
position: absolute;
width: 100%;
height: 100%;
top: 0%;
left: 0%;
background: rgba(7, 28, 49, 0.5);
z-index: 20;
.dialog-content {
position: absolute;
box-sizing: border-box;
padding: 1%;
left: 38%;
top: 30%;
width: 25%;
height: 45%;
background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat;
background-size: 100% 100%;
z-index: 21;
.dialog-icon {
position: absolute;
left: 3%;
top: 3%;
width: 7%;
height: 7%;
img {
width: 100%;
height: 100%;
}
}
.pic-icon {
position: absolute;
left: 3%;
top: 40%;
width: 7%;
height: 7%;
img {
width: 100%;
height: 100%;
}
}
.close-icon {
position: absolute;
right: 3%;
top: 3%;
cursor: pointer;
color: #ffffff;
font-size: 18px;
}
.dialog-title {
color: #ffffff;
font-weight: bold;
margin-left: 8%;
font-size: 18px;
font-family: "OPPOSans-Bold";
}
.dialog-detail {
width: 100%;
height: 25%;
margin-top: 5%;
.detail-text {
width: 95%;
height: 100%;
.text-box {
height: 25%;
display: flex;
align-items: center;
background: url("@/assets/images/aIEarlyWarning/contentBg.png") no-repeat;
background-size: 100% 100%;
.type {
width: 20%;
margin-left: 3%;
color: #a1accb;
font-size: 12px;
}
.text {
font-size: 12px;
color: #ffffff;
}
}
}
}
.pic-title {
color: #ffffff;
font-weight: bold;
font-size: 18px;
font-family: "OPPOSans-Bold";
margin-top: 5%;
margin-left: 8%;
}
.big-pic {
width: 100%;
height: 50%;
margin-top: 10%;
img {
width: 100%;
height: 100%;
}
}
}
}
.political-outlook {
height: 97%;
margin: 0 60px;
.content {
height: 95%;
width: 100%;
margin-top: 10px;
// background: url("@/assets/images/cardImg.png") no-repeat;
background-size: 100% 100%;
padding: 20px 15px;
.table-one{
height: 88%;
.tabList {
display: flex;
// width: 100%;
height: 8%;
background: url("@/assets/images/vehicleManagement/ListTitleImg.png") no-repeat;
background-size: 100% 100%;
// position: absolute;
left: 75.5%;
top: 75%;
color: #ccc;
font-size: calc(100vw * 14 / 1920);
line-height: 30px;
align-items: center;
margin-top: 2%;
div {
text-align: center;
width: 17%;
}
}
.listBox {
height: 90%;
.listStyle {
display: flex;
align-items: center;
text-align: center;
color: #fff;
font-size: 12px;
margin-bottom: 5px;
.list-img {
.el-img {
width: 30px;
height: 30px;
img {
display: flex;
align-items: center;
width: 100%;
height: 100%;
}
}
}
div {
width: 17%;
white-space: nowrap; //
overflow: hidden;
text-overflow: ellipsis;
}
}
.listStyle:hover {
background: #091f3f;
}
}
}
:deep(){
.el-tabs__item{
color: white;
}
.el-tabs__item.is-active{
color: var(--el-color-primary)
}
}
}
}
.notoDta {
top: 35%;
width: 20%;
left: 40%;
position: absolute;
text-align: center;
img {
width: 40%;
margin: 5% 30%;
}
p {
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
}
}
// element
:deep() {
.el-date-editor .el-range-input,
.el-range-separator {
color: #fff;
}
.el-input__wrapper {
background: #112d59;
}
.el-input__inner {
color: #fff;
}
.el-button {
background-color: #2758c0;
color: white;
border-color: transparent;
}
}
// ::v-deep .el-select .el-input .el-select__caret {
// color: #fff;
// }
</style>