Commit a7791136 by 夏新然

修改表格问题

1 parent 9ca2a12a
...@@ -140,6 +140,9 @@ ...@@ -140,6 +140,9 @@
.el-table--striped .el-table__body tr.el-table__row--striped td{ .el-table--striped .el-table__body tr.el-table__row--striped td{
background: #FFFFFF; background: #FFFFFF;
} }
.el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #F5F7FA!important;
}
/* 提示 */ /* 提示 */
.el-tooltip__popper{ .el-tooltip__popper{
padding: 6px 12px; padding: 6px 12px;
......
...@@ -20,8 +20,8 @@ Vue.prototype.$buildCode = buildCode; ...@@ -20,8 +20,8 @@ Vue.prototype.$buildCode = buildCode;
Vue.prototype.oParse = new XML.ObjTree(); Vue.prototype.oParse = new XML.ObjTree();
Vue.prototype.axios = axios; Vue.prototype.axios = axios;
// import VueParticles from "vue-particles"; import VueParticles from "vue-particles";
// Vue.use(VueParticles); Vue.use(VueParticles);
Vue.use(api); Vue.use(api);
Vue.use(ElementUI, { size: "small", zIndex: 3000 }); Vue.use(ElementUI, { size: "small", zIndex: 3000 });
......
...@@ -156,15 +156,15 @@ export const asyncRouterMap = [ ...@@ -156,15 +156,15 @@ export const asyncRouterMap = [
component: resolve => component: resolve =>
require(["../views/resource/videoEquipment.vue"], resolve) require(["../views/resource/videoEquipment.vue"], resolve)
}, },
{ // {
path: "/resource/equipment", // path: "/resource/equipment",
name: "分析设备", // name: "分析设备",
meta: { // meta: {
icon: "el-icon-location" // icon: "el-icon-location"
}, // },
component: resolve => // component: resolve =>
require(["../views/resource/analysis.vue"], resolve) // require(["../views/resource/analysis.vue"], resolve)
}, // },
{ {
path: "/resource/store_confs", path: "/resource/store_confs",
name: "存储配置", name: "存储配置",
......
<template> <template>
<div id="login" :style="{ height: innerHeight + 'px' }"> <div id="login" :style="{ height: innerHeight + 'px' }">
<!-- <vue-particles <!-- ie空白解决方法https://blog.csdn.net/heyNewbie/article/details/99623550 -->
<vue-particles
color="#dedede" color="#dedede"
:particleOpacity="0.7" :particleOpacity="0.7"
:particlesNumber="80" :particlesNumber="80"
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
:clickEffect="true" :clickEffect="true"
clickMode="push" clickMode="push"
> >
</vue-particles> --> </vue-particles>
<div class="box"> <div class="box">
<h1>视频分析综合管理平台</h1> <h1>视频分析综合管理平台</h1>
<div style="width: 60%;margin: 0 auto;"> <div style="width: 60%;margin: 0 auto;">
...@@ -136,7 +137,7 @@ export default { ...@@ -136,7 +137,7 @@ export default {
}).then(res=>{ }).then(res=>{
localStorage.setItem('menu', JSON.stringify(res.menu_tree[0].children)) localStorage.setItem('menu', JSON.stringify(res.menu_tree[0].children))
this.$store.dispatch('GetMenuRole',res.menu_tree[0].children).then(res => { this.$store.dispatch('GetMenuRole',res.menu_tree[0].children).then(res => {
this.$router.push('/') this.$router.push('/trficcshow')
}) })
}) })
}, },
......
...@@ -65,6 +65,13 @@ ...@@ -65,6 +65,13 @@
stripe stripe
border border
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
width="50">
</el-table-column>
<el-table-column <el-table-column
prop="event_cate" prop="event_cate"
align="center" align="center"
...@@ -216,6 +223,9 @@ ...@@ -216,6 +223,9 @@
this.getData() this.getData()
}, },
methods:{ methods:{
indexFormatter(row, column, cellValue, index){
return index+(this.page-1)*this.pageSize+1;
},
cateFormatter(row, column, cellValue, index){ cateFormatter(row, column, cellValue, index){
let name='' let name=''
this.cateList.forEach(item=>{ this.cateList.forEach(item=>{
...@@ -238,12 +248,17 @@ ...@@ -238,12 +248,17 @@
}) })
}, },
getSubTask(){ getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => { this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data; if(res.list_data==null){
if( this.subTaskList.length>0){ this.subTaskList=[];
this.conditions.subtask_id=this.subTaskList[0].subtask_id }else{
this.subTaskList = res.list_data;
} }
this.subTaskList.unshift({
subtask_id:'',
subtask_name:'全部'
})
this.conditions.subtask_id='';
}) })
}, },
cateChange(){ cateChange(){
......
...@@ -90,6 +90,13 @@ ...@@ -90,6 +90,13 @@
align="center" align="center"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
width="50">
</el-table-column>
<el-table-column <el-table-column
prop="vehicle_plate_text" prop="vehicle_plate_text"
align="center" align="center"
...@@ -293,6 +300,9 @@ ...@@ -293,6 +300,9 @@
this.getData() this.getData()
}, },
methods:{ methods:{
indexFormatter(row, column, cellValue, index){
return index+(this.page-1)*this.pageSize+1;
},
getTaskList(){ getTaskList(){
this.$api.task.getTask({ this.$api.task.getTask({
source_type: "pull_video_stream", source_type: "pull_video_stream",
...@@ -306,12 +316,17 @@ ...@@ -306,12 +316,17 @@
}) })
}, },
getSubTask(){ getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => { this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data; if(res.list_data==null){
if( this.subTaskList.length>0){ this.subTaskList=[];
this.conditions.subtask_id=this.subTaskList[0].subtask_id }else{
this.subTaskList = res.list_data;
} }
this.subTaskList.unshift({
subtask_id:'',
subtask_name:'全部'
})
this.conditions.subtask_id='';
}) })
}, },
playFun(index,row){ playFun(index,row){
......
...@@ -72,6 +72,13 @@ ...@@ -72,6 +72,13 @@
:height="tableHeight" :height="tableHeight"
stripe stripe
border> border>
<el-table-column
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
width="50">
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="event_dt" prop="event_dt"
...@@ -209,6 +216,9 @@ ...@@ -209,6 +216,9 @@
this.getTaskList(); this.getTaskList();
}, },
methods:{ methods:{
indexFormatter(row, column, cellValue, index){
return index+(this.page-1)*this.pageSize+1;
},
getTaskList(){ getTaskList(){
this.$api.task.getTask({ this.$api.task.getTask({
source_type: "pull_video_stream", source_type: "pull_video_stream",
...@@ -222,12 +232,17 @@ ...@@ -222,12 +232,17 @@
}) })
}, },
getSubTask(){ getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => { this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data; if(res.list_data==null){
if( this.subTaskList.length>0){ this.subTaskList=[];
this.conditions.subtask_id=this.subTaskList[0].subtask_id }else{
this.subTaskList = res.list_data;
} }
this.subTaskList.unshift({
subtask_id:'',
subtask_name:'全部'
})
this.conditions.subtask_id='';
}) })
}, },
typeFormatter(row, column, cellValue, index){ typeFormatter(row, column, cellValue, index){
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</el-form-item> </el-form-item>
<el-form-item label="视频名称"> <el-form-item label="视频名称">
<span class="selectBox"> <span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.subtask_id"> <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-option v-for='item in subTaskList' :value="item.subtask_id" :key="item.subtask_id" :label='item.subtask_name'></el-option>
</el-select> </el-select>
</span> </span>
...@@ -115,11 +115,19 @@ ...@@ -115,11 +115,19 @@
stripe stripe
border border
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column <el-table-column
type="selection" type="selection"
align="center" align="center"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
width="50">
</el-table-column>
<el-table-column <el-table-column
prop="vehicle_plate_text" prop="vehicle_plate_text"
align="center" align="center"
...@@ -286,8 +294,8 @@ ...@@ -286,8 +294,8 @@
plate:'', plate:'',
task_id:'', task_id:'',
curdelid:'', curdelid:'',
subtask_name:'', special_type:'',
special_type:'' subtask_id:''
}, },
brandList:this.$buildCode.getCodeList('车辆品牌'), brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'), vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
...@@ -316,6 +324,9 @@ ...@@ -316,6 +324,9 @@
this.getTaskList(); this.getTaskList();
}, },
methods:{ methods:{
indexFormatter(row, column, cellValue, index){
return index+(this.page-1)*this.pageSize+1;
},
getTaskList(){ getTaskList(){
this.$api.task.getTask({ this.$api.task.getTask({
source_type: "pull_video_stream", source_type: "pull_video_stream",
...@@ -329,16 +340,31 @@ ...@@ -329,16 +340,31 @@
}) })
}, },
getSubTask(){ getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => { this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data; if(res.list_data==null){
if( this.subTaskList.length>0){ this.subTaskList=[];
this.conditions.subtask_id=this.subTaskList[0].subtask_id }else{
this.subTaskList = res.list_data;
} }
this.subTaskList.unshift({
subtask_id:'',
subtask_name:'全部'
})
this.conditions.subtask_id='';
}) })
}, },
exportFun(){ 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')+'&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)) 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_id='+this.conditions.subtask_id
+'&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(){ batchdel(){
if(this.selectcheck.length==0){ if(this.selectcheck.length==0){
...@@ -421,7 +447,6 @@ ...@@ -421,7 +447,6 @@
event_dt__gte: this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss'), 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'), event_dt__lt:this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss'),
// source_type: this.conditions.source_type, // source_type: this.conditions.source_type,
subtask_name: this.conditions.subtask_name,
vehicle_type: this.conditions.car_type, vehicle_type: this.conditions.car_type,
body_color: this.conditions.car_color, body_color: this.conditions.car_color,
logo_type: this.conditions.logo_type, logo_type: this.conditions.logo_type,
...@@ -430,7 +455,8 @@ ...@@ -430,7 +455,8 @@
plate_type: this.conditions.plate_type, plate_type: this.conditions.plate_type,
event_type: '', event_type: '',
special_type:this.conditions.special_type, special_type:this.conditions.special_type,
task_id: this.conditions.task_id task_id: this.conditions.task_id,
subtask_id:this.conditions.subtask_id
} }
this.$api.search.tableList(search_params this.$api.search.tableList(search_params
).then((res)=>{ ).then((res)=>{
......
...@@ -143,6 +143,13 @@ ...@@ -143,6 +143,13 @@
align="center" align="center"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
width="50">
</el-table-column>
<el-table-column <el-table-column
prop="xcycle_type_text" prop="xcycle_type_text"
align="center" align="center"
...@@ -323,8 +330,8 @@ ...@@ -323,8 +330,8 @@
start_dt:start_dt, start_dt:start_dt,
end_dt:end_dt, end_dt:end_dt,
event_type: 'xcycle', event_type: 'xcycle',
subtask_id:null, subtask_id:'',
task_id:null, task_id:'',
xcycle_type:'', xcycle_type:'',
sex:'', sex:'',
company:'', company:'',
...@@ -360,6 +367,9 @@ ...@@ -360,6 +367,9 @@
this.getData() this.getData()
}, },
methods:{ methods:{
indexFormatter(row, column, cellValue, index){
return index+(this.page-1)*this.pageSize+1;
},
getTaskList(){ getTaskList(){
this.$api.task.getTask({ this.$api.task.getTask({
source_type: "pull_video_stream", source_type: "pull_video_stream",
...@@ -373,12 +383,17 @@ ...@@ -373,12 +383,17 @@
}) })
}, },
getSubTask(){ getSubTask(){
this.conditions.subtask_id=null;
this.$api.task.getSubTask(this.conditions.task_id).then(res => { this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.subTaskList = res.list_data; if(res.list_data==null){
if( this.subTaskList.length>0){ this.subTaskList=[];
this.conditions.subtask_id=this.subTaskList[0].subtask_id }else{
this.subTaskList = res.list_data;
} }
this.subTaskList.unshift({
subtask_id:'',
subtask_name:'全部'
})
this.conditions.subtask_id='';
}) })
}, },
typeChange(){ typeChange(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!