Merge remote-tracking branch 'origin/master'

master
Yangwl 2 years ago
commit a206a5c04b

@ -8,6 +8,7 @@ export function listBaseCar(query) {
params: query
})
}
// 查询列表
export function getCarGpsList(query) {
return request({
@ -17,3 +18,12 @@ export function getCarGpsList(query) {
})
}
// 查询轮胎信息
export function getTyreList(query) {
return request({
url: '/basetyre/tyre/' + query,
method: 'get',
isNoLang: true,
})
}

@ -0,0 +1,45 @@
import request from '@/utils/request'
// 查询轮胎基础信息列表
export function listTest(query) {
return request({
url: '/basetyre/CollectMachineGps/list',
method: 'get',
params: query
})
}
// 查询轮胎基础信息详细
export function getTest(id) {
return request({
url: '/test/test/' + id,
method: 'get'
})
}
// 新增轮胎基础信息
export function addTest(data) {
return request({
url: '/test/test',
method: 'post',
data: data
})
}
// 修改轮胎基础信息
export function updateTest(data) {
return request({
url: '/test/test',
method: 'put',
data: data
})
}
// 删除轮胎基础信息
export function delTest(id) {
return request({
url: '/test/test/' + id,
method: 'delete'
})
}

@ -0,0 +1,45 @@
import request from '@/utils/request'
// 查询轮胎基础信息列表
export function listTest(query) {
return request({
url: '/basetyre/CollectMachineGps/list',
method: 'get',
params: query
})
}
// 查询轮胎基础信息详细
export function getTest(id) {
return request({
url: '/test/test/' + id,
method: 'get'
})
}
// 新增轮胎基础信息
export function addTest(data) {
return request({
url: '/test/test',
method: 'post',
data: data
})
}
// 修改轮胎基础信息
export function updateTest(data) {
return request({
url: '/test/test',
method: 'put',
data: data
})
}
// 删除轮胎基础信息
export function delTest(id) {
return request({
url: '/test/test/' + id,
method: 'delete'
})
}

@ -45,10 +45,10 @@ service.interceptors.request.use(config => {
...(config.params || {}),
lang
});
url = url.slice(0, -1);
} else {
url = config.url
}
url = url.slice(0, -1);
config.params = {};
config.url = url;
}

