Commit d13af288 by 潘建波

提交预置位设置

1 parent 2d6459fb
No preview for this file type
......@@ -33,11 +33,15 @@ let service = axios.create({
// 添加请求拦截器
service.interceptors.request.use(
config => {
// startLoading();
let atoken = localStorage.getItem("atoken");
// startLoading();
let atoken = localStorage.getItem("atoken");
if (atoken) {
// 判断是否存在token,如果存在的话,则每个http header都加上token
config.headers.authorization = atoken;
if (config.url.indexOf("codes") > -1) {
//
} else {
config.headers.authorization = atoken;
}
} else {
router.push("/login");
// endLoading();
......
......@@ -3,14 +3,14 @@ import axios from "axios";
console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) {
case "development":
baseUrl = "/api"; // 测试环境url
baseUrl = "http://192.168.9.133:20080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
break;
case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break;
case "production":
baseUrl = "http://vion-panda.51vip.biz:52510"; // 生产环境url
baseUrl = "http://192.168.9.133:20080"; // 生产环境url
break;
}
......
......@@ -242,4 +242,28 @@ body{
}
.el-menu-item.is-active .submenuicon{
background:rgba(0,105,255,1)!important;
}
.el-input-group__append{
background:rgba(0,105,255,1)!important;
color: #ffffff;
}
.search-vchan .el-input-group {
box-shadow:-1.2px 2px 1px 0px rgba(78, 8, 8, 0.1);
}
.card-hover:hover {
webkit-transform: translateY(-4px) scale(1);
-moz-transform: translateY(-4px) scale(1.01);
-ms-transform: translateY(-4px) scale(1.01);
-o-transform: translateY(-4px) scale(1.01);
transform: translateY(-4px) scale(1.01);
-webkit-box-shadow: 0 14px 24px rgba(62,57,107,.1);
box-shadow: 0 14px 24px rgba(62,57,107,.1);
}
.card-hover {
-webkit-transition: all .25s ease;
-o-transition: all .25s ease;
-moz-transition: all .25s ease;
transition: all .25s ease;
}
\ No newline at end of file
......@@ -17,15 +17,15 @@
<div class="item-box">
<div class="icon el-icon-bell"></div>
<div class="item-info-box">
<div>运行异常资源</div>
<div><span>6</span></div>
<div>运行异常</div>
<div><span>6</span> </div>
</div>
</div>
<div class="item-box">
<div class="icon el-icon-s-order"></div>
<div class="item-info-box">
<div>信息存储量</div>
<div> <span>1.2</span> T</div>
<div><span>1.2</span> T</div>
</div>
</div>
</div>
......
......@@ -5,13 +5,15 @@
:data="taskInfo.mtasks[0].scenes"
border
stripe
highlight-current-row
style="width: 80%;float:left"
height="25vh"
@current-change="handleCurrentChange"
>
<el-table-column label="序号" type="index" width="50" align="center">
</el-table-column>
<el-table-column
prop="name"
prop="position_num"
align="center"
label="预置位编号"
width="180"
......@@ -60,7 +62,7 @@
<handleparam ref="handleparam"></handleparam>
</div>
<div class="yt-box">
<ytconfig ref="yt"></ytconfig>
<ytconfig ref="yt" @subpostion="submitPosion"></ytconfig>
</div>
<div>
<parameter ref="parameter"></parameter>
......@@ -108,6 +110,17 @@
<el-input v-model="timer" style="padding-right:23px"></el-input>
</div>
</div>
<div class="sel-box">
<span class="title">开启轮休:</span>
<div class="timer-sel">
<el-switch
width="30"
v-model="polling_state"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleTimerClose">取 消</el-button>
<el-button type="primary" @click="submitTimer">确 定</el-button>
......@@ -126,11 +139,13 @@ export default {
data() {
return {
timer: 0,
polling_state: false,
timersel: 0,
timerDialog: false,
curindex: 0,
timeroptions: [30, 40, 50, 60, 100],
timerscenes: null,
currentRow: null,
taskInfo: {
mtasks: [
{
......@@ -166,7 +181,7 @@ export default {
this.$refs.handleparam.show(type);
},
setsounces() {
this.$refs.yt.openyt();
this.$refs.yt.openyt(this.currentRow);
},
getTaskParams() {
this.$api.task.getTaskParams(this.taskid, this.subtaskid).then(data => {
......@@ -175,6 +190,7 @@ export default {
},
setTimer(data) {
this.timerscenes = data;
this.polling_state = data.pollingState;
this.$store.commit("setocxstate", 0);
this.timerDialog = true;
},
......@@ -182,11 +198,30 @@ export default {
this.timerDialog = false;
this.$store.commit("setocxstate", 1);
},
handleCurrentChange(val) {
this.currentRow = val;
},
submitPosion(positionnum) {
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
ele.position_num = positionnum;
}
});
this.subRoi(this.taskInfo.mtasks);
},
submitTimer(item) {
this.taskInfo.mtasks[0].time_interval = this.timer;
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
ele.runtime = this.timer;
ele.pollingState = this.polling_state;
}
});
this.subRoi(this.taskInfo.mtasks);
},
subRoi(mdata) {
let data = {
subtask_id: this.subtaskid,
mtasks: this.taskInfo.mtasks
mtasks: mdata
};
this.$api.task.editRoi(this.taskid, this.subtaskid, data).then(res => {
if (res.ecode == 200) {
......@@ -201,14 +236,14 @@ export default {
},
showview() {
let routeData = this.$router.resolve({
name: "show",
query: {
name: "show",
query: {
taskid: this.taskid,
subtaskid: this.subtaskid,
playurl: this.playurl
}
});
window.open(routeData.href, '_blank');
});
window.open(routeData.href, "_blank");
},
submit: function(xml, type) {
let postObj = {
......
......@@ -72,7 +72,7 @@
</div>
<div class="right-bottom-box">
<div class="setyzw item-box">
<el-input placeholder="预置位编号"></el-input>
<el-input placeholder="预置位编号" v-model="presetindex"></el-input>
</div>
<div class="subbtn item-box">
<el-button @click="subset">确定</el-button>
......@@ -104,11 +104,22 @@ export default {
value2: 0,
value3: 0,
value4: 0,
presetindex: "",
curtask:{},
};
},
methods: {
openyt() {
this.showyt = true;
openyt(curtask) {
if (curtask) {
this.curtask = curtask;
this.showyt = true;
this.presetindex = curtask.position_num;
} else {
this.$message({
message: "请选择要操作的预置位",
type: "warning"
});
}
},
closeyt() {
this.showyt = false;
......@@ -121,23 +132,7 @@ export default {
VionVideo.VionPTZonrol(null, nType, nParam);
},
subset() {
let mtasks = this.allMask.mtasks;
this.allMask.mtasks.forEach(ele => {
ele.scenes[this.curindex].algo_type = this.algo_type;
ele.scenes[this.curindex].position_name = this.position_name;
ele.scenes[this.curindex].position_num = this.position_num;
});
let reqObj = {
subtask_id: this.curentSubTaskId,
mtasks: this.allMask.mtasks
};
this.$api.task
.editRoi(this.curentTaskId, this.curentSubTaskId, reqObj)
.then(res => {
if (data.ecode == "200") {
this.closeyt();
}
});
this.$emit("subpostion", this.presetindex);
}
}
};
......
......@@ -110,7 +110,7 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="播放" placement="bottom" effect="light" :visible-arrow=false>
<span :class="{'iconfont icon-bofang playIcon':true,'no-btn':scope.row.video&&scope.row.video[0].src_url!=''?false:true}" @click="playFun(scope.$index, scope.row)"></span>
<span :class="{'iconfont icon-fanxing-qidong playIcon':true,'no-btn':scope.row.video&&scope.row.video[0].src_url!=''?false:true}" @click="playFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
......
......@@ -145,7 +145,7 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="播放" placement="bottom" effect="light" :visible-arrow=false>
<span :class="{'iconfont icon-bofang playIcon':true,'no-btn':scope.row.video&&scope.row.video[0].src_url!=''?false:true}" @click="playFun(scope.$index, scope.row)"></span>
<span :class="{'iconfont icon-fanxing-qidong playIcon':true,'no-btn':scope.row.video&&scope.row.video[0].src_url!=''?false:true}" @click="playFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
......
......@@ -37,8 +37,8 @@
</el-form-item>
<el-form-item label="时间计划">
<el-select v-model="formData.period">
<el-option value="true" label="全天"></el-option>
<el-option value="false" label="时间"></el-option>
<el-option :value="1" label="全天"></el-option>
<el-option :value="0" label="时间"></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间" v-show="formData.plate_time != 'day'">
......
<template>
<div class="contentBox">
<div class="topCon">
<div class="left">
<!-- <div class="left">
<img src="../../assets/img/taskmanage/weather.png" alt="" />
<span class="textCon">
<div class="topText">21°/31°</div>
<div class="bottomText">西北风1级 空气优</div>
</span>
</div>
</div> -->
<div class="right">
<div class="rightBox">
<img src="../../assets/img/taskmanage/pic1.png" alt="" />
......@@ -336,9 +336,14 @@ export default {
// /
},
dateFormatter(row, column, cellValue, index) {
let startDate = cellValue ? cellValue.split(" ")[0] : "";
let endDate = row.end_dt ? row.end_dt.split(" ")[0] : "";
return startDate + " ~ " + endDate;
if (row.period) {
return "全天"
} else {
let startDate = cellValue ? cellValue.split(" ")[0] : "";
let endDate = row.end_dt ? row.end_dt.split(" ")[0] : "";
return startDate + " ~ " + endDate;
}
},
typeFormatter(row, column, cellValue, index) {
if (cellValue == 0) {
......
......@@ -2,8 +2,13 @@
<el-row :gutter="10" style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden">
<el-col :span="17">
<div id="map" class="maps">
<div class="search-vchan">
<el-input placeholder="请输入内容" v-model="vchanname" class="input-with-select">
<el-button slot="append" type="primary" icon="el-icon-search" @click="searchvchan"></el-button>
</el-input>
</div>
<showmap ref="map"></showmap>
<div class="eventlist-box">
<div class="eventlist-box card-hover">
<!-- <eventList></eventList> -->
<devInfo></devInfo>
</div>
......@@ -20,7 +25,7 @@
</el-col>
<el-col :span="7">
<el-row>
<div class="collect-box">
<div class="collect-box card-hover">
<div class="header-title">今日抓拍量</div>
<div class="collect-content">
<el-col :span="6" class="content-item">
......@@ -44,11 +49,11 @@
</el-row>
<el-row :gutter="12" class="event-type-box" style="margin-top:1vh">
<el-col :span="16">
<div class="right-item-box">
<div class="right-item-box card-hover">
<eventTypedis></eventTypedis>
</div>
</el-col>
<el-col :span="8" style="padding-right:0">
<el-col :span="8" style="padding-right:0" class="card-hover">
<div class="right-item-box">
<div class="title">重点车辆分布</div>
<div class="car-dis-info">
......@@ -88,12 +93,12 @@
</el-col>
</el-row>
<el-row style="margin-top:1vh;background:#fff">
<div class>
<div class="card-hover">
<illegaltrend></illegaltrend>
</div>
</el-row>
<el-row class="clearpright" style="margin-top:1vh">
<div class="right-item-box">
<div class="right-item-box card-hover">
<div class="title">实时数据</div>
<alarmEvent @event="alarmevent"></alarmEvent>
</div>
......@@ -126,7 +131,8 @@ export default {
ocxstatus:true,
archiveUnid: 0,
snap_num: 0,
playurl: {},
playurl: {},
vchanname:'',
playurl2:"",
audit_num: 0,
snapData: {
......@@ -168,6 +174,9 @@ export default {
//移动地图
this.$refs.map.movemap(data);
},
searchvchan(){
this.$refs.map.searchvchan(this.vchanname)
},
closeocx(){
this.ocxstatus=false;
},
......@@ -437,4 +446,12 @@ export default {
width:200px;
height:200px;
}
.search-vchan{
width 270px;
position: absolute;
top: 12px;
z-index 900;
right 10px;
border-radius 3px;
}
</style>
......@@ -19,7 +19,7 @@
<div class="infoChild">
<img src="../../assets/img/map/warn.png" alt="">
<span class="textCon">
<div>运行异常资源</div>
<div>运行异常</div>
<div class="colorText"><span>7</span></div>
</span>
</div>
......
<template>
<div>
<div id="map" class="maps"></div>
<div id="popup" class="ol-popup">
<div id="popup" class="ol-popup">
<a
href="#"
id="popup-closer"
class="ol-popup-closer"
@click="closepopup"
></a>
<div class="" id="t-popup-content">
</div>
<div class="" id="t-popup-content"></div>
</div>
<div id="videopopup" class="ol-popup">
<a
......@@ -22,6 +21,21 @@
<videoPlay ref="mapvideo" :playurl="playurl"></videoPlay>
</div>
</div>
<div id="taskinfopopup" class="ol-popup info-popup">
<a
href="#"
id="task-popup-closer"
class="ol-popup-closer"
@click="closetaskpopup"
></a>
<div>
<span>{{ infoData.vchan_name }}</span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
</template>
......@@ -34,7 +48,7 @@ import Feature from "ol/Feature"; //元素
import Overlay from "ol/Overlay"; //弹出框
import { toStringHDMS } from "ol/coordinate";
import { fromLonLat, toLonLat } from "ol/proj";
import {defaults as defaultControls, Control} from 'ol/control.js';
import { defaults as defaultControls, Control } from "ol/control.js";
import {
Tile as TileLayer,
Vector as VectorLayer,
......@@ -68,49 +82,53 @@ var map = "";
var Views = "";
var container = "";
var videocontainer = "";
var taskInfocontaniner = "";
var content = "";
var voideocontent = "";
var closer = "";
var taskcloser = "";
var overlay = "";
var RotateNorthControl = (function (Control) {
function RotateNorthControl(opt_options) {
var options = opt_options || {};
var infooverlay = "";
var RotateNorthControl = (function(Control) {
function RotateNorthControl(opt_options) {
var options = opt_options || {};
var button = document.createElement('button');
button.className = 'el-icon-aim';
var button = document.createElement("button");
button.className = "el-icon-aim";
var element = document.createElement('div');
element.className = 'rotate-north ol-unselectable ol-control';
element.appendChild(button);
var element = document.createElement("div");
element.className = "rotate-north ol-unselectable ol-control";
element.appendChild(button);
Control.call(this, {
element: element,
target: options.target
});
Control.call(this, {
element: element,
target: options.target
});
button.addEventListener('click', this.handleRotateNorth.bind(this), false);
}
button.addEventListener("click", this.handleRotateNorth.bind(this), false);
}
if ( Control ) RotateNorthControl.__proto__ = Control;
RotateNorthControl.prototype = Object.create( Control && Control.prototype );
RotateNorthControl.prototype.constructor = RotateNorthControl;
if (Control) RotateNorthControl.__proto__ = Control;
RotateNorthControl.prototype = Object.create(Control && Control.prototype);
RotateNorthControl.prototype.constructor = RotateNorthControl;
RotateNorthControl.prototype.handleRotateNorth = function handleRotateNorth () {
let pos = [120.324447, 36.074594];
Views.animate({
center: pos,
duration: 400,
zoom: 14
});
};
RotateNorthControl.prototype.handleRotateNorth = function handleRotateNorth() {
let pos = [120.324447, 36.074594];
Views.animate({
center: pos,
duration: 400,
zoom: 14
});
};
return RotateNorthControl;
}(Control));
return RotateNorthControl;
})(Control);
export default {
data() {
return {
devList: [],
playurl:{}
playurl: {},
infoData: {}
};
},
components: {
......@@ -177,9 +195,7 @@ export default {
center: [120.324447, 36.064594]
});
map = new Map({
controls: defaultControls().extend([
new RotateNorthControl()
]),
controls: defaultControls().extend([new RotateNorthControl()]),
// 设置地图图层
layers: [
// 创建一个使用Open Street Map地图源的瓦片图层
......@@ -215,7 +231,6 @@ export default {
let that = this;
map.on("click", e => {
console.log('经纬度',e.coordinate);
var pixel = map.getEventPixel(e.originalEvent);
//点击相机标注点
map.forEachFeatureAtPixel(pixel, function(feature) {
......@@ -226,18 +241,30 @@ export default {
//播放视频操作
let data = feature.getProperties().cameraInfo;
that.playvideo(data);
console.log("视频播放地址" + data);
console.log("视频播放地址", data);
});
});
//鼠标移入标注点
map.on("pointermove", e => {
var pixel = map.getEventPixel(e.originalEvent);
map.forEachFeatureAtPixel(pixel, function(feature) {
let data = feature.getProperties().cameraInfo;
that.infoData = data;
that.showTaskInfo(data);
});
});
},
movemap(data) {
let pos = [120.324447, 36.074594];
movemap(data, point, type) {
let pos = point ? point : [120.324447, 36.074594];
Views.animate({
center: pos,
duration: 400,
zoom: 14
});
this.addLayer(data, pos);
if (type && type == 2) {
this.addLayer(data, pos);
}
},
closepopup() {
overlay.setPosition(undefined);
......@@ -245,6 +272,7 @@ export default {
return false;
},
closevideopopup() {
this.closetaskpopup();
let video_ocx = document.getElementById("VionVideo");
let stopRes = video_ocx.StopPlaySip(0);
let stopRtspRes = video_ocx.StopPlay(0);
......@@ -252,6 +280,11 @@ export default {
closer.blur();
return false;
},
closetaskpopup() {
infooverlay.setPosition(undefined);
taskcloser.blur();
return false;
},
addLayer(pdata, pos) {
document.getElementById("popup").style.display = "block";
......@@ -323,7 +356,19 @@ export default {
vectorSource.addFeature(icon);
return vectorSource;
},
showTaskInfo(data) {
let pos = [data.longitude, data.latitude];
document.getElementById("taskinfopopup").style.display = "block";
infooverlay = new Overlay({
element: taskInfocontaniner,
autoPan: true,
position: pos,
autoPanAnimation: {
duration: 50
}
});
map.addOverlay(infooverlay);
},
playvideo(data) {
let pos = [data.longitude, data.latitude];
document.getElementById("videopopup").style.display = "block";
......@@ -385,6 +430,14 @@ export default {
this.InitMap();
}, 200);
});
},
searchvchan(vchanname) {
this.devList.forEach(ele => {
if (ele.vchan_name == vchanname) {
let point = [ele.longitude, ele.latitude];
this.movemap(point);
}
});
}
},
mounted() {
......@@ -393,9 +446,11 @@ export default {
}, 1000);
container = document.getElementById("popup");
videocontainer = document.getElementById("videopopup");
taskInfocontaniner = document.getElementById("taskinfopopup");
content = document.getElementById("t-popup-content");
voideocontent = document.getElementById("video-popup-content");
closer = document.getElementById("popup-closer");
taskcloser = document.getElementById("task-popup-closer");
}
};
</script>
......@@ -472,6 +527,10 @@ export default {
width: 100%;
}
}
.info-popup {
width 10vw;
height 100px;
}
.pop-info{
float: left;
padding-left: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!