Commit 7cc59b41 by 潘建波

【new】多预置位提交

【new】flv播放断流问题
1 parent f25c960d
No preview for this file type
...@@ -2,7 +2,7 @@ window.config = { ...@@ -2,7 +2,7 @@ window.config = {
"logstatus":true, //是否开启日志收集 "logstatus":true, //是否开启日志收集
"hadertitle":"AI视频分析平台",//系统标题 "hadertitle":"AI视频分析平台",//系统标题
"logintitle":"AI视频分析平台",//展示标题 "logintitle":"AI视频分析平台",//展示标题
"https": false, "https": true,
"isvideo":0, "isvideo":0,
"bigtree":false,//大数据展示树 "bigtree":false,//大数据展示树
"host":"http://10.1.200.100:20080", "host":"http://10.1.200.100:20080",
...@@ -11,4 +11,6 @@ window.config = { ...@@ -11,4 +11,6 @@ window.config = {
"huasanDD": 'http://aaa.zzgx.gov.cn/oauth/authorize?response_type=code&scope=read&client_id=KLjmdAH0', "huasanDD": 'http://aaa.zzgx.gov.cn/oauth/authorize?response_type=code&scope=read&client_id=KLjmdAH0',
"ddwsurl":"10.1.200.97:29090", "ddwsurl":"10.1.200.97:29090",
"isdd":false, //是否开启钉钉登录 "isdd":false, //是否开启钉钉登录
"version":"2.1.0",
"encrypt":false,//是否加密true采用sha1加密,false不加密
} }
{"commit":"e9b878f7deaf4f5dad924a65071186ebc6f970d7","commitDate":"2021-5-25 16:10","buildDate":"2021-5-27 19:23","version":"2.0.9","info":"【BUG】修改密码验证方式 【new】增加用户显示,增加推出提示 【new】过车增加速度"} {"commit":"f25c960da3c22d3c221e8aea91f7d7a900b0205d","commitDate":"2021-5-31 14:0","buildDate":"2021-6-16 11:9","version":"2.1.0","info":"合并修改"}
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,13 @@ export default { ...@@ -8,7 +8,13 @@ export default {
data() { data() {
return {}; return {};
}, },
watch:{
$route(to,from){
if(!to.meta.isopen){
this.$router.push('/login')
}
}
},
created() { created() {
let menus = JSON.parse(localStorage.getItem("menu")); let menus = JSON.parse(localStorage.getItem("menu"));
if (menus) { if (menus) {
......
...@@ -21,8 +21,8 @@ switch (process.env.NODE_ENV) { ...@@ -21,8 +21,8 @@ switch (process.env.NODE_ENV) {
break; break;
case "production": case "production":
wsIP = location.host; // 生产环境url wsIP = location.host; // 生产环境url
flvIP = "192.168.9.245" + ":8080" // flvIP = "192.168.9.245" + ":8080"
// flvIP = location.hostname + ":8080" flvIP = location.hostname + ":8080"
break; break;
} }
export default { export default {
......
...@@ -4,7 +4,7 @@ import axios from "axios"; ...@@ -4,7 +4,7 @@ import axios from "axios";
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url // baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = window.config.https?"https://192.168.9.233:20070":"http://192.168.9.173:20080"; // 测试环境url baseUrl = window.config.https?"https://192.168.9.245:20070":"http://192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url // baseUrl = "http://192.168.9.82:8080"; // 测试环境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';
......
...@@ -167,27 +167,28 @@ function checkIE() { ...@@ -167,27 +167,28 @@ function checkIE() {
return false; return false;
} }
} }
let versioninfo = require("../../../public/js/version");
let sha1 = require('js-sha1') let sha1 = require('js-sha1')
Vue.prototype.baseencode = function(str){ Vue.prototype.baseencode = function(str){
// return str // return str
let base = ""; // let base = "";
// if(versioninfo && versioninfo.version ){ // let version = window.config.version
// let vsstring = versioninfo.version.split("."); // if(version ){
// let vsstring = version.split(".");
// let vs = Number(String(vsstring[0])+String(vsstring[1])+String(vsstring[2])) // let vs = Number(String(vsstring[0])+String(vsstring[1])+String(vsstring[2]))
// if(vs > 207) { // if(vs > 210) {
// base = str; // base = str;
// } else { // } else {
// var encode = encodeURI(str);
// // 对编码的字符串转化base64
// var base64 = btoa(encode);
// base = base64;
// } // }
// } else { // } else {
// base = str; // base = sha1(str);
// } // }
// return str var encode = encodeURI(str);
return sha1(str); // 对编码的字符串转化base64
var base64 = btoa(encode);
var base = base64;
return base
// return sha1(str);
} }
Vue.prototype.showLocalTime = function(obj) { Vue.prototype.showLocalTime = function(obj) {
if (obj == undefined) return; if (obj == undefined) return;
......
...@@ -8,6 +8,9 @@ export const constantRouterMap = [{ ...@@ -8,6 +8,9 @@ export const constantRouterMap = [{
name: "交通态势", name: "交通态势",
component: resolve => require(["../views/Layout/index.vue"], resolve), component: resolve => require(["../views/Layout/index.vue"], resolve),
redirect: "/login", redirect: "/login",
meta:{
isopen:true
},
children: [{ children: [{
path: "/trficcshow", path: "/trficcshow",
name: "状态展示", name: "状态展示",
...@@ -25,10 +28,16 @@ export const constantRouterMap = [{ ...@@ -25,10 +28,16 @@ export const constantRouterMap = [{
{ {
path: "/ddlogin", path: "/ddlogin",
name: "ddlogin", name: "ddlogin",
meta:{
isopen:true
},
component: resolve => require(["../views/ddlogin.vue"], resolve) component: resolve => require(["../views/ddlogin.vue"], resolve)
},{ },{
path: "/login", path: "/login",
name: "login", name: "login",
meta:{
isopen:true
},
// route level code-splitting // route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
......
...@@ -35,9 +35,11 @@ function filterAsyncRouter(asyncRouterMap, roles) { ...@@ -35,9 +35,11 @@ function filterAsyncRouter(asyncRouterMap, roles) {
var newData = []; var newData = [];
// return routers // return routers
asyncRouterMap.forEach((ele, index) => { asyncRouterMap.forEach((ele, index) => {
ele.meta.isopen = false
roles.map(m => { roles.map(m => {
if (ele.path == m.path) { if (ele.path == m.path) {
let obj = ele; let obj = ele;
ele.meta.isopen = true
if (m.children && m.children.length > 0) { if (m.children && m.children.length > 0) {
obj.children = filterAsyncRouter(ele.children, m.children); obj.children = filterAsyncRouter(ele.children, m.children);
} else { } else {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<img class="ddimg" src="../assets/img/login/dd@2x.png" alt="" /> <img class="ddimg" src="../assets/img/login/dd@2x.png" alt="" />
<span class="title" @click="switchLogin">钉钉登录</span> <span class="title" @click="switchLogin">钉钉登录</span>
</div> </div>
<div class="syversion">版本:v{{ versioninfo.version }}</div> <div class="syversion">版本:v{{ versioninfo }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
<script> <script>
let particlesConfig = require("../assets/js/particles.json"); let particlesConfig = require("../assets/js/particles.json");
let versioninfo = require("../../public/js/version"); let versioninfo = window.config.version
// import { config } from "../../public/js/config"; let sha1 = require('js-sha1')
import types from "../store/types.js"; import types from "../store/types.js";
export default { export default {
name: "Login", name: "Login",
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
password: "", password: "",
showdd: true, showdd: true,
innerHeight: 0, innerHeight: 0,
step:0,
logintitle: "", logintitle: "",
isdd: window.config.isdd, isdd: window.config.isdd,
webSocketL: null, webSocketL: null,
...@@ -129,11 +130,13 @@ export default { ...@@ -129,11 +130,13 @@ export default {
initHeight() { initHeight() {
this.innerHeight = window.innerHeight; this.innerHeight = window.innerHeight;
}, },
login() { //兼容处理
login(type) {
this.$api.login this.$api.login
.login({ .login({
username: this.ruleForm.username, username: this.ruleForm.username,
password: this.baseencode(this.ruleForm.password), password: window.config.encrypt?sha1(this.ruleForm.password):this.baseencode(this.ruleForm.password),
// password: this.ruleForm.password, // password: this.ruleForm.password,
user_type: "user", user_type: "user",
}) })
...@@ -141,6 +144,10 @@ export default { ...@@ -141,6 +144,10 @@ export default {
if (!res.ecode) { if (!res.ecode) {
this.loginMount(res, "user"); this.loginMount(res, "user");
} else { } else {
if(res.ecode == "1000"){
this.$router.push('resetpass')
return false
}
this.$message({ this.$message({
type: "error", type: "error",
message: res.enote, message: res.enote,
...@@ -173,10 +180,10 @@ export default { ...@@ -173,10 +180,10 @@ export default {
//存储配置列表 //存储配置列表
this.storeConfList(); this.storeConfList();
//code列表 //code列表
this.getCatesList(); // this.getCatesList();
this.getCodeList(); // this.getCodeList();
this.getCustomCode(); // this.getCustomCode();
this.getEventList(); // this.getEventList();
this.getDev(); this.getDev();
this.getMenu(res.user_unid); this.getMenu(res.user_unid);
}, },
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
</template> </template>
<script> <script>
let sha1 = require('js-sha1')
export default { export default {
data() { data() {
var validatePass = (rule, value, callback) => { var validatePass = (rule, value, callback) => {
...@@ -90,15 +91,16 @@ export default { ...@@ -90,15 +91,16 @@ export default {
methods: { methods: {
submitForm(formName) { submitForm(formName) {
let data = { let data = {
old_pwd: this.baseencode(this.ruleForm.oldpassword), old_pwd: window.config.encrypt?sha1(this.ruleForm.password):this.baseencode(this.ruleForm.password),
new_pwd: this.baseencode(this.ruleForm.newpassword) new_pwd: window.config.encrypt?sha1(this.ruleForm.newpassword):this.baseencode(this.ruleForm.newpassword),
}; };
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
let user_unid = sessionStorage.getItem("user_unid"); let user_unid = sessionStorage.getItem("user_unid");
this.$api.ops.resetPwd(data, user_unid).then(res => { this.$api.ops.resetPwd(data, user_unid).then(res => {
this.$router.push("/login"); this.$logs.oplogs(res, "serv_login", `修改密码`);
this.$router.push("/login");
}).catch(err => { }).catch(err => {
if (err.response) { if (err.response) {
this.$message({ this.$message({
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
addAlgo(){ addAlgo(){
this.progress_status = true this.progress_status = true
var formData = new FormData(); var formData = new FormData();
formData.append('list[0].file', document.getElementById('algo_file').files[0]); formData.append('list[0].file', "document.getElementById('algo_file').files[0]");
formData.append('list[0].file_type', this.algoType); formData.append('list[0].file_type', this.algoType);
let formConf = { let formConf = {
headers: { headers: {
......
...@@ -75,7 +75,9 @@ export default { ...@@ -75,7 +75,9 @@ export default {
this.getCustomCode(); this.getCustomCode();
this.getEventList(); this.getEventList();
this.getDev(); this.getDev();
this.getMenu(res.user_unid); setTimeout(() => {
this.getMenu(res.user_unid);
}, 10);
}, },
getMenu(id) { getMenu(id) {
//获取菜单 //获取菜单
......
...@@ -178,6 +178,7 @@ ...@@ -178,6 +178,7 @@
</div> </div>
</template> </template>
<script> <script>
let sha1 = require('js-sha1')
export default { export default {
data() { data() {
var checkRole = (rule, value, callback) => { var checkRole = (rule, value, callback) => {
...@@ -202,6 +203,7 @@ export default { ...@@ -202,6 +203,7 @@ export default {
} else { } else {
callback(); callback();
} }
callback();
}; };
var validatePass2 = (rule, value, callback) => { var validatePass2 = (rule, value, callback) => {
if (value === "") { if (value === "") {
...@@ -369,7 +371,9 @@ export default { ...@@ -369,7 +371,9 @@ export default {
this.editVisible = true; this.editVisible = true;
}, },
openAddDialog() { openAddDialog() {
this.$refs["addForm"].resetFields(); if(this.$refs["addForm"]){
this.$refs["addForm"].resetFields();
}
}, },
addUser() { addUser() {
this.addVisible = true; this.addVisible = true;
...@@ -381,10 +385,10 @@ export default { ...@@ -381,10 +385,10 @@ export default {
.addUser({ .addUser({
norm_type: this.addForm.norm_type, norm_type: this.addForm.norm_type,
username: this.addForm.username, username: this.addForm.username,
password: this.baseencode(this.addForm.password) password: window.config.encrypt?sha1(this.addForm.password):this.baseencode(this.addForm.password),
}) })
.then(res => { .then(res => {
if (!res.ecode) { if (res.ecode == "200" || !res.ecode) {
this.$api.ops this.$api.ops
.bindRole( .bindRole(
{ {
...@@ -409,9 +413,10 @@ export default { ...@@ -409,9 +413,10 @@ export default {
} }
}); });
} else { } else {
debugger
this.$message({ this.$message({
type: "error", type: "error",
message: "添加失败!" message: res.enote
}); });
} }
}); });
......
...@@ -16,6 +16,7 @@ export default { ...@@ -16,6 +16,7 @@ export default {
show: true, show: true,
videostatus: false, videostatus: false,
furllstatus: false, furllstatus: false,
cururl:"",
player: "", player: "",
}; };
}, },
...@@ -39,31 +40,77 @@ export default { ...@@ -39,31 +40,77 @@ export default {
// this.flv_destroy(); // this.flv_destroy();
// } // }
// } // }
debugger
if(this.player) {
this.destoryVideo(this.player);
}
this.cururl = url;
this.player = flvjs.createPlayer({ this.player = flvjs.createPlayer({
type: "flv", type: "flv",
isLive: true, isLive: true,
hasAudio: false, hasAudio: false,
url: url, url: url,
},{
enableWorker: false, //不启用分离线程
enableStashBuffer: false, //关闭IO隐藏缓冲区
reuseRedirectedURL: true, //重用301/302重定向url,用于随后的请求,如查找、重新连接等。
autoCleanupSourceBuffer: true //自动清除缓存
}); });
this.player.attachMediaElement(playerel); this.player.attachMediaElement(playerel);
this.player.load(); this.player.load();
this.player.play(); this.player.play();
this.player.on(flvjs.Events.ERROR, (errType, errDetail) => {
// alert("网络波动,正在尝试连接中...");
console.log("==============",errType)
debugger
if (this.player) {
this.reloadVideo(this.player);
}
// errType是 NetworkError时,对应errDetail有:Exception、HttpStatusCodeInvalid、ConnectingTimeout、EarlyEof、UnrecoverableEarlyEof
// errType是 MediaError时,对应errDetail是MediaMSEError 或MEDIA_SOURCE_ENDED
});
this.player.on("statistics_info", (res)=> {
if (this.lastDecodedFrame == 0) {
this.lastDecodedFrame = res.decodedFrames;
return;
}
if (this.lastDecodedFrame != res.decodedFrames) {
this.lastDecodedFrame = res.decodedFrames;
} else {
this.lastDecodedFrame = 0;
if (this.player) {
this.reloadVideo(this.player)
}
}
});
//2000毫秒执行一次
}, },
flv_start() { flv_start() {
this.player.play(); this.player.play();
}, },
flv_pause() { reloadVideo(flvPlayer) {
this.player.pause(); this.destoryVideo(flvPlayer);
this.startFunc(this.cururl);
},
destoryVideo(flvPlayer) {
flvPlayer.pause();
flvPlayer.unload();
flvPlayer.detachMediaElement();
flvPlayer.destroy();
flvPlayer = null;
}, },
flv_destroy() { flv_pause() {
this.player.pause(); this.player.pause();
this.player.unload();
this.player.detachMediaElement();
this.player.destroy();
this.player = null;
}, },
}, },
mounted() {}, mounted() {},
destroyed(){
if(this.player) {
this.destoryVideo(this.player)
}
}
}; };
</script> </script>
<style lang="stylus"> <style lang="stylus">
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
<li :title="getCode('安防事件', curPicData.event_type)"> <li :title="getCode('安防事件', curPicData.event_type)">
<span>事件类型:</span> <span>事件类型:</span>
<span>{{ <span>{{
getCode("安防事件", String(curPicData.event_type)) curPicData.event_type
}}</span> }}</span>
</li> </li>
<li <li
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</span> </span>
</div> </div>
<div style="color;#ccc;font-size:12px;margin-top:10px" v-show="showdirection">方向:1进入区域,2出去区域,3双向警告</div> <div style="color;#ccc;font-size:12px;margin-top:10px" v-show="showdirection">方向:1进入区域,2出去区域,3双向警告</div>
<div style="color;#ccc;font-size:12px;margin-top:10px" v-show="showligang">人数区间 1--10人</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -132,6 +132,7 @@ export default { ...@@ -132,6 +132,7 @@ export default {
color: "#E34F51", //画笔颜色 color: "#E34F51", //画笔颜色
//polygon 相关参数 //polygon 相关参数
polygonMode: false, polygonMode: false,
showligang:true,
pointArray: [], pointArray: [],
lineArray: [], lineArray: [],
activeShape: false, activeShape: false,
...@@ -142,6 +143,7 @@ export default { ...@@ -142,6 +143,7 @@ export default {
imgSrc: "", imgSrc: "",
polygonpoint:[], polygonpoint:[],
canvas: null, canvas: null,
xmldata:null,
curklass:null, //活动对象 curklass:null, //活动对象
}; };
}, },
...@@ -224,13 +226,15 @@ export default { ...@@ -224,13 +226,15 @@ export default {
mouseTo.y = points[1].y * 500; mouseTo.y = points[1].y * 500;
}, },
clearcanvas(){ clearcanvas(){
this.canvas.clear(); for(let i = 0; i < this.klassarr.length; i++) {
this.setAreaconfig(); if(this.klassarr[i].key == this.citem.config["算法ID"]) {
this.klassarr.map((ele, i) => { this.klassarr.splice(i, 1);
if (ele.key === this.citem.config["算法ID"]) { i--
this.klassarr.splice(i, 1);
} }
}); }
console.log(this.klassarr);
this.canvas.clear();
}, },
intPolygon(points) { intPolygon(points) {
mouseFrom.x = points[0].x * 700; mouseFrom.x = points[0].x * 700;
...@@ -252,11 +256,11 @@ export default { ...@@ -252,11 +256,11 @@ export default {
if (!this.canvas) { if (!this.canvas) {
this.Initfab(); this.Initfab();
} }
this.xmldata = data;
if (data.xml !== undefined && data.xml.indexOf('undefined')< 0) { if (data.xml !== undefined && data.xml.indexOf('undefined')< 0) {
this.basconfig = Object.assign( let base = this.oParse.parseXML(xml);
this.oParse.parseXML(xml), this.mapobj('root',base)
this.oParse.parseXML(data.xml) this.basconfig = base
);
} else { } else {
this.basconfig = this.oParse.parseXML(xml); this.basconfig = this.oParse.parseXML(xml);
} }
...@@ -273,6 +277,25 @@ export default { ...@@ -273,6 +277,25 @@ export default {
}, 1500); }, 1500);
} catch (error) {} } catch (error) {}
}, },
//深度遍历对象
mapobj(parents,obj){
for(var i in obj) {
if(typeof(obj[i]) =="object") {
let p = "";
if(i == 'root'){
p = "['"+i+"']"
} else{
p = parents+ "['"+i+"']"
}
this.mapobj(p,obj[i])
} else {
let p = parents + "['"+i+"']"
var base = this.oParse.parseXML(xml);
var config = this.oParse.parseXML( this.xmldata.xml);
eval('obj[i]'+'='+'config' + p )
}
}
},
getObjects(klass) { getObjects(klass) {
//获取所有的列表对象 //获取所有的列表对象
var group = this.canvas.getObjects(); var group = this.canvas.getObjects();
...@@ -297,9 +320,6 @@ export default { ...@@ -297,9 +320,6 @@ export default {
* tab切换保存之前绘制的数据 * tab切换保存之前绘制的数据
*/ */
changetype(data, index) { changetype(data, index) {
var group = this.canvas.getObjects();
var confdata = this.basconfig[this.cindex];
confdata.roi = group;
this.canvas.clear(); this.canvas.clear();
}, },
/** /**
...@@ -362,6 +382,7 @@ export default { ...@@ -362,6 +382,7 @@ export default {
} }
}); });
this.showdirection = item.config.算法ID === 'RegionalInvasion'?true:false; this.showdirection = item.config.算法ID === 'RegionalInvasion'?true:false;
this.showligang =item.config.算法ID === 'AbsentDetection'?true:false;
this.setAreaconfig(); this.setAreaconfig();
}, },
/** /**
...@@ -826,7 +847,7 @@ export default { ...@@ -826,7 +847,7 @@ export default {
confdata.roi = group; confdata.roi = group;
cvunselect = false; cvunselect = false;
// vthis.klassarr.push(this.canvasObject); // vthis.klassarr.push(this.canvasObject);
vthis.klassarr.push(vthis.canvasObject) // vthis.klassarr.push(vthis.canvasObject)
}); });
this.canvasObject.id = vthis.uuid(); this.canvasObject.id = vthis.uuid();
...@@ -913,11 +934,19 @@ export default { ...@@ -913,11 +934,19 @@ export default {
} }
} }
}); });
var vthis = this;
this.canvas.on("mouse:up", function(options) { this.canvas.on("mouse:up", function(options) {
var xy = transformMouse(options.e.offsetX, options.e.offsetY); var xy = transformMouse(options.e.offsetX, options.e.offsetY);
mouseTo.x = xy.x; mouseTo.x = xy.x;
mouseTo.y = xy.y; mouseTo.y = xy.y;
console.log(vthis.canvasObject)
if(vthis.canvasObject != null) {
vthis.klassarr.push( vthis.canvasObject);
}
vthis.canvasObject = null;
let unique = [...new Set(vthis.klassarr)]
vthis.klassarr = unique
console.log(vthis.klassarr)
drawingObject = null; drawingObject = null;
moveCount = 1; moveCount = 1;
doDrawing = false; doDrawing = false;
......
...@@ -788,6 +788,7 @@ export default { ...@@ -788,6 +788,7 @@ export default {
}, },
//切换配置项 //切换配置项
changeLayer: function(index) { changeLayer: function(index) {
debugger
this.cindex = index; this.cindex = index;
if (this.needRect || this.needLine) { if (this.needRect || this.needLine) {
let shape = this.needRect ? "区域" : "线段"; let shape = this.needRect ? "区域" : "线段";
...@@ -1427,12 +1428,14 @@ export default { ...@@ -1427,12 +1428,14 @@ export default {
if (!this.selectedShape) { if (!this.selectedShape) {
return; return;
} }
debugger
switch (this.drawState) { switch (this.drawState) {
case 1: case 1:
if ( if (
this.selectedShape.line_type != 0 && this.selectedShape.line_type != 0 &&
this.selectedShape.line_type != 1 && this.selectedShape.line_type != 1 &&
this.selectedShape.line_type != 7 this.selectedShape.line_type != 7 &&
this.selectedShape.line_type != 9
) { ) {
let index = this.blueLines.indexOf(this.selectedShape); let index = this.blueLines.indexOf(this.selectedShape);
this.blueLines.splice(index, 1); this.blueLines.splice(index, 1);
...@@ -2423,7 +2426,7 @@ button { ...@@ -2423,7 +2426,7 @@ button {
position: relative; position: relative;
float: right; float: right;
min-height: 450px; min-height: 450px;
width: 22%; width: 28%;
color: #fff; color: #fff;
} }
.modal-editbox .modal-lb { .modal-editbox .modal-lb {
......
export const xml = `<?xml version="1.0" encoding="GBK"?><root><算法功能><行为分析_BG><人员脱岗><算法ID>AbsentDetection</算法ID><告警门限值>60</告警门限值><告警间隔>5</告警间隔></人员脱岗><人员入侵><算法ID>RegionalInvasion</算法ID><方向>1</方向></人员入侵><物品遗留><算法ID>GoodsMovedDeteion</算法ID><灵敏度>60</灵敏度><上报频率>3</上报频率><背景刷新时间>5</背景刷新时间></物品遗留><越线><算法ID>CrossLineDetection</算法ID></越线></行为分析_BG></算法功能></root>`
\ No newline at end of file \ No newline at end of file
export const xml = `<?xml version="1.0" encoding="GBK"?><root><算法功能><行为分析_BG><人员脱岗><算法ID>AbsentDetection</算法ID><告警门限值>60</告警门限值><告警间隔>5</告警间隔><值岗人数>1</值岗人数></人员脱岗><人员入侵><算法ID>RegionalInvasion</算法ID><方向>1</方向></人员入侵><物品遗留><算法ID>GoodsMovedDetetion</算法ID><灵敏度>60</灵敏度><上报频率>3</上报频率><背景刷新时间>5</背景刷新时间></物品遗留><越线><算法ID>CrossLineDetection</算法ID></越线></行为分析_BG></算法功能></root>`
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<div> <div>
<el-table <el-table
:data="taskInfo.mtasks[0].scenes" :data="taskInfo.mtasks[0].scenes"
stripe
highlight-current-row highlight-current-row
style="width: 80%;float:left" style="width: 80%;float:left"
height="25vh" height="25vh"
...@@ -65,6 +64,22 @@ ...@@ -65,6 +64,22 @@
<span @click="setDemarcate(scope.row, scope.$index)">标定设置</span> <span @click="setDemarcate(scope.row, scope.$index)">标定设置</span>
</el-tooltip> </el-tooltip>
<!-- <span @click="setTimer(scope.row, scope.$index)">时间设置</span> --> <!-- <span @click="setTimer(scope.row, scope.$index)">时间设置</span> -->
<el-tooltip
class="item"
effect="dark"
content="删除场景"
placement="top"
>
<span v-if="scope.$index!=taskInfo.mtasks[0].scenes.length - 1" @click="delsounces(scope.row, scope.$index)" class="el-icon-remove"></span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
content="增加场景"
placement="top"
>
<span @click="addsounces()" class="el-icon-circle-plus"></span>
</el-tooltip>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -93,6 +108,7 @@ ...@@ -93,6 +108,7 @@
效果展示 效果展示
<span class="set-icon el-icon-s-help"></span> <span class="set-icon el-icon-s-help"></span>
</div> </div>
</div> </div>
<handleparam ref="handleparam" :subtaskid="subtaskid"></handleparam> <handleparam ref="handleparam" :subtaskid="subtaskid"></handleparam>
</div> </div>
...@@ -188,6 +204,21 @@ export default { ...@@ -188,6 +204,21 @@ export default {
this.getSipSetting(); this.getSipSetting();
} }
}, },
//增加场景
addsounces(){
let scensinit = JSON.parse(JSON.stringify(this.taskInfo.mtasks[0].scenes[0]));
scensinit.config = {}
scensinit.rois = "";
scensinit.runtime = -1
scensinit.scene_unid = this.uuid()
scensinit.position_name = 1
scensinit.position_num = -1
this.taskInfo.mtasks[0].scenes.push(scensinit)
},
//删除场景
delsounces(row,index){
this.taskInfo.mtasks[0].scenes.splice(index,1)
},
getSipSetting: function() { getSipSetting: function() {
if (this.dev_unid) { if (this.dev_unid) {
this.$api.device.sipSet(this.dev_unid, this.user_unid).then(res => { this.$api.device.sipSet(this.dev_unid, this.user_unid).then(res => {
...@@ -270,14 +301,14 @@ export default { ...@@ -270,14 +301,14 @@ export default {
this.$store.commit("setocxstate", 1); this.$store.commit("setocxstate", 1);
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
if (val.algo_type == 3) { // if (val.algo_type == 3) {
this.currentRow = val; this.currentRow = val;
this.$api.task this.$api.task
.switchScene(this.taskid, this.subtaskid, val.scene_unid) .switchScene(this.taskid, this.subtaskid, val.scene_unid)
.then(res => { .then(res => {
console.log(res); console.log(res);
}); });
} // }
}, },
suspends() { suspends() {
if (this.subtaskid) { if (this.subtaskid) {
......
...@@ -160,7 +160,8 @@ ...@@ -160,7 +160,8 @@
<el-table-column prop="shoot_date" align="center" label="抓拍时间"> <el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.event_data" <span v-if="scope.row.event_data"
>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span
>{{showLocalTime(scope.row.event_dt)}}</span
> >
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -337,6 +337,7 @@ ...@@ -337,6 +337,7 @@
<div class="detaiCon"> <div class="detaiCon">
<el-image <el-image
style="width: 100%;" style="width: 100%;"
z-index="100"
:src="this.detailImg" :src="this.detailImg"
:preview-src-list="srcList" :preview-src-list="srcList"
> >
...@@ -723,5 +724,13 @@ export default { ...@@ -723,5 +724,13 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.imgaddbtn{
position: absolute;
z-index: 2000;
height: 200px;
width: 200px;
top:0;
left: 0;
background: red;
}
</style> </style>
...@@ -46,15 +46,15 @@ module.exports = { ...@@ -46,15 +46,15 @@ module.exports = {
// 第三方插件配置 // 第三方插件配置
}, },
devServer: { devServer: {
proxy: { // proxy: {
"/api/dashboards": { // "/api/dashboards": {
target: "http://192.168.9.133:5000", // 要访问的接口域名 // target: "http://192.168.9.133:5000", // 要访问的接口域名
// ws: true, // 是否启用websockets // // ws: true, // 是否启用websockets
changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题 // changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
pathRewrite: { // pathRewrite: {
"^/api": "" //这里理解成用'/api'代替target里面的地址,比如我要调用'http://40.00.100.100:3002/user/add',直接写'/api/user/add'即可 // "^/api": "" //这里理解成用'/api'代替target里面的地址,比如我要调用'http://40.00.100.100:3002/user/add',直接写'/api/user/add'即可
} // }
} // }
} // }
} }
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!