Commit e95272b2 by 潘建波

Merge branch 'fanxing' of http://git.keliuyun.com:55676/platform/fanxing_new into fanxing

2 parents b2270a01 fe11597d
No preview for this file type
......@@ -35,7 +35,7 @@ export default {
<style lang="scss">
#app {
height: 100%;
font-family: MicrosoftYaHeiUI;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
......
......@@ -69,5 +69,8 @@ export default {
},
getRebootSetting(params,id,id2){
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
......@@ -39,5 +39,17 @@ export default {
getDevList(devid) {
// 获取设备信息
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
......@@ -27,8 +27,8 @@ export default {
getSubTask(taskid) {
return api.get(urls.getSubTask(taskid));
},
getStream(devid, vrefid) {
return api.get(urls.getstream(devid, vrefid));
getStream(devid, vrefid, params) {
return api.post(urls.getstream(devid, vrefid), params);
},
getPlayUrl(subid) {
return api.get(urls.getPlayUrl(subid)); // 获取播放地址
......@@ -47,5 +47,14 @@ export default {
},
setTaskStatus(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 {
return `${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtask`;
},
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 => {
return `${baseUrl}/api/v1/devconf_fx/analyse/live/play_url?subtask_id=${subid}`; // 获取播放地址
......@@ -42,5 +42,14 @@ export default {
},
changeTask: taskid => {
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{
height: 100%;
}
*{
padding: 0;
......@@ -266,4 +267,24 @@ body{
-o-transition: all .25s ease;
-moz-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
......@@ -33,3 +33,7 @@ new Vue({
store,
render: h => h(App)
}).$mount("#app");
//用户退出时清除相关信息
// window.onunload = function() {
// localStorage.clear();
// };
<template>
<div id="login" :style="{ height: innerHeight + 'px' }">
<!-- ie空白解决方法https://blog.csdn.net/heyNewbie/article/details/99623550 -->
<!-- ie空白解决方法https://blog.csdn.net/heyNewbie/article/details/99623550 -->
<!-- <vue-particles
color="#dedede"
:particleOpacity="0.7"
......@@ -113,7 +113,7 @@ export default {
// localStorage.setItem('rtoken',m.data.rtoken)
sessionStorage.setItem("user_unid", res.user_unid);
//本系统可以直接用本地缓存做
localStorage.setItem("atoken", res.atoken);
localStorage.setItem("atoken", res.atoken);
// 处理登录用户权限菜单显示问题;
//算法配置列表
this.algoList();
......@@ -127,131 +127,159 @@ export default {
this.getDev();
this.getMenu(res.user_unid);
}
}).catch((err) => {
})
},
getMenu(id){
//获取菜单
this.$api.login.getMenus({
"shape":"tree"
}).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() {
this.$api.login.algocombs({
limit: '',
algo_set: 'video'
}).then(res => {
if(!res.ecode){
this.$store.commit(types.ALGO,res.list_data);
}
}).catch((err) => {
})
},
storeConfList(){
this.$api.login.storeconfs({
offset: 0,
limit: ''
}).then(res => {
if(!res.ecode){
this.$store.commit(types.STORECONF,res.list_data);
}
}).catch((err) => {
})
},
getCodeList(){
this.$api.codes.cates().then(res => {
res.list_data.forEach(item=>{
this.$api.codes.codes({
},item.cate_unid).then(res => {
// 存储code列表
window.localStorage.setItem(item.name,JSON.stringify(res.list_data))
// 存储单独code
res.list_data.forEach(chilItem=>{
window.localStorage.setItem(item.name+'-'+chilItem.code,chilItem.name)
})
}).catch((err) => {
})
})
}).catch((err) => {
})
},
getCustomCode(){
this.$api.codes.customCode().then(res => {
if(res.list_data.length > 0) {
res.list_data.forEach((item) => {
window.localStorage.setItem(item.name + '-' + item.cate, item.unid);
})
} else {
this.$message({
type: 'warning',
message: '获取自定义编码失败!'
})
}
}).catch((err) => {
})
},
getCatesList(){
this.$api.codes.eventCates({}).then(res=>{
// 存储cate列表
window.localStorage.setItem('cate列表',JSON.stringify(res.list_data))
// 存储单独code
res.list_data.forEach(item=>{
this.getOneEventList(item.code,item.event_cate_unid)
})
})
},
getOneEventList(code,id){
this.$api.codes.eventType({},id).then(res=>{
// 存储cate列表
window.localStorage.setItem(code,JSON.stringify(res.list_data))
})
},
getEventList(){
this.$api.search.eventTypes({}).then(res=>{
// 存储code列表
window.localStorage.setItem('安防事件',JSON.stringify(res.list_data))
// 存储单独code
res.list_data.forEach(item=>{
window.localStorage.setItem('安防事件-'+item.code,item.name)
})
})
},
getDev() {
this.$api.resource.devs().then(res => {
localStorage.setItem('dev_unid',res[0].dev_unid);
this.getDevsName(res[0].dev_unid);
})
},
getDevsName(id){
this.$api.resource.getDevsName({
is_leaf: 0
},id).then(res=>{
if(res.list_data.length>0){
sessionStorage.setItem('device_id',res.list_data[0].device_id);
}
})
},
},
watch: {},
mounted() {
},
created() {
this.initHeight();
let _this=this;
document.onkeydown = function(e){
let _key = window.event.keyCode;
if(_key === 13){
_this.submitForm('ruleForm');
}
}
}
}
})
.catch(err => {});
},
getMenu(id) {
//获取菜单
this.$api.login
.getMenus({
shape: "tree"
})
.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() {
this.$api.login
.algocombs({
limit: "",
algo_set: "video"
})
.then(res => {
if (!res.ecode) {
this.$store.commit(types.ALGO, res.list_data);
}
})
.catch(err => {});
},
storeConfList() {
this.$api.login
.storeconfs({
offset: 0,
limit: ""
})
.then(res => {
if (!res.ecode) {
this.$store.commit(types.STORECONF, res.list_data);
}
})
.catch(err => {});
},
getCodeList() {
this.$api.codes
.cates()
.then(res => {
res.list_data.forEach(item => {
this.$api.codes
.codes({}, item.cate_unid)
.then(res => {
// 存储code列表
window.localStorage.setItem(
item.name,
JSON.stringify(res.list_data)
);
// 存储单独code
res.list_data.forEach(chilItem => {
window.localStorage.setItem(
item.name + "-" + chilItem.code,
chilItem.name
);
});
})
.catch(err => {});
});
})
.catch(err => {});
},
getCustomCode() {
this.$api.codes
.customCode()
.then(res => {
if (res.list_data.length > 0) {
res.list_data.forEach(item => {
window.localStorage.setItem(
item.name + "-" + item.cate,
item.unid
);
});
} else {
this.$message({
type: "warning",
message: "获取自定义编码失败!"
});
}
})
.catch(err => {});
},
getCatesList() {
this.$api.codes.eventCates({}).then(res => {
// 存储cate列表
window.localStorage.setItem("cate列表", JSON.stringify(res.list_data));
// 存储单独code
res.list_data.forEach(item => {
this.getOneEventList(item.code, item.event_cate_unid);
});
});
},
getOneEventList(code, id) {
this.$api.codes.eventType({}, id).then(res => {
// 存储cate列表
window.localStorage.setItem(code, JSON.stringify(res.list_data));
});
},
getEventList() {
this.$api.search.eventTypes({}).then(res => {
// 存储code列表
window.localStorage.setItem("安防事件", JSON.stringify(res.list_data));
// 存储单独code
res.list_data.forEach(item => {
window.localStorage.setItem("安防事件-" + item.code, item.name);
});
});
},
getDev() {
this.$api.resource.devs().then(res => {
localStorage.setItem("dev_unid", res[0].dev_unid);
this.getDevsName(res[0].dev_unid);
});
},
getDevsName(id) {
this.$api.resource
.getDevsName(
{
is_leaf: 0
},
id
)
.then(res => {
if (res.list_data.length > 0) {
sessionStorage.setItem("device_id", res.list_data[0].device_id);
}
});
}
},
watch: {},
mounted() {},
created() {
this.initHeight();
let _this = this;
document.onkeydown = function(e) {
let _key = window.event.keyCode;
if (_key === 13) {
_this.submitForm("ruleForm");
}
};
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
......
<template>
<div class="devinfo-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>分析资源</div>
<div><span>64</span></div>
</div>
</div>
<div class="item-box">
<div class="icon el-icon-view"></div>
<div class="icon icon-fanxing-yunhanglushu"></div>
<div class="item-info-box">
<div>运行路数</div>
<div> <span>47</span></div>
</div>
</div>
<div class="item-box">
<div class="icon el-icon-bell"></div>
<div class="icon icon-fanxing-yunhangyichang"></div>
<div class="item-info-box">
<div>运行异常</div>
<div><span>6</span></div>
</div>
</div>
<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>信息存储量</div>
<div><span>1.2</span> T</div>
......@@ -45,6 +45,9 @@ export default {
height: 28vh;
background: rgba(255, 255, 255, 1);
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
.item-box{
margin-top 2vh
......
<template>
<div class="contentBox minHeight">
<el-col :span="12">
<el-form label-position="left" label-width="80px" :model="formLabelAlign">
<el-form-item label="视频1">
<el-input v-model="formLabelAlign.video1"></el-input>
</el-form-item>
<el-form-item label="视频2">
<el-input v-model="formLabelAlign.video2"></el-input>
</el-form-item>
<el-form-item label="视频3">
<el-input v-model="formLabelAlign.video3"></el-input>
</el-form-item>
<el-form-item label="视频4">
<el-input v-model="formLabelAlign.video4"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">提交</el-button>
</el-form-item>
</el-form>
<div class="contentBox minHeight">
<el-col :span="12">
<el-form label-position="left" label-width="80px" :model="formLabelAlign">
<el-form-item label="视频1">
<el-input v-model="formLabelAlign.video1"></el-input>
</el-form-item>
<el-form-item label="视频2">
<el-input v-model="formLabelAlign.video2"></el-input>
</el-form-item>
<el-form-item label="视频3">
<el-input v-model="formLabelAlign.video3"></el-input>
</el-form-item>
<el-form-item label="视频4">
<el-input v-model="formLabelAlign.video4"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">提交</el-button>
</el-form-item>
</el-form>
</el-col>
</div>
</div>
</template>
<script>
export default {
data(){
return{
activeName: 'first',
height:'',
formLabelAlign:{
video1:"",
video2:"",
video3:"",
video4:"",
}
}
},
mounted(){
},
methods:{
handleClick(tab, event) {
},
onSubmit(){
export default {
data() {
return {
activeName: "first",
height: "",
vchan_conf_unid: "",
formLabelAlign: {
video1: "",
video2: "",
video3: "",
video4: ""
}
};
},
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;
}
});
},
onSubmit() {
let data = {
conf: [
{
name: "1",
url: this.formLabelAlign.video1,
isActive: true
},
{
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>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<style lang="scss" scoped></style>
<template>
<div class="contentBox minHeight">
<div :style="{'background': '#FFFFFF','min-height': height}">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="校时设置" name="first">
<proofreadtime></proofreadtime>
</el-tab-pane>
<el-tab-pane label="系统维护" name="second">
<sytemset></sytemset>
</el-tab-pane>
<el-tab-pane label="展示设置" name="third">
<showset></showset>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="contentBox minHeight">
<div :style="{ background: '#FFFFFF', 'min-height': height }">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="校时设置" name="first">
<proofreadtime></proofreadtime>
</el-tab-pane>
<el-tab-pane label="系统维护" name="second">
<sytemset></sytemset>
</el-tab-pane>
<el-tab-pane label="展示设置" name="third">
<showset></showset>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import proofreadtime from './systemComponents/proofreadtime'
import sytemset from './systemComponents/sytemSet'
import showset from './systemComponents/showSet'
export default {
data(){
return{
activeName: 'first',
height:''
}
},
components:{
proofreadtime,sytemset,showset
},
mounted(){
this.height=document.body.clientHeight - 140 + 'px'
},
methods:{
handleClick(tab, event) {
console.log(tab, event);
}
},
}
import proofreadtime from "./systemComponents/proofreadtime";
import sytemset from "./systemComponents/sytemSet";
import showset from "./systemComponents/showSet";
export default {
data() {
return {
activeName: "first",
height: ""
};
},
components: {
proofreadtime,
sytemset,
showset
},
mounted() {
this.height = document.body.clientHeight - 140 + "px";
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
}
}
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<style lang="scss" scoped></style>
<template>
<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%"
height="100%">
<object
id="VionVideo1"
classid="clsid:93F960BB-5AF9-402B-A3DF-06112F14DC02"
codebase="VionPlatformVideo.ocx"
width="100%"
height="100%"
>
<!-- <param name="_Version" value="65536">
<param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323">
......@@ -10,115 +15,127 @@
</div>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
data() {
return {
urlFlag:false,
isShow:true
};
},
props: ['playurl', 'type'],
methods: {
videoPlay: function () {
this.urlFlag = false
if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url
let ocxPlayRes = document.getElementById('VionVideo1').StartPlay(url, 0);
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes);
if (ocxPlayRes != 0) {
alert('播放失败!');
}
} else {
let OcxResponse = document.getElementById('VionVideo1').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) {
alert('播放失败!');
}
import { mapState } from "vuex";
export default {
data() {
return {
urlFlag: false,
isShow: true
};
},
props: ["playurl", "type"],
methods: {
videoPlay: function() {
this.urlFlag = false;
if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url;
let ocxPlayRes = document
.getElementById("VionVideo1")
.StartPlay(url, 0);
console.log("video Ocx播放rtsp流返回值:", ocxPlayRes);
if (ocxPlayRes != 0) {
alert("播放失败!");
}
},
downOcx: function () {
if (this.fileUrl !== '' && !this.installOcx) {
location.href = this.fileUrl;
} else {
let OcxResponse = document
.getElementById("VionVideo1")
.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) {
alert("播放失败!");
}
},
installOcxInfo: function () {
this.$confirm('为了正常使用,是否安装OCX控件?', '友情提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}
},
downOcx: function() {
if (this.fileUrl !== "" && !this.installOcx) {
location.href = this.fileUrl;
}
},
installOcxInfo: function() {
this.$confirm("为了正常使用,是否安装OCX控件?", "友情提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.installOcx = false;
this.downOcx();
}).catch(() => {
})
.catch(() => {
this.installOcxInfo();
});
},
initocx() {
VionVideo1.Init(0, 'Null', 4);
},
downloadOCx() {
// if (navigator.userAgent.indexOf('Trident') > -1) {
// this.axios.get(IP + "/api/v1/device/dlfile", {
// params: {
// file_type: "video_ocx"
// }
// })
// .then(response => {
// location.href = response.data.file_url;
// });
// } else {
// this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// }
},
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
}
}
},
created() {
// this.checkIE();
},
computed: {
...mapState(['ocxstate'])
initocx() {
VionVideo1.Init(0, "Null", 4);
},
mounted() {
// VionVideo1.Init(0, 'Null', 4);
// try {
// if (document.getElementById("VionVideo1").GetVersion()) {
// }
// } catch (error) {
// this.downloadOCx();s
downloadOCx() {
// if (navigator.userAgent.indexOf('Trident') > -1) {
// this.axios.get(IP + "/api/v1/device/dlfile", {
// params: {
// file_type: "video_ocx"
// }
// })
// .then(response => {
// location.href = response.data.file_url;
// });
// } else {
// this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// }
},
watch: {
ocxstate(val) {
try {
if(val == 0){
this.isShow = false
document.getElementById("VionVideo1").StartPlay(1);
} else {
this.isShow = true
document.getElementById("VionVideo1").StartPlay(0);
}
} catch (error) {
console.log(error)
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (
/(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
document.documentMode < 10
) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
}
}
},
created() {
// this.checkIE();
},
computed: {
...mapState(["ocxstate"])
},
mounted() {
// VionVideo1.Init(0, 'Null', 4);
// try {
// if (document.getElementById("VionVideo1").GetVersion()) {
// }
// } catch (error) {
// this.downloadOCx();s
// }
},
watch: {
ocxstate(val) {
try {
if (val == 0) {
this.isShow = false;
document.getElementById("VionVideo1").StartPlay(1);
} else {
this.isShow = true;
document.getElementById("VionVideo1").StartPlay(0);
}
},
},
beforeDestroy: function () {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
} catch (error) {
console.log(error);
}
}
};
},
beforeDestroy: function() {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
}
};
</script>
<style lang="stylus" scoped>
......
......@@ -25,7 +25,14 @@
export default {
data() {
return {};
return {
playlist:{
video1:'',
video2:'',
video3:'',
video4:'',
}
};
},
props: ["playersrc", "vnum"],
methods: {
......@@ -46,6 +53,21 @@ export default {
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() {
var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) {
......@@ -56,28 +78,19 @@ export default {
created() {
this.checkIE();
},
computed(){
},
mounted() {
var testStr = 'Null';
nvrTotalOcx.Init(2, testStr, 4);
nvrTotalOcx.SetSingleWindow(true);
nvrTotalOcx.SetParam("SetLanguage", "Chinese");
nvrTotalOcx.SetParam("VideoSize", 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)
setTimeout(()=> {
nvrTotalOcx.Init(2, testStr, 4);
nvrTotalOcx.SetSingleWindow(true);
nvrTotalOcx.SetParam("SetLanguage", "Chinese");
nvrTotalOcx.SetParam("VideoSize", 0);
this.playurl();
},3000)
var medianame = '视频0';
},
watch: {},
beforeDestroy: function () {
......@@ -93,5 +106,8 @@ export default {
.ocx-box{
height 50vh
width 35vw
background:rgba(255,255,255,1);
box-shadow:0px 2px 18px 0px rgba(0,26,70,0.3);
border-radius:10px;
}
</style>
<template>
<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%"
height="100%">
<object
id="VionVideo"
classid="clsid:93F960BB-5AF9-402B-A3DF-06112F14DC02"
codebase="VionPlatformVideo.ocx"
width="100%"
height="100%"
>
<!-- <param name="_Version" value="65536">
<param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323">
......@@ -10,115 +15,124 @@
</div>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
data() {
return {
urlFlag:false,
isShow:true
};
},
props: ['playurl', 'type'],
methods: {
videoPlay: function () {
this.urlFlag = false
if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url
let ocxPlayRes = document.getElementById('VionVideo').StartPlay(url, 0);
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes);
if (ocxPlayRes != 0) {
alert('播放失败!');
import { mapState } from "vuex";
export default {
data() {
return {
urlFlag: false,
isShow: true
};
},
props: ["playurl", "type"],
methods: {
videoPlay: function() {
this.urlFlag = false;
if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url;
let myVideo = document.getElementById("VionVideo");
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();
}
} else {
let OcxResponse = document.getElementById('VionVideo').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) {
alert('播放失败!');
if (ocxPlayRes != 0) {
alert("播放失败!");
}
} catch (error) {
console.log(error);
}
},
downOcx: function () {
if (this.fileUrl !== '' && !this.installOcx) {
location.href = this.fileUrl;
} else {
let OcxResponse = document
.getElementById("VionVideo")
.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) {
alert("播放失败!");
}
},
installOcxInfo: function () {
this.$confirm('为了正常使用,是否安装OCX控件?', '友情提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}
},
downOcx: function() {
if (this.fileUrl !== "" && !this.installOcx) {
location.href = this.fileUrl;
}
},
installOcxInfo: function() {
this.$confirm("为了正常使用,是否安装OCX控件?", "友情提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.installOcx = false;
this.downOcx();
}).catch(() => {
this.downloadOCx();
})
.catch(() => {
this.installOcxInfo();
});
},
initocx() {
VionVideo.Init(0, 'Null', 4);
},
downloadOCx() {
// if (navigator.userAgent.indexOf('Trident') > -1) {
// this.axios.get(IP + "/api/v1/device/dlfile", {
// params: {
// file_type: "video_ocx"
// }
// })
// .then(response => {
// location.href = response.data.file_url;
// });
// } else {
// this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
// }
},
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
}
}
},
created() {
// this.checkIE();
},
computed: {
...mapState(['ocxstate'])
initocx() {
VionVideo.Init(0, "Null", 4);
},
mounted() {
// VionVideo.Init(0, 'Null', 4);
// try {
// if (document.getElementById("VionVideo").GetVersion()) {
// }
// } catch (error) {
// this.downloadOCx();
// }
downloadOCx() {
if (navigator.userAgent.indexOf("Trident") > -1) {
let params = {
file_type: "video_ocx"
};
this.$api.ops.downloadOcx(params).then(response => {
location.href = response.data.file_url;
});
} else {
this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
}
},
watch: {
ocxstate(val) {
try {
if(val == 0){
this.isShow = false
document.getElementById("VionVideo").StartPlay(1);
} else {
this.isShow = true
document.getElementById("VionVideo").StartPlay(0);
}
} catch (error) {
console.log(error)
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (
/(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
document.documentMode < 10
) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
}
}
},
created() {
// this.checkIE();
},
computed: {
...mapState(["ocxstate"])
},
watch: {
ocxstate(val) {
try {
if (val == 0) {
this.isShow = false;
document.getElementById("VionVideo").StartPlay(1);
} else {
this.isShow = true;
document.getElementById("VionVideo").StartPlay(0);
}
},
},
beforeDestroy: function () {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
} catch (error) {
console.log(error);
}
}
};
},
beforeDestroy: function() {
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
}
};
</script>
<style lang="stylus" scoped>
......
......@@ -2,91 +2,104 @@
<div class="item">
<div class="player">
<div class="ocx-box">
<object id="VionVideo" classid="clsid:96DFBBAF-4220-4978-9681-4ABA534A7718"
width="98%" height="550" style="margin-left:.9%">
<object
id="VionVideo"
classid="clsid:96DFBBAF-4220-4978-9681-4ABA534A7718"
width="98%"
height="550"
style="margin-left:.9%"
>
</object>
</div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
import { mapState } from "vuex";
export default {
data() {
return {};
},
props: ['playurl', 'type'],
methods: {
videoPlay: function () {
this.urlFlag = false
if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url
let ocxPlayRes = document.getElementById('VionVideo').StartPlay(url, 0);
console.log('video Ocx播放rtsp流返回值:', ocxPlayRes);
if (ocxPlayRes != 0) {
alert('播放失败!');
}
} else {
let OcxResponse = document.getElementById('VionVideo').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) {
alert('播放失败!');
}
}
},
initocx(){
VionVideo.Init(0, 'Null', 4);
},
downloadOCx() {
if (navigator.userAgent.indexOf('Trident') > -1) {
this.axios.get(IP + "/api/v1/device/dlfile", {
params: {
file_type: "video_ocx"
}
})
.then(response => {
location.href = response.data.file_url;
});
} else {
this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
data() {
return {};
},
props: ["playurl", "type"],
methods: {
videoPlay: function() {
this.urlFlag = false;
if (!this.playurl.sip_serv_ip) {
let url = this.playurl.rtsp_url;
let ocxPlayRes = document.getElementById("VionVideo").StartPlay(url, 0);
console.log("video Ocx播放rtsp流返回值:", ocxPlayRes);
if (ocxPlayRes != 0) {
alert("播放失败!");
}
},
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (/(msie\s|trident.*rv:)([\w.]+)/.test(agent) && document.documentMode < 10) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
} else {
let OcxResponse = document
.getElementById("VionVideo")
.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) {
alert("播放失败!");
}
}
},
created() {
this.checkIE();
initocx() {
VionVideo.Init(0, "Null", 4);
},
mounted() {
VionVideo.Init(0, 'Null', 4);
try {
if (document.getElementById("VionVideo").GetVersion()) {
}
} catch (error) {
this.downloadOCx();
downloadOCx() {
if (navigator.userAgent.indexOf("Trident") > -1) {
this.axios
.get(IP + "/api/v1/device/dlfile", {
params: {
file_type: "video_ocx"
}
})
.then(response => {
location.href = response.data.file_url;
});
} else {
this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
}
},
computed: {
...mapState(['ocxstate'])
},
watch: {
},
beforeDestroy: function () {
if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
this.videoplayer.pause();
checkIE() {
var agent = navigator.userAgent.toLowerCase();
if (
/(msie\s|trident.*rv:)([\w.]+)/.test(agent) &&
document.documentMode < 10
) {
this.$message.error("IE 版本过低请升级到IE10级以上版本!");
}
}
};
},
created() {
this.checkIE();
},
mounted() {
VionVideo.Init(0, "Null", 4);
try {
if (document.getElementById("VionVideo").GetVersion()) {
}
} catch (error) {
this.downloadOCx();
}
},
computed: {
...mapState(["ocxstate"])
},
watch: {},
beforeDestroy: function() {
if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
this.videoplayer.pause();
}
}
};
</script>
<style lang="stylus" scoped>
</style>
<style lang="stylus" scoped></style>
......@@ -10,8 +10,8 @@
:popper-append-to-body="false"
>
<el-option
v-for="item in catesData"
:key="item"
v-for="(item, index) in catesData"
:key="index"
:value="item.cate_unid"
:label="item.name"
></el-option>
......@@ -109,7 +109,7 @@
{ 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
label="名称"
......@@ -127,7 +127,7 @@
{ required: true, message: '备注名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.name"></el-input>
<el-input v-model="codeData.note"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -153,7 +153,8 @@ export default {
selectDevs: "",
detailVisible: false,
codeStatus: 0,
codeData: {}
codeData: {},
editdis:false,
};
},
components: {},
......@@ -178,11 +179,13 @@ export default {
this.codeStatus = 0;
this.detailVisible = true;
this.codeData.catename = this.getCateName(this.curCateUnid);
this.editdis = false;
},
editCode(index, row) {
this.codeStatus = 1;
this.detailVisible = true;
this.codeData = row;
this.editdis = true;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
getCateName(cateunid) {
......
......@@ -151,20 +151,25 @@ export default {
},
//发送推流请求
pushSteam(vdata) {
this.$api.task.getStream(this.dev_unid, vdata.vchan.vchan_id).then(m => {
console.log(m);
if (m.ecode) {
this.$message({
message: "发送推流请求失败:" + m.enote,
type: "error"
});
} else {
console.log("请求推送分析流成功", JSON.stringify(m));
setTimeout(() => {
this.getPlayUrl();
}, 500);
}
});
let data = {
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) {
this.$message({
message: "发送推流请求失败:" + m.enote,
type: "error"
});
} else {
setTimeout(() => {
this.getPlayUrl();
}, 2000);
}
});
},
getPlayUrl: function() {
this.$api.task.getPlayUrl(this.currentSubtaskId).then(res => {
......@@ -182,9 +187,6 @@ export default {
message: "获取rtsp播放地址失败!请重试!",
type: "error"
});
setTimeout(() => {
alert("获取rtsp播放地址失败!请重试!");
}, 0);
}
});
},
......
......@@ -2090,7 +2090,9 @@ export default {
}
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
// 红绿灯区域
let lightAry = [];
......@@ -2109,7 +2111,9 @@ export default {
light_regions: ele.light_regions
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
this.roiBody.lights = {
light_count: lightAry.length,
light: lightAry
......@@ -2135,7 +2139,9 @@ export default {
point: ary
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
this.roiBody.no_stop_region = {
region_count: noStopAry.length,
......@@ -2171,7 +2177,9 @@ export default {
point: bicAry
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
this.roiBody.pedestrian_detection_region = {
region_count: bicArys.length,
......@@ -2202,7 +2210,9 @@ export default {
point: denAry
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
this.roiBody.pedestrian_density_region = {
region_count: densityAry.length,
......@@ -2229,7 +2239,9 @@ export default {
point: foAry
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
this.roiBody.foreign_detection_region = {
region_count: foreignAry.length,
......@@ -2256,7 +2268,9 @@ export default {
point: foAry
});
});
} catch (error) {}
} catch (error) {
console.log(error);
}
this.roiBody.test_result_region = {
region_count: foreignAry.length,
......
......@@ -12,18 +12,17 @@
>
<el-table-column label="序号" type="index" width="50" align="center">
</el-table-column>
<el-table-column
prop="position_num"
align="center"
label="预置位编号"
width="180"
>
<el-table-column align="center" label="预置位编号" width="180">
<template slot-scope="scope">
<div>
{{ setpositionnum(scope.row.position_num) }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="预设位置配置" width="180">
<template>
<div class="yzw-setbox">
<span class="icon el-icon-folder-add"></span>
<span class="icon el-icon-delete"></span>
<span class="icon el-icon-delete" @click="resetRoi"></span>
</div>
</template>
</el-table-column>
......@@ -32,7 +31,9 @@
<div class="table-set">
<span @click="setParam(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>
</div>
</template>
......@@ -46,7 +47,8 @@
<div class="set-item">
轮询播放
<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>
</div>
<div class="set-item" @click="handleparam('upload')">
......@@ -62,7 +64,11 @@
<handleparam ref="handleparam"></handleparam>
</div>
<div class="yt-box">
<ytconfig ref="yt" @subpostion="submitPosion"></ytconfig>
<ytconfig
ref="yt"
@subpostion="submitPosion"
@deleteytconfig="deleteytconfig"
></ytconfig>
</div>
<div>
<parameter ref="parameter"></parameter>
......@@ -117,7 +123,8 @@
width="30"
v-model="polling_state"
active-color="#13ce66"
inactive-color="#ff4949">
inactive-color="#ff4949"
>
</el-switch>
</div>
</div>
......@@ -166,22 +173,30 @@ export default {
},
methods: {
setParam(scenesdata, index) {
this.curindex = index;
this.$refs.parameter.init(scenesdata);
if (this.checkpollstate()) {
this.curindex = index;
this.$refs.parameter.init(scenesdata);
}
},
setArea(roidata, index) {
this.curindex = index;
this.$refs.areas.showModal(roidata, this.taskInfo);
if (this.checkpollstate()) {
this.curindex = index;
this.$refs.areas.showModal(roidata, this.taskInfo);
}
},
setDemarcate(scenesdata, index) {
this.curindex = index;
this.$refs.demarcate.showModal(scenesdata);
if (this.checkpollstate()) {
this.curindex = index;
this.$refs.demarcate.showModal(scenesdata);
}
},
handleparam(type) {
this.$refs.handleparam.show(type);
},
setsounces() {
this.$refs.yt.openyt(this.currentRow);
if (this.checkpollstate()) {
this.$refs.yt.openyt(this.currentRow);
}
},
getTaskParams() {
this.$api.task.getTaskParams(this.taskid, this.subtaskid).then(data => {
......@@ -194,12 +209,52 @@ export default {
this.$store.commit("setocxstate", 0);
this.timerDialog = true;
},
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() {
this.timerDialog = false;
this.$store.commit("setocxstate", 1);
},
handleCurrentChange(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) {
this.taskInfo.mtasks[0].scenes.map(ele => {
......@@ -209,6 +264,14 @@ export default {
});
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) {
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
......@@ -309,6 +372,7 @@ export default {
subtaskid(val) {
this.$api.task.getTaskParams(this.taskid, val).then(res => {
this.taskInfo = res;
this.switchstate = res.alternate_status == 1 ? true : false;
console.log(res.data);
});
}
......
......@@ -80,6 +80,9 @@
<div class="closebtn item-box">
<el-button @click="closeyt">关闭</el-button>
</div>
<div class="delbtn item-box">
<el-button @click="deleteytconfig" type="danger">删除</el-button>
</div>
</div>
</div>
</div>
......@@ -133,6 +136,10 @@ export default {
},
subset() {
this.$emit("subpostion", this.presetindex);
},
deleteytconfig() {
this.$emit("deleteytconfig", this.presetindex);
this.showyt = false;
}
}
};
......@@ -207,4 +214,7 @@ export default {
.subbtn {
margin: 1vh 0.3vw 0 2vw;
}
.delbtn {
margin-left:.4vw
}
</style>
......@@ -183,8 +183,8 @@ export default {
source_type: "pull_video_stream",
dev_unid: this.dev_unid,
node_count: 0,
start_dt: this.setUtcTime(this.formData.timer[0]),
end_dt: this.setUtcTime(this.formData.timer[1]),
start_dt: this.formData.period === 1 ? "2020-03-27 00:00:00" : this.setUtcTime(this.formData.timer[0]),
end_dt: this.formData.period === 1 ? "2020-03-27 00:00:00" : this.setUtcTime(this.formData.timer[1]),
priority: this.formData.priority,
store_conf_unid: this.formData.store_conf.unid,
period: this.formData.period,
......@@ -202,7 +202,7 @@ export default {
this.addTask(formData);
}
if (this.pedittype == "edit") {
this.editTask(formData);
this.editTask(postData);
}
},
addTask(data) {
......
......@@ -7,20 +7,7 @@
width="906px"
:before-close="handleClose"
>
<!-- 内层dialog -->
<!-- <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> -->
<moveTask ref="movetask"></moveTask>
<div>
<!-- 外层内容 -->
<div class="leftBox">
......@@ -55,11 +42,11 @@
prop="name"
label="视频源名称"
></el-table-column>
<el-table-column
align="center"
prop="running_status"
label="视频状态"
></el-table-column>
<el-table-column align="center" label="视频状态">
<template slot-scope="scope">
<div v-html="statusFormatter(scope.row)"></div>
</template>
</el-table-column>
<el-table-column
align="center"
width="136"
......@@ -106,16 +93,17 @@
</template>
<script>
import videoplay from "../public/videoPlay";
import moveTask from "./moveSubTask";
export default {
data() {
return {
innerVisible: false,
tableData: [],
play_url: "",
user_unid: "",
formData: {},
editData: {},
taskData:{},
moveTaskData:[],
setvisible: false,
props: {
id: "vchan_refid",
......@@ -146,7 +134,8 @@ export default {
}
},
components: {
videoplay
videoplay,
moveTask
},
mounted() {
console.log(this.setvisible);
......@@ -166,7 +155,7 @@ export default {
data[i].vchan.subtask_id = data[i].subtask_id;
data[i].vchan.refid = data[i].vchan.vchan_refid;
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 {
data.vchan = {
subtask_id: data[i].subtask_id,
......@@ -182,6 +171,21 @@ export default {
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) {
console.log(node);
let staus = false;
......@@ -344,7 +348,9 @@ export default {
try {
window.clearTimeout(this.timeout1);
window.clearTimeout(this.timeout2);
} catch (err) {}
} catch (err) {
console.log(err);
}
// var e = e || window.event;
this.play_url = "";
// if (this.testIe.isIe) {
......@@ -443,7 +449,7 @@ export default {
this.setvisible = false;
},
moveFun(index, row) {
this.innerVisible = true;
this.$refs.movetask.initMoveTask(row, this.taskData);
}
},
created() {
......
......@@ -28,7 +28,7 @@
<div class="rightBox">
<img src="../../assets/img/taskmanage/pic3.png" alt="" />
<span class="textCon">
<div class="topText">80</div>
<div class="topText">{{total}}</div>
<div class="bottomText">任务数量</div>
</span>
</div>
......@@ -97,12 +97,12 @@
</el-table-column>
<el-table-column prop="task_name" align="center" label="任务名称">
</el-table-column>
<el-table-column
align="center"
prop="status"
:formatter="statusFormatter"
label="状态"
<el-table-column align="center" label="状态">
>
<template slot-scope="scope">
<div v-html="statusFormatter(scope.row)">
</div>
</template>
</el-table-column>
<el-table-column
align="center"
......@@ -117,11 +117,11 @@
label="存储配置"
>
</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 align="center" prop="workers_count" label="资源用量">
</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
align="center"
......@@ -151,7 +151,7 @@
:visible-arrow="false"
>
<span
class="icon-fanxing-xiugai editIcon"
class="el-icon-video-camera-solid editIcon"
@click="editVideo(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -303,19 +303,19 @@ export default {
row.isexpand = false;
}
},
statusFormatter(row, column, cellValue, index) {
if (cellValue == "Running") {
return "工作中";
} else if (cellValue == "Finished") {
return "已完成";
} else if (cellValue == "Pause") {
return "暂停";
} else if (cellValue == "Error") {
return "异常";
} else if (cellValue == "Deleted") {
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 "未部署";
return "<span class='nomoralbox statusbox'>未部署</span>";
}
},
priorityFormatter(row, column, cellValue, index) {
......@@ -337,13 +337,12 @@ export default {
},
dateFormatter(row, column, cellValue, index) {
if (row.period) {
return "全天"
return "全天";
} else {
let startDate = cellValue ? cellValue.split(" ")[0] : "";
let endDate = row.end_dt ? row.end_dt.split(" ")[0] : "";
return startDate + " ~ " + endDate;
}
},
typeFormatter(row, column, cellValue, index) {
if (cellValue == 0) {
......@@ -589,4 +588,7 @@ export default {
color: #f2365a;
font-size: 16px;
}
.statusbox {
background: red;
}
</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>
......@@ -26,7 +26,7 @@
<el-col :span="7">
<el-row>
<div class="collect-box card-hover">
<div class="header-title">今日抓拍量</div>
<div class="header-title">重点车辆分布</div>
<div class="collect-content">
<el-col :span="6" class="content-item">
<div class="item-num">{{ snapData.kakou_total_snap_num }}</div>
......@@ -205,6 +205,11 @@ export default {
.header-title {
padding: 10px 0px 0 20px;
width:113px;
height:20px;
font-size:14px;
color:rgba(0,0,0,1);
line-height:20px;
}
.collect-content {
......@@ -367,42 +372,22 @@ export default {
display: flex;
flex-direction: row;
margin: 1vh 0.3vw;
overflow hidden
.left-icon {
width: 3vw;
height: 6vh;
line-height: 6vh;
text-align: center;
overflow hidden
span {
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 {
font-size: 22px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!