更新历史轨迹列表数据
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 >
|
<script >
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
|
import {deleteRecord, getList} from "@/api/table";
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
|
@ -11,23 +12,7 @@ export default {
|
||||||
AMap: null,
|
AMap: null,
|
||||||
map: null,
|
map: null,
|
||||||
mouseTool: null,
|
mouseTool: null,
|
||||||
historyList:[
|
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"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
lineArr: [
|
lineArr: [
|
||||||
[116.478935,39.997761],
|
[116.478935,39.997761],
|
||||||
[116.478939,39.997825],
|
[116.478939,39.997825],
|
||||||
|
@ -55,6 +40,17 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deleteRecord(recordId){
|
||||||
|
deleteRecord(recordId).then(res=>{
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList(){
|
||||||
|
getList().then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
this.historyList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
doDo(){
|
doDo(){
|
||||||
// this.$router.push('/cmpany/firm')
|
// this.$router.push('/cmpany/firm')
|
||||||
this.initMap()
|
this.initMap()
|
||||||
|
@ -160,22 +156,13 @@ export default {
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</el-form>
|
</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 :data="historyList">
|
||||||
|
<el-table-column label="历史轨迹ID">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.recordId}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="VIN">
|
<el-table-column label="VIN">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.carVin}}
|
{{scope.row.carVin}}
|
||||||
|
@ -187,13 +174,13 @@ export default {
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="结束时间">
|
<el-table-column label="结束时间">
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.endTime}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<el-button @click="doDo" type="text">历史轨迹</el-button>
|
<template slot-scope="scope">
|
||||||
<el-button type="warning">删除</el-button>
|
<el-button @click="doDo" type="text">历史轨迹</el-button>
|
||||||
|
<el-button type="info" @click="deleteRecord(scope.row.recordId)">删除</el-button>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue