requestUrl

This commit is contained in:
shijing 2022-09-15 16:50:41 +08:00
parent 13bca8732e
commit ec11e30e41
5 changed files with 135 additions and 127 deletions

View File

@ -12,7 +12,8 @@ const DEFAULT_CONFIG = {
CORE_VER: "1.6.3", 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, TIMEOUT: 200000,

View File

@ -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;} .sc-page {width: 1230px;margin: 0 auto;}
.el-dialog__headerbtn { top: 0px;right: 0px;} .el-dialog__headerbtn { top: 0px;right: 0px;}
#eventImgWrap .el-image__preview,#eventImgWrap .el-image__inne{
width: auto;
}

View File

@ -4,7 +4,7 @@ import sysConfig from "@/config";
import tool from '@/utils/tool'; import tool from '@/utils/tool';
import router from '@/router'; import router from '@/router';
axios.defaults.baseURL = '' axios.defaults.baseURL = window.IPConfig.baseURL;
axios.defaults.timeout = sysConfig.TIMEOUT axios.defaults.timeout = sysConfig.TIMEOUT

View File

@ -50,25 +50,11 @@
</div> </div>
</div> </div>
<div class="drop-content" v-if="showUserSelect"> <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 <el-tree ref="group" id="bigScreenTree" node-key="id" :data="postList" show-checkbox
:current-node-key="''" :highlight-current="true" :expand-on-click-node="false" :current-node-key="''" :highlight-current="true" :expand-on-click-node="false"
@node-click="groupClick"></el-tree> @node-click="groupClick"></el-tree>
<el-button type="primary" @click="userFilter">确定 <el-button type="primary" @click="userFilter">查看</el-button>
</el-button>
</div> </div>
<div class="filter-action showroam"> <div class="filter-action showroam">
<div v-if="filterCtrlFocus" class="action-shrink" @click="filterCtrlFocusChange"></div> <div v-if="filterCtrlFocus" class="action-shrink" @click="filterCtrlFocusChange"></div>
@ -168,7 +154,7 @@
<div class="simple-title"> <div class="simple-title">
<div><span>报警数据</span></div> <div><span>报警数据</span></div>
<div class="action-group"> <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> <span class="icon-close" @click="warningDetail = false"></span>
</div> </div>
</div> </div>
@ -177,25 +163,26 @@
<div class="screen-multiple-select head-select"> <div class="screen-multiple-select head-select">
<!-- <div class="multiple-select-tags" @click="warningTypeShow = true"> --> <!-- <div class="multiple-select-tags" @click="warningTypeShow = true"> -->
<div class="multiple-select-tags" @click="warningTypeChange"> <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"> <el-icon color="#ffffff" class="no-inherit">
<ArrowDownBold /> <ArrowDownBold />
</el-icon> </el-icon>
</div> </div>
<div v-show="warningTypeShow" class="multiple-select-wrap"> <div v-show="warningTypeShow" class="multiple-select-wrap">
<div class="multiple-select-ul"> <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> <span class="multiple-select-label">全部</span>
</div> </div>
<div v-for="typeItem in warningTypes" :key="typeItem.id" <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> <span title="超员报警" class="multiple-select-label">{{ typeItem.name }}</span>
</div> </div>
</div> </div>
</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>
<div class="content-body" v-if="warningData.total > 0"> <div class="content-body" v-if="warningData.total > 0">
<!--warningList--> <!--warningList-->
@ -271,16 +258,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table class="bigScreenTable" :data="areaVideo" v-if="areaShowType==2"> <el-table class="bigScreenTable" :data="areaVideo" v-if="areaShowType==2">
<el-table-column label="设备编号"></el-table-column> <el-table-column label="通道名称" prop="name"></el-table-column>
<el-table-column label="通道名称"></el-table-column> <el-table-column label="所在区域" prop="area_name"></el-table-column>
<el-table-column label="类型"></el-table-column> <el-table-column label="code" prop="code"></el-table-column>
<el-table-column label="是否在线"></el-table-column>
</el-table> </el-table>
<el-table class="bigScreenTable" :data="areaSpeaker" v-if="areaShowType==3"> <el-table class="bigScreenTable" :data="areaSpeaker" v-if="areaShowType==3">
<el-table-column label="喇叭名称"></el-table-column> <el-table-column label="喇叭名称" prop="name"></el-table-column>
<el-table-column label="喇叭音量"></el-table-column> <el-table-column label="所在区域" prop="area_name"></el-table-column>
<el-table-column label="ip"></el-table-column> <el-table-column label="唯一标识" prop="code"></el-table-column>
<el-table-column label="在线状态"></el-table-column>
</el-table> </el-table>
<el-table class="bigScreenTable" :data="areaUser" v-if="areaShowType==4"> <el-table class="bigScreenTable" :data="areaUser" v-if="areaShowType==4">
<el-table-column label="人员姓名"></el-table-column> <el-table-column label="人员姓名"></el-table-column>
@ -719,9 +704,10 @@
<span class="risk-item-name">触发时间</span> <span class="risk-item-name">触发时间</span>
<span class="risk-item-info">{{ screenWarningItem.create_time }}</span> <span class="risk-item-info">{{ screenWarningItem.create_time }}</span>
</div> </div>
<div class="risk-item"> <div class="risk-item" v-if="screenWarningItem.global_img!=null">
<span class="risk-item-name">事件截图</span> <span class="risk-item-name">事件截图</span>
<img :src="screenWarningItem.global_img" style="width: 250px;"> <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> </div>
</div> </div>
@ -781,6 +767,7 @@ export default {
screenJob: false, screenJob: false,
screenUser: false, screenUser: false,
screenRisk: false, screenRisk: false,
speakerPlayStatus:false,
screenWarning: false, screenWarning: false,
screenUserDetail: false, screenUserDetail: false,
warningTypeShow: false, warningTypeShow: false,
@ -810,7 +797,12 @@ export default {
speakerList: [],// speakerList: [],//
userList: [],// userList: [],//
deptList: [],// deptList: [],//
postList: [],// postList: [
{id:0,name:'全部',label:'全部'},
{id:1,name:'正式员工',label:'正式员工'},
{id:2,name:'相关方',label:'相关方'},
{id:3,name:'访客',label:'访客'},
{id:4,name:'司机',label:'司机'}],//
dangerList: [],// dangerList: [],//
areaList: [],/// areaList: [],///
areaOperation:[], areaOperation:[],
@ -871,6 +863,7 @@ export default {
30:'较大风险', 30:'较大风险',
40:'重大风险' 40:'重大风险'
}, },
eventTypeName:'全部',
} }
}, },
created() { created() {
@ -956,7 +949,6 @@ export default {
if (type === 'Symbol(boxmarker)') { if (type === 'Symbol(boxmarker)') {
let areaId = item.properties.get("areaId"); let areaId = item.properties.get("areaId");
console.log(areaId); console.log(areaId);
debugger;
that.$API.am.area.item.req(areaId).then(res=>{ that.$API.am.area.item.req(areaId).then(res=>{
debugger; debugger;
console.log(res); console.log(res);
@ -1060,7 +1052,7 @@ export default {
this.getGroup();//$$ this.getGroup();//$$
// //
this.getDangers();//$$ this.getDangers();//$$
this.getAllPost();// // this.getAllPost();//
this.getWarningTotal();// this.getWarningTotal();//
this.getWarningType();// this.getWarningType();//
let pageHeight = document.getElementsByClassName('screen-cockpit')[0].clientHeight; let pageHeight = document.getElementsByClassName('screen-cockpit')[0].clientHeight;
@ -1072,7 +1064,9 @@ export default {
this.areaTableHeight = areaTableHeight; this.areaTableHeight = areaTableHeight;
document.getElementsByClassName('cockpit-info')[0].style.height = domHeight + 'px'; document.getElementsByClassName('cockpit-info')[0].style.height = domHeight + 'px';
// document.getElementsByClassName('area-info-body')[0].style.height = simpleBodyHeight + 'px'; // document.getElementsByClassName('area-info-body')[0].style.height = simpleBodyHeight + 'px';
setInterval(function () { }, 3000) setInterval(function () {
}, 300000)
}, },
methods: { methods: {
showTime() { showTime() {
@ -1123,8 +1117,10 @@ export default {
that.areaDetail = true; that.areaDetail = true;
that.areaDetailId = data.id; that.areaDetailId = data.id;
this.getAreaOperation(); this.getAreaOperation();
// let points = data.third_info.xx_rail.detail.polygon.points[0]; debugger;
window.map.flyToPosition(new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0), { duration: 1000 }); 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(){ getAreaBlt(){
let that = this; 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) console.log(res)
that.areaUser = res; that.areaUser = res;
}) })
}, },
//
getAllPost() { //
this.$API.system.post.list.req({ page: 0 }).then(res => { getGroup() {
let arr = []; let that = this;
let children = genTree(res); that.$API.system.dept.list.req({ page: 0 }).then(res => {
for (let i = 0; i < 4; i++) { if (res.err_msg) {
} else {
let rpartsList=[];
let children = genTree(res);
for (let i = 0; i < 5; i++) {
let obj = new Object(); let obj = new Object();
if (i === 0) { if (i === 0) {
obj.id = ''; obj.id = 0;
obj.name = '全部'; obj.name = '全部';
obj.label = '全部'; obj.label = '全部';
} else if (i === 1) { } else if (i === 1) {
obj.id = ''; obj.id = 1;
obj.name = '正式员工'; obj.name = '正式员工';
obj.label = '正式员工'; obj.label = '正式员工';
obj.children = children; obj.children = children;
} else if (i === 2) { } else if (i === 2) {
obj.id = ''; obj.id = 2;
obj.name = '相关方'; obj.name = '相关方';
obj.label = '相关方'; obj.label = '相关方';
obj.children = rpartsList;
} else if (i === 3) { } else if (i === 3) {
obj.id = ''; obj.id = 3;
obj.name = '访客'; obj.name = '访客';
obj.label = '访客'; obj.label = '访客';
}else if (i === 4) {
obj.id = 4;
obj.name = '司机';
obj.label = '司机';
} }
arr.push(obj) 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() { getManCount() {
let that = this; let that = this;
@ -1279,7 +1315,7 @@ export default {
}) })
}, },
// //
warningTypeSelected(id) { warningTypeSelected(id,name) {
debugger; debugger;
let that = this; let that = this;
this.warningTypeShow = false; this.warningTypeShow = false;
@ -1288,8 +1324,7 @@ export default {
if (id !== null) { if (id !== null) {
params.cates = id; params.cates = id;
} }
debugger; this.eventTypeName = name;
console.log(params);
that.$API.ecm.event.list.req(params).then(res => { that.$API.ecm.event.list.req(params).then(res => {
if (res.err_msg) { } else { if (res.err_msg) { } else {
that.warningData.list = res.results; 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) { groupClick(data) {
// console.log(data); // console.log(data);
@ -1566,11 +1592,9 @@ export default {
}else { }else {
userImage = "/img/visitor.png" userImage = "/img/visitor.png"
} }
debugger;
console.log(item)
that.userMarker[item.mac] = new jsmap.JSIconTextMarker({ that.userMarker[item.mac] = new jsmap.JSIconTextMarker({
id: item.my_info.code, 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 floorId: 1, //id,1
image: userImage, image: userImage,
text: employee_.name, text: employee_.name,
@ -1591,10 +1615,8 @@ export default {
employee: employee_ employee: employee_
}, },
}); });
debugger;
console.log(that.userMarker)
that.userMaskerLayer.addMarker(that.userMarker[item.mac]); 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 () { // setInterval(function () {
@ -1606,12 +1628,13 @@ export default {
// });//, // });//,
// }, 11000) // }, 11000)
} }
/*setInterval(function () { setInterval(function () {
that.refreshUserMarker(); that.refreshUserMarker();
}, 8500)*/ }, 30000)
}, },
// //
refreshUserMarker() { refreshUserMarker() {
debugger;
let that = this; let that = this;
that.$API.third.blt.all.req().then(res => { that.$API.third.blt.all.req().then(res => {
if (res.err_msg) { if (res.err_msg) {
@ -1625,11 +1648,13 @@ export default {
that.userList = refreshList.concat(addUser);//userList that.userList = refreshList.concat(addUser);//userList
that.showUserMarkers(addUser);//线 that.showUserMarkers(addUser);//线
//that.userMaskerLayer.removeMarker(sectorMarker)(addUser);//线 //that.userMaskerLayer.removeMarker(sectorMarker)(addUser);//线
refreshList.forEach(item => { refreshList.forEach(item1 => {
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item.id], { debugger;
console.log(item1)
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item1.id], {
floorId: 1, floorId: 1,
position: { x: item.longitude, y: item.latitude, z: item.z }, position: { x: item1.longitude, y: item1.latitude, z: item1.z },
animate: { duration: 1000, } animate: { duration: 10000, }
});//, });//,
}) })
} }
@ -1935,6 +1960,15 @@ export default {
that.showUserSelect = false; that.showUserSelect = false;
}, 300) }, 300)
}, },
allWarningView(){
this.$router.push('/ecm/event')
},
speakerPasue(){
this.speakerPlayStatus = false;
},
speakerPlay(){
this.speakerPlayStatus = true;
},
}, },
unmounted() { unmounted() {
window.map.destroy(); window.map.destroy();
@ -3246,6 +3280,10 @@ export default {
background: url(/public/img/b_ring.png) no-repeat; background: url(/public/img/b_ring.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.sound-quiet {
background: url(/public/img/b_quiet.png) no-repeat;
background-size: 100% 100%;
}
} }

View File

@ -48,64 +48,27 @@
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="抓拍图片:"> <el-form-item label="抓拍图片:">
<div style="display: flex" v-if="form.global_img!=null"> <div style="display: flex" v-if="form.global_img!=null" id="eventImgWrap">
<img :src="form.global_img" style="margin-right: 8px;height: 146px;flex: 1;"> <el-image
<img :src="form.face_img" style="margin-right: 8px;height: 146px;"> 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>
<div v-else>无抓拍</div> <div v-else>无抓拍</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </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>
<el-card v-if="form.handle_user" style="margin-top: 8px"> <el-card v-if="form.handle_user" style="margin-top: 8px">
@ -133,6 +96,7 @@
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
:disabled="mode==='edit'"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -141,6 +105,7 @@
v-model="form.handle_desc" v-model="form.handle_desc"
clearable clearable
type="textarea" type="textarea"
:disabled="mode==='edit'"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="mode==='edit'"> <el-form-item v-if="mode==='edit'">