上线车辆

server_ui_dongxiaodong
ffr 2024-04-05 09:51:54 +08:00
parent 4847aee9ab
commit 5711e52290
2 changed files with 173 additions and 0 deletions

View File

@ -0,0 +1,8 @@
import request from "@/utils/request";
export function detectionList() {
return request({
url: '/business/detection/detectionList',
method: 'post',
})
}

View File

@ -0,0 +1,165 @@
<template>
<div>
<h1>车辆监控页面</h1>
<!-- 列表-->
<el-table :data="vehicleList" style="width: 100%" border>
<el-table-column label="车辆id" width="90" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.vehicleId }}</span>
</template>
</el-table-column>
<el-table-column label="车辆类型" width="90" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.vehicleTypeName }}</span>
</template>
</el-table-column>
<el-table-column label="电机厂商" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.motorManufacturer }}</span>
</template>
</el-table-column>
<el-table-column label="电池厂商" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.batteryManufacturer }}</span>
</template>
</el-table-column>
<el-table-column label="电机编号" width="180" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.motorNumber }}</span>
</template>
</el-table-column>
<el-table-column label="电池编号" width="180" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.batteryNumber }}</span>
</template>
</el-table-column>
<el-table-column label="vin码" width="180" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.vin }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="vin码" width="180" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <span style="margin-left: 10px">{{ scope.row.vin }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="车辆状态" width="120" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="1==scope.row.vehicleState">
<el-tag type="success">在线</el-tag>
</span>
<span style="margin-left: 10px" v-if="0==scope.row.vehicleState">
<el-tag type="danger">离线</el-tag>
</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="findByVehicle(scope.row.vin)"></el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {getVehicleTypes} from "@/api/couplet/vehicle";
import {detectionList} from "@/api/couplet/VehicleDetection";
export default {
//import使"
components: {},
props: {},
data() {
//"
return {
//
vehicleList: [],
//
total: 0,
//
vehicleTypes: [],
//
formLabelWidth: '120px',
dialogEdit: false,
dialogInsert: false,
//
title: ""
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
//
getVehicleList() {
detectionList().then(
res => {
this.vehicleList = res.data;
}
)
},
//
handleSizeChange(val) {
this.vehicleListParams.pageSize = val;
this.getVehicleList();
},
handleCurrentChange(val) {
this.vehicleListParams.pageNum = val;
this.getVehicleList();
},
//
getVehicleTypes() {
getVehicleTypes().then(
res => {
this.vehicleTypes = res.data;
}
)
},
findByVehicle(vin){
}
},
// - 访this",
created() {
//
this.getVehicleList ()
//
this.getVehicleTypes()
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>