@ -3,9 +3,9 @@
<!-- 搜索栏-->
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'"
:model="queryParams">
<el-form-item label="车牌号" prop="internationalization1">
<el-form-item label="车牌号" prop="carLicense">
<el-input
v-model="queryParams.internationalization1"
v-model="queryParams.carLicense"
:placeholder=" t('common.pleaseEnter') + '车牌号'"
clearable
style="width: 200px"
@ -86,49 +86,48 @@
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column label="序号" align="center" prop="internationalization1"
width="150"/>
<el-table-column label="序号" align="center" type="index" width="50" />
<el-table-column label="GPS时间" align="center" prop="internationalization2"
width="150"/>
<el-table-column label="收发器ID" align="center" prop="internationalization3"
<el-table-column label="收发器ID" align="center" prop="machineId"
width="150"/>
<el-table-column label="车牌号" align="center" prop="internationalization4"
<el-table-column label="车牌号" align="center" prop="carLicense"
width="150"/>
<el-table-column label="纬度" align="center" prop="internationalization5"
<el-table-column label="纬度" align="center" prop="latitude"
width="150"/>
<el-table-column label="经度" align="center" prop="internationalization6"
<el-table-column label="经度" align="center" prop="longitude"
width="150"/>
<el-table-column label="GPS里程" align="center" prop="internationalization7"
<el-table-column label="GPS里程" align="center" prop="gpsMileage"
width="150"/>
<el-table-column label="海拔" align="center" prop="internationalization8"
<el-table-column label="海拔" align="center" prop="altitude"
width="150"/>
<el-table-column label="速度" align="center" prop="internationalization9"
<el-table-column label="速度" align="center" prop="speed"
width="150"/>
<el-table-column label="方向" align="center" prop="internationalization10"
<el-table-column label="方向" align="center" prop="course"
width="150"/>
<el-table-column label="是否外接电源" align="center" prop="internationalization11"
<el-table-column label="是否外接电源" align="center" prop="isOutPower"
width="150"/>
<el-table-column label="设备上传电池电压" align="center" prop="internationalization12"
<el-table-column label="设备上传电池电压" align="center" prop="carPower"
width="150"/>
<el-table-column label="胎压设备是否正常工作" align="center" prop="internationalization13"
<el-table-column label="胎压设备是否正常工作" align="center" prop="isSensorRun"
width="170"/>
<el-table-column label="紧急报警" align="center" prop="internationalization14"
<el-table-column label="紧急报警" align="center" prop="emergencyAlarm"
width="150"/>
<el-table-column label="超速预警" align="center" prop="internationalization15"
<el-table-column label="超速预警" align="center" prop="speedAlarm"
width="150"/>
<el-table-column label="疲劳驾驶" align="center" prop="internationalization16"
<el-table-column label="疲劳驾驶" align="center" prop="fatigueDrivingAlarm"
width="150"/>
<el-table-column label="危险预警" align="center" prop="internationalization17"
<el-table-column label="危险预警" align="center" prop="riskEarlyAlarm"
width="150"/>
<el-table-column label="gnss模块" align="center" prop="internationalization18"
<el-table-column label="gnss模块" align="center" prop="gnssModule"
width="150"/>
<el-table-column label="天线缺失" align="center" prop="internationalization19"
<el-table-column label="天线缺失" align="center" prop="gnssLossAntenna"
width="150"/>
<el-table-column label="天线短路" align="center" prop="internationalization20"
<el-table-column label="天线短路" align="center" prop="gnssAntennaShortcircuit"
width="150"/>
<el-table-column label="终端主电源欠压" align="center" prop="internationalization20"
<el-table-column label="终端主电源欠压" align="center" prop="mainPowerLake"
width="150"/>
<el-table-column label="终端主电源掉电" align="center" prop="internationalization20"
<el-table-column label="终端主电源掉电" align="center" prop="mainpowerloss"
width="150"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
@ -344,6 +343,7 @@ const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
//
const postList = ref([]);
//
@ -367,43 +367,13 @@ const title = ref("");
const queryParams = ref({
pageNum: 1,
pageSize: 10,
internationalization1: undefined,
carLicense: undefined,
internationalization2: undefined,
internationalization3: undefined,
internationalization4: undefined,
internationalization5: undefined,
internationalization6: undefined,
internationalization7: undefined,
internationalization8: undefined,
internationalization9: undefined,
internationalization10: undefined,
internationalization11: undefined,
internationalization12: undefined,
internationalization13: undefined,
internationalization14: undefined,
internationalization15: undefined,
internationalization16: undefined,
internationalization17: undefined,
internationalization18: undefined,
internationalization19: undefined,
internationalization20: undefined,
isDelete: undefined,
createTime: undefined,
createId: undefined,
createBy: undefined,
createName: undefined,
modifyTime: undefined,
modifyId: undefined,
modifyBy: undefined,
modifyName: undefined,
})
//
const rules = {
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
}
//

