Commit 1e5162b5 by 潘建波

1.完善日志;

2.修改添加视频源全选BUG
1 parent 0f836ae1
No preview for this file type
{"commit":"3b002cb765356faab054acb30c7f2009abac6faa","commitDate":"2020-9-9 17:20","buildDate":"2020-9-18 13:34","version":"2.0.8","info":"增加蓝色风格"}
\ No newline at end of file \ No newline at end of file
{"commit":"0f836ae1db6fa125fb5b8de516d3bc87216e607c","commitDate":"2020-9-18 13:43","buildDate":"2020-9-28 18:1","version":"2.0.8","info":"【NEW】添加日志 【NEW】增加加密方式 【BUG】去除地点名称限制 【BUG】点击主节点之后再点击平台,不可以显示平台的信息 【BUG】上传时间是调用的utc时间"}
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ import ops from "./ops"; ...@@ -10,7 +10,7 @@ import ops from "./ops";
let wsIP = ""; let wsIP = "";
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
wsIP = "192.168.9.233:20080"; // 测试环境url wsIP = "192.168.9.62:20080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086"; // baseUrl = "http://192.168.9.61:8086";
break; break;
case "pre": case "pre":
......
...@@ -3,7 +3,7 @@ console.log(process.env.NODE_ENV); ...@@ -3,7 +3,7 @@ console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url // baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = "http://192.168.9.62:20080"; // 测试环境url baseUrl = "http://192.168.9.133:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url // baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086"; // baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510'; // baseUrl = 'http://vion-panda.51vip.biz:52510';
......
...@@ -28,7 +28,6 @@ const oplogs = function(data,service,action) { ...@@ -28,7 +28,6 @@ const oplogs = function(data,service,action) {
"enote": "ok", "enote": "ok",
"remark":action, "remark":action,
"serv_type":service "serv_type":service
} }
api.post(oplogurl,baseData).then(res =>{ api.post(oplogurl,baseData).then(res =>{
......
...@@ -115,5 +115,10 @@ export default { ...@@ -115,5 +115,10 @@ export default {
}, },
oplogs(params) { oplogs(params) {
return api.get(`${baseUrl}/api/v1/log/user_oper_logs`, params) return api.get(`${baseUrl}/api/v1/log/user_oper_logs`, params)
},
catstatistics(params) {
// return api.get(`${baseUrl}/api/v1/log/user_oper_logs`, params)
let url ="http://192.168.9.146:22222/task/statistics"
return api.get(`${url}`, params)
} }
}; };
...@@ -168,6 +168,7 @@ function checkIE() { ...@@ -168,6 +168,7 @@ function checkIE() {
} }
} }
let versioninfo = require("../../../public/js/version"); let versioninfo = require("../../../public/js/version");
let sha1 = require('js-sha1')
Vue.prototype.baseencode = function(str){ Vue.prototype.baseencode = function(str){
// return str // return str
let base = ""; let base = "";
...@@ -185,11 +186,8 @@ Vue.prototype.baseencode = function(str){ ...@@ -185,11 +186,8 @@ Vue.prototype.baseencode = function(str){
// } else { // } else {
// base = str; // base = str;
// } // }
var encode = encodeURI(str);
// // 对编码的字符串转化base64 return sha1(str);
var base64 = btoa(encode);
base = base64;
return base;
} }
Vue.prototype.showLocalTime = function(obj) { Vue.prototype.showLocalTime = function(obj) {
if (obj == undefined) return; if (obj == undefined) return;
......
...@@ -589,3 +589,8 @@ a:active{ ...@@ -589,3 +589,8 @@ a:active{
.el-loading-mask{ .el-loading-mask{
@include background_color(loading_bg); @include background_color(loading_bg);
} }
.capbox .el-table--border td:first-child .cell, .el-table--border th:first-child .cell, .el-table .cell{
padding-right:0 !important;
padding-left: 0px!important;
}
\ No newline at end of file \ No newline at end of file
...@@ -285,6 +285,14 @@ export const asyncRouterMap = [ ...@@ -285,6 +285,14 @@ export const asyncRouterMap = [
icon: "el-icon-location" icon: "el-icon-location"
}, },
component: resolve => require(["../views/ops/log_manage.vue"], resolve) component: resolve => require(["../views/ops/log_manage.vue"], resolve)
},
{
path: "/ops/captureStatistics",
name: "抓拍统计",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/capture_statistics.vue"], resolve)
} }
] ]
} }
......
...@@ -59,6 +59,7 @@ let particlesConfig = require("../assets/js/particles.json"); ...@@ -59,6 +59,7 @@ let particlesConfig = require("../assets/js/particles.json");
let versioninfo = require("../../public/js/version"); let versioninfo = require("../../public/js/version");
import types from "../store/types.js"; import types from "../store/types.js";
export default { export default {
name: "Login", name: "Login",
data() { data() {
......
<template>
<div class="innnerBox capbox">
<el-col :span="22">
<el-form ref="form" label-width="80px" inline>
<el-form-item label="任务名称">
<span class="selectBox">
<el-select
filterable
placeholder="请选择"
:popper-append-to-body="false"
v-model="conditions.task_id"
@change="getSubTask"
>
<el-option value label="全部"></el-option>
<el-option
v-for="item in taskList"
:value="item.task_id"
:key="item.task_id"
:label="item.task_name"
></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="视频名称">
<span class="selectBox">
<el-select
filterable
placeholder="请选择"
:popper-append-to-body="false"
v-model="conditions.subtask_id"
>
<el-option
v-for="item in subTaskList"
:value="item.subtask_id"
:key="item.subtask_id"
:label="item.subtask_name"
></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="查询类型">
<span class="selectBox">
<el-select
filterable
placeholder="请选择"
:popper-append-to-body="false"
v-model="conditions.search_type"
>
<el-option value label="全部"></el-option>
<el-option
v-for="item in types"
:value="item.value"
:key="item.value"
:label="item.name"
></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="起始时间">
<span class="dateBox">
<el-date-picker
v-model="dates"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</span>
</el-form-item>
</el-form>
</el-col>
<el-col :span="2">
<el-button type="primary" style @click="query" class="block">查询</el-button>
</el-col>
<div style>
<el-table :data="tableData" :height="tableHeight" stripe border v-loading="loading">
<el-table-column width="90" align="center" type="index" label="序号"></el-table-column>
<el-table-column align="center" prop="taskname" label="任务名称"></el-table-column>
<el-table-column align="center" label="子任务名称">
<template slot-scope="scope">
<div v-for="item in scope.row.subtaskList" :key="item.subtaskid" class="sub_line">
{{item.subtaskname}}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="过车" width="200">
<template slot-scope="scope">
<div v-for="item in scope.row.subtaskList" :key="item.subtaskid" class="sub_line">
{{item.vechile}}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="违章" width="200">
<template slot-scope="scope">
<div v-for="item in scope.row.subtaskList" :key="item.subtaskid" class="sub_line">
{{item.illegal}}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="事件" width="200">
<template slot-scope="scope">
<div v-for="item in scope.row.subtaskList" :key="item.subtaskid" class="sub_line">
{{item.event}}
</div>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:total="total"
></el-pagination>
<div style="clear: both;"></div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
let start_dt = this.$moment().format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
return {
dates: [start_dt, end_dt],
conditions: {
start_dt: start_dt,
end_dt: end_dt,
username_like: "",
task_id:null,
subtask_id:null,
search_type:'vechile'
},
loading:false,
taskList:[],
servname: "",
tableData: [],
subTaskList:[],
types:[{
name:"过车",
value:"vechile",
},{
name:"违法",
value:"illegal",
},{
name:"事件",
value:"event",
}],
total: 0,
page: 1,
pageSize: 30,
tableHeight: window.opsTableHeight
};
},
watch: {
dates(val) {
this.conditions.start_dt = val[0];
this.conditions.end_dt = val[1];
}
},
components: {},
mounted() {
this.getTaskList();
this.getData();
},
methods: {
numFormatter(row, column, cellValue, index) {
return (index + 1) * this.page;
},
arraySpanMethod({ row, column, rowIndex, columnIndex }){
if (rowIndex % 2 === 0) {
if (columnIndex === 0) {
return [1, 2];
} else if (columnIndex === 1) {
return [0, 0];
}
}
},
handleSizeChange(val) {
this.pageSize = val;
this.getData();
},
handleCurrentChange(val) {
this.page = val;
this.getData();
},
query() {
this.getData();
},
getTaskList() {
this.$api.task
.getTask({
source_type: "pull_video_stream",
task_type: "normal"
})
.then(res => {
this.taskList = res.list_data;
});
},
getSubTask() {
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
if (res.list_data == null) {
this.subTaskList = [];
} else {
this.subTaskList = res.list_data;
}
this.subTaskList.unshift({
subtask_id: "",
subtask_name: "全部"
});
this.conditions.subtask_id = "";
});
},
getData() {
this.tableData = [];
this.loading = true;
let offset = (this.page - 1) * this.pageSize;
let search_params = {
limit: this.pageSize,
offset: offset,
start_dt: this.$moment(this.conditions.start_dt)
.utc()
.format("YYYY-MM-DD HH:mm:ss"),
end_dt: this.$moment(this.conditions.end_dt)
.utc()
.format("YYYY-MM-DD HH:mm:ss"),
task_id: this.conditions.task_id,
subtask_id:this.conditions.subtask_id,
type:this.conditions.search_type
};
this.$api.ops
.catstatistics(search_params)
.then(res => {
this.loading = false;
this.total = res.total_num;
this.tableData = res.list_data;
})
.catch(err => {});
}
}
};
</script>
<style lang="scss" scoped>
.sub_line{
width: 100%;
height: 40px;
line-height: 40px;
border-bottom-width: 1px;
border-bottom-style: solid;
@include border-color(table_border);
padding:0 10px;
}
.sub_line:last-child{
border-bottom: 0px solid #ccc;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-button type="primary" style="" @click="query" class="block">查询</el-button> <el-button type="primary" style="" @click="query" class="block">查询</el-button>
<el-button type="" style="" @click="exportlogs" class="block">导出</el-button>
</el-col> </el-col>
<div style=""> <div style="">
<el-table <el-table
...@@ -50,8 +51,7 @@ ...@@ -50,8 +51,7 @@
<el-table-column <el-table-column
width="90" width="90"
align="center" align="center"
prop="num" type="index"
:formatter="numFormatter"
label="序号"> label="序号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
}, },
srevarr: [{ srevarr: [{
serv_type:"serv_task", serv_type:"serv_task",
serv_name:"场景设置" serv_name:"任务设置"
},{ },{
serv_type:"serv_store", serv_type:"serv_store",
serv_name:"存储配置" serv_name:"存储配置"
...@@ -132,6 +132,12 @@ ...@@ -132,6 +132,12 @@
},{ },{
serv_type:"serv_login", serv_type:"serv_login",
serv_name:"登录日志" serv_name:"登录日志"
},{
serv_type:"serv_scene",
serv_name:"场景设置"
},{
serv_type:"serv_vchan",
serv_name:"视频管理"
} }
], ],
servname:'', servname:'',
...@@ -205,6 +211,16 @@ ...@@ -205,6 +211,16 @@
}) })
}, },
exportlogs(){
let params = {
dt__gte: this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss'),
dt__lt:this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss'),
serv_type:this.servname,
username: this.conditions.username_like ? this.conditions.username_like.replace(/\s\s*/g, '') : this.conditions.username_like
}
let href = `${location.origin}/api/v1/log/export_user_oper_logs?dt__gte=${params.dt__gte}&dt__lt=${params.dt__lt}&serv_type=${params.serv_type}&username=${params.username}`
window.open(href);
}
}, },
} }
</script> </script>
......
...@@ -238,11 +238,12 @@ ...@@ -238,11 +238,12 @@
message: '删除成功!' message: '删除成功!'
}); });
this.getTableList(); this.getTableList();
this.$logs.oplogs(res,'serv_auth',`删除角色${row.role_name}`); debugger
this.$logs.oplogs(res,'serv_auth',`删除角色${row.name}`);
}else{ }else{
this.$message({ this.$message({
type: 'error', type: 'error',
message: '删除失败!' message: res.enote
}); });
} }
}) })
......
...@@ -328,6 +328,7 @@ export default { ...@@ -328,6 +328,7 @@ export default {
type: "success", type: "success",
message: "NTP校时成功!" message: "NTP校时成功!"
}); });
this.$logs.oplogs(res,'serv_system',`校时设置`);
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
......
...@@ -268,8 +268,8 @@ export default { ...@@ -268,8 +268,8 @@ export default {
}); });
} else { } else {
let exportFileUrl = res.file_path; let exportFileUrl = res.file_path;
window.location.href = exportFileUrl;
this.$logs.oplogs(res,'serv_system',`备份导出`); this.$logs.oplogs(res,'serv_system',`备份导出`);
window.location.href = exportFileUrl;
} }
}); });
} else { } else {
...@@ -288,6 +288,7 @@ export default { ...@@ -288,6 +288,7 @@ export default {
}); });
} else { } else {
let exportFileUrl = res.enote; let exportFileUrl = res.enote;
this.$logs.oplogs(res,'serv_system',`备份导出`);
window.location.href = exportFileUrl; window.location.href = exportFileUrl;
} }
}); });
...@@ -359,7 +360,7 @@ export default { ...@@ -359,7 +360,7 @@ export default {
message: "自动重启配置成功!!" message: "自动重启配置成功!!"
}); });
this.getRebootSetting(); this.getRebootSetting();
this.$logs.oplogs(res,'serv_system',`校时编辑`); this.$logs.oplogs(res,'serv_system',`设置定时重启`);
} else { } else {
console.log("自动重启配置失败!"); console.log("自动重启配置失败!");
} }
......
...@@ -240,6 +240,7 @@ export default { ...@@ -240,6 +240,7 @@ export default {
unid: this.addVideoParam.addr_unid unid: this.addVideoParam.addr_unid
}; };
this.$emit("getData", data); this.$emit("getData", data);
// this.$emit("getData", data);
this.cameraAddVisible = false; this.cameraAddVisible = false;
this.$logs.oplogs(res,'serv_vchan',`在地点${this.initParam.addr_name}编辑相机${this.addVideoParam.name}`); this.$logs.oplogs(res,'serv_vchan',`在地点${this.initParam.addr_name}编辑相机${this.addVideoParam.name}`);
} else { } else {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
class="filter-tree" class="filter-tree"
accordion accordion
:data="treeData" :data="treeData"
node-key="id"
:props="defaultProps" :props="defaultProps"
@node-click="handleNodeClick" @node-click="handleNodeClick"
:expand-on-click-node="false" :expand-on-click-node="false"
...@@ -289,6 +290,11 @@ export default { ...@@ -289,6 +290,11 @@ export default {
} }
}); });
}, },
delTreenode(data){
debugger
this.$refs.catree.remove(data.vchan_refid)
},
nodeAddClick(node, data) { nodeAddClick(node, data) {
if (data.org_type == "address") { if (data.org_type == "address") {
//添加视频 //添加视频
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
@clickHandle="getTable" @clickHandle="getTable"
@getTree="getCameraTree" @getTree="getCameraTree"
@getData="submitLaterGet" @getData="submitLaterGet"
ref="cameratree"
></cameraTree> ></cameraTree>
<videoTree <videoTree
:filterText="searchText" :filterText="searchText"
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
> >
<span <span
class="el-icon-delete delIcon" class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)" @click="delFun(scope.$index, scope.row,formattterData)"
></span> ></span>
</el-tooltip> </el-tooltip>
<span class="tableSpanBorder"></span> <span class="tableSpanBorder"></span>
...@@ -234,7 +235,6 @@ export default { ...@@ -234,7 +235,6 @@ export default {
syncDialog syncDialog
}, },
mounted() { mounted() {
console.log("aa", this.tableHeight);
this.getCameraTree(); this.getCameraTree();
this.getVideoTree(); this.getVideoTree();
this.getSyncTree(); this.getSyncTree();
...@@ -242,7 +242,6 @@ export default { ...@@ -242,7 +242,6 @@ export default {
methods: { methods: {
syncdetail(index, data) { syncdetail(index, data) {
this.$refs.syncdetail.initDialog(data); this.$refs.syncdetail.initDialog(data);
console.log(data);
}, },
getCameraTree() { getCameraTree() {
this.tableType = "camera"; this.tableType = "camera";
...@@ -286,7 +285,6 @@ export default { ...@@ -286,7 +285,6 @@ export default {
.then(m => { .then(m => {
if (m.vchan_struct.length > 0) { if (m.vchan_struct.length > 0) {
var sync_data = this.syncBuildTree(m.vchan_struct); var sync_data = this.syncBuildTree(m.vchan_struct);
console.log(sync_data);
this.$refs.syncRef.initTree(sync_data); this.$refs.syncRef.initTree(sync_data);
} else { } else {
let emptyChild = []; let emptyChild = [];
...@@ -417,8 +415,7 @@ export default { ...@@ -417,8 +415,7 @@ export default {
editFun(index, row) { editFun(index, row) {
this.$refs.editCamera.initDialog(row, "edit", this.dev_unid); this.$refs.editCamera.initDialog(row, "edit", this.dev_unid);
}, },
delFun(index, row) { delFun(index, row,rows) {
debugger
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", { this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -431,11 +428,21 @@ export default { ...@@ -431,11 +428,21 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
rows.splice(index, 1);
let data = { let data = {
org_type: "address", org_type: "address",
unid: row.addrNode.unid unid: row.addrNode.unid
}; };
this.submitLaterGet(data); console.log(row)
if(row.addrNode && row.addrNode.childs) {
let childrenarr = row.addrNode.childs;
childrenarr.map(ele => {
if(ele.vchan_refid == row.id) {
this.$refs.cameratree.delTreenode(ele)
}
})
}
// this.submitLaterGet(data);
this.$logs.oplogs(res,'serv_vchan',`删除实时视频,视频名称:${row.vchan_name}`); this.$logs.oplogs(res,'serv_vchan',`删除实时视频,视频名称:${row.vchan_name}`);
} }
}); });
...@@ -509,7 +516,6 @@ export default { ...@@ -509,7 +516,6 @@ export default {
this.tableType = "sync"; this.tableType = "sync";
this.formattterData = []; this.formattterData = [];
this.formattterData.push(data); this.formattterData.push(data);
console.log(this.formattterData);
}, },
getVideoTable(data, type) { getVideoTable(data, type) {
this.tableType = type; this.tableType = type;
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
this.cws.onmessage = evt => { this.cws.onmessage = evt => {
let data = JSON.parse(evt.data); let data = JSON.parse(evt.data);
if (data.command) { if (data.command) {
console.log(""); console.log("心跳连接正常!");
} else if (data.type == "response") { } else if (data.type == "response") {
console.log("请求任务推送成功"); console.log("请求任务推送成功");
} else if (data.event_cate) { } else if (data.event_cate) {
...@@ -132,6 +132,7 @@ export default { ...@@ -132,6 +132,7 @@ export default {
return; return;
} }
if (data.event_cate != "flow") { if (data.event_cate != "flow") {
console.log(data);
try { try {
data.picsEmpty = data.pics.length == 0 ? true : false; data.picsEmpty = data.pics.length == 0 ? true : false;
if (data.pics[0].object_rect != undefined) { if (data.pics[0].object_rect != undefined) {
...@@ -187,7 +188,7 @@ export default { ...@@ -187,7 +188,7 @@ export default {
that.resultData = data; that.resultData = data;
}, 500); }, 500);
} catch (err) { } catch (err) {
console.log(err); console.log("err" + err);
} }
} }
} }
......
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
this.dialogVisible = false; this.dialogVisible = false;
this.$store.commit("setocxstate", 1); this.$store.commit("setocxstate", 1);
this.fileList = []; this.fileList = [];
this.$logs.oplogs(res,'serv_scene',`任务导入成功,任务名称:${this.subtask_name}`); this.$logs.oplogs({},'serv_scene',`配置导入成功,任务名称:${this.subtask_name}`);
}, },
errorfile(err){ errorfile(err){
console.log(err); console.log(err);
......
...@@ -285,7 +285,8 @@ export default { ...@@ -285,7 +285,8 @@ export default {
this.$api.task this.$api.task
.suspendAlternate(this.taskid, this.subtaskid, _s) .suspendAlternate(this.taskid, this.subtaskid, _s)
.then(res => { .then(res => {
console.log(res); let stautus = _s == 1?"开启":"关闭";
this.$logs.oplogs(res,'serv_scene', `${this.subtaskdata.subtask_name}${stautus}轮询播放`);
}); });
} }
}, },
...@@ -392,6 +393,7 @@ export default { ...@@ -392,6 +393,7 @@ export default {
}; };
postObj.conf_type = "calibration"; postObj.conf_type = "calibration";
} }
let pnum = postObj.mtasks[0].scenes[this.curindex].position_num;
this.$api.task this.$api.task
.editRoi(this.taskid, this.subtaskid, postObj, { .editRoi(this.taskid, this.subtaskid, postObj, {
headers: { headers: {
...@@ -412,21 +414,21 @@ export default { ...@@ -412,21 +414,21 @@ export default {
roi: xml roi: xml
} }
]; ];
this.$logs.oplogs(m,'serv_scene',`修改了任务${sunbtaskname}预置位ROI==>${xml}`); this.$logs.oplogs(m,'serv_scene',`修改了任务:${sunbtaskname},预置位编号${pnum}的区域配置`);
break; break;
case "calibration": case "calibration":
this.taskInfo.calibration_status = 1; this.taskInfo.calibration_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].calibration = { this.taskInfo.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml calibration: xml
}; };
this.$logs.oplogs(m,'serv_scene',`修改了任务${sunbtaskname}标定==>${xml}`); this.$logs.oplogs(m,'serv_scene',`修改了任务:${sunbtaskname},预置位编号${pnum}的标定`);
break; break;
case "config": case "config":
this.taskInfo.param_status = 1; this.taskInfo.param_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].config = { this.taskInfo.mtasks[0].scenes[this.curindex].config = {
xml: xml xml: xml
}; };
this.$logs.oplogs(m,'serv_scene',`修改了任务${sunbtaskname}参数设置==>${xml}`); this.$logs.oplogs(m,'serv_scene',`修改了任务:${sunbtaskname},预置位编号${pnum}的参数设置`);
break; break;
default: default:
break; break;
......
...@@ -423,7 +423,7 @@ export default { ...@@ -423,7 +423,7 @@ export default {
? this.conditions.location_code.replace(/\s\s*/g, "") ? this.conditions.location_code.replace(/\s\s*/g, "")
: this.conditions.location_code : this.conditions.location_code
}&event_cate=${cate}`; }&event_cate=${cate}`;
this.$logs.oplogs(res,'serv_serarch',`事件数据导出`); this.$logs.oplogs({},'serv_serarch',`事件数据导出`);
window.open(encodeURI(url)); window.open(encodeURI(url));
}, },
leftFun() { leftFun() {
......
...@@ -455,7 +455,7 @@ export default { ...@@ -455,7 +455,7 @@ export default {
this.$refs.visableDialog.playvideos(play_url); this.$refs.visableDialog.playvideos(play_url);
}, },
exportFun() { exportFun() {
this.$logs.oplogs(res,'serv_serarch',`违法事件导出`); this.$logs.oplogs({},'serv_serarch',`违法事件导出`);
window.open( window.open(
encodeURI( encodeURI(
process.env.VUE_APP_URL + process.env.VUE_APP_URL +
......
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
return codename; return codename;
}, },
exportFun() { exportFun() {
this.$logs.oplogs(res,'serv_serarch',`流量检索导出`); this.$logs.oplogs({},'serv_serarch',`流量检索导出`);
window.open( window.open(
encodeURI( encodeURI(
process.env.VUE_APP_URL + process.env.VUE_APP_URL +
......
...@@ -448,7 +448,7 @@ export default { ...@@ -448,7 +448,7 @@ export default {
}); });
}, },
exportFun() { exportFun() {
this.$logs.oplogs(res,'serv_serarch',`过车事件导出`); this.$logs.oplogs({},'serv_serarch',`过车事件导出`);
window.open( window.open(
encodeURI( encodeURI(
process.env.VUE_APP_URL + process.env.VUE_APP_URL +
...@@ -505,7 +505,7 @@ export default { ...@@ -505,7 +505,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`过车事件批量删除了${his.selectcheck.length}条`); this.$logs.oplogs(res,'serv_serarch',`过车事件批量删除了${this.selectcheck.length}条`);
this.getData(); this.getData();
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
......
...@@ -596,7 +596,7 @@ export default { ...@@ -596,7 +596,7 @@ export default {
"&lobodyColor=" + "&lobodyColor=" +
this.conditions.lobodyColor; this.conditions.lobodyColor;
} }
this.$logs.oplogs(res,'serv_serarch',`行人非机动车导出`); this.$logs.oplogs({},'serv_serarch',`行人非机动车导出`);
window.open(encodeURI(url)); window.open(encodeURI(url));
}, },
batchdel() { batchdel() {
......
...@@ -335,7 +335,8 @@ export default { ...@@ -335,7 +335,8 @@ export default {
type: "error" type: "error"
}); });
} }
this.$logs.oplogs(res,'serv_task',`添加任务${data.task_name}`); debugger
this.$logs.oplogs(res,'serv_task',`添加任务${this.formData.task_name}`);
}); });
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
......
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
<script> <script>
import videoplay from "../public/videoPlay"; import videoplay from "../public/videoPlay";
import moveTask from "./moveSubTask"; import moveTask from "./moveSubTask";
var jsond = require("./treedata.json")
export default { export default {
data() { data() {
return { return {
...@@ -242,7 +243,6 @@ export default { ...@@ -242,7 +243,6 @@ export default {
let status = true; let status = true;
let subData = []; let subData = [];
this.tableData.map(e => { this.tableData.map(e => {
debugger
let vchan = e; let vchan = e;
let data = { let data = {
is_dome: false, is_dome: false,
...@@ -270,6 +270,12 @@ export default { ...@@ -270,6 +270,12 @@ export default {
type: "success" type: "success"
}); });
this.setvisible = false; this.setvisible = false;
let subname ="";
res.map(ele => {
subname += ele.subtaskName+";"
});
let taskname = this.taskData.task_name;
this.$logs.oplogs(res,'serv_task',`${taskname}添加视频源${subname}`);
this.$emit("refresh"); this.$emit("refresh");
} else { } else {
if (res.length == 0) { if (res.length == 0) {
...@@ -279,7 +285,6 @@ export default { ...@@ -279,7 +285,6 @@ export default {
} }
} }
this.$logs.oplogs(res,'serv_task',`添加子任务`);
}); });
}, },
playVideo(data) { playVideo(data) {
...@@ -322,7 +327,10 @@ export default { ...@@ -322,7 +327,10 @@ export default {
message: res.enote message: res.enote
}); });
} }
this.$logs.oplogs(res,'serv_task',`删除子任务${this.editData.name}`); let taskname = this.taskData.task_name;
debugger
console.log(data)
this.$logs.oplogs(res,'serv_task',`${taskname}删除视频源${data.vchan_name}`);
}); });
if (action != "tree") { if (action != "tree") {
setTimeout(() => { setTimeout(() => {
...@@ -402,7 +410,6 @@ export default { ...@@ -402,7 +410,6 @@ export default {
this.$api.device this.$api.device
.getDevtree(this.dev_unid, node.data.name, params) .getDevtree(this.dev_unid, node.data.name, params)
.then(data => { .then(data => {
debugger;
let vchans = data.vchan_struct || data.list_data; let vchans = data.vchan_struct || data.list_data;
for (let i in vchans) { for (let i in vchans) {
const vchan = vchans[i]; const vchan = vchans[i];
...@@ -424,16 +431,15 @@ export default { ...@@ -424,16 +431,15 @@ export default {
vchan.vchan_refid = vchan.refid || vchan.vchan_refid; vchan.vchan_refid = vchan.refid || vchan.vchan_refid;
} }
resolve(vchans); resolve(vchans);
setTimeout(() => {
this.checkvckan(); this.checkvckan();
}, 200);
}); });
return; return;
} }
for (let i in node.data.childs) { for (let i in node.data.childs) {
const element = node.data.childs[i]; const element = node.data.childs[i];
// console.log(element.childs) // console.log(element.childs)
element.leaf = element.typea == 1 || element.vchan_type == "camera"; // element.leaf = (element.typea == 1&&element.childs&&element.childs.length < 1)|| element.vchan_type == "camera" ;
element.leaf = element.typea == 1 || element.vchan_type == "camera" ;
element.disabled = !element.leaf; element.disabled = !element.leaf;
element.name = element.name =
element.name || element.org_name || element.vchan_name || "未命名"; element.name || element.org_name || element.vchan_name || "未命名";
...@@ -449,6 +455,9 @@ export default { ...@@ -449,6 +455,9 @@ export default {
message: "该组织下没有像机" message: "该组织下没有像机"
}); });
} }
setTimeout(() => {
this.checkvckan();
}, 10);
return resolve(node.data.childs); return resolve(node.data.childs);
}, },
renderContent(h, { node, data, store }) { renderContent(h, { node, data, store }) {
......
...@@ -495,6 +495,8 @@ export default { ...@@ -495,6 +495,8 @@ export default {
message: res.enote message: res.enote
}); });
if (res.ecode == "200") { if (res.ecode == "200") {
let typename = type=='start'?"启动":"暂停"
this.$logs.oplogs(res,'serv_task',`${typename}任务${data.task_name}`);
this.getTaskList(); this.getTaskList();
} }
}); });
...@@ -510,6 +512,7 @@ export default { ...@@ -510,6 +512,7 @@ export default {
type: res.ecode == "200" ? "success" : "error", type: res.ecode == "200" ? "success" : "error",
message: res.enote message: res.enote
}); });
this.$logs.oplogs(res,'serv_task',`删除任务${data.task_name}`);
if (res.ecode == "200") { if (res.ecode == "200") {
this.getTaskList(); this.getTaskList();
} }
......
{
"vchan_struct": [
{
"childs": [],
"refid": "34020000001320000001",
"typea": 1,
"name": "cheshi_ch1",
"ip": "",
"url": "",
"port": 0
},
{
"childs": [],
"refid": "43000000002000007701",
"typea": 2,
"name": "高警局市州支队"
},
{
"childs": [
{
"childs": [
{
"childs": [],
"refid": "43100009991324000001",
"typea": 1,
"name": "G76夏蓉高速湖南段K681+015M",
"ip": "43.123.9.68",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000002",
"typea": 1,
"name": "许广高速公路北往南948km+400m",
"ip": "43.123.9.74",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000003",
"typea": 1,
"name": "G76夏蓉高速公路702km",
"ip": "43.123.9.71",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000004",
"typea": 1,
"name": "许广高速公路南往北975km+500m",
"ip": "43.123.9.77",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000005",
"typea": 1,
"name": "许广高速公路南往北1036km+500m",
"ip": "43.123.9.80",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000006",
"typea": 1,
"name": "许广高速K1018+900临武服务区卡口",
"ip": "43.123.9.83",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000007",
"typea": 1,
"name": "G76夏蓉高速公路东往西569km+665m",
"ip": "43.123.9.86",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000008",
"typea": 1,
"name": "G76夏蓉高速公路西往东589km+300m",
"ip": "43.123.9.89",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000009",
"typea": 1,
"name": "IP Camera 09",
"ip": "43.123.9.119",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000010",
"typea": 1,
"name": "武深高速公路北往南572km+500m",
"ip": "43.123.9.95",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000011",
"typea": 1,
"name": "武深高速公路南往北649km+100m",
"ip": "43.123.9.98",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000012",
"typea": 1,
"name": "武深高速公路北往南632km+100m",
"ip": "43.123.9.101",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000013",
"typea": 1,
"name": "许广高速公路北往南1069km+500m",
"ip": "43.123.9.104",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000014",
"typea": 1,
"name": "S31宜凤高速公路南往北46km+980m",
"ip": "43.123.9.107",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000015",
"typea": 1,
"name": "G76夏蓉高速公路东往西710km+900m",
"ip": "43.123.9.110",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000016",
"typea": 1,
"name": "G76厦蓉高速K719+400m",
"ip": "43.123.9.113",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000017",
"typea": 1,
"name": "许广高速公路南向北1005km+200m",
"ip": "43.123.9.116",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000018",
"typea": 1,
"name": "G0422武深高速南往北603km+500m",
"ip": "43.123.9.92",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000019",
"typea": 1,
"name": "欧阳海服务区",
"ip": "43.123.9.123",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000020",
"typea": 1,
"name": "许广K953北往南",
"ip": "43.123.70.186",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000022",
"typea": 1,
"name": "郴州临武服务区高清立杆球机1",
"ip": "43.123.8.185",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000023",
"typea": 1,
"name": "九龙江执法站高清立杆球机",
"ip": "43.123.8.201",
"url": "",
"port": 8800
},
{
"childs": [],
"refid": "43100009991324000024",
"typea": 1,
"name": "厦蓉高速K558",
"ip": "172.16.104.25",
"url": "",
"port": 8800
}
],
"refid": "43100009991180023444",
"typea": 1,
"name": "缉查布控二期",
"ip": "",
"url": "",
"port": 8800
}
],
"refid": "43000000002000012122",
"typea": 2,
"name": "本域"
},
{
"childs": [],
"refid": "43100009992000000001",
"typea": 2,
"name": "高警局郴州支队"
}
],
"dev_unid": "9cb6e39adc5176b81879f6c22f1d962"
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!