管理车辆信息管理前台列表

master
shaowenhao 2023-11-25 19:41:41 +08:00
parent 4c5d5c713b
commit 6a106e73f0
1 changed files with 70 additions and 64 deletions

View File

@ -1,80 +1,81 @@
<template>
<el-table :data="tableData" style="width: 100%">
<div>
<el-form ref="from" :model="from" status-icon class="demo-ruleForm">
<el-form-item label="车辆VIN" prop="pass">
<el-input v-model="from.carVinId" type="text" autocomplete="off" />
</el-form-item>
<el-table-column label="车辆VIN" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-form-item label="车辆类型" prop="pass">
<el-input v-model="from.carTypeId" type="text" autocomplete="off" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')"></el-button>
<el-button @click="resetForm('ruleForm')"></el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" style="width: 100%">
<el-table-column label="车辆VIN" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.carVinId }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="车辆VIN" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="车辆类型" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.carTypeId }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="车辆类型" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="电子围栏ID" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.fenceId }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="车辆状态" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="车辆状态" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.status }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="电子围栏" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="电池厂商" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.batteryManufacturer }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="电池厂商" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="电机厂商" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.motorManufacturer }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="电机厂商" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="电机编号" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.motorNumber }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="电机编号" width="180">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<el-table-column label="电池编号" width="180">
<template slot-scope="scope">
<el-tag size="medium">{{ scope.row.batteryNumber }}</el-tag>
</el-popover>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" @click="handleShi(scope.$index , scope.row)">实时轨迹</el-button>
<!-- 修改车辆信息-->
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">修改</el-button>
<!-- 删除车辆信息-->
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" @click="handleShi(scope.$index , scope.row)">实时轨迹</el-button>
<!-- 修改车辆信息-->
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">修改</el-button>
<!-- 删除车辆信息-->
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
@ -97,7 +98,10 @@ export default {
return {
list: null,
listLoading: true,
from: {},
from: {
carVinId: null,
carTypeId: null
},
tableData: []
}
},
@ -108,11 +112,8 @@ export default {
fetchData: function() {
this.listLoading = true
carList().then(response => {
this.tableData = response.data
alert(11111)
this.tableData = response.data.data
console.log(2222222222222222)
console.log(response.data)
console.log(this.tableData)
this.listLoading = false
})
},
@ -125,3 +126,8 @@ export default {
}
}
</script>
<style>
.el-input{
width: 200px;
}
</style>