更新历史轨迹列表数据
parent
33f274146c
commit
a8b9c1fcf1
|
@ -44,3 +44,17 @@ export function insertCar(carInsert) {
|
|||
})
|
||||
}
|
||||
|
||||
export function getList() {
|
||||
return request({
|
||||
url: '/history/listHistoricalTrack',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRecord(recordId) {
|
||||
return request({
|
||||
url: '/history/delHistoricalTrack?recordId='+recordId,
|
||||
method: 'post',
|
||||
data:recordId
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script >
|
||||
import path from "path";
|
||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||
import {deleteRecord, getList} from "@/api/table";
|
||||
export default {
|
||||
components: {},
|
||||
props: {},
|
||||
|
@ -11,23 +12,7 @@ export default {
|
|||
AMap: null,
|
||||
map: null,
|
||||
mouseTool: null,
|
||||
historyList:[
|
||||
{
|
||||
carVin:"VIN123465798",
|
||||
startTime:"2023-01-01 12:01:59",
|
||||
endTime:"2023-01-01 12:10:21"
|
||||
},
|
||||
{
|
||||
carVin:"VIN66666666",
|
||||
startTime:"2022-01-01 12:01:59",
|
||||
endTime:"2022-01-01 12:10:21"
|
||||
},
|
||||
{
|
||||
carVin:"VIN88888888",
|
||||
startTime:"2021-01-01 12:01:59",
|
||||
endTime:"2021-01-01 12:10:21"
|
||||
}
|
||||
],
|
||||
historyList:[],
|
||||
lineArr: [
|
||||
[116.478935,39.997761],
|
||||
[116.478939,39.997825],
|
||||
|
@ -55,6 +40,17 @@ export default {
|
|||
created() {
|
||||
},
|
||||
methods: {
|
||||
deleteRecord(recordId){
|
||||
deleteRecord(recordId).then(res=>{
|
||||
location.reload()
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
getList().then(res=>{
|
||||
console.log(res)
|
||||
this.historyList = res.data
|
||||
})
|
||||
},
|
||||
doDo(){
|
||||
// this.$router.push('/cmpany/firm')
|
||||
this.initMap()
|
||||
|
@ -160,22 +156,13 @@ export default {
|
|||
</tr>
|
||||
</table>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-hasPermi="['vehicle:record:add']"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
v-hasPermi="['vehicle:record:remove']"
|
||||
>删除</el-button>
|
||||
<el-table :data="historyList">
|
||||
<el-table-column label="历史轨迹ID">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.recordId}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="VIN">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.carVin}}
|
||||
|
@ -187,13 +174,13 @@ export default {
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.endTime}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="doDo" type="text">历史轨迹</el-button>
|
||||
<el-button type="warning">删除</el-button>
|
||||
<el-button type="info" @click="deleteRecord(scope.row.recordId)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue