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,6 +18,16 @@ 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';
}
}
}
......
......@@ -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,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;
......
......@@ -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: "交通流量",
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),
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),
// }
]
},
{
......@@ -151,7 +153,8 @@ export const asyncRouterMap = [
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/videoEquipment.vue"], resolve),
component: resolve =>
require(["../views/resource/videoEquipment.vue"], resolve)
},
{
path: "/resource/equipment",
......@@ -159,7 +162,8 @@ export const asyncRouterMap = [
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/analysis.vue"], resolve),
component: resolve =>
require(["../views/resource/analysis.vue"], resolve)
},
{
path: "/resource/store_confs",
......@@ -167,7 +171,8 @@ export const asyncRouterMap = [
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/store_confs.vue"], resolve),
component: resolve =>
require(["../views/resource/store_confs.vue"], resolve)
},
{
path: "/resource/author",
......@@ -175,17 +180,30 @@ export const asyncRouterMap = [
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/Author/author.vue"], resolve),
},{
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),
},
component: resolve =>
require(["../views/resource/Codes/codes.vue"], resolve)
}
]
},{
},
{
path: "/ops",
name: "系统运维",
component: resolve => require(["../views/Layout/index.vue"], resolve),
......@@ -199,42 +217,48 @@ export const asyncRouterMap = [
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/equipment_manage"], resolve),
},{
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),
},{
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),
},{
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),
},{
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),
},{
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),
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
}
]
}
......
......@@ -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,7 +167,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);
}
})
},
},
......
......@@ -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,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="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,6 +222,7 @@
getTable(data,type) {
if(data.org_type!="root"){
this.tableType=type;
if(this.tableType=="camera"){
if(data.org_type){
this.tableType=type;
this.formattterData = [];
......@@ -229,6 +259,14 @@
})
}
}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,11 +2,25 @@
<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-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="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.event_cate" @change="cateChange">
<el-option value="安防事件" label="全部"></el-option>
<el-option v-for='item in cateList' :value="item.code" :key="item.code" :label='item.name'></el-option>
</el-select>
</span>
</el-form-item>
......@@ -18,9 +32,9 @@
</el-select>
</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.location_code"></el-input>
</span>
</el-form-item>
<el-form-item label="起始时间">
......@@ -41,68 +55,38 @@
<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
@selection-change="handleSelectionChange">
<el-table-column
prop="event_type"
align="center"
label="事件类型">
</el-table-column>
<el-table-column
prop="task_name"
align="center"
label="任务名称">
</el-table-column>
<el-table-column
align="center"
label="地点">
<template slot-scope="scope" >
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data&&scope.row.event_data">{{scope.row.event_data.locate_name}}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="event_cate"
align="center"
label="面积(㎡)">
<template slot-scope="scope" >
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data&&scope.row.event_data.area_list">{{scope.row.area_list[0].area}}</span>
</div>
</template>
:formatter="cateFormatter"
label="事件分类">
</el-table-column>
<el-table-column
prop="event_type"
align="center"
label="人数(个)">
<template slot-scope="scope" >
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data&&scope.row.event_data.area_list">{{scope.row.area_list[0].count}}</span>
</div>
</template>
label="事件类型">
</el-table-column>
<el-table-column
prop="event_data.location.code"
align="center"
label="进入阈值">
<template slot-scope="scope" >
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data&&scope.row.event_data.area_list">{{scope.row.area_list[0].max_len}}</span>
</div>
</template>
label="组织名称">
</el-table-column>
<el-table-column
align="center"
label="离开阈值">
label="抓拍地点">
<template slot-scope="scope" >
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data&&scope.row.event_data.area_list">{{scope.row.area_list[0].normal_len}}</span>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data&&scope.row.event_data">{{scope.row.event_data.locate_name}}</span>
</div>
</template>
</el-table-column>
......@@ -116,51 +100,6 @@
</el-table-column>
<el-table-column
align="center"
label="车道号">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data">{{scope.row.event_data.lane.number}}</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="方向类型">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data &&scope.row.event_type !=='jinggaidiushi'&&scope.row.event_type !=='daobantingche'">{{scope.row.direction_text}}</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="车道类型">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data">{{scope.row.lane_text}}</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="事件发生时间">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data">{{$moment($moment.utc(scope.row.event_data.start_dt).format()).local().format('YYYY-MM-DD HH:mm:ss')}}</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="事件结束时间">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_cate == 'behavior'&&scope.row.event_data">{{$moment($moment.utc(scope.row.event_data.end_dt).format()).local().format('YYYY-MM-DD HH:mm:ss')}}</span>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作">
<template slot-scope="scope">
<el-tooltip content="播放" placement="bottom" effect="light" :visible-arrow=false>
......@@ -243,8 +182,10 @@
start_dt:start_dt,
end_dt:end_dt,
type: '',
source_type:'',
task_name:''
task_id:'',
subtask_id:'',
location_code:'',
event_cate:'安防事件'
},
tableData:[],
formattterData:[],
......@@ -253,8 +194,12 @@
pageSize:30,
selectcheck:[],
currentIndex:0,
cateList:JSON.parse(window.localStorage.getItem('cate列表')),
eventList:JSON.parse(window.localStorage.getItem('安防事件')),
playurl:''
playurl:'',
taskList:[],
subTaskList:[],
tableHeight:window.twoSearchTableHeight,
}
},
watch:{
......@@ -267,19 +212,62 @@
videoDialog
},
mounted(){
this.getTaskList();
this.getData()
},
methods:{
cateFormatter(row, column, cellValue, index){
let name=''
this.cateList.forEach(item=>{
if(item.code==cellValue){
name=item.name
}
})
return name;
},
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
}
})
},
cateChange(){
let name=this.conditions.event_cate;
this.type = '';
this.eventList = JSON.parse(window.localStorage.getItem(name));
},
exportFun(){
window.open(
encodeURI(
let cate='';
if(this.conditions.event_cate!='安防事件'){
cate=this.conditions.event_cate
}
let url=
process.env.VUE_APP_URL+
"/api/v1/behavior/events/export?s=" + Math.random()+
'&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') +
'&task_name='+this.conditions.task_name+
'&event_type='+this.conditions.type
)
'&task_id='+this.conditions.task_id+
'&subtask_id='+this.conditions.subtask_id+
'&location_code__like='+this.conditions.location_code ? this.conditions.location_code.replace(/\s\s*/g, '') : this.conditions.location_code+
'&event_type='+this.conditions.type+
'&event_cate='+cate;
window.open(
encodeURI(url)
);
},
leftFun(){
......@@ -329,11 +317,18 @@
let search_params = {
limit: this.pageSize,
offset: offset,
task_name: this.conditions.task_name ? this.conditions.task_name.replace(/\s\s*/g, '') : this.conditions.task_name,
task_id:this.conditions.task_id,
subtask_id:this.conditions.subtask_id,
location_code__like: this.conditions.location_code ? this.conditions.location_code.replace(/\s\s*/g, '') : this.conditions.location_code,
event_type: this.conditions.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')
}
if(this.conditions.event_cate=="安防事件"){
search_params.event_cate='';
}else{
search_params.event_cate=this.conditions.event_cate;
}
this.$api.search.eventTableList(search_params
).then((res)=>{
this.total=res.total_num;
......
......@@ -2,22 +2,18 @@
<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 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="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>
<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="车牌号码">
......@@ -25,38 +21,27 @@
<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.car_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="车身颜色">
<el-form-item label="车牌类型">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.car_color">
<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 vehicleColorList' :value="item.code" :key="item.code" :label='item.name'></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="车辆品牌">
<el-form-item label="车辆类型">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.logo_type">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.car_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-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="标志物">
<el-form-item label="车辆颜色">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.marker">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.car_color">
<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-option v-for='item in vehicleColorList' :value="item.code" :key="item.code" :label='item.name'></el-option>
</el-select>
</span>
</el-form-item>
......@@ -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,15 +254,14 @@
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',
source_type: 'pull_video_stream',
is_key_vehicle:false,
},
brandList: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>
</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="inputBox">
<el-input placeholder="请输入任务名称" v-model="conditions.task_name"></el-input>
<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">
......@@ -115,23 +128,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,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)=>{
......
......@@ -2,26 +2,90 @@
<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>
</span>
</el-form-item> -->
<el-form-item label="检索对象">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.event_type" @change="typeChange">
<el-option value="xcycle" label="非机动车"></el-option>
<el-option value="pedestrian" label="行人"></el-option>
</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.xcycle_type">
<el-option value="" label='全部'></el-option>
<el-option value="motorcycle" label="摩托车" v-show="conditions.event_type == 'xcycle'"></el-option>
<el-option value="bicycle" label="自行车" v-show="conditions.event_type == 'xcycle'"></el-option>
<el-option value="tricycle" label="三轮车" v-show="conditions.event_type == 'xcycle'"></el-option>
<el-option value="aaa" label="行人" v-show="conditions.event_type == 'pedestrian'"></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.sex">
<el-option value="" label="全部"></el-option>
<el-option value="1" label="男"></el-option>
<el-option value="2" label="女"></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="运营公司">
<span class="inputBox">
<el-input placeholder="请输入任务名称" v-model="conditions.task_name"></el-input>
<el-input placeholder="请输入公司名称" v-model="conditions.company"></el-input>
</span>
</el-form-item>
<el-form-item label="非机动车类型" label-width="110px" >
<el-form-item label="是否带盔">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.xcycle_type">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.with_hats">
<el-option value="" label='全部'></el-option>
<el-option :value="0" :key="0" label='不确定'></el-option>
<el-option :value="1" :key="1" label='带盔'></el-option>
<el-option :value="2" :key="2" 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.upbodyColor">
<el-option value="" label='全部'></el-option>
<el-option value="motorcycle" label="摩托车"></el-option>
<el-option value="bicycle" label="自行车"></el-option>
<el-option value="tricycle" label="三轮车"></el-option>
<el-option v-for='item in bodyColorList' :value="item.value" :key="item.value" :label='item.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.lobodyColor">
<el-option value="" label='全部'></el-option>
<el-option v-for='item in bodyColorList' :value="item.value" :key="item.value" :label='item.label'></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="dateBox">
<el-date-picker
......@@ -40,7 +104,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>
......@@ -49,7 +113,7 @@
<div style="">
<el-table
:data="formattterData"
height="574"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange">
......@@ -61,12 +125,27 @@
<el-table-column
prop="xcycle_type_text"
align="center"
label="非机动车类型 ">
label="检测类型">
</el-table-column>
<el-table-column
prop="driver_face_sex"
align="center"
label="性别">
</el-table-column>
<el-table-column
prop="driver_face_with_hats"
align="center"
label="是否带盔">
</el-table-column>
<el-table-column
prop="xcycle_plate_text"
align="center"
label="车牌号码 ">
label="车牌号码">
</el-table-column>
<el-table-column
prop="company"
align="center"
label="运营公司">
</el-table-column>
<el-table-column
prop="shoot_date"
......@@ -82,11 +161,6 @@
label="抓拍地点">
</el-table-column>
<el-table-column
prop="company"
align="center"
label="运营公司 ">
</el-table-column>
<el-table-column
align="center"
label="操作">
<template slot-scope="scope">
......@@ -131,12 +205,12 @@
</el-image>
<el-form label-width="120px" inline>
<div>
<el-form-item label="车牌号码:">
<span>{{ detailObj.xcycle_plate_text }}</span>
</el-form-item>
<el-form-item label="非机动车类型:">
<el-form-item label="检测类型:">
<span>{{ detailObj.xcycle_type_text }}</span>
</el-form-item>
<el-form-item label="经过地点:">
<span>{{ detailObj.location_name }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="经过日期:">
......@@ -147,11 +221,12 @@
</el-form-item>
</div>
<div>
<el-form-item label="经过地点:">
<span>{{ detailObj.location_name }}</span>
<el-form-item label="身高:">
<span>{{ detailObj.driver_height }}</span>
</el-form-item>
<el-form-item label="车辆颜色:">
<span>{{ detailObj.xcycle_color_type }}</span>
<el-form-item label="速度:">
<span>{{ detailObj.location_speed }}</span>
</el-form-item>
</div>
<div>
......@@ -166,8 +241,8 @@
<el-form-item label="上身颜色:">
<span>{{ detailObj.driver_face_upbody_text }}</span>
</el-form-item>
<el-form-item label="速度:">
<span>{{ detailObj.location_speed }}</span>
<el-form-item label="下身颜色:">
<span>{{ detailObj.driver_face_lobody_text }}</span>
</el-form-item>
</div>
<div>
......@@ -197,6 +272,7 @@
return{
detailObj:{},
carImg:require("@/assets/img/home/defaultImg.png"),
bodyColorList:this.$buildCode.getCodeList('车身颜色'),
detailImg:'',
detailVisible:false,
dates:[ start_dt,end_dt ],
......@@ -204,9 +280,13 @@
start_dt:start_dt,
end_dt:end_dt,
event_type: 'xcycle',
subtask_id:null,
task_id:null,
xcycle_type:'',
location_name:'',
task_name:''
sex:'',
company:'',
with_hats:'',
plate:''
},
brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
......@@ -217,7 +297,10 @@
page:1,
pageSize:30,
selectcheck:[],
currentIndex:0
currentIndex:0,
taskList:[],
subTaskList:[],
tableHeight:window.twoSearchTableHeight,
}
},
watch:{
......@@ -228,26 +311,85 @@
},
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
}
})
},
typeChange(){
this.conditions.xcycle_type='';
},
exportFun(){
window.open(
encodeURI(
process.env.VUE_APP_URL+
let url='';
if(this.conditions.event_type=='xcycle'){
url = process.env.VUE_APP_URL+
"/api/v1/traffic/events/export?s=" +
Math.random() +
"&event_type=xcycle&event_dt__gte=" +
"&event_type=" +
this.conditions.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') +
"&xcycle_type=" +
this.conditions.xcycle_type +
"&location_name=" +
this.conditions.location_name +
"&task_name=" +
this.conditions.task_name
)
"&sex=" +
this.conditions.sex +
"&task_id=" +
this.conditions.task_id +
"&subtask_id=" +
this.conditions.subtask_id +
"&company_like=" +
this.conditions.company +
"&with_hats=" +
this.conditions.with_hats +
"&plate_number__like=" +
this.conditions.plate
}else{
url = process.env.VUE_APP_URL+
"/api/v1/traffic/events/export?s=" +
Math.random() +
"&event_type=" +
this.conditions.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') +
"&sex=" +
this.conditions.sex +
"&task_id=" +
this.conditions.task_id +
"&subtask_id=" +
this.conditions.subtask_id +
"&company_like=" +
this.conditions.company +
"&with_hats=" +
this.conditions.with_hats +
"&plate_number__like=" +
this.conditions.plate
}
window.open(
encodeURI(url)
);
},
batchdel(){
......@@ -330,10 +472,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'),
task_name: this.conditions.task_name ? this.conditions.task_name.replace(/\s\s*/g, '') : this.conditions.task_name,
event_type: "xcycle",
xcycle_type: this.conditions.xcycle_type,
location_name: this.conditions.location_name
task_id: this.conditions.task_id,
subtask_id: this.conditions.subtask_id,
event_type: this.conditions.event_type,
sex: this.conditions.sex,
company_like:this.conditions.company,
with_hats: this.conditions.with_hats,
plate_number__like: this.conditions.plate
}
if( this.conditions.event_type=='xcycle'){
search_params.xcycle_type=this.conditions.xcycle_type;
}
this.$api.search.tableList(search_params
).then((res)=>{
......
<template>
<div class="innnerBox">
<el-col :span="22">
<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>
</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="非机动车类型" label-width="110px" >
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.xcycle_type">
<el-option value="" label='全部'></el-option>
<el-option value="motorcycle" label="摩托车"></el-option>
<el-option value="bicycle" label="自行车"></el-option>
<el-option value="tricycle" label="三轮车"></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="起始时间">
<span class="dateBox">
<el-date-picker
v-model="dates"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</span>
</el-form-item>
</el-form>
</el-col>
<el-col :span="2">
<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>
</div>
<div>
<el-button type="success" class="block" @click="batchdel">批量删除</el-button>
</div>
</el-col>
<div style="">
<el-table
:data="formattterData"
height="574"
stripe
border
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
align="center"
width="55">
</el-table-column>
<el-table-column
prop="xcycle_type_text"
align="center"
label="非机动车类型 ">
</el-table-column>
<el-table-column
prop="xcycle_plate_text"
align="center"
label="车牌号码 ">
</el-table-column>
<el-table-column
prop="shoot_date"
align="center"
label="抓拍时间">
<template slot-scope="scope">
<span>{{scope.row.shoot_date}} {{scope.row.shoot_time}}</span>
</template>
</el-table-column>
<el-table-column
prop="location_name"
align="center"
label="抓拍地点">
</el-table-column>
<el-table-column
prop="company"
align="center"
label="运营公司 ">
</el-table-column>
<el-table-column
align="center"
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-xiugai editIcon" @click="detailFun(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="iconfont icon-detail delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:total="total">
</el-pagination>
<div style="clear: both;"></div>
</div>
</div>
<el-dialog
title="详情"
top="12vh"
:visible.sync="detailVisible"
width="700px">
<div style="position: relative;padding: 10px 20px;">
<div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div>
<div class="detaiCon">
<el-image style="width: 100%;" :src="this.detailImg">
<div slot="error" class="image-slot">
<img :src="carImg" alt="" style="width: 40%;display: block;margin: 0 auto;">
</div>
</el-image>
<el-form label-width="120px" inline>
<div>
<el-form-item label="车牌号码:">
<span>{{ detailObj.xcycle_plate_text }}</span>
</el-form-item>
<el-form-item label="非机动车类型:">
<span>{{ detailObj.xcycle_type_text }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="经过日期:">
<span>{{ detailObj.shoot_date ? detailObj.shoot_date : '' }}</span>
</el-form-item>
<el-form-item label="经过时间:">
<span>{{ detailObj.shoot_time ? detailObj.shoot_time : '' }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="经过地点:">
<span>{{ detailObj.location_name }}</span>
</el-form-item>
<el-form-item label="车辆颜色:">
<span>{{ detailObj.xcycle_color_type }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="性别:">
<span>{{ detailObj.driver_face_sex }}</span>
</el-form-item>
<el-form-item label="运营公司:">
<span>{{ detailObj.company }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="上身颜色:">
<span>{{ detailObj.driver_face_upbody_text }}</span>
</el-form-item>
<el-form-item label="速度:">
<span>{{ detailObj.location_speed }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="戴帽子:">
<span>{{ detailObj.driver_face_with_hats }}</span>
</el-form-item>
<el-form-item label="违法类型:">
<span>{{ detailObj.illegalType }}</span>
</el-form-item>
</div>
</el-form>
</div>
<div class="rightArrow" @click="rightFun"><i class="el-icon-d-arrow-right"></i></div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="detailDel">删 除</el-button>
<el-button type="primary" @click="detailVisible = false">关 闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data(){
let start_dt = this.$moment('2019-12-20').format('YYYY-MM-DD')+' 00:00:00';
let end_dt = this.$moment().format('YYYY-MM-DD')+' 23:59:59';
return{
detailObj:{},
carImg:require("@/assets/img/home/defaultImg.png"),
detailImg:'',
detailVisible:false,
dates:[ start_dt,end_dt ],
conditions: {
start_dt:start_dt,
end_dt:end_dt,
event_type: 'xcycle',
xcycle_type:'',
location_name:'',
task_name:''
},
brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
vehicleColorList:this.$buildCode.getCodeList('车身颜色'),
tableData:[],
formattterData:[],
total:0,
page:1,
pageSize:30,
selectcheck:[],
currentIndex:0
}
},
watch:{
dates(val){
this.conditions.start_dt=val[0];
this.conditions.end_dt=val[1];
}
},
components:{},
mounted(){
this.getData()
},
methods:{
exportFun(){
window.open(
encodeURI(
process.env.VUE_APP_URL+
"/api/v1/traffic/events/export?s=" +
Math.random() +
"&event_type=xcycle&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') +
"&xcycle_type=" +
this.conditions.xcycle_type +
"&location_name=" +
this.conditions.location_name +
"&task_name=" +
this.conditions.task_name
)
);
},
batchdel(){
if(this.selectcheck.length==0){
this.$message({
message: '请选择至少一条记录',
type: 'warning'
});
return false
}
this.$confirm('此操作将永久删除选中记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.search.patchdel({
"event_unids":this.selectcheck
}).then(res=>{
if(res.ecode == '200'){
this.$message({
type: 'success',
message: '删除成功!'
});
this.getData();
}else{
this.$message.error('删除失败!');
}
})
})
},
leftFun(){
if(this.currentIndex-1<0){
this.$message({
message: '目前为第一条',
type: 'warning'
});
return false;
}
this.detailObj=this.formattterData[this.currentIndex-1];
this.currentIndex-=1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
rightFun(){
if(this.currentIndex==this.formattterData.length-1){
this.$message({
message: '目前为最后一条',
type: 'warning'
});
return false;
}
this.detailObj=this.formattterData[this.currentIndex+1];
this.currentIndex+=1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
handleSelectionChange(obj){
this.selectcheck = [];
obj.forEach(item => {
this.selectcheck.push(item.id)
});
},
handleSizeChange(val) {
this.pageSize=val;
this.getData();
},
handleCurrentChange(val) {
this.page=val;
this.getData();
},
query(){
this.getData();
},
getData(){
this.formattterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
limit: this.pageSize,
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'),
task_name: this.conditions.task_name ? this.conditions.task_name.replace(/\s\s*/g, '') : this.conditions.task_name,
event_type: "xcycle",
xcycle_type: this.conditions.xcycle_type,
location_name: this.conditions.location_name
}
this.$api.search.tableList(search_params
).then((res)=>{
this.total=res.total_num;
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
})
}).catch((err)=>{
})
},
getImg(unid){
this.$api.search.detailImg({
},unid).then(res=>{
this.detailImg=res.pic_url ? res.pic_url : carImg;
}).catch(e=>{
})
},
detailFun(index,row){
this.currentIndex=index;
if(row.pics.length>0){
this.detailObj = Object.assign({},row);
this.getImg(row.pics[0].pic_unid);
}
this.detailVisible=true;
},
delFun(index,row){
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.search.delVehicle({
},row.id).then(res=>{
if(res.ecode==200){
this.formattterData.splice(index);
this.$message({
type: 'success',
message: '删除成功!'
});
}else{
this.$message.error('删除失败!');
}
}).catch(e=>{
this.$message.error('删除失败!');
})
})
},
detailDel(){
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.search.delVehicle({},this.detailObj.id).then(res=>{
if(res.ecode==200){
this.formattterData.splice(this.currentIndex,1);
this.detailObj = Object.assign({},this.formattterData[this.currentIndex]);
this.getImg(this.formattterData[this.currentIndex].pics[0].pic_unid);
this.$message({
type: 'success',
message: '删除成功!'
});
}else{
this.$message.error('删除失败!');
}
}).catch(e=>{
this.$message.error('删除失败!');
})
})
}
},
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!