机械管理开发

dev_xd
lj7788@126.com 2025-07-15 18:40:30 +08:00
parent 4fecf9f677
commit 1a947a0457
14 changed files with 6136 additions and 5246 deletions

View File

@ -12,11 +12,11 @@
}
@font-face {
font-family: DingTalkSans;
src: url('../fonts/DingTalkJinBuTi.woff2');
src: url("../fonts/DingTalkJinBuTi.woff2");
}
@font-face {
font-family: NumFont;
src: url('../fonts/DS-DIGIT.TTF');
src: url("../fonts/DS-DIGIT.TTF");
}
* {
font-family: DingTalkSans;
@ -31,12 +31,20 @@ body {
overflow: auto;
}
.scroll::-webkit-scrollbar {
width: 8px ;
width: 8px;
height: 8px;
}
.scroll::-webkit-scrollbar-thumb {
background-color: #01a9ff;
border-radius: 4px ;
border-radius: 4px;
}
.el-table.scroll .el-table__body-wrapper::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.el-table.scroll .el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: #01a9ff;
border-radius: 4px;
}
@media (max-width: 1920px) {
.w-scroll::-webkit-scrollbar {
@ -50,7 +58,6 @@ body {
#app {
width: 1912px;
height: 1080px;
overflow: hidden;
}
.screen-content-max {
width: 1912px;
@ -90,7 +97,6 @@ body {
#app {
width: 2550px;
height: 1440px;
overflow: hidden;
}
.screen-content-max {
width: 2550px;
@ -152,6 +158,37 @@ body {
align-items: center;
display: inline-flex !important;
}
.mytable th .cell {
font-size: 20px;
}
.mytable td .cell {
font-size: 20px;
}
.mytable td .cell .el-tag {
font-size: 20px;
height: 30px;
line-height: 30px;
}
.mytable .el-table__empty-text {
font-size: 20px;
}
.mytable .el-table__row:nth-child(odd) {
background-size: 100% 70px;
}
.mytable .el-table__row td {
height: 80px;
}
.mytable .el-image.att-img img {
height: 60px;
}
.mytable .el-image.att-img .el-image__error {
height: 60px;
position: relative;
top: 10px;
}
.mytable .el-icon-close {
font-size: 30px;
}
}
@media (min-width: 2561px) {
.w-scroll::-webkit-scrollbar {
@ -232,6 +269,45 @@ body {
.el-picker-panel__body-wrapper * {
font-size: 16px !important;
}
.mytable th {
height: 50px;
}
.mytable th .cell {
font-size: 30px;
line-height: 48px;
}
.mytable td {
height: 50px;
}
.mytable td .cell {
font-size: 30px;
line-height: 48px;
}
.mytable td .cell .el-tag {
font-size: 30px;
height: 48px;
line-height: 48px;
}
.mytable .el-table__empty-text {
font-size: 30px;
}
.mytable .el-table__row:nth-child(odd) {
background-size: 100% 90px;
}
.mytable .el-table__row td {
height: 100px;
}
.mytable .el-image.att-img img {
height: 80px;
}
.mytable .el-image.att-img .el-image__error {
height: 80px;
position: relative;
top: 16px;
}
.mytable .el-icon-close {
font-size: 40px;
}
}
.img-openwin {
position: absolute;
@ -376,12 +452,12 @@ table {
}
.head-title-select {
padding-top: 23px;
width: 12% ;
width: 12%;
position: relative;
}
.head-title-date {
padding-top: 15px;
width: 15% ;
width: 15%;
display: flex;
align-items: center;
}
@ -745,7 +821,7 @@ table {
text-align: center;
line-height: 45px;
font-size: 30px;
font-family: 'number-font';
font-family: "number-font";
}
.glr-login-rate {
display: flex;
@ -2359,7 +2435,7 @@ table {
padding-left: 15px;
}
.list-info-name {
padding: 7px 0 ;
padding: 7px 0;
font-size: 16px;
}
.list-info-name span {
@ -2746,7 +2822,7 @@ table {
/*点位图弹窗*/
.sjk-popup {
width: 400px;
background: url('../images/map_sjk_popup_bgd.png') no-repeat center / 100% 100%;
background: url("../images/map_sjk_popup_bgd.png") no-repeat center / 100% 100%;
font-size: 14px;
position: fixed;
z-index: 100;
@ -2758,7 +2834,7 @@ table {
padding: 8px;
color: #ffffff;
font-size: 16px;
background: url('../images/map_popup_title.png') no-repeat left / 100% 100%;
background: url("../images/map_popup_title.png") no-repeat left / 100% 100%;
}
.sjk-popup-time {
padding: 10px;
@ -2817,7 +2893,7 @@ table {
align-items: center;
}
.sjk-chart-line-title-tz button {
padding: 5px ;
padding: 5px;
width: 130px;
cursor: pointer;
margin-right: 20px;
@ -3210,7 +3286,7 @@ table {
}
.video-vehicle-table .el-table th {
color: #67baff;
padding: 10px 25px ;
padding: 10px 25px;
}
.video-vehicle-table .el-table td {
padding: 10px 15px;
@ -3331,7 +3407,7 @@ table {
background: url("../images/warning_renyuan.png") no-repeat bottom / 100% 100%;
}
.people-list-img img {
width: 100% ;
width: 100%;
height: 100%;
}
.people-list-top {
@ -3358,7 +3434,7 @@ table {
background: #888888;
}
.people-info-name {
padding: 7px 0 ;
padding: 7px 0;
font-size: 16px;
display: flex;
align-items: center;
@ -3368,7 +3444,7 @@ table {
font-size: 14px;
}
.people-info-name {
padding: 7px 0 ;
padding: 7px 0;
font-size: 16px;
}
.people-info-action {
@ -3443,11 +3519,11 @@ table {
.popup-people-max {
width: 280px;
height: 300px;
background: url('../images/map_popup_bgd.png') no-repeat center / 100% 100%;
background: url("../images/map_popup_bgd.png") no-repeat center / 100% 100%;
font-size: 14px;
}
.popup-people-max.active {
background: url('../images/map_popup_red_bgd.png') no-repeat center / 100% 100%;
background: url("../images/map_popup_red_bgd.png") no-repeat center / 100% 100%;
}
.popup-people-min {
padding: 20px 15px;
@ -3667,7 +3743,7 @@ table {
background: none;
}
.quality-table .el-table__footer-wrapper tbody td.el-table__cell {
background: none ;
background: none;
color: #fff;
font-weight: bold;
font-size: 16px;
@ -3770,7 +3846,7 @@ table {
font-size: 28px;
color: #999999;
cursor: pointer;
width: 50px ;
width: 50px;
height: 50px;
text-align: center;
}
@ -3873,7 +3949,7 @@ table {
color: #dddddd;
}
.popup-baidu-machine-address {
padding: 5px ;
padding: 5px;
background: rgba(0, 170, 255, 0.2);
font-size: 14px;
color: #ffffff;
@ -4473,7 +4549,7 @@ table {
margin-right: 5px;
}
.pcd-output-value-title {
padding: 0 ;
padding: 0;
}
.pcd-chart {
height: 540px;
@ -6092,7 +6168,7 @@ daily-diary-time-line-icon-4 {
background: rgba(0, 0, 0, 0.6);
left: 0;
top: 0;
z-index: 2002 ;
z-index: 2002;
}
.amplify-carousel-img {
width: 100%;
@ -6440,7 +6516,7 @@ daily-diary-time-line-icon-4 {
}
/*筛选框*/
.select-shigong {
padding: 5px ;
padding: 5px;
width: 130px;
cursor: pointer;
background: url("../images/dangerous.png") no-repeat center / 100% 100%;
@ -6452,7 +6528,7 @@ select:focus {
}
option {
display: block;
padding: 5px ;
padding: 5px;
width: 130px;
height: 30px;
cursor: pointer;

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,28 @@ const machGetCertInfoData=(projectId)=>{
})
}
//机智管家-操作证列表
const machGetCertInfoList=(projectId,status)=>{
return request({
url: '/manage/bgscreen/machMater/machGetCertInfoList',
method: 'get',
params: {
projectId: projectId,
status:status
}
})
}
//机智管家-塔机指挥
const machSelectMachineCardImageList=(projectId)=>{
return request({
url: '/manage/bgscreen/machMater/machSelectMachineCardImageList',
method: 'get',
params: {
projectId: projectId
}
})
}
//机智管家-机械地图数据
const machSelectMachineMapData=(projectId)=>{
return request({
@ -192,6 +214,8 @@ export default{
machGetExceptionAlert,
machGetMachineInfo,
machGetSystemDeviceInfoUrl,
machSelectMachineCardImageList,
machGetCertInfoList,
materGetConcreteMaterialActQuantityBuildingNoInfoService,
materGetConcreteMaterialActQuantityGhInfoService,
materGetProjectChaoHaoStatisticsRPTService,

View File

@ -21,6 +21,9 @@ export default {
type: String,
default: '400px',
},
tag:{
type:Object
},
render: {
type: Function,
},
@ -44,13 +47,13 @@ export default {
reLoad() {
let opt = {}
if (this.render) {
opt = this.render(opt)
opt = this.render(opt,this.chart,this.tag)
}
this.chart.setOption(opt, true)
},
setOption(opt) {
if (this.render) {
opt = this.render(opt, this.chart)
opt = this.render(opt, this.chart,this.tag)
}
this.chart.setOption(opt)
},

View File

@ -102,8 +102,8 @@ function subFeatureSize(that) {
{ name: "宽", value: y.toFixed(2) + "" },
{ name: "高", value: z.toFixed(2) + "" },
];
result[1].data = [{ name: "面积", value: (x * y).toFixed(2) + "" }];
result[2].data = [{ name: "体积", value: (x * y * z).toFixed(2) }];
result[1].data = [{ name: "面积", value: (x * y).toFixed(4) + "" }];
result[2].data = [{ name: "体积", value: (x * y * z).toFixed(6) }];
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
that.selFeatureId = featureId;
that.info = result;

View File

@ -0,0 +1,159 @@
<template>
<MyDialog v-if="show" v-model="show" width="60vw" height="65vh" class="cert-info-dlg" :key="dpi">
<template slot="title">
{{ title }}
</template>
<div class="sjk-chart-line-title sjk-chart-line-title-border" v-if="1==2">
<div :class="labelsNav == 0 ? 'active' : ''" @click="onDiscloseNatBut(0)"></div>
<div :class="labelsNav == 1 ? 'active' : ''" @click="onDiscloseNatBut(1)"></div>
</div>
<el-table v-if="labelsNav == 0" :data="certInfoList" :max-height="certHeight" class="scroll mytable">
<el-table-column prop="photoUrl" label="照片">
<template slot-scope="{ row }">
<el-image class="td-img" :src="row.images[0]" v-if="row.images && row.images.length > 0" :preview-src-list="row.images" fit="cover" />
<span v-else class="td-no-data"> 暂无图片</span>
</template>
</el-table-column>
<el-table-column prop="certificateNum" label="操作证编号"></el-table-column>
<el-table-column prop="name" label="姓名"></el-table-column>
<el-table-column prop="phone" label="电话"></el-table-column>
<el-table-column prop="issuingUnit" label="发证单位"></el-table-column>
<el-table-column prop="issuingDate" label="发证日期"></el-table-column>
<el-table-column prop="validityDate" label="有效日期"></el-table-column>
<el-table-column prop="userType" label="人员类型"></el-table-column>
<el-table-column prop="deviceNames" label="绑定设备"></el-table-column>
</el-table>
</MyDialog>
</template>
<script>
export default {
data() {
return {
dpi: "",
show: false,
title: "操作证书列表",
labelsNav: 0,
loading: true,
certInfoList: [],
machineCardList: [],
projectId: null,
status: "",
certHeight: 400,
};
},
methods: {
onDiscloseNatBut(index) {
this.labelsNav = index;
this.loadData();
},
showDialog(prjId, status) {
window.addEventListener("resize", () => {
if (this.dpi != this.$dpi()) {
this.dpi = this.$dpi();
this.resize();
}
});
this.resize();
this.labelsNav=0
this.projectId = prjId;
this.status = status;
this.show = true;
this.loadData();
},
resize() {
let is1K = this.$dpi() == "1K";
let is2K = this.$dpi() == "2K";
//this.certHeight = is1K ? 450 : is2K ? 630 : 980;
this.certHeight = is1K ? 530 : is2K ? 740 : 980;
},
loadData() {
this.loading = true;
if (this.labelsNav == 0) {
this.$api.machMater.machGetCertInfoList(this.projectId, this.status).then((d) => {
this.loading = false;
this.certInfoList = (d.data?.data || []).map((it) => {
it.images = it.photoUrl ? it.photoUrl.split(",") : [];
return it;
});
});
} else {
this.loading = true;
this.$api.machMater.machSelectMachineCardImageList(this.projectId).then((d) => {
this.loading = false;
this.machineCardList = d.data?.data;
});
}
},
},
};
</script>
<style lang="less">
.cert-info-dlg {
.popup-project-introduction-min {
transform: translateY(20%);
min-width: 960px;
.popup-project-introduction-details {
padding: 0px;
.quality-table {
padding: 0px;
}
.td-img {
width: 100px;
height: 100px;
}
.td-no-data {
color: #cccc;
}
.sjk-chart-line-title {
margin: 0px 0px;
div {
font-size: 14px;
height: 30px;
line-height: 30px;
}
}
}
}
@media (min-width: 1921px) and (max-width: 2560px) {
.popup-project-introduction-min {
max-height: 810px;
.popup-project-introduction-details {
.sjk-chart-line-title {
margin: 10px 0px;
div {
font-size: 18px;
height: 40px;
line-height: 40px;
}
}
}
}
}
@media (min-width: 2561px) {
.popup-project-introduction-min {
min-height: 1060px;
.popup-project-introduction-details {
.sjk-chart-line-title {
margin: 20px 0px;
div {
font-size: 24px;
height: 60px;
line-height: 60px;
}
}
td-img {
width: 200px;
height: 200px;
}
}
}
}
}
</style>

View File

@ -162,12 +162,12 @@ export default {
};
},
methods: {
getManualUrl(url){
if(url.indexOf("://")==-1){
if(url.indexOf("/")!=0){
url="/"+url;
getManualUrl(url) {
if (url.indexOf("://") == -1) {
if (url.indexOf("/") != 0) {
url = "/" + url;
}
return "https://file-other.makalu.cc"+url;
return "https://file-other.makalu.cc" + url;
}
return url;
},
@ -225,7 +225,7 @@ export default {
.info-label {
color: #4ab4bc;
vertical-align: top;
margin-right:10px;
margin-right: 10px;
}
.info-value {
color: #16d6ff;
@ -241,7 +241,7 @@ export default {
width: 10%;
margin-right: 10px;
text-align: center;
.el-image{
.el-image {
height: 100px;
}
}
@ -257,6 +257,7 @@ export default {
@media (min-width: 1921px) and (max-width: 2560px) {
.machine-info-dlg {
.popup-project-introduction-min {
.popup-project-introduction-details {
* {
font-size: 24px;
@ -268,10 +269,12 @@ export default {
overflow-y: auto;
}
}
}
}
@media (min-width: 2561px) {
.machine-info-dlg {
.popup-project-introduction-min {
.popup-project-introduction-details {
* {
font-size: 32px;
@ -297,5 +300,6 @@ export default {
}
}
}
}
}
</style>

View File

@ -83,17 +83,93 @@
</div>
</module-one-2-2>
<module-one-2-1 label class="no-title no-border h22"> </module-one-2-1>
<module-one-2-1 label class="no-title no-border h22 manage-quota">
<div class="manage-nav indicators-chart-bgd">
<img :src="'./images/check_icon.png'" />
<span class="nva-text">管理指标 {{ manageQuota.startDate }} {{ manageQuota.endDate }}此统计不包括海外设备公务用车临管设备 </span>
</div>
<div class="manage-chart">
<div class="chart-item">
<my-chart :key="manageChartKey" class="manage-data" id="manageChart1" width="100%" height="100%" :tag="{ value: !manageQuota.deviceClockRate ? 0 : manageQuota.deviceClockRate, text: '打卡率' }" :render="renderManage"></my-chart>
</div>
<div class="chart-item">
<my-chart :key="manageChartKey" class="manage-data" id="manageChart2" width="100%" height="100%" :tag="{ value: manageQuota.deviceAttendanceRate, text: '完好率' }" :render="renderManage"></my-chart>
</div>
<div class="chart-item">
<my-chart :key="manageChartKey" class="manage-data" id="manageChart3" width="100%" height="100%" :tag="{ value: manageQuota.deviceWorkTimeRate == 0 ? 100 : manageQuota.deviceWorkTimeRate, text: '运行工时占比' }" :render="renderManage"></my-chart>
</div>
<div class="chart-item">
<my-chart :key="manageChartKey" class="manage-data" id="manageChart4" width="100%" height="100%" :tag="{ value: !manageQuota.deviceCertRate ? 0 : manageQuota.deviceCertRate, text: '持证上岗率' }" :render="renderManage"></my-chart>
</div>
<div class="chart-item">
<my-chart :key="manageChartKey" class="manage-data" id="manageChart5" width="100%" height="100%" :tag="{ value: manageQuota.deviceIdleRate > 100 ? 100 : manageQuota.deviceIdleRate, text: '设备利用率' }" :render="renderManage"></my-chart>
</div>
</div>
</module-one-2-1>
</el-col>
<el-col :span="6" class="h100">
<module-one-1-1 label="操作证情况" class="labor-base"> </module-one-1-1>
<module-one-1-1 label="操作证情况" class="certInfo-data">
<div class="czz-number">
<div class="czz-number-content" @click="getCertInfoList(1)">
<div class="czz-number-img czz-number-img-blue">
<svg-icon icon-class="skill" />
</div>
<div class="survey_content_number">
<p>操作证数量</p>
<div class="survey_content_value">
<span v-cloak class="led-number">{{ certInfoData.count }}</span>
</div>
</div>
</div>
<div class="czz-number-content" @click="getCertInfoList(2)">
<div class="czz-number-img czz-number-img-green">
<svg-icon icon-class="bind" />
</div>
<div class="survey_content_number">
<p>已绑定数量</p>
<div class="survey_content_value survey_content_value_color_green">
<span v-cloak class="led-number">{{ certInfoData.bindCount }}</span>
</div>
</div>
</div>
</div>
<module-one-1-1 label="打卡管控提示" class="labor-base"> </module-one-1-1>
<staffSurveyChart :key="certKey" :height="$dpi() == '1K' ? '180px' : $dpi() == '2K' ? '280px' : '450px'" :data="certificateData" :width="140"></staffSurveyChart>
</module-one-1-1>
<module-one-1-1 label="监控异常预警" class="labor-base"> </module-one-1-1>
<module-one-1-1 label="打卡管控提示" class="check-in-module">
<div class="warning-info" :key="checkInKey">
<div class="warning-info-title">
<div :class="checkInNav == 0 ? 'active' : ''" @click="onCheckIn(0)"></div>
<div :class="checkInNav == 1 ? 'active' : ''" @click="onCheckIn(1)"></div>
<div :class="checkInNav == 2 ? 'active' : ''" @click="onCheckIn(2)"></div>
</div>
<div class="warning-info-table">
<el-table ref="elCheckIn" :data="showCheckInTableData" :height="checkInHeight" :row-style="rowStyle" @cell-mouse-enter="checkInMouseEnter" @cell-mouse-leave="checkInMouseLeave" class="elTable scroll">
<el-table-column v-for="(st, idx) in showCheckInTableTile" :prop="st.value" :key="idx" :width="idx == 0 ? checkInFirstWidth : ''" :label="st.name" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</div>
</module-one-1-1>
<module-one-1-1 label="监控异常预警" class="exception-alert">
<div class="warning-info" :key="exceptionAlertKey">
<div class="warning-info-table">
<el-table ref="elException" :data="exceptionAlertData" :height="exceptionAlertHeight" :row-style="rowStyle" @cell-mouse-enter="exceptionMouseEnter" @cell-mouse-leave="exceptionMouseLeave" class="elTable scroll">
<el-table-column prop="project_abbreviation" label="归属项目" :width="checkInFirstWidth" show-overflow-tooltip></el-table-column>
<el-table-column prop="device_name" label="机械名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="alarm_type_name" label="预警类型" show-overflow-tooltip></el-table-column>
<el-table-column prop="address" label="预警地址" show-overflow-tooltip></el-table-column>
</el-table>
</div>
</div>
</module-one-1-1>
</el-col>
<machine-info-dialog ref="machineInfoDialog"></machine-info-dialog>
<cert-info-data-dialog ref="certInfoDataDialog"></cert-info-data-dialog>
</div>
</template>
@ -102,11 +178,19 @@ import debounce from "lodash.debounce";
import processControlBar from "./processControlBar.vue";
import machineInfoDialog from "./machineInfoDialog.vue";
import baiduMap from "./baiduMap.vue";
import MyChart from "@/components/MyChart.vue";
import SvgIcon from "@/components/SvgIcon.vue";
import staffSurveyChart from "@/components/staffSurveyChart.vue";
import certInfoDataDialog from "./certInfoDataDialog.vue";
export default {
components: {
processControlBar,
baiduMap,
machineInfoDialog,
MyChart,
SvgIcon,
staffSurveyChart,
certInfoDataDialog,
},
data() {
return {
@ -140,6 +224,42 @@ export default {
buildingData: [],
baiduMapShow: false,
figureShow: true,
//
manageQuota: {
startDate: "",
endDate: "",
deviceClockRate: 0,
deviceIdleRate: 0,
deviceWorkTimeRate: 0,
deviceCertRate: 0,
deviceAttendanceRate: 0,
},
manageChartKey: 0,
//
certInfoData: {},
certificateData: [],
certKey: 0,
//
checkInNav: 0,
checkInHeight: 230,
chechkInInterval: "",
rowStyle: {
color: "#ffffff",
fontSize: "12px",
height: "32px",
},
checkInTableData: [],
checkInTableTile: [],
showCheckInTableData: [],
showCheckInTableTile: [],
checkInKey: 0,
checkRowHeight: 40,
checkInFirstWidth: 200,
//
exceptionAlertData: [],
exceptionAlertKey: 0,
exceptionAlertHeight: 230,
exceptionInterval:null
};
},
mounted() {
@ -168,6 +288,11 @@ export default {
window.goOBDDetails = this.goOBDDetails;
},
methods: {
onCheckIn(n) {
this.checkInNav = n;
this.showCheckInTableData = this.checkInTableData[n];
this.showCheckInTableTile = this.checkInTableTile[n];
},
goOBDDetails(deviceNum) {
//OBD
let requestUrl = "https://jzgj.crfeb.com.cn/largeScreen/digitalConstruction/";
@ -254,8 +379,15 @@ export default {
this.warningHeight = is1K ? 166 : is2K ? 270 : 470;
this.mapHeight = is1K ? 720 : is2K ? 1500 : 2000;
this.chart3Height = is1K ? 260 : is2K ? 400 : 600;
this.checkInHeight = is1K ? 200 : is2K ? 310 : 520;
this.checkRowHeight = is1K ? 60 : is2K ? 60 : 90;
this.checkInFirstWidth = is1K ? 120 : is2K ? 220 : 300;
this.exceptionAlertHeight = is1K ? 250 : is2K ? 360 : 590;
this.chartKey++;
this.chart3Key++;
this.manageChartKey++;
this.certKey++;
this.checkInKey++;
},
init() {
if (!this.selProject) {
@ -264,10 +396,33 @@ export default {
this.$api.machMater.machGetManageQuota(this.selProject.id).then((d) => {
console.log("====>", d);
});
this.loadDeviceOverview();
this.loadClassifyBarData();
//
this.loadDeviceOverview();
//
this.loadClassifyBarData();
//
this.loadMapData();
//
this.loadManageQuota();
//
this.loadCertInfoData();
//
this.loadClockInException();
// //
this.chechkInInterval = setInterval(this.checkInScroll, 3000);
//
this.loadDeviceWarnData();
//
this.exceptionInterval = setInterval(this.exceptionScroll, 3000);
//
if (this.overviewInterval) {
clearInterval(this.overviewInterval);
}
@ -319,6 +474,232 @@ export default {
},
};
},
loadDeviceWarnData() {
this.$api.machMater.machGetExceptionAlert(this.selProject.id, 10).then((d) => {
let tmps=d.data || [];
this.exceptionAlertData = [...tmps];
this.exceptionAlertKey++;
});
},
// ---------
exceptionScroll() {
if (!this.$refs.elException) {
return;
}
let maxHeight = this.$refs.elException.$el.querySelectorAll(".el-table__body")[0].offsetHeight;
let clientHeight = this.$refs.elException.bodyWrapper.clientHeight;
if (Math.abs(this.$refs.elException.bodyWrapper.scrollTop - (maxHeight - clientHeight)) < 5) {
//5
this.$refs.elException.bodyWrapper.scrollTop = 0;
} else {
this.$refs.elException.bodyWrapper.scrollTop += this.checkRowHeight; //32
}
},
exceptionMouseEnter() {
//
clearInterval(this.exceptionInterval);
},
exceptionMouseLeave() {
//
this.exceptionInterval = setInterval(this.exceptionInterval, 3000);
},
// ---------
checkInScroll() {
if (!this.$refs.elCheckIn) {
return;
}
let maxHeight = this.$refs.elCheckIn.$el.querySelectorAll(".el-table__body")[0].offsetHeight;
let clientHeight = this.$refs.elCheckIn.bodyWrapper.clientHeight;
if (Math.abs(this.$refs.elCheckIn.bodyWrapper.scrollTop - (maxHeight - clientHeight)) < 5) {
//5
this.$refs.elCheckIn.bodyWrapper.scrollTop = 0;
} else {
this.$refs.elCheckIn.bodyWrapper.scrollTop += this.checkRowHeight; //32
}
},
checkInMouseEnter() {
//
clearInterval(this.checkInInterval);
},
checkInMouseLeave() {
//
this.checkInInterval = setInterval(this.checkInScroll, 3000);
},
loadClockInException() {
this.$api.machMater.machGetClockInException(this.selProject.id, 50).then((d) => {
let res = d.data?.data;
this.checkInTableData = [res.signExceptionList, res.workTimeExceptionList, res.certExceptionList];
this.checkInTableTile = [
[
{ name: "项目名称", value: "projectName", width: "30%" },
{ name: "姓名", value: "userName" },
{ name: "打卡设备", value: "deviceName" },
{ name: "打卡时间", value: "dataTime" },
],
[
{ name: "项目名称", value: "projectName", width: "30%" },
{ name: "设备名称", value: "deviceName" },
{ name: "异常原因", value: "errorReason" },
{ name: "打卡时间", value: "date" },
],
[
{ name: "项目名称", value: "projectAbbreviation" },
{ name: "姓名", value: "certificateName" },
{ name: "过期天数", value: "date" },
{ name: "到期时间", value: "validityDate" },
],
];
let num = 0;
if (res.signExceptionList.length > 0) {
num = 0;
} else if (res.workTimeExceptionList.length > 0) {
num = 1;
} else if (res.certExceptionList.length > 0) {
num = 2;
} else {
num = 0;
}
this.checkInNav = num;
this.showCheckInTableData = this.checkInTableData[num];
this.showCheckInTableTile = this.checkInTableTile[num];
this.checkInKey++;
});
},
getCertInfoList(status) {
this.$refs.certInfoDataDialog.showDialog(this.selProject.id, status == 1 ? "" : "1");
},
loadCertInfoData() {
this.$api.machMater.machGetCertInfoData(this.selProject.id).then((d) => {
let res = d.data?.data || {};
this.certInfoData = res;
this.certificateData = [
{ text: "职工", value: res.zgCount },
{ text: "劳务派遣", value: res.lwCount },
{ text: "其他", value: res.qtCount },
];
this.certKey++;
});
},
renderManage(opt, c, tag) {
let is1K = this.$dpi() == "1K";
let is2K = this.$dpi() == "2K";
let value = tag?.value || 0;
let text = tag?.text || "-";
if (!value) {
value = 0;
}
let placeHolderStyle = {
normal: {
label: {
show: false,
},
labelLine: {
show: false,
},
color: "rgba(0,0,0,0)",
borderWidth: 0,
},
emphasis: {
color: "rgba(0,0,0,0)",
borderWidth: 0,
},
};
opt = {
title: [
{
text: value + "%",
textAlign: "center",
left: "50%",
top: is1K ? "35%" : "39%",
textStyle: {
color: "#67abf2",
fontSize: is1K ? 20 : is2K ? 32 : 48,
},
},
{
text: text,
left: "50%",
top: "85%",
textAlign: "center",
textStyle: {
color: "#cdd7fa",
fontWeight: "normal",
fontSize: is1K ? 16 : is2K ? 24 : 32,
textAlign: "center",
},
},
],
series: [
{
type: "pie",
hoverAnimation: false,
radius: ["50%", "49%"],
center: ["50%", "45%"],
labelLine: {
normal: {
show: false,
},
},
label: {
normal: {
position: "center",
},
},
data: [
{
value: 100,
itemStyle: {
normal: {
color: "#255788",
},
},
},
],
},
{
type: "pie",
hoverAnimation: false,
radius: ["43%", "50%"],
center: ["50%", "45%"],
labelLine: {
normal: {
show: false,
},
},
label: {
normal: {
position: "center",
},
},
data: [
{
value: value,
itemStyle: {
normal: {
color: "#68a8f2",
},
},
normal: {
show: false,
},
},
{
value: 100 - value,
itemStyle: placeHolderStyle,
},
],
},
],
};
return opt;
},
loadManageQuota() {
this.$api.machMater.machGetManageQuota(this.selProject.id).then((d) => {
this.manageQuota = d.data?.data || {};
this.manageChartKey++;
});
},
loadMapData() {
this.$api.machMater.machSelectMachineMapData(this.selProject.id).then((d) => {
let obj = {};
@ -480,6 +861,56 @@ export default {
}
}
}
.manage-quota {
.manage-nav {
display: flex;
align-items: center;
padding-left: 20px;
line-height: 40px;
img {
width: 12px;
margin-right: 8px;
}
font-size: 20px;
}
.manage-chart {
display: flex;
flex-direction: row;
height: calc(100% - 40px);
.chart-item {
width: 20%;
height: 100%;
}
}
}
.certInfo-data {
.czz-number {
padding: 20px 10px;
.czz-number-content {
.czz-number-img {
width: 60px;
height: 60px;
.svg-icon {
width: 30px;
height: 30px;
margin-top: 15px;
}
&.czz-number-img-blue {
.svg-icon {
fill: #52adf4;
}
}
&.czz-number-img-green {
.svg-icon {
fill: aquamarine;
}
}
}
}
}
}
@media (min-width: 1921px) and (max-width: 2560px) {
.device-info {
.survey_title {
@ -531,6 +962,11 @@ export default {
}
}
.certInfo-data {
.czz-number {
padding: 30px 10px;
}
}
.device-status {
.project-overview-chart {
.chart-gif {
@ -734,6 +1170,76 @@ export default {
}
}
}
.manage-quota {
.manage-nav {
padding-left: 20px;
line-height: 60px;
height: 60px;
img {
width: 16px;
margin-right: 8px;
}
font-size: 32px;
}
.manage-chart {
height: calc(100% - 60px);
}
}
.warning-info-title {
.active {
background-size: 16px 30px;
padding-left: 20px;
}
}
.certInfo-data {
.czz-number {
padding: 30px 10px;
.czz-number-content {
.czz-number-img {
width: 120px;
height: 120px;
.svg-icon {
width: 60px;
height: 60px;
margin-top: 30px;
}
}
.survey_content_number {
font-size: 32px;
.survey_content_value {
font-size: 24px;
.led-number {
font-size: 60px;
}
}
}
}
}
}
.check-in-module,.exception-alert {
.elTable {
.el-table__row {
height: 90px !important;
background-size: 100% 60px;
}
.el-table__empty-text {
font-size: 18px;
}
th {
.cell {
font-size: 24px;
}
}
td {
.cell {
font-size: 22px;
}
}
}
}
}
}
</style>

View File

@ -7,18 +7,7 @@
<artifactId>yanzhu-common</artifactId>
<version>3.6.2</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
</plugins>
</build>
<modelVersion>4.0.0</modelVersion>
<artifactId>yanzhu-common-core</artifactId>

View File

@ -384,7 +384,7 @@ public class HttpUtils
* @param json JSON
* @return GET
*/
public static String jsonToGetParams(JSONObject json) {
public static String jsonToGetParams(JSONObject json) throws UnsupportedEncodingException {
if (json == null || json.isEmpty()) {
return "";
}
@ -396,9 +396,9 @@ public class HttpUtils
String key = entry.getKey();
String value = entry.getValue() != null ? entry.getValue().toString() : "";
// 对键值进行 URL 编码
params.append(URLEncoder.encode(key, StandardCharsets.UTF_8))
params.append(URLEncoder.encode(key, "UTF-8"))
.append("=")
.append(URLEncoder.encode(value, StandardCharsets.UTF_8));
.append(URLEncoder.encode(value, "UTF-8"));
}
return params.toString();
}

View File

@ -1,5 +1,6 @@
package com.yanzhu.manage.controller.bigscreen;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.core.utils.http.HttpUtils;
@ -88,6 +89,35 @@ public class MachMaterController extends BaseController {
return AjaxResult.success(JSONObject.parseObject(result));
}
/**
* -
*/
@GetMapping("/machGetCertInfoList")
public AjaxResult machGetCertInfoList(Long projectId,String status) throws Exception {
Map<String, Object> map = getConfig(projectId, "mach");
String url = map.get("url").toString();
JSONObject paramJson = (JSONObject) map.get("obj");
paramJson.put("deviceNames", status);
HttpUtils httpUtils = new HttpUtils();
url += "/largeScreen/digitalConstruction/getCertInfoList?"+ HttpUtils.jsonToGetParams( paramJson);
String result = httpUtils.sendGet(url);
return AjaxResult.success(JSONObject.parseObject(result));
}
/**
* -
*/
@GetMapping("/machSelectMachineCardImageList")
public AjaxResult machSelectMachineCardImageList(Long projectId)throws Exception{
Map<String, Object> map = getConfig(projectId, "mach");
String url = map.get("url").toString();
JSONObject paramJson = (JSONObject) map.get("obj");
paramJson.put("imageStatus", 2);
HttpUtils httpUtils = new HttpUtils();
url += "/api/warning/selectMachineCardImageList?"+ HttpUtils.jsonToGetParams( paramJson);
String result = httpUtils.sendGet(url);
return AjaxResult.success(JSONObject.parseObject(result));
}
/**
* -
*/
@ -217,7 +247,7 @@ public class MachMaterController extends BaseController {
HttpUtils httpUtils = new HttpUtils();
url += "/largeScreen/digitalConstruction/getExceptionAlert?"+ HttpUtils.jsonToGetParams( paramJson);
String result = httpUtils.sendGet(url);
return AjaxResult.success(JSONObject.parseObject(result));
return AjaxResult.success(JSONArray.parse(result));
}

View File

@ -146,9 +146,55 @@ function getSelectFeatureIds(that) {
}
return [];
}
function addAllModels(that, cb) {
let api = bimSelectionDlgApi;
loadModels(that);
setTimeout(() => {
that.models.forEach(model => {
api.Model.setVisible(model.modelId, true);
api.Model.original(model.modelId);
that.$refs.tree.setChecked(model.modelId, true, true)
setTimeout(() => {
cb && cb();
}, 400)
});
}, 1000)
}
// 加载部分模型(计划中绑定的模型)
function partLoadModel(that) {
let featureIds = getSelectFeatureIds(that);
let api = bimSelectionDlgApi;
addAllModels(that, () => {
if (featureIds.length > 0) {
let tmps=featureIds.map(it=>it);
let tmpsIds2 = tmps.splice(0, 1000);
api.Feature.showFeatures(tmpsIds2.join("#"));
setFeatueVisible(tmps, true);
initBim(that)
api.Feature.setColor(featureIds.join("#"), "rgba(255,0,255,1)");
that.$message.info("模型加载完成");
that.bimLoaded = true;
that.doMenu(2);
} else {
that.$refs.tree.setChecked("root", true, true);
initBim(that);
let func = () => {
if (that.loadedModelCount == that.models.length) {
setTimeout(() => {
setFeatueShowOrHide(that, []);
}, 1000);
} else {
setTimeout(func, 100);
}
};
func();
}
})
}
// 加载部分模型(计划中绑定的模型)
function partLoadModelxxx(that) {
let featureInfos = getSelectFeatureIds(that);
let api = bimSelectionDlgApi;
let obj = {};
@ -536,7 +582,7 @@ async function selectTreeData(that) {
if (!obj[modelId]) {
obj[modelId] = [];
}
if(d.glid){
if (d.glid) {
obj[modelId].push(d.glid);
}
}

View File

@ -6,7 +6,6 @@ import {
getModelFeatureInfos,
modelTreeAllLeafChildByGlids,
} from "@/api/bim/bimModel";
import { MergeArray, DelArray } from "@/utils/index";
import { ElMessage } from "element-plus";
function selectFeature(that, featureId) {
let api = bimSelectionDlgApi;
@ -38,11 +37,6 @@ function getHideFeatures(that) {
return result;
}
function hideFeature(that, featureId) {
let api = bimSelectionDlgApi;
api.Feature.setVisible(featureId, false);
}
function selectSingle(that) {
let api = bimSelectionDlgApi;
api.Public.clearHandler();
@ -153,82 +147,6 @@ function initBim(that) {
});
}
function getSelectFeatureIds(that) {
let tmps = that.allBimData.filter((it) => it.id == that.plan.id);
if (tmps.length > 0) {
return tmps[0].bim || [];
}
return [];
}
// 加载部分模型(计划中绑定的模型)
function partLoadModel(that) {
let featureInfos = getSelectFeatureIds(that);
let api = bimSelectionDlgApi;
let obj = {};
for (let i = 0; i < featureInfos.length; i++) {
let it = featureInfos[i].featureId;
let tmps = it.split("^");
let modelId = tmps[0];
if (!obj[modelId]) {
obj[modelId] = [];
}
obj[modelId].push(it);
}
for (let modelId in obj) {
let tmps = that.models.filter((it) => it.modelId == modelId);
setTimeout(() => {
that.$refs.tree.setChecked(modelId, true, true);
}, 3000);
if (tmps.length > 0) {
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
that.partLoad = true;
api.Model.addPart(
url,
modelId,
obj[modelId].join("#"),
(res) => { },
(res) => {
setTimeout(() => {
if (that.viewPoint) {
api.Camera.setViewPort(that.viewPoint);
} else {
api.Camera.getViewPort((p) => {
that.viewPoint = p;
});
}
}, 1000);
that.$message.info("模型加载完成");
that.bimLoaded = true;
that.doMenu(2);
initBim(that);
},
{
FlyTo: true,
}
);
}
}
if (featureInfos.length == 0) {
setTimeout(() => {
that.$refs.tree.setChecked("root", true, true);
}, 3000);
loadModels(that);
initBim(that);
let func = () => {
if (that.loadedModelCount == that.models.length) {
setTimeout(() => {
setFeatueShowOrHide(that, []);
}, 1000);
} else {
setTimeout(func, 100);
}
};
func();
}
}
//构建树形数据
function buildTreeData(that) {
that.allFeatures = [];
@ -477,7 +395,7 @@ function loadNode(that, node, resolve) {
resolve(nd);
setTimeout(() => {
document
.querySelectorAll(".bim-selection-dialog .model-tree .el-tree-node")[0]
.querySelectorAll(".bim-selection-dialog3 .model-tree .el-tree-node")[0]
.click();
}, 1000);
} else if (node.level == 1) {
@ -650,7 +568,7 @@ function showPlanFeatchure(that) {
//未绑定BIM模型 显示所有可以绑定的构件
initBim(that)
setFeatueVisible(that.readlyParts,false)
setFeatueVisible(that.readlyParts, false)
}
});
}

View File

@ -5,7 +5,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="title"
modal-class="bim-selection-dialog"
modal-class="bim-selection-dialog3"
>
<div id="bimSelectionDlg">
<div id="bimSelectionDlgContainer" class="bimSelectionDlgContainer"></div>
@ -534,7 +534,7 @@ export default {
};
</script>
<style lang="scss">
.bim-selection-dialog {
.bim-selection-dialog3 {
.el-dialog {
min-width: 960px;
width: 80%;