Commit 9ca2a12a by 夏新然

解决冲突

2 parents 5cfbf6d1 8f739a8a
Showing 64 changed files with 1648 additions and 983 deletions
No preview for this file type
......@@ -6,36 +6,37 @@
<script>
export default {
data() {
return {
}
return {};
},
created(){
let menus = JSON.parse(localStorage.getItem('menu'))
if(menus) {
this.$store.dispatch('GetMenuRole',menus).then(res => {})
created() {
let menus = JSON.parse(localStorage.getItem("menu"));
if (menus) {
this.$store.dispatch("GetMenuRole", menus).then(res => {});
}
let token = localStorage.getItem("atoken");
if (!token) {
console.log('errtoken')
this.$router.push("/login");
}
},
mounted(){
window.videoEquitTableHeight = document.body.clientHeight - 142 + 'px';
window.opsTableHeight = document.body.clientHeight - 260 + 'px';
if(document.body.clientWidth>1366){
window.oneSearchTableHeight = document.body.clientHeight - 250 + 'px';
window.twoSearchTableHeight = document.body.clientHeight - 280 + 'px';
}else {
window.oneSearchTableHeight = document.body.clientHeight - 280 + 'px';
window.twoSearchTableHeight = document.body.clientHeight - 315 + 'px';
}
mounted() {
window.videoEquitTableHeight = document.body.clientHeight - 142 + "px";
window.opsTableHeight = document.body.clientHeight - 260 + "px";
if (document.body.clientWidth > 1366) {
window.oneSearchTableHeight = document.body.clientHeight - 250 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 280 + "px";
} else {
window.oneSearchTableHeight = document.body.clientHeight - 280 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 315 + "px";
}
}
}
};
</script>
<style lang="scss">
#app {
height: 100%;
font-family:MicrosoftYaHeiUI;
font-family: MicrosoftYaHeiUI;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
......
import axios from 'axios'
import store from '../store/index.js'
import axios from "axios";
import store from "../store/index.js";
import router from "../router/index";
import {Message,Loading} from 'element-ui'
let loading;
......@@ -27,15 +28,17 @@ function endLoading() {
let service = axios.create({
// headers: {'Content-Type': 'application/json'},
timeout: 60000
})
});
// 添加请求拦截器
service.interceptors.request.use(
(config) => {
startLoading();
if (store.state.users.atoken) { // 判断是否存在token,如果存在的话,则每个http header都加上token
config.headers.authorization = store.state.users.atoken;
}else{
router.push("/login");
endLoading();
}
if (config.method == 'get') {
config.params = {
......@@ -43,16 +46,35 @@ service.interceptors.request.use(
...config.params
}
}
startLoading();
return config
},
(err) => {
// 请求错误处理
return Promise.reject(err)
// config => {
// let token = localStorage.getItem("atoken");
// if (token) {
// // 判断是否存在token,如果存在的话,则每个http header都加上token
// config.headers.authorization = token;
// } else {
// router.push("/login");
// }
// if (config.method == "get") {
// config.params = {
// _t: Date.parse(new Date()) / 1000,
// ...config.params
// };
// }
// return config;
// },
// error => {
// // 请求错误处理
// return Promise.reject(error);
}
)
);
// 添加响应拦截器
service.interceptors.response.use(
(response) => {
endLoading();
......@@ -69,12 +91,12 @@ service.interceptors.response.use(
}
return Promise.reject(err)
}
)
);
/**
* 创建统一封装过的 axios 实例
* @return {AxiosInstance}
*/
export default function() {
return service
return service;
}
......@@ -10,7 +10,7 @@ switch (process.env.NODE_ENV) {
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break;
case "production":
baseUrl = "http://192.168.9.133:20080"; // 生产环境url
baseUrl = "http://vion-panda.51vip.biz:52510"; // 生产环境url
break;
}
......
......@@ -32,9 +32,12 @@ export default {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}/vchans/${refid}`); //获取分析流
},
sipSet(devid, userid) {
return api.get(`${baseUrl}/devconf_fx/devs/${devid}/${userid}/sip_server`)
return api.get(`${baseUrl}/devconf_fx/devs/${devid}/${userid}/sip_server`);
},
getStore(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/store_confs`, params)
return api.get(`${baseUrl}/api/v1/devconf_fx/store_confs`, params);
},
getFreelist(dev_unid, params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${dev_unid}/fx_devs/free`, params)
}
};
import api from '../index'
import baseUrl from '../baseUrl'
import api from "../index";
import baseUrl from "../baseUrl";
export default {
devs(params){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs`, params)
......@@ -19,7 +19,7 @@ export default {
getCode(params,id){
return api.get(`${baseUrl}/api/v1/codes/custom/cates/${id}/codes`, params)
},
editCamera(params,id,unid){
editCode(params,id,unid){
return api.post(`${baseUrl}/api/v1/codes/custom/cates/${id}/codes/${unid}`, params)
},
delCode(params,id,unid){
......@@ -52,35 +52,48 @@ export default {
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vfile_vchans`, params,{'Content-Type': 'multipart/form-data'})
},
getResource(params,id){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/status`, params)
},
getDevsName(params,id){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs`, params)
},
getStoreConList(params){
return api.get(`${baseUrl}/api/v1/devconf_fx/store_confs`, params)
},
uploadStore(params){
return api.post(`${baseUrl}/api/v1/devconf_fx/store_confs`, params,{'Content-Type': 'multipart/form-data'})
},
getSubTask(params,id){
return api.get(`${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtasks`, params)
},
delStore(params,id){
return api.delete(`${baseUrl}/api/v1/devconf_fx/store_confs/${id}`, params)
},
getsip(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/sip_server`, params)
},
addSip(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/sip_server`, params)
},
editSip(params,id,id2,id3){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`, params)
},
delSip(params,id,id2,id3){
return api.delete(`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`, params)
}
}
\ No newline at end of file
getResource(params, id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/status`, params);
},
getDevsName(params, id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs`, params);
},
getStoreConList(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/store_confs`, params);
},
uploadStore(params) {
return api.post(`${baseUrl}/api/v1/devconf_fx/store_confs`, params, {
"Content-Type": "multipart/form-data"
});
},
getSubTask(params, id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtasks`, params);
},
delStore(params, id) {
return api.delete(`${baseUrl}/api/v1/devconf_fx/store_confs/${id}`, params);
},
getsip(params, id, id2) {
return api.get(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/sip_server`,
params
);
},
addSip(params, id, id2) {
return api.post(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/sip_server`,
params
);
},
editSip(params, id, id2, id3) {
return api.post(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`,
params
);
},
delSip(params, id, id2, id3) {
return api.delete(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`,
params
);
}
};
......@@ -13,7 +13,7 @@ export default {
return api.post(urls.editTask(taskid), params);
},
editSubTask(taskid, params) {
return api.post2(urls.setSubTask(taskid), params)
return api.post2(urls.setSubTask(taskid), params);
},
editRoi(taskid, subtaskid, params) {
return api.post(urls.editroi(taskid, subtaskid), params);
......
......@@ -8,7 +8,7 @@ export default {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}`;
},
editroi: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtasks/${subtaskid}}`; // ROI设置
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtasks/${subtaskid}`; // ROI设置
},
alternatestate: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/${subtaskid}/suspend_alternate_task?s=${gitTimer()}`;
......
......@@ -160,6 +160,8 @@ html,body{
}
.nav-tag-box {
line-height: 40px;
height: 40px;
overflow: hidden;
}
.nav-tag-box .el-tag{
border-radius: 0;
......@@ -209,4 +211,7 @@ html,body{
}
.codes-tab-box .el-tabs__item{
width: 112px!important;
}
.is-opend {
background: red;
}
\ No newline at end of file
{
"id": "1565499",
"name": "繁星2.0",
"id": "1592179",
"name": "fanxin_new",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"css_prefix_text": "icon",
"description": "",
"glyphs": [
{
"icon_id": "831114",
"icon_id": "13192442",
"name": "上",
"font_class": "shang",
"unicode": "e611",
"unicode_decimal": 58897
},
{
"icon_id": "13192443",
"name": "下",
"font_class": "xia",
"unicode": "e612",
"unicode_decimal": 58898
},
{
"icon_id": "13192444",
"name": "左",
"font_class": "zuo",
"unicode": "e615",
"unicode_decimal": 58901
},
{
"icon_id": "13192445",
"name": "左下",
"font_class": "zuoxia",
"unicode": "e619",
"unicode_decimal": 58905
},
{
"icon_id": "13192446",
"name": "右下",
"font_class": "youxia",
"unicode": "e61f",
"unicode_decimal": 58911
},
{
"icon_id": "13192447",
"name": "左上",
"font_class": "zuoshang",
"unicode": "e620",
"unicode_decimal": 58912
},
{
"icon_id": "13192448",
"name": " 右",
"font_class": "you",
"unicode": "e621",
"unicode_decimal": 58913
},
{
"icon_id": "13192449",
"name": "右上",
"font_class": "youshang",
"unicode": "e626",
"unicode_decimal": 58918
},
{
"icon_id": "13191358",
"name": "启动",
"font_class": "qidong",
"unicode": "e628",
"unicode_decimal": 58920
},
{
"icon_id": "13191359",
"name": "密码",
"font_class": "mima",
"unicode": "e629",
"unicode_decimal": 58921
},
{
"icon_id": "13191361",
"name": "迁移",
"font_class": "qianyi",
"unicode": "e62a",
"unicode_decimal": 58922
},
{
"icon_id": "13191411",
"name": "用户名",
"font_class": "yonghuming",
"unicode": "e62b",
"unicode_decimal": 58923
},
{
"icon_id": "13191425",
"name": "修 改",
"font_class": "xiugai",
"unicode": "e62c",
"unicode_decimal": 58924
},
{
"icon_id": "13191430",
"name": "修 改 copy",
"font_class": "xiugaicopy",
"unicode": "e62d",
"unicode_decimal": 58925
},
{
"icon_id": "13191446",
"name": "暂停",
"font_class": "zanting",
"unicode": "e62e",
"unicode_decimal": 58926
},
{
"icon_id": "13176280",
"name": "导出",
"font_class": "daochu",
"unicode": "e61a",
"unicode_decimal": 58906
},
{
"icon_id": "13176281",
"name": "重型罐式",
"font_class": "zhongxingguanshi",
"unicode": "e61b",
"unicode_decimal": 58907
},
{
"icon_id": "13176282",
"name": "展示",
"font_class": "zhanshi",
"unicode": "e61c",
"unicode_decimal": 58908
},
{
"icon_id": "13176283",
"name": "导入",
"font_class": "daoru",
"unicode": "e61d",
"unicode_decimal": 58909
},
{
"icon_id": "13176284",
"name": "危险品",
"font_class": "weixianpin",
"unicode": "e61e",
"unicode_decimal": 58910
},
{
"icon_id": "1010109",
"name": "日历",
"font_class": "rili",
"unicode": "e616",
"unicode_decimal": 58902
"icon_id": "13176288",
"name": "运行路数",
"font_class": "yunhanglushu",
"unicode": "e622",
"unicode_decimal": 58914
},
{
"icon_id": "1355658",
"name": "导入",
"font_class": "login",
"icon_id": "13176289",
"name": "开启",
"font_class": "kaiqi",
"unicode": "e623",
"unicode_decimal": 58915
},
{
"icon_id": "13176290",
"name": "icon 选中智能检索",
"font_class": "iconxuanzhongzhinengjiansuo1",
"unicode": "e624",
"unicode_decimal": 58916
},
{
"icon_id": "13176291",
"name": "系统版本",
"font_class": "xitongbanben",
"unicode": "e625",
"unicode_decimal": 58917
},
{
"icon_id": "13176293",
"name": "运行异常",
"font_class": "yunhangyichang",
"unicode": "e627",
"unicode_decimal": 58919
},
{
"icon_id": "13176254",
"name": "icon 选中首页(2)",
"font_class": "iconxuanzhongshouye",
"unicode": "e600",
"unicode_decimal": 58880
},
{
"icon_id": "6237827",
"name": "展示",
"font_class": "zhanshi",
"unicode": "e87a",
"unicode_decimal": 59514
"icon_id": "13176255",
"name": "icon 选中任务管理(1)",
"font_class": "iconxuanzhongrenwuguanli",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "6367958",
"name": "添加",
"font_class": "add-circle-s",
"unicode": "e662",
"unicode_decimal": 58978
"icon_id": "13176256",
"name": "icon 选中资源管理",
"font_class": "iconxuanzhongziyuanguanli",
"unicode": "e602",
"unicode_decimal": 58882
},
{
"icon_id": "7588088",
"name": "播放",
"font_class": "bofang1",
"unicode": "e61c",
"unicode_decimal": 58908
"icon_id": "13176257",
"name": "icon 选中首页(1)",
"font_class": "iconxuanzhongshouye1",
"unicode": "e603",
"unicode_decimal": 58883
},
{
"icon_id": "13176258",
"name": "icon 选中资源管理(1)",
"font_class": "iconxuanzhongziyuanguanli1",
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "13176259",
"name": "信息存储",
"font_class": "xinxicunchu",
"unicode": "e605",
"unicode_decimal": 58885
},
{
"icon_id": "7815001",
"name": "播放",
"font_class": "bofang",
"icon_id": "13176260",
"name": "icon 选中系统运维",
"font_class": "iconxuanzhongxitongyunwei",
"unicode": "e606",
"unicode_decimal": 58886
},
{
"icon_id": "13176261",
"name": "icon 选中智能检索(1)",
"font_class": "iconxuanzhongzhinengjiansuo",
"unicode": "e607",
"unicode_decimal": 58887
},
{
"icon_id": "7978614",
"name": "删 除",
"font_class": "detail",
"unicode": "e644",
"unicode_decimal": 58948
"icon_id": "13176262",
"name": "icon 选中任务管理",
"font_class": "iconxuanzhongrenwuguanli1",
"unicode": "e608",
"unicode_decimal": 58888
},
{
"icon_id": "8147570",
"name": "迁移",
"font_class": "Migration",
"unicode": "e664",
"unicode_decimal": 58980
"icon_id": "13176263",
"name": "删 除(1)",
"font_class": "shanchu",
"unicode": "e609",
"unicode_decimal": 58889
},
{
"icon_id": "8386986",
"name": "暂停",
"font_class": "zanting",
"unicode": "e685",
"unicode_decimal": 59013
"icon_id": "13176264",
"name": "定位 位置",
"font_class": "dingweiweizhi",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "9356268",
"name": "暂停 停止",
"font_class": "zantingtingzhi",
"unicode": "e643",
"unicode_decimal": 58947
"icon_id": "13176265",
"name": "系统信息",
"font_class": "xitongxinxi",
"unicode": "e60b",
"unicode_decimal": 58891
},
{
"icon_id": "10905634",
"name": "修 改",
"font_class": "xiugai",
"unicode": "e632",
"unicode_decimal": 58930
"icon_id": "13176266",
"name": "分析资源",
"font_class": "fenxiziyuan",
"unicode": "e60c",
"unicode_decimal": 58892
},
{
"icon_id": "13176267",
"name": "渣土车抓拍",
"font_class": "zhatuchezhuapai",
"unicode": "e60d",
"unicode_decimal": 58893
},
{
"icon_id": "13176268",
"name": "多选/选中",
"font_class": "duoxuanxuanzhong",
"unicode": "e60e",
"unicode_decimal": 58894
},
{
"icon_id": "13176269",
"name": "单选/选中",
"font_class": "danxuanxuanzhong",
"unicode": "e60f",
"unicode_decimal": 58895
},
{
"icon_id": "13176270",
"name": "设备信息",
"font_class": "shebeixinxi",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "13176273",
"name": "icon 选中首页",
"font_class": "iconxuanzhongshouye2",
"unicode": "e613",
"unicode_decimal": 58899
},
{
"icon_id": "13176274",
"name": "保存 面性",
"font_class": "baocunmianxing",
"unicode": "e614",
"unicode_decimal": 58900
},
{
"icon_id": "13176276",
"name": "重置",
"font_class": "zhongzhi",
"unicode": "e616",
"unicode_decimal": 58902
},
{
"icon_id": "13176277",
"name": "添加",
"font_class": "tianjia",
"unicode": "e617",
"unicode_decimal": 58903
},
{
"icon_id": "13176278",
"name": "删 除",
"font_class": "shanchu1",
"unicode": "e618",
"unicode_decimal": 58904
}
]
}
......@@ -142,6 +142,7 @@ a:active{
}
.contentBox{
padding: 12px;
overflow: hidden;
}
}
.detaiCon span{
......
......@@ -9,7 +9,7 @@ import resetCss from "./assets/resetElementCss/index.css";
import api from "./api/install";
import "./assets/css/public.css";
import echarts from "echarts";
import "./assets/icon/icon1/iconfont.css";
// import "./assets/icon/icon1/iconfont.css";
import "./assets/icon/icon2/iconfont.css";
import "../src/assets/js/vporto";
import { buildCode } from "../src/assets/js/buildcodes";
......@@ -18,10 +18,10 @@ Vue.prototype.$echarts = echarts;
Vue.prototype.$moment = moment;
Vue.prototype.$buildCode = buildCode;
Vue.prototype.oParse = new XML.ObjTree();
Vue.prototype.axios=axios;
Vue.prototype.axios = axios;
import VueParticles from 'vue-particles'
Vue.use(VueParticles)
// import VueParticles from "vue-particles";
// Vue.use(VueParticles);
Vue.use(api);
Vue.use(ElementUI, { size: "small", zIndex: 3000 });
......
......@@ -8,7 +8,7 @@ export const constantRouterMap = [
path: "/",
name: "首页",
component: resolve => require(["../views/Layout/index.vue"], resolve),
redirect: "/trficcshow",
redirect: "/login",
children: [
{
path: "/trficcshow",
......@@ -47,7 +47,7 @@ export const asyncRouterMap = [
name: "任务管理",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
icon: "icon-fanxing-iconxuanzhongrenwuguanli1"
},
children: [
{
......@@ -75,7 +75,7 @@ export const asyncRouterMap = [
name: "智能检索",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
icon: "icon-fanxing-iconxuanzhongzhinengjiansuo1"
},
children: [
{
......@@ -144,7 +144,7 @@ export const asyncRouterMap = [
name: "资源管理",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
icon: "icon-fanxing-iconxuanzhongziyuanguanli1"
},
children: [
{
......@@ -208,7 +208,7 @@ export const asyncRouterMap = [
name: "系统运维",
component: resolve => require(["../views/Layout/index.vue"], resolve),
meta: {
icon: "el-icon-location"
icon: "icon-fanxing-iconxuanzhongxitongyunwei"
},
children: [
{
......
......@@ -12,7 +12,6 @@ export default {
}
},
created(){
alert(1)
}
}
</script>
......
......@@ -2,28 +2,28 @@
<div class="home">
<el-container class="home-box">
<el-header class="headers">
<img class="logoImg" src="../../assets/img/home/logo.png" alt="">
<div class="headRight">
<span>2019-11-15 16:50 星期一</span>
<img src="../../assets/img/home/user.png" alt="">
<span class="exit">退出<i class="el-icon-arrow-down"></i></span>
</div>
</el-header>
<img class="logoImg" src="../../assets/img/home/logo.png" alt="" />
<span :class="{'el-icon-s-fold':isopen,'el-icon-s-unfold':!isopen,'menu-switch':true}" @click="openmenu"></span>
<div class="headRight">
<span>{{ curdate }}</span>
<img src="../../assets/img/home/user.png" alt="" />
<span class="exit" @click="logout()">退出<i class="el-icon-arrow-down"></i></span>
</div>
</el-header>
<el-container style="min-height:calc(100vh - 64px);">
<el-aside :width="menuwidth">
<menus @setTopBar="setTopBar" ref="leftmenu"></menus>
</el-aside>
<menus @setTopBar="setTopBar" ref="leftmenu"></menus>
<el-main>
<div class="nav">
<div class="nav-tag-box">
<el-tag
v-for="(tag,index) in topbarArr" :key="index"
v-for="(tag, index) in topbarArr"
:key="index"
closable
@close="closetag(tag,index)"
@close="closetag(tag, index)"
@click="toPath(tag)"
>
<i :class="tag.icon"></i>
{{tag.name}}
>
<!-- <i :class="tag.icon"></i> -->
{{ tag.name }}
</el-tag>
</div>
</div>
......@@ -35,111 +35,172 @@
</template>
<script>
import types from "../../store/types.js";
// import HelloWorld from "@/components/HelloWorld.vue";
import menus from './menu'
import menus from "./menu";
export default {
name: "x",
data(){
return{
isCollapse: false,
conHeight:0,
menuwidth:"254px",
full:false,
topbarArr:[]
};
data() {
return {
curdate: "",
isopen:true,
conHeight: 0,
menuwidth: "15vw",
full: false,
topbarArr: []
};
},
methods:{
setTopBar(data){
if(this.topbarArr.length < 1) {
this.topbarArr.push(data)
methods: {
setTopBar(data) {
if (this.topbarArr.length < 1) {
this.topbarArr.push(data);
}
let hasBar = false;
for(let i = 0; i < this.topbarArr.length; i++) {
if(this.topbarArr[i].path == data.path){
hasBar = true
}
for (let i = 0; i < this.topbarArr.length; i++) {
if (this.topbarArr[i].path == data.path) {
hasBar = true;
}
}
if(!hasBar) {
this.topbarArr.push(data)
if (!hasBar) {
this.topbarArr.push(data);
}
},
toPath(data){
this.$refs.leftmenu.handleSelect(data.path)
openmenu() {
this.isopen = !this.isopen;
this.$refs.leftmenu.collapsemenu();
},
toPath(data) {
this.$refs.leftmenu.handleSelect(data.path);
},
closetag(data, index) {
this.topbarArr.splice(index, 1);
},
closetag(data,index){
this.topbarArr.splice(index,1)
getDate() {
let date = new Date();
let Y = date.getFullYear();
let M = date.getMonth() > 10 ? date.getMonth() : `0${date.getMonth()}`;
let D = date.getDate() > 10 ? date.getDate() : `0${date.getDate()}`;
let h = date.getHours() > 10 ? date.getHours() : `0${date.getHours()}`;
let m = date.getMinutes() > 10 ? date.getMinutes() : `0${date.getMinutes()}`;
let s = date.getSeconds();
let w = date.getDay();
let wtext = "";
switch (w) {
case 1:
wtext = "星期一";
break;
case 2:
wtext = "星期二";
break;
case 3:
wtext = "星期三";
break;
case 4:
wtext = "星期四";
break;
case 5:
wtext = "星期五";
break;
case 6:
wtext = "星期六";
break;
case 7:
wtext = "星期日";
break;
}
this.curdate = `${Y}/${M}/${D} ${h}:${m}:${s} ${wtext}`;
},
logout() {
localStorage.removeItem("menu");
localStorage.removeItem("curmenu");
this.$store.commit(types.ATOKEN, "");
localStorage.removeItem("atoken");
this.$router.push("/login");
}
},
created(){
created() {
this.$api.device.getDev().then(m => {
if(m.length < 1) {
// this.infoFun('未发现运维服务,请联系相关人员')
this.$message({
message: '未发现运维服务,请联系相关人员',
type: 'error'
});
this.setDevunid('9cb6e39adc5176b81879f6c22f1d963')
return
}
this.setDevunid(m[0].dev_unid)
})
if (m.length < 1) {
// this.infoFun('未发现运维服务,请联系相关人员')
this.$message({
message: "未发现运维服务,请联系相关人员",
type: "error"
});
this.setDevunid("9cb6e39adc5176b81879f6c22f1d963");
return;
}
this.setDevunid(m[0].dev_unid);
});
},
components:{
components: {
menus
},
mounted(){
console.log(this.permission_routers)
this.conHeight=window.innerHeight-65;
console.log(this.conHeight)
document.addEventListener("keydown", (event)=>{
var e = event || window.event || arguments.callee.caller.arguments[0];
if(e && e.keyCode==122 ){ // 按 Esc
if(this.full) {
this.menuwidth = "254px";
this.full = false
return
}
this.menuwidth = 0
this.full = true
}
});
},
beforeMount() {
//建立ws连接
let uid = localStorage.getItem('user_unid');
let clientid = localStorage.getItem('client_unid');
this.$api.device.getGlobalWs(uid, clientid).then(data => {
this.globalWs = new WebSocket(data.ws_url);
let ary = data.ws_url.split('/');
localStorage.setItem('cennect_unid',ary[ary.length-1])
mounted() {
console.log(this.permission_routers);
this.conHeight = window.innerHeight - 65;
console.log(this.conHeight);
document.addEventListener("keydown", event => {
var e = event || window.event || arguments.callee.caller.arguments[0];
if (e && e.keyCode == 122) {
// 按 Esc
if (this.full) {
this.menuwidth = "254px";
this.full = false;
return;
}
this.menuwidth = 0;
this.full = true;
}
});
setInterval(() => {
this.getDate();
}, 1000);
},
beforeMount() {
//建立ws连接
let uid = localStorage.getItem("user_unid");
let clientid = localStorage.getItem("client_unid");
this.$api.device.getGlobalWs(uid, clientid).then(data => {
this.globalWs = new WebSocket(data.ws_url);
let ary = data.ws_url.split("/");
localStorage.setItem("cennect_unid", ary[ary.length - 1]);
//监听成功
this.globalWs.onopen = function() {
console.log('全局推送服务连接成功')
}
//监听成功
this.globalWs.onopen = function() {
console.log("全局推送服务连接成功");
};
//监听断开
this.globalWs.onclose = function(){
console.log('全局推送服务连接断开')
}
//监听断开
this.globalWs.onclose = function() {
console.log("全局推送服务连接断开");
};
//监听推送信息
// this.globalWs.onmessage = this.wsdeal;
//监听推送信息
// this.globalWs.onmessage = this.wsdeal;
//保持连接
var $this = this
setInterval(function() {
var send_mesage = '{"type":"request","id":"' + new Date().getTime() + '","mts":"' + new Date().getTime() + '","command": "get /wsapi/v1/users/'+localStorage.getItem('cennect_unid')+'/keep_alive"}'
$this.globalWs.send(send_mesage)
}, 20000)
})
},
//保持连接
var $this = this;
setInterval(function() {
var send_mesage =
'{"type":"request","id":"' +
new Date().getTime() +
'","mts":"' +
new Date().getTime() +
'","command": "get /wsapi/v1/users/' +
localStorage.getItem("cennect_unid") +
'/keep_alive"}';
$this.globalWs.send(send_mesage);
}, 20000);
});
}
};
</script>
<style lang="stylus" scoped>
.menu-switch{
color #fff
font-size 25px;
margin-left 50px;
overflow: hidden;
vertical-align: super;
}
</style>
......@@ -5,26 +5,27 @@
class="el-menu-vertical-demo"
:collapse="isCollapse"
@select="handleSelect"
:unique-opened="true"
>
<el-submenu index="1">
<el-submenu index="1" class="menu-icon">
<template slot="title">
<i class="el-icon-location"></i>
<i class="icon-fanxing-iconxuanzhongshouye1"></i>
<span slot="title">首页</span>
</template>
<el-menu-item index="/trficcshow">
<i class="el-icon-location"></i>交通展示
<i class="submenuicon"></i>交通展示
</el-menu-item>
<el-menu-item index="/behaviorshow">
<i class="el-icon-location"></i>综治展示
<i class="submenuicon"></i>综治展示
</el-menu-item>
</el-submenu>
<el-submenu v-for="(fristmenu,index) in permission_routers" :index="fristmenu.path" :key="index">
<el-submenu v-for="(fristmenu,index) in permission_routers" :index="fristmenu.path" :key="index" class="menu-icon">
<template slot="title">
<i :class="fristmenu.meta.icon"></i>
<span slot="title">{{fristmenu.name}}</span>
</template>
<el-menu-item v-for="(twomenu,index) in fristmenu.children" :key="index" :index="twomenu.path">
<i :class="twomenu.meta.icon"></i>{{twomenu.name}}
<i class="submenuicon"></i>{{twomenu.name}}
</el-menu-item>
</el-submenu>
</el-menu>
......@@ -39,7 +40,7 @@ export default {
return {
full: false,
isCollapse: false,
activemenu: "/",
activemenu: "/indexshow",
topbar:[]
};
},
......@@ -47,28 +48,33 @@ export default {
handleSelect(key, keyPath) {
this.$router.push(key);
localStorage.setItem("curmenu", key);
this.activemenu = key
this.activemenu = key;
},
collapsemenu() {
this.isCollapse = !this.isCollapse;
}
},
computed: {
...mapGetters(["permission_routers"])
},
created() {
let activemenu = localStorage.getItem("curmenu");
// let activemenu = localStorage.getItem("curmenu");
let activemenu = location.href.split('#')[1];
if (activemenu) {
this.activemenu = activemenu;
this.$router.push(activemenu);
} else {
this.$router.push('/');
this.$router.push("/");
this.activemenu = '/';
}
},
watch:{
$route(t, f){
console.log('to',t)
let obj = {
name:f.name,
path:f.path,
icon:f.meta.icon
name:t.name,
path:t.path,
// icon:t.meta.icon
}
this.$emit("setTopBar",obj)
}
......@@ -77,7 +83,26 @@ export default {
</script>
<style lang="stylus" scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 200px;
min-height: 400px;
}
.box{
height 100%;
}
.menu-icon i{
font-size 14px;
padding-right:10px;
}
.menu-icon .submenuicon{
display inline-block;
height 3px;
width 3px;
background:rgba(0,0,0,0.85);
opacity .5;
border-radius 5px;
margin-left -10px;
margin-right 10px;
padding-right:0px;
}
</style>
\ No newline at end of file
<template>
<div id="login" :style="{height:innerHeight+'px'}">
<vue-particles
color="#dedede"
:particleOpacity="0.7"
:particlesNumber="80"
shapeType="circle"
:particleSize="4"
linesColor="#dedede"
:linesWidth="1"
:lineLinked="true"
:lineOpacity="0.4"
:linesDistance="150"
:moveSpeed="3"
:hoverEffect="true"
hoverMode="grab"
:clickEffect="true"
clickMode="push"
>
</vue-particles>
<div class="box">
<h1>视频分析综合管理平台</h1>
<div style="width: 60%;margin: 0 auto;">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="0px" class="demo-ruleForm">
<el-form-item label=" " prop="username">
<el-input v-model="ruleForm.username" placeholder="请输入用户名"></el-input>
</el-form-item>
<el-form-item label=" " prop="password">
<el-input v-model="ruleForm.password" type="password" placeholder="请输入密码"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">登 录</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div id="login" :style="{ height: innerHeight + 'px' }">
<!-- <vue-particles
color="#dedede"
:particleOpacity="0.7"
:particlesNumber="80"
shapeType="circle"
:particleSize="4"
linesColor="#dedede"
:linesWidth="1"
:lineLinked="true"
:lineOpacity="0.4"
:linesDistance="150"
:moveSpeed="3"
:hoverEffect="true"
hoverMode="grab"
:clickEffect="true"
clickMode="push"
>
</vue-particles> -->
<div class="box">
<h1>视频分析综合管理平台</h1>
<div style="width: 60%;margin: 0 auto;">
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="0px"
class="demo-ruleForm"
>
<el-form-item label=" " prop="username">
<el-input
v-model="ruleForm.username"
placeholder="请输入用户名"
></el-input>
</el-form-item>
<el-form-item label=" " prop="password">
<el-input
v-model="ruleForm.password"
type="password"
placeholder="请输入密码"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')"
>登 录</el-button
>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
let sha1 = require('js-sha1');
import types from '../store/types.js'
export default {
name: 'Login',
data() {
var validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入密码'));
} else {
callback();
}
};
var validateUser = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入用户名'));
} else {
callback();
}
};
return {
username: '',
password: '',
innerHeight:0,
ruleForm:{
username:'',
password:'',
},
rules: {
password: [
{ validator: validatePass, trigger: 'change' }
],
username: [
{ validator: validateUser, trigger: 'change' }
]
}
}
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.login();
} else {
return false;
}
});
},
initHeight(){
this.innerHeight=window.innerHeight;
},
login(){
this.$api.login.login({
"username":this.ruleForm.username,
"password":this.ruleForm.password,
"user_type": "user"
}).then(res => {
if(!res.ecode){
this.$store.commit(types.ATOKEN,res.atoken);
// localStorage.setItem('rtoken',m.data.rtoken)
sessionStorage.setItem('user_unid',res.user_unid)
//本系统可以直接用本地缓存做
// localStorage.setItem('user_name',this.username)
// 处理登录用户权限菜单显示问题;
//算法配置列表
this.algoList();
//存储配置列表
this.storeConfList();
//code列表
this.getCatesList();
this.getCodeList();
this.getCustomCode();
this.getEventList();
this.getDev();
this.getMenu(res.user_unid);
}
let sha1 = require("js-sha1");
import types from "../store/types.js";
export default {
name: "Login",
data() {
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入密码"));
} else {
callback();
}
};
var validateUser = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入用户名"));
} else {
callback();
}
};
return {
username: "",
password: "",
innerHeight: 0,
ruleForm: {
username: "",
password: ""
},
rules: {
password: [{ validator: validatePass, trigger: "change" }],
username: [{ validator: validateUser, trigger: "change" }]
}
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
this.login();
} else {
return false;
}
});
},
initHeight() {
this.innerHeight = window.innerHeight;
},
login() {
this.$api.login
.login({
username: this.ruleForm.username,
password: this.ruleForm.password,
user_type: "user"
})
.then(res => {
if (!res.ecode) {
this.$store.commit(types.ATOKEN, res.atoken);
// localStorage.setItem('rtoken',m.data.rtoken)
sessionStorage.setItem("user_unid", res.user_unid);
//本系统可以直接用本地缓存做
localStorage.setItem("atoken", res.atoken);
// 处理登录用户权限菜单显示问题;
//算法配置列表
this.algoList();
//存储配置列表
this.storeConfList();
//code列表
this.getCatesList();
this.getCodeList();
this.getCustomCode();
this.getEventList();
this.getDev();
this.getMenu(res.user_unid);
}
}).catch((err) => {
})
},
......@@ -244,105 +255,105 @@ import types from '../store/types.js'
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
#particles{
position: absolute;
width: 100%;
height: 100%;
background-color: #b61924;
background-repeat: no-repeat;
background-size: cover;
background-position: 50% 50%;
#particles {
position: absolute;
width: 100%;
height: 100%;
background-color: #b61924;
background-repeat: no-repeat;
background-size: cover;
background-position: 50% 50%;
}
.loginTitle {
height: 60px;
background: #dcdcdc;
position: relative;
}
.loginTitle > div {
position: absolute;
text-align: left;
/*left: 5%;*/
height: 60px;
/*margin-top: 15px;*/
/*background: url(../assets/daer.jpg) no-repeat;*/
padding-left: 50px;
background-size: 100% 60px;
width: 150px;
}
.loginTitle > div span:first-child {
position: absolute;
left: 50px;
top: -5px;
font-weight: bold;
font-size: 18px;
font-family: "隶书";
}
.loginTitle > div span:last-child {
font-weight: 500;
font-size: 12px;
font-family: Aparajita;
position: absolute;
left: 50px;
top: 16px;
}
.loginTitle{
height:60px;
background: #dcdcdc;
position: relative;
}
.loginTitle>div{
position: absolute;
text-align: left;
/*left: 5%;*/
height: 60px;
/*margin-top: 15px;*/
/*background: url(../assets/daer.jpg) no-repeat;*/
padding-left: 50px;
background-size: 100% 60px;
width:150px
}
.loginTitle>div span:first-child{
position: absolute;
left:50px;
top: -5px;
font-weight: bold;
font-size: 18px;
font-family: "隶书";
}
.loginTitle>div span:last-child{
font-weight: 500;
font-size: 12px;
font-family: Aparajita;
position: absolute;
left:50px;
top: 16px;
}
h1 {
color: #000000;
height: 40px;
line-height: 40px;
padding: 60px 0px;
font-size:44px;
}
h1 {
color: #000000;
height: 40px;
line-height: 40px;
padding: 60px 0px;
font-size: 44px;
}
#login {
text-align: center;
position: relative;
background: url(../assets/img/login/background.png) no-repeat 0 0;
background-size:cover
}
#login {
text-align: center;
position: relative;
background: url(../assets/img/login/background.png) no-repeat 0 0;
background-size: cover;
}
#login input:focus {
outline: none;
box-shadow: none;
}
.box{
width: 25%;
position: absolute;
left: 52%;
top: 20%;
#login input:focus {
outline: none;
box-shadow: none;
}
.box {
width: 25%;
position: absolute;
left: 52%;
top: 20%;
}
button {
width: 100%;
margin-top: 40px;
border-radius: 30px;
background: #0069ff;
height: 50px;
font-size: 20px;
}
button {
width: 100%;
margin-top: 40px;
border-radius: 30px;
background: #0069FF;
height: 50px;
font-size: 20px;
}
button:hover {
color: #D6D9DF
}
button:hover {
color: #d6d9df;
}
p {
margin: 0;
}
p {
margin: 0;
}
p:nth-child(1) {
padding-top: 15px
}
@media screen and (max-width: 1366px) {
h1 {
height: 40px;
line-height: 40px;
padding: 60px 0px;
font-size:34px;
}
.box{
width: 25%;
position: absolute;
left: 57%;
top: 20%;
}
}
p:nth-child(1) {
padding-top: 15px;
}
@media screen and (max-width: 1366px) {
h1 {
height: 40px;
line-height: 40px;
padding: 60px 0px;
font-size: 34px;
}
.box {
width: 25%;
position: absolute;
left: 57%;
top: 20%;
}
}
</style>
......@@ -62,7 +62,7 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="icon-fanxing-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -116,7 +116,7 @@
<div class="info-content">
<div class="con-item">
<span class="con-label">平台类型:</span>
<span class="con-text">{{}}</span>
<span class="con-text"></span>
</div>
<div class="con-item">
<span class="con-label">设备类型:</span>
......@@ -358,7 +358,7 @@ export default {
display: none;
}
.right-box {
width: 10vw;
width: 20vw;
height: 100%;
border-left: 10px solid #f5f7f9;
}
......
......@@ -38,11 +38,11 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="编辑角色" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="editUser(scope.$index, scope.row)"></span>
<span class="icon-fanxing-xiugai editIcon" @click="editUser(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除角色" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -126,7 +126,7 @@
systemTime:'',
syncTime:false,
computerTime:this.$moment().format("YYYY-MM-DD HH:mm:ss"),
dev_unid:sessionStorage.getItem('dev_unid'),
dev_unid:localStorage.getItem('dev_unid'),
device_id:sessionStorage.getItem('device_id'),
serverAdr:''
}
......
......@@ -117,7 +117,7 @@
selectFilename:'',
timeArr:[],
file:null,
dev_unid:sessionStorage.getItem('dev_unid'),
dev_unid:localStorage.getItem('dev_unid'),
device_id:sessionStorage.getItem('device_id'),
}
},
......
......@@ -43,15 +43,15 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="编辑用户" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="editUser(scope.$index, scope.row)"></span>
<span class="icon-fanxing-xiugai editIcon" @click="editUser(scope.$index, scope.row)"></span>
</el-tooltip>
<!-- <span class="tableSpanBorder"></span>
<el-tooltip content="重置密码" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon2" @click="reset(scope.$index, scope.row)"></span>
<span class="icon-fanxing-xiugai editIcon2" @click="reset(scope.$index, scope.row)"></span>
</el-tooltip> -->
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -83,9 +83,9 @@ export default {
},
beforeDestroy: function () {
if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
this.videoplayer.pause();
}
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
// }
}
};
......
<template>
<div class="contentBox">
<div class="content">
<div>
<span class="selectBox">
<el-select
v-model="curCateUnid"
placeholder="请选择"
@change="cateChange"
:popper-append-to-body="false"
>
<el-option
v-for="item in catesData"
:key="item"
:value="item.cate_unid"
:label="item.name"
></el-option>
</el-select>
</span>
<div class="headerbox">
<span class="addbox">
<el-button type="primary" @click="addcode">添加code</el-button>
<el-button type="primary" @click="addAuthor">添加授权</el-button>
</span>
</div>
<div class="mt10">
......@@ -35,34 +20,25 @@
label="#"
width="40"
></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid">
<el-table-column align="center" prop="code_unid" label="模板名称">
</el-table-column>
<el-table-column prop="code" align="center" label="code">
<el-table-column prop="code" align="center" label="授权路数">
</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 align="center" prop="name" label="备注">
</el-table-column>
<el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope">
<el-tooltip
content="编辑"
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon"
@click="editCode(scope.$index, scope.row)"
></span>
</el-tooltip>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon del-btn"
@click="deleteCode(scope.$index, scope.row)"
class="iconfont el-icon-info"
@click="showDetail(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
......@@ -86,50 +62,30 @@
</div>
</div>
</div>
<el-dialog title="设置CODE" :visible.sync="detailVisible" width="400px">
<el-form
ref="trfficform"
:model="codeData"
label-position="left"
label-width="80px"
<el-dialog title="上传授权文件" :visible.sync="detailVisible" width="400px">
<el-upload
class="upload-demo"
ref="upload"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:auto-upload="false"
>
<el-form-item
label="类型"
prop="catename"
:rules="[
{ required: true, message: '类型不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.catename" disabled></el-input>
</el-form-item>
<el-form-item
label="CODE"
prop="code"
:rules="[
{ required: true, message: 'code不能为空!', trigger: 'blur' }
]"
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<el-input v-model="codeData.code"></el-input>
</el-form-item>
<el-form-item
label="名称"
prop="name"
:rules="[
{ required: true, message: '名称不能为空!', trigger: 'blur' }
]"
<el-button
style="margin-left: 10px;"
size="small"
type="success"
@click="submitUpload"
>上传到服务器</el-button
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
<el-form-item
label="备注"
prop="note"
:rules="[
{ required: true, message: '备注名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
</el-form>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png文件,且不超过500kb
</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="detailVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="saveCode"
......@@ -137,9 +93,13 @@
>
</span>
</el-dialog>
<div>
<authordetail ref="detail"></authordetail>
</div>
</div>
</template>
<script>
import authordetail from "./authorDetail";
export default {
data() {
return {
......@@ -156,88 +116,28 @@ export default {
codeData: {}
};
},
components: {},
components: {
authordetail
},
created() {
this.getCates();
},
methods: {
cateChange(cateunid) {
let offset = (this.page - 1) * this.pageSize;
let obj = {
limit: this.pageSize,
offset: offset
};
this.$api.codes
.codes(obj, cateunid)
.then(res => {
this.tableData = res.list_data;
})
.catch(err => {});
},
addcode() {
this.codeStatus = 0;
this.detailVisible = true;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
editCode(index, row) {
this.codeStatus = 1;
this.detailVisible = true;
this.codeData = row;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
getCateName(cateunid) {
let name = "";
this.catesData.forEach(ele => {
if (ele.cate_unid === cateunid) {
name = ele.name;
}
});
return name;
},
getCates() {
this.$api.codes.cates().then(res => {
this.catesData = res.list_data;
});
submitUpload() {
this.$refs.upload.submit();
},
saveCode() {
this.$refs["trfficform"].validate(valid => {
if (valid) {
if (this.editStatus === 0) {
this.saveAddCode();
}
if (this.editStatus === 1) {
this.saveEditCode();
}
} else {
console.log("error submit!!");
return false;
}
});
handleRemove(file, fileList) {
console.log(file, fileList);
},
saveAddCode() {
this.$api.codes
.addTrafficCode(this.codeData, this.curCateUnid)
.then(res => {
console.log(res);
});
handlePreview(file) {
console.log(file);
},
saveEditCode() {
this.$api.codes
.editTrafficCode(
this.codeData,
this.curCateUnid,
this.codeData.code_unid
)
.then(res => {
console.log(res);
});
showDetail(index, row) {
this.$refs.detail.initahthor(row);
},
deleteCode(index, row) {
this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
});
addAuthor() {
this.codeStatus = 0;
this.detailVisible = true;
},
handleSizeChange(val) {
this.pageSize = val;
......@@ -249,16 +149,11 @@ export default {
};
</script>
<style lang="scss" scoped>
.addbox {
float: right;
margin-right: 10px;
.headerbox {
overflow: hidden;
}
.code-btn {
margin-bottom: 10px;
.addbox {
float: right;
margin-right: 10px;
}
.del-btn {
padding-left: 20px;
}
</style>
<template>
<div>
<el-dialog title="业务功能" :visible.sync="detailVisible" width="753px">
<div class="authordetail-box">
<div class="authitembox">
<div class="itemheader">识别</div>
<div></div>
</div>
<div class="authitembox">
<div class="itemheader">违法</div>
<div></div>
</div>
<div class="authitembox">
<div class="itemheader">事件</div>
<div></div>
</div>
<div class="authitembox">
<div class="itemheader">流量</div>
<div></div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="detailVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="detailVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
detailVisible: true,
detailData: {}
};
},
methods: {
initahthor(data) {
this.detailVisible = true;
this.detailData = data;
}
}
};
</script>
<style lang="scss" scoped>
.authordetail-box {
display: flex;
}
.authitembox {
width: 160px;
height: 240px;
margin-left: 15px;
border: 1px solid #E9E9E9;
border-radius: 4px;
}
.authitembox:first-child {
margin-left: 0;
}
.authitembox .itemheader {
height: 40px;
line-height: 40px;
text-align: center;
background:rgba(245,245,245,1);
border-bottom:1px solid rgba(233,233,233,1);
color: #222;
font-size: 16px;
font-weight: 600;
}
</style>
......@@ -56,7 +56,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon"
class="icon-fanxing-xiugai editIcon"
@click="editCode(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -67,7 +67,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon del-btn"
class="el-icon-delete delIcon del-btn"
@click="deleteCode(scope.$index, scope.row)"
></span>
</el-tooltip>
......
......@@ -50,7 +50,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon"
class="icon-fanxing-xiugai editIcon"
@click="editCode(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -61,7 +61,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon del-btn"
class="el-icon-delete delIcon del-btn"
@click="deleteCode(scope.$index, scope.row)"
></span>
</el-tooltip>
......
......@@ -49,7 +49,7 @@
],
},
user_unid:sessionStorage.getItem('user_unid'),
dev_unid:sessionStorage.getItem('dev_unid'),
dev_unid:localStorage.getItem('dev_unid'),
isGetted:false,
sipSetting:{
sip_username: '', // string
......
......@@ -44,11 +44,11 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detail(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detail(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......@@ -127,7 +127,7 @@
isLeaf: 'leaf'
},
detailData:[],
dev_unid: sessionStorage.getItem('dev_unid'),
dev_unid: localStorage.getItem('dev_unid'),
resource:{
picture_busy: 0,
picture_free: 0,
......
......@@ -170,7 +170,7 @@
if(this.type == 'add'){
this.$refs['cameraDialog'].validate((valid) => {
if (valid) {
this.$api.resource.addCamera(this.addVideoParam,this.devsId).then(res=>{
this.$api.resource.addCamera(this.addVideoParam,localStorage.getItem('dev_unid')).then(res=>{
if(res.ecode==200){
this.$message({
message: res.enote,
......
......@@ -16,15 +16,15 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip content="修改" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="editFun(scope.$index, scope.row)"></span>
<span class="icon-fanxing-xiugai editIcon" @click="editFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false >
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......@@ -37,11 +37,11 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip content="修改" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="editVideo(scope.$index, scope.row)"></span>
<span class="icon-fanxing-xiugai editIcon" @click="editVideo(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delVideo(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delVideo(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......@@ -88,7 +88,7 @@
currentIndex: 0,
eventList: JSON.parse(window.localStorage.getItem('安防事件')),
playurl: '',
dev_unid: sessionStorage.getItem('dev_unid'),
dev_unid: localStorage.getItem('dev_unid'),
cameraArr:[],
cameraTree:[],
videoTree:[],
......
......@@ -129,9 +129,10 @@ export default {
this.subtaskdata = vdata;
this.$refs.setting.getTaskParams();
if (vdata.running_status != "Running") {
this.$refs.displayInfo.showInfo(
"该任务没有运行,无法获取分析视频和抓拍信息"
);
this.$message({
message: "该任务没有运行,无法获取分析视频和抓拍信息",
type: "error"
});
return;
}
this.pushSteam(vdata);
......@@ -273,7 +274,6 @@ export default {
.task-lsit{
display inline-block
cursor pointer
padding 10px 0
.icon {
padding-left 10px
}
......@@ -291,6 +291,9 @@ export default {
}
.task-title{
padding-left 10px
width 100%
display inline-block
overflow hidden
}
.tasklist{
padding-left 10px;
......
<template>
<div>
<el-dialog
<el-dialog
title="区域设置"
:visible.sync="dialogVisible"
width="1100px"
:before-close="beforeHideModal"
>
<TraficCanvas :bgUrl='bgUrl' v-if="type=='0' || type=='5'" ref='canvas'></TraficCanvas>
<FlowCanvas :bgUrl='bgUrl' v-if="type=='1'" ref='canvas'></FlowCanvas>
<SafeCanvas :bgUrl='bgUrl' v-if="type=='2'" ref='canvas'></SafeCanvas>
<FaceCanvas :bgUrl='bgUrl' v-if="type=='4'" ref='canvas'></FaceCanvas>
<ComplexCanvas :bgUrl='bgUrl' v-if="type=='7'" ref='canvas'></ComplexCanvas>
>
<TraficCanvas
:bgUrl="bgUrl"
v-if="type == '0' || type == '5' || type == '3'"
ref="canvas"
></TraficCanvas>
<FlowCanvas :bgUrl="bgUrl" v-if="type == '1'" ref="canvas"></FlowCanvas>
<SafeCanvas :bgUrl="bgUrl" v-if="type == '2'" ref="canvas"></SafeCanvas>
<FaceCanvas :bgUrl="bgUrl" v-if="type == '4'" ref="canvas"></FaceCanvas>
<ComplexCanvas
:bgUrl="bgUrl"
v-if="type == '7'"
ref="canvas"
></ComplexCanvas>
<span slot="footer" class="dialog-footer">
<el-button @click="beforeHideModal">取 消</el-button>
<el-button type="primary" @click="save">确 定</el-button>
</span>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import TraficCanvas from "./areaconfig/TraficCanvas";
import FlowCanvas from "./areaconfig/FlowCanvas";
import SafeCanvas from "./areaconfig/SafeCanvas";
import FaceCanvas from "./areaconfig/FaceCanvas";
import ComplexCanvas from "./areaconfig/ComplexCanvas";
import TraficCanvas from "./areaconfig/TraficCanvas";
import FlowCanvas from "./areaconfig/FlowCanvas";
import SafeCanvas from "./areaconfig/SafeCanvas";
import FaceCanvas from "./areaconfig/FaceCanvas";
import ComplexCanvas from "./areaconfig/ComplexCanvas";
export default {
data() {
return {
dialogVisible: false,
isShow: false,
type: '0',
btnIsactive: false,
showClose: false,
roiBody: {},
XMLStr: "",
taskData:'',
bgUrl:''
};
},
return {
dialogVisible: false,
isShow: false,
type: "0",
btnIsactive: false,
showClose: false,
roiBody: {},
XMLStr: "",
taskData: "",
bgUrl: ""
};
},
components: {
TraficCanvas,
SafeCanvas,
......@@ -46,87 +54,92 @@ export default {
ComplexCanvas
},
methods: {
showModal: function(data,mtaskdata) {
var _this = this;
this.$store.commit('setocxstate',0)
this.taskData = mtaskdata;
this.dialogVisible =true;
this.type = data.algo_type;
// this.type = 2;
this.bgUrl = "";
//获取视频截图
this.$api.task.cutpic(mtaskdata.vchan.vdev_unid, mtaskdata.vchan.vchan_refid,mtaskdata.subtask_id).then(data => {
if (!data.ecode) {
this.bgUrl = "data:image/png;base64," + data.pic_base64;
setTimeout(() => {
let img = document.getElementById('pic').childNodes[0]
let canvas = document.createElement("canvas");
canvas.width = 800;
canvas.height = 500;
try {
canvas.getContext("2d").drawImage(img, 0, 0, 800, 500);
_this.bgUrl = canvas.toDataURL("image/webp");
} catch (error) {}
}, 500);
} else {
alert("区域设置截图失败!" + data.enote);
}
})
.catch(err => {
console.log("区域设置截图返回异常:", err.message);
});
setTimeout(() => {
_this.$refs.canvas.stageInit();
if (data.rois) {
_this.$refs.canvas.configInit(
data.rois[0].roi
);
showModal: function(data, mtaskdata) {
var _this = this;
this.$store.commit("setocxstate", 0);
this.taskData = mtaskdata;
this.dialogVisible = true;
this.type = data.algo_type;
// this.type = 2;
this.bgUrl = "";
//获取视频截图
this.$api.task
.cutpic(
mtaskdata.vchan.vdev_unid,
mtaskdata.vchan.vchan_refid,
mtaskdata.subtask_id
)
.then(data => {
if (!data.ecode) {
this.bgUrl = "data:image/png;base64," + data.pic_base64;
setTimeout(() => {
let img = document.getElementById("pic").childNodes[0];
let canvas = document.createElement("canvas");
canvas.width = 800;
canvas.height = 500;
try {
canvas.getContext("2d").drawImage(img, 0, 0, 800, 500);
_this.bgUrl = canvas.toDataURL("image/webp");
} catch (error) {
console.log(error);
}
}, 500);
} else {
alert("区域设置截图失败!" + data.enote);
}
}, 300);
},
beforeHideModal: function() {
this.$store.commit('setocxstate',1)
this.dialogVisible = false;
this.$refs.canvas.clear();
this.$refs.canvas.cindex = 0;
this.bgUrl = "";
},
getType: function() {
if (this.$parent.subTaskInfo) {
this.type = this.$parent.subTaskInfo.task_algo_type;
} else {
this.type = this.$parent.$parent.subTaskInfo.task_algo_type;
}
this.XMLStr = "";
this.btnIsactive = true;
try {
this.EditList(1);
} catch (error) {}
},
save: function() {
if (this.$refs.canvas.roadFlag === false) {
this.$alert("车道线有修改,请检查车道属性是否正确", "提示", {
confirmButtonText: "确定"
});
//xieminghui
// this.$refs.canvas.roadFlag = "confirm";
return;
})
.catch(err => {
console.log("区域设置截图返回异常:", err.message);
});
setTimeout(() => {
_this.$refs.canvas.stageInit();
if (data.rois) {
_this.$refs.canvas.configInit(data.rois[0].roi);
}
let XMLStr = this.$refs.canvas.save();
if (this.type == "1" && (XMLStr === "dir" || XMLStr === "in")) {
this.$message({
type: "warning",
message: "请检查配置是否正确"
});
return;
}
this.$parent.submit(XMLStr, "roi", this.taskData);
this.beforeHideModal();
}, 300);
},
beforeHideModal: function() {
this.$store.commit("setocxstate", 1);
this.dialogVisible = false;
this.$refs.canvas.clear();
this.$refs.canvas.cindex = 0;
this.bgUrl = "";
},
getType: function() {
if (this.$parent.subTaskInfo) {
this.type = this.$parent.subTaskInfo.task_algo_type;
} else {
this.type = this.$parent.$parent.subTaskInfo.task_algo_type;
}
this.XMLStr = "";
this.btnIsactive = true;
try {
this.EditList(1);
} catch (error) {
console.log(error);
}
},
save: function() {
if (this.$refs.canvas.roadFlag === false) {
this.$alert("车道线有修改,请检查车道属性是否正确", "提示", {
confirmButtonText: "确定"
});
//xieminghui
// this.$refs.canvas.roadFlag = "confirm";
return;
}
let XMLStr = this.$refs.canvas.save();
if (this.type == "1" && (XMLStr === "dir" || XMLStr === "in")) {
this.$message({
type: "warning",
message: "请检查配置是否正确"
});
return;
}
this.$parent.submit(XMLStr, "roi", this.taskData);
this.beforeHideModal();
}
}
}
};
</script>
<style lang="stylus" scoped>
</style>
<style lang="stylus" scoped></style>
This diff could not be displayed because it is too large.
<template>
<div>
<el-dialog
<el-dialog
title="参数设置"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose">
:before-close="handleClose"
>
<span>
<iframe
id="iframe"
ref="iframe"
src="./dynamicParameters.html"
frameborder="0"
width="100%"
height="415"
scrolling="no"
></iframe>
<iframe
id="iframe"
ref="iframe"
src="./dynamicParameters.html"
frameborder="0"
width="100%"
height="415"
scrolling="no"
></iframe>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="save">确 定</el-button>
</span>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
XMLStr:'',
basicXml:'',
taskData:""
};
},
return {
dialogVisible: false,
XMLStr: "",
basicXml: "",
taskData: ""
};
},
methods: {
init(data){
this.$store.commit('setocxstate',0)
init(data) {
this.$store.commit("setocxstate", 0);
this.dialogVisible = true;
this.taskData = data;
let that = this;
setTimeout(()=>{
that.xmlInit(data.mtasks[0].scenes[0]);
},800)
setTimeout(() => {
that.xmlInit(data);
}, 800);
},
balltaskinit(data){
this.$store.commit('setocxstate',0)
balltaskinit(data) {
this.$store.commit("setocxstate", 0);
this.dialogVisible = true;
setTimeout(()=>{
setTimeout(() => {
this.xmlInit(data);
},800)
}, 800);
},
xmlInit: function(obj) {
this.XMLStr =
obj.config.xml || '<?xml version="1.0" encoding="GBK"?><root></root>';
console.log("XML:" + this.XMLStr.split("@").length);
if (this.XMLStr.split("@").length > 1) {
this.XMLStr = '<?xml version="1.0" encoding="GBK"?><root></root>';
}
this.basicXml = obj.basicConfig.xml;
this.$refs.iframe.contentWindow.loadParameterTree(
this.basicXml,
this.XMLStr
);
},
xmlInit: function (obj) {
this.XMLStr = obj.config.xml || '<?xml version="1.0" encoding="GBK"?><root></root>'
console.log('XML:'+this.XMLStr.split('@').length)
if (this.XMLStr.split('@').length>1) {
this.XMLStr = '<?xml version="1.0" encoding="GBK"?><root></root>'
}
this.basicXml = obj.basicConfig.xml;
this.$refs.iframe.contentWindow.loadParameterTree(this.basicXml,this.XMLStr);
save: function() {
this.$refs.iframe.contentWindow.submit();
//ifram 传递回来的饿xml
this.XMLStr = this.$refs.iframe.contentWindow.xmlStr;
this.dialogVisible = false;
this.$parent.submit(this.XMLStr, "config");
},
save:function () {
this.$refs.iframe.contentWindow.submit();
//ifram 传递回来的饿xml
this.XMLStr = this.$refs.iframe.contentWindow.xmlStr;
this.dialogVisible = false;
this.$parent.submit(this.XMLStr,'config')
},
handleClose(done) {
this.dialogVisible = false;
this.$store.commit('setocxstate',1)
this.$store.commit("setocxstate", 1);
}
}
}
};
</script>
<style lang="stylus" scoped>
</style>
<style lang="stylus" scoped></style>
......@@ -5,70 +5,70 @@
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_UPLEFT')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_UPLEFT')"
class="control-btn el-icon-top-left"
class="control-btn icon-fanxing-zuoshang"
></span>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_UP')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_UP')"
class="control-btn el-icon-top"
class="control-btn icon-fanxing-shang"
></span>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_UPRIGHT')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_UPRIGHT')"
class="control-btn el-icon-top-right"
class="control-btn icon-fanxing-youshang"
></span>
</div>
<div>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_LEFT')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_LEFT')"
class="control-btn el-icon-back"
class="control-btn icon-fanxing-zuo"
></span>
<span
@mousedown="Ytontroller('12')"
@mouseup="stopYtontroller('12')"
class="control-btn el-icon-refresh"
class="control-btn icon-fanxing-zhongzhi"
></span>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_RIGHT')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_RIGHT')"
class="control-btn el-icon-right"
class="control-btn icon-fanxing-you"
></span>
</div>
<div>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_DOWNLEFT')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_DOWNLEFT')"
class="control-btn el-icon-bottom-left"
class="control-btn icon-fanxing-zuoxia"
></span>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_DOWN')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_DOWN')"
class="control-btn el-icon-bottom"
class="control-btn icon-fanxing-xia"
></span>
<span
@mousedown="Ytontroller('SIP_CTRL_PTZ_DOWNRIGHT')"
@mouseup="stopYtontroller('SIP_CTRL_PTZ_DOWNRIGHT')"
class="control-btn el-icon-bottom-right"
class="control-btn icon-fanxing-youxia"
></span>
</div>
</div>
<div class="control-right-box">
<div class="slider-box">
<span class="title">光圈</span>
<el-slider class="slider-item" v-model="value" show-input></el-slider>
<el-slider class="slider-item" v-model="value1" show-input></el-slider>
</div>
<div class="slider-box">
<span class="title">光倍</span>
<el-slider class="slider-item" v-model="value" show-input></el-slider>
<el-slider class="slider-item" v-model="value2" show-input></el-slider>
</div>
<div class="slider-box">
<span class="title">焦距</span>
<el-slider class="slider-item" v-model="value" show-input></el-slider>
<el-slider class="slider-item" v-model="value3" show-input></el-slider>
</div>
<div class="slider-box">
<span class="title">速度</span>
<el-slider class="slider-item" v-model="value" show-input></el-slider>
<el-slider class="slider-item" v-model="value4" show-input></el-slider>
</div>
<div class="right-bottom-box">
<div class="setyzw item-box">
......@@ -99,7 +99,11 @@ export default {
data() {
return {
showyt: false,
value: ""
value: 0,
value1: 0,
value2: 0,
value3: 0,
value4: 0,
};
},
methods: {
......@@ -162,12 +166,13 @@ export default {
.control-btn {
height: 5vh;
margin-top: 2vh;
width: 3.5vw;
width: 3.8vw;
overflow: hidden;
font-size: 30px;
text-align: center;
color: #cccccc;
font-weight: 600;
display inline-block
}
}
......
......@@ -107,7 +107,7 @@
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......@@ -163,7 +163,7 @@
<el-button type="primary" @click="detailVisible = false">关 闭</el-button>
</span>
</el-dialog>
<curVideo ref="visableDialog" :playersrc="playurl"></curVideo>
<videoDialog ref="visableDialog" :playersrc="playurl"></videoDialog>
</div>
</template>
<script>
......
......@@ -142,11 +142,11 @@
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -115,7 +115,7 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -115,7 +115,7 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -173,11 +173,11 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -208,11 +208,11 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -91,11 +91,11 @@
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
<span class="el-icon-info editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
......
<template>
<div class="expande-table-row">
<span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">设备地址</span>
<span class="subtask-info">192.178.99.99</span>
<span class="label">已用资源</span>
<span class="subtask-info">22</span>
<span class="label">设备容量</span>
<span class="subtask-info">33</span>
<span class="label">指定设备下发</span>
<span class="subtask-info">
<el-select v-model="assign_id">
<el-option
v-for="(item, index) in freeList"
:key="index"
:value="item.device_id"
>
{{ item.in_ip }}
</el-option>
</el-select>
</span>
<span class="label sub-btn" @click="subMove">确定</span>
</div>
</template>
<script>
export default {
data() {
return {
assign_id: ""
};
},
props: ["subTaskData", "freeList", "taskData"],
methods: {
subMove() {
let taskID = this.taskData.task_id;
let subTaksID = this.subTaskData.subtask_id;
this.$api.task.getTaskParams(taskID, subTaksID).then(res => {
let obj = {};
obj.mtasks = res.mtasks;
obj.assign_to = {
id: this.assign_id,
flag: 0
};
this.subRoi(taskID, subTaksID, obj);
});
},
subRoi(taskid, subtaskid, postObj) {
this.$api.task
.editRoi(taskid, subtaskid, postObj, {
headers: {
authorization: localStorage.getItem("atoken")
}
})
.then(m => {
if (m.ecode == "200") {
this.$message({
message: "设置成功!",
type: "success"
});
}
});
}
},
created() {},
watch: {
subTaskData(val) {
console.log(val);
}
},
mounted() {
this.assign_id = this.subTaskData.assign_id
? this.subTaskData.assign_id
: "";
}
};
</script>
<style lang="scss" scoped>
.expande-table-row {
span {
float: left;
border-bottom: 1px solid #ccc;
overflow: hidden;
}
.label {
width: 6vw;
text-align: center;
border-left: 1px solid $border-color;
background: #f0f0f0;
height: 40px;
line-height: 40px;
}
.subtask-info {
border-left: 1px solid #f0f0f0;
text-align: center;
overflow: hidden;
height: 40px;
line-height: 40px;
}
.subtask-info:nth-child(2) {
width: 9vw;
overflow: hidden;
}
.subtask-info:nth-child(4) {
width: 6vw;
}
.subtask-info:nth-child(6) {
width: 4.5vw;
}
.subtask-info:nth-child(8) {
width: 4vw;
}
.subtask-info:nth-child(10) {
width: 12vw;
}
.sub-btn {
cursor: pointer;
}
}
</style>
......@@ -28,19 +28,20 @@
</el-select>
</el-form-item>
<el-form-item label="场景占用">
<el-select
v-model="formData.type"
<el-input
v-model="formData.resource_use"
placeholder="请选择"
:popper-append-to-body="false"
>
<el-option key="1" label="全部" value></el-option>
<el-option key="2" label="222" value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="时间计划">
<el-input v-model="formData.type"></el-input>
<el-select v-model="formData.period">
<el-option value="true" label="全天"></el-option>
<el-option value="false" label="时间"></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间">
<el-form-item label="时间" v-show="formData.plate_time != 'day'">
<el-date-picker
style="width:100%"
v-model="formData.timer"
......@@ -65,6 +66,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备类型">
<el-input
v-model="formData.plate_type"
placeholder="请选择"
></el-input>
</el-form-item>
<el-form-item label="优先级">
<el-select
v-model="formData.priority"
......@@ -127,7 +134,9 @@ export default {
store_conf: {
unid: ""
},
priority: ""
priority: "",
plate_type: "",
plate_time: "",
};
}
if (type == "edit") {
......@@ -178,6 +187,9 @@ export default {
end_dt: this.setUtcTime(this.formData.timer[1]),
priority: this.formData.priority,
store_conf_unid: this.formData.store_conf.unid,
period: this.formData.period,
plate_type: this.formData.plate_type,
resource_use: this.formData.resource_use,
task_type: "normal"
// algo_comb_unid: this.formData.store_conf,
};
......
......@@ -57,7 +57,7 @@
></el-table-column>
<el-table-column
align="center"
prop="status"
prop="running_status"
label="视频状态"
></el-table-column>
<el-table-column
......@@ -74,7 +74,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-Migration moveIcon"
class="icon-fanxing-qianyi moveIcon"
@click="moveFun(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -86,7 +86,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon"
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -115,6 +115,7 @@ export default {
user_unid: "",
formData: {},
editData: {},
taskData:{},
setvisible: false,
props: {
id: "vchan_refid",
......@@ -152,6 +153,7 @@ export default {
},
methods: {
showModal(val) {
this.taskData = val;
this.tableData = [];
this.setvisible = true;
this.$store.commit("setocxstate", 1);
......@@ -164,12 +166,14 @@ 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
} else {
data.vchan = {
subtask_id: data[i].subtask_id,
refid: "",
vchan_name: data[i].subtask_name,
name: data[i].subtask_name
name: data[i].subtask_name,
running_status: data[i].running_status
};
}
ary.push(data[i].vchan);
......@@ -184,7 +188,8 @@ export default {
if (this.tableData.length > 0) {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].vchan_id == data.vchan_id) {
this.tableData.splice(i, 1);
this.delFun(i, this.tableData[i],'tree')
staus = true;
break;
}
......@@ -195,6 +200,12 @@ export default {
staus = false;
}
},
editTask(data) {
// let data = this.taskData;
this.$api.task.editTask(data, data.task_id).then(res => {
this.$emit("refresh");
});
},
editsubTask(vchan) {
let data = {
is_dome: false,
......@@ -206,6 +217,7 @@ export default {
vchan_name: vchan.name
}
};
this.$api.task.editSubTask(this.editData.task_id, data).then(res => {
this.tableData.push(vchan);
});
......@@ -213,14 +225,18 @@ export default {
playVideo(data) {
console.log("b", data);
},
delFun(index, data) {
debugger;
delFun(index, data, action= "tree") {
this.$api.task
.deleteSubTask(this.editData.task_id, data.subtask_id)
.then(res => {
this.tableData.splice(index, 1);
this.checkvckan();
});
this.checkvckan();
if (action != "tree") {
setTimeout(() => {
this.checkvckan();
}, 0);
}
},
append(data) {
const newChild = { id: id++, label: "testtest", children: [] };
......@@ -423,7 +439,9 @@ export default {
this.$store.commit("setocxstate", 0);
this.$refs.tree.setCheckedKeys([]);
},
save() {},
save() {
this.setvisible = false;
},
moveFun(index, row) {
this.innerVisible = true;
}
......
......@@ -65,40 +65,26 @@
>
</span>
</div>
<div style="padding: 0 23px 20px 23px;width:99%">
<div style="padding: 0 23px 20px 23px;width:98%">
<el-table
height="574"
height="50vh"
:data="tableData"
stripe
border
ref="table"
ref="table"
style="width: 100%"
@expand-change="expandchange"
:expand-row-keys="rowkey"
>
<el-table-column type="expand">
<template slot-scope="props">
<div
<subTaskInfo
v-for="(item, index) in props.row.subTaskData"
:key="index"
class="expande-table-row"
:subTaskData="item"
:taskData="props.row"
:freeList="freeList"
>
<span class="label">视频源文件</span>
<span class="subtask-info">{{item.vchan_name}}</span>
<span class="label">设备地址</span>
<span class="subtask-info">192.178.99.99</span>
<span class="label">已用资源</span>
<span class="subtask-info">22</span>
<span class="label">设备容量</span>
<span class="subtask-info">33</span>
<span class="label">指定设备下发</span>
<span class="subtask-info">
<el-select>
<el-option>sss</el-option>
</el-select>
</span>
<span class="label">确定</span>
</div>
</subTaskInfo>
</template>
</el-table-column>
<el-table-column
......@@ -134,6 +120,8 @@
</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>
<el-table-column
align="center"
prop="priority"
......@@ -144,7 +132,6 @@
<el-table-column
align="center"
prop="start_dt"
width="200"
:formatter="dateFormatter"
label="时间计划"
>
......@@ -163,7 +150,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon"
class="icon-fanxing-xiugai editIcon"
@click="editVideo(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -175,7 +162,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon2"
class="icon-fanxing-xiugai editIcon2"
@click="editTask('edit', scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -187,7 +174,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-bofang playIcon"
class="icon-fanxing-qidong playIcon"
@click="setTaskStatus(scope.row, 'start')"
></span>
</el-tooltip>
......@@ -199,7 +186,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-zanting pauseIcon"
class="icon-fanxing-zanting pauseIcon"
@click="setTaskStatus(scope.row, 'stop')"
></span>
</el-tooltip>
......@@ -211,7 +198,7 @@
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon"
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -252,6 +239,7 @@
<script>
import editset from "./editSet";
import editvideo from "./editVideo";
import subTaskInfo from "./subtask.vue";
export default {
data() {
return {
......@@ -260,23 +248,27 @@ export default {
task_algo_type: "",
total: 0,
page: 1,
freeList: [],
pageSize: 30,
setShow: false,
videoShow: false,
editForm: {},
tableData: [],
subTaskData: [],
pedittype: "add",
currentRow:{},
rowkey:["1"]
subTaskData: [],
pedittype: "add",
currentRow: {},
assign_ip: ""
};
},
components: {
editset,
editvideo
editvideo,
subTaskInfo
},
mounted() {
this.getTaskList();
this.getFreelist();
},
methods: {
expandchange(row, prow) {
......@@ -291,12 +283,14 @@ 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.assign_id = data[i].assign_to ?data[i].assign_to.id : "";
} else {
data.vchan = {
subtask_id: data[i].subtask_id,
refid: "",
vchan_name: data[i].subtask_name,
name: data[i].subtask_name
name: data[i].subtask_name,
assign_id: data[i].assign_id ? data[i].assign_to.id : ""
};
}
ary.push(data[i].vchan);
......@@ -334,6 +328,12 @@ export default {
return "未知";
}
},
getFreelist() {
this.$api.device.getFreelist(this.dev_unid).then(res => {
this.freeList = res.list_data;
});
// /
},
dateFormatter(row, column, cellValue, index) {
let startDate = cellValue ? cellValue.split(" ")[0] : "";
let endDate = row.end_dt ? row.end_dt.split(" ")[0] : "";
......@@ -389,7 +389,7 @@ export default {
this.tableData = [];
} else {
res.list_data.forEach(item => {
item.subTaskData = []
item.subTaskData = [];
if (item.start_dt) {
//先转utc格式
let date = this.$moment.utc(item.start_dt).format();
......@@ -583,38 +583,20 @@ export default {
color: #f2365a;
font-size: 16px;
}
.expande-table-row {
span {
display: inline-block;
}
.label {
width: 6vw;
text-align: center;
border-left: 1px solid $border-color;
background: #f0f0f0;
}
.subtask-info {
border-left: 1px solid #f0f0f0;
text-align: center;
}
.subtask-info:nth-child(2) {
width: 8vw;
}
.subtask-info:nth-child(4) {
width: 6vw;
}
.subtask-info:nth-child(6) {
width: 4.5vw;
}
.subtask-info:nth-child(8) {
width: 4vw;
}
.subtask-info:nth-child(10) {
width: 12vw;
}
line-height: 40px;
border-bottom: 1px solid #f0f0f0;
.subtask-info:nth-child(2) {
width: 8vw;
}
.subtask-info:nth-child(4) {
width: 6vw;
}
.subtask-info:nth-child(6) {
width: 4.5vw;
}
.subtask-info:nth-child(8) {
width: 4vw;
}
.subtask-info:nth-child(10) {
width: 12vw;
}
</style>
<template>
<div class="expande-table-row">
<span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">设备地址</span>
<span class="subtask-info">192.178.99.99</span>
<span class="label">已用资源</span>
<span class="subtask-info">22</span>
<span class="label">设备容量</span>
<span class="subtask-info">33</span>
<span class="label">指定设备下发</span>
<span class="subtask-info">
<el-select v-model="assign_id">
<el-option
v-for="(item, index) in freeList"
:key="index"
:value="item.device_id"
>
{{ item.in_ip }}
</el-option>
</el-select>
</span>
<span class="label sub-btn" @click="subMove">确定</span>
</div>
</template>
<script>
export default {
data() {
return {
assign_id: ""
};
},
props: ["subTaskData", "freeList", "taskData"],
methods: {
subMove() {
let taskID = this.taskData.task_id;
let subTaksID = this.subTaskData.subtask_id;
this.$api.task.getTaskParams(taskID, subTaksID).then(res => {
let obj = {};
obj.mtasks = res.mtasks;
obj.assign_to = {
id: this.assign_id,
flag: 0
};
this.subRoi(taskID, subTaksID, obj);
});
},
subRoi(taskid, subtaskid, postObj) {
this.$api.task
.editRoi(taskid, subtaskid, postObj, {
headers: {
authorization: localStorage.getItem("atoken")
}
})
.then(m => {
if (m.ecode == "200") {
this.$message({
message: "设置成功!",
type: "success"
});
}
});
}
},
created() {},
watch: {
},
mounted() {
this.assign_id = this.subTaskData.assign_id
? this.subTaskData.assign_id
: "";
}
};
</script>
<style lang="scss" scoped>
.expande-table-row {
overflow: hidden;
span {
float: left;
border-bottom: 1px solid #ccc;
overflow: hidden;
}
.label {
width: 6vw;
text-align: center;
border-left: 1px solid $border-color;
background: #f0f0f0;
height: 40px;
line-height: 40px;
}
.subtask-info {
border-left: 1px solid #f0f0f0;
text-align: center;
overflow: hidden;
height: 40px;
line-height: 40px;
}
.subtask-info:nth-child(2) {
width: 9vw;
overflow: hidden;
}
.subtask-info:nth-child(4) {
width: 6vw;
}
.subtask-info:nth-child(6) {
width: 4.5vw;
}
.subtask-info:nth-child(8) {
width: 4vw;
}
.subtask-info:nth-child(10) {
width: 12vw;
}
.sub-btn {
cursor: pointer;
}
}
</style>
......@@ -2,12 +2,29 @@
<div class="alarm-event-box">
<el-table :data="tableData" height="30vh">
<el-table-column type="index" align="center" label="#"></el-table-column>
<el-table-column align="center" prop="camername" label="事件地点"></el-table-column>
<el-table-column align="center" prop="illname" label="抓拍类型"></el-table-column>
<el-table-column align="center" prop="illdt" label="发生时间"></el-table-column>
<el-table-column
align="center"
prop="camername"
label="事件地点"
></el-table-column>
<el-table-column
align="center"
prop="illname"
label="抓拍类型"
></el-table-column>
<el-table-column
align="center"
prop="illdt"
label="发生时间"
></el-table-column>
<el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope">
<el-tooltip content="查看" placement="bottom" effect="light" :visible-arrow="false">
<el-tooltip
content="查看"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<img
src="../../assets/img/home/look.png"
alt
......@@ -16,7 +33,12 @@
/>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow="false">
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<img
src="../../assets/img/home/del.png"
alt
......@@ -34,93 +56,104 @@
export default {
data() {
return {
tableData:[]
}
tableData: []
};
},
methods:{
methods: {
delFun(index, rows) {
rows.splice(index, 1);
},
editVideo(index, rows){
this.$emit('event',rows)
},
editVideo(index, rows) {
this.$emit("event", rows);
}
},
beforeMount(){
let that = this;
this.connect_id = new Date().getTime()
// this.cws = new WebSocket('ws://'+ this.API.IP +'/websocket/v1/integrated/connects/' + this.connect_id)
this.cws = new WebSocket(`ws://${this.$api.wsIP}/websocket/api/v1/datahandle/connects/${this.connect_id}`)
beforeMount() {
try {
let that = this;
this.connect_id = new Date().getTime();
// this.cws = new WebSocket('ws://'+ this.API.IP +'/websocket/v1/integrated/connects/' + this.connect_id)
this.cws = new WebSocket(
`ws://${this.$api.wsIP}/websocket/api/v1/datahandle/connects/${this.connect_id}`
);
this.cws.onopen = () =>{
console.log('ws事件推送服务连接成功')
}
//事件断开
this.cws.onclose = () =>{
window.clearTimeout(that.keepAlive)
console.log('ws事件推送服务断开')
that.connect_id = new Date().getTime()
that.cws = new WebSocket(`ws://${this.$api.wsIP}/websocket/api/v1/datahandle/connects/${this.connect_id}`)
this.cws.onopen = () => {
console.log("ws事件推送服务连接成功");
};
//事件断开
this.cws.onclose = () => {
window.clearTimeout(that.keepAlive);
console.log("ws事件推送服务断开");
that.connect_id = new Date().getTime();
that.cws = new WebSocket(
`ws://${this.$api.wsIP}/websocket/api/v1/datahandle/connects/${this.connect_id}`
);
that.keepAlive = setInterval(() => {
let message = {
type: 'request',
type: "request",
id: new Date().getTime(),
mts: new Date().getTime(),
command:'get /websocket/v1/recv_data/connects/' + this.connect_id +'/keep_alive'
}
this.cws.send(JSON.stringify(message))
command:
"get /websocket/v1/recv_data/connects/" +
this.connect_id +
"/keep_alive"
};
this.cws.send(JSON.stringify(message));
}, 20000);
}
//事件推送信息
let _this = this;
this.cws.onmessage = (evt) =>{
let data = JSON.parse(evt.data)
try {
if(data.event_data.illegal.state == 1){
let illname = _this.getCode('违法类型',data.event_data.illegal.code) || '';
let camername = data.event_data.location.name
let dt = this.showLocalTime(data.event_dt).split(' ')[1];
console.log(data.pics[0].src_url)
let pics = data.pics[0].src_url
let pos = data.event_data.location.pos
let obj = {
illname:illname,
illdt:dt,
camername:camername,
pics:pics,
pos:pos
}
if(that.tableData.length > 40) {
that.tableData.pop(obj)
};
//事件推送信息
let _this = this;
this.cws.onmessage = evt => {
let data = JSON.parse(evt.data);
try {
if (data.event_data.illegal.state == 1) {
let illname =
_this.getCode("违法类型", data.event_data.illegal.code) || "";
let camername = data.event_data.location.name;
let dt = this.showLocalTime(data.event_dt).split(" ")[1];
console.log(data.pics[0].src_url);
let pics = data.pics[0].src_url;
let pos = data.event_data.location.pos;
let obj = {
illname: illname,
illdt: dt,
camername: camername,
pics: pics,
pos: pos
};
if (that.tableData.length > 40) {
that.tableData.pop(obj);
} else {
that.tableData.unshift(obj)
}
that.tableData.unshift(obj)
} else{
that.tableData.unshift(obj);
}
that.tableData.unshift(obj);
}
} catch (error) {
console.log(error);
}
} catch (error) {
}
if(data.command){
console.log('推送服务连接正常')
} else if(data.type =='response'){
console.log('请求任务推送成功')
if (data.command) {
console.log("推送服务连接正常");
} else if (data.type == "response") {
console.log("请求任务推送成功");
}
}
};
this.keepAlive = setInterval(() => {
let message = {
type: 'request',
id: new Date().getTime(),
mts: new Date().getTime(),
command:'get /websocket/v1/recv_data/connects/' + this.connect_id +'/keep_alive'
}
this.cws.send(JSON.stringify(message))
}, 50000);
let message = {
type: "request",
id: new Date().getTime(),
mts: new Date().getTime(),
command:
"get /websocket/v1/recv_data/connects/" +
this.connect_id +
"/keep_alive"
};
this.cws.send(JSON.stringify(message));
}, 50000);
} catch (error) {
console.log(error);
}
}
};
</script>
<style>
</style>>
\ No newline at end of file
<style></style>>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!