修改车辆监测

master
夜笙歌 2 years ago
parent bf46ea7b20
commit 9822f810f7

@ -1,6 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询轮胎基础信息列表 // 查询列表
export function listBasetyre(query) { export function listBasetyre(query) {
return request({ return request({
url: '/basetyre/tyre/list', url: '/basetyre/tyre/list',
@ -9,7 +9,7 @@ export function listBasetyre(query) {
}) })
} }
// 查询轮胎基础信息详细 // 查询基础信息详细
export function getBasetyre(id) { export function getBasetyre(id) {
return request({ return request({
url: '/basetyre/basetyre/' + id, url: '/basetyre/basetyre/' + id,
@ -17,7 +17,7 @@ export function getBasetyre(id) {
}) })
} }
// 新增轮胎基础信息 // 新增信息
export function addBasetyre(data) { export function addBasetyre(data) {
return request({ return request({
url: '/basetyre/basetyre', url: '/basetyre/basetyre',
@ -26,7 +26,7 @@ export function addBasetyre(data) {
}) })
} }
// 修改轮胎基础信息 // 修改信息
export function updateBasetyre(data) { export function updateBasetyre(data) {
return request({ return request({
url: '/basetyre/basetyre', url: '/basetyre/basetyre',

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 查询轮胎基础信息列表
export function getCarGpsList(query) {
return request({
url: '/basecar/car/getCarGpsList',
method: 'post',
params: query
})
}
export function listBasetyre(query) {
return request({
url: '/carqueue/carqueue/carQueuelist',
method: 'get',
params: query
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 324 KiB

@ -1,6 +1,6 @@
export default { export default {
login: { login: {
title: '轮胎智能云平台后台管理系统', title: '账 号 登 录',
logIn: '登 录', logIn: '登 录',
username: '账号', username: '账号',
password: '密码', password: '密码',

@ -8,6 +8,7 @@
type="text" type="text"
size="large" size="large"
auto-complete="off" auto-complete="off"
style="color: #fff;"
:placeholder="t('login.username')" :placeholder="t('login.username')"
> >
<template #prefix> <template #prefix>
@ -90,10 +91,6 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
</div>
</div> </div>
</template> </template>
@ -200,19 +197,23 @@ getCookie();
align-items: center; align-items: center;
height: 100%; height: 100%;
background-image: url("../assets/images/login-background.jpg"); background-image: url("../assets/images/login-background.jpg");
background-size: cover; background-size: 100% 100%;
} }
.title { .title {
margin: 0px auto 30px auto; margin: 0px auto 30px auto;
text-align: center; text-align: center;
color: #707070; color: #cfcecf;
} }
.login-form { .login-form {
position: absolute;
transform: translateY(-50%);
top: 50%;
right: 10%;
border-radius: 6px; border-radius: 6px;
background: #ffffff; background: #16191e;
width: 400px; width: 18vw;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
.el-input { .el-input {

@ -11,10 +11,10 @@
</el-card> </el-card>
<h2>实时位置</h2> <h2>实时位置</h2>
<div id="container"></div> <div id="container"></div>
<div style="width: 25%;text-align: center;margin-top: 14px"> <!-- <div style="width: 25%;text-align: center;margin-top: 14px">-->
<img height="70" src="@/assets/images/tyre.png" style="" width="70"/> <!-- <img height="70" src="@/assets/images/tyre.png" style="" width="70"/>-->
<div style="width: 100%;font-size: 12px;white-space:nowrap">轮胎详情</div> <!-- <div style="width: 100%;font-size: 12px;white-space:nowrap">轮胎详情</div>-->
</div> <!-- </div>-->
</el-col> </el-col>
<el-col :offset="1" :span="11"> <el-col :offset="1" :span="11">
<div style="width: 100%;text-align: center"> <div style="width: 100%;text-align: center">
@ -42,6 +42,7 @@
<el-tabs <el-tabs
v-model="tabsName" v-model="tabsName"
type="card" type="card"
style="margin:24px 0 0 0"
@tab-click="resetQuery" @tab-click="resetQuery"
> >
<el-tab-pane label="有车载设备车辆" name="有车载设备车辆"> <el-tab-pane label="有车载设备车辆" name="有车载设备车辆">
@ -182,6 +183,7 @@ const resetQuery = () => {
params2: '', params2: '',
} }
handleQuery(); handleQuery();
tableRef1.value.setCurrentRow()
} }
let map = null let map = null
let polyline = null let polyline = null

@ -7,18 +7,19 @@
<script setup> <script setup>
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import {getCarGpsList, listBasetyre} from '@/api/realTimeMonitoring/vehicleMonitoring'
const treeData = [ const treeData = ref([
{ {
label: 'Level one 1', title: 'Level one 1',
id: 1, id: 1,
children: [ baseCarList: [
{ {
label: 'Level two 1-1', title: 'Level two 1-1',
id: 11, id: 11,
children: [ baseCarList: [
{ {
label: 'Level three 1-1-1', title: 'Level three 1-1-1',
id: 111, id: 111,
}, },
], ],
@ -26,52 +27,49 @@ const treeData = [
], ],
}, },
{ {
label: 'Level one 2', title: 'Level one 2',
children: [ baseCarList: [
{ {
label: 'Level two 2-1', title: 'Level two 2-1',
children: [ baseCarList: [
{ {
label: 'Level three 2-1-1', title: 'Level three 2-1-1',
}, },
], ],
}, },
{ {
label: 'Level two 2-2', title: 'Level two 2-2',
children: [ baseCarList: [
{ {
label: 'Level three 2-2-1', title: 'Level three 2-2-1',
}, },
], ],
}, },
], ],
}, },
{ {
label: 'Level one 3', title: 'Level one 3',
children: [ baseCarList: [
{ {
label: 'Level two 3-1', title: 'Level two 3-1',
children: [ baseCarList: [
{ {
label: 'Level three 3-1-1', title: 'Level three 3-1-1',
}, },
], ],
}, },
{ {
label: 'Level two 3-2', title: 'Level two 3-2',
children: [ baseCarList: [
{ {
label: 'Level three 3-2-1', title: 'Level three 3-2-1',
}, },
], ],
}, },
], ],
}, },
] ])
const treeDefaultProps = { const treeDefaultProps = {label: 'title', children: 'baseCarList'}
children: 'children',
label: 'label',
}
const treeClick = (data) => { const treeClick = (data) => {
console.log(data) console.log(data)
} }
@ -109,18 +107,19 @@ const mockRequest = () => {
} }
const setMarker = async () => { const setMarker = async () => {
const markerArr = await mockRequest() const {data: markerArr} = await getCarGpsList()
console.log(markerArr)
markerArr.forEach(e => { markerArr.forEach(e => {
// //
let marker = new AMap.Marker({ let marker = new AMap.Marker({
content: '<div class="markerIcon" />', content: '<div class="markerIcon" />',
position: e.location, position: [e.longitude, e.latitude],
anchor: 'bottom-center', anchor: 'bottom-center',
offset: new AMap.Pixel(0, 0), offset: new AMap.Pixel(0, 0),
label: { label: {
direction: 'top', direction: 'top',
content: `<div class='info'>${e.title} - ${e.one}</div><div class='info'>${e.two} ${e.three}</div><div class='info'>${e.four}</div>`, // content: `<div class='info'>${e.carLicense || ''} - ${e.state === 0? '在线':'离线'}</div><div class='info'>${e.two || ''} ${e.three || ''}</div><div class='info'>${e.four || ''}</div>`, //
} }
}); });
@ -188,6 +187,13 @@ AMapLoader.load({
console.log(e); console.log(e);
}) })
listBasetyre().then(e => {
let res = JSON.stringify(e.rows)
let newObj = JSON.parse(res.replace(/"carLicense":/g,'"title":'))
treeData.value = newObj
console.log(newObj)
})
</script> </script>
<style> <style>
.tree { .tree {
@ -211,6 +217,7 @@ AMapLoader.load({
background-size: 100% 100%; background-size: 100% 100%;
background-image: url("../../../assets/images/trucks.png"); background-image: url("../../../assets/images/trucks.png");
} }
.amap-marker-label { .amap-marker-label {
top: 0 !important; top: 0 !important;
left: 0 !important; left: 0 !important;

Loading…
Cancel
Save