requestUrl
This commit is contained in:
parent
13bca8732e
commit
ec11e30e41
|
@ -12,7 +12,8 @@ const DEFAULT_CONFIG = {
|
|||
CORE_VER: "1.6.3",
|
||||
|
||||
//接口地址
|
||||
API_URL: process.env.NODE_ENV === 'development' && process.env.VUE_APP_PROXY === 'false' ? "/api" : process.env.VUE_APP_API_BASEURL,
|
||||
// API_URL: process.env.NODE_ENV === 'development' && process.env.VUE_APP_PROXY === 'false' ? "/api" : process.env.VUE_APP_API_BASEURL,
|
||||
API_URL: window.IPConfig.baseURL,
|
||||
|
||||
//请求超时
|
||||
TIMEOUT: 200000,
|
||||
|
|
|
@ -100,3 +100,7 @@ a,button,input,textarea{-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing: bo
|
|||
.sc-page {width: 1230px;margin: 0 auto;}
|
||||
|
||||
.el-dialog__headerbtn { top: 0px;right: 0px;}
|
||||
|
||||
#eventImgWrap .el-image__preview,#eventImgWrap .el-image__inne{
|
||||
width: auto;
|
||||
}
|
|
@ -4,7 +4,7 @@ import sysConfig from "@/config";
|
|||
import tool from '@/utils/tool';
|
||||
import router from '@/router';
|
||||
|
||||
axios.defaults.baseURL = ''
|
||||
axios.defaults.baseURL = window.IPConfig.baseURL;
|
||||
|
||||
axios.defaults.timeout = sysConfig.TIMEOUT
|
||||
|
||||
|
|
|
@ -50,25 +50,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="drop-content" v-if="showUserSelect">
|
||||
<!--<div @click="changeDropIndex('1')" class="drop-content-item"
|
||||
:class="{'active':dropIndex==='1'}">全部
|
||||
</div>
|
||||
<div @click="changeDropIndex('2')" class="drop-content-item"
|
||||
:class="{'active':dropIndex==='2'}">正式员工
|
||||
<div></div>
|
||||
</div>
|
||||
<div @click="changeDropIndex('3')" class="drop-content-item"
|
||||
:class="{'active':dropIndex==='3'}">相关方
|
||||
</div>
|
||||
<div @click="changeDropIndex('4')" class="drop-content-item"
|
||||
:class="{'active':dropIndex==='4'}">访客
|
||||
</div>-->
|
||||
<el-tree ref="group" id="bigScreenTree" node-key="id" :data="postList" show-checkbox
|
||||
:current-node-key="''" :highlight-current="true" :expand-on-click-node="false"
|
||||
@node-click="groupClick"></el-tree>
|
||||
|
||||
<el-button type="primary" @click="userFilter">确定
|
||||
</el-button>
|
||||
<el-button type="primary" @click="userFilter">查看</el-button>
|
||||
</div>
|
||||
<div class="filter-action showroam">
|
||||
<div v-if="filterCtrlFocus" class="action-shrink" @click="filterCtrlFocusChange"></div>
|
||||
|
@ -168,7 +154,7 @@
|
|||
<div class="simple-title">
|
||||
<div><span>报警数据</span></div>
|
||||
<div class="action-group">
|
||||
<span class="detail-text-btn">查看详情</span>
|
||||
<span class="detail-text-btn" @click="allWarningView">查看所有</span>
|
||||
<span class="icon-close" @click="warningDetail = false"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -177,25 +163,26 @@
|
|||
<div class="screen-multiple-select head-select">
|
||||
<!-- <div class="multiple-select-tags" @click="warningTypeShow = true"> -->
|
||||
<div class="multiple-select-tags" @click="warningTypeChange">
|
||||
<span class="multiple-select-input">全部</span>
|
||||
<span class="multiple-select-input">{{eventTypeName}}</span>
|
||||
<el-icon color="#ffffff" class="no-inherit">
|
||||
<ArrowDownBold />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div v-show="warningTypeShow" class="multiple-select-wrap">
|
||||
<div class="multiple-select-ul">
|
||||
<div class="multiple-select-li" @click="warningTypeSelected(null)">
|
||||
<div class="multiple-select-li" @click="warningTypeSelected(null,'全部')">
|
||||
<span class="multiple-select-label">全部</span>
|
||||
</div>
|
||||
|
||||
<div v-for="typeItem in warningTypes" :key="typeItem.id"
|
||||
class="multiple-select-li" @click="warningTypeSelected(typeItem.id)">
|
||||
class="multiple-select-li" @click="warningTypeSelected(typeItem.id,typeItem.name)">
|
||||
<span title="超员报警" class="multiple-select-label">{{ typeItem.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head-sound sound-ring"></div>
|
||||
<div v-if="speakerPlayStatus" class="head-sound sound-ring" @click="speakerPasue"></div>
|
||||
<div v-else class="head-sound sound-quiet" @click="speakerPlay"></div>
|
||||
</div>
|
||||
<div class="content-body" v-if="warningData.total > 0">
|
||||
<!--warningList-->
|
||||
|
@ -271,16 +258,14 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table class="bigScreenTable" :data="areaVideo" v-if="areaShowType==2">
|
||||
<el-table-column label="设备编号"></el-table-column>
|
||||
<el-table-column label="通道名称"></el-table-column>
|
||||
<el-table-column label="类型"></el-table-column>
|
||||
<el-table-column label="是否在线"></el-table-column>
|
||||
<el-table-column label="通道名称" prop="name"></el-table-column>
|
||||
<el-table-column label="所在区域" prop="area_name"></el-table-column>
|
||||
<el-table-column label="code" prop="code"></el-table-column>
|
||||
</el-table>
|
||||
<el-table class="bigScreenTable" :data="areaSpeaker" v-if="areaShowType==3">
|
||||
<el-table-column label="喇叭名称"></el-table-column>
|
||||
<el-table-column label="喇叭音量"></el-table-column>
|
||||
<el-table-column label="ip"></el-table-column>
|
||||
<el-table-column label="在线状态"></el-table-column>
|
||||
<el-table-column label="喇叭名称" prop="name"></el-table-column>
|
||||
<el-table-column label="所在区域" prop="area_name"></el-table-column>
|
||||
<el-table-column label="唯一标识" prop="code"></el-table-column>
|
||||
</el-table>
|
||||
<el-table class="bigScreenTable" :data="areaUser" v-if="areaShowType==4">
|
||||
<el-table-column label="人员姓名"></el-table-column>
|
||||
|
@ -719,9 +704,10 @@
|
|||
<span class="risk-item-name">触发时间:</span>
|
||||
<span class="risk-item-info">{{ screenWarningItem.create_time }}</span>
|
||||
</div>
|
||||
<div class="risk-item">
|
||||
<div class="risk-item" v-if="screenWarningItem.global_img!=null">
|
||||
<span class="risk-item-name">事件截图:</span>
|
||||
<img :src="screenWarningItem.global_img" style="width: 250px;">
|
||||
<img v-if="screenWarningItem.face_img!=null" :src="screenWarningItem.face_img" style="width: 250px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -781,6 +767,7 @@ export default {
|
|||
screenJob: false,
|
||||
screenUser: false,
|
||||
screenRisk: false,
|
||||
speakerPlayStatus:false,
|
||||
screenWarning: false,
|
||||
screenUserDetail: false,
|
||||
warningTypeShow: false,
|
||||
|
@ -810,7 +797,12 @@ export default {
|
|||
speakerList: [],//喇叭列表
|
||||
userList: [],//人员列表
|
||||
deptList: [],//部门列表
|
||||
postList: [],//岗位列表
|
||||
postList: [
|
||||
{id:0,name:'全部',label:'全部'},
|
||||
{id:1,name:'正式员工',label:'正式员工'},
|
||||
{id:2,name:'相关方',label:'相关方'},
|
||||
{id:3,name:'访客',label:'访客'},
|
||||
{id:4,name:'司机',label:'司机'}],//岗位列表
|
||||
dangerList: [],//岗位列表
|
||||
areaList: [],//区域列表/风险区域列表
|
||||
areaOperation:[],
|
||||
|
@ -871,6 +863,7 @@ export default {
|
|||
30:'较大风险',
|
||||
40:'重大风险'
|
||||
},
|
||||
eventTypeName:'全部',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -956,7 +949,6 @@ export default {
|
|||
if (type === 'Symbol(boxmarker)') {
|
||||
let areaId = item.properties.get("areaId");
|
||||
console.log(areaId);
|
||||
debugger;
|
||||
that.$API.am.area.item.req(areaId).then(res=>{
|
||||
debugger;
|
||||
console.log(res);
|
||||
|
@ -1060,7 +1052,7 @@ export default {
|
|||
this.getGroup();//部门$$
|
||||
//右上展示数据
|
||||
this.getDangers();//危险作业$$
|
||||
this.getAllPost();//岗位
|
||||
// this.getAllPost();//岗位
|
||||
this.getWarningTotal();//事件统计
|
||||
this.getWarningType();//事件类型
|
||||
let pageHeight = document.getElementsByClassName('screen-cockpit')[0].clientHeight;
|
||||
|
@ -1072,7 +1064,9 @@ export default {
|
|||
this.areaTableHeight = areaTableHeight;
|
||||
document.getElementsByClassName('cockpit-info')[0].style.height = domHeight + 'px';
|
||||
// document.getElementsByClassName('area-info-body')[0].style.height = simpleBodyHeight + 'px';
|
||||
setInterval(function () { }, 3000)
|
||||
setInterval(function () {
|
||||
|
||||
}, 300000)
|
||||
},
|
||||
methods: {
|
||||
showTime() {
|
||||
|
@ -1123,8 +1117,10 @@ export default {
|
|||
that.areaDetail = true;
|
||||
that.areaDetailId = data.id;
|
||||
this.getAreaOperation();
|
||||
// let points = data.third_info.xx_rail.detail.polygon.points[0];
|
||||
window.map.flyToPosition(new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0), { duration: 1000 });
|
||||
debugger;
|
||||
console.log(data);
|
||||
let points = data.third_info.xx_rail.detail.polygon.points[0];
|
||||
window.map.flyToPosition(new jsmap.JSPoint(points.x, points.y, points.z), { duration: 1000 });
|
||||
|
||||
},
|
||||
//区域下的作业
|
||||
|
@ -1154,41 +1150,81 @@ export default {
|
|||
//区域下的人员
|
||||
getAreaBlt(){
|
||||
let that = this;
|
||||
that.$API.third.tdevice.list.req({area:that.areaDetailId,type:30,page:0}).then(res=>{
|
||||
that.$API.third.blt.all.req({area:that.areaDetailId}).then(res=>{
|
||||
console.log(res)
|
||||
that.areaUser = res;
|
||||
})
|
||||
},
|
||||
//岗位
|
||||
getAllPost() {
|
||||
this.$API.system.post.list.req({ page: 0 }).then(res => {
|
||||
let arr = [];
|
||||
let children = genTree(res);
|
||||
for (let i = 0; i < 4; i++) {
|
||||
|
||||
//加载部门数据
|
||||
getGroup() {
|
||||
let that = this;
|
||||
that.$API.system.dept.list.req({ page: 0 }).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
let rpartsList=[];
|
||||
let children = genTree(res);
|
||||
for (let i = 0; i < 5; i++) {
|
||||
let obj = new Object();
|
||||
if (i === 0) {
|
||||
obj.id = '';
|
||||
obj.id = 0;
|
||||
obj.name = '全部';
|
||||
obj.label = '全部';
|
||||
} else if (i === 1) {
|
||||
obj.id = '';
|
||||
obj.id = 1;
|
||||
obj.name = '正式员工';
|
||||
obj.label = '正式员工';
|
||||
obj.children = children;
|
||||
} else if (i === 2) {
|
||||
obj.id = '';
|
||||
obj.id = 2;
|
||||
obj.name = '相关方';
|
||||
obj.label = '相关方';
|
||||
obj.children = rpartsList;
|
||||
} else if (i === 3) {
|
||||
obj.id = '';
|
||||
obj.id = 3;
|
||||
obj.name = '访客';
|
||||
obj.label = '访客';
|
||||
}else if (i === 4) {
|
||||
obj.id = 4;
|
||||
obj.name = '司机';
|
||||
obj.label = '司机';
|
||||
}
|
||||
arr.push(obj)
|
||||
}
|
||||
this.postList = arr;
|
||||
})
|
||||
that.postList = arr;
|
||||
}
|
||||
});
|
||||
},
|
||||
//岗位
|
||||
// getAllPost() {
|
||||
// this.$API.system.post.list.req({ page: 0 }).then(res => {
|
||||
// let arr = [];
|
||||
// let children = genTree(res);
|
||||
// for (let i = 0; i < 4; i++) {
|
||||
// let obj = new Object();
|
||||
// if (i === 0) {
|
||||
// obj.id = '';
|
||||
// obj.name = '全部';
|
||||
// obj.label = '全部';
|
||||
// } else if (i === 1) {
|
||||
// obj.id = '';
|
||||
// obj.name = '正式员工';
|
||||
// obj.label = '正式员工';
|
||||
// obj.children = children;
|
||||
// } else if (i === 2) {
|
||||
// obj.id = '';
|
||||
// obj.name = '相关方';
|
||||
// obj.label = '相关方';
|
||||
// } else if (i === 3) {
|
||||
// obj.id = '';
|
||||
// obj.name = '访客';
|
||||
// obj.label = '访客';
|
||||
// }
|
||||
// arr.push(obj)
|
||||
// }
|
||||
// this.postList = arr;
|
||||
// })
|
||||
// },
|
||||
//人员统计
|
||||
getManCount() {
|
||||
let that = this;
|
||||
|
@ -1279,7 +1315,7 @@ export default {
|
|||
})
|
||||
},
|
||||
//警报类型查询
|
||||
warningTypeSelected(id) {
|
||||
warningTypeSelected(id,name) {
|
||||
debugger;
|
||||
let that = this;
|
||||
this.warningTypeShow = false;
|
||||
|
@ -1288,8 +1324,7 @@ export default {
|
|||
if (id !== null) {
|
||||
params.cates = id;
|
||||
}
|
||||
debugger;
|
||||
console.log(params);
|
||||
this.eventTypeName = name;
|
||||
that.$API.ecm.event.list.req(params).then(res => {
|
||||
if (res.err_msg) { } else {
|
||||
that.warningData.list = res.results;
|
||||
|
@ -1298,16 +1333,7 @@ export default {
|
|||
})
|
||||
//获取新数据
|
||||
},
|
||||
//加载部门数据
|
||||
getGroup() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.group = genTree(res);
|
||||
// console.log(this.group);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//选择部门
|
||||
groupClick(data) {
|
||||
// console.log(data);
|
||||
|
@ -1566,11 +1592,9 @@ export default {
|
|||
}else {
|
||||
userImage = "/img/visitor.png"
|
||||
}
|
||||
debugger;
|
||||
console.log(item)
|
||||
that.userMarker[item.mac] = new jsmap.JSIconTextMarker({
|
||||
id: item.my_info.code,
|
||||
position: { x:1694, y: 257399, z: item.z }, //坐标
|
||||
position: { x:item.longitude, y: item.latitude, z: item.z }, //坐标
|
||||
floorId: 1, //楼层id,默认为1(地面)
|
||||
image: userImage,
|
||||
text: employee_.name,
|
||||
|
@ -1591,10 +1615,8 @@ export default {
|
|||
employee: employee_
|
||||
},
|
||||
});
|
||||
debugger;
|
||||
console.log(that.userMarker)
|
||||
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
|
||||
// window.map.flyToPosition(new jsmap.JSPoint(item.x, item.latitude, 0), { duration: 1000 });
|
||||
// window.map.flyToPosition(new jsmap.JSPoint(114.63016059048613, 38.813788495383136, 0), { duration: 1000 });
|
||||
})
|
||||
|
||||
// setInterval(function () {
|
||||
|
@ -1606,12 +1628,13 @@ export default {
|
|||
// });//动画效果,持续时间一秒
|
||||
// }, 11000)
|
||||
}
|
||||
/*setInterval(function () {
|
||||
setInterval(function () {
|
||||
that.refreshUserMarker();
|
||||
}, 8500)*/
|
||||
}, 30000)
|
||||
},
|
||||
//更新人员标记
|
||||
refreshUserMarker() {
|
||||
debugger;
|
||||
let that = this;
|
||||
that.$API.third.blt.all.req().then(res => {
|
||||
if (res.err_msg) {
|
||||
|
@ -1625,11 +1648,13 @@ export default {
|
|||
that.userList = refreshList.concat(addUser);//更新userList
|
||||
that.showUserMarkers(addUser);//增加新进在线员工
|
||||
//that.userMaskerLayer.removeMarker(sectorMarker)(addUser);//删除离线员工
|
||||
refreshList.forEach(item => {
|
||||
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item.id], {
|
||||
refreshList.forEach(item1 => {
|
||||
debugger;
|
||||
console.log(item1)
|
||||
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item1.id], {
|
||||
floorId: 1,
|
||||
position: { x: item.longitude, y: item.latitude, z: item.z },
|
||||
animate: { duration: 1000, }
|
||||
position: { x: item1.longitude, y: item1.latitude, z: item1.z },
|
||||
animate: { duration: 10000, }
|
||||
});//动画效果,持续时间一秒
|
||||
})
|
||||
}
|
||||
|
@ -1935,6 +1960,15 @@ export default {
|
|||
that.showUserSelect = false;
|
||||
}, 300)
|
||||
},
|
||||
allWarningView(){
|
||||
this.$router.push('/ecm/event')
|
||||
},
|
||||
speakerPasue(){
|
||||
this.speakerPlayStatus = false;
|
||||
},
|
||||
speakerPlay(){
|
||||
this.speakerPlayStatus = true;
|
||||
},
|
||||
},
|
||||
unmounted() {
|
||||
window.map.destroy();
|
||||
|
@ -3246,6 +3280,10 @@ export default {
|
|||
background: url(/public/img/b_ring.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.sound-quiet {
|
||||
background: url(/public/img/b_quiet.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -48,64 +48,27 @@
|
|||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form-item label="抓拍图片:">
|
||||
<div style="display: flex" v-if="form.global_img!=null">
|
||||
<img :src="form.global_img" style="margin-right: 8px;height: 146px;flex: 1;">
|
||||
<img :src="form.face_img" style="margin-right: 8px;height: 146px;">
|
||||
<div style="display: flex" v-if="form.global_img!=null" id="eventImgWrap">
|
||||
<el-image
|
||||
style="margin-right: 8px;height: 146px;flex: 1;"
|
||||
:src="form.global_img"
|
||||
:preview-src-list="[form.global_img]"
|
||||
:initial-index="1"
|
||||
fit="cover"
|
||||
/>
|
||||
<el-image
|
||||
style="margin-right: 8px;height: 146px;"
|
||||
:src="form.face_img"
|
||||
:preview-src-list="[form.face_img]"
|
||||
:initial-index="1"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>无抓拍</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <el-descriptions title="事件信息" :border="true" :column="24">
|
||||
<el-descriptions-item label="事件种类" :span="8"
|
||||
><el-tag
|
||||
v-for="item in form.cates_"
|
||||
:key="item.id"
|
||||
type="warning"
|
||||
>{{ item.name }}</el-tag
|
||||
></el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="事件标记" :span="8"
|
||||
>{{ mark_options2[form.mark] }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发生时间" :span="8">{{
|
||||
form.create_time
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="发生区域" :span="8" v-if="form.area_">{{
|
||||
form.area_.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="事件对象" span=8>
|
||||
<span v-if="form.obj_cate==='opl'">作业</span>
|
||||
<span v-else-if="form.obj_cate==='people'">人员</span>
|
||||
<span v-else>其他</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="触发人" v-if="form.obj_cate==='people'" span=8>
|
||||
<span v-if="form.employee">{{ form.employee_.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="触发作业" v-else-if="form.obj_cate==='opl'" span=8>
|
||||
<span v-if="form.employee">{{ form.operation_name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抓拍设备" v-if="form.vchannel" span=8>
|
||||
{{ form.vchannel_.code }}-{{ form.vchannel_.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="图片" span=16 >
|
||||
<div style="display: flex">
|
||||
<sc-upload
|
||||
v-model="form.global_img"
|
||||
title="全景照"
|
||||
:disabled="true"
|
||||
style="margin-right: 8px; width: auto;flex: 1;"
|
||||
></sc-upload>
|
||||
<sc-upload
|
||||
v-model="form.face_img"
|
||||
title="人脸照"
|
||||
:disabled="true"
|
||||
style="width: auto"
|
||||
></sc-upload>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions> -->
|
||||
</el-card>
|
||||
|
||||
<el-card v-if="form.handle_user" style="margin-top: 8px">
|
||||
|
@ -133,6 +96,7 @@
|
|||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:disabled="mode==='edit'"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -141,6 +105,7 @@
|
|||
v-model="form.handle_desc"
|
||||
clearable
|
||||
type="textarea"
|
||||
:disabled="mode==='edit'"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="mode==='edit'">
|
||||
|
|
Loading…
Reference in New Issue