修改轮胎生命周期

master
夜笙歌 2 years ago
parent 900a406546
commit 033f48da71

@ -155,7 +155,7 @@
</el-row>
<el-dialog v-model="open" :title="title" append-to-body width="800px">
<el-descriptions class="margin-top" :column="2" border width="150px">
<el-descriptions :column="2" border class="margin-top" width="150px">
<el-descriptions-item>
<template #label>
胎号
@ -178,7 +178,7 @@
<template #label>
品牌
</template>
{{ tyreInfo.brand }}
{{ tyreInfo.brand }}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
@ -270,7 +270,7 @@
</template>
<script setup>
import {listBaseCar, getCarGpsList,getTyreList} 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'
@ -364,14 +364,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(() => {
@ -398,7 +398,6 @@ const queryParams = ref({
const tableData = ref([])
/** 取消按钮 */
function cancel() {
open.value = false;
@ -423,13 +422,13 @@ function submitForm() {
if (tyreInfo.value.id != undefined) {
// updateBaseDevice(tyreInfo.value).then(response => {
// proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
open.value = false;
// getList();
// });
} else {
// addBaseDevice(tyreInfo.value).then(response => {
// proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false;
open.value = false;
// getList();
// });
}
@ -529,7 +528,8 @@ onBeforeUnmount(() => {
background-size: 100% 100%;
background-image: url("../../../assets/images/trucks.png");
}
.el-descriptions__label{
.el-descriptions__label {
width: 170px;
}
</style>

@ -67,7 +67,7 @@
{{ tyrePosition(i.carPosition) || '' }}
</div>
<div style="width:100%;padding-left: 4px;line-height: 24px">
{{ i.datetime ? parseTime(new Date(i.datetime), '{y}-{m}-{d}') : '' }}
{{ i.datetime ? parseTime(new Date(i.datetime), '{y}-{m}-{d} {h}:{i}:{s}') : '' }}
</div>
</div>
</div>
@ -130,11 +130,14 @@ const getList = () => {
})
}
const outerTireNumberSearchClick = async () => {
if(!tireInfo.value.title) return
const {data: info} = await getTyreLife({
outerTireNumber: tireInfo.value.title
})
list.value = info.lifeList
tireInfo.value = info.tyresLifeInfo
tireInfo.value = {...info.tyresLifeInfo,title:tireInfo.value.title}
percentage.value = info.tyresLifeInfo.percentage || ''
run.value = info.tyresLifeInfo.mileage || ''
list.value.push({
datetime: new Date().getTime(),
description: '今日'
@ -151,9 +154,11 @@ const tyrePosition = (e) => {
return `${position[0]}${Enum1[position[1] - 1]}${Enum2[position[2] - 1]}`
}
const percentage = '3.33'
//
const percentage = ref('')
const run = '3.33'
//
const run = ref('')
const tireInfo = ref({
title: '1001',

Loading…
Cancel
Save