Commit 976c7b12 authored by guoyou's avatar guoyou

车辆信息管理优化

parent 4fa3a2bd
...@@ -1450,7 +1450,7 @@ export default { ...@@ -1450,7 +1450,7 @@ export default {
}, },
selectArry: [], selectArry: [],
selectVehicleModelArray: [], selectVehicleModelArray: [],
list: null, list: [],
total: null, total: null,
listLoading: true, listLoading: true,
listQuery: { listQuery: {
...@@ -2541,7 +2541,11 @@ export default { ...@@ -2541,7 +2541,11 @@ export default {
checkIfRuning: vehicle => checkIfRuning: vehicle =>
vehicle.status === VEHICLE_CONSTANT_STATUS_NORMAL, vehicle.status === VEHICLE_CONSTANT_STATUS_NORMAL,
getVehicleStatus: function(code) { 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() { getAllVehicleStatus: function() {
return { return {
...@@ -2603,6 +2607,7 @@ export default { ...@@ -2603,6 +2607,7 @@ export default {
return getConstantListByType(VEHICLE_CONSTANT_VEHICLE_USE) return getConstantListByType(VEHICLE_CONSTANT_VEHICLE_USE)
}, },
getList() { getList() {
this.listQuery.vin = null
this.listLoading = true this.listLoading = true
let listQueryTemp = this.fillDateRange2Object( let listQueryTemp = this.fillDateRange2Object(
this.listQuery, this.listQuery,
...@@ -2631,23 +2636,27 @@ export default { ...@@ -2631,23 +2636,27 @@ export default {
if (!this.listQuery.belongToName) { if (!this.listQuery.belongToName) {
this.listQuery.belongToName = undefined this.listQuery.belongToName = undefined
} }
page(listQueryTemp).then(response => { page(listQueryTemp).then(response => {
if (response.code == 1) { if (response.code == 1) {
let totalCountRs = undefined let totalCountRs = undefined
let listRs = undefined let listRs = undefined
if ( // if (
!this.$utils.isEmpty(response.data.data) && // !this.$utils.isEmpty(response.data.data) &&
this.$utils.isInteger(response.data.totalCount) // this.$utils.isInteger(response.data.totalCount)
) { // ) {
listRs = response.data.data // listRs = response.data.data
totalCountRs = response.data.totalCount // totalCountRs = response.data.totalCount
listRs.map(function(item) { // listRs.map(function(item) {
item.visible2 = false // item.visible2 = false
}) // })
} // }
this.listLoading = false this.listLoading = false
this.list = listRs console.log(response.data.data);
this.total = totalCountRs
this.list = response.data.data
this.total = response.data.totalCount
} else { } else {
this.list = [] this.list = []
this.listLoading = false 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