Commit fc2a6ee2 by 潘建波

合并冲突提交

2 parents 87761259 d60b57e4
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
......@@ -18,7 +18,17 @@ export default {
}
},
mounted(){
window.videoEquitTableHeight = document.body.clientHeight - 142 + 'px';
window.opsTableHeight = document.body.clientHeight - 260 + 'px';
if(document.body.clientWidth>1366){
window.oneSearchTableHeight = document.body.clientHeight - 250 + 'px';
window.twoSearchTableHeight = document.body.clientHeight - 280 + 'px';
}else {
window.oneSearchTableHeight = document.body.clientHeight - 280 + 'px';
window.twoSearchTableHeight = document.body.clientHeight - 315 + 'px';
}
}
}
</script>
......
......@@ -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
......@@ -34,13 +34,14 @@ export default {
getCameraTable(params,id,id2){
console.log(id2)
if(id2){
console.log('aa')
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
}else{
console.log('bb')
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans`, params)
}
},
editVideo(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
editCamera(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
......@@ -66,4 +67,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,23 +349,29 @@ class Codes {
this.result.xcycle_plate_text = "未识别";
}
// 骑车类型
try {
switch (this.allData.event_data.xcycle_type) {
case "motorcycle":
this.result.xcycle_type_text = "摩托车";
break;
case "bicycle":
this.result.xcycle_type_text = "自行车";
break;
case "tricycle":
this.result.xcycle_type_text = "三轮车";
break;
default:
break;
}
} catch (err) {
this.result.xcycle_type_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":
this.result.xcycle_type_text = "摩托车";
break;
case "bicycle":
this.result.xcycle_type_text = "自行车";
break;
case "tricycle":
this.result.xcycle_type_text = "三轮车";
break;
default:
break;
}
} catch (err) {
this.result.xcycle_type_text = "未识别";
}
}
try {
if (this.result.xcycle_type_text === "自行车") {
this.result.company = this.allData.event_data.xcycle.company.name;
......
......@@ -23,6 +23,10 @@ body{
font-size: 14px;
background: $bodyback-color;
}
.minHeight{
height: calc(100vh - 140px);
overflow: auto;
}
input{
font-family: "微软雅黑";
}
......@@ -164,3 +168,9 @@ a:active{
color:#f2365a;
font-size:16px;
}
@media screen and (max-width: 1366px) {
.compatibleBtn {
margin-left: 0px!important;
margin-top: 6px!important;
}
}
\ No newline at end of file
......@@ -80,7 +80,7 @@ export const asyncRouterMap = [
children: [
{
path: "/search/vehicle",
name: "车辆检索",
name: "过车检索",
meta: {
icon: "el-icon-location"
},
......@@ -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,21 @@ export const asyncRouterMap = [
},
{
path: "/search/traficflow",
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),
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),
// }
]
},
{
......@@ -145,47 +147,63 @@ export const asyncRouterMap = [
icon: "el-icon-location"
},
children: [
{
path: "/resource/video",
name: "视频设备",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/videoEquipment.vue"], resolve),
},
{
path: "/resource/equipment",
name: "分析设备",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/analysis.vue"], resolve),
},
{
path: "/resource/store_confs",
name: "存储配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/store_confs.vue"], resolve),
},
{
path: "/resource/author",
name: "授权管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/Author/author.vue"], resolve),
},{
path: "/resource/codes",
name: "字典管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/Codes/codes.vue"], resolve),
},
]
},{
{
path: "/resource/video",
name: "视频设备",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/videoEquipment.vue"], resolve)
},
{
path: "/resource/equipment",
name: "分析设备",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/analysis.vue"], resolve)
},
{
path: "/resource/store_confs",
name: "存储配置",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/store_confs.vue"], resolve)
},
{
path: "/resource/author",
name: "授权管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/Author/author.vue"], resolve)
},
{
path: "/resource/nationalStandard",
name: "国标配置",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/nationalStandard.vue"], resolve)
},
{
path: "/resource/codes",
name: "字典管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/Codes/codes.vue"], resolve)
}
]
},
{
path: "/ops",
name: "系统运维",
component: resolve => require(["../views/Layout/index.vue"], resolve),
......@@ -193,50 +211,56 @@ export const asyncRouterMap = [
icon: "el-icon-location"
},
children: [
{
path: "/ops/equipment_manage",
name: "设备管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/equipment_manage"], resolve),
},{
path: "/ops/system_manage",
name: "系统配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/system_manage"], resolve),
},{
path: "/ops/user_manage",
name: "用户管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/user_manage.vue"], resolve),
},{
path: "/ops/role_manage",
name: "角色管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve),
},{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve),
},{
path: "/ops/log_manage",
name: "日志管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve),
}
]
{
path: "/ops/equipment_manage",
name: "设备管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/ops/equipment_manage"], resolve)
},
{
path: "/ops/system_manage",
name: "系统配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/system_manage"], resolve)
},
{
path: "/ops/user_manage",
name: "用户管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/user_manage.vue"], resolve)
},
{
path: "/ops/role_manage",
name: "角色管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve)
},
{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
},
{
path: "/ops/log_manage",
name: "日志管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
}
]
}
];
const router = new VueRouter({
......
......@@ -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)
// 处理登录用户权限菜单显示问题;
//算法配置列表
......@@ -63,10 +62,12 @@ import types from '../store/types.js'
//存储配置列表
this.storeConfList();
//code列表
this.getCatesList();
this.getCodeList();
this.getCustomCode();
this.getEventList();
this.getDev();
this.getMenu(res.user_unid);
}
}).catch((err) => {
......@@ -138,6 +139,22 @@ import types from '../store/types.js'
})
},
getCatesList(){
this.$api.codes.eventCates({}).then(res=>{
// 存储cate列表
window.localStorage.setItem('cate列表',JSON.stringify(res.list_data))
// 存储单独code
res.list_data.forEach(item=>{
this.getOneEventList(item.code,item.event_cate_unid)
})
})
},
getOneEventList(code,id){
this.$api.codes.eventType({},id).then(res=>{
// 存储cate列表
window.localStorage.setItem(code,JSON.stringify(res.list_data))
})
},
getEventList(){
this.$api.search.eventTypes({}).then(res=>{
// 存储code列表
......@@ -150,9 +167,19 @@ 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);
}
})
},
},
watch: {},
mounted() {
......
......@@ -28,7 +28,7 @@
<div style="">
<el-table
:data="tableData"
height="574"
:height="tableHeight"
stripe
border>
<el-table-column
......@@ -98,6 +98,7 @@
total:0,
page:1,
pageSize:30,
tableHeight:window.opsTableHeight
}
},
watch:{
......
<template>
<div class="contentBox">
<div class="content">
<div style="padding: 20px 15px 20px 23px;">
<div style="padding:8px 20px;">
<span style="float: right;">
<el-button type="info" @click="addRole">添加新角色</el-button>
</span>
......@@ -9,7 +9,7 @@
</div>
<div style="padding: 0 15px 20px 23px;">
<el-table
height="574"
:height="tableHeight"
:data="tableData"
stripe
border
......@@ -169,7 +169,8 @@
menu_unids: [
{ validator: checkMenu_unids, trigger: 'change' }
],
}
},
tableHeight:window.opsTableHeight
}
},
components:{
......
......@@ -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,20 +117,176 @@
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)
});
}
},
}
</script>
......
......@@ -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="contentBox">
<div style="background: #FFFFFF;">
<div class="contentBox minHeight">
<div :style="{'background': '#FFFFFF','min-height': height}">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="校时设置" name="first">
<proofreadtime></proofreadtime>
......@@ -20,13 +20,16 @@
export default {
data(){
return{
activeName: 'first'
activeName: 'first',
height:''
}
},
components:{
proofreadtime,sytemset
},
mounted(){},
mounted(){
this.height=document.body.clientHeight - 140 + 'px'
},
methods:{
handleClick(tab, event) {
console.log(tab, event);
......
<template>
<div class="contentBox">
<div class="content">
<div style="padding: 20px 15px 20px 23px;">
<div style="padding:8px 20px;">
<span style="float: right;">
<el-button type="info" @click="addUser">添加新用户</el-button>
</span>
......@@ -9,7 +9,7 @@
</div>
<div style="padding: 0 15px 20px 23px;">
<el-table
height="574"
:height="tableHeight"
:data="tableData"
stripe
border
......@@ -200,7 +200,8 @@
checkPass:[
{ validator: validatePass2, trigger: 'change' }
]
}
},
tableHeight:window.opsTableHeight
}
},
components:{
......@@ -263,8 +264,8 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.ops.delUser({},row.unid).then(res=>{
if(res.ecode==200){
this.$api.ops.delUser({},row.user_unid).then(res=>{
if(!res.ecode){
this.$message({
type: 'success',
message: '删除成功!'
......
<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
<template>
<div class="contentBox">
<div class="content">
<div style="padding: 20px 15px 20px 23px;">
<div style="padding:8px 20px;">
<span class="inputBox">
<el-input v-model="storename" placeholder="请输入存储配置名称"></el-input>
</span>
......@@ -12,7 +12,7 @@
</div>
<div style="padding: 0 15px 20px 23px;">
<el-table
height="574"
:height="tableHeight"
:data="tableData"
stripe
border
......@@ -142,7 +142,8 @@
selectDevs:'',
detailVisible:false,
storename:'',
curentSubList:[]
curentSubList:[],
tableHeight:window.opsTableHeight
}
},
components:{
......
......@@ -2,9 +2,9 @@
<div>
<el-tree
class="filter-tree"
accordion
:data="treeData"
:props='defaultProps'
default-expand-all
@node-click="handleNodeClick"
:expand-on-click-node="false"
:filter-node-method="filterNode"
......@@ -148,7 +148,7 @@
},
methods:{
handleNodeClick(data){
this.$parent.$parent.getTable(data,'camera')
this.$emit('clickHandle',data,'camera');
},
nodeDelClick(node,data){
this.$confirm('此操作将永久删除该选项, 是否继续?', '提示', {
......
......@@ -2,9 +2,9 @@
<div>
<el-tree
class="filter-tree"
accordion
:data="treeData"
:props='defaultProps'
default-expand-all
@node-click="handleNodeClick"
:expand-on-click-node="false"
:filter-node-method="filterNode"
......@@ -58,7 +58,7 @@
unid: '0',
org_pid: '0',
vchan_name: '手动添加录像资源',
org_type: 'root',
org_type: 'video',
childs: []
}
],
......@@ -105,7 +105,9 @@
this.file.push(param.file)
},
handleNodeClick(data){
this.$parent.$parent.getVideoTable(data,'video')
console.log(data)
this.$emit('clickHandle',data,'video');
// this.$parent.$parent.getVideoTable(data,'video')
},
nodeAddClick(node,data){
this.addVisible=true;
......
<template>
<div class="innnerBox">
<el-col :span="4">
<el-row :gutter="12">
<el-col :span="4" class="treeBox minHeight">
<el-input class="search-input" prefix-icon="el-icon-search" placeholder="请输入内容" v-model="searchText">
</el-input>
<cameraTree :filterText="searchText" :treeDatas="cameraTree"></cameraTree>
<videoTree :filterText="searchText" :treeDatas="videoTree" :devsId="dev_unid"></videoTree>
<cameraTree :filterText="searchText" :treeDatas="cameraTree" @clickHandle="getTable"></cameraTree>
<videoTree :filterText="searchText" :treeDatas="videoTree" :devsId="dev_unid" @clickHandle="getTable"></videoTree>
</el-col>
<el-col :span="20">
<el-table :data="formattterData" height="574" stripe border v-if="tableType=='camera'">
<el-col :span="20" >
<el-table :data="formattterData" stripe border v-if="tableType=='camera'" :height="tableHeight">
<el-table-column prop="label" align="center" label="名称">
</el-table-column>
<el-table-column prop="url" align="center" label="取流地址">
......@@ -28,7 +29,7 @@
</template>
</el-table-column>
</el-table>
<el-table :data="formattterData" height="574" stripe border v-else-if="tableType=='video'">
<el-table :data="formattterData" stripe border v-else-if="tableType=='video'" :height="tableHeight">
<el-table-column prop="vchan_name" align="center" label="名称">
</el-table-column>
<el-table-column prop="video_url" align="center" label="取流地址">
......@@ -47,6 +48,26 @@
</el-table>
</el-col>
<cameraDialog ref="editCamera"></cameraDialog>
<el-dialog
title="修改视频"
:visible.sync="videoEditVisible"
width="450px">
<div>
<el-form label-position="left" label-width="120px" :model="videoEditParam" ref="videoDialog" inline-message hide-required-asterisk>
<el-form-item label="名称" :rules="[ { required: true, message: '请输入名称', trigger: 'change' }]">
<el-input v-model="videoEditParam.vchan_name"></el-input>
</el-form-item>
<el-form-item label="取流地址">
<el-input v-model="videoEditParam.video_url" disabled></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="videoEditVisible=false">取 消</el-button>
<el-button type="primary" @click="editSave">确 定</el-button>
</span>
</el-dialog>
</el-row>
</div>
</template>
<script>
......@@ -70,7 +91,14 @@
dev_unid: sessionStorage.getItem('dev_unid'),
cameraArr:[],
cameraTree:[],
videoTree:[]
videoTree:[],
videoEditParam:{
vchan_name:'',
video_url:''
},
videoEditVisible:false,
vchan_duid:'',
tableHeight:window.videoEquitTableHeight
}
},
watch: {
......@@ -79,6 +107,7 @@
cameraTree,cameraDialog,videoTree
},
mounted() {
console.log('aa',this.tableHeight)
this.getCameraTree();
this.getVideoTree();
},
......@@ -193,41 +222,50 @@
getTable(data,type) {
if(data.org_type!="root"){
this.tableType=type;
if(data.org_type){
this.tableType=type;
this.formattterData = [];
let filterData=[];
let search_params = {
vchan_type: "camera",
org_unid:data.unid
}
this.$api.resource.getCameraTable(search_params,this.dev_unid).then((res) => {
if(res.list_data.length > 0) {
for(var i = 0; i < res.list_data.length; i++) {
filterData = this.cameraArr.filter(list => {
return list.id === res.list_data[i].vchan_refid;
})
if(filterData.length > 0) {
this.formattterData.push(filterData[0]);
}
}
if(this.tableType=="camera"){
if(data.org_type){
this.tableType=type;
this.formattterData = [];
let filterData=[];
let search_params = {
vchan_type: "camera",
org_unid:data.unid
}
}).catch((err) => {
})
}else{
this.formattterData = [];
let filterData=[];
this.$api.resource.getCameraTable({},this.dev_unid,data.vchan_refid).then((res) => {
filterData = this.cameraArr.filter(list => {
return list.id === res.refid;
})
if(filterData.length > 0) {
this.formattterData.push(filterData[0]);
this.$api.resource.getCameraTable(search_params,this.dev_unid).then((res) => {
if(res.list_data.length > 0) {
for(var i = 0; i < res.list_data.length; i++) {
filterData = this.cameraArr.filter(list => {
return list.id === res.list_data[i].vchan_refid;
})
if(filterData.length > 0) {
this.formattterData.push(filterData[0]);
}
}
}).catch((err) => {
})
}
}).catch((err) => {
})
}else{
this.formattterData = [];
let filterData=[];
this.$api.resource.getCameraTable({},this.dev_unid,data.vchan_refid).then((res) => {
filterData = this.cameraArr.filter(list => {
return list.id === res.refid;
})
if(filterData.length > 0) {
this.formattterData.push(filterData[0]);
}
}).catch((err) => {
})
}
}else if(this.tableType=="video"){
if(data.org_type=='video'){
this.formattterData=data.childs;
}else{
this.formattterData=[];
this.formattterData.push(data)
}
}
}
......@@ -242,8 +280,33 @@
this.formattterData.push(data)
}
},
editVideo(){
editVideo(index,row){
this.vchan_duid=row.vchan_duid;
this.videoEditParam.vchan_name = row.vchan_name;
this.videoEditParam.video_url = row.video_url;
this.videoEditVisible=true;
},
editSave(){
this.$api.resource.editVideo({
name:this.videoEditParam.vchan_name
},this.dev_unid,this.vchan_duid).then(res=>{
if(res.ecode==200){
this.$message({
type: 'success',
message: res.enote
});
this.getVideoTree();
this.formattterData.forEach(item=>{
if(item.vchan_duid==this.vchan_duid){
item.vchan_name=this.videoEditParam.vchan_name
}
})
}else{
this.$message.error(res.enote);
}
this.videoEditVisible=false;
})
},
delVideo(){
......@@ -252,4 +315,8 @@
}
</script>
<style lang="scss" scoped>
.treeBox{
border: 1px solid #EBEEF5;
padding: 12px;
}
</style>
......@@ -2,29 +2,33 @@
<div class="innnerBox">
<el-col :span="22">
<el-form ref="form" label-width="80px" inline>
<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="相机名称" >
<span class="inputBox">
<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.task_name"></el-input>
</span>
</el-form-item>
<el-form-item label="任务名称">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.task_id" @change="getSubTask">
<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 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="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" >
......@@ -33,7 +37,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.car_color">
<el-option value="" label='全部'></el-option>
......@@ -41,25 +45,6 @@
</el-select>
</span>
</el-form-item>
<el-form-item label="车辆品牌">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.logo_type">
<el-option value="" label='全部'></el-option>
<el-option v-for='item in brandList' :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.marker">
<el-option value="" label='全部'></el-option>
<el-option value="0" label='年检标志'></el-option>
<el-option value="1" label='摆件'></el-option>
<el-option value="2" label='吊坠'></el-option>
<el-option value="3" 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.illegal">
......@@ -68,14 +53,6 @@
</el-select>
</span>
</el-form-item>
<el-form-item label="危险品车">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.is_key_vehicle">
<el-option :value="false" label='否'></el-option>
<el-option :value="true" label='是'></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="起始时间">
<span class="dateBox">
......@@ -95,7 +72,7 @@
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<el-button type="primary" style="" @click="query" class="block">查询</el-button>
<el-button type="success" class="block" @click="exportFun">导出</el-button>
<el-button type="success" class="block compatibleBtn" @click="exportFun">导出</el-button>
</div>
<div>
<el-button type="success" class="block" @click="batchdel">批量删除</el-button>
......@@ -104,7 +81,7 @@
<div style="">
<el-table
:data="formattterData"
height="574"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange">
......@@ -277,16 +254,15 @@
conditions: {
start_dt:start_dt,
end_dt:end_dt,
source_type: 'pull_video_stream',
marker: '',
task_id:'',
subtask_id:'',
plate:'',
plate_type:'',
car_type: '',
car_color: '',
logo_type: '',
plate:'',
task_name:'',
vchan_name:'',
illegal:'all',
is_key_vehicle:false,
illegal:'all',
source_type: 'pull_video_stream',
is_key_vehicle:false,
},
brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
......@@ -298,7 +274,10 @@
page:1,
pageSize:30,
selectcheck:[],
currentIndex:0
currentIndex:0,
taskList:[],
subTaskList:[],
tableHeight:window.twoSearchTableHeight,
}
},
watch:{
......@@ -309,9 +288,31 @@
},
components:{},
mounted(){
this.getTaskList();
this.getData()
},
methods:{
getTaskList(){
this.$api.task.getTask({
source_type: "pull_video_stream",
task_type: "normal"
}).then(res=>{
this.taskList=res.list_data;
this.taskList.unshift({
task_id:'',
task_name:'全部'
})
})
},
getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data;
if( this.subTaskList.length>0){
this.conditions.subtask_id=this.subTaskList[0].subtask_id
}
})
},
playFun(index,row){
if(!row.video) {
return
......@@ -328,13 +329,12 @@
'&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+
'&task_id='+this.conditions.task_id+
'&subtask_id='+this.conditions.subtask_id+
'&plate_number__like='+this.conditions.plate+
'&plate_type='+this.conditions.plate_type+
'&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+
'&is_key_vehicle='+this.conditions.is_key_vehicle+
'&illegal_code='+this.conditions.illegal))
},
......@@ -418,17 +418,16 @@
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,
vchan_name__like: this.conditions.vchan_name,
task_id:this.conditions.task_id,
subtask_id:this.conditions.subtask_id,
plate_number__like: this.conditions.plate,
plate_type:this.conditions.plate_type,
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,
illegal_code:this.conditions.illegal,
source_type: this.conditions.source_type,
is_key_vehicle:this.conditions.is_key_vehicle,
event_type: '',
task_name: this.conditions.task_name ? this.conditions.task_name.replace(/\s\s*/g, '') : this.conditions.task_name
}
this.$api.search.tableList(search_params
).then((res)=>{
......
......@@ -2,16 +2,30 @@
<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.task_id" @change="getSubTask">
<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 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="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="相机名称" >
<span class="inputBox">
<el-input placeholder="请输入相机名称" v-model="conditions.device_name"></el-input>
</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.detection_type">
......@@ -49,13 +63,13 @@
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<el-button type="primary" style="" @click="query" class="block">查询</el-button>
<el-button type="success" class="block" @click="exportFun">导出</el-button>
<el-button type="success" class="block compatibleBtn" @click="exportFun">导出</el-button>
</div>
</el-col>
<div style="">
<el-table
:data="formattterData"
height="574"
:height="tableHeight"
stripe
border>
<el-table-column
......@@ -64,9 +78,9 @@
label="时间">
</el-table-column>
<el-table-column
prop="device_name"
prop="location_name"
align="center"
label="相机名称">
label="地点名称">
</el-table-column>
<el-table-column
prop="detection_type"
......@@ -80,7 +94,7 @@
align="center"
label="车道">
</el-table-column>
<el-table-column
<!-- <el-table-column
v-if="conditions.statistic_type =='device'"
prop="direction"
align="center"
......@@ -90,7 +104,7 @@
{{scope.row.direction == 1?"来向":(scope.row.direction == 2?"去向":"来向")}}
</div>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
align="center"
label="平均速度(km/h)">
......@@ -169,8 +183,8 @@
conditions: {
start_dt:start_dt,
end_dt:end_dt,
location_name: '',
device_name: '',
task_id: '',
subtask_id: '',
detection_type: '',
statistic_type: 'road'
},
......@@ -178,6 +192,9 @@
total:0,
page:1,
pageSize:30,
taskList:[],
subTaskList:[],
tableHeight:window.oneSearchTableHeight
}
},
watch:{
......@@ -188,9 +205,31 @@
},
components:{},
mounted(){
this.getData()
this.getData();
this.getTaskList();
},
methods:{
getTaskList(){
this.$api.task.getTask({
source_type: "pull_video_stream",
task_type: "normal"
}).then(res=>{
this.taskList=res.list_data;
this.taskList.unshift({
task_id:'',
task_name:'全部'
})
})
},
getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data;
if( this.subTaskList.length>0){
this.conditions.subtask_id=this.subTaskList[0].subtask_id
}
})
},
typeFormatter(row, column, cellValue, index){
let codename = '';
switch(cellValue){
......@@ -216,8 +255,8 @@
process.env.VUE_APP_URL + '/api/v1/traffic/flow/statistics/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')+
'&location_name='+this.conditions.location_name+
'&device_name='+this.conditions.device_name+
'&task_id='+this.conditions.task_id+
'&subtask_id='+this.conditions.subtask_id+
'&statistic_type='+this.conditions.statistic_type
))
},
......@@ -240,8 +279,8 @@
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'),
location_name: this.conditions.location_name,
device_name: this.conditions.device_name,
task_id: this.conditions.task_id,
subtask_id: this.conditions.subtask_id,
detection_type: this.conditions.detection_type,
statistic_type: this.conditions.statistic_type
}
......
......@@ -2,29 +2,42 @@
<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="相机名称" >
<span class="inputBox">
<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.task_name"></el-input>
</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.task_id" @change="getSubTask">
<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 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="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" >
......@@ -33,7 +46,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.car_color">
<el-option value="" label='全部'></el-option>
......@@ -41,15 +54,15 @@
</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.logo_type">
<el-option value="" label='全部'></el-option>
<el-option v-for='item in brandList' :value="item.code" :key="item.code" :label='item.name'></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="标志物">
</el-form-item> -->
<!-- <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 +72,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">
......@@ -89,7 +102,7 @@
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<el-button type="primary" style="" @click="query" class="block">查询</el-button>
<el-button type="success" class="block" @click="exportFun">导出</el-button>
<el-button type="success" class="block compatibleBtn" @click="exportFun">导出</el-button>
</div>
<div>
<el-button type="success" class="block" @click="batchdel">批量删除</el-button>
......@@ -98,7 +111,7 @@
<div style="">
<el-table
:data="formattterData"
height="574"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange">
......@@ -112,26 +125,31 @@
align="center"
label="车牌号码">
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车牌类型">
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型">
</el-table-column>
<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,14 +278,15 @@
start_dt:start_dt,
end_dt:end_dt,
source_type: 'pull_video_stream',
plate_type:'',
marker: '',
car_type: '',
car_color: '',
logo_type: '',
plate:'',
task_name:'',
task_id:'',
curdelid:'',
vchan_name:'',
subtask_name:'',
special_type:''
},
brandList:this.$buildCode.getCodeList('车辆品牌'),
......@@ -279,7 +298,10 @@
page:1,
pageSize:30,
selectcheck:[],
currentIndex:0
currentIndex:0,
taskList:[],
subTaskList:[],
tableHeight:window.twoSearchTableHeight,
}
},
watch:{
......@@ -291,10 +313,32 @@
components:{},
mounted(){
this.getData()
this.getTaskList();
},
methods:{
getTaskList(){
this.$api.task.getTask({
source_type: "pull_video_stream",
task_type: "normal"
}).then(res=>{
this.taskList=res.list_data;
this.taskList.unshift({
task_id:'',
task_name:'全部'
})
})
},
getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data;
if( this.subTaskList.length>0){
this.conditions.subtask_id=this.subTaskList[0].subtask_id
}
})
},
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')+'&subtask_name='+this.conditions.subtask_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_id='+this.conditions.task_id+'&special_type='+this.conditions.special_type))
},
batchdel(){
if(this.selectcheck.length==0){
......@@ -376,16 +420,17 @@
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,
vchan_name__like: this.conditions.vchan_name,
// source_type: this.conditions.source_type,
subtask_name: this.conditions.subtask_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
task_id: this.conditions.task_id
}
this.$api.search.tableList(search_params
).then((res)=>{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!