@ -1,190 +1,190 @@
<template>
<div :class="className" :style="{height:height,width:width}" id="myChart"/>
<div id="myChart" :class="className" :style="{height:height,width:width}"/>
</template>
<script>
import { defineComponent, toRefs, reactive, onMounted } from 'vue'
import * as echarts from 'echarts'
import resize from './mixins/resize'
import {defineComponent, toRefs, reactive, onMounted} from 'vue'
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default defineComponent({
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
export default defineComponent({
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '500px'
},
autoResize: {
type: Boolean,
default: true
},
chartData: {
type: Object,
required: true
}
},
name: 'Histogram',
setup() {
const state = reactive({
option: {
title: {
text: '胎温胎压速度变化'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['速度(千米)', '温度(℃)', '压力(Kpa)']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
show: true,
textStyle: {
color: '#000'
},
width: {
type: String,
default: '100%'
interval: 0, //X
rotate: -40 //
},
data: ['2023-03-15 08:31', '2023-03-15 08:32', '2023-03-15 08:33', '2023-03-15 08:34', '2023-03-15 08:35', '2023-03-15 08:36', '2023-03-15 08:37', '2023-03-15 08:38', '2023-03-15 08:39']
},
yAxis: [
{
type: 'value',
name: '速度',
axisLine: {
show: true,
lineStyle: {
color: 'blue',
},
},
height: {
type: String,
default: '500px'
axisLabel: {
textStyle: {
color: 'blue',
},
}
},
{
type: 'value',
name: '温度',
position: 'left',
axisLine: {
show: true,
lineStyle: {
color: 'red',
},
},
autoResize: {
type: Boolean,
default: true
axisLabel: {
textStyle: {
color: 'red',
},
},
chartData: {
type: Object,
required: true
}
},
name: 'Histogram',
setup() {
const state = reactive({
option: {
title: {
text: '胎温胎压速度变化'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['速度(千米)', '温度(℃)', '压力(Kpa)' ]
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
show: true,
textStyle: {
color: '#000'
},
interval: 0, //X
rotate: -40 //
},
data: ['2023-03-15 08:31', '2023-03-15 08:32', '2023-03-15 08:33', '2023-03-15 08:34', '2023-03-15 08:35', '2023-03-15 08:36', '2023-03-15 08:37', '2023-03-15 08:38','2023-03-15 08:39']
},
yAxis: [
{
type: 'value',
name: '速度',
axisLine: {
show: true,
lineStyle: {
color: 'blue',
},
},
axisLabel: {
textStyle: {
color: 'blue',
},
}
},
{
type: 'value',
name: '温度',
position: 'left',
axisLine: {
show: true,
lineStyle: {
color: 'red',
},
},
axisLabel: {
textStyle: {
color: 'red',
},
},
offset: 30,
},
{
type: 'value',
name: '压力',
position: 'left',
axisLine: {
show: true,
lineStyle: {
color: 'green',
},
},
axisLabel: {
textStyle: {
color: 'green',
},
},
offset: 60,
}
],
offset: 30,
},
series: [
{
name: '速度(千米)',
type: 'line',
data: [0,0,0,18,21,36,44,45,58,66],
symbol: "none",
// symbolSize: 10,
yAxisIndex: 0,
itemStyle: {
normal: {
color: 'blue',
lineStyle: {
color: 'blue' //线
}
}
},
},
{
name: '温度(℃)',
type: 'line',
data: [20,20,20,25,32,40,46,53,70,87],
yAxisIndex: 1,//y
symbol: "none",
itemStyle: {
normal: {
color: 'red',
lineStyle: {
color: 'red' //线
}
}
},
},
{
name: '压力(Kpa)',
type: 'line',
data: [600,600,600,615,616,617,620,622,622,622],
yAxisIndex: 2,//y
symbol: "none",
itemStyle: {
normal: {
color: 'green',
lineStyle: {
color: 'green' //线
}
}
},
},
]
},
})
const initeCharts = () => {
let myChart = echarts.init(document.getElementById('myChart'))
//
myChart.setOption(state.option)
}
{
type: 'value',
name: '压力',
position: 'left',
axisLine: {
show: true,
lineStyle: {
color: 'green',
},
},
axisLabel: {
textStyle: {
color: 'green',
},
},
offset: 60,
}
],
onMounted(() => {
initeCharts()
})
series: [
{
name: '速度(千米)',
type: 'line',
data: [0, 0, 0, 18, 21, 36, 44, 45, 58, 66],
symbol: "none",
// symbolSize: 10,
yAxisIndex: 0,
itemStyle: {
normal: {
color: 'blue',
lineStyle: {
color: 'blue' //线
}
}
},
},
{
name: '温度(℃)',
type: 'line',
data: [20, 20, 20, 25, 32, 40, 46, 53, 70, 87],
yAxisIndex: 1,//y
symbol: "none",
itemStyle: {
normal: {
color: 'red',
lineStyle: {
color: 'red' //线
}
}
},
},
{
name: '压力(Kpa)',
type: 'line',
data: [600, 600, 600, 615, 616, 617, 620, 622, 622, 622],
yAxisIndex: 2,//y
symbol: "none",
itemStyle: {
normal: {
color: 'green',
lineStyle: {
color: 'green' //线
}
}
},
},
]
},
})
const initeCharts = () => {
let myChart = echarts.init(document.getElementById('myChart'))
//
myChart.setOption(state.option)
}
return {
...toRefs(state),
}
},
onMounted(() => {
initeCharts()
})
return {
...toRefs(state),
}
},
})
</script>

