Commit 976c7b12 authored by guoyou's avatar guoyou

车辆信息管理优化

parent 4fa3a2bd
......@@ -1450,7 +1450,7 @@ export default {
},
selectArry: [],
selectVehicleModelArray: [],
list: null,
list: [],
total: null,
listLoading: true,
listQuery: {
......@@ -2541,7 +2541,11 @@ export default {
checkIfRuning: vehicle =>
vehicle.status === VEHICLE_CONSTANT_STATUS_NORMAL,
getVehicleStatus: function(code) {
return this.vehicleStatus[code].val
// console.log(this.getAllVehicleStatus()[1].val);
// let demo = this.getAllVehicleStatus.filter(item => item)
// console.log(this.vehicleStatus[code]);
return this.getAllVehicleStatus()[code].val
},
getAllVehicleStatus: function() {
return {
......@@ -2603,6 +2607,7 @@ export default {
return getConstantListByType(VEHICLE_CONSTANT_VEHICLE_USE)
},
getList() {
this.listQuery.vin = null
this.listLoading = true
let listQueryTemp = this.fillDateRange2Object(
this.listQuery,
......@@ -2631,23 +2636,27 @@ export default {
if (!this.listQuery.belongToName) {
this.listQuery.belongToName = undefined
}
page(listQueryTemp).then(response => {
if (response.code == 1) {
let totalCountRs = undefined
let listRs = undefined
if (
!this.$utils.isEmpty(response.data.data) &&
this.$utils.isInteger(response.data.totalCount)
) {
listRs = response.data.data
totalCountRs = response.data.totalCount
listRs.map(function(item) {
item.visible2 = false
})
}
// if (
// !this.$utils.isEmpty(response.data.data) &&
// this.$utils.isInteger(response.data.totalCount)
// ) {
// listRs = response.data.data
// totalCountRs = response.data.totalCount
// listRs.map(function(item) {
// item.visible2 = false
// })
// }
this.listLoading = false
this.list = listRs
this.total = totalCountRs
console.log(response.data.data);
this.list = response.data.data
this.total = response.data.totalCount
} else {
this.list = []
this.listLoading = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment