|
|
|
@ -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="'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 :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>
|
|
|
|
|
</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", // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
|
|
@ -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;
|
|
|
|
|