@ -119,7 +119,11 @@
<el-table-column :label="t('baseDevice.baseDevice.internetThingsNo')" align="center" prop="internetThingsNo"
width="150"/>
<el-table-column :label="t('baseDevice.baseDevice.deviceType')" align="center" prop="deviceType"
/>
>
<template #default="scope">
{{ scope.row.state === 0? 'GPS接收机' : '胎压传感器' }}
</template>
</el-table-column>
<el-table-column :label="t('baseDevice.baseDevice.state')" align="center" prop="state"
>
<template #default="scope">
@ -135,25 +139,6 @@
width="150"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="160"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createBy"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<template #default="scope">
<el-button
v-hasPermi="['basedevice:basedevice:edit']"
icon="Edit"
type="text"
@click="handleUpdate(scope.row)"
>{{ t('option.edit') }}
</el-button>
<el-button
v-hasPermi="['basedevice:basedevice:remove']"
icon="Delete"
type="text"
@click="handleDelete(scope.row)"
>{{ t('option.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页-->
@ -213,11 +198,11 @@ const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const options = [
{
value: 'Option1',
value: '0',
label: 'GPS接收机',
},
{
value: 'Option2',
value: '1',
label: '胎压传感器',
},
]

@ -36,36 +36,69 @@
</div>
<div v-for="(item,index) in TireRow" key="index" style="margin-bottom: 18px">
<div
style="vertical-align:top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%">
<div style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top" v-if="tyreDataList.includes(`${index+1}-1-1`)">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹深度:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-1-1`))[0].currentTextureDepth}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">轮胎编号:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-1-1`))[0].outerTireNumber}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-1-1`))[0].pattern}}</div>
style="vertical-align:top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%"
@click="getTyreInfo(`${index+1}-1-1`)">
<div v-if="tyreDataList.includes(`${index+1}-1-1`)"
style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹深度:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].currentTextureDepth }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
轮胎编号:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].outerTireNumber }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].pattern }}
</div>
</div>
</div>
<div :style="'width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid'+ (TireRow[index] === 2 ? '#666;' :'rgba(0,0,0,0);') + 'border-radius: 10%'">
<div style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top" v-if="tyreDataList.includes(`${index+1}-1-2`)">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹深度:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-1-2`))[0].currentTextureDepth}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">轮胎编号:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-1-2`))[0].outerTireNumber}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-1-2`))[0].pattern}}</div>
<div
:style="'vertical-align: top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid'+ (TireRow[index] === 2 ? '#666;' :'rgba(0,0,0,0);') + 'border-radius: 10%'"
@click="getTyreInfo(`${index+1}-1-2`)">
<div v-if="tyreDataList.includes(`${index+1}-1-2`)"
style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align: top">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹深度:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].currentTextureDepth }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
轮胎编号:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].outerTireNumber }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].pattern }}
</div>
</div>
</div>
<img sizes="100% 100%" src="@/assets/images/zhou.png"
style="width: calc(50% - 108px);height: 100px;display: inline-block;vertical-align:top"/>
<div
:style="'width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid '+ (TireRow[index] === 2 ? '#666' :'rgba(0,0,0,0)') +';border-radius: 10%'">
<div style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top" v-if="tyreDataList.includes(`${index+1}-2-2`)">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹深度:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-2-2`))[0].currentTextureDepth}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">轮胎编号:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-2-2`))[0].outerTireNumber}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-2-2`))[0].pattern}}</div>
:style="'vertical-align: top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid '+ (TireRow[index] === 2 ? '#666' :'rgba(0,0,0,0)') +';border-radius: 10%'"
@click="getTyreInfo(`${index+1}-2-2`)">
<div v-if="tyreDataList.includes(`${index+1}-2-2`)"
style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹深度:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].currentTextureDepth }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
轮胎编号:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].outerTireNumber }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].pattern }}
</div>
</div>
</div>
<div
style="width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%">
<div style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top" v-if="tyreDataList.includes(`${index+1}-2-1`)">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹深度:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-2-1`))[0].currentTextureDepth}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">轮胎编号:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-2-1`))[0].outerTireNumber}}</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">花纹:{{tyreList.filter(e=>e.tyrePositionS === (`${index+1}-2-1`))[0].pattern}}</div>
style="vertical-align: top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%"
@click="getTyreInfo(`${index+1}-2-1`)">
<div v-if="tyreDataList.includes(`${index+1}-2-1`)"
style="border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top">
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹深度:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].currentTextureDepth }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
轮胎编号:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].outerTireNumber }}
</div>
<div style="white-space:nowrap;width: 100%;color:#fff;font-size: 0.7vw;line-height: 33px">
花纹:{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].pattern }}
</div>
</div>
</div>
</div>
@ -120,18 +153,44 @@
</el-col>
</el-row>
<el-dialog v-model="open" :title="title" append-to-body width="800px">
<el-form :inline="true" ref="postRef" :label-width=" locale ? '90px':'140px'" :model="tyreInfo" :rules="rules">
<el-form-item v-if="false" prop="id">
<el-input v-model="tyreInfo.id"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization1')" prop="internationalization1">
<el-input
v-model="tyreInfo.internationalization1"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization1')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization2')" prop="internationalization2">
<el-input
v-model="tyreInfo.internationalization2"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization2')"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ t('option.ok') }}</el-button>
<el-button @click="cancel">{{ t('option.cancel') }}</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import {listBaseCar, getCarGpsList} from '@/api/realTimeMonitoring/carMonitoring'
import {listBaseCar, getCarGpsList, getTyreList} from '@/api/realTimeMonitoring/carMonitoring'
import AMapLoader from '@amap/amap-jsapi-loader';
import {useI18n} from "vue-i18n";
import {ref} from 'vue'
import {useRouter} from 'vue-router';
import {parseTime} from "@/utils/ruoyi";
import {onBeforeUnmount} from "@vue/runtime-core";
import {addBaseDevice, updateBaseDevice} from "@/api/deviceManagement/info";
const title = '轮胎信息'
const {proxy} = getCurrentInstance();
const $router = useRouter();
const {t} = useI18n();
@ -140,8 +199,20 @@ const tyreList = ref([])
const tyreDataList = ref([])
const pageId = ref('')
const tableRef1 = ref()
const open = ref(false)
let map = null
const markers = ref(null)
const tyreInfo = ref({})
const getTyreInfo = (e) => {
let id = tyreList.value.filter(val => val.tyrePositionS === e)?.[0]?.tyreId || ''
console.log(id)
if (!id) return
open.value = true
getTyreList(id).then(e => {
console.log(e)
})
}
AMapLoader.load({
key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load
@ -205,14 +276,14 @@ const tableChange = async (e) => {
title.push(parseInt(res.split('-')[1]))
})
TireRow.value = title
let tyreListData = info[0].tyreList.map(e=>{
let tyreListData = info[0].tyreList.map(e => {
return {
...e,
tyrePositionS : e.tyrePosition?.split('-')[0] + '-' + e.tyrePosition?.split('-')[1] + '-' + e.tyrePosition?.split('-')[2]
tyrePositionS: e.tyrePosition?.split('-')[0] + '-' + e.tyrePosition?.split('-')[1] + '-' + e.tyrePosition?.split('-')[2]
}
})
tyreList.value = tyreListData
tyreDataList.value = tyreListData.map(e=>e.tyrePositionS)
tyreDataList.value = tyreListData.map(e => e.tyrePositionS)
console.log(tyreList.value)
let timeOut = () => {
setTimeout(() => {
@ -239,6 +310,45 @@ const queryParams = ref({
const tableData = ref([])
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
tyreInfo.value = {
id: null,
internetThingsNo: null,
deviceType: null,
state: null,
};
proxy.resetForm("postRef");
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (tyreInfo.value.id != undefined) {
// updateBaseDevice(tyreInfo.value).then(response => {
// proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
// getList();
// });
} else {
// addBaseDevice(tyreInfo.value).then(response => {
// proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false;
// getList();
// });
}
}
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;

@ -0,0 +1,128 @@
<template>
<div>
<el-form ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'" :model="queryParams"
style="margin-top: 24px">
<el-form-item label="车牌号" prop="carLicense">
<el-input
v-model="queryParams.carLicense"
:placeholder=" t('common.pleaseEnter') + '车牌号'"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时间" prop="internationalization3">
<el-date-picker
v-model="queryParams.internationalization3"
end-placeholder="结束时间"
range-separator="到"
start-placeholder="开始时间"
type="datetimerange"
/>
</el-form-item>
<el-form-item label=" ">
<el-button icon="Search" type="primary" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
<div id="container4"></div>
</div>
</template>
<script setup>
import AMapLoader from '@amap/amap-jsapi-loader';
import {addTest, delTest, getTest, listTest, updateTest} from "@/api/realTimeMonitoring/electronicFence";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const queryParams = ref({})
let map = null
let polyline = null
let passedPolyline = null
let mouseTool = null
let path = [[116.390969, 39.911592], [116.391496, 39.909008], [116.389264, 39.909765], [116.38802, 39.911016]]
let marketPath = [116.390669, 39.911147]
AMapLoader.load({
key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load
// version: "1.4.15", //
version: "2.0", //
plugins: ['AMap.MouseTool', 'AMap.PolygonEditor', 'AMap.ToolBar', 'AMap.Scale', 'AMap.HawkEye', 'AMap.MapType', 'AMap.Marker'],
AMapUI: {
version: '1.1',
plugins: []
}
}).then((AMap) => {
map = new AMap.Map("container4", { //id
viewMode: "3D", //3D
zoom: 16, //
center: [116.397428, 39.90923], //
});
let marker = new AMap.Marker({
position: marketPath,
anchor: 'bottom-center',
offset: new AMap.Pixel(0, 0)
});
marker.setTitle('我是marker的title');
marker.setLabel({
direction: 'top',
offset: new AMap.Pixel(0, -10), //
content: "" + AMap.GeometryUtil.isPointInRing(marketPath,path),
});
marker.setMap(map);
//
map.addControl(new AMap.ToolBar({position: 'LT'}));
//
map.addControl(new AMap.Scale());
//
map.addControl(new AMap.HawkEye({isOpen: true}));
//
map.addControl(new AMap.MapType());
let polygon = new AMap.Polygon({path: path});
map.add([polygon]);
let polyEditor = new AMap.PolygonEditor(map);
polyEditor.addAdsorbPolygons([polygon]);
polyEditor.on('add', function (data) {
console.log(data);
let polygon = data.target;
polyEditor.addAdsorbPolygons(polygon);
})
polyEditor.on('addnode', function (data) {
//
console.log(polyEditor.getTarget()._opts.path)
})
polyEditor.on('adjust', function (data) {
//
console.log(polyEditor.getTarget()._opts.path)
})
polyEditor.setTarget(polygon);
polyEditor.open();
// map.setFitView();
}).catch(e => {
console.log(e);
})
</script>
<style>
#container4 {
padding: 0px;
margin: 20px 0 0 0;
width: 100%;
height: calc(100vh - 190px);
}
</style>

@ -0,0 +1,114 @@
<template>
<div>
<el-form ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'" :model="queryParams"
style="margin-top: 24px">
<el-form-item label="车牌号" prop="carLicense">
<el-input
v-model="queryParams.carLicense"
:placeholder=" t('common.pleaseEnter') + '车牌号'"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时间" prop="internationalization3">
<el-date-picker
v-model="queryParams.internationalization3"
end-placeholder="结束时间"
range-separator="到"
start-placeholder="开始时间"
type="datetimerange"
/>
</el-form-item>
<el-form-item label=" ">
<el-button icon="Search" type="primary" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
<div id="container3"></div>
</div>
</template>
<script setup>
import AMapLoader from '@amap/amap-jsapi-loader';
import {addTest, delTest, getTest, listTest, updateTest} from "@/api/realTimeMonitoring/historicalRoute";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const queryParams = ref({})
let map = null
let polyline = null
let passedPolyline = null
let mouseTool = null
let path = [[116.390969, 39.911592], [116.391496, 39.909008], [116.389264, 39.909765], [116.38802, 39.911016]]
let marketPath = [116.390669, 39.911147]
AMapLoader.load({
key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load
// version: "1.4.15", //
version: "2.0", //
plugins: ['AMap.MouseTool', 'AMap.PolygonEditor', 'AMap.ToolBar', 'AMap.Scale', 'AMap.HawkEye', 'AMap.MapType', 'AMap.Marker'],
AMapUI: {
version: '1.1',
plugins: []
}
}).then((AMap) => {
map = new AMap.Map("container3", { //id
viewMode: "3D", //3D
zoom: 16, //
center: [116.397428, 39.90923], //
});
// let marker = new AMap.Marker({
// position: marketPath,
// anchor: 'bottom-center',
// offset: new AMap.Pixel(0, 0)
// });
// marker.setTitle('markertitle');
// marker.setLabel({
// direction: 'top',
// offset: new AMap.Pixel(0, -10), //
// content: "" + AMap.GeometryUtil.isPointInRing(marketPath,path),
// });
// marker.setMap(map);
//
map.addControl(new AMap.ToolBar({position: 'LT'}));
//
map.addControl(new AMap.Scale());
//
map.addControl(new AMap.HawkEye({isOpen: true}));
//
map.addControl(new AMap.MapType());
polyline = new AMap.Polyline({
strokeColor: '#00BBFF', // 线-
path: [[116.478935, 39.997761], [103.85094, 35.987496]],
strokeWeight: 6 // 线
})
map.add(polyline);
map.setFitView()
}).catch(e => {
console.log(e);
})
</script>
<style>
#container3 {
padding: 0px;
margin: 20px 0 0 0;
width: 100%;
height: calc(100vh - 190px);
}
</style>

@ -41,7 +41,7 @@ const setMarker = async (data, zoom) => {
offset: new AMap.Pixel(0, 0),
label: {
direction: 'top',
content: `<div class='info'>${e.carLicense || ''} - <span style="color: ${e.state === 0 ? 'green">在线' : 'red">离线'}</span></div><div class='info' onClick='function a(i){console.log(window.$tab);window.$tab.openPage("carMonitoring"+"?id="+i,"/realTimeMonitoring") }a("${e.id}")'>监控 ${e.three || ''}</div><div class='info'>${parseTime(e.laseRuntime) || ''}</div>`, //
content: `<div class='info'>${e.carLicense || ''} - <span style="color: ${e.state === 0 ? 'green">在线' : 'red">离线'}</span></div><div class='info' onClick='function a(i){window.$tab.openPage("carMonitoring"+"?id="+i,"/realTimeMonitoring") }a("${e.id}")'>监控 ${e.three || ''}</div><div class='info'>${parseTime(e.laseRuntime) || ''}</div>`, //
},
extData: {
id: '123'

@ -11,26 +11,26 @@
</template>
</el-input>
</div>
<div>品牌{{ tireInfo.info1 }} 规格{{ tireInfo.info2 }} 花纹{{ tireInfo.info3 }}</div>
<div>品牌{{ tireInfo.brand }} 规格{{ tireInfo.size }} 花纹{{ tireInfo.pattern }}</div>
<div>
<span class="yellow">使用时间&nbsp;&nbsp;</span>
<span>{{ tireInfo.info4 }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.userTime }}&nbsp;&nbsp;</span>
<span class="yellow">最长连续报警时间&nbsp;&nbsp;</span>
<span>{{ tireInfo.info5 }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.warringTime }}&nbsp;&nbsp;</span>
<span class="yellow">历史最高胎压&nbsp;&nbsp;</span>
<span>{{ tireInfo.info6 }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.highTemHis }}&nbsp;&nbsp;</span>
</div>
<div>
<span class="yellow">预计剩余里程&nbsp;&nbsp;</span>
<span>{{ tireInfo.info7 }}km&nbsp;&nbsp;</span>
<span>{{ tireInfo.surplusMileage }}km&nbsp;&nbsp;</span>
<span class="yellow">最长连续工作时间&nbsp;&nbsp;</span>
<span>{{ tireInfo.info8 }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.longestWorkTime }}&nbsp;&nbsp;</span>
<span class="yellow">历史最高胎温&nbsp;&nbsp;</span>
<span>{{ tireInfo.info9 }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.highPressHis }}&nbsp;&nbsp;</span>
</div>
<div>
<span class="yellow">报警次数&nbsp;&nbsp;</span>
<span>{{ tireInfo.info10 }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.warringTimes }}&nbsp;&nbsp;</span>
<div v-for="item in tireInfo.war" style="display: inline-block">
<span>{{ item.type }}&nbsp;&nbsp;</span>
<span>{{ item.num }}&nbsp;&nbsp;</span>
@ -133,8 +133,8 @@ const outerTireNumberSearchClick = async () => {
const {data: info} = await getTyreLife({
outerTireNumber: tireInfo.value.title
})
console.log(info)
list.value = info
list.value = info.lifeList
tireInfo.value = info.tyresLifeInfo
list.value.push({
datetime: new Date().getTime(),
description: '今日'
@ -148,8 +148,7 @@ const tyrePosition = (e) => {
let position = [parseFloat(arr?.[0]), parseFloat(arr?.[1]), parseFloat(arr?.[2])]
let Enum1 = ['左', '右']
let Enum2 = ['外', '内']
return `${position[0]}${Enum1[position[1] - 1]}${Enum1[position[2] - 1]}`
console.log(position)
return `${position[0]}${Enum1[position[1] - 1]}${Enum2[position[2] - 1]}`
}
const percentage = '3.33'
@ -158,16 +157,16 @@ const run = '3.33'
const tireInfo = ref({
title: '1001',
info1: '品牌',
info2: '规格',
info3: '花纹',
info4: '10h',
info5: '10h',
info6: '40°C',
info7: '666',
info8: '10h',
info9: '40°C',
info10: '1',
brand: '',
size: '',
pattern: '',
userTime: '',
warringTime: '',
highTemHis: '',
surplusMileage: '',
longestWorkTime: '',
highPressHis: '',
warringTimes: '',
war: [
{
type: '高温',

Loading…
Cancel
Save