Commit 6206b0d1 by 夏新然

3

2 parents 5a8e008a 614844c3
No preview for this file type
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
<style lang="scss"> <style lang="scss">
#app { #app {
height: 100%; height: 100%;
font-family: MicrosoftYaHeiUI; font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
......
...@@ -3,8 +3,9 @@ import axios from "axios"; ...@@ -3,8 +3,9 @@ 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';
break; break;
case "pre": case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
......
...@@ -69,5 +69,8 @@ export default { ...@@ -69,5 +69,8 @@ export default {
}, },
getRebootSetting(params,id,id2){ getRebootSetting(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/auto`, params) return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/auto`, params)
},
downloadOcx(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/dlfile`, params)
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -39,5 +39,17 @@ export default { ...@@ -39,5 +39,17 @@ export default {
getDevList(devid) { getDevList(devid) {
// 获取设备信息 // 获取设备信息
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?typea=1&s=1578967233185&limit=1000000`);
} },
addShowUrl(params) {
//添加展示
return api.post(`${baseUrl}/api/v1/datahandle/vchan/conf`, params);
},
editShowUrl(params, unid) {
//添加展示
return api.post(`${baseUrl}/api/v1/datahandle/vchan/conf/${unid}`, params);
},
getShowUrl(params) {
//修改展示
return api.get(`${baseUrl}/api/v1/datahandle/vchan/conf`, params);
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -27,8 +27,8 @@ export default { ...@@ -27,8 +27,8 @@ export default {
getSubTask(taskid) { getSubTask(taskid) {
return api.get(urls.getSubTask(taskid)); return api.get(urls.getSubTask(taskid));
}, },
getStream(devid, vrefid) { getStream(devid, vrefid, params) {
return api.get(urls.getstream(devid, vrefid)); return api.post(urls.getstream(devid, vrefid), params);
}, },
getPlayUrl(subid) { getPlayUrl(subid) {
return api.get(urls.getPlayUrl(subid)); // 获取播放地址 return api.get(urls.getPlayUrl(subid)); // 获取播放地址
...@@ -47,5 +47,14 @@ export default { ...@@ -47,5 +47,14 @@ export default {
}, },
setTaskStatus(taskid, params) { setTaskStatus(taskid, params) {
return api.post(urls.changeTask(taskid), params); return api.post(urls.changeTask(taskid), params);
},
moveTask(taskid, params) {
return api.post(urls.movetask(taskid), params);
},
switchScene(taskid, subtaskid, scene_unid) {
return api.get(urls.switchScene(taskid, subtaskid, scene_unid));
},
suspendAlternate(taskid, subtaskid, suspend) {
return api.get(urls.suspendAlternate(taskid, subtaskid, suspend));
} }
}; };
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
return `${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtask`; return `${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtask`;
}, },
getstream: (devid, vrefid) => { getstream: (devid, vrefid) => {
return `${baseUrl}/api/v1/stream/devs/${devid}/vchans/${vrefid}/live/is_sending?s=${gitTimer()}`; return `${baseUrl}/api/v1/devconf_fx/devs/${devid}/vchans/${vrefid}/live`;
}, },
getPlayUrl: subid => { getPlayUrl: subid => {
return `${baseUrl}/api/v1/devconf_fx/analyse/live/play_url?subtask_id=${subid}`; // 获取播放地址 return `${baseUrl}/api/v1/devconf_fx/analyse/live/play_url?subtask_id=${subid}`; // 获取播放地址
...@@ -42,5 +42,14 @@ export default { ...@@ -42,5 +42,14 @@ export default {
}, },
changeTask: taskid => { changeTask: taskid => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/start_or_stop?s=${gitTimer()}`; // 切换任务 return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/start_or_stop?s=${gitTimer()}`; // 切换任务
},
movetask: taskid => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/mount`; // 迁移任务
},
switchScene: (taskid, subtaskid, scene_unid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/${subtaskid}/switch_scene?scene_unid=${scene_unid}`; // 切换预置位
},
suspendAlternate: (taskid, subtaskid, suspend) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/${subtaskid}/suspend_alternate_task?suspend=${suspend}`; // 开启关闭轮询
} }
}; };
html,body{ html,body{
height: 100%; height: 100%;
} }
*{ *{
padding: 0; padding: 0;
...@@ -267,3 +268,23 @@ body{ ...@@ -267,3 +268,23 @@ body{
-moz-transition: all .25s ease; -moz-transition: all .25s ease;
transition: all .25s ease; transition: all .25s ease;
} }
.statusbox {
display: inline-block;
width: 60px;
border-radius: 2px;
background:rgba(204,204,204,1);
color: #fff;
font-size: 14px;
}
.runningbox {
background: #36BEA6;
}
.finishedbox{
background:rgba(255,198,46,1);
}
.pausebox{
background:rgba(232,84,30,1);
}
.errorbox{
}
\ No newline at end of file \ No newline at end of file
...@@ -33,3 +33,7 @@ new Vue({ ...@@ -33,3 +33,7 @@ new Vue({
store, store,
render: h => h(App) render: h => h(App)
}).$mount("#app"); }).$mount("#app");
//用户退出时清除相关信息
// window.onunload = function() {
// localStorage.clear();
// };
...@@ -127,131 +127,159 @@ export default { ...@@ -127,131 +127,159 @@ export default {
this.getDev(); this.getDev();
this.getMenu(res.user_unid); this.getMenu(res.user_unid);
} }
}).catch((err) => {
}) })
.catch(err => {});
}, },
getMenu(id){ getMenu(id) {
//获取菜单 //获取菜单
this.$api.login.getMenus({ this.$api.login
"shape":"tree" .getMenus({
}).then(res=>{ shape: "tree"
localStorage.setItem('menu', JSON.stringify(res.menu_tree[0].children))
this.$store.dispatch('GetMenuRole',res.menu_tree[0].children).then(res => {
this.$router.push('/trficcshow')
})
}) })
.then(res => {
localStorage.setItem(
"menu",
JSON.stringify(res.menu_tree[0].children)
);
this.$store
.dispatch("GetMenuRole", res.menu_tree[0].children)
.then(res => {
this.$router.push("/trficcshow");
});
});
}, },
algoList() { algoList() {
this.$api.login.algocombs({ this.$api.login
limit: '', .algocombs({
algo_set: 'video' limit: "",
}).then(res => { algo_set: "video"
if(!res.ecode){ })
this.$store.commit(types.ALGO,res.list_data); .then(res => {
if (!res.ecode) {
this.$store.commit(types.ALGO, res.list_data);
} }
}).catch((err) => {
}) })
.catch(err => {});
}, },
storeConfList(){ storeConfList() {
this.$api.login.storeconfs({ this.$api.login
.storeconfs({
offset: 0, offset: 0,
limit: '' limit: ""
}).then(res => { })
if(!res.ecode){ .then(res => {
this.$store.commit(types.STORECONF,res.list_data); if (!res.ecode) {
this.$store.commit(types.STORECONF, res.list_data);
} }
}).catch((err) => {
}) })
.catch(err => {});
}, },
getCodeList(){ getCodeList() {
this.$api.codes.cates().then(res => { this.$api.codes
res.list_data.forEach(item=>{ .cates()
this.$api.codes.codes({ .then(res => {
},item.cate_unid).then(res => { res.list_data.forEach(item => {
this.$api.codes
.codes({active:true}, item.cate_unid)
.then(res => {
// 存储code列表 // 存储code列表
window.localStorage.setItem(item.name,JSON.stringify(res.list_data)) window.localStorage.setItem(
item.name,
JSON.stringify(res.list_data)
);
// 存储单独code // 存储单独code
res.list_data.forEach(chilItem=>{ res.list_data.forEach(chilItem => {
window.localStorage.setItem(item.name+'-'+chilItem.code,chilItem.name) window.localStorage.setItem(
}) item.name + "-" + chilItem.code,
}).catch((err) => { chilItem.name
}) );
});
}) })
}).catch((err) => { .catch(err => {});
});
}) })
.catch(err => {});
}, },
getCustomCode(){ getCustomCode() {
this.$api.codes.customCode().then(res => { this.$api.codes
if(res.list_data.length > 0) { .customCode()
res.list_data.forEach((item) => { .then(res => {
window.localStorage.setItem(item.name + '-' + item.cate, item.unid); if (res.list_data.length > 0) {
}) res.list_data.forEach(item => {
window.localStorage.setItem(
item.name + "-" + item.cate,
item.unid
);
});
} else { } else {
this.$message({ this.$message({
type: 'warning', type: "warning",
message: '获取自定义编码失败!' message: "获取自定义编码失败!"
}) });
} }
}).catch((err) => {
}) })
.catch(err => {});
}, },
getCatesList(){ getCatesList() {
this.$api.codes.eventCates({}).then(res=>{ this.$api.codes.eventCates({}).then(res => {
// 存储cate列表 // 存储cate列表
window.localStorage.setItem('cate列表',JSON.stringify(res.list_data)) window.localStorage.setItem("cate列表", JSON.stringify(res.list_data));
// 存储单独code // 存储单独code
res.list_data.forEach(item=>{ res.list_data.forEach(item => {
this.getOneEventList(item.code,item.event_cate_unid) this.getOneEventList(item.code, item.event_cate_unid);
}) });
}) });
}, },
getOneEventList(code,id){ getOneEventList(code, id) {
this.$api.codes.eventType({},id).then(res=>{ this.$api.codes.eventType({}, id).then(res => {
// 存储cate列表 // 存储cate列表
window.localStorage.setItem(code,JSON.stringify(res.list_data)) window.localStorage.setItem(code, JSON.stringify(res.list_data));
}) });
}, },
getEventList(){ getEventList() {
this.$api.search.eventTypes({}).then(res=>{ this.$api.search.eventTypes({active:true}).then(res => {
// 存储code列表 // 存储code列表
window.localStorage.setItem('安防事件',JSON.stringify(res.list_data)) window.localStorage.setItem("安防事件", JSON.stringify(res.list_data));
// 存储单独code // 存储单独code
res.list_data.forEach(item=>{ res.list_data.forEach(item => {
window.localStorage.setItem('安防事件-'+item.code,item.name) window.localStorage.setItem("安防事件-" + item.code, item.name);
}) });
}) });
}, },
getDev() { getDev() {
this.$api.resource.devs().then(res => { this.$api.resource.devs().then(res => {
localStorage.setItem('dev_unid',res[0].dev_unid); localStorage.setItem("dev_unid", res[0].dev_unid);
this.getDevsName(res[0].dev_unid); this.getDevsName(res[0].dev_unid);
}) });
}, },
getDevsName(id){ getDevsName(id) {
this.$api.resource.getDevsName({ this.$api.resource
.getDevsName(
{
is_leaf: 0 is_leaf: 0
},id).then(res=>{
if(res.list_data.length>0){
sessionStorage.setItem('device_id',res.list_data[0].device_id);
}
})
}, },
id
)
.then(res => {
if (res.list_data.length > 0) {
sessionStorage.setItem("device_id", res.list_data[0].device_id);
}
});
}
}, },
watch: {}, watch: {},
mounted() { mounted() {},
},
created() { created() {
this.initHeight(); this.initHeight();
let _this=this; let _this = this;
document.onkeydown = function(e){ document.onkeydown = function(e) {
let _key = window.event.keyCode; let _key = window.event.keyCode;
if(_key === 13){ if (_key === 13) {
_this.submitForm('ruleForm'); _this.submitForm("ruleForm");
}
}
} }
};
} }
};
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
......
<template> <template>
<div class="devinfo-box"> <div class="devinfo-box">
<div class="item-box"> <div class="item-box">
<div class="icon el-icon-cpu"></div> <div class="icon icon-fanxing-fenxiziyuan"></div>
<div class="item-info-box"> <div class="item-info-box">
<div>分析资源</div> <div>分析资源</div>
<div><span>64</span></div> <div><span>64</span></div>
</div> </div>
</div> </div>
<div class="item-box"> <div class="item-box">
<div class="icon el-icon-view"></div> <div class="icon icon-fanxing-yunhanglushu"></div>
<div class="item-info-box"> <div class="item-info-box">
<div>运行路数</div> <div>运行路数</div>
<div> <span>47</span></div> <div> <span>47</span></div>
</div> </div>
</div> </div>
<div class="item-box"> <div class="item-box">
<div class="icon el-icon-bell"></div> <div class="icon icon-fanxing-yunhangyichang"></div>
<div class="item-info-box"> <div class="item-info-box">
<div>运行异常</div> <div>运行异常</div>
<div><span>6</span></div> <div><span>6</span></div>
</div> </div>
</div> </div>
<div class="item-box"> <div class="item-box">
<div class="icon el-icon-s-order"></div> <div class="icon icon-fanxing-xinxicunchu"></div>
<div class="item-info-box"> <div class="item-info-box">
<div>信息存储量</div> <div>信息存储量</div>
<div><span>1.2</span> T</div> <div><span>1.2</span> T</div>
...@@ -45,6 +45,9 @@ export default { ...@@ -45,6 +45,9 @@ export default {
height: 28vh; height: 28vh;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.19); box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.19);
background:rgba(255,255,255,1);
box-shadow:0px 5px 8px 0px rgba(0,0,0,0.2),0px 0px 4px 0px rgba(0,0,0,0.19);
border-radius:6px;
overflow hidden overflow hidden
.item-box{ .item-box{
margin-top 2vh margin-top 2vh
......
...@@ -22,30 +22,97 @@ ...@@ -22,30 +22,97 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
activeName: 'first', activeName: "first",
height:'', height: "",
formLabelAlign:{ vchan_conf_unid: "",
video1:"", formLabelAlign: {
video2:"", video1: "",
video3:"", video2: "",
video4:"", video3: "",
} video4: ""
} }
};
}, },
mounted(){ mounted() {},
methods: {
handleClick(tab, event) {},
getshow() {
this.$api.show.getShowUrl().then(res => {
if (res.length > 0 && res[0].conf.length > 0) {
this.formLabelAlign = {
video1: res[0].conf[0].url,
video2: res[0].conf[1].url,
video3: res[0].conf[2].url,
video4: res[0].conf[3].url
};
this.vchan_conf_unid = res[0].vchan_conf_unid;
}
});
}, },
methods:{ onSubmit() {
handleClick(tab, event) { let data = {
conf: [
{
name: "1",
url: this.formLabelAlign.video1,
isActive: true
}, },
onSubmit(){ {
name: "1",
url: this.formLabelAlign.video2,
isActive: true
},
{
name: "1",
url: this.formLabelAlign.video3,
isActive: true
},
{
name: "1",
url: this.formLabelAlign.video4,
isActive: true
}
]
};
if (this.vchan_conf_unid) {
this.$api.show.editShowUrl(data, this.vchan_conf_unid).then(res => {
console.log(res);
if (res.ecode == 200) {
this.$message({
type: "success",
message: "设置成功!"
});
} else {
this.$message({
type: "error",
message: "设置失败!"
});
}
});
} else {
this.$api.show.addShowUrl(data).then(res => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: "设置成功!"
});
} else {
this.$message({
type: "error",
message: "设置失败!"
});
}
});
}
} }
}, },
created() {
this.getshow();
} }
};
</script> </script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<style lang="scss" scoped></style>
<template> <template>
<div class="contentBox minHeight"> <div class="contentBox minHeight">
<div :style="{'background': '#FFFFFF','min-height': height}"> <div :style="{ background: '#FFFFFF', 'min-height': height }">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="校时设置" name="first"> <el-tab-pane label="校时设置" name="first">
<proofreadtime></proofreadtime> <proofreadtime></proofreadtime>
...@@ -13,32 +13,32 @@ ...@@ -13,32 +13,32 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import proofreadtime from './systemComponents/proofreadtime' import proofreadtime from "./systemComponents/proofreadtime";
import sytemset from './systemComponents/sytemSet' import sytemset from "./systemComponents/sytemSet";
import showset from './systemComponents/showSet' import showset from "./systemComponents/showSet";
export default { export default {
data(){ data() {
return{ return {
activeName: 'first', activeName: "first",
height:'' height: ""
} };
}, },
components:{ components: {
proofreadtime,sytemset,showset proofreadtime,
sytemset,
showset
}, },
mounted(){ mounted() {
this.height=document.body.clientHeight - 140 + 'px' this.height = document.body.clientHeight - 140 + "px";
}, },
methods:{ methods: {
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
} }
},
} }
};
</script> </script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<style lang="scss" scoped></style>
<template> <template>
<div class="ocx-box" id="ocx-box" v-show="isShow"> <div class="ocx-box" id="ocx-box" v-show="isShow">
<object id="VionVideo1" classid="clsid:93F960BB-5AF9-402B-A3DF-06112F14DC02" codebase="VionPlatformVideo.ocx" width="100%" <object
height="100%"> id="VionVideo1"
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,55 +15,66 @@ ...@@ -10,55 +15,66 @@
</div> </div>
</template> </template>
<script> <script>
import { import { mapState } from "vuex";
mapState export default {
} from 'vuex'
export default {
data() { data() {
return { return {
urlFlag:false, urlFlag: false,
isShow:true isShow: true
}; };
}, },
props: ['playurl', 'type'], props: ["playurl", "type"],
methods: { methods: {
videoPlay: function () { videoPlay: function() {
this.urlFlag = false this.urlFlag = false;
if (!this.playurl.sip_serv_ip) { if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url let url = this.playurl.rtsp_url;
let ocxPlayRes = document.getElementById('VionVideo1').StartPlay(url, 0); let ocxPlayRes = document
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes); .getElementById("VionVideo1")
.StartPlay(url, 0);
console.log("video Ocx播放rtsp流返回值:", ocxPlayRes);
if (ocxPlayRes != 0) { if (ocxPlayRes != 0) {
alert('播放失败!'); alert("播放失败!");
} }
} else { } else {
let OcxResponse = document.getElementById('VionVideo1').StartPlaySip(this.playurl.sip_serv_id, this.playurl.sip_serv_ip, let OcxResponse = document
this.playurl.sip_serv_port, this.playurl.sip_unid, this.playurl.sip_password, this.playurl.devId, 0) .getElementById("VionVideo1")
console.log('video Ocx播放sip流返回值:', OcxResponse); .StartPlaySip(
this.playurl.sip_serv_id,
this.playurl.sip_serv_ip,
this.playurl.sip_serv_port,
this.playurl.sip_unid,
this.playurl.sip_password,
this.playurl.devId,
0
);
console.log("video Ocx播放sip流返回值:", OcxResponse);
if (OcxResponse != 0 && OcxResponse != 200) { if (OcxResponse != 0 && OcxResponse != 200) {
alert('播放失败!'); alert("播放失败!");
} }
} }
}, },
downOcx: function () { downOcx: function() {
if (this.fileUrl !== '' && !this.installOcx) { if (this.fileUrl !== "" && !this.installOcx) {
location.href = this.fileUrl; location.href = this.fileUrl;
} }
}, },
installOcxInfo: function () { installOcxInfo: function() {
this.$confirm('为了正常使用,是否安装OCX控件?', '友情提示', { this.$confirm("为了正常使用,是否安装OCX控件?", "友情提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}).then(() => { })
.then(() => {
this.installOcx = false; this.installOcx = false;
this.downOcx(); this.downOcx();
}).catch(() => { })
.catch(() => {
this.installOcxInfo(); this.installOcxInfo();
}); });
}, },
initocx() { initocx() {
VionVideo1.Init(0, 'Null', 4); VionVideo1.Init(0, "Null", 4);
}, },
downloadOCx() { downloadOCx() {
// if (navigator.userAgent.indexOf('Trident') > -1) { // if (navigator.userAgent.indexOf('Trident') > -1) {
...@@ -76,7 +92,10 @@ ...@@ -76,7 +92,10 @@
}, },
checkIE() { checkIE() {
var agent = navigator.userAgent.toLowerCase(); var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) { if (
/(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
document.documentMode < 10
) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!"); this.$message.error("IE 版本过低请升级到IE10级以上版本!");
} }
} }
...@@ -85,7 +104,7 @@ ...@@ -85,7 +104,7 @@
// this.checkIE(); // this.checkIE();
}, },
computed: { computed: {
...mapState(['ocxstate']) ...mapState(["ocxstate"])
}, },
mounted() { mounted() {
// VionVideo1.Init(0, 'Null', 4); // VionVideo1.Init(0, 'Null', 4);
...@@ -99,26 +118,24 @@ ...@@ -99,26 +118,24 @@
watch: { watch: {
ocxstate(val) { ocxstate(val) {
try { try {
if(val == 0){ if (val == 0) {
this.isShow = false this.isShow = false;
document.getElementById("VionVideo1").StartPlay(1); document.getElementById("VionVideo1").StartPlay(1);
} else { } else {
this.isShow = true this.isShow = true;
document.getElementById("VionVideo1").StartPlay(0); document.getElementById("VionVideo1").StartPlay(0);
} }
} catch (error) { } catch (error) {
console.log(error) console.log(error);
}
} }
},
}, },
beforeDestroy: function () { beforeDestroy: function() {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) { // if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause(); // this.videoplayer.pause();
// } // }
} }
}; };
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
......
...@@ -25,7 +25,14 @@ ...@@ -25,7 +25,14 @@
export default { export default {
data() { data() {
return {}; return {
playlist:{
video1:'',
video2:'',
video3:'',
video4:'',
}
};
}, },
props: ["playersrc", "vnum"], props: ["playersrc", "vnum"],
methods: { methods: {
...@@ -46,6 +53,21 @@ export default { ...@@ -46,6 +53,21 @@ export default {
this.$message.error("视频控件加载失败请用IE10及以上版本打开!"); this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
} }
}, },
playurl() {
this.$api.show.getShowUrl().then(res => {
if (res.length > 0 && res[0].conf.length > 0) {
this.playlist = {
video1: res[0].conf[0].url,
video2: res[0].conf[1].url,
video3: res[0].conf[2].url,
video4: res[0].conf[3].url
};
res[0].conf.map(ele => {
nvrTotalOcx.PlayRealVideo(ele.url,1,'video','192.168.9.133',0);
})
}
});
},
checkIE() { checkIE() {
var agent = navigator.userAgent.toLowerCase(); var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) { if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) {
...@@ -56,28 +78,19 @@ export default { ...@@ -56,28 +78,19 @@ export default {
created() { created() {
this.checkIE(); this.checkIE();
}, },
computed(){
},
mounted() { mounted() {
var testStr = 'Null'; var testStr = 'Null';
setTimeout(()=> {
nvrTotalOcx.Init(2, testStr, 4); nvrTotalOcx.Init(2, testStr, 4);
nvrTotalOcx.SetSingleWindow(true); nvrTotalOcx.SetSingleWindow(true);
nvrTotalOcx.SetParam("SetLanguage", "Chinese"); nvrTotalOcx.SetParam("SetLanguage", "Chinese");
nvrTotalOcx.SetParam("VideoSize", 0); nvrTotalOcx.SetParam("VideoSize", 0);
this.playurl();
},3000)
var medianame = '视频0'; var medianame = '视频0';
var hostname = window.location.hostname;
var port,url;
port=8554;
url = "rtsp://192.168.9.133:8554//opt/data/vedio/1579253441478.264";
let a = ''
setTimeout(()=>{
a = nvrTotalOcx.PlayRealVideo(url,1,'video','192.168.9.133',0);
},500)
setTimeout(()=>{
a = nvrTotalOcx.PlayRealVideo(url,1,'video','192.168.9.133',0);
},1000)
console.log('shipin'+a)
}, },
watch: {}, watch: {},
beforeDestroy: function () { beforeDestroy: function () {
...@@ -93,5 +106,8 @@ export default { ...@@ -93,5 +106,8 @@ export default {
.ocx-box{ .ocx-box{
height 50vh height 50vh
width 35vw width 35vw
background:rgba(255,255,255,1);
box-shadow:0px 2px 18px 0px rgba(0,26,70,0.3);
border-radius:10px;
} }
</style> </style>
<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,73 +15,93 @@ ...@@ -10,73 +15,93 @@
</div> </div>
</template> </template>
<script> <script>
import { import { mapState } from "vuex";
mapState export default {
} from 'vuex'
export default {
data() { data() {
return { return {
urlFlag:false, urlFlag: false,
isShow:true isShow: true
}; };
}, },
props: ['playurl', 'type'], props: ["playurl", "type"],
methods: { methods: {
videoPlay: function () { videoPlay: function() {
this.urlFlag = false this.urlFlag = false;
if (!this.playurl.sip_serv_ip) { if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url let url = this.playurl.rtsp_url;
let ocxPlayRes = document.getElementById('VionVideo').StartPlay(url, 0); let myVideo = document.getElementById("VionVideo");
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes); try {
let isLoadingOcx = typeof myVideo.GetVersion() === "string" ? true : false;
if (isLoadingOcx) {
let ocxPlayRes = document.getElementById("VionVideo").StartPlay(url, 0);
console.log("video Ocx播放rtsp流返回值:", ocxPlayRes);
} else {
this.installOcxInfo();
}
if (ocxPlayRes != 0) { if (ocxPlayRes != 0) {
alert('播放失败!'); alert("播放失败!");
}
} catch (error) {
console.log(error);
} }
} else { } else {
let OcxResponse = document.getElementById('VionVideo').StartPlaySip(this.playurl.sip_serv_id, this.playurl.sip_serv_ip, let OcxResponse = document
this.playurl.sip_serv_port, this.playurl.sip_unid, this.playurl.sip_password, this.playurl.devId, 0) .getElementById("VionVideo")
console.log('video Ocx播放sip流返回值:', OcxResponse); .StartPlaySip(
this.playurl.sip_serv_id,
this.playurl.sip_serv_ip,
this.playurl.sip_serv_port,
this.playurl.sip_unid,
this.playurl.sip_password,
this.playurl.devId,
0
);
console.log("video Ocx播放sip流返回值:", OcxResponse);
if (OcxResponse != 0 && OcxResponse != 200) { if (OcxResponse != 0 && OcxResponse != 200) {
alert('播放失败!'); alert("播放失败!");
} }
} }
}, },
downOcx: function () { downOcx: function() {
if (this.fileUrl !== '' && !this.installOcx) { if (this.fileUrl !== "" && !this.installOcx) {
location.href = this.fileUrl; location.href = this.fileUrl;
} }
}, },
installOcxInfo: function () { installOcxInfo: function() {
this.$confirm('为了正常使用,是否安装OCX控件?', '友情提示', { this.$confirm("为了正常使用,是否安装OCX控件?", "友情提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}).then(() => { })
.then(() => {
this.installOcx = false; this.installOcx = false;
this.downOcx(); this.downloadOCx();
}).catch(() => { })
.catch(() => {
this.installOcxInfo(); this.installOcxInfo();
}); });
}, },
initocx() { initocx() {
VionVideo.Init(0, 'Null', 4); VionVideo.Init(0, "Null", 4);
}, },
downloadOCx() { downloadOCx() {
// if (navigator.userAgent.indexOf('Trident') > -1) { if (navigator.userAgent.indexOf("Trident") > -1) {
// this.axios.get(IP + "/api/v1/device/dlfile", { let params = {
// params: { file_type: "video_ocx"
// file_type: "video_ocx" };
// } this.$api.ops.downloadOcx(params).then(response => {
// }) location.href = response.data.file_url;
// .then(response => { });
// location.href = response.data.file_url; } else {
// }); this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// } else { }
// this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// }
}, },
checkIE() { checkIE() {
var agent = navigator.userAgent.toLowerCase(); var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) { if (
/(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
document.documentMode < 10
) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!"); this.$message.error("IE 版本过低请升级到IE10级以上版本!");
} }
} }
...@@ -85,40 +110,29 @@ ...@@ -85,40 +110,29 @@
// this.checkIE(); // this.checkIE();
}, },
computed: { computed: {
...mapState(['ocxstate']) ...mapState(["ocxstate"])
},
mounted() {
// VionVideo.Init(0, 'Null', 4);
// try {
// if (document.getElementById("VionVideo").GetVersion()) {
// }
// } catch (error) {
// this.downloadOCx();
// }
}, },
watch: { watch: {
ocxstate(val) { ocxstate(val) {
try { try {
if(val == 0){ if (val == 0) {
this.isShow = false this.isShow = false;
document.getElementById("VionVideo").StartPlay(1); document.getElementById("VionVideo").StartPlay(1);
} else { } else {
this.isShow = true this.isShow = true;
document.getElementById("VionVideo").StartPlay(0); document.getElementById("VionVideo").StartPlay(0);
} }
} catch (error) { } catch (error) {
console.log(error) console.log(error);
}
} }
},
}, },
beforeDestroy: function () { beforeDestroy: function() {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) { // if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause(); // this.videoplayer.pause();
// } // }
} }
}; };
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
......
...@@ -2,45 +2,60 @@ ...@@ -2,45 +2,60 @@
<div class="item"> <div class="item">
<div class="player"> <div class="player">
<div class="ocx-box"> <div class="ocx-box">
<object id="VionVideo" classid="clsid:96DFBBAF-4220-4978-9681-4ABA534A7718" <object
width="98%" height="550" style="margin-left:.9%"> id="VionVideo"
classid="clsid:96DFBBAF-4220-4978-9681-4ABA534A7718"
width="98%"
height="550"
style="margin-left:.9%"
>
</object> </object>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {mapState} from 'vuex' import { mapState } from "vuex";
export default { export default {
data() { data() {
return {}; return {};
}, },
props: ['playurl', 'type'], props: ["playurl", "type"],
methods: { methods: {
videoPlay: function () { videoPlay: function() {
this.urlFlag = false this.urlFlag = false;
if (!this.playurl.sip_serv_ip) { if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url let url = this.playurl.rtsp_url;
let ocxPlayRes = document.getElementById('VionVideo').StartPlay(url, 0); let ocxPlayRes = document.getElementById("VionVideo").StartPlay(url, 0);
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes); console.log("video Ocx播放rtsp流返回值:", ocxPlayRes);
if (ocxPlayRes != 0) { if (ocxPlayRes != 0) {
alert('播放失败!'); alert("播放失败!");
} }
} else { } else {
let OcxResponse = document.getElementById('VionVideo').StartPlaySip(this.playurl.sip_serv_id, this.playurl.sip_serv_ip, let OcxResponse = document
this.playurl.sip_serv_port, this.playurl.sip_unid, this.playurl.sip_password, this.playurl.devId, 0) .getElementById("VionVideo")
console.log('video Ocx播放sip流返回值:', OcxResponse); .StartPlaySip(
this.playurl.sip_serv_id,
this.playurl.sip_serv_ip,
this.playurl.sip_serv_port,
this.playurl.sip_unid,
this.playurl.sip_password,
this.playurl.devId,
0
);
console.log("video Ocx播放sip流返回值:", OcxResponse);
if (OcxResponse != 0 && OcxResponse != 200) { if (OcxResponse != 0 && OcxResponse != 200) {
alert('播放失败!'); alert("播放失败!");
} }
} }
}, },
initocx(){ initocx() {
VionVideo.Init(0, 'Null', 4); VionVideo.Init(0, "Null", 4);
}, },
downloadOCx() { downloadOCx() {
if (navigator.userAgent.indexOf('Trident') > -1) { if (navigator.userAgent.indexOf("Trident") > -1) {
this.axios.get(IP + "/api/v1/device/dlfile", { this.axios
.get(IP + "/api/v1/device/dlfile", {
params: { params: {
file_type: "video_ocx" file_type: "video_ocx"
} }
...@@ -54,7 +69,10 @@ export default { ...@@ -54,7 +69,10 @@ export default {
}, },
checkIE() { checkIE() {
var agent = navigator.userAgent.toLowerCase(); var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) { if (
/(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
document.documentMode < 10
) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!"); this.$message.error("IE 版本过低请升级到IE10级以上版本!");
} }
} }
...@@ -64,7 +82,7 @@ export default { ...@@ -64,7 +82,7 @@ export default {
}, },
mounted() { mounted() {
VionVideo.Init(0, 'Null', 4); VionVideo.Init(0, "Null", 4);
try { try {
if (document.getElementById("VionVideo").GetVersion()) { if (document.getElementById("VionVideo").GetVersion()) {
} }
...@@ -73,20 +91,15 @@ export default { ...@@ -73,20 +91,15 @@ export default {
} }
}, },
computed: { computed: {
...mapState(['ocxstate']) ...mapState(["ocxstate"])
}, },
watch: { watch: {},
beforeDestroy: function() {
},
beforeDestroy: function () {
if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) { if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
this.videoplayer.pause(); this.videoplayer.pause();
} }
} }
}; };
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped></style>
</style>
...@@ -42,13 +42,22 @@ ...@@ -42,13 +42,22 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="note"
label="备用名称"
></el-table-column>
<el-table-column
align="center"
prop="event_cate_unid" prop="event_cate_unid"
label="类型" label="类型"
:formatter="cateFormatter" :formatter="cateFormatter"
> >
</el-table-column> </el-table-column>
<el-table-column align="center" prop="active" label="状态" <el-table-column
:formatter="activeFormatter"> align="center"
prop="active"
label="状态"
:formatter="activeFormatter"
>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="operation" label="操作"> <el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -129,6 +138,9 @@ ...@@ -129,6 +138,9 @@
> >
<el-input v-model="codeData.name"></el-input> <el-input v-model="codeData.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="note">
<el-input v-model="codeData.note"></el-input>
</el-form-item>
<el-form-item <el-form-item
label="启用" label="启用"
prop="active" prop="active"
...@@ -137,8 +149,8 @@ ...@@ -137,8 +149,8 @@
]" ]"
> >
<el-select v-model="codeData.active" placeholder="请选择"> <el-select v-model="codeData.active" placeholder="请选择">
<el-option label="开启" :value="1"></el-option> <el-option label="开启" :value="true"></el-option>
<el-option label="关闭" :value="0"></el-option> <el-option label="关闭" :value="false"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -168,7 +180,7 @@ export default { ...@@ -168,7 +180,7 @@ export default {
name: "", name: "",
code: "", code: "",
catename: "", catename: "",
active:1 active: 1
}, },
editStatus: 0, editStatus: 0,
event_type_unid: "" event_type_unid: ""
...@@ -207,14 +219,14 @@ export default { ...@@ -207,14 +219,14 @@ export default {
cateFormatter(row) { cateFormatter(row) {
return this.getCateName(row.event_cate_unid); return this.getCateName(row.event_cate_unid);
}, },
activeFormatter(row){ activeFormatter(row) {
let text = "开启" let text = "开启";
if(row.active && row.active == 0) { if (row.active) {
text = "关闭" text = "开启";
} else { } else {
text = "开启" text = "关闭";
} }
return text return text;
}, },
editCode(index, row) { editCode(index, row) {
this.event_type_unid = row.event_type_unid; this.event_type_unid = row.event_type_unid;
...@@ -225,7 +237,8 @@ export default { ...@@ -225,7 +237,8 @@ export default {
code: row.code, code: row.code,
catename: this.getCateName(this.curcate), catename: this.getCateName(this.curcate),
event_cate_unid: row.event_cate_unid, event_cate_unid: row.event_cate_unid,
active: row.active active: row.active,
note: row.note
}; };
}, },
deleteCode(index, row) { deleteCode(index, row) {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
:popper-append-to-body="false" :popper-append-to-body="false"
> >
<el-option <el-option
v-for="item in catesData" v-for="(item, index) in catesData"
:key="item" :key="index"
:value="item.cate_unid" :value="item.cate_unid"
:label="item.name" :label="item.name"
></el-option> ></el-option>
...@@ -41,6 +41,15 @@ ...@@ -41,6 +41,15 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="name" label="名称"> <el-table-column align="center" prop="name" label="名称">
</el-table-column> </el-table-column>
<el-table-column align="center" prop="note" label="备用名称">
</el-table-column>
<el-table-column
align="center"
prop="active"
label="状态"
:formatter="activeFormatter"
>
</el-table-column>
<el-table-column align="center" prop="operation" label="操作"> <el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip
...@@ -109,7 +118,7 @@ ...@@ -109,7 +118,7 @@
{ required: true, message: 'code不能为空!', trigger: 'blur' } { required: true, message: 'code不能为空!', trigger: 'blur' }
]" ]"
> >
<el-input v-model="codeData.code"></el-input> <el-input v-model="codeData.code" :disabled="editdis"></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="名称" label="名称"
...@@ -120,14 +129,20 @@ ...@@ -120,14 +129,20 @@
> >
<el-input v-model="codeData.name"></el-input> <el-input v-model="codeData.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="note">
<el-input v-model="codeData.note"></el-input>
</el-form-item>
<el-form-item <el-form-item
label="备注" label="启用"
prop="note" prop="active"
:rules="[ :rules="[
{ required: true, message: '备注名称不能为空!', trigger: 'blur' } { required: true, message: '名称不能为空!', trigger: 'blur' }
]" ]"
> >
<el-input v-model="codeData.name"></el-input> <el-select v-model="codeData.active" placeholder="请选择">
<el-option label="开启" :value="true"></el-option>
<el-option label="关闭" :value="false"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -153,7 +168,8 @@ export default { ...@@ -153,7 +168,8 @@ export default {
selectDevs: "", selectDevs: "",
detailVisible: false, detailVisible: false,
codeStatus: 0, codeStatus: 0,
codeData: {} codeData: {},
editdis: false
}; };
}, },
components: {}, components: {},
...@@ -178,11 +194,13 @@ export default { ...@@ -178,11 +194,13 @@ export default {
this.codeStatus = 0; this.codeStatus = 0;
this.detailVisible = true; this.detailVisible = true;
this.codeData.catename = this.getCateName(this.curCateUnid); this.codeData.catename = this.getCateName(this.curCateUnid);
this.editdis = false;
}, },
editCode(index, row) { editCode(index, row) {
this.codeStatus = 1; this.codeStatus = 1;
this.detailVisible = true; this.detailVisible = true;
this.codeData = row; this.codeData = row;
this.editdis = true;
this.codeData.catename = this.getCateName(this.curCateUnid); this.codeData.catename = this.getCateName(this.curCateUnid);
}, },
getCateName(cateunid) { getCateName(cateunid) {
...@@ -199,13 +217,22 @@ export default { ...@@ -199,13 +217,22 @@ export default {
this.catesData = res.list_data; this.catesData = res.list_data;
}); });
}, },
activeFormatter(row) {
let text = "开启";
if (row.active) {
text = "开启";
} else {
text = "关闭";
}
return text;
},
saveCode() { saveCode() {
this.$refs["trfficform"].validate(valid => { this.$refs["trfficform"].validate(valid => {
if (valid) { if (valid) {
if (this.editStatus === 0) { if (this.codeStatus === 0) {
this.saveAddCode(); this.saveAddCode();
} }
if (this.editStatus === 1) { if (this.codeStatus === 1) {
this.saveEditCode(); this.saveEditCode();
} }
} else { } else {
......
...@@ -151,18 +151,23 @@ export default { ...@@ -151,18 +151,23 @@ export default {
}, },
//发送推流请求 //发送推流请求
pushSteam(vdata) { pushSteam(vdata) {
this.$api.task.getStream(this.dev_unid, vdata.vchan.vchan_id).then(m => { let data = {
console.log(m); send_stream: true,
task_id: this.currentSubtaskId,
is_analyse: true,
};
this.$api.task
.getStream(this.dev_unid, vdata.vchan.vchan_refid, data)
.then(m => {
if (m.ecode) { if (m.ecode) {
this.$message({ this.$message({
message: "发送推流请求失败:" + m.enote, message: "发送推流请求失败:" + m.enote,
type: "error" type: "error"
}); });
} else { } else {
console.log("请求推送分析流成功", JSON.stringify(m));
setTimeout(() => { setTimeout(() => {
this.getPlayUrl(); this.getPlayUrl();
}, 500); }, 2000);
} }
}); });
}, },
...@@ -182,9 +187,6 @@ export default { ...@@ -182,9 +187,6 @@ export default {
message: "获取rtsp播放地址失败!请重试!", message: "获取rtsp播放地址失败!请重试!",
type: "error" type: "error"
}); });
setTimeout(() => {
alert("获取rtsp播放地址失败!请重试!");
}, 0);
} }
}); });
}, },
......
...@@ -2006,10 +2006,10 @@ export default { ...@@ -2006,10 +2006,10 @@ export default {
linetype = 10; linetype = 10;
break; break;
case "4": case "4":
linetype = ""; linetype = 13;
break; break;
case "5": case "5":
linetype = ""; linetype = 14;
break; break;
default: default:
break; break;
...@@ -2090,7 +2090,9 @@ export default { ...@@ -2090,7 +2090,9 @@ export default {
} }
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
// 红绿灯区域 // 红绿灯区域
let lightAry = []; let lightAry = [];
...@@ -2109,7 +2111,9 @@ export default { ...@@ -2109,7 +2111,9 @@ export default {
light_regions: ele.light_regions light_regions: ele.light_regions
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
this.roiBody.lights = { this.roiBody.lights = {
light_count: lightAry.length, light_count: lightAry.length,
light: lightAry light: lightAry
...@@ -2135,7 +2139,9 @@ export default { ...@@ -2135,7 +2139,9 @@ export default {
point: ary point: ary
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
this.roiBody.no_stop_region = { this.roiBody.no_stop_region = {
region_count: noStopAry.length, region_count: noStopAry.length,
...@@ -2171,7 +2177,9 @@ export default { ...@@ -2171,7 +2177,9 @@ export default {
point: bicAry point: bicAry
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
this.roiBody.pedestrian_detection_region = { this.roiBody.pedestrian_detection_region = {
region_count: bicArys.length, region_count: bicArys.length,
...@@ -2202,7 +2210,9 @@ export default { ...@@ -2202,7 +2210,9 @@ export default {
point: denAry point: denAry
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
this.roiBody.pedestrian_density_region = { this.roiBody.pedestrian_density_region = {
region_count: densityAry.length, region_count: densityAry.length,
...@@ -2229,7 +2239,9 @@ export default { ...@@ -2229,7 +2239,9 @@ export default {
point: foAry point: foAry
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
this.roiBody.foreign_detection_region = { this.roiBody.foreign_detection_region = {
region_count: foreignAry.length, region_count: foreignAry.length,
...@@ -2256,7 +2268,9 @@ export default { ...@@ -2256,7 +2268,9 @@ export default {
point: foAry point: foAry
}); });
}); });
} catch (error) {} } catch (error) {
console.log(error);
}
this.roiBody.test_result_region = { this.roiBody.test_result_region = {
region_count: foreignAry.length, region_count: foreignAry.length,
......
...@@ -12,18 +12,17 @@ ...@@ -12,18 +12,17 @@
> >
<el-table-column label="序号" type="index" width="50" align="center"> <el-table-column label="序号" type="index" width="50" align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="预置位编号" width="180">
prop="position_num" <template slot-scope="scope">
align="center" <div>
label="预置位编号" {{ setpositionnum(scope.row.position_num) }}
width="180" </div>
> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="预设位置配置" width="180"> <el-table-column align="center" label="预设位置配置" width="180">
<template> <template>
<div class="yzw-setbox"> <div class="yzw-setbox">
<span class="icon el-icon-folder-add"></span> <span class="icon el-icon-delete" @click="resetRoi"></span>
<span class="icon el-icon-delete"></span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -32,7 +31,9 @@ ...@@ -32,7 +31,9 @@
<div class="table-set"> <div class="table-set">
<span @click="setParam(scope.row, scope.$index)">参数设置</span> <span @click="setParam(scope.row, scope.$index)">参数设置</span>
<span @click="setArea(scope.row, scope.$index)">区域设置</span> <span @click="setArea(scope.row, scope.$index)">区域设置</span>
<span @click="setDemarcate(scope.row, scope.$index)">标定设置</span> <span @click="setDemarcate(scope.row, scope.$index)"
>标定设置</span
>
<span @click="setTimer(scope.row, scope.$index)">时间设置</span> <span @click="setTimer(scope.row, scope.$index)">时间设置</span>
</div> </div>
</template> </template>
...@@ -46,7 +47,8 @@ ...@@ -46,7 +47,8 @@
<div class="set-item"> <div class="set-item">
轮询播放 轮询播放
<span class="set-icon"> <span class="set-icon">
<el-switch :width="25" v-model="switchstate"> </el-switch> <el-switch :width="25" v-model="switchstate" @change="suspends">
</el-switch>
</span> </span>
</div> </div>
<div class="set-item" @click="handleparam('upload')"> <div class="set-item" @click="handleparam('upload')">
...@@ -62,7 +64,11 @@ ...@@ -62,7 +64,11 @@
<handleparam ref="handleparam"></handleparam> <handleparam ref="handleparam"></handleparam>
</div> </div>
<div class="yt-box"> <div class="yt-box">
<ytconfig ref="yt" @subpostion="submitPosion"></ytconfig> <ytconfig
ref="yt"
@subpostion="submitPosion"
@deleteytconfig="deleteytconfig"
></ytconfig>
</div> </div>
<div> <div>
<parameter ref="parameter"></parameter> <parameter ref="parameter"></parameter>
...@@ -95,8 +101,8 @@ ...@@ -95,8 +101,8 @@
<div class="timer-sel"> <div class="timer-sel">
<el-select v-model="timer" placeholder="请选择"> <el-select v-model="timer" placeholder="请选择">
<el-option <el-option
v-for="item in timeroptions" v-for="(item, index) in timeroptions"
:key="item" :key="index"
:label="item" :label="item"
:value="item" :value="item"
> >
...@@ -117,7 +123,8 @@ ...@@ -117,7 +123,8 @@
width="30" width="30"
v-model="polling_state" v-model="polling_state"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949"
>
</el-switch> </el-switch>
</div> </div>
</div> </div>
...@@ -143,7 +150,7 @@ export default { ...@@ -143,7 +150,7 @@ export default {
timersel: 0, timersel: 0,
timerDialog: false, timerDialog: false,
curindex: 0, curindex: 0,
timeroptions: [30, 40, 50, 60, 100], timeroptions: [5, 10, 15, 20, 30, 40, 50, 60],
timerscenes: null, timerscenes: null,
currentRow: null, currentRow: null,
taskInfo: { taskInfo: {
...@@ -166,22 +173,30 @@ export default { ...@@ -166,22 +173,30 @@ export default {
}, },
methods: { methods: {
setParam(scenesdata, index) { setParam(scenesdata, index) {
if (this.checkpollstate()) {
this.curindex = index; this.curindex = index;
this.$refs.parameter.init(scenesdata); this.$refs.parameter.init(scenesdata);
}
}, },
setArea(roidata, index) { setArea(roidata, index) {
if (this.checkpollstate()) {
this.curindex = index; this.curindex = index;
this.$refs.areas.showModal(roidata, this.taskInfo); this.$refs.areas.showModal(roidata, this.taskInfo);
}
}, },
setDemarcate(scenesdata, index) { setDemarcate(scenesdata, index) {
if (this.checkpollstate()) {
this.curindex = index; this.curindex = index;
this.$refs.demarcate.showModal(scenesdata); this.$refs.demarcate.showModal(scenesdata);
}
}, },
handleparam(type) { handleparam(type) {
this.$refs.handleparam.show(type); this.$refs.handleparam.show(type);
}, },
setsounces() { setsounces() {
if (this.checkpollstate()) {
this.$refs.yt.openyt(this.currentRow); this.$refs.yt.openyt(this.currentRow);
}
}, },
getTaskParams() { getTaskParams() {
this.$api.task.getTaskParams(this.taskid, this.subtaskid).then(data => { this.$api.task.getTaskParams(this.taskid, this.subtaskid).then(data => {
...@@ -193,6 +208,19 @@ export default { ...@@ -193,6 +208,19 @@ export default {
this.polling_state = data.pollingState; this.polling_state = data.pollingState;
this.$store.commit("setocxstate", 0); this.$store.commit("setocxstate", 0);
this.timerDialog = true; this.timerDialog = true;
this.timer = data.runtime;
},
resetRoi() {
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
ele.config = {};
ele.rois = [];
}
});
this.subRoi(this.taskInfo.mtasks);
},
setpositionnum(index) {
return index == -1 ? "未设置" : index;
}, },
handleTimerClose() { handleTimerClose() {
this.timerDialog = false; this.timerDialog = false;
...@@ -200,6 +228,34 @@ export default { ...@@ -200,6 +228,34 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentRow = val; this.currentRow = val;
this.$api.task
.switchScene(this.taskid, this.subtaskid, val.scene_unid)
.then(res => {
console.log(res);
});
},
suspends() {
if (this.subtaskid) {
let _s = this.switchstate ? 1 : 0;
this.$api.task
.suspendAlternate(this.taskid, this.subtaskid, _s)
.then(res => {
console.log(res);
});
}
},
checkpollstate() {
let state = false;
if (this.switchstate) {
this.$message({
message: "请先关闭预置位在进行操作!",
type: "warning"
});
state = false;
} else {
state = true;
}
return state;
}, },
submitPosion(positionnum) { submitPosion(positionnum) {
this.taskInfo.mtasks[0].scenes.map(ele => { this.taskInfo.mtasks[0].scenes.map(ele => {
...@@ -209,6 +265,14 @@ export default { ...@@ -209,6 +265,14 @@ export default {
}); });
this.subRoi(this.taskInfo.mtasks); this.subRoi(this.taskInfo.mtasks);
}, },
deleteytconfig(positionnum) {
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
ele.position_num = -1;
}
});
this.subRoi(this.taskInfo.mtasks);
},
submitTimer(item) { submitTimer(item) {
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) {
...@@ -309,6 +373,7 @@ export default { ...@@ -309,6 +373,7 @@ export default {
subtaskid(val) { subtaskid(val) {
this.$api.task.getTaskParams(this.taskid, val).then(res => { this.$api.task.getTaskParams(this.taskid, val).then(res => {
this.taskInfo = res; this.taskInfo = res;
this.switchstate = res.alternate_status == 1 ? true : false;
console.log(res.data); console.log(res.data);
}); });
} }
......
...@@ -80,6 +80,9 @@ ...@@ -80,6 +80,9 @@
<div class="closebtn item-box"> <div class="closebtn item-box">
<el-button @click="closeyt">关闭</el-button> <el-button @click="closeyt">关闭</el-button>
</div> </div>
<div class="delbtn item-box">
<el-button @click="deleteytconfig" type="danger">删除</el-button>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -133,6 +136,10 @@ export default { ...@@ -133,6 +136,10 @@ export default {
}, },
subset() { subset() {
this.$emit("subpostion", this.presetindex); this.$emit("subpostion", this.presetindex);
},
deleteytconfig() {
this.$emit("deleteytconfig", this.presetindex);
this.showyt = false;
} }
} }
}; };
...@@ -207,4 +214,7 @@ export default { ...@@ -207,4 +214,7 @@ export default {
.subbtn { .subbtn {
margin: 1vh 0.3vw 0 2vw; margin: 1vh 0.3vw 0 2vw;
} }
.delbtn {
margin-left:.4vw
}
</style> </style>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</el-col> </el-col>
<div style=""> <div style="">
<el-table <el-table
:data="formattterData" :data="formatterData"
:height="tableHeight" :height="tableHeight"
v-loading="loading" v-loading="loading"
stripe stripe
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip content="播放" placement="bottom" effect="light" :visible-arrow=false> <el-tooltip content="播放" placement="bottom" effect="light" :visible-arrow=false>
<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> <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>
</el-tooltip> </el-tooltip>
<span class="tableSpanBorder"></span> <span class="tableSpanBorder"></span>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false> <el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
illegalList:this.$buildCode.getCodeList('违法类型'), illegalList:this.$buildCode.getCodeList('违法类型'),
plateTypeList:this.$buildCode.getCodeList('号牌类型'), plateTypeList:this.$buildCode.getCodeList('号牌类型'),
tableData:[], tableData:[],
formattterData:[], formatterData:[],
total:0, total:0,
page:1, page:1,
pageSize:30, pageSize:30,
...@@ -387,19 +387,19 @@ ...@@ -387,19 +387,19 @@
}); });
return false; return false;
} }
this.detailObj=this.formattterData[this.currentIndex-1]; this.detailObj=this.formatterData[this.currentIndex-1];
this.currentIndex-=1; this.currentIndex-=1;
this.getImg(this.detailObj.pics[0].pic_unid); this.getImg(this.detailObj.pics[0].pic_unid);
}, },
rightFun(){ rightFun(){
if(this.currentIndex==this.formattterData.length-1){ if(this.currentIndex==this.formatterData.length-1){
this.$message({ this.$message({
message: '目前为最后一条', message: '目前为最后一条',
type: 'warning' type: 'warning'
}); });
return false; return false;
} }
this.detailObj=this.formattterData[this.currentIndex+1]; this.detailObj=this.formatterData[this.currentIndex+1];
this.currentIndex+=1; this.currentIndex+=1;
this.getImg(this.detailObj.pics[0].pic_unid); this.getImg(this.detailObj.pics[0].pic_unid);
}, },
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
}, },
getData(){ getData(){
this.loading=true; this.loading=true;
this.formattterData=[]; this.formatterData=[];
let offset = (this.page - 1) * this.pageSize; let offset = (this.page - 1) * this.pageSize;
let search_params = { let search_params = {
limit: this.pageSize, limit: this.pageSize,
...@@ -444,7 +444,7 @@ ...@@ -444,7 +444,7 @@
).then((res)=>{ ).then((res)=>{
this.total=res.total_num; this.total=res.total_num;
res.list_data.forEach((item,index)=>{ res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}) })
this.loading=false; this.loading=false;
}).catch((err)=>{ }).catch((err)=>{
...@@ -476,7 +476,7 @@ ...@@ -476,7 +476,7 @@
this.$api.search.delVehicle({ this.$api.search.delVehicle({
},row.id).then(res=>{ },row.id).then(res=>{
if(res.ecode==200){ if(res.ecode==200){
this.formattterData.splice(index); this.formatterData.splice(index);
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
...@@ -498,9 +498,9 @@ ...@@ -498,9 +498,9 @@
}).then(() => { }).then(() => {
this.$api.search.delVehicle({},this.detailObj.id).then(res=>{ this.$api.search.delVehicle({},this.detailObj.id).then(res=>{
if(res.ecode==200){ if(res.ecode==200){
this.formattterData.splice(this.currentIndex,1); this.formatterData.splice(this.currentIndex,1);
this.detailObj = Object.assign({},this.formattterData[this.currentIndex]); this.detailObj = Object.assign({},this.formatterData[this.currentIndex]);
this.getImg(this.formattterData[this.currentIndex].pics[0].pic_unid); this.getImg(this.formatterData[this.currentIndex].pics[0].pic_unid);
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</el-col> </el-col>
<div style=""> <div style="">
<el-table <el-table
:data="formattterData" :data="formatterData"
height="574" height="574"
stripe stripe
border border
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
}, },
bodyColorList:this.$buildCode.getCodeList('车身颜色'), bodyColorList:this.$buildCode.getCodeList('车身颜色'),
tableData:[], tableData:[],
formattterData:[], formatterData:[],
total:0, total:0,
page:1, page:1,
pageSize:30, pageSize:30,
...@@ -321,19 +321,19 @@ ...@@ -321,19 +321,19 @@
}); });
return false; return false;
} }
this.detailObj=this.formattterData[this.currentIndex-1]; this.detailObj=this.formatterData[this.currentIndex-1];
this.currentIndex-=1; this.currentIndex-=1;
this.getImg(this.detailObj.pics[0].pic_unid); this.getImg(this.detailObj.pics[0].pic_unid);
}, },
rightFun(){ rightFun(){
if(this.currentIndex==this.formattterData.length-1){ if(this.currentIndex==this.formatterData.length-1){
this.$message({ this.$message({
message: '目前为最后一条', message: '目前为最后一条',
type: 'warning' type: 'warning'
}); });
return false; return false;
} }
this.detailObj=this.formattterData[this.currentIndex+1]; this.detailObj=this.formatterData[this.currentIndex+1];
this.currentIndex+=1; this.currentIndex+=1;
this.getImg(this.detailObj.pics[0].pic_unid); this.getImg(this.detailObj.pics[0].pic_unid);
}, },
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
}, },
getData(){ getData(){
this.loading=true; this.loading=true;
this.formattterData=[]; this.formatterData=[];
let offset = (this.page - 1) * this.pageSize; let offset = (this.page - 1) * this.pageSize;
let search_params = { let search_params = {
limit: this.pageSize, limit: this.pageSize,
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
).then((res)=>{ ).then((res)=>{
this.total=res.total_num; this.total=res.total_num;
res.list_data.forEach((item,index)=>{ res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}) })
this.loading=false; this.loading=false;
}).catch((err)=>{ }).catch((err)=>{
...@@ -407,7 +407,7 @@ ...@@ -407,7 +407,7 @@
this.$api.search.delVehicle({ this.$api.search.delVehicle({
},row.id).then(res=>{ },row.id).then(res=>{
if(res.ecode==200){ if(res.ecode==200){
this.formattterData.splice(index); this.formatterData.splice(index);
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
...@@ -429,9 +429,9 @@ ...@@ -429,9 +429,9 @@
}).then(() => { }).then(() => {
this.$api.search.delVehicle({},this.detailObj.id).then(res=>{ this.$api.search.delVehicle({},this.detailObj.id).then(res=>{
if(res.ecode==200){ if(res.ecode==200){
this.formattterData.splice(this.currentIndex,1); this.formatterData.splice(this.currentIndex,1);
this.detailObj = Object.assign({},this.formattterData[this.currentIndex]); this.detailObj = Object.assign({},this.formatterData[this.currentIndex]);
this.getImg(this.formattterData[this.currentIndex].pics[0].pic_unid); this.getImg(this.formatterData[this.currentIndex].pics[0].pic_unid);
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<el-option value="0" label="交通"></el-option> <el-option value="0" label="交通"></el-option>
<el-option value="1" label="客流"></el-option> <el-option value="1" label="客流"></el-option>
<el-option value="2" label="行为分析"></el-option> <el-option value="2" label="行为分析"></el-option>
<el-option value="3" label="违停"></el-option>
<el-option value="5" label="交通行人"></el-option> <el-option value="5" label="交通行人"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -183,8 +184,8 @@ export default { ...@@ -183,8 +184,8 @@ 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.setUtcTime(this.formData.timer[0]), start_dt: this.formData.period === 1 ? "2020-03-27 00:00:00" : this.setUtcTime(this.formData.timer[0]),
end_dt: this.setUtcTime(this.formData.timer[1]), end_dt: this.formData.period === 1 ? "2020-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,
...@@ -202,7 +203,7 @@ export default { ...@@ -202,7 +203,7 @@ export default {
this.addTask(formData); this.addTask(formData);
} }
if (this.pedittype == "edit") { if (this.pedittype == "edit") {
this.editTask(formData); this.editTask(postData);
} }
}, },
addTask(data) { addTask(data) {
......
...@@ -7,20 +7,7 @@ ...@@ -7,20 +7,7 @@
width="906px" width="906px"
:before-close="handleClose" :before-close="handleClose"
> >
<!-- 内层dialog --> <moveTask ref="movetask"></moveTask>
<!-- <el-dialog width="630px" title="视频迁移" :visible.sync="innerVisible" append-to-body >
<el-table height="286" :data="taskData" stripe border style="width: 100%">
<el-table-column align="center" prop="name" label="任务名称"></el-table-column>
<el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope">
<el-tag :key="scope.$index" type="warning" effect="dark">{{ scope.row.status}}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="type" label="算法类型"></el-table-column>
<el-table-column align="center" prop="set" label="储存配置"></el-table-column>
<el-table-column align="center" prop="per" label="场景占用"></el-table-column>
</el-table>
</el-dialog> -->
<div> <div>
<!-- 外层内容 --> <!-- 外层内容 -->
<div class="leftBox"> <div class="leftBox">
...@@ -55,11 +42,11 @@ ...@@ -55,11 +42,11 @@
prop="name" prop="name"
label="视频源名称" label="视频源名称"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column align="center" label="视频状态">
align="center" <template slot-scope="scope">
prop="running_status" <div v-html="statusFormatter(scope.row)"></div>
label="视频状态" </template>
></el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
width="136" width="136"
...@@ -106,16 +93,17 @@ ...@@ -106,16 +93,17 @@
</template> </template>
<script> <script>
import videoplay from "../public/videoPlay"; import videoplay from "../public/videoPlay";
import moveTask from "./moveSubTask";
export default { export default {
data() { data() {
return { return {
innerVisible: false,
tableData: [], tableData: [],
play_url: "", play_url: "",
user_unid: "", user_unid: "",
formData: {}, formData: {},
editData: {}, editData: {},
taskData:{}, taskData:{},
moveTaskData:[],
setvisible: false, setvisible: false,
props: { props: {
id: "vchan_refid", id: "vchan_refid",
...@@ -146,7 +134,8 @@ export default { ...@@ -146,7 +134,8 @@ export default {
} }
}, },
components: { components: {
videoplay videoplay,
moveTask
}, },
mounted() { mounted() {
console.log(this.setvisible); console.log(this.setvisible);
...@@ -166,7 +155,7 @@ export default { ...@@ -166,7 +155,7 @@ export default {
data[i].vchan.subtask_id = data[i].subtask_id; data[i].vchan.subtask_id = data[i].subtask_id;
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;
} else { } else {
data.vchan = { data.vchan = {
subtask_id: data[i].subtask_id, subtask_id: data[i].subtask_id,
...@@ -182,6 +171,21 @@ export default { ...@@ -182,6 +171,21 @@ export default {
this.checkvckan(); this.checkvckan();
}); });
}, },
statusFormatter(row) {
if (row.running_status == "Running") {
return "<span class='runningbox statusbox'>工作中</span>";
} else if (row.running_status == "Finished") {
return "<span class='finishedbox statusbox'>已完成</span>";
} else if (row.running_status == "Pause") {
return "<span class='pausebox statusbox'>暂停</span>";
} else if (row.running_status == "Error") {
return "<span class='errorbox statusbox'>异常</span>";
} else if (row.running_status == "Deleted") {
return "<span class='deletebox statusbox'>已删除</span>";
} else {
return "<span class='nomoralbox statusbox'>未部署</span>";
}
},
handleCheckChange(data, node) { handleCheckChange(data, node) {
console.log(node); console.log(node);
let staus = false; let staus = false;
...@@ -344,7 +348,9 @@ export default { ...@@ -344,7 +348,9 @@ export default {
try { try {
window.clearTimeout(this.timeout1); window.clearTimeout(this.timeout1);
window.clearTimeout(this.timeout2); window.clearTimeout(this.timeout2);
} catch (err) {} } catch (err) {
console.log(err);
}
// var e = e || window.event; // var e = e || window.event;
this.play_url = ""; this.play_url = "";
// if (this.testIe.isIe) { // if (this.testIe.isIe) {
...@@ -443,7 +449,7 @@ export default { ...@@ -443,7 +449,7 @@ export default {
this.setvisible = false; this.setvisible = false;
}, },
moveFun(index, row) { moveFun(index, row) {
this.innerVisible = true; this.$refs.movetask.initMoveTask(row, this.taskData);
} }
}, },
created() { created() {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div class="rightBox"> <div class="rightBox">
<img src="../../assets/img/taskmanage/pic3.png" alt="" /> <img src="../../assets/img/taskmanage/pic3.png" alt="" />
<span class="textCon"> <span class="textCon">
<div class="topText">80</div> <div class="topText">{{total}}</div>
<div class="bottomText">任务数量</div> <div class="bottomText">任务数量</div>
</span> </span>
</div> </div>
...@@ -97,12 +97,12 @@ ...@@ -97,12 +97,12 @@
</el-table-column> </el-table-column>
<el-table-column prop="task_name" align="center" label="任务名称"> <el-table-column prop="task_name" align="center" label="任务名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="状态">
align="center"
prop="status"
:formatter="statusFormatter"
label="状态"
> >
<template slot-scope="scope">
<div v-html="statusFormatter(scope.row)">
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -117,11 +117,11 @@ ...@@ -117,11 +117,11 @@
label="存储配置" label="存储配置"
> >
</el-table-column> </el-table-column>
<el-table-column align="center" prop="workers_count" label="场景占用"> <el-table-column align="center" prop="resource_use" label="场景占用">
</el-table-column> </el-table-column>
<el-table-column align="center" prop="workers_count" label="资源用量"> <el-table-column align="center" prop="workers_count" label="资源用量">
</el-table-column> </el-table-column>
<el-table-column align="center" prop="workers_count" label="设备类型"> <el-table-column align="center" prop="plate_type" label="设备类型">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
:visible-arrow="false" :visible-arrow="false"
> >
<span <span
class="icon-fanxing-xiugai editIcon" class="el-icon-video-camera-solid editIcon"
@click="editVideo(scope.$index, scope.row)" @click="editVideo(scope.$index, scope.row)"
></span> ></span>
</el-tooltip> </el-tooltip>
...@@ -303,19 +303,19 @@ export default { ...@@ -303,19 +303,19 @@ export default {
row.isexpand = false; row.isexpand = false;
} }
}, },
statusFormatter(row, column, cellValue, index) { statusFormatter(row) {
if (cellValue == "Running") { if (row.status == "Running") {
return "工作中"; return "<span class='runningbox statusbox'>工作中</span>";
} else if (cellValue == "Finished") { } else if (row.status == "Finished") {
return "已完成"; return "<span class='finishedbox statusbox'>已完成</span>";
} else if (cellValue == "Pause") { } else if (row.status == "Pause") {
return "暂停"; return "<span class='pausebox statusbox'>暂停</span>";
} else if (cellValue == "Error") { } else if (row.status == "Error") {
return "异常"; return "<span class='errorbox statusbox'>异常</span>";
} else if (cellValue == "Deleted") { } else if (row.status == "Deleted") {
return "已删除"; return "<span class='deletebox statusbox'>已删除</span>";
} else { } else {
return "未部署"; return "<span class='nomoralbox statusbox'>未部署</span>";
} }
}, },
priorityFormatter(row, column, cellValue, index) { priorityFormatter(row, column, cellValue, index) {
...@@ -337,13 +337,12 @@ export default { ...@@ -337,13 +337,12 @@ export default {
}, },
dateFormatter(row, column, cellValue, index) { dateFormatter(row, column, cellValue, index) {
if (row.period) { if (row.period) {
return "全天" return "全天";
} else { } else {
let startDate = cellValue ? cellValue.split(" ")[0] : ""; let startDate = cellValue ? cellValue.split(" ")[0] : "";
let endDate = row.end_dt ? row.end_dt.split(" ")[0] : ""; let endDate = row.end_dt ? row.end_dt.split(" ")[0] : "";
return startDate + " ~ " + endDate; return startDate + " ~ " + endDate;
} }
}, },
typeFormatter(row, column, cellValue, index) { typeFormatter(row, column, cellValue, index) {
if (cellValue == 0) { if (cellValue == 0) {
...@@ -589,4 +588,7 @@ export default { ...@@ -589,4 +588,7 @@ export default {
color: #f2365a; color: #f2365a;
font-size: 16px; font-size: 16px;
} }
.statusbox {
background: red;
}
</style> </style>
<template>
<!-- 内层dialog -->
<el-dialog
width="630px"
title="视频迁移"
:visible.sync="innerVisible"
append-to-body
>
<el-table
height="286"
:data="moveTaskData"
stripe
border
style="width: 100%"
highlight-current-row
@current-change="handleCurrentChange"
>
<el-table-column
align="center"
prop="task_name"
label="任务名称"
></el-table-column>
<el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope">
<div v-html="statusFormatter(scope.row)"></div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="task_algo_type"
label="算法类型"
:formatter="typeFormatter"
></el-table-column>
<el-table-column
align="center"
prop="store_conf.name"
label="储存配置"
></el-table-column>
<el-table-column
align="center"
prop="resource_use"
label="场景占用"
></el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="movetask">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
innerVisible: false,
moveTaskData: [],
curTaskData: {},
curSubTaskData: {},
curRow: {}
};
},
methods: {
initMoveTask(sutaskdata, taskData) {
this.curTaskData = taskData;
this.curSubTaskData = sutaskdata;
this.getTaskList();
},
handleClose() {
this.innerVisible = false;
},
handleCurrentChange(val) {
this.curRow = val;
},
getTaskList() {
this.tableData = [];
let offset = (this.page - 1) * this.pageSize;
this.$api.task
.getTask({
limit: 10000,
offset: 0,
task_algo_type: this.curTaskData.task_algo_type,
source_type: "pull_video_stream",
task_type: "normal",
resource_use: this.curTaskData.resource_use || ""
})
.then(res => {
this.total = res.total_num;
if (res.list_data == null) {
this.tableData = [];
} else {
let taskArr = [];
for (let i = 0; i < res.list_data.length; i++) {
if (res.list_data[i].task_id == this.curTaskData.task_id) {
break;
} else {
taskArr.push(res.list_data[i]);
}
}
if (taskArr.length > 0) {
this.moveTaskData = taskArr;
this.innerVisible = true;
} else {
this.$message({
message: "没有符合的任务",
type: "warning"
});
}
}
})
.catch(error => {});
},
typeFormatter(row, column, cellValue, index) {
if (cellValue == 0) {
return "交通";
} else if (cellValue == 1) {
return "客流";
} else if (cellValue == 2) {
return "行为分析";
} else if (cellValue == 3) {
return "违停";
} else if (cellValue == 5) {
return "交通行人";
} else if (cellValue == 7) {
return "综合流量";
} else {
return "未知";
}
},
statusFormatter(row) {
if (row.status == "Running") {
return "<span class='runningbox statusbox'>工作中</span>";
} else if (row.status == "Finished") {
return "<span class='finishedbox statusbox'>已完成</span>";
} else if (row.status == "Pause") {
return "<span class='pausebox statusbox'>暂停</span>";
} else if (row.status == "Error") {
return "<span class='errorbox statusbox'>异常</span>";
} else if (row.status == "Deleted") {
return "<span class='deletebox statusbox'>已删除</span>";
} else {
return "<span class='nomoralbox statusbox'>未部署</span>";
}
},
movetask() {
let data = {
subtask_id: this.curSubTaskData.subtask_id
};
this.$api.task.moveTask(this.curTaskData.task_id, data).then(res => {
console.log(res);
});
}
}
};
</script>
<style></style>
...@@ -299,7 +299,7 @@ export default { ...@@ -299,7 +299,7 @@ export default {
} }
.illtrendchart { .illtrendchart {
height: 22vh; height: 26vh;
width: 30vw; width: 30vw;
} }
......
<template> <template>
<el-row :gutter="10" style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden"> <el-row
<el-col :span="17"> :gutter="10"
style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden"
>
<el-col :span="15">
<div id="map" class="maps"> <div id="map" class="maps">
<div class="search-vchan"> <div class="search-vchan">
<el-input placeholder="请输入内容" v-model="vchanname" class="input-with-select"> <el-input
<el-button slot="append" type="primary" icon="el-icon-search" @click="searchvchan"></el-button> placeholder="请输入内容"
v-model="vchanname"
class="input-with-select"
>
<el-button
slot="append"
type="primary"
icon="el-icon-search"
@click="searchvchan"
></el-button>
</el-input> </el-input>
</div> </div>
<showmap ref="map"></showmap> <showmap ref="map"></showmap>
...@@ -22,11 +34,9 @@ ...@@ -22,11 +34,9 @@
</div> </div>
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
</el-col>
<el-col :span="7">
<el-row> <el-row>
<div class="collect-box card-hover"> <div class="collect-box card-hover">
<div class="header-title">今日抓拍量</div> <div class="header-title">重点车辆分布</div>
<div class="collect-content"> <div class="collect-content">
<el-col :span="6" class="content-item"> <el-col :span="6" class="content-item">
<div class="item-num">{{ snapData.kakou_total_snap_num }}</div> <div class="item-num">{{ snapData.kakou_total_snap_num }}</div>
...@@ -41,13 +51,22 @@ ...@@ -41,13 +51,22 @@
<div>违法总量</div> <div>违法总量</div>
</el-col> </el-col>
<el-col :span="6" class="content-item"> <el-col :span="6" class="content-item">
<div class="item-num">{{ snapData.key_vehicle_total_snap_num }}</div> <div class="item-num">
{{ snapData.key_vehicle_total_snap_num }}
</div>
<div>特殊车辆总量</div> <div>特殊车辆总量</div>
</el-col> </el-col>
</div> </div>
</div> </div>
</el-row> </el-row>
<el-row :gutter="12" class="event-type-box" style="margin-top:1vh"> </el-col>
<el-col :span="9">
<el-row style="margin-top:1vh;background:#fff">
<div class="card-hover">
<illegaltrend></illegaltrend>
</div>
</el-row>
<el-row :gutter="12" class="event-type-box" style="margin-top:1.5vh">
<el-col :span="16"> <el-col :span="16">
<div class="right-item-box card-hover"> <div class="right-item-box card-hover">
<eventTypedis></eventTypedis> <eventTypedis></eventTypedis>
...@@ -61,9 +80,7 @@ ...@@ -61,9 +80,7 @@
<span class="icon-fanxing-zhatuchezhuapai"></span> <span class="icon-fanxing-zhatuchezhuapai"></span>
</div> </div>
<div class="right-content"> <div class="right-content">
<div> <div><span class="car-num">10</span></div>
<span class="car-num">10</span>
</div>
<div>渣土车抓拍</div> <div>渣土车抓拍</div>
</div> </div>
</div> </div>
...@@ -72,9 +89,7 @@ ...@@ -72,9 +89,7 @@
<span class="icon-fanxing-weixianpin"></span> <span class="icon-fanxing-weixianpin"></span>
</div> </div>
<div class="right-content"> <div class="right-content">
<div> <div><span class="car-num">10</span></div>
<span class="car-num">10</span>
</div>
<div>危险品车</div> <div>危险品车</div>
</div> </div>
</div> </div>
...@@ -83,27 +98,22 @@ ...@@ -83,27 +98,22 @@
<span class="icon-fanxing-zhongxingguanshi"></span> <span class="icon-fanxing-zhongxingguanshi"></span>
</div> </div>
<div class="right-content"> <div class="right-content">
<div class> <div class><span class="car-num">29</span></div>
<span class="car-num">29</span>
</div>
<div>重型罐式车</div> <div>重型罐式车</div>
</div> </div>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top:1vh;background:#fff"> <div style="clear: both;"></div>
<div class="card-hover"> </el-col>
<illegaltrend></illegaltrend> <el-col :span="24">
</div> <el-row class="clearpright" style="margin-top:2vh">
</el-row>
<el-row class="clearpright" style="margin-top:1vh">
<div class="right-item-box card-hover"> <div class="right-item-box card-hover">
<div class="title">实时数据</div> <div class="title">实时数据</div>
<alarmEvent @event="alarmevent"></alarmEvent> <alarmEvent @event="alarmevent"></alarmEvent>
</div> </div>
</el-row> </el-row>
<div style="clear: both;"></div>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
...@@ -128,12 +138,12 @@ export default { ...@@ -128,12 +138,12 @@ export default {
keyVehicleData: [], keyVehicleData: [],
illageList: [], illageList: [],
setShow: false, setShow: false,
ocxstatus:true, ocxstatus: true,
archiveUnid: 0, archiveUnid: 0,
snap_num: 0, snap_num: 0,
playurl: {}, playurl: {},
vchanname:'', vchanname: "",
playurl2:"", playurl2: "",
audit_num: 0, audit_num: 0,
snapData: { snapData: {
illega_total_snap_num: 0, illega_total_snap_num: 0,
...@@ -166,19 +176,17 @@ export default { ...@@ -166,19 +176,17 @@ export default {
// this.$refs.mapvideo.videoPlay(); // this.$refs.mapvideo.videoPlay();
// },100) // },100)
// }) // })
}, },
methods: { methods: {
alarmevent(data) { alarmevent(data) {
//移动地图 //移动地图
this.$refs.map.movemap(data); this.$refs.map.movemap(data);
}, },
searchvchan(){ searchvchan() {
this.$refs.map.searchvchan(this.vchanname) this.$refs.map.searchvchan(this.vchanname);
}, },
closeocx(){ closeocx() {
this.ocxstatus=false; this.ocxstatus = false;
}, },
getTrafficSnap() { getTrafficSnap() {
this.$api.show.getTrafficSnap().then(res => { this.$api.show.getTrafficSnap().then(res => {
...@@ -202,9 +210,14 @@ export default { ...@@ -202,9 +210,14 @@ export default {
.collect-box { .collect-box {
height: 11.8vh; height: 11.8vh;
background: #fff; background: #fff;
margin-top .5vh
.header-title { .header-title {
padding: 10px 0px 0 20px; padding: 10px 0px 0 20px;
width:113px;
height:20px;
font-size:14px;
color:rgba(0,0,0,1);
line-height:20px;
} }
.collect-content { .collect-content {
...@@ -336,7 +349,7 @@ export default { ...@@ -336,7 +349,7 @@ export default {
} }
.maps { .maps {
height: 89.3vh; height: 45vh;
width: 100%; width: 100%;
margin-bottom: 8px; margin-bottom: 8px;
position: relative; position: relative;
...@@ -367,42 +380,22 @@ export default { ...@@ -367,42 +380,22 @@ export default {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin: 1vh 0.3vw; margin: 1vh 0.3vw;
overflow hidden
.left-icon { .left-icon {
width: 3vw; width: 3vw;
height: 6vh; height: 6vh;
line-height: 6vh; line-height: 6vh;
text-align: center; text-align: center;
overflow hidden
span { span {
font-size: 30px; font-size: 30px;
color rgba(179,229,252,1);
background #3BB7FF;
} }
} }
} }
.car-dis-info:nth-child(2) {
.left-icon {
span {
color: #FF9630;
}
}
}
.car-dis-info:nth-child(3) {
.left-icon {
span {
color: #F56C6C;
}
}
}
.car-dis-info:nth-child(4) {
.left-icon {
span {
color: #36BEA6;
}
}
}
.car-num { .car-num {
font-size: 22px; font-size: 22px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!