Commit 7faee8e8 by 潘建波

修改标定设置未生效问题

1 parent 27813738
No preview for this file type
...@@ -10,14 +10,14 @@ import ops from "./ops" ...@@ -10,14 +10,14 @@ import ops from "./ops"
let wsIP = "vion-panda.51vip.biz:52510"; let wsIP = "vion-panda.51vip.biz:52510";
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
wsIP = "vion-panda.51vip.biz:52510"; // 测试环境url wsIP = "192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086"; // baseUrl = "http://192.168.9.61:8086";
break; break;
case "pre": case "pre":
wsIP = ""; // 预上线环境url wsIP = ""; // 预上线环境url
break; break;
case "production": case "production":
wsIP = "192.168.9.133:20080"; // 生产环境url wsIP = location.host; // 生产环境url
break; break;
} }
export default { export default {
......
...@@ -3,15 +3,15 @@ import axios from "axios"; ...@@ -3,15 +3,15 @@ import axios from "axios";
console.log(process.env.NODE_ENV); console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
// baseUrl = "http://192.168.9.133:20080"; // 测试环境url baseUrl = "http://192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086"; // baseUrl = "http://192.168.9.61:8086";
baseUrl = 'http://vion-panda.51vip.biz:52510'; // baseUrl = 'http://vion-panda.51vip.biz:52510';
break; break;
case "pre": case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break; break;
case "production": case "production":
baseUrl = "http://192.168.9.133:20080"; // 生产环境url baseUrl = `http://${location.host}`; // 生产环境url
break; break;
} }
......
...@@ -36,9 +36,9 @@ export default { ...@@ -36,9 +36,9 @@ export default {
//今日事件趋势 //今日事件趋势
return api.get(`${baseUrl}/api/v1/datahandle/statistics/behavior/hour`, params); return api.get(`${baseUrl}/api/v1/datahandle/statistics/behavior/hour`, params);
}, },
getDevList(devid) { getDevList(devid, vtype) {
// 获取设备信息 // 获取设备信息
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/9cb6e39adc5176b81879f6c22f1d962/vchan_struct?typea=1&s=1578967233185&limit=1000000`); return api.get(`${baseUrl}/api/v1/devconf_fx/devs/9cb6e39adc5176b81879f6c22f1d962/vchan_struct?s=1578967233185&limit=1000000`);
}, },
addShowUrl(params) { addShowUrl(params) {
//添加展示 //添加展示
......
...@@ -73,7 +73,7 @@ body{ ...@@ -73,7 +73,7 @@ body{
} }
/* 抓拍展示 */ /* 抓拍展示 */
.pic-box { .pic-box {
width: 100%; width: 98%;
margin-bottom:10px; margin-bottom:10px;
background:#F1F1F1; background:#F1F1F1;
border-radius:2px; border-radius:2px;
...@@ -96,7 +96,7 @@ body{ ...@@ -96,7 +96,7 @@ body{
} }
.pic-info li{ .pic-info li{
overflow:hidden; overflow:hidden;
margin-bottom:8px; margin-bottom:3px;
} }
.pic-info li span{ .pic-info li span{
display:inline-block; display:inline-block;
...@@ -252,7 +252,7 @@ body{ ...@@ -252,7 +252,7 @@ body{
box-shadow:-1.2px 2px 1px 0px rgba(78, 8, 8, 0.1); box-shadow:-1.2px 2px 1px 0px rgba(78, 8, 8, 0.1);
} }
.card-hover:hover { .card-hover:hover,.pic-hover:hover {
webkit-transform: translateY(-4px) scale(2); webkit-transform: translateY(-4px) scale(2);
-moz-transform: translateY(-4px) scale(1.01); -moz-transform: translateY(-4px) scale(1.01);
-ms-transform: translateY(-4px) scale(1.01); -ms-transform: translateY(-4px) scale(1.01);
...@@ -261,8 +261,11 @@ body{ ...@@ -261,8 +261,11 @@ body{
-webkit-box-shadow: 0 14px 24px rgba(62,57,107,.1); -webkit-box-shadow: 0 14px 24px rgba(62,57,107,.1);
box-shadow: 0 14px 24px rgba(62,57,107,.1); box-shadow: 0 14px 24px rgba(62,57,107,.1);
} }
.pic-hover:hover {
box-shadow: 2px 3px 4px rgba(2, 2, 2,0.2);
}
.card-hover { .card-hover,.pic-hover {
-webkit-transition: all .25s ease; -webkit-transition: all .25s ease;
-o-transition: all .25s ease; -o-transition: all .25s ease;
-moz-transition: all .25s ease; -moz-transition: all .25s ease;
......
...@@ -9,7 +9,6 @@ class Codes { ...@@ -9,7 +9,6 @@ class Codes {
* 返回得到的结果 * 返回得到的结果
*/ */
getCodeList(name) { getCodeList(name) {
console.log(JSON.parse(window.localStorage.getItem(name)));
return JSON.parse(window.localStorage.getItem(name)); return JSON.parse(window.localStorage.getItem(name));
} }
init(allData) { init(allData) {
...@@ -19,7 +18,7 @@ class Codes { ...@@ -19,7 +18,7 @@ class Codes {
this.result = {}; this.result = {};
this.result = allData; this.result = allData;
this.classify(); this.classify();
console.log(this.result); // console.log(this.result);
return this.result; return this.result;
} }
// 分类 // 分类
...@@ -206,28 +205,28 @@ class Codes { ...@@ -206,28 +205,28 @@ class Codes {
ary.push("年检标志"); ary.push("年检标志");
} }
} catch (e) { } catch (e) {
console.log("年检标志无"); // console.log("年检标志无");
} }
try { try {
if (this.allData.event_data.RefinedFeature.rDecoration) { if (this.allData.event_data.RefinedFeature.rDecoration) {
ary.push("摆件"); ary.push("摆件");
} }
} catch (e) { } catch (e) {
console.log("摆件无"); // console.log("摆件无");
} }
try { try {
if (this.allData.event_data.RefinedFeature.rPendant) { if (this.allData.event_data.RefinedFeature.rPendant) {
ary.push("吊坠"); ary.push("吊坠");
} }
} catch (e) { } catch (e) {
console.log("吊坠无"); // console.log("吊坠无");
} }
try { try {
if (this.allData.event_data.RefinedFeature.rSunshading) { if (this.allData.event_data.RefinedFeature.rSunshading) {
ary.push("遮阳板"); ary.push("遮阳板");
} }
} catch (e) { } catch (e) {
console.log("遮阳板无"); // console.log("遮阳板无");
} }
if (ary.length) { if (ary.length) {
this.result.RefinedFeature_text = ary.join(""); this.result.RefinedFeature_text = ary.join("");
...@@ -349,29 +348,29 @@ class Codes { ...@@ -349,29 +348,29 @@ class Codes {
this.result.xcycle_plate_text = "未识别"; this.result.xcycle_plate_text = "未识别";
} }
// 骑车类型 // 骑车类型
console.log(this.allData.event_data.xcycle_type) // console.log(this.allData.event_data.xcycle_type)
if(!this.allData.event_data.xcycle_type){ if (!this.allData.event_data.xcycle_type) {
this.result.xcycle_type_text = "行人"; this.result.xcycle_type_text = "行人";
}else{ } else {
try { try {
switch (this.allData.event_data.xcycle_type) { switch (this.allData.event_data.xcycle_type) {
case "motorcycle": case "motorcycle":
this.result.xcycle_type_text = "摩托车"; this.result.xcycle_type_text = "摩托车";
break; break;
case "bicycle": case "bicycle":
this.result.xcycle_type_text = "自行车"; this.result.xcycle_type_text = "自行车";
break; break;
case "tricycle": case "tricycle":
this.result.xcycle_type_text = "三轮车"; this.result.xcycle_type_text = "三轮车";
break; break;
default: default:
break; break;
} }
} catch (err) { } catch (err) {
this.result.xcycle_type_text = "未识别"; this.result.xcycle_type_text = "未识别";
} }
} }
try { try {
if (this.result.xcycle_type_text === "自行车") { if (this.result.xcycle_type_text === "自行车") {
this.result.company = this.allData.event_data.xcycle.company.name; this.result.company = this.allData.event_data.xcycle.company.name;
......
...@@ -72,7 +72,6 @@ const menu = { ...@@ -72,7 +72,6 @@ const menu = {
commit("SET_ROUTERS", []); commit("SET_ROUTERS", []);
return; return;
} else { } else {
console.log('aaa',data)
let accessedRouters = filterAsyncRouter(asyncRouterMap, data); let accessedRouters = filterAsyncRouter(asyncRouterMap, data);
commit("SET_ROUTERS", accessedRouters); commit("SET_ROUTERS", accessedRouters);
} }
......
...@@ -22,5 +22,8 @@ export default { ...@@ -22,5 +22,8 @@ export default {
}, },
setmapopen(state, data) { setmapopen(state, data) {
state.mapopen = data; state.mapopen = data;
},
setDevList(state, data) {
state.devList = data;
} }
}; };
export default { export default {
ocxstate: 0, ocxstate: 0,
mapopen:false, mapopen: false,
addRouter:[] addRouter: [],
devList: []
} }
...@@ -89,11 +89,11 @@ export default { ...@@ -89,11 +89,11 @@ export default {
getDate() { getDate() {
let date = new Date(); let date = new Date();
let Y = date.getFullYear(); let Y = date.getFullYear();
let M = date.getMonth() > 10 ? date.getMonth() : `0${date.getMonth() + 1}`; let M = date.getMonth() > 9 ? date.getMonth() : `0${date.getMonth() + 1}`;
let D = date.getDate() > 10 ? date.getDate() : `0${date.getDate()}`; let D = date.getDate() > 9 ? date.getDate() : `0${date.getDate()}`;
let h = date.getHours() > 10 ? date.getHours() : `0${date.getHours()}`; let h = date.getHours() > 9 ? date.getHours() : `0${date.getHours()}`;
let m = let m =
date.getMinutes() > 10 ? date.getMinutes() : `0${date.getMinutes()}`; date.getMinutes() > 9 ? date.getMinutes() : `0${date.getMinutes()}`;
let s = date.getSeconds(); let s = date.getSeconds();
let w = date.getDay(); let w = date.getDay();
let wtext = ""; let wtext = "";
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div <div
:class="{ 'submast-item': true, 'top-line': true }" :class="{ 'submast-item': true, 'top-line': true }"
v-for="(subitem, index) in subDevData" v-for="(subitem, index) in subDevData"
:key="subitem.device_id" :key="index"
ref="subitem" ref="subitem"
@click.stop="getleval($event, index, subitem)" @click.stop="getleval($event, index, subitem)"
:style=" :style="
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
<!-- 叶子节点 --> <!-- 叶子节点 -->
<div <div
v-if="istop && slaveData.length > 0" v-if="istop && slaveData.length > 0"
:style="`top:${topheihgt}px;left:${loopitem * 14 + 12}vw`" :style="`top:${topheihgt+1}px;left:${loopitem * 14 + 11.01}vw`"
v-for="(loopitem, loopindex) in Math.ceil(slaveData.length / 6)" v-for="(loopitem, loopindex) in Math.ceil(slaveData.length / 6)"
:key="loopitem" :key="loopindex"
class="leval-box" class="leval-box"
> >
<span <span
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
'bottom-line': !istop 'bottom-line': !istop
}" }"
v-for="(item, cindex) in setslaveData(slaveData, loopindex)" v-for="(item, cindex) in setslaveData(slaveData, loopindex)"
:key="item" :key="cindex"
:style=" :style="
`background:${curlevalcolor};borderColor:${curlevalbordercolor}` `background:${curlevalcolor};borderColor:${curlevalbordercolor}`
" "
...@@ -68,12 +68,13 @@ ...@@ -68,12 +68,13 @@
class="vertical-line" class="vertical-line"
:style="`background:${curlevalbordercolor}`" :style="`background:${curlevalbordercolor}`"
></span> ></span>
<span>{{ item }}</span> <div>{{item.device_name}}</div>
<div>{{item.in_ip}}</div>
</div> </div>
</div> </div>
<div <div
v-if="!istop && slaveData.length > 0" v-if="!istop && slaveData.length > 0"
:style="`bottom:${bottomHeight}px;left:${loopitem * 14 + 12}vw`" :style="`bottom:${bottomHeight +5}px;left:${loopitem * 14 + 11}vw`"
v-for="(loopitem, loopindex) in Math.ceil(slaveData.length / 6)" v-for="(loopitem, loopindex) in Math.ceil(slaveData.length / 6)"
:key="loopitem" :key="loopitem"
class="leval-bottom-box" class="leval-bottom-box"
...@@ -89,8 +90,8 @@ ...@@ -89,8 +90,8 @@
'top-line': istop, 'top-line': istop,
'bottom-line': !istop 'bottom-line': !istop
}" }"
v-for="item in setslaveData(slaveData,loopindex)" v-for="(item, xindex) in setslaveData(slaveData, loopindex)"
:key="item" :key="xindex"
:style=" :style="
`background:${curlevalcolor};borderColor:${curlevalbordercolor}` `background:${curlevalcolor};borderColor:${curlevalbordercolor}`
" "
...@@ -103,7 +104,8 @@ ...@@ -103,7 +104,8 @@
class="vertical-line" class="vertical-line"
:style="`background:${curlevalbordercolor}`" :style="`background:${curlevalbordercolor}`"
></span> ></span>
<span>{{ "1.9.99" }}</span> <div>{{item.device_name}}</div>
<div>{{item.in_ip}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -390,6 +392,7 @@ export default { ...@@ -390,6 +392,7 @@ export default {
border-radius: 5px; border-radius: 5px;
margin-top: 1vh; margin-top: 1vh;
border: 1px solid #333; border: 1px solid #333;
cursor: pointer;
} }
.submast-item::before { .submast-item::before {
content: ""; content: "";
......
...@@ -269,12 +269,10 @@ ...@@ -269,12 +269,10 @@
}) })
} }
}else if(this.tableType=="video"){ }else if(this.tableType=="video"){
console.log(data)
if(data.org_type=='video'){ if(data.org_type=='video'){
this.formattterData=data.childs; this.formattterData=data.childs;
}else{ }else{
this.formattterData=data; this.formattterData=data;
console.log('aaaaaa',this.formattterData)
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-row v-if="allAlarmData.length > 0"> <el-row v-if="allAlarmData.length > 0">
<!-- 交通事件类 --> <!-- 交通事件类 -->
<!-- 机动车事件 --> <!-- 机动车事件 -->
<el-col :span="24" ref="picbox" :class="{'pic-box':true,'illclass':item.illegalTypeCode == 1?true:false}" v-for="(item, index) in allAlarmData" :key="index" v-if="item.event_cate !== 'flow'"> <el-col :span="24" ref="picbox" :class="{'pic-box':true,'pic-hover':true,'illclass':item.illegalTypeCode == 1?true:false}" v-for="(item, index) in allAlarmData" :key="index" v-if="item.event_cate !== 'flow'">
<el-col :lg="12" :md="10" :sm="11" v-if='item.task_algo_type!="1"'> <el-col :lg="12" :md="10" :sm="11" v-if='item.task_algo_type!="1"'>
<el-card :body-style="{ padding: 0 }"> <el-card :body-style="{ padding: 0 }">
<div class="img-wrap" @click="showInfo(index)"> <div class="img-wrap" @click="showInfo(index)">
......
<template> <template>
<div class="pic-detail"> <div class="pic-detail">
<el-dialog title="详情" :visible.sync="isShow" :before-close='beforeHideModal'> <el-dialog
<el-row> title="详情"
<el-col :span="16"> :visible.sync="isShow"
<div @mousemove='picMove' class="pic-wrap"> :before-close="beforeHideModal"
<img v-if="curPicData.picsEmpty" :src="carImg" alt="暂无图片" title="暂无图片" slot="reference" class='pictures small' /> >
<!-- <img v-if="curPicData.pics" :src="carImg" alt="暂无图片" slot="reference" class='pictures small' /> --> <el-row>
<el-popover placement="left-end" width="305" trigger="hover" v-if="!curPicData.picsEmpty"> <el-col :span="24">
<div :style="{backgroundImage: 'url('+curPicData.pic+')',backgroundRepeat:'no-repeat'}" alt="" id="big" class='big'></div> <div @mousemove="picMove" class="pic-wrap">
<img :src="curPicData.pic" alt="" slot="reference" class='pictures small' /> <img
</el-popover> v-if="curPicData.picsEmpty"
</div> :src="carImg"
</el-col> alt="暂无图片"
<!-- 交通 --> title="暂无图片"
<el-col :span="8" v-if="curPicData.event_type === 'vehicle' || curPicData.event_type === 'xcycle'|| curPicData.event_type === 'pedestrian'"> slot="reference"
<ul class="pic-info"> class="pictures small"
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_body_type_text"> />
<span>车辆类型:</span> <!-- <img v-if="curPicData.pics" :src="carImg" alt="暂无图片" slot="reference" class='pictures small' /> -->
<span>{{ curPicData.vehicle_body_type_text }}</span> <el-popover
</li> placement="left-end"
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_plate_text"> width="305"
<span>车牌号码:</span> trigger="hover"
<span>{{ curPicData.vehicle_plate_text }}</span> v-if="!curPicData.picsEmpty"
</li> >
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.plate_type_text"> <div
<span>车牌类型:</span> :style="{
<span>{{ curPicData.plate_type_text }}</span> backgroundImage: 'url(' + curPicData.bigpic + ')',
</li> backgroundRepeat: 'no-repeat'
<li :title="curPicData.shoot_date"> }"
<span>经过日期:</span> alt=""
<span>{{ curPicData.shoot_date }}</span> id="big"
</li> class="big"
<li :title="curPicData.shoot_time"> ></div>
<span>经过时间:</span> <img
<span>{{ curPicData.shoot_time }}</span> :src="curPicData.bigpic"
</li> alt=""
<li :title="curPicData.location_name"> slot="reference"
<span>经过地点:</span> class="pictures small"
<span>{{ curPicData.location_name }}</span> />
</li> </el-popover>
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_body_logo_text"> </div>
<span>车辆品牌:</span> </el-col>
<span>{{ curPicData.vehicle_body_logo_text }}</span> <!-- 交通 -->
</li> <el-col
<!-- <li :title="curPicData.vehicle_body_type_text"> :span="24"
v-if="
curPicData.event_type === 'vehicle' ||
curPicData.event_type === 'xcycle' ||
curPicData.event_type === 'pedestrian'
"
>
<ul class="pic-info">
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_body_type_text"
>
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_plate_text"
>
<span>车牌号码:</span>
<span>{{ curPicData.vehicle_plate_text }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.plate_type_text"
>
<span>车牌类型:</span>
<span>{{ curPicData.plate_type_text }}</span>
</li>
<li :title="curPicData.shoot_date">
<span>经过日期:</span>
<span>{{ curPicData.shoot_date }}</span>
</li>
<li :title="curPicData.shoot_time">
<span>经过时间:</span>
<span>{{ curPicData.shoot_time }}</span>
</li>
<li :title="curPicData.location_name">
<span>经过地点:</span>
<span>{{ curPicData.location_name }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_body_logo_text"
>
<span>车辆品牌:</span>
<span>{{ curPicData.vehicle_body_logo_text }}</span>
</li>
<!-- <li :title="curPicData.vehicle_body_type_text">
<span>车辆类型:</span> <span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span> <span>{{ curPicData.vehicle_body_type_text }}</span>
</li> --> </li> -->
<!-- 机动车 --> <!-- 机动车 -->
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.plate_color_text"> <li
<span>车牌颜色:</span> v-if="curPicData.event_type === 'vehicle'"
<span>{{ curPicData.plate_color_text }}</span> :title="curPicData.plate_color_text"
</li> >
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.vehicle_body_color_text"> <span>车牌颜色:</span>
<span>车身颜色:</span> <span>{{ curPicData.plate_color_text }}</span>
<span>{{ curPicData.vehicle_body_color_text }}</span> </li>
</li> <li
<li v-if="curPicData.event_type === 'vehicle'" :title="curPicData.RefinedFeature_text"> v-if="curPicData.event_type === 'vehicle'"
<span>标志物:</span> :title="curPicData.vehicle_body_color_text"
<span>{{ curPicData.RefinedFeature_text }}</span> >
</li> <span>车身颜色:</span>
<!-- 非机动车 --> <span>{{ curPicData.vehicle_body_color_text }}</span>
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.xcycle_type_text"> </li>
<span>骑车类型:</span> <li
<span>{{ curPicData.xcycle_type_text }}</span> v-if="curPicData.event_type === 'vehicle'"
</li> :title="curPicData.RefinedFeature_text"
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.xcycle_color_type"> >
<span>车辆颜色:</span> <span>标志物:</span>
<span>{{ curPicData.xcycle_color_type }}</span> <span>{{ curPicData.RefinedFeature_text }}</span>
</li> </li>
<li :title="curPicData.driver_face_sex" v-if="curPicData.event_type === 'xcycle'"> <!-- 非机动车 -->
<span>性别:</span> <li
<span>{{ curPicData.driver_face_sex }}</span> v-if="curPicData.event_type === 'xcycle'"
</li> :title="curPicData.xcycle_type_text"
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.company"> >
<span>运营公司:</span> <span>骑车类型:</span>
<span>{{ curPicData.company }}</span> <span>{{ curPicData.xcycle_type_text }}</span>
</li> </li>
<li v-if="curPicData.event_type === 'xcycle'" :title="curPicData.driver_face_upbody_text"> <li
<span>上身颜色:</span> v-if="curPicData.event_type === 'xcycle'"
<span>{{ curPicData.driver_face_upbody_text }}</span> :title="curPicData.xcycle_color_type"
</li> >
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'xcycle'"> <span>车辆颜色:</span>
<span>速度:</span> <span>{{ curPicData.xcycle_color_type }}</span>
<span>{{ curPicData.location_speed }}</span> </li>
</li> <li
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'xcycle'"> :title="curPicData.driver_face_sex"
<span>戴帽子:</span> v-if="curPicData.event_type === 'xcycle'"
<span>{{ curPicData.driver_face_with_hats }}</span> >
</li> <span>性别:</span>
<!-- 行人 --> <span>{{ curPicData.driver_face_sex }}</span>
<li :title="curPicData.driver_face_sex" v-if="curPicData.event_type === 'pedestrian'"> </li>
<span>性别:</span> <li
<span>{{ curPicData.driver_face_sex }}</span> v-if="curPicData.event_type === 'xcycle'"
</li> :title="curPicData.company"
<li :title="curPicData.driver_face_upbody_text" v-if="curPicData.event_type === 'pedestrian'"> >
<span>上身颜色:</span> <span>运营公司:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span> <span>{{ curPicData.company }}</span>
</li> </li>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'pedestrian'"> <li
<span>下身颜色:</span> v-if="curPicData.event_type === 'xcycle'"
<span>{{ curPicData.driver_face_lobody_text }}</span> :title="curPicData.driver_face_upbody_text"
</li> >
<li :title="curPicData.pedestrian_height" v-if="curPicData.event_type === 'pedestrian'"> <span>上身颜色:</span>
<span>身高:</span> <span>{{ curPicData.driver_face_upbody_text }}</span>
<span>{{ curPicData.pedestrian_height }}</span> </li>
</li> <li
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'pedestrian'"> :title="curPicData.driver_face_lobody_text"
<span>速度:</span> v-if="curPicData.event_type === 'xcycle'"
<span>{{ curPicData.location_speed }}</span> >
</li> <span>速度:</span>
<li :title="curPicData.driver_face_lobody_text" v-if="curPicData.event_type === 'pedestrian'"> <span>{{ curPicData.location_speed }}</span>
<span>戴帽子:</span> </li>
<span>{{ curPicData.driver_face_with_hats }}</span> <li
</li> :title="curPicData.driver_face_lobody_text"
<li v-if="curPicData.illegalType" :title="curPicData.illegalType"> v-if="curPicData.event_type === 'xcycle'"
<span>违法类型:</span> >
<span>{{ curPicData.illegalType }}</span> <span>戴帽子:</span>
</li> <span>{{ curPicData.driver_face_with_hats }}</span>
</ul> </li>
</el-col> <!-- 行人 -->
<el-col :span="8" v-if="curPicData.event_cate === 'behavior'"> <li
<ul class="pic-info"> :title="curPicData.driver_face_sex"
<li :title="curPicData.shoot_date"> v-if="curPicData.event_type === 'pedestrian'"
<span>抓拍日期:</span> >
<span>{{ curPicData.shoot_date }}</span> <span>性别:</span>
</li> <span>{{ curPicData.driver_face_sex }}</span>
<li :title="curPicData.shoot_time"> </li>
<span>抓拍时间:</span> <li
<span>{{ curPicData.shoot_time }}</span> :title="curPicData.driver_face_upbody_text"
</li> v-if="curPicData.event_type === 'pedestrian'"
<li :title="getCode('安防事件',curPicData.event_type)"> >
<span>事件类型:</span> <span>上身颜色:</span>
<span>{{ getCode('安防事件',String(curPicData.event_type)) }}</span> <span>{{ curPicData.driver_face_upbody_text }}</span>
</li> </li>
<li :title="curPicData.shoot_time" v-if="curPicData.event_type == '21'"> <li
<span>区域人数:</span> :title="curPicData.driver_face_lobody_text"
<span>{{ curPicData.event_data.density.persons }}</span> v-if="curPicData.event_type === 'pedestrian'"
</li> >
</ul> <span>下身颜色:</span>
</el-col> <span>{{ curPicData.driver_face_lobody_text }}</span>
</el-row> </li>
<span slot="footer"> <li
<button class="closebtn" @click="beforeHideModal" style='width: 10%;'>关闭</button> :title="curPicData.pedestrian_height"
</span> v-if="curPicData.event_type === 'pedestrian'"
</el-dialog> >
</div> <span>身高:</span>
<span>{{ curPicData.pedestrian_height }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<span>违法类型:</span>
<span>{{ curPicData.illegalType }}</span>
</li>
</ul>
</el-col>
<el-col :span="24" v-if="curPicData.event_cate === 'behavior'">
<ul class="pic-info">
<li :title="curPicData.shoot_date">
<span>抓拍日期:</span>
<span>{{ curPicData.shoot_date }}</span>
</li>
<li :title="curPicData.shoot_time">
<span>抓拍时间:</span>
<span>{{ curPicData.shoot_time }}</span>
</li>
<li :title="getCode('安防事件', curPicData.event_type)">
<span>事件类型:</span>
<span>{{
getCode("安防事件", String(curPicData.event_type))
}}</span>
</li>
<li
:title="curPicData.shoot_time"
v-if="curPicData.event_type == '21'"
>
<span>区域人数:</span>
<span>{{ curPicData.event_data.density.persons }}</span>
</li>
</ul>
</el-col>
</el-row>
<span slot="footer">
<button class="el-button el-button--default el-button--small" @click="beforeHideModal" >
关闭
</button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
carImg: '', carImg: "",
isShow: false, isShow: false,
curPicData:{} curPicData: {}
} };
},
methods: {
detailInfo: function(data) {
this.curPicData = {};
this.curPicData = data;
console.log("detail",data)
this.isShow = true;
this.$store.commit("setocxstate", 0);
},
beforeHideModal: function() {
this.isShow = false;
this.$emit("closeDetailModal");
}, },
methods: { picMove: function(e) {
detailInfo: function (data) { var e = e || window.event;
this.curPicData = {}; if (e.target.getAttribute("class").indexOf("small") > -1) {
this.curPicData = data; let imgWidth = e.target.width;
this.isShow = true; let imgHeight = e.target.height;
this.$store.commit('setocxstate',0) let x = 150 - (e.offsetX / imgWidth) * 1800;
}, let y = 100 - (e.offsetY / imgHeight) * 1200;
beforeHideModal: function () { let bigimg = document.getElementById("big");
this.isShow = false; bigimg.style.backgroundPosition = x + "px " + y + "px";
this.$emit('closeDetailModal') } else {
}, return;
picMove: function (e) { }
var e = e || window.event;
if (e.target.getAttribute('class').indexOf('small') > -1) {
let imgWidth = e.target.width;
let imgHeight = e.target.height;
let x = 150-e.offsetX/imgWidth*1800;
let y = 100-e.offsetY/imgHeight*1200;
let bigimg = document.getElementById('big');
bigimg.style.backgroundPosition = x +'px '+ y +'px'
}else{
return
}
}
} }
}
} };
</script> </script>
<style scoped> <style scoped>
.pictures { .pictures {
width: 100%; width: 100%;
max-height: 528px; max-height: 528px;
cursor: zoom-in; cursor: zoom-in;
height: 500px; }
}
.pic-info {
margin-bottom: 0;
}
.pic-info li { .pic-info {
text-align: left; margin-bottom: 0;
font-size: 18px; }
height: 48px;
line-height: 48px;
width: 100%;
overflow: hidden;
min-width: 235px;
}
.pic-info li span { .pic-info li {
float: left; height: 30px;
} line-height: 30px;
width: 33%;
float: left;
}
.pic-info li span:first-child { .pic-info li span {
padding-left: 3%; float: left;
margin-right: 10px; font-size: 14px;
width: 91px; color: #606266;
} }
.pic-info li span:last-child {
width: 100px; /*40%*/
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.big {
width: 300px;
height: 200px;
background-size: 1800px 1200px;
}
.closebtn{
height: 30px;
line-height: 30px;
}
.pic-info li span:first-child {
padding-left: 3%;
margin-right: 10px;
width: 91px;
}
.pic-info li span:last-child {
width: 100px; /*40%*/
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.big {
width: 300px;
height: 200px;
background-size: 1800px 1200px;
}
.closebtn {
height: 30px;
line-height: 30px;
}
</style> </style>
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
console.log(tab, event); console.log(tab, event);
}, },
dataInit(cid, type) { dataInit(cid, type) {
this.$refs.allalarm.allAlarmData = [];
this.$refs.caralarm.carAlarmData = [];
this.$refs.illegalalarm.illAlarmData = [];
this.$refs.eventalarm.eventAlarmData = [];
this.resultData = ""; this.resultData = "";
this.curType = type; this.curType = type;
this.carItems = []; this.carItems = [];
...@@ -100,7 +104,6 @@ export default { ...@@ -100,7 +104,6 @@ export default {
this.cws.onmessage = evt => { this.cws.onmessage = evt => {
let data = JSON.parse(evt.data); let data = JSON.parse(evt.data);
if (data.command) { if (data.command) {
console.log('a')
} else if (data.type == "response") { } else if (data.type == "response") {
console.log("请求任务推送成功"); console.log("请求任务推送成功");
} else if (data.event_cate) { } else if (data.event_cate) {
......
...@@ -184,6 +184,7 @@ export default { ...@@ -184,6 +184,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.$refs.videoplay.videoPlay(); this.$refs.videoplay.videoPlay();
}, 2000); }, 2000);
console.log("视频播放地址:", this.playurl.rtsp_url);
} else { } else {
this.$message({ this.$message({
message: "获取rtsp播放地址失败!请重试!", message: "获取rtsp播放地址失败!请重试!",
......
...@@ -617,8 +617,8 @@ export default { ...@@ -617,8 +617,8 @@ export default {
type: ele.lane_type, type: ele.lane_type,
index: ele.lane_no, index: ele.lane_no,
direct: direct, direct: direct,
lane_guiding_type: obj.lanes.lane[index].lane_guiding_type, lane_guiding_type: lane_guid_type,
lane_use_type: obj.lanes.lane[index].lane_use_type lane_use_type: lane_use
}; };
} }
}); });
...@@ -983,6 +983,7 @@ export default { ...@@ -983,6 +983,7 @@ export default {
}, },
//改变选中图形样式 //改变选中图形样式
makeSelectedGroup: function(shape) { makeSelectedGroup: function(shape) {
debugger
console.log(shape); console.log(shape);
let points = shape.attrs.points; let points = shape.attrs.points;
let lineType = shape.line_type; let lineType = shape.line_type;
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
showModal: function(data, mtaskdata) { showModal: function(data, mtaskdata) {
var _this = this; var _this = this;
this.$store.commit("setocxstate", 0); this.$store.commit("setocxstate", 0);
this.taskData = mtaskdata; this.taskData = data;
this.dialogVisible = true; this.dialogVisible = true;
this.type = data.algo_type; this.type = data.algo_type;
// this.type = 2; // this.type = 2;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
highlight-current-row highlight-current-row
style="width: 80%;float:left" style="width: 80%;float:left"
height="25vh" height="25vh"
@current-change="handleCurrentChange" @cell-click="handleCurrentChange"
v-loading="loading" v-loading="loading"
> >
<el-table-column label="序号" type="index" width="50" align="center"> <el-table-column label="序号" type="index" width="50" align="center">
...@@ -149,6 +149,7 @@ export default { ...@@ -149,6 +149,7 @@ export default {
setDemarcate(scenesdata, index) { setDemarcate(scenesdata, index) {
if (this.checkpollstate()) { if (this.checkpollstate()) {
this.curindex = index; this.curindex = index;
console.log("scenesdata",scenesdata)
this.$refs.demarcate.showModal(scenesdata, this.taskInfo); this.$refs.demarcate.showModal(scenesdata, this.taskInfo);
} }
}, },
...@@ -178,7 +179,7 @@ export default { ...@@ -178,7 +179,7 @@ export default {
}, },
resetRoi() { resetRoi() {
this.$store.commit("setocxstate", 0); this.$store.commit("setocxstate", 0);
this.$confirm("删除预置位信息, 是否继续?", "提示", { this.$confirm("删除参数设置,区域设置,标定设置信息?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
...@@ -240,6 +241,7 @@ export default { ...@@ -240,6 +241,7 @@ export default {
return state; return state;
}, },
submitPosion(positionnum) { submitPosion(positionnum) {
debugger
this.taskInfo.mtasks[0].scenes.map(ele => { this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) { if (ele.scene_unid == this.currentRow.scene_unid) {
ele.position_num = positionnum; ele.position_num = positionnum;
......
...@@ -17,28 +17,43 @@ export default { ...@@ -17,28 +17,43 @@ export default {
data() { data() {
return { return {
settimer: 0, settimer: 0,
timeroptions: [{name:5,value:5},{name:10,value:10},{name:15,value:15},{name:30,value:30},{name:"不限时",value:-1}] timeroptions: [
{ name: 5, value: 5 },
{ name: 10, value: 10 },
{ name: 15, value: 15 },
{ name: 30, value: 30 },
{ name: "不限时", value: -1 }
]
}; };
}, },
methods: { methods: {
changet(val) { changet(val) {
this.$emit("timerchange", val); this.$emit("timerchange", val);
}, }
}, },
props: ["runtime","runindex"], props: ["runtime", "runindex"],
updated(v){ updated(v) {
this.$nextTick(function(){ this.$nextTick(function() {
// alert(v) // alert(v)
this.settimer = this.runtime; this.settimer = this.runtime;
}); });
}, },
mounted() { mounted() {
this.settimer = this.runtime; this.settimer = this.runtime;
if (this.runindex == 0 && (this.runtime == 0 ||this.runtime == -1)) { if (this.runindex == 0 && (this.runtime == 0 || this.runtime == -1)) {
this.settimer = -1; this.settimer = -1;
} }
if (this.runindex > 0) {
this.timeroptions = [
{ name: "0", value: 0 },
{ name: 5, value: 5 },
{ name: 10, value: 10 },
{ name: 15, value: 15 },
{ name: 30, value: 30 }
];
}
}, },
watch:{ watch: {
runtime(val) { runtime(val) {
this.settimer = val; this.settimer = val;
} }
......
<template> <template>
<div class="ocx-box" id="ocx-box" v-show="isShow"> <div class="ocx-box" id="ocx-box" v-show="isShow">
<object id="VionVideo" classid="clsid:93F960BB-5AF9-402B-A3DF-06112F14DC02" codebase="VionPlatformVideo.ocx" width="100%" <object
height="100%"> id="VionVideo"
classid="clsid:93F960BB-5AF9-402B-A3DF-06112F14DC02"
codebase="VionPlatformVideo.ocx"
width="100%"
height="100%"
>
<!-- <param name="_Version" value="65536"> <!-- <param name="_Version" value="65536">
<param name="_ExtentX" value="2646"> <param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323"> <param name="_ExtentY" value="1323">
...@@ -10,115 +15,131 @@ ...@@ -10,115 +15,131 @@
</div> </div>
</template> </template>
<script> <script>
import { import { mapState } from "vuex";
mapState export default {
} from 'vuex' data() {
export default { return {
data() { urlFlag: false,
return { isShow: true
urlFlag:false, };
isShow:true },
}; props: ["playulr", "type"],
}, methods: {
props: ['playulr', 'type'], videoPlay: function() {
methods: { this.urlFlag = false;
videoPlay: function () { if (!this.playulr.sip_serv_ip) {
this.urlFlag = false let url = this.playulr.rtsp_url;
if (!this.playulr.sip_serv_ip) { let ocxPlayRes = VionVideo.PlayRealVideo(
let url = this.playulr.rtsp_url url,
let ocxPlayRes = VionVideo.PlayRealVideo(url, "0", "xxx", '',undefined); "0",
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes); "xxx",
if (ocxPlayRes != 0) { "",
alert('播放失败!'); undefined
} );
} else { console.log("video Ocx播放rtsp流返回值:", ocxPlayRes);
let OcxResponse = document.getElementById('VionVideo').StartPlaySip(this.playulr.sip_serv_id, this.playulr.sip_serv_ip, if (ocxPlayRes != 0) {
this.playulr.sip_serv_port, this.playulr.sip_unid, this.playulr.sip_password, this.playulr.devId, 0) alert("播放失败!");
console.log('video Ocx播放sip流返回值:', OcxResponse);
if (OcxResponse != 0 && OcxResponse != 200) {
alert('播放失败!');
}
} }
}, } else {
downOcx: function () { let OcxResponse = document
if (this.fileUrl !== '' && !this.installOcx) { .getElementById("VionVideo")
location.href = this.fileUrl; .StartPlaySip(
this.playulr.sip_serv_id,
this.playulr.sip_serv_ip,
this.playulr.sip_serv_port,
this.playulr.sip_unid,
this.playulr.sip_password,
this.playulr.devId,
0
);
console.log("video Ocx播放sip流返回值:", OcxResponse);
if (OcxResponse != 0 && OcxResponse != 200) {
alert("播放失败!");
} }
}, }
installOcxInfo: function () { },
this.$confirm('为了正常使用,是否安装OCX控件?', '友情提示', { downOcx: function() {
confirmButtonText: '确定', if (this.fileUrl !== "" && !this.installOcx) {
cancelButtonText: '取消', location.href = this.fileUrl;
type: 'warning' }
}).then(() => { },
installOcxInfo: function() {
this.$confirm("为了正常使用,是否安装OCX控件?", "友情提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.installOcx = false; this.installOcx = false;
this.downOcx(); this.downOcx();
}).catch(() => { })
.catch(() => {
this.installOcxInfo(); this.installOcxInfo();
}); });
},
initocx() {
VionVideo.Init(0, 'Null', 1);
},
downloadOCx() {
// if (navigator.userAgent.indexOf('Trident') > -1) {
// this.axios.get(IP + "/api/v1/device/dlfile", {
// params: {
// file_type: "video_ocx"
// }
// })
// .then(response => {
// location.href = response.data.file_url;
// });
// } else {
// this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// }
},
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
}
}
},
created() {
// this.checkIE();
}, },
computed: { initocx() {
...mapState(['ocxstate']) VionVideo.Init(0, "Null", 1);
// this.initocx();
}, },
mounted() { downloadOCx() {
this.initocx(); // if (navigator.userAgent.indexOf('Trident') > -1) {
// try { // this.axios.get(IP + "/api/v1/device/dlfile", {
// if (document.getElementById("VionVideo").GetVersion()) { // params: {
// } // file_type: "video_ocx"
// } catch (error) { // }
// this.downloadOCx(); // })
// .then(response => {
// location.href = response.data.file_url;
// });
// } else {
// this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// } // }
}, },
watch: { checkIE() {
ocxstate(val) { var agent = navigator.userAgent.toLowerCase();
try { if (
if(val == 0){ /(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
this.isShow = false document.documentMode < 10
} else { ) {
this.isShow = true this.$message.error("IE 版本过低请升级到IE10级以上版本!");
document.getElementById("VionVideo").StartPlay(0); }
} }
} catch (error) { },
console.log(error) created() {
// this.checkIE();
},
computed: {
...mapState(["ocxstate"])
// this.initocx();
},
mounted() {
this.initocx();
// try {
// if (document.getElementById("VionVideo").GetVersion()) {
// }
// } catch (error) {
// this.downloadOCx();
// }
},
watch: {
ocxstate(val) {
try {
if (val == 0) {
this.isShow = false;
} else {
this.isShow = true;
document.getElementById("VionVideo").StartPlay(0);
} }
} catch (error) {
}, console.log(error);
}, }
beforeDestroy: function () {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
} }
}; },
beforeDestroy: function() {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
}
};
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
......
<template> <template>
<div class="expande-table-row"> <div class="expande-table-row">
<span class="label">{{subindex + 1}}</span>
<span class="label">视频源文件</span> <span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span> <span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">设备地址</span> <span class="label">设备地址</span>
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
:key="index" :key="index"
:value="item.device_id" :value="item.device_id"
> >
{{ item.in_ip }} {{ item.device_id }}
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
...@@ -31,7 +32,7 @@ export default { ...@@ -31,7 +32,7 @@ export default {
assign_id: "" assign_id: ""
}; };
}, },
props: ["subTaskData", "freeList", "taskData"], props: ["subTaskData", "freeList", "taskData", "subindex"],
methods: { methods: {
subMove() { subMove() {
let taskID = this.taskData.task_id; let taskID = this.taskData.task_id;
...@@ -65,9 +66,7 @@ export default { ...@@ -65,9 +66,7 @@ export default {
}, },
created() {}, created() {},
watch: { watch: {
subTaskData(val) {
console.log(val);
}
}, },
mounted() { mounted() {
this.assign_id = this.subTaskData.assign_id this.assign_id = this.subTaskData.assign_id
...@@ -79,6 +78,7 @@ export default { ...@@ -79,6 +78,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.expande-table-row { .expande-table-row {
overflow: hidden;
span { span {
float: left; float: left;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
...@@ -99,20 +99,20 @@ export default { ...@@ -99,20 +99,20 @@ export default {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
.subtask-info:nth-child(2) { .subtask-info:nth-child(3) {
width: 9vw; width: 9vw;
overflow: hidden; overflow: hidden;
} }
.subtask-info:nth-child(4) { .subtask-info:nth-child(5) {
width: 6vw; width: 6vw;
} }
.subtask-info:nth-child(6) { .subtask-info:nth-child(7) {
width: 4.5vw; width: 4.5vw;
} }
.subtask-info:nth-child(8) { .subtask-info:nth-child(9) {
width: 4vw; width: 4vw;
} }
.subtask-info:nth-child(10) { .subtask-info:nth-child(11) {
width: 12vw; width: 12vw;
} }
.sub-btn { .sub-btn {
......
...@@ -7,14 +7,19 @@ ...@@ -7,14 +7,19 @@
:before-close="handleClose" :before-close="handleClose"
> >
<div> <div>
<el-form label-position="left" label-width="80px" :model="formData"> <el-form
<el-form-item label="任务名称"> label-position="left"
label-width="80px"
:model="formData"
:rules="rules"
>
<el-form-item label="任务名称" prop="taskname" class="form-item">
<el-input <el-input
v-model="formData.task_name" v-model="formData.task_name"
placeholder="请输入任务名称" placeholder="请输入任务名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="算法类型"> <el-form-item label="算法类型" prop="algotype" class="form-item">
<el-select <el-select
v-model="formData.task_algo_type" v-model="formData.task_algo_type"
placeholder="请选择" placeholder="请选择"
...@@ -28,7 +33,7 @@ ...@@ -28,7 +33,7 @@
<el-option value="5" label="交通行人"></el-option> <el-option value="5" label="交通行人"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="场景占用"> <el-form-item label="场景占用" class="form-item">
<el-input <el-input
v-model="formData.resource_use" v-model="formData.resource_use"
placeholder="请选择" placeholder="请选择"
...@@ -36,13 +41,13 @@ ...@@ -36,13 +41,13 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间计划"> <el-form-item label="时间计划" class="form-item">
<el-select v-model="formData.period"> <el-select v-model="formData.period">
<el-option :value="true" label="全天"></el-option> <el-option :value="true" label="全天"></el-option>
<el-option :value="false" label="时间"></el-option> <el-option :value="false" label="时间"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="时间" v-show="formData.plate_time != 'day'"> <el-form-item label="时间" v-show="formData.plate_time != 'day'" prop="timer" class="form-item">
<el-date-picker <el-date-picker
style="width:100%" style="width:100%"
v-model="formData.timer" v-model="formData.timer"
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="存储配置"> <el-form-item label="存储配置" class="form-item">
<el-select <el-select
v-model="formData.store_conf.unid" v-model="formData.store_conf.unid"
placeholder="请选择" placeholder="请选择"
...@@ -67,7 +72,7 @@ ...@@ -67,7 +72,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="设备类型"> <el-form-item label="设备类型" class="form-item">
<el-select v-model="formData.plate_type"> <el-select v-model="formData.plate_type">
<el-option <el-option
v-for="(item, index) in freeList" v-for="(item, index) in freeList"
...@@ -111,11 +116,21 @@ export default { ...@@ -111,11 +116,21 @@ export default {
store_conf: { store_conf: {
unid: "" unid: ""
}, },
priority: "" priority: "",
period: true
}, },
vchanAry: [], vchanAry: [],
sessionData: {}, sessionData: {},
store_confs: [] store_confs: [],
rules: {
taskname: [{ required: true, message: "请输入任务名称", trigger: "blur" }],
algotype: [
{ required: true, message: "请选择算法类型", trigger: "blur" }
],
timer: [
{ required: true, message: "时间设置不能为空", trigger: "blur" }
]
}
}; };
}, },
props: { props: {
...@@ -146,7 +161,8 @@ export default { ...@@ -146,7 +161,8 @@ export default {
}, },
priority: "", priority: "",
plate_type: "", plate_type: "",
plate_time: "" plate_time: "",
period: true
}; };
} }
if (type == "edit") { if (type == "edit") {
...@@ -193,8 +209,12 @@ export default { ...@@ -193,8 +209,12 @@ export default {
source_type: "pull_video_stream", source_type: "pull_video_stream",
dev_unid: this.dev_unid, dev_unid: this.dev_unid,
node_count: 0, node_count: 0,
start_dt: this.formData.period ? "2020-03-27 00:00:00" : this.setUtcTime(this.formData.timer[0]), start_dt: this.formData.period
end_dt: this.formData.period ? "3020-03-27 00:00:00" : this.setUtcTime(this.formData.timer[1]), ? "2020-03-27 00:00:00"
: this.setUtcTime(this.formData.timer[0]),
end_dt: this.formData.period
? "3020-03-27 00:00:00"
: this.setUtcTime(this.formData.timer[1]),
priority: this.formData.priority, priority: this.formData.priority,
store_conf_unid: this.formData.store_conf.unid, store_conf_unid: this.formData.store_conf.unid,
period: this.formData.period, period: this.formData.period,
...@@ -246,4 +266,9 @@ export default { ...@@ -246,4 +266,9 @@ export default {
}; };
</script> </script>
<style></style> <style lang="stylus" scoped>
.form-item {
margin-bottom 13px
}
</style>
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
:data="tableData" :data="tableData"
stripe stripe
border border
@current-change="rowclick"
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column
...@@ -43,9 +44,9 @@ ...@@ -43,9 +44,9 @@
label="视频源名称" label="视频源名称"
></el-table-column> ></el-table-column>
<el-table-column align="center" label="视频状态"> <el-table-column align="center" label="视频状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="statusFormatter(scope.row)"></div> <div v-html="statusFormatter(scope.row)"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -102,8 +103,8 @@ export default { ...@@ -102,8 +103,8 @@ export default {
user_unid: "", user_unid: "",
formData: {}, formData: {},
editData: {}, editData: {},
taskData:{}, taskData: {},
moveTaskData:[], moveTaskData: [],
setvisible: false, setvisible: false,
props: { props: {
id: "vchan_refid", id: "vchan_refid",
...@@ -156,13 +157,15 @@ export default { ...@@ -156,13 +157,15 @@ export default {
data[i].vchan.refid = data[i].vchan.vchan_refid; data[i].vchan.refid = data[i].vchan.vchan_refid;
data[i].vchan.name = data[i].vchan.vchan_name; data[i].vchan.name = data[i].vchan.vchan_name;
data[i].vchan.running_status = data[i].running_status; data[i].vchan.running_status = data[i].running_status;
data[i].vchan.play_url = data[i].rtsp_url;
} else { } else {
data.vchan = { data.vchan = {
subtask_id: data[i].subtask_id, subtask_id: data[i].subtask_id,
refid: "", refid: "",
vchan_name: data[i].subtask_name, vchan_name: data[i].subtask_name,
name: data[i].subtask_name, name: data[i].subtask_name,
running_status: data[i].running_status running_status: data[i].running_status,
play_url: data[i].rtsp_url
}; };
} }
ary.push(data[i].vchan); ary.push(data[i].vchan);
...@@ -192,8 +195,7 @@ export default { ...@@ -192,8 +195,7 @@ export default {
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].vchan_id == data.vchan_id) { if (this.tableData[i].vchan_id == data.vchan_id) {
this.delFun(i, this.tableData[i],'tree') this.delFun(i, this.tableData[i], "tree");
staus = true; staus = true;
break; break;
} }
...@@ -211,6 +213,7 @@ export default { ...@@ -211,6 +213,7 @@ export default {
}); });
}, },
editsubTask(vchan) { editsubTask(vchan) {
let status = true;
let data = { let data = {
is_dome: false, is_dome: false,
subtask_name: vchan.name, subtask_name: vchan.name,
...@@ -221,26 +224,53 @@ export default { ...@@ -221,26 +224,53 @@ export default {
vchan_name: vchan.name vchan_name: vchan.name
} }
}; };
this.$api.task.editSubTask(this.editData.task_id, data).then(res => { this.$api.task.editSubTask(this.editData.task_id, data).then(res => {
this.tableData.push(vchan); if (res.ecode == 200) {
this.$message({
message: "添加成功",
type: "success"
});
this.tableData.push(vchan);
} else {
this.$message.error(res.enote);
}
}); });
}, },
playVideo(data) { playVideo(data) {
console.log("b", data); console.log("b", data);
}, },
delFun(index, data, action= "tree") { delFun(index, data, action = "tree") {
this.$api.task this.$store.commit("setocxstate", 0);
.deleteSubTask(this.editData.task_id, data.subtask_id) this.$confirm("删除视频源, 是否继续?", "提示", {
.then(res => { confirmButtonText: "确定",
this.tableData.splice(index, 1); cancelButtonText: "取消",
this.checkvckan(); type: "warning"
})
.then(() => {
this.$api.task
.deleteSubTask(this.editData.task_id, data.subtask_id)
.then(res => {
this.$message({
type: "success",
message: "删除成功!"
});
this.tableData.splice(index, 1);
this.checkvckan();
this.$store.commit("setocxstate", 1);
});
if (action != "tree") {
setTimeout(() => {
this.checkvckan();
}, 0);
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
this.$store.commit("setocxstate", 1);
}); });
if (action != "tree") {
setTimeout(() => {
this.checkvckan();
}, 0);
}
}, },
append(data) { append(data) {
const newChild = { id: id++, label: "testtest", children: [] }; const newChild = { id: id++, label: "testtest", children: [] };
...@@ -258,6 +288,15 @@ export default { ...@@ -258,6 +288,15 @@ export default {
}); });
this.$refs.tree.setCheckedKeys(arr); this.$refs.tree.setCheckedKeys(arr);
}, },
rowclick(row) {
console.log("row", row);
this.play_url = {
rtsp_url: row.play_url
};
setTimeout(() => {
this.$refs.video.videoPlay();
}, 100);
},
loadNode(node, resolve) { loadNode(node, resolve) {
if (node.level === 0) { if (node.level === 0) {
return resolve([ return resolve([
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
@expand-change="expandchange" @expand-change="expandchange"
> >
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props" >
<subTaskInfo <subTaskInfo
v-for="(item, index) in props.row.subTaskData" v-for="(item, index) in props.row.subTaskData"
:key="index" :key="index"
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<span class="label">{{subindex + 1}}</span> <span class="label">{{subindex + 1}}</span>
<span class="label">视频源文件</span> <span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span> <span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">任务ID</span>
<span class="subtask-info">{{subTaskData.subtask_id}}</span>
<span class="label">设备地址</span> <span class="label">设备地址</span>
<span class="subtask-info">192.178.99.99</span> <span class="subtask-info">192.178.99.99</span>
<span class="label">已用资源</span> <span class="label">已用资源</span>
...@@ -69,6 +71,7 @@ export default { ...@@ -69,6 +71,7 @@ export default {
}, },
mounted() { mounted() {
console.log("tasdata",this.subTaskData)
this.assign_id = this.subTaskData.assign_id this.assign_id = this.subTaskData.assign_id
? this.subTaskData.assign_id ? this.subTaskData.assign_id
: ""; : "";
...@@ -78,6 +81,7 @@ export default { ...@@ -78,6 +81,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.expande-table-row { .expande-table-row {
width: 79vw;
overflow: hidden; overflow: hidden;
span { span {
float: left; float: left;
...@@ -85,7 +89,7 @@ export default { ...@@ -85,7 +89,7 @@ export default {
overflow: hidden; overflow: hidden;
} }
.label { .label {
width: 6vw; width: 5vw;
text-align: center; text-align: center;
border-left: 1px solid $border-color; border-left: 1px solid $border-color;
background: #f0f0f0; background: #f0f0f0;
...@@ -100,20 +104,23 @@ export default { ...@@ -100,20 +104,23 @@ export default {
line-height: 40px; line-height: 40px;
} }
.subtask-info:nth-child(3) { .subtask-info:nth-child(3) {
width: 9vw; width: 7vw;
overflow: hidden; overflow: hidden;
} }
.subtask-info:nth-child(5) { .subtask-info:nth-child(5) {
width: 6vw; width: 8vw;
} }
.subtask-info:nth-child(7) { .subtask-info:nth-child(7) {
width: 4.5vw; width: 6vw;
} }
.subtask-info:nth-child(9) { .subtask-info:nth-child(9) {
width: 4vw; width: 4vw;
} }
.subtask-info:nth-child(11) { .subtask-info:nth-child(11) {
width: 12vw; width: 4vw;
}
.subtask-info:nth-child(13) {
width: 9vw;
} }
.sub-btn { .sub-btn {
cursor: pointer; cursor: pointer;
......
...@@ -71,7 +71,6 @@ export default { ...@@ -71,7 +71,6 @@ export default {
try { try {
let that = this; let that = this;
this.connect_id = new Date().getTime(); this.connect_id = new Date().getTime();
// this.cws = new WebSocket('ws://'+ this.API.IP +'/websocket/v1/integrated/connects/' + this.connect_id)
this.cws = new WebSocket( this.cws = new WebSocket(
`ws://${this.$api.wsIP}/websocket/api/v1/datahandle/connects/${this.connect_id}` `ws://${this.$api.wsIP}/websocket/api/v1/datahandle/connects/${this.connect_id}`
); );
...@@ -110,15 +109,16 @@ export default { ...@@ -110,15 +109,16 @@ export default {
_this.getCode("违法类型", data.event_data.illegal.code) || ""; _this.getCode("违法类型", data.event_data.illegal.code) || "";
let camername = data.event_data.location.name; let camername = data.event_data.location.name;
let dt = this.showLocalTime(data.event_dt).split(" ")[1]; let dt = this.showLocalTime(data.event_dt).split(" ")[1];
console.log(data.pics[0].src_url);
let pics = data.pics[0].src_url; let pics = data.pics[0].src_url;
let pos = data.event_data.location.pos; let pos = data.event_data.location.pos;
let vrefid = data.vchan_refid;
let obj = { let obj = {
illname: illname, illname: illname,
illdt: dt, illdt: dt,
camername: camername, camername: camername,
pics: pics, pics: pics,
pos: pos pos: pos,
vchan_refid: vrefid
}; };
if (that.tableData.length > 6) { if (that.tableData.length > 6) {
that.tableData.pop(obj); that.tableData.pop(obj);
...@@ -128,9 +128,7 @@ export default { ...@@ -128,9 +128,7 @@ export default {
that.tableData.unshift(obj); that.tableData.unshift(obj);
this.$forceUpdate(); this.$forceUpdate();
} }
} catch (error) { } catch (error) {}
console.log(error);
}
if (data.command) { if (data.command) {
console.log("推送服务连接正常"); console.log("推送服务连接正常");
...@@ -153,8 +151,13 @@ export default { ...@@ -153,8 +151,13 @@ export default {
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
},
beforeDestroy() {
this.cws = "";
clearInterval(this.keepAlive);
this.keepAlive = null;
} }
}; };
</script> </script>
<style></style>> <style></style>
<template> <template>
<div> <div>
<div class="chart-header-box"> <div class="chart-header-box">
<div class="header-title">事件类型分布</div> <el-col :span="12" class="header-title">事件类型分布</el-col>
<el-col class="ev-box">
<el-select v-model="evtype" @change="getType">
<el-option label="违法" value="1"></el-option>
<el-option label="事件" value="2"></el-option>
</el-select>
</el-col>
</div> </div>
<div id="eventchart" class="eventchart"></div> <div id="eventchart" class="eventchart"></div>
</div> </div>
...@@ -11,7 +17,8 @@ ...@@ -11,7 +17,8 @@
export default { export default {
data() { data() {
return { return {
illtype: "" illtype: "",
evtype:"1"
}; };
}, },
methods: { methods: {
...@@ -119,10 +126,23 @@ export default { ...@@ -119,10 +126,23 @@ export default {
}; };
maychart.setOption(option); maychart.setOption(option);
}, },
getType(val){
if (val == "1") {
this.getTrafficType();
}
if (val == "2") {
this.getBehaviorType();
}
},
getTrafficType() { getTrafficType() {
this.$api.show.getTrafficType().then(res => { this.$api.show.getTrafficType().then(res => {
this.initchart(res.list_data); this.initchart(res.list_data);
}); });
},
getBehaviorType() {
this.$api.show.getBehaviorType().then(res => {
this.initchart(res.list_data);
});
} }
}, },
mounted() { mounted() {
...@@ -132,6 +152,10 @@ export default { ...@@ -132,6 +152,10 @@ export default {
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.ev-box{
width 100px
float right
}
.chart-header-box { .chart-header-box {
height: 3vh; height: 3vh;
padding 5px; padding 5px;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<span class="header-label">违法</span> <span class="header-label">违法</span>
<div class="header-select"> <div class="header-select">
<el-select v-model="illtype" @change="getTrafficHour"> <el-select v-model="illtype" @change="getTrafficHour">
<el-option label="全部" value=""></el-option>
<el-option <el-option
v-for="item in illageList" v-for="item in illageList"
:key="item.value" :key="item.value"
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
<span class="header-label">事件</span> <span class="header-label">事件</span>
<div class="header-select"> <div class="header-select">
<el-select v-model="eventtype" @change="getTrafficHour"> <el-select v-model="eventtype" @change="getTrafficHour">
<el-option label="全部" value=""></el-option>
<el-option <el-option
v-for="item in eventList" v-for="item in eventList"
:key="item.value" :key="item.value"
...@@ -291,20 +293,20 @@ export default { ...@@ -291,20 +293,20 @@ export default {
getTrafficHour() { getTrafficHour() {
let date = new Date(); let date = new Date();
let Y = date.getFullYear(); let Y = date.getFullYear();
let M = date.getMonth() > 10 ? date.getMonth() : `0${date.getMonth() + 1}`; let M = date.getMonth() > 9 ? date.getMonth() : `0${date.getMonth() + 1}`;
let D = date.getDate() > 10 ? date.getDate() : `0${date.getDate()}`; let D = date.getDate() > 9 ? date.getDate() : `0${date.getDate()}`;
let h = date.getHours() > 10 ? date.getHours() : `0${date.getHours()}`; let h = date.getHours() > 9 ? date.getHours() : `0${date.getHours()}`;
let m = let m =
date.getMinutes() > 10 ? date.getMinutes() : `0${date.getMinutes()}`; date.getMinutes() > 9 ? date.getMinutes() : `0${date.getMinutes()}`;
let s = date.getSeconds(); let s = date.getSeconds();
let startDate = `${Y}-${M}-${D} 00:00:00`; let startDate = `${Y}/${M}/${D} 00:00:00`;
let curDate = `${Y}-${M}-${D} ${h}:${m}:${s}`; let curDate = `${Y}/${M}/${D} ${h}:${m}:${s}`;
let data = { let data = {
illegal_type: this.illtype, illegal_type: this.illtype,
event_type: this.eventtype, event_type: this.eventtype,
key_vehicle_type: this.special_type, key_vehicle_type: this.special_type,
start_dt:startDate, start_dt: this.setUtcTime(startDate),
end_dt:curDate, end_dt: this.setUtcTime(curDate),
}; };
this.$api.show.getTrafficHour(data).then(res => { this.$api.show.getTrafficHour(data).then(res => {
console.log('违法事件趋势',res); console.log('违法事件趋势',res);
......
...@@ -63,7 +63,9 @@ ...@@ -63,7 +63,9 @@
</div> </div>
<div> <div>
<div class="zd-title">特殊车辆总量</div> <div class="zd-title">特殊车辆总量</div>
<div class="zd-num">{{ snapData.key_vehicle_total_snap_num }}</div> <div class="zd-num">
{{ snapData.key_vehicle_total_snap_num }}
</div>
</div> </div>
</el-col> </el-col>
</div> </div>
...@@ -90,7 +92,10 @@ ...@@ -90,7 +92,10 @@
<span class="icon-fanxing-zhatuchezhuapai1"></span> <span class="icon-fanxing-zhatuchezhuapai1"></span>
</div> </div>
<div class="right-content"> <div class="right-content">
<div><span class="car-num">10</span></div> <div>
<span class="car-num">{{ keyVehicleData[0] || 0 }}</span
>
</div>
<div>渣土车抓拍</div> <div>渣土车抓拍</div>
</div> </div>
</div> </div>
...@@ -102,7 +107,10 @@ ...@@ -102,7 +107,10 @@
></span> ></span>
</div> </div>
<div class="right-content"> <div class="right-content">
<div><span class="car-num">10</span></div> <div>
<span class="car-num">{{ keyVehicleData[1] || 0 }}</span
>
</div>
<div>危险品车</div> <div>危险品车</div>
</div> </div>
</div> </div>
...@@ -114,7 +122,10 @@ ...@@ -114,7 +122,10 @@
></span> ></span>
</div> </div>
<div class="right-content"> <div class="right-content">
<div class><span class="car-num">29</span></div> <div class>
<span class="car-num">{{ keyVehicleData[2] || 0 }}</span
>
</div>
<div>重型罐式车</div> <div>重型罐式车</div>
</div> </div>
</div> </div>
...@@ -195,9 +206,20 @@ export default { ...@@ -195,9 +206,20 @@ export default {
}, },
methods: { methods: {
alarmevent(data) { alarmevent(data) {
console.log('alarmdata',data); let position = null;
if (data.vchan_refid) {
let vdata = this.$store.state.devList;
vdata.map(ele => {
if (
ele.refid == data.vchan_refid ||
ele.vchan_refid == data.vchan_refid
) {
position = [ele.longitude, ele.latitude];
}
});
}
//移动地图 //移动地图
this.$refs.map.movemap(data,null,2); this.$refs.map.movemap(data, position, 2);
}, },
searchvchan() { searchvchan() {
this.$refs.map.searchvchan(this.vchanname); this.$refs.map.searchvchan(this.vchanname);
...@@ -489,5 +511,4 @@ export default { ...@@ -489,5 +511,4 @@ export default {
left 10 left 10
z-index 100 z-index 100
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!