Commit b6069f54 by 夏新然

拉取cate

1 parent 5fcce698
Stack trace:
Frame Function Args
00000010002 0018006021E (00180241C10, 001802340B9, 00000010002, 000FFFFBA40)
00000010002 00180048859 (00000000001, 00180328B38, 00000000001, 00180328B38)
00000010002 00180048892 (00000000001, 00180328E48, 00000010002, 00000000008)
00000010002 001800598BC (001800C0322, 00000000000, 00000000000, 00000000000)
000FFFFCCD0 0018005994E (000FFFFCDF0, 000FFFFCCD0, FFFFFFFFFFFFFFD8, 00000000000)
000FFFFCCD0 00180048FE1 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00180047963 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180047A14 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
......@@ -36,5 +36,35 @@ export default {
},
bindRole(params,id){
return api.post(`${baseUrl}/api/v1/auth/users/${id}/roles`, params)
},
getDevsTime(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/time`, params)
},
manualTime(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/time`, params)
},
getNtp(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/timing/ntp`, params)
},
ntpTime(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/timing/ntp`, params)
},
factoryReset(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/factory-reset`, params)
},
importParams(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/parameters/import`, params,{'Content-Type': 'multipart/form-data'})
},
exportParams(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/parameters/export`, params)
},
manualReboot(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/manual`, params)
},
intervalReboot(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/auto`, params)
},
getRebootSetting(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/auto`, params)
}
}
\ No newline at end of file
......@@ -66,4 +66,17 @@ export default {
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
......@@ -349,6 +349,10 @@ class Codes {
this.result.xcycle_plate_text = "未识别";
}
// 骑车类型
console.log(this.allData.event_data.xcycle_type)
if(!this.allData.event_data.xcycle_type){
this.result.xcycle_type_text = "行人";
}else{
try {
switch (this.allData.event_data.xcycle_type) {
case "motorcycle":
......@@ -366,6 +370,8 @@ class Codes {
} catch (err) {
this.result.xcycle_type_text = "未识别";
}
}
try {
if (this.result.xcycle_type_text === "自行车") {
this.result.company = this.allData.event_data.xcycle.company.name;
......
......@@ -89,24 +89,24 @@ export const asyncRouterMap = [
},
{
path: "/search/xcycle",
name: "非机动车检索",
name: "行人非机动车检索",
meta: {
icon: "el-icon-user"
},
component: resolve => require(["../views/search/xcycle.vue"], resolve)
},
{
path: "/search/pedestrian",
name: "行人检索",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/search/pedestrian.vue"], resolve)
},
// {
// path: "/search/pedestrian",
// name: "行人检索",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve =>
// require(["../views/search/pedestrian.vue"], resolve)
// },
{
path: "/search/event",
name: "事件查询",
name: "事件检索",
meta: {
icon: "el-icon-location"
},
......@@ -114,7 +114,7 @@ export const asyncRouterMap = [
},
{
path: "/search/illegal",
name: "违法记录查询",
name: "违法检索",
meta: {
icon: "el-icon-location"
},
......@@ -122,19 +122,20 @@ export const asyncRouterMap = [
},
{
path: "/search/traficflow",
name: "交通流量",
name: "流量检索",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/traficflow.vue"], resolve),
},{
path: "/search/flow",
name: "公共客流",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/publicFlow.vue"], resolve),
}
// {
// path: "/search/flow",
// name: "公共客流",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve => require(["../views/search/publicFlow.vue"], resolve),
// }
]
},
{
......@@ -169,7 +170,14 @@ export const asyncRouterMap = [
},
component: resolve => require(["../views/resource/store_confs.vue"], resolve),
},
{
path: "/resource/nationalStandard",
name: "国标配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/nationalStandard.vue"], resolve),
},
]
},{
path: "/ops",
......
......@@ -55,7 +55,6 @@ import types from '../store/types.js'
sessionStorage.setItem('user_unid',res.user_unid)
//本系统可以直接用本地缓存做
this.getMenu(res.user_unid)
// localStorage.setItem('user_name',this.username)
// 处理登录用户权限菜单显示问题;
//算法配置列表
......@@ -67,6 +66,7 @@ import types from '../store/types.js'
this.getCustomCode();
this.getEventList();
this.getDev();
this.getMenu(res.user_unid);
}
}).catch((err) => {
......@@ -150,7 +150,17 @@ import types from '../store/types.js'
},
getDev() {
this.$api.resource.devs().then(res => {
sessionStorage.setItem('dev_unid',res[0].dev_unid)
sessionStorage.setItem('dev_unid',res[0].dev_unid);
this.getDevsName(res[0].dev_unid);
})
},
getDevsName(id){
this.$api.resource.getDevsName({
is_leaf: 0
},id).then(res=>{
if(res.list_data.length>0){
sessionStorage.setItem('device_id',res.list_data[0].device_id);
}
})
},
},
......
......@@ -3,67 +3,74 @@
<el-form ref="form" label-width="100px">
<!-- 手动校时 -->
<div class="lineBox big">
<el-radio v-model="radio" label="1">手动校时</el-radio>
<el-radio v-model="typeRadio" label="1">手动校时</el-radio>
</div>
<div class="radioContent">
<div class="lineBox">
<el-form-item label="当前时间:">
<span>2020-02-11 16:08:01</span>
<span>{{computerTime}}</span>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="设备时间:">
<el-date-picker
:disabled="typeRadio=='2'"
v-model="systemTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
<span style="margin-left: 30px;"> <el-checkbox v-model="syncTime">与计算机时间同步</el-checkbox></span>
<el-button type="primary" size="small" class="primaryButton rightButton">校时</el-button>
<span style="margin-left: 30px;"> <el-checkbox v-model="syncTime" @change="syncTimeFun" :disabled="typeRadio=='2'">与计算机时间同步</el-checkbox></span>
<el-button type="primary" size="small" class="primaryButton rightButton" :disabled="typeRadio=='2'" @click="manualClick">校时</el-button>
</el-form-item>
</div>
</div>
<div class="line"></div>
<!-- NTP校时 -->
<div class="lineBox big">
<el-radio v-model="radio" label="2">NTP校时</el-radio>
<el-radio v-model="typeRadio" label="2">NTP校时</el-radio>
</div>
<div class="radioContent">
<div class="lineBox">
<el-form-item label="服务器地址:">
<span class="inputBox">
<el-input placeholder="请输入服务器地址" v-model="url"></el-input>
<el-input placeholder="请输入服务器地址" v-model="serverAdr" :disabled="typeRadio=='1'"></el-input>
</span>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="NTP端口:">
<span class="inputBox">
<el-input placeholder="请输入NTP端口" v-model="ntpPort"></el-input>
<el-input placeholder="请输入NTP端口" v-model="ntpPort" :disabled="typeRadio=='1'"></el-input>
</span>
</el-form-item>
</div>
<div class="lineBox">
<el-radio v-model="ntpRadio" label="2">定时校时</el-radio>
<el-radio v-model="ntpRadio" label="1" :disabled="typeRadio=='1'">定时校时</el-radio>
</div>
<el-form ref="inlineform" label-width="100px" inline>
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[0]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="typeRadio=='1'||ntpRadio=='2'"
value-format="HH:mm"
v-model="timeArr[1]"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[2]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
......@@ -71,13 +78,17 @@
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[3]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[4]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
......@@ -87,15 +98,15 @@
</div>
</el-form>
<div class="lineBox">
<el-radio v-model="ntpRadio" label="2">周期校时</el-radio>
<el-radio v-model="ntpRadio" label="2" :disabled="typeRadio=='1'">周期校时</el-radio>
</div>
<div class="lineBox">
<el-form-item label="每隔:">
<span class="inputBox" style="width: 60px;">
<el-input placeholder="请输入NTP端口" v-model="ntpPort"></el-input>
<el-input placeholder="" v-model.number="weekMinutes" :disabled="typeRadio=='1'||ntpRadio=='1'"></el-input>
</span>
<span style="margin-left: 14px;">秒,自动进行校时</span>
<el-button type="primary" size="small" class="primaryButton rightButton">保存设置</el-button>
<el-button type="primary" size="small" class="primaryButton rightButton" :disabled="typeRadio=='1'" @click="saveClick">保存设置</el-button>
</el-form-item>
</div>
</div>
......@@ -106,19 +117,175 @@
export default {
data(){
return{
time:'',
url:'',
typeRadio:'1',
ntpRadio:'1',
timeArr:['','','','',''],
ntpPort:'',
weekMinutes:'',
activeName: 'first',
systemTime:'',
syncTime:false
syncTime:false,
computerTime:this.$moment().format("YYYY-MM-DD HH:mm:ss"),
dev_unid:sessionStorage.getItem('dev_unid'),
device_id:sessionStorage.getItem('device_id'),
serverAdr:''
}
},
components:{},
mounted(){},
mounted(){
this.timer();
this.getDevTimes();
this.getNtpTimes();
},
methods:{
handleClick(tab, event) {
console.log(tab, event);
},
timer(){
setInterval(()=>{
this.computerTime=this.$moment().format("YYYY-MM-DD HH:mm:ss")
},1000)
},
getDevTimes () {
this.$api.ops.getDevsTime({
},this.dev_unid,this.device_id).then(res=>{
if (res.ecode != undefined && res.ecode != 200) {
//console.log('获取设备时间失败!' + utcTimes.enote);
this.$message({
type: 'error',
message: '获取设备时间失败!' + res.enote
});
} else {
if(res && typeof res === 'string') {
//先转utc格式
let date = this.$moment.utc(res).format();
//再utc时间转本地时间
this.systemTime = this.$moment(date)
.local()
.format("YYYY-MM-DD HH:mm:ss");
}
}
})
},
syncTimeFun(){
if(this.syncTime){
this.systemTime=this.computerTime;
}
},
manualClick() {
let time=this.$moment(this.systemTime).utc().format("YYYY-MM-DD HH:mm:ss");
this.$api.ops.manualTime({
time:time
},this.dev_unid,this.device_id).then(res=>{
if(res.ecode != 200) {
this.$message({
type: 'error',
message: '手动校时失败!' + res.enote
})
} else {
this.$message({
type: 'success',
message: '手动校时成功!'
})
}
})
},
getNtpTimes () {
//获取ntp校时配置
this.$api.ops.getNtp({
},this.dev_unid,this.device_id).then(res=>{
if(res.ecode != undefined && res.ecode != 200) {
this.$message({
type: 'error',
message: '获取NTP校时失败!' + res.enote
});
} else {
if(res.enable_ntp == 1) {
this.typeRadio = '2';
this.serverAdr = res.ntp_server_ip;
this.ntpPort = res.ntp_server_port;
console.log('获取NTP时间:', res.timing_times)
this.timeArr=res.timing_times;
this.weekMinutes = res.timing_interval;
if(res.timing_policy == "fix"){
this.ntpRadio = '1';
}
if(res.timing_policy == "interval"){
this.ntpRadio = '2';
}
} else {
this.typeRadio = '1';
}
}
}).catch(err => {
console.log('获取ntp校时设置异常:', err.message);
});
},
saveClick() {
if(this.serverAdr != "" &&this.ntpPort != ""){
let timing_policy=''
if(this.ntpRadio=='1'){
//如果定时校时
timing_policy='fix'
//数组去空值
let arr=[];
this.timeArr.forEach(item=>{
if(item!=""&&typeof(item)!="undefined"){
arr.push(item)
}
})
if(new Set(arr).size !== arr.length){
  this.$message({
type: 'error',
message: '定时时间重复,请重新选择'
});
return false;
}
}else if(this.ntpRadio=='2'){
//周期校时
timing_policy='interval'
if(this.weekMinutes === '') {
this.$message({
type: 'warning',
message: '未设置周期时间!'
})
return;
}
}
let ntpTimingData = {
device_id: this.device_id,
enable_ntp: 1,
ntp_server_ip: this.serverAdr,
ntp_server_port: this.ntpPort,
timing_policy: timing_policy,
timing_times: this.timeArr,
timing_interval: this.weekMinutes
}
this.ntpTimeSet(ntpTimingData);
}else {
this.$message({
type: 'warning',
message: '服务器地址以及ntp端口不能为空!'
})
}
},
ntpTimeSet(data){
this.$api.ops.ntpTime(data,this.dev_unid,this.device_id).then(res=>{
if(res.ecode == 200){
this.$message({
type: 'success',
message: 'NTP校时成功!'
})
} else {
this.$message({
type: 'error',
message: 'NTP校时失败!' + res.enote
})
}
}).catch(err => {
console.log('ntp校时异常:', error.message)
});
}
},
}
......
......@@ -7,7 +7,7 @@
</div>
<div class="radioContent">
<div class="lineBox">
<el-button type="primary" size="small" class="primaryButton">恢复出厂设置</el-button>
<el-button type="primary" size="small" class="primaryButton" @click="reset">恢复出厂设置</el-button>
</div>
<div class="lineBox">
<span class="tip">恢复出厂设置说明:完全恢复设备参数到出厂设置</span>
......@@ -47,7 +47,7 @@
</div>
<div class="radioContent">
<div class="lineBox">
<el-button size="small" type="primary" class="primaryButton">手动重启</el-button>
<el-button size="small" type="primary" class="primaryButton" @click="manualRebootClick">手动重启</el-button>
</div>
<div class="lineBox">
<el-checkbox v-model="openRestart">开启定时重启</el-checkbox>
......@@ -56,19 +56,25 @@
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="!openRestart"
v-model="timeArr[0]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="!openRestart"
v-model="timeArr[1]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="!openRestart"
v-model="timeArr[2]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
......@@ -76,13 +82,17 @@
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="!openRestart"
v-model="timeArr[3]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
v-model="time"
:disabled="!openRestart"
v-model="timeArr[4]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
......@@ -90,7 +100,7 @@
<span>自动进行校时(可设置多个时间点,不得超过5个)</span>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" size="small" class="primaryButton rightButton">保存</el-button>
<el-button type="primary" size="small" class="primaryButton rightButton" :disabled="!openRestart" @click="intervalRebootClick">保存</el-button>
</el-form-item>
</div>
......@@ -105,26 +115,192 @@
return{
openRestart:false,
selectFilename:'',
time:'',
url:'',
ntpPort:'',
activeName: 'first',
systemTime:'',
syncTime:false
timeArr:[],
file:null,
dev_unid:sessionStorage.getItem('dev_unid'),
device_id:sessionStorage.getItem('device_id'),
}
},
components:{},
mounted(){},
mounted(){
this.getRebootSetting();
},
methods:{
handleClick(tab, event) {
console.log(tab, event);
getRebootSetting() {
if(this.dev_unid != '' && this.device_id != ''){
this.$api.ops.getRebootSetting({},this.dev_unid,this.device_id).then(res=>{
if(!res.ecode){
if(res.enabled == 1){
this.openRestart = true;
this.timeArr=res.reboot_time
}
} else {
this.$message({
type: 'error',
message: res.enote
})
}
})
}else{
this.$message({
type: 'info',
message: '未找到设备ID,请重新登录'
});
}
},
submitUpload(){
this.$refs.upload.submit();
let importFileExt = this.file.name.substr(this.file.name.lastIndexOf('.'));
if(importFileExt !== ".zip"){
this.$message({
type: 'warning',
message: '只支持"*.zip"文件'
})
return;
}
this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
// 最重要的就是这段代码
var importParams = new FormData() // 首先创建FormData对象
importParams.append('file',this.file);
this.$api.ops.importParams(importParams,this.dev_unid,this.device_id).then(res=>{
if(res.ecode != undefined && res.ecode != 200) {
this.$message({
type: 'error',
message: '导入失败!' + res.enote
})
} else {
this.$message({
type: 'success',
message: '导入成功!'
})
}
})
},
fileChange(file,fileList){
console.log(file,fileList)
this.selectFilename=file.name;
this.file=file;
},
reset(){
this.$confirm('此操作将恢复出厂设置, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(this.dev_unid != '' && this.device_id != ''){
this.$api.ops.factoryReset({},this.dev_unid,this.device_id).then(res=>{
if(res.ecode == 200){
this.$message({
type: 'success',
message: '恢复出厂设置成功!'
})
} else {
this.$message({
type: 'error',
message: '恢复出厂设置失败!' + res.enote
})
}
})
}else{
this.$message({
type: 'info',
message: '未找到设备ID,请重新登录'
});
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
exportFileClick(){
if(this.dev_unid != '' && this.device_id != ''){
this.$api.ops.exportParams({},this.dev_unid,this.device_id).then(res=>{
if(res.ecode && res.ecode != 200) {
this.$message({
type: 'error',
message: res.enote
})
} else {
let exportFileUrl = res.file_path;
window.location.href = exportFileUrl;
}
})
}else{
this.$message({
type: 'info',
message: '未找到设备ID,请重新登录'
});
}
},
manualRebootClick () {
this.$confirm('此操作将重启设备, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(this.dev_unid != '' && this.device_id != ''){
this.$api.ops.manualReboot({},this.dev_unid,this.device_id).then(res=>{
if(res.ecode == 200){
this.$message({
type: 'success',
message: '重启成功!'
})
} else {
this.$message({
type: 'error',
message: '重启失败!' + res.enote
})
}
})
}else{
this.$message({
type: 'info',
message: '未找到设备ID,请重新登录'
});
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
intervalRebootClick(){
//数组去空值
let arr=[];
this.timeArr.forEach(item=>{
if(item!=""&&typeof(item)!="undefined"){
arr.push(item)
}
})
if(new Set(arr).size !== arr.length){
  this.$message({
type: 'error',
message: '定时时间重复,请重新选择'
});
return false;
}
let autoRebootParams = {
enabled: 1,
reboot_policy: "day",
reboot_time: this.timeArr
}
this.$api.ops.intervalReboot(autoRebootParams,this.dev_unid,this.device_id).then(res=>{
if(res.ecode == 200){
this.$message({
type: 'success',
message: '自动重启配置成功!!'
})
this.getRebootSetting();
} else {
}
})
}
},
}
......
<template>
<div class="innnerBox">
<div class="title">sip视频设置</div>
<el-form :model="sipSetting" ref="form" :rules="rules" label-width="100px" class="demo-ruleForm" inline-message hide-required-asterisk>
<el-form-item
label="用户名"
prop="sip_username">
<div style="width: 30%;">
<el-input v-model="sipSetting.sip_username" autocomplete="off"></el-input>
</div>
</el-form-item>
<el-form-item label="密码" prop="sip_password">
<div style="width: 30%;">
<el-input type="password" v-model="sipSetting.sip_password" autocomplete="off"></el-input>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addSip('form')" v-if="!isGetted">提交</el-button>
<el-button type="primary" @click="editSip('form')" v-if="isGetted">编辑</el-button>
<el-button type="primary" @click="delFun()" v-if="isGetted">删除</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data(){
var validateUser = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入用户名'));
} else {
callback();
}
};
var validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入密码'));
} else {
callback();
}
};
return{
rules: {
sip_username:[
{ validator: validateUser, trigger: 'change' }
],
sip_password: [
{ validator: validatePass, trigger: 'change' }
],
},
user_unid:sessionStorage.getItem('user_unid'),
dev_unid:sessionStorage.getItem('dev_unid'),
isGetted:false,
sipSetting:{
sip_username: '', // string
sip_password: ''
},
sip_unid:''
}
},
watch:{},
components:{},
mounted(){
this.getSipParam();
},
methods:{
addSip(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$api.resource.addSip(this.sipSetting,this.dev_unid,this.user_unid).then(res=>{
// console.log(res.data);
if(res.ecode == 200) {
this.isGetted = true;
this.$message({
type: 'success',
message: res.enote
})
} else {
this.isGetted = false;
this.$message({
type: 'error',
message: res.enote
})
}
})
} else {
return false;
}
});
},
editSip(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.$api.resource.editSip(this.sipSetting,this.dev_unid,this.user_unid,this.sip_unid).then(res=>{
// console.log(res.data);
if(res.ecode == 200) {
this.$message({
type: 'success',
message: '修改成功!'
})
} else {
this.$message({
type: 'error',
message: res.enote
})
}
})
} else {
return false;
}
});
},
delFun(){
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.resource.delSip(this.sipSetting,this.dev_unid,this.user_unid,this.sip_unid).then(res=>{
if(res.ecode == 200) {
this.$message({
type: 'success',
message: '删除成功!'
})
for(let j in this.sipSetting) {
this.sipSetting[j] = '';
}
this.isGetted = false;
} else {
this.$message({
type: 'error',
message: res.enote
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
getSipParam() {
this.$api.resource.getsip({},this.dev_unid,this.user_unid).then(res=>{
if(res.ecode) {
this.isGetted = false;
} else {
this.isGetted = true;
this.sipSetting.sip_username = res.sip_username;
this.sipSetting.sip_password = res.sip_password;
this.sip_unid = res.sip_unid;
}
})
}
},
}
</script>
<style lang="scss" scoped>
.title{
height: 30px;
line-height: 30px;
padding-left: 30px;
font-size: 14px;
background: #3bb7ff;
color: #FFFFFF;
margin-bottom: 20px;
}
</style>
\ No newline at end of file
......@@ -2,14 +2,6 @@
<div class="innnerBox">
<el-col :span="22">
<el-form ref="form" label-width="80px" inline>
<el-form-item label="资源类型" >
<span class="inputBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.source_type">
<el-option value="pull_video_stream" label='拉取视频'></el-option>
<el-option value="pull_pic_files" label='拉取图片'></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="事件类型">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.type">
......
......@@ -4,7 +4,7 @@
<el-form ref="form" label-width="80px" inline>
<el-form-item label="地点名称">
<span class="inputBox">
<el-input placeholder="请输入任务名称" v-model="conditions.location_name"></el-input>
<el-input placeholder="请输入地点名称" v-model="conditions.location_name"></el-input>
</span>
</el-form-item>
<el-form-item label="相机名称" >
......
......@@ -2,29 +2,38 @@
<div class="innnerBox">
<el-col :span="22">
<el-form ref="form" label-width="80px" inline>
<el-form-item label="资源类型">
<!-- <el-form-item label="资源类型">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.source_type">
<el-option value="pull_video_stream" label='拉取视频'></el-option>
<el-option value="pull_pic_files" label='拉取图片'></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="相机名称" >
</el-form-item> -->
<el-form-item label="任务名称">
<span class="inputBox">
<el-input placeholder="请输入相机名称" v-model="conditions.vchan_name"></el-input>
<el-input placeholder="请输入任务名称" v-model="conditions.task_name"></el-input>
</span>
</el-form-item>
<el-form-item label="任务名称">
<el-form-item label="视频名称" >
<span class="inputBox">
<el-input placeholder="请输入任务名称" v-model="conditions.task_name"></el-input>
<el-input placeholder="请输入视频名称" v-model="conditions.vchan_name"></el-input>
</span>
</el-form-item>
<el-form-item label="车牌号码">
<span class="inputBox">
<el-input placeholder="请输入车牌号码" v-model="conditions.plate"></el-input>
</span>
</el-form-item>
<el-form-item label="车牌类型">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.plate_type" >
<el-option value="" label='全部'></el-option>
<!-- <el-option v-for='item in vehicleTypeList' :value="item.code" :key="item.code" :label='item.name'></el-option> -->
</el-select>
</span>
</el-form-item>
<el-form-item label="车辆类型">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.car_type" >
......@@ -49,7 +58,7 @@
</el-select>
</span>
</el-form-item>
<el-form-item label="标志物">
<!-- <el-form-item label="标志物">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.marker">
<el-option value="" label='全部'></el-option>
......@@ -59,7 +68,7 @@
<el-option value="3" label='遮阳板'></el-option>
</el-select>
</span>
</el-form-item>
</el-form-item> -->
<el-form-item label="特殊车辆">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.special_type">
......@@ -115,23 +124,28 @@
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型">
label="车牌类型">
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型">
</el-table-column>
<!-- <el-table-column
prop="vehicle_body_logo_text"
align="center"
label="车辆品牌">
</el-table-column>
</el-table-column> -->
<el-table-column
prop="vehicle_body_color_text"
align="center"
label="车颜色">
label="车颜色">
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="RefinedFeature_text"
align="center"
label="标识物">
</el-table-column>
</el-table-column> -->
<el-table-column
prop="special_text"
align="center"
......@@ -260,6 +274,7 @@
start_dt:start_dt,
end_dt:end_dt,
source_type: 'pull_video_stream',
plate_type:'',
marker: '',
car_type: '',
car_color: '',
......@@ -294,7 +309,7 @@
},
methods:{
exportFun(){
window.open(encodeURI(process.env.VUE_APP_URL + '/api/v1/traffic/events/export?s=' + Math.random()+'&event_type=&event_dt__gte='+this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss')+'&event_dt__lt='+this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss')+'&source_type='+this.conditions.source_type+'&vchan_name__like='+this.conditions.vchan_name+'&vehicle_type='+this.conditions.car_type+'&body_color='+this.conditions.car_color+'&logo_type='+this.conditions.logo_type+'&plate_number__like='+this.conditions.plate+'&marker='+this.conditions.marker+'&task_name='+this.conditions.task_name+'&special_type='+this.conditions.special_type))
window.open(encodeURI(process.env.VUE_APP_URL + '/api/v1/traffic/events/export?s=' + Math.random()+'&event_type=&event_dt__gte='+this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss')+'&event_dt__lt='+this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss')+'&vchan_name__like='+this.conditions.vchan_name+'&vehicle_type='+this.conditions.car_type+'&body_color='+this.conditions.car_color+'&logo_type='+this.conditions.logo_type+'&plate_number__like='+this.conditions.plate+'&task_name='+this.conditions.task_name+'&special_type='+this.conditions.special_type))
},
batchdel(){
if(this.selectcheck.length==0){
......@@ -376,13 +391,14 @@
offset: offset,
event_dt__gte: this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss'),
event_dt__lt:this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss'),
source_type: this.conditions.source_type,
// source_type: this.conditions.source_type,
vchan_name__like: this.conditions.vchan_name,
vehicle_type: this.conditions.car_type,
body_color: this.conditions.car_color,
logo_type: this.conditions.logo_type,
plate_number__like: this.conditions.plate,
marker: this.conditions.marker,
// marker: this.conditions.marker,
plate_type: this.conditions.plate_type,
event_type: '',
special_type:this.conditions.special_type,
task_name: this.conditions.task_name ? this.conditions.task_name.replace(/\s\s*/g, '') : this.conditions.task_name
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!