Commit d60b57e4 by 夏新然

兼容样式

1 parent 5f34b630
......@@ -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>
......
......@@ -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)
},
......
......@@ -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"
},
......
......@@ -62,6 +62,7 @@ import types from '../store/types.js'
//存储配置列表
this.storeConfList();
//code列表
this.getCatesList();
this.getCodeList();
this.getCustomCode();
this.getEventList();
......@@ -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列表
......
......@@ -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:{
......
<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="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,7 +2,21 @@
<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>
......@@ -11,7 +25,7 @@
<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
}
......
......@@ -11,15 +11,19 @@
</span>
</el-form-item> -->
<el-form-item label="任务名称">
<span class="inputBox">
<el-input placeholder="请输入任务名称" v-model="conditions.task_name"></el-input>
</span>
<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.vchan_name"></el-input>
</span>
</el-form-item>
<el-form-item label="车牌号码">
<span class="inputBox">
......@@ -42,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>
......@@ -50,14 +54,14 @@
</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> -->
<!-- <el-form-item label="标志物">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.marker">
......@@ -98,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>
......@@ -107,7 +111,7 @@
<div style="">
<el-table
:data="formattterData"
height="574"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange">
......@@ -280,9 +284,9 @@
car_color: '',
logo_type: '',
plate:'',
task_name:'',
task_id:'',
curdelid:'',
vchan_name:'',
subtask_name:'',
special_type:''
},
brandList:this.$buildCode.getCodeList('车辆品牌'),
......@@ -294,7 +298,10 @@
page:1,
pageSize:30,
selectcheck:[],
currentIndex:0
currentIndex:0,
taskList:[],
subTaskList:[],
tableHeight:window.twoSearchTableHeight,
}
},
watch:{
......@@ -306,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')+'&vchan_name__like='+this.conditions.vchan_name+'&vehicle_type='+this.conditions.car_type+'&body_color='+this.conditions.car_color+'&logo_type='+this.conditions.logo_type+'&plate_number__like='+this.conditions.plate+'&task_name='+this.conditions.task_name+'&special_type='+this.conditions.special_type))
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){
......@@ -392,7 +421,7 @@
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,
subtask_name: this.conditions.subtask_name,
vehicle_type: this.conditions.car_type,
body_color: this.conditions.car_color,
logo_type: this.conditions.logo_type,
......@@ -401,7 +430,7 @@
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)=>{
......
......@@ -9,7 +9,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.subtask_id">
<el-option v-for='item in subTaskList' :value="item.subtask_id" :key="item.subtask_id" :label='item.subtask_name'></el-option>
......@@ -21,7 +21,7 @@
<el-input placeholder="请输入抓拍地点" v-model="conditions.location_name"></el-input>
</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.event_type" @change="typeChange">
<el-option value="xcycle" label="非机动车"></el-option>
......@@ -29,7 +29,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.xcycle_type">
<el-option value="" label='全部'></el-option>
......@@ -52,10 +52,20 @@
</el-form-item>
<el-form-item label="运营公司">
<span class="inputBox">
<el-input placeholder="请输入任务名称" v-model="conditions.company"></el-input>
<el-input placeholder="请输入公司名称" v-model="conditions.company"></el-input>
</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.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>
......@@ -70,6 +80,11 @@
<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">
......@@ -89,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>
......@@ -98,7 +113,7 @@
<div style="">
<el-table
:data="formattterData"
height="574"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange">
......@@ -118,14 +133,14 @@
label="性别">
</el-table-column>
<el-table-column
prop="driver_face_upbody_text"
prop="driver_face_with_hats"
align="center"
label="上身颜色">
label="是否带盔">
</el-table-column>
<el-table-column
prop="driver_face_lobody_text"
prop="xcycle_plate_text"
align="center"
label="下身颜色">
label="车牌号码">
</el-table-column>
<el-table-column
prop="company"
......@@ -270,8 +285,8 @@
xcycle_type:'',
sex:'',
company:'',
upbodyColor:'',
lobodyColor:''
with_hats:'',
plate:''
},
brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
......@@ -284,7 +299,8 @@
selectcheck:[],
currentIndex:0,
taskList:[],
subTaskList:[]
subTaskList:[],
tableHeight:window.twoSearchTableHeight,
}
},
watch:{
......@@ -304,7 +320,11 @@
source_type: "pull_video_stream",
task_type: "normal"
}).then(res=>{
this.taskList=res.list_data;
this.taskList=res.list_data;
this.taskList.unshift({
task_id:'',
task_name:'全部'
})
})
},
getSubTask(){
......@@ -341,10 +361,10 @@
this.conditions.subtask_id +
"&company_like=" +
this.conditions.company +
"&upbodyColor=" +
this.conditions.upbodyColor +
"&lobodyColor=" +
this.conditions.lobodyColor
"&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=" +
......@@ -363,10 +383,10 @@
this.conditions.subtask_id +
"&company_like=" +
this.conditions.company +
"&upbodyColor=" +
this.conditions.upbodyColor +
"&lobodyColor=" +
this.conditions.lobodyColor
"&with_hats=" +
this.conditions.with_hats +
"&plate_number__like=" +
this.conditions.plate
}
window.open(
encodeURI(url)
......@@ -457,8 +477,8 @@
event_type: this.conditions.event_type,
sex: this.conditions.sex,
company_like:this.conditions.company,
upbodyColor: this.conditions.upbodyColor,
lobodyColor: this.conditions.lobodyColor
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;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!