作业统计更改及添加大屏中作业所在区域的监控设备

This commit is contained in:
shijing 2023-06-20 15:21:07 +08:00
parent 1d55dc3c19
commit c2435fed9e
5 changed files with 49 additions and 77 deletions

View File

@ -462,12 +462,24 @@
</div> </div>
<div class="alarm-detail-info left_arrow" v-if="workDetail" style="width: 50%;top: 220px;"> <div class="alarm-detail-info left_arrow" v-if="workDetail" style="width: 50%;top: 220px;">
<div class="simple-title"> <div class="simple-title">
<div><span>作业</span></div> <div>作业</div>
<!-- @click="areaItemHandle(1)" -->
<span class="icon-close" @click="workDetailClose"></span> <span class="icon-close" @click="workDetailClose"></span>
</div> </div>
<div class="detail-content"> <div class="detail-content">
<div class="content-body"> <div class="content-body">
<div style="color:#ffffff;font-size: 14px;">
<p>作业区域{{ areaName }}</p>
<div v-if="areaVideo.length>0">区域下监控
<el-tag
v-for="item in areaVideo"
:key="item.id"
@click="showVchannel(item)"
style="margin-right: 10px;margin-left:0"
>{{ item.name }}
</el-tag>
</div>
<div v-else>区域下监控该作业所在区域没有监控设备</div>
</div>
<el-table class="bigScreenTable" v-if="areaShowType==1" :data="areaOperation" :height="300" @row-click="areaOperationRowClick"> <el-table class="bigScreenTable" v-if="areaShowType==1" :data="areaOperation" :height="300" @row-click="areaOperationRowClick">
<el-table-column label="作业简介" prop="name"></el-table-column> <el-table-column label="作业简介" prop="name"></el-table-column>
<el-table-column label="开始时间" prop="start_time"></el-table-column> <el-table-column label="开始时间" prop="start_time"></el-table-column>
@ -477,7 +489,7 @@
<span v-if="scope.row.dept_ter_">{{scope.row.dept_ter_.name}}</span> <span v-if="scope.row.dept_ter_">{{scope.row.dept_ter_.name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="监控设备"> <el-table-column label="已选监控">
<template #default="scope"> <template #default="scope">
<el-tag <el-tag
v-for="item in scope.row.vchannels_" v-for="item in scope.row.vchannels_"
@ -536,16 +548,6 @@
<span class="job-item-name">业务部门</span> <span class="job-item-name">业务部门</span>
<span class="job-item-info">{{screenJobItem.dept_bus_.name}}</span> <span class="job-item-info">{{screenJobItem.dept_bus_.name}}</span>
</div> </div>
<!-- <div class="job-item">
<span class="job-item-name">监控设备</span>
<el-tag
v-for="item in screenJobItem.vchannels_"
:key="item.id"
@click="showVchannel(item)"
style="margin-right: 10px;margin-left:0"
>{{ item.name }}
</el-tag>
</div> -->
</div> </div>
<div class="simple-title"> <div class="simple-title">
<div>作业票</div> <div>作业票</div>
@ -1051,7 +1053,13 @@ export default {
let workId = item.properties.get("workId"); let workId = item.properties.get("workId");
if(workId){ if(workId){
that.areaDetailId = item.properties.get("area"); that.areaDetailId = item.properties.get("area");
let areaItem = that.areaList.filter(item=>{
return item.id==that.areaDetailId;
});
debugger;
that.areaName = areaItem[0].name;
that.getAreaOperation(); that.getAreaOperation();
that.getAreaVchannel();
that.workDetail = true; that.workDetail = true;
}else{ }else{
that.screenRisk = false; that.screenRisk = false;
@ -1409,12 +1417,11 @@ export default {
if(that.singleAreaMaskerLayer){ if(that.singleAreaMaskerLayer){
that.singleAreaMaskerLayer.show = false; that.singleAreaMaskerLayer.show = false;
} }
}, },
// //
getAreaOperation(){ getAreaOperation(){
let that = this; let that = this;
this.$API.opm.operation.list.req({area:that.areaDetailId, state: 40}).then(res=>{ this.$API.opm.operation.list.req({area:that.areaDetailId, state__in: '30,40'}).then(res=>{
console.log(res) console.log(res)
that.areaOperation = res.results; that.areaOperation = res.results;
}) })
@ -1481,7 +1488,6 @@ export default {
closeScreenOperation(){ closeScreenOperation(){
this.screenOperation = false; this.screenOperation = false;
this.screenJobItem = null; this.screenJobItem = null;
}, },
// //
getGroup() { getGroup() {
@ -1570,7 +1576,6 @@ export default {
this.countIndex = index; this.countIndex = index;
this.getManCount(); this.getManCount();
}, },
getAreaList() { getAreaList() {
let that = this; let that = this;
that.$API.am.area.list.req({page:0}).then(res => { that.$API.am.area.list.req({page:0}).then(res => {
@ -1580,12 +1585,10 @@ export default {
} }
}) })
}, },
// //
getDangers() { getDangers() {
let that = this; let that = this;
that.$API.opm.operation.list.req({state:40}).then(res => { that.$API.opm.operation.list.req({state__in:'30,40'}).then(res => {
// that.$API.opm.operation.list.req({state:10}).then(res => {
if (res.err_msg) { if (res.err_msg) {
} else { } else {
@ -1619,7 +1622,6 @@ export default {
} }
}) })
}, },
// //
groupClick(data) { groupClick(data) {
console.log(data); console.log(data);
@ -1637,7 +1639,6 @@ export default {
this.screenUserItemDetail = res; this.screenUserItemDetail = res;
}) })
}, },
//layer //layer
riskMaskerLayers() { riskMaskerLayers() {
let that = this; let that = this;
@ -1648,7 +1649,6 @@ export default {
}); });
window.map.addLayer(that.riskMarkerLayer); window.map.addLayer(that.riskMarkerLayer);
that.getAreas();///$$ that.getAreas();///$$
}, },
//layer //layer
cameraMaskerLayers() {// cameraMaskerLayers() {//
@ -1671,16 +1671,6 @@ export default {
}); });
window.map.addLayer(that.domMarkerLayer); window.map.addLayer(that.domMarkerLayer);
}, },
// jobDomMarkerLayers() {
// let that = this;
// that.jobDomMarkerLayer = new jsmap.JSDomMarkerLayer({
// minimumLevel: 3,
// maxmumLevel: 22,
// show: false
// });
// window.map.addLayer(that.jobDomMarkerLayer);
// that.showJobDomMarkers();
// },
// //
areaMarkerLayers() { areaMarkerLayers() {
let that = this; let that = this;
@ -2051,7 +2041,6 @@ export default {
this.mapPause(); this.mapPause();
} }
}, },
// //
mapRun() { mapRun() {
if (this.flyManager !== null) { if (this.flyManager !== null) {
@ -2066,20 +2055,16 @@ export default {
tilt: 30 tilt: 30
}); });
} }
}, },
// //
mapPause() { mapPause() {
// this.flyManager.destroy(); // this.flyManager.destroy();
this.flyManager.pauseFly(); this.flyManager.pauseFly();
}, },
// //
filterCtrlFocusChange() { filterCtrlFocusChange() {
this.filterCtrlFocus = !this.filterCtrlFocus this.filterCtrlFocus = !this.filterCtrlFocus
}, },
//maker //maker
markerClick(index) { markerClick(index) {
let arr = []; let arr = [];
@ -2104,11 +2089,6 @@ export default {
that.markList[0] = false; that.markList[0] = false;
} }
} }
// if (that.markList[1]) {
// window.map.showBuildingMarker = true;
// } else {
// window.map.showBuildingMarker = false;
// }
if (that.markList[1]) { if (that.markList[1]) {
that.cameraMaskerLayer.show = true; that.cameraMaskerLayer.show = true;
} else { } else {
@ -2120,10 +2100,8 @@ export default {
that.materialsMaskerLayer.show = false; that.materialsMaskerLayer.show = false;
} }
if (that.markList[3]) { if (that.markList[3]) {
// that.jobDomMarkerLayer.show = true;
that.polygonMaskerLayer.show = true; that.polygonMaskerLayer.show = true;
} else { } else {
// that.jobDomMarkerLayer.show = false;
that.polygonMaskerLayer.show = false; that.polygonMaskerLayer.show = false;
} }
if (that.markList[4]) { if (that.markList[4]) {
@ -2143,7 +2121,6 @@ export default {
that.timerUser = null; that.timerUser = null;
} }
}, },
// //
getVchannels() { getVchannels() {
let that = this; let that = this;
@ -2160,7 +2137,6 @@ export default {
} }
}); });
}, },
// //
getSpeakers() { getSpeakers() {
let that = this; let that = this;
@ -2176,7 +2152,6 @@ export default {
} }
}); });
}, },
// //
warningItemShow(item) { warningItemShow(item) {
this.screenJob = false; this.screenJob = false;
@ -2188,22 +2163,18 @@ export default {
this.screenWarning = true; this.screenWarning = true;
}); });
}, },
// //
closeScreenJob() { closeScreenJob() {
this.screenJob = false; this.screenJob = false;
}, },
// //
closeScreenRisk() { closeScreenRisk() {
this.screenRisk = false; this.screenRisk = false;
}, },
// //
closeScreenWarning() { closeScreenWarning() {
this.screenWarning = false; this.screenWarning = false;
}, },
// //
handleWarning() { handleWarning() {
let that = this; let that = this;
@ -2217,7 +2188,6 @@ export default {
} }
}) })
}, },
// //
userRowClick(row) { userRowClick(row) {
let that = this; let that = this;
@ -3740,7 +3710,7 @@ export default {
max-height: calc(60vh - 120px); max-height: calc(60vh - 120px);
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
margin-top: 10px; // margin-top: 10px;
.alarm-item { .alarm-item {
display: flex; display: flex;

View File

@ -6,19 +6,22 @@
<el-date-picker <el-date-picker
v-model="form.startTime" v-model="form.startTime"
type="datetime" type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
placeholder="选择开始时间" placeholder="选择开始时间"
:default-time="defaultStartTime" :default-time="defaultStartTime"
/> />
<el-date-picker <el-date-picker
v-model="form.endTime" v-model="form.endTime"
type="datetime" type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
placeholder="选择结束时间" placeholder="选择结束时间"
:default-time="defaultEndTime" :default-time="defaultEndTime"
/> />
<el-button class="searchBtn" @click="trackSearch">查询</el-button> <el-button class="searchBtn" @click="trackSearch">查询</el-button>
<el-button class="searchBtn" @click="userLineTrackCancel">取消跟踪</el-button> <el-button class="searchBtn" @click="userLineTrackCancel">取消跟踪</el-button>
</div> </div>
<!-- <div class="header-left-bg">曲阳金隅智能安全管控系统</div> -->
<div class="header-right-action"> <div class="header-right-action">
<div class="right-action-clock"> <div class="right-action-clock">
<span class="action-time">{{ currentDay }}</span> <span class="action-time">{{ currentDay }}</span>
@ -56,7 +59,6 @@ export default {
} }
} }
}, },
mounted() { mounted() {
let that = this; let that = this;
that.item = JSON.parse(localStorage.getItem('trackItem')) that.item = JSON.parse(localStorage.getItem('trackItem'))
@ -124,7 +126,6 @@ export default {
}); });
}) })
}, },
beforeUnmount(){ beforeUnmount(){
window.map.destroy(); window.map.destroy();
window.map = null; window.map = null;
@ -145,7 +146,6 @@ export default {
background: 'rgba(0, 0, 0, 0)', background: 'rgba(0, 0, 0, 0)',
}) })
} }
// script // script
const script = document.createElement('script'); const script = document.createElement('script');
script.src = url; script.src = url;
@ -180,12 +180,12 @@ export default {
//layer //layer
userMaskerLayers() {// userMaskerLayers() {//
let that = this; let that = this;
that.userMaskerLayer = new jsmap.JSIconTextMarkerLayer({ // that.userMaskerLayer = new jsmap.JSIconTextMarkerLayer({
minimumLevel: 3, // minimumLevel: 3,
maxmumLevel: 22, // maxmumLevel: 22,
show: false // show: false
}); // });
window.map.addLayer(that.userMaskerLayer); // window.map.addLayer(that.userMaskerLayer);
let endTime = new Date().getTime(); let endTime = new Date().getTime();
let startTime = endTime-60*60 * 1000; let startTime = endTime-60*60 * 1000;
that.userLineTrack(startTime,endTime); that.userLineTrack(startTime,endTime);
@ -193,8 +193,6 @@ export default {
// //
userLineTrack(startTime,endTime){ userLineTrack(startTime,endTime){
let that = this; let that = this;
that.userMaskerLayer.show = false;
let params = { let params = {
url:"/api/datacenter/user/historypathV2", url:"/api/datacenter/user/historypathV2",
method:"post", method:"post",
@ -298,8 +296,14 @@ export default {
}) })
}, },
trackSearch(){ trackSearch(){
let startTime = new Date(this.form.startTime) let that = this;
let endTime = new Date(this.form.endTime) window.map.cancelTrack();
window.map.removeMarker(that.trackMarker);
window.map.removeAllIconTextMarker();
window.map.removeMarker(that.line1);
window.map.removeAllLineMarker();
let startTime = new Date(this.form.startTime).getTime();
let endTime = new Date(this.form.endTime).getTime();
this.userLineTrack(startTime,endTime); this.userLineTrack(startTime,endTime);
}, },
userLineTrackClear(){ userLineTrackClear(){

View File

@ -274,7 +274,7 @@ export default {
// //
getOperation() { getOperation() {
this.$API.opm.operation.list this.$API.opm.operation.list
.req({ page: 1, page_size: 1, state: 40 }) .req({ page: 1, page_size: 1, state__in: '30,40' })
.then((res) => { .then((res) => {
this.operationnumber = res.count; this.operationnumber = res.count;
}); });

View File

@ -18,7 +18,7 @@
<div class="login-form"> <div class="login-form">
<div class="login-header"> <div class="login-header">
<div class="logo" v-if="baseConfig.base_name"> <div class="logo" v-if="baseConfig.base_name">
<img :alt="baseConfig.base_name" :src="'http://49.232.14.174:2226/'+baseConfig.base_logo"> <img :alt="baseConfig.base_name_short" :src="baseConfig.base_logo">
<label>{{baseConfig.base_name}}</label> <label>{{baseConfig.base_name}}</label>
</div> </div>
</div> </div>
@ -138,8 +138,6 @@ import passwordForm from './components/passwordForm'
getDept(){ getDept(){
let that = this; let that = this;
that.$API.system.config.base.req().then((res) => { that.$API.system.config.base.req().then((res) => {
// debugger;
console.log(res)
that.baseConfig = res.base; that.baseConfig = res.base;
this.$store.commit("SET_baseName", res.base.base_name); this.$store.commit("SET_baseName", res.base.base_name);
this.$store.commit("SET_baseLogo", res.base.base_logo); this.$store.commit("SET_baseLogo", res.base.base_logo);
@ -191,7 +189,7 @@ import passwordForm from './components/passwordForm'
.login-form {width: 410px;margin: auto;padding:20px 0;} .login-form {width: 410px;margin: auto;padding:20px 0;}
.login-header {margin-bottom: 40px; width: 460px;margin-left: -30px;} .login-header {margin-bottom: 40px; width: 460px;margin-left: -30px;}
.login-header .logo {display: flex;align-items: center;} .login-header .logo {display: flex;align-items: center;}
.login-header .logo img {width: 180px;vertical-align: bottom;margin-right: 10px;} .login-header .logo img {width: 130px;vertical-align: bottom;margin-right: 10px;}
.login-header .logo label {font-size: 26px;font-weight: bold;} .login-header .logo label {font-size: 26px;font-weight: bold;}
.login-oauth {display: flex;justify-content:space-around;} .login-oauth {display: flex;justify-content:space-around;}
.login-form .el-divider {margin-top:40px;} .login-form .el-divider {margin-top:40px;}

View File

@ -311,11 +311,11 @@ export default {
handleQuery() { handleQuery() {
let obj = {}; let obj = {};
if (this.timeRange) { if (this.timeRange) {
this.query.start_create = this.timeRange[0]; this.query.create_time__gte = this.timeRange[0];
this.query.end_create = this.timeRange[1]; this.query.create_time__lte = this.timeRange[1];
} else { } else {
this.query.end_create = null; this.query.create_time__lte = null;
this.query.start_create = null; this.query.create_time__gte = null;
} }
if (this.query.cates) { if (this.query.cates) {
} else { } else {