Commit 0f836ae1 by 潘建波

【NEW】添加日志

【NEW】增加加密方式
【BUG】去除地点名称限制
【BUG】点击主节点之后再点击平台,不可以显示平台的信息
【BUG】上传时间是调用的utc时间
1 parent 3b002cb7
This file is too large to display.
No preview for this file type
export let config = {
"logstatus":true,
}
\ No newline at end of file \ No newline at end of file
{"commit":"af79acb9807045a0e60ec210db2d96b4e656a7b0","commitDate":"2020-7-30 17:21","buildDate":"2020-9-9 9:37","version":"2.0.7","info":"feat✨ 修改任务暂停时才允许任务修改 feat✨ 任务修改不允许修改算法 feat✨ 10分钟内不操作自动退出 feat✨ 流量检索增加车头时距和时间占有率 feat✨ 单任务导出及导入功能 feat✨ 全局备份功能 BUG:修改子任务下发设备类型要依据大任务类型"}
\ No newline at end of file \ No newline at end of file
{"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
...@@ -90,6 +90,7 @@ service.interceptors.response.use(response => { ...@@ -90,6 +90,7 @@ service.interceptors.response.use(response => {
// location.reload(); // location.reload();
} else { } else {
let { data } = response; let { data } = response;
// data.response = response;
return data; return data;
} }
err => { err => {
......
let baseUrl = "/api"; // 本地代理 let baseUrl = "/api"; // 本地代理
import axios from "axios";
console.log(process.env.NODE_ENV); console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url // baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = "http://192.168.9.233:20080"; // 测试环境url baseUrl = "http://192.168.9.62: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';
......
import api from './index';
import baseurl from './baseUrl';
import moment from "moment";
import {config} from '../../public/js/config'
let oplogurl = `${baseurl}/api/v1/log_serv/user_oper_logs`
let userlogurl = `${baseurl}/api/v1/log_serv/system_logs/`
let servicename = {
serv_task:"任务设置",
serv_scene:"场景设置",
serv_store:"存储配置",
serv_auth:"用户管理",
serv_system:"系统管理",
serv_serch:"数据查询"
}
const oplogs = function(data,service,action) {
//开启日志模式才进行日志收集
if(config.logstatus) {
let username = localStorage.getItem('uname');
let baseData = {
"dt": moment().locale('zh-cn'),
"username": username,
"api_type": "http",
"verb": "1",
"path": "***" ,
"params": {"*":'*'},
"ecode": 0,
"enote": "ok",
"remark":action,
"serv_type":service
}
api.post(oplogurl,baseData).then(res =>{
});
}
}
export const syslogs =function(){
if(config.logstatus) {
api.post(oplogurl,data).then(res =>{
});
}
}
const loglist = {oplogs,syslogs}
const install = function(Vue) {
if (install.installed) {
return;
}
install.installed = true;
Object.defineProperties(Vue.prototype, {
$logs: {
get() {
return loglist;
}
}
});
};
export default {
install
};
...@@ -112,5 +112,8 @@ export default { ...@@ -112,5 +112,8 @@ export default {
}, },
exportback(params) { exportback(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/backup`, params); return api.get(`${baseUrl}/api/v1/devconf_fx/backup`, params);
},
oplogs(params) {
return api.get(`${baseUrl}/api/v1/log/user_oper_logs`, params)
} }
}; };
...@@ -169,8 +169,8 @@ function checkIE() { ...@@ -169,8 +169,8 @@ function checkIE() {
} }
let versioninfo = require("../../../public/js/version"); let versioninfo = require("../../../public/js/version");
Vue.prototype.baseencode = function(str){ Vue.prototype.baseencode = function(str){
return str // return str
// let base = ""; let base = "";
// if(versioninfo && versioninfo.version ){ // if(versioninfo && versioninfo.version ){
// let vsstring = versioninfo.version.split("."); // let vsstring = versioninfo.version.split(".");
// let vs = Number(String(vsstring[0])+String(vsstring[1])+String(vsstring[2])) // let vs = Number(String(vsstring[0])+String(vsstring[1])+String(vsstring[2]))
...@@ -185,7 +185,11 @@ Vue.prototype.baseencode = function(str){ ...@@ -185,7 +185,11 @@ Vue.prototype.baseencode = function(str){
// } else { // } else {
// base = str; // base = str;
// } // }
// return base; var encode = encodeURI(str);
// // 对编码的字符串转化base64
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;
......
...@@ -7,6 +7,7 @@ import router from "./router"; ...@@ -7,6 +7,7 @@ import router from "./router";
import store from "./store"; import store from "./store";
import resetCss from "./assets/resetElementCss/index.scss"; import resetCss from "./assets/resetElementCss/index.scss";
import api from "./api/install"; import api from "./api/install";
import log from "./api/log"
import "./assets/css/public.css"; import "./assets/css/public.css";
import echarts from "echarts"; import echarts from "echarts";
import "./assets/icon/icon3/iconfont.css"; import "./assets/icon/icon3/iconfont.css";
...@@ -24,6 +25,7 @@ Vue.prototype.axios = axios; ...@@ -24,6 +25,7 @@ Vue.prototype.axios = axios;
// Vue.use(VueParticles); // Vue.use(VueParticles);
Vue.use(api); Vue.use(api);
Vue.use(log);
Vue.use(ElementUI, { size: "small", zIndex: 3000 }); Vue.use(ElementUI, { size: "small", zIndex: 3000 });
Vue.use(resetCss); Vue.use(resetCss);
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
...@@ -118,6 +118,8 @@ export default { ...@@ -118,6 +118,8 @@ export default {
sessionStorage.setItem("user_unid", res.user_unid); sessionStorage.setItem("user_unid", res.user_unid);
//本系统可以直接用本地缓存做 //本系统可以直接用本地缓存做
localStorage.setItem("atoken", res.atoken); localStorage.setItem("atoken", res.atoken);
localStorage.setItem("uname", res.user_name);
this.$logs.oplogs(res,'serv_login',`登录了平台`);
// 处理登录用户权限菜单显示问题; // 处理登录用户权限菜单显示问题;
if(res.firstLogin) { if(res.firstLogin) {
this.$router.push('resetpass') this.$router.push('resetpass')
......
...@@ -7,6 +7,22 @@ ...@@ -7,6 +7,22 @@
<el-input placeholder="请输入用户名" v-model="conditions.username_like"></el-input> <el-input placeholder="请输入用户名" v-model="conditions.username_like"></el-input>
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="服务名称" >
<el-select
filterable
placeholder="请选择"
:popper-append-to-body="false"
v-model="servname"
>
<el-option value="" label="全部"></el-option>
<el-option
v-for="item in srevarr"
:value="item.serv_type"
:key="item.task_id"
:label="item.serv_name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="起始时间"> <el-form-item label="起始时间">
<span class="dateBox"> <span class="dateBox">
<el-date-picker <el-date-picker
...@@ -32,34 +48,38 @@ ...@@ -32,34 +48,38 @@
stripe stripe
border> border>
<el-table-column <el-table-column
align="center" width="90"
align="center"
prop="num" prop="num"
:formatter="numFormatter" :formatter="numFormatter"
label="序号"> label="序号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="log_type"
align="center" align="center"
:formatter="typeFormatter" :formatter="typeFormatter"
label="日志类型"> label="日志类型">
<template slot-scope="scope">
<div>
{{showlogtype(scope.row.serv_type)}}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="log_time"
align="center" align="center"
label="操作时间"> label="操作时间">
<template slot-scope="scope">
<div>
{{showLocalTime(scope.row.dt)}}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="user_name" prop="username"
align="center" align="center"
label="操作用户名"> label="操作用户名">
</el-table-column> </el-table-column>
<el-table-column
prop="client_ip"
align="center"
label="操作用户IP地址">
</el-table-column>
<el-table-column <el-table-column
prop="log_content" prop="remark"
align="center" align="center"
label="操作内容"> label="操作内容">
</el-table-column> </el-table-column>
...@@ -94,6 +114,27 @@ ...@@ -94,6 +114,27 @@
end_dt:end_dt, end_dt:end_dt,
username_like:'' username_like:''
}, },
srevarr: [{
serv_type:"serv_task",
serv_name:"场景设置"
},{
serv_type:"serv_store",
serv_name:"存储配置"
},{
serv_type:"serv_auth",
serv_name:"用户管理"
},{
serv_type:"serv_system",
serv_name:"系统管理"
},{
serv_type:"serv_serarch",
serv_name:"数据查询"
},{
serv_type:"serv_login",
serv_name:"登录日志"
}
],
servname:'',
tableData:[], tableData:[],
total:0, total:0,
page:1, page:1,
...@@ -135,17 +176,28 @@ ...@@ -135,17 +176,28 @@
query(){ query(){
this.getData(); this.getData();
}, },
showlogtype(data){
debugger
let sname = '';
this.srevarr.map(ele => {
if(ele.serv_type == data){
sname = ele.serv_name
}
})
return sname;
},
getData(){ getData(){
this.tableData=[]; this.tableData=[];
let offset = (this.page - 1) * this.pageSize; let offset = (this.page - 1) * this.pageSize;
let search_params = { let search_params = {
limit: this.pageSize, limit: this.pageSize,
offset: offset, offset: offset,
start_time: this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss'), dt__gte: this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss'),
end_time:this.$moment(this.conditions.end_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'),
username_like: this.conditions.username_like ? this.conditions.username_like.replace(/\s\s*/g, '') : this.conditions.username_like serv_type:this.servname,
username: this.conditions.username_like ? this.conditions.username_like.replace(/\s\s*/g, '') : this.conditions.username_like
} }
this.$api.ops.logList(search_params this.$api.ops.oplogs(search_params
).then((res)=>{ ).then((res)=>{
this.total=res.total_num; this.total=res.total_num;
this.tableData = res.list_data; this.tableData = res.list_data;
......
...@@ -238,6 +238,7 @@ ...@@ -238,6 +238,7 @@
message: '删除成功!' message: '删除成功!'
}); });
this.getTableList(); this.getTableList();
this.$logs.oplogs(res,'serv_auth',`删除角色${row.role_name}`);
}else{ }else{
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -285,6 +286,7 @@ ...@@ -285,6 +286,7 @@
message: '添加成功!' message: '添加成功!'
}); });
this.addVisible=false; this.addVisible=false;
this.$logs.oplogs(res,'serv_auth',`添加了角色${this.addForm.role_name}`);
this.getTableList(); this.getTableList();
}else{ }else{
this.$message({ this.$message({
...@@ -322,6 +324,7 @@ ...@@ -322,6 +324,7 @@
}); });
this.editVisible=false; this.editVisible=false;
this.getTableList(); this.getTableList();
this.$logs.oplogs(res,'serv_auth',`编辑了角色${this.editForm.role_name}`);
}else{ }else{
this.$message({ this.$message({
type: 'error', type: 'error',
......
...@@ -209,6 +209,7 @@ export default { ...@@ -209,6 +209,7 @@ export default {
}); });
this.selectFilename = ""; this.selectFilename = "";
this.file = null; this.file = null;
this.$logs.oplogs(res,'serv_system',`参数导入`);
}, },
onerrorback() { onerrorback() {
this.file = null; this.file = null;
...@@ -233,6 +234,7 @@ export default { ...@@ -233,6 +234,7 @@ export default {
type: "success", type: "success",
message: "恢复出厂设置成功!" message: "恢复出厂设置成功!"
}); });
this.$logs.oplogs(res,'serv_system',`恢复了出厂设置`);
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
...@@ -267,6 +269,7 @@ export default { ...@@ -267,6 +269,7 @@ export default {
} else { } else {
let exportFileUrl = res.file_path; let exportFileUrl = res.file_path;
window.location.href = exportFileUrl; window.location.href = exportFileUrl;
this.$logs.oplogs(res,'serv_system',`备份导出`);
} }
}); });
} else { } else {
...@@ -305,6 +308,7 @@ export default { ...@@ -305,6 +308,7 @@ export default {
type: "success", type: "success",
message: "重启成功!" message: "重启成功!"
}); });
this.$logs.oplogs(res,'serv_system',`手动重启`);
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
...@@ -355,6 +359,7 @@ export default { ...@@ -355,6 +359,7 @@ export default {
message: "自动重启配置成功!!" message: "自动重启配置成功!!"
}); });
this.getRebootSetting(); this.getRebootSetting();
this.$logs.oplogs(res,'serv_system',`校时编辑`);
} else { } else {
console.log("自动重启配置失败!"); console.log("自动重启配置失败!");
} }
......
...@@ -303,6 +303,7 @@ export default { ...@@ -303,6 +303,7 @@ export default {
message: "删除成功!" message: "删除成功!"
}); });
this.getTableList(); this.getTableList();
this.$logs.oplogs(res,'serv_auth',`删除用户${row.username}`);
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
...@@ -338,6 +339,7 @@ export default { ...@@ -338,6 +339,7 @@ export default {
type: "success", type: "success",
message: "重置密码成功!" message: "重置密码成功!"
}); });
this.$logs.oplogs(res,'serv_auth',`重置用户${row.username}的密码`);
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
...@@ -389,6 +391,7 @@ export default { ...@@ -389,6 +391,7 @@ export default {
type: "success", type: "success",
message: "添加成功!" message: "添加成功!"
}); });
this.$logs.oplogs(res,'serv_auth',`添加了用户${this.addForm.username}`);
this.addVisible = false; this.addVisible = false;
this.getTableList(); this.getTableList();
} else { } else {
...@@ -431,6 +434,7 @@ export default { ...@@ -431,6 +434,7 @@ export default {
}); });
this.editVisible = false; this.editVisible = false;
this.getTableList(); this.getTableList();
this.$logs.oplogs(res,'serv_auth',`修改了用户${this.editForm.username}`);
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
......
...@@ -196,6 +196,7 @@ export default { ...@@ -196,6 +196,7 @@ export default {
if (res.unid) { if (res.unid) {
this.addVisible = false; this.addVisible = false;
this.query(); this.query();
this.$logs.oplogs(res,'serv_store',`上传配置:${ this.names}`);
this.$message({ this.$message({
type: "success", type: "success",
message: "上传成功!" message: "上传成功!"
...@@ -298,6 +299,7 @@ export default { ...@@ -298,6 +299,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_store',`删除配置:${ row.name}`);
this.query(); this.query();
} }
}); });
......
...@@ -209,6 +209,7 @@ export default { ...@@ -209,6 +209,7 @@ export default {
this.$emit("getAllData", data); this.$emit("getAllData", data);
// this.$parent.$parent.$parent.$parent.submitLaterGet(data); // this.$parent.$parent.$parent.$parent.submitLaterGet(data);
this.cameraAddVisible = false; this.cameraAddVisible = false;
this.$logs.oplogs(res,'serv_vchan',`在地点${this.initParam.addr_name}添加相机${this.addVideoParam.name}`);
} else { } else {
this.$message.error(res.enote); this.$message.error(res.enote);
} }
...@@ -240,6 +241,7 @@ export default { ...@@ -240,6 +241,7 @@ export default {
}; };
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}`);
} else { } else {
this.$message.error(res.enote); this.$message.error(res.enote);
} }
......
...@@ -158,7 +158,6 @@ export default { ...@@ -158,7 +158,6 @@ export default {
rules: { rules: {
name: [ name: [
{ required: true, message: "请输入名称", trigger: "blur" }, { required: true, message: "请输入名称", trigger: "blur" },
{ min: 2, max: 9, message: "长度在 2 到 9 个字符", trigger: "blur" }
] ]
}, },
dev_unid: localStorage.getItem("dev_unid") dev_unid: localStorage.getItem("dev_unid")
...@@ -265,6 +264,15 @@ export default { ...@@ -265,6 +264,15 @@ export default {
editObj[0].unid editObj[0].unid
) )
.then(data => { .then(data => {
debugger
let type = this.editForm.targetType;
if(type == 'org') {
this.$logs.oplogs(res,'serv_vchan',`修改组织${this.editForm.name}`);
}
if(type == 'address') {
this.$logs.oplogs(res,'serv_vchan',`修改地点${this.editForm.name}`);
}
console.log(type)
if (res.ecode) { if (res.ecode) {
this.$message({ this.$message({
type: "error", type: "error",
...@@ -377,6 +385,13 @@ export default { ...@@ -377,6 +385,13 @@ export default {
}); });
this.addVisible = false; this.addVisible = false;
this.$emit("getTree"); this.$emit("getTree");
let type =this.formData.targetType;
if(type == 'org') {
this.$logs.oplogs(res,'serv_vchan',`添加组织${this.editForm.name}`);
}
if(type == 'address') {
this.$logs.oplogs(res,'serv_vchan',`添加地点${this.editForm.name}`);
}
} }
}); });
}, },
......
...@@ -140,6 +140,7 @@ export default { ...@@ -140,6 +140,7 @@ export default {
type: "success" type: "success"
}); });
this.$parent.$parent.$parent.getVideoTree(); this.$parent.$parent.$parent.getVideoTree();
this.$logs.oplogs(res,'serv_vchan',`添加录像资源${this.updata.name}`);
} else { } else {
this.$message({ this.$message({
message: req.enote, message: req.enote,
......
...@@ -418,6 +418,7 @@ export default { ...@@ -418,6 +418,7 @@ export default {
this.$refs.editCamera.initDialog(row, "edit", this.dev_unid); this.$refs.editCamera.initDialog(row, "edit", this.dev_unid);
}, },
delFun(index, row) { delFun(index, row) {
debugger
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", { this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -435,6 +436,7 @@ export default { ...@@ -435,6 +436,7 @@ export default {
unid: row.addrNode.unid unid: row.addrNode.unid
}; };
this.submitLaterGet(data); this.submitLaterGet(data);
this.$logs.oplogs(res,'serv_vchan',`删除实时视频,视频名称:${row.vchan_name}`);
} }
}); });
}) })
...@@ -550,6 +552,7 @@ export default { ...@@ -550,6 +552,7 @@ export default {
item.vchan_name = this.videoEditParam.vchan_name; item.vchan_name = this.videoEditParam.vchan_name;
} }
}); });
this.$logs.oplogs(res,'serv_vchan',`修改离线视频,视频名称:${ this.videoEditParam.vchan_name}`);
} else { } else {
this.$message.error(res.enote); this.$message.error(res.enote);
} }
...@@ -579,6 +582,7 @@ export default { ...@@ -579,6 +582,7 @@ export default {
// item.vchan_name=this.videoEditParam.vchan_name // item.vchan_name=this.videoEditParam.vchan_name
// } // }
// }) // })
this.$logs.oplogs(res,'serv_vchan',`删除离线视频,视频名称${ row.vchan_name}`);
} else { } else {
this.$message.error(res.enote); this.$message.error(res.enote);
} }
......
...@@ -84,13 +84,15 @@ export default { ...@@ -84,13 +84,15 @@ export default {
curtype: "", curtype: "",
upfile: "", upfile: "",
uploadurl: "", uploadurl: "",
subtaskid: "" subtaskid: "",
subtask_name:""
}; };
}, },
methods: { methods: {
show(type, subid) { show(type, subid, subdata) {
this.curtype = type; this.curtype = type;
this.subtaskid = subid; this.subtaskid = subid;
this.subtask_name = subdata.subtask_name;
this.dialogVisible = true; this.dialogVisible = true;
this.uploadurl = `http://${location.host}/api/v1/devconf_fx/import/${this.subtaskid}`; this.uploadurl = `http://${location.host}/api/v1/devconf_fx/import/${this.subtaskid}`;
this.fileList = []; this.fileList = [];
...@@ -119,6 +121,7 @@ export default { ...@@ -119,6 +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}`);
}, },
errorfile(err){ errorfile(err){
console.log(err); console.log(err);
......
...@@ -171,11 +171,13 @@ export default { ...@@ -171,11 +171,13 @@ export default {
}, },
handleparam(type) { handleparam(type) {
if (type == "upload") { if (type == "upload") {
this.$refs.handleparam.show(type, this.subtaskid); this.$refs.handleparam.show(type, this.subtaskid, this.subtaskdata);
} else { } else {
this.$api.task.exportParams(this.subtaskid).then(res => { this.$api.task.exportParams(this.subtaskid).then(res => {
if (res.ecode == 200) { if (res.ecode == 200) {
location.href = res.enote; location.href = res.enote;
let sunbtaskname = this.subtaskdata.subtask_name;
this.$logs.oplogs(res,'serv_scene',`任务导出,任务名称:${sunbtaskname}`);
} }
}); });
} }
...@@ -240,7 +242,6 @@ export default { ...@@ -240,7 +242,6 @@ export default {
}) })
.then(() => { .then(() => {
that.taskInfo.mtasks[0].scenes.map(ele => { that.taskInfo.mtasks[0].scenes.map(ele => {
debugger;
if (ele.scene_unid == row.scene_unid) { if (ele.scene_unid == row.scene_unid) {
ele.config = {}; ele.config = {};
if (ele.rois) { if (ele.rois) {
...@@ -250,7 +251,8 @@ export default { ...@@ -250,7 +251,8 @@ export default {
ele.runtime = 0; ele.runtime = 0;
} }
}); });
that.subRoi(that.taskInfo.mtasks); let sunbtaskname = this.subtaskdata.subtask_name;
that.subRoi(that.taskInfo.mtasks,`任务${sunbtaskname}删除参数设置,区域设置,标定设置信息`);
}) })
.catch(() => { .catch(() => {
this.$store.commit("setocxstate", 1); this.$store.commit("setocxstate", 1);
...@@ -306,7 +308,8 @@ export default { ...@@ -306,7 +308,8 @@ export default {
ele.position_num = positionnum; ele.position_num = positionnum;
} }
}); });
this.subRoi(this.taskInfo.mtasks); let sunbtaskname = this.subtaskdata.subtask_name;
this.subRoi(this.taskInfo.mtasks,`设置${sunbtaskname}预置位`);
}, },
deleteytconfig(positionnum) { deleteytconfig(positionnum) {
this.taskInfo.mtasks[0].scenes.map(ele => { this.taskInfo.mtasks[0].scenes.map(ele => {
...@@ -314,7 +317,8 @@ export default { ...@@ -314,7 +317,8 @@ export default {
ele.position_num = -1; ele.position_num = -1;
} }
}); });
this.subRoi(this.taskInfo.mtasks); let sunbtaskname = this.subtaskdata.subtask_name;
this.subRoi(this.taskInfo.mtasks,`删除预置位${positionnum}`);
}, },
submitTimer(item, stimer) { submitTimer(item, stimer) {
this.taskInfo.mtasks[0].scenes.map(ele => { this.taskInfo.mtasks[0].scenes.map(ele => {
...@@ -322,9 +326,9 @@ export default { ...@@ -322,9 +326,9 @@ export default {
ele.runtime = stimer; ele.runtime = stimer;
} }
}); });
this.subRoi(this.taskInfo.mtasks); this.subRoi(this.taskInfo.mtasks,'设置预置位运行时间');
}, },
subRoi(mdata) { subRoi(mdata,info) {
let data = { let data = {
subtask_id: this.subtaskid, subtask_id: this.subtaskid,
mtasks: mdata mtasks: mdata
...@@ -339,6 +343,7 @@ export default { ...@@ -339,6 +343,7 @@ export default {
this.$store.commit("setocxstate", 1); this.$store.commit("setocxstate", 1);
this.TaskParams(this.subtaskid); this.TaskParams(this.subtaskid);
} }
this.$logs.oplogs(res,'serv_scene', info);
}); });
}, },
showview() { showview() {
...@@ -356,6 +361,7 @@ export default { ...@@ -356,6 +361,7 @@ export default {
}, 0); }, 0);
}, },
submit: function(xml, type) { submit: function(xml, type) {
let sunbtaskname = this.subtaskdata.subtask_name;
let postObj = { let postObj = {
subtask_id: this.subtaskid, subtask_id: this.subtaskid,
mtasks: [ mtasks: [
...@@ -406,18 +412,21 @@ export default { ...@@ -406,18 +412,21 @@ export default {
roi: xml roi: xml
} }
]; ];
this.$logs.oplogs(m,'serv_scene',`修改了任务${sunbtaskname}预置位ROI==>${xml}`);
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}`);
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}`);
break; break;
default: default:
break; break;
......
...@@ -391,6 +391,7 @@ export default { ...@@ -391,6 +391,7 @@ export default {
message: "删除成功!" message: "删除成功!"
}); });
this.getData(); this.getData();
this.$logs.oplogs(res,'serv_serarch',`事件数据删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
...@@ -422,6 +423,7 @@ export default { ...@@ -422,6 +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',`事件数据导出`);
window.open(encodeURI(url)); window.open(encodeURI(url));
}, },
leftFun() { leftFun() {
...@@ -499,6 +501,7 @@ export default { ...@@ -499,6 +501,7 @@ export default {
this.formatterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}); });
this.loading = false; this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`事件检索`);
}) })
.catch(err => {}); .catch(err => {});
}, },
...@@ -550,6 +553,7 @@ export default { ...@@ -550,6 +553,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`数据删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
......
...@@ -455,6 +455,7 @@ export default { ...@@ -455,6 +455,7 @@ export default {
this.$refs.visableDialog.playvideos(play_url); this.$refs.visableDialog.playvideos(play_url);
}, },
exportFun() { exportFun() {
this.$logs.oplogs(res,'serv_serarch',`违法事件导出`);
window.open( window.open(
encodeURI( encodeURI(
process.env.VUE_APP_URL + process.env.VUE_APP_URL +
...@@ -594,6 +595,7 @@ export default { ...@@ -594,6 +595,7 @@ export default {
this.formatterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}); });
this.loading = false; this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`违法事件查询`);
}) })
.catch(err => {}); .catch(err => {});
}, },
...@@ -630,6 +632,7 @@ export default { ...@@ -630,6 +632,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`违法事件删除`);
this.getData(); this.getData();
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
...@@ -662,6 +665,7 @@ export default { ...@@ -662,6 +665,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`违法事件删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
......
...@@ -302,6 +302,7 @@ export default { ...@@ -302,6 +302,7 @@ export default {
return codename; return codename;
}, },
exportFun() { exportFun() {
this.$logs.oplogs(res,'serv_serarch',`流量检索导出`);
window.open( window.open(
encodeURI( encodeURI(
process.env.VUE_APP_URL + process.env.VUE_APP_URL +
...@@ -365,6 +366,7 @@ export default { ...@@ -365,6 +366,7 @@ export default {
this.formatterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}); });
this.loading = false; this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`流量检索查询`);
}) })
.catch(err => {}); .catch(err => {});
} }
......
...@@ -448,6 +448,7 @@ export default { ...@@ -448,6 +448,7 @@ export default {
}); });
}, },
exportFun() { exportFun() {
this.$logs.oplogs(res,'serv_serarch',`过车事件导出`);
window.open( window.open(
encodeURI( encodeURI(
process.env.VUE_APP_URL + process.env.VUE_APP_URL +
...@@ -504,6 +505,7 @@ export default { ...@@ -504,6 +505,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`过车事件批量删除了${his.selectcheck.length}条`);
this.getData(); this.getData();
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
...@@ -586,6 +588,7 @@ export default { ...@@ -586,6 +588,7 @@ export default {
this.formatterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}); });
this.loading = false; this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`过车事件查询`);
}) })
.catch(err => {}); .catch(err => {});
}, },
...@@ -623,6 +626,7 @@ export default { ...@@ -623,6 +626,7 @@ export default {
message: "删除成功!" message: "删除成功!"
}); });
this.getData(); this.getData();
this.$logs.oplogs(res,'serv_serarch',`过车事件删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
...@@ -654,6 +658,7 @@ export default { ...@@ -654,6 +658,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`过车事件删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
......
...@@ -596,6 +596,7 @@ export default { ...@@ -596,6 +596,7 @@ export default {
"&lobodyColor=" + "&lobodyColor=" +
this.conditions.lobodyColor; this.conditions.lobodyColor;
} }
this.$logs.oplogs(res,'serv_serarch',`行人非机动车导出`);
window.open(encodeURI(url)); window.open(encodeURI(url));
}, },
batchdel() { batchdel() {
...@@ -622,6 +623,7 @@ export default { ...@@ -622,6 +623,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`行人非机动车批量删除了${this.selectcheck.length}条`);
this.getData(); this.getData();
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
...@@ -706,6 +708,7 @@ export default { ...@@ -706,6 +708,7 @@ export default {
this.formatterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}); });
this.loading = false; this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`行人非机动车查询`);
}) })
.catch(err => {}); .catch(err => {});
}, },
...@@ -741,6 +744,7 @@ export default { ...@@ -741,6 +744,7 @@ export default {
message: "删除成功!" message: "删除成功!"
}); });
this.getData(); this.getData();
this.$logs.oplogs(res,'serv_serarch',`行人非机动车删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
...@@ -772,6 +776,7 @@ export default { ...@@ -772,6 +776,7 @@ export default {
type: "success", type: "success",
message: "删除成功!" message: "删除成功!"
}); });
this.$logs.oplogs(res,'serv_serarch',`行人非机动车删除`);
} else { } else {
this.$message.error("删除失败!"); this.$message.error("删除失败!");
} }
......
...@@ -335,6 +335,7 @@ export default { ...@@ -335,6 +335,7 @@ export default {
type: "error" type: "error"
}); });
} }
this.$logs.oplogs(res,'serv_task',`添加任务${data.task_name}`);
}); });
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
...@@ -357,6 +358,7 @@ export default { ...@@ -357,6 +358,7 @@ export default {
type: "error" type: "error"
}); });
} }
this.$logs.oplogs(res,'serv_task',`修改了任务${data.task_name}`);
}); });
}, },
sendstatus(data) { sendstatus(data) {
......
...@@ -278,6 +278,8 @@ export default { ...@@ -278,6 +278,8 @@ export default {
this.$message.error(res.enote); this.$message.error(res.enote);
} }
} }
this.$logs.oplogs(res,'serv_task',`添加子任务`);
}); });
}, },
playVideo(data) { playVideo(data) {
...@@ -320,6 +322,7 @@ export default { ...@@ -320,6 +322,7 @@ export default {
message: res.enote message: res.enote
}); });
} }
this.$logs.oplogs(res,'serv_task',`删除子任务${this.editData.name}`);
}); });
if (action != "tree") { if (action != "tree") {
setTimeout(() => { setTimeout(() => {
......
...@@ -34,7 +34,7 @@ module.exports = { ...@@ -34,7 +34,7 @@ module.exports = {
devServer: { devServer: {
proxy: { proxy: {
"/api": { "/api": {
target: "http://vion-panda.51vip.biz:52510", // 要访问的接口域名 target: "http://192.168.9.62:20080", // 要访问的接口域名
ws: true, // 是否启用websockets ws: true, // 是否启用websockets
changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题 changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
pathRewrite: { pathRewrite: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!