Commit b7e3b2ec by 夏新然

修改局部loading

1 parent 2d6459fb
......@@ -5573,7 +5573,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -5594,12 +5595,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -5614,17 +5617,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -5741,7 +5747,8 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -5753,6 +5760,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -5767,6 +5775,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -5774,12 +5783,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -5798,6 +5809,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -5887,7 +5899,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -5899,6 +5912,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -5984,7 +5998,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -6020,6 +6035,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -6039,6 +6055,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -6082,12 +6099,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -42,6 +42,9 @@ export default {
editVideo(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
delVideo(params,id,id2){
return api.delete(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
addCamera(params,id){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans`, params)
},
......
......@@ -184,9 +184,13 @@
height: 26px;
line-height: 26px;
}
.el-dialog__body{
padding: 30px 34px;
}
.detailDialog .el-dialog__body{
padding: 0 34px;
}
.el-dialog .el-select--small{
width: 100%;
}
......
......@@ -145,9 +145,12 @@ a:active{
overflow: hidden;
}
}
.leftButton{
float: left;
}
.detaiCon span{
display: inline-block;
width: 150px;
width: 80px;
}
.arrow{
position: absolute;
......
......@@ -105,7 +105,6 @@
this.file.push(param.file)
},
handleNodeClick(data){
console.log(data)
this.$emit('clickHandle',data,'video');
// this.$parent.$parent.getVideoTable(data,'video')
},
......@@ -122,8 +121,24 @@
upData.append('vchan_type', 'vfile');
upData.append('vchan_refid', new Date().getTime());
})
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.$api.resource.uploadFile(upData,this.devsId).then(res=>{
console.log(res)
if(res.enote==400){
this.$message.error(res.ecode);
}else{
this.$emit('getTree');
this.$message({
message: '添加成功',
type: 'success'
});
this.addVisible=false;
loading.close();
}
})
},
......
......@@ -128,6 +128,7 @@
vchan_type: "vfile"
},this.dev_unid).then(res=>{
this.videoTree=res.list_data;
this.getTable(this.videoTree,'video')
})
},
submitLaterGet(data){
......@@ -138,7 +139,7 @@
this.cameraTree=res.vchan_struct;
this.cameraArr=[];
this.cameraBuildTree(res.vchan_struct);
this.getTable(data)
this.getTable(data,'camera')
})
},
//处理树状图数据
......@@ -260,11 +261,12 @@
})
}
}else if(this.tableType=="video"){
console.log(data)
if(data.org_type=='video'){
this.formattterData=data.childs;
}else{
this.formattterData=[];
this.formattterData.push(data)
this.formattterData=data;
console.log('aaaaaa',this.formattterData)
}
}
......@@ -308,8 +310,35 @@
this.videoEditVisible=false;
})
},
delVideo(){
delVideo(index,row){
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.resource.delVideo({},this.dev_unid,row.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);
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
}
......
......@@ -63,6 +63,7 @@
:data="formattterData"
:height="tableHeight"
stripe
v-loading="loading"
border
@selection-change="handleSelectionChange">
<el-table-column
......@@ -139,35 +140,34 @@
title="详情"
top="12vh"
:visible.sync="detailVisible"
width="700px">
class="detailDialog"
width="800px">
<div style="position: relative;padding: 10px 20px;">
<div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div>
<!-- <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 label-width="80px" inline>
<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.event_type }}</span>
</el-form-item>
</div>
</el-form>
</div>
<div class="rightArrow" @click="rightFun"><i class="el-icon-d-arrow-right"></i></div>
<!-- <div class="rightArrow" @click="rightFun"><i class="el-icon-d-arrow-right"></i></div> -->
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="detailVisible = false">关 闭</el-button>
<el-button type="primary" @click="leftFun">上一条</el-button>
<el-button type="primary" @click="rightFun">下一条</el-button>
<el-button @click="detailVisible = false">关 闭</el-button>
</span>
</el-dialog>
<videoDialog ref="visableDialog" :playersrc="playurl"></videoDialog>
......@@ -195,6 +195,7 @@
event_cate:'安防事件'
},
tableData:[],
loading:false,
formattterData:[],
total:0,
page:1,
......@@ -327,6 +328,7 @@
this.getData();
},
getData(){
this.loading=true;
this.formattterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
......@@ -350,7 +352,7 @@
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
})
this.loading=false;
}).catch((err)=>{
})
......
......@@ -82,6 +82,7 @@
<el-table
:data="formattterData"
:height="tableHeight"
v-loading="loading"
stripe
border
@selection-change="handleSelectionChange">
......@@ -142,6 +143,7 @@
</el-table-column>
<el-table-column
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-tooltip content="播放" placement="bottom" effect="light" :visible-arrow=false>
......@@ -178,68 +180,59 @@
title="详情"
top="12vh"
:visible.sync="detailVisible"
width="700px">
class="detailDialog"
width="1000px">
<div style="position: relative;padding: 10px 20px;">
<div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div>
<!-- <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">
<el-image style="width: 60%;display: block;margin: 0 auto;" :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 label-width="80px" inline>
<el-form-item label="车牌号码:">
<span>{{ detailObj.vehicle_plate_text }}</span>
</el-form-item>
<el-form-item label="车牌类型:">
<span>{{ detailObj.plate_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.vehicle_body_logo_text }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="车辆类型:">
<span>{{ detailObj.vehicle_body_type_text }}</span>
</el-form-item>
<el-form-item label="车牌颜色:">
<span>{{ detailObj.plate_color_text }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="车身颜色:">
<span>{{ detailObj.vehicle_body_color_text }}</span>
</el-form-item>
<el-form-item label="标志物:">
<span>{{ detailObj.RefinedFeature_text }}</span>
</el-form-item>
</div>
<div>
<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 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>
<el-button type="danger" @click="detailDel" class="leftButton">删 除</el-button>
<el-button type="primary" @click="leftFun">上一条</el-button>
<el-button type="primary" @click="rightFun">下一条</el-button>
<el-button @click="detailVisible = false">关 闭</el-button>
</span>
</el-dialog>
<curVideo ref="visableDialog" :playersrc="playurl"></curVideo>
......@@ -252,6 +245,7 @@
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{
loading:false,
playurl:'',
detailObj:{},
carImg:require("@/assets/img/home/defaultImg.png"),
......@@ -427,6 +421,7 @@
this.getData();
},
getData(){
this.loading=true;
this.formattterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
......@@ -451,7 +446,7 @@
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
})
this.loading=false;
}).catch((err)=>{
})
......
......@@ -76,6 +76,7 @@
height="574"
stripe
border
v-loading="loading"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
......@@ -207,6 +208,7 @@
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{
loading:false,
detailObj:{},
carImg:require("@/assets/img/home/defaultImg.png"),
detailImg:'',
......@@ -353,6 +355,7 @@
this.getData();
},
getData(){
this.loading=true;
this.formattterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
......@@ -374,7 +377,7 @@
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
})
this.loading=false;
}).catch((err)=>{
})
......
......@@ -68,9 +68,10 @@
</el-col>
<div style="">
<el-table
:data="formattterData"
:data="formatterData"
:height="tableHeight"
stripe
v-loading="loading"
border>
<el-table-column
prop="index"
......@@ -186,6 +187,7 @@
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{
loading:false,
dates:[ start_dt,end_dt ],
conditions: {
start_dt:start_dt,
......@@ -195,7 +197,7 @@
detection_type: '',
statistic_type: 'road'
},
formattterData:[],
formatterData:[],
total:0,
page:1,
pageSize:30,
......@@ -287,7 +289,8 @@
this.getData();
},
getData(){
this.formattterData=[];
this.loading=true;
this.formatterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
limit: this.pageSize,
......@@ -303,9 +306,9 @@
).then((res)=>{
this.total=res.total_num;
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
this.formatterData.push(this.$buildCode.init(item));
})
this.loading=false;
}).catch((err)=>{
})
......
......@@ -110,10 +110,11 @@
</el-col>
<div style="">
<el-table
:data="formattterData"
:data="formatterData"
:height="tableHeight"
stripe
border
v-loading="loading"
@selection-change="handleSelectionChange">
<el-table-column
......@@ -210,63 +211,56 @@
title="详情"
top="12vh"
:visible.sync="detailVisible"
width="700px">
class="detailDialog"
width="1000px">
<div style="position: relative;padding: 10px 20px;">
<div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div>
<!-- <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;">
<img :src="carImg" alt="" style="width: 30%;display: block;margin: 0 auto;">
</div>
</el-image>
<el-form label-width="120px" inline>
<div>
<el-form-item label="车牌号码:">
<span>{{ detailObj.vehicle_plate_text }}</span>
</el-form-item>
<el-form-item label="车牌类型:">
<span>{{ detailObj.plate_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.vehicle_body_logo_text }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="车辆类型:">
<span>{{ detailObj.vehicle_body_type_text }}</span>
</el-form-item>
<el-form-item label="车牌颜色:">
<span>{{ detailObj.plate_color_text }}</span>
</el-form-item>
</div>
<div>
<el-form-item label="车身颜色:">
<span>{{ detailObj.vehicle_body_color_text }}</span>
</el-form-item>
<el-form-item label="标志物:">
<span>{{ detailObj.RefinedFeature_text }}</span>
</el-form-item>
</div>
</el-form>
</div>
<div class="rightArrow" @click="rightFun"><i class="el-icon-d-arrow-right"></i></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>
<el-button type="danger" @click="detailDel" class="leftButton">删 除</el-button>
<el-button type="primary" @click="leftFun">上一条</el-button>
<el-button type="primary" @click="rightFun">下一条</el-button>
<el-button @click="detailVisible = false">关 闭</el-button>
</span>
</el-dialog>
</div>
......@@ -297,11 +291,12 @@
special_type:'',
subtask_id:''
},
loading:false,
brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
vehicleColorList:this.$buildCode.getCodeList('车身颜色'),
tableData:[],
formattterData:[],
formatterData:[],
total:0,
page:1,
pageSize:30,
......@@ -405,19 +400,19 @@
});
return false;
}
this.detailObj=this.formattterData[this.currentIndex-1];
this.detailObj=this.formatterData[this.currentIndex-1];
this.currentIndex-=1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
rightFun(){
if(this.currentIndex==this.formattterData.length-1){
if(this.currentIndex==this.formatterData.length-1){
this.$message({
message: '目前为最后一条',
type: 'warning'
});
return false;
}
this.detailObj=this.formattterData[this.currentIndex+1];
this.detailObj=this.formatterData[this.currentIndex+1];
this.currentIndex+=1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
......@@ -439,7 +434,8 @@
this.getData();
},
getData(){
this.formattterData=[];
this.loading=true;
this.formatterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
limit: this.pageSize,
......@@ -462,9 +458,9 @@
).then((res)=>{
this.total=res.total_num;
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
this.formatterData.push(this.$buildCode.init(item));
})
this.loading=false;
}).catch((err)=>{
})
......@@ -494,7 +490,7 @@
this.$api.search.delVehicle({
},row.id).then(res=>{
if(res.ecode==200){
this.formattterData.splice(index);
this.formatterData.splice(index);
this.$message({
type: 'success',
message: '删除成功!'
......@@ -516,9 +512,9 @@
}).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.formatterData.splice(this.currentIndex,1);
this.detailObj = Object.assign({},this.formatterData[this.currentIndex]);
this.getImg(this.formatterData[this.currentIndex].pics[0].pic_unid);
this.$message({
type: 'success',
message: '删除成功!'
......
......@@ -133,7 +133,8 @@
</el-col>
<div style="">
<el-table
:data="formattterData"
:data="formatterData"
v-loading="loading"
:height="tableHeight"
stripe
border
......@@ -244,33 +245,29 @@
title="详情"
top="12vh"
:visible.sync="detailVisible"
width="700px">
class="detailDialog"
width="1000px">
<div style="position: relative;padding: 10px 20px;">
<div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div>
<!-- <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;">
<img :src="carImg" alt="" style="width: 36%;display: block;margin: 0 auto;">
</div>
</el-image>
<el-form label-width="120px" inline>
<div>
<el-form label-width="80px" inline>
<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="经过日期:">
<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.driver_height }}</span>
......@@ -278,38 +275,33 @@
<el-form-item label="速度:">
<span>{{ detailObj.location_speed }}</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.driver_face_lobody_text }}</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 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>
<el-button type="danger" @click="detailDel" class="leftButton">删 除</el-button>
<el-button type="primary" @click="leftFun">上一条</el-button>
<el-button type="primary" @click="rightFun">下一条</el-button>
<el-button @click="detailVisible = false">关 闭</el-button>
</span>
</el-dialog>
</div>
......@@ -325,6 +317,7 @@
bodyColorList:this.$buildCode.getCodeList('车身颜色'),
detailImg:'',
detailVisible:false,
loading:false,
dates:[ start_dt,end_dt ],
conditions: {
start_dt:start_dt,
......@@ -344,7 +337,7 @@
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
vehicleColorList:this.$buildCode.getCodeList('车身颜色'),
tableData:[],
formattterData:[],
formatterData:[],
total:0,
page:1,
pageSize:30,
......@@ -489,19 +482,19 @@
});
return false;
}
this.detailObj=this.formattterData[this.currentIndex-1];
this.detailObj=this.formatterData[this.currentIndex-1];
this.currentIndex-=1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
rightFun(){
if(this.currentIndex==this.formattterData.length-1){
if(this.currentIndex==this.formatterData.length-1){
this.$message({
message: '目前为最后一条',
type: 'warning'
});
return false;
}
this.detailObj=this.formattterData[this.currentIndex+1];
this.detailObj=this.formatterData[this.currentIndex+1];
this.currentIndex+=1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
......@@ -523,7 +516,8 @@
this.getData();
},
getData(){
this.formattterData=[];
this.loading=true;
this.formatterData=[];
let offset = (this.page - 1) * this.pageSize;
let search_params = {
limit: this.pageSize,
......@@ -549,9 +543,9 @@
).then((res)=>{
this.total=res.total_num;
res.list_data.forEach((item,index)=>{
this.formattterData.push(this.$buildCode.init(item));
this.formatterData.push(this.$buildCode.init(item));
})
this.loading=false;
}).catch((err)=>{
})
......@@ -581,7 +575,7 @@
this.$api.search.delVehicle({
},row.id).then(res=>{
if(res.ecode==200){
this.formattterData.splice(index);
this.formatterData.splice(index);
this.$message({
type: 'success',
message: '删除成功!'
......@@ -603,9 +597,9 @@
}).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.formatterData.splice(this.currentIndex,1);
this.detailObj = Object.assign({},this.formatterData[this.currentIndex]);
this.getImg(this.formatterData[this.currentIndex].pics[0].pic_unid);
this.$message({
type: 'success',
message: '删除成功!'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!