添加搜索条件

master
夜笙歌 2 years ago
parent bc83ef4ddb
commit 5693153db7

@ -162,7 +162,24 @@ export default {
mileage:'里程',
ModifiedPatternDepth:'修改花纹深度',
InstallationReplacement:'安装/更换',
UnloadingTire:'卸载轮胎'
UnloadingTire:'卸载轮胎',
specification:'规格',
serviceTime:'使用时间',
AllTimeHighTirePressure:'历史最高胎压',
EstimatedRemainingMileage:'预计剩余里程',
TheHighestFetalTemperatureEverRecorded:'历史最高胎温',
NumberOfAlarms:'报警次数',
run:'已行驶',
ThatsXOfTheEntireLifeCycle:'约占整个生命周期的%{key}%',
TireMounting:'安装轮胎',
ChangeTire:'更换轮胎',
EndPoint:'终点',
left:'左侧',
right:'右侧',
outer:'外',
inner:'内',
row:'排',
tire:'胎',
},
other:{
tireInformationImport:'Tire information import',

@ -154,20 +154,53 @@ export default {
rowLeftInnerTube: '排左侧内胎',
rowRightInnerTube: '排右侧内胎',
rowRightOuterTire: '排右侧外胎',
currentTirePosition:'当前轮胎位置',
tyreNumber:'轮胎编号',
tireBrand:'轮胎品牌',
specificationAndModel:'规格型号',
SensorID:'传感器ID',
mileage:'里程',
ModifiedPatternDepth:'修改花纹深度',
InstallationReplacement:'安装/更换',
UnloadingTire:'卸载轮胎',
specification:'规格',
serviceTime:'使用时间',
AllTimeHighTirePressure:'历史最高胎压',
EstimatedRemainingMileage:'预计剩余里程',
TheHighestFetalTemperatureEverRecorded:'历史最高胎温'
currentTirePosition: '当前轮胎位置',
tyreNumber: '轮胎编号',
tireBrand: '轮胎品牌',
specificationAndModel: '规格型号',
SensorID: '传感器ID',
mileage: '里程',
ModifiedPatternDepth: '修改花纹深度',
InstallationReplacement: '安装/更换',
UnloadingTire: '卸载轮胎',
serviceTime: '使用时间',
AllTimeHighTirePressure: '历史最高胎压',
EstimatedRemainingMileage: '预计剩余里程',
TheHighestFetalTemperatureEverRecorded: '历史最高胎温',
NumberOfAlarms: '报警次数',
run: '已行驶',
ThatsXOfTheEntireLifeCycle: '约占整个生命周期的%{key}%',
TireMounting: '安装轮胎',
ChangeTire: '更换轮胎',
EndPoint: '终点',
left: '左侧',
right: '右侧',
outer: '外',
inner: '内',
row: '排',
tire: '胎',
MaterialCode: '物料编码',
MaterialName: '物料名称',
QualityControlStatus: '质控状态',
unit: '单位',
specification: '规格',
hierarchy: '层级',
SpeedClass: '速度级别',
LoadIndex: '负荷指数',
RimSize: '轮辋尺寸',
StandardWeight: '标准重量',
SectionWidth: '断面宽',
OuterDiameter: '外直径',
FlatteningRate: '扁平率',
EnhancedType: '加强型',
InnerTubeOrNot: '有无内胎',
PackingQuantity: '装箱量',
TyreType: '轮胎类型',
AuthenticationInformation: '认证信息',
CustomsDeclarationSpecification: '报关规格',
EmbryoCoding: '胎胚编码',
EmbryoDescription: '胎胚描述',
ProductionPlant: '生产工厂',
},
other: {
tireInformationImport: '轮胎信息导入',

@ -36,6 +36,7 @@ import AMapLoader from '@amap/amap-jsapi-loader';
import {getTrack} from "@/api/realTimeMonitoring/historicalRoute";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
import coordtransform from 'coordtransform'
const {t} = useI18n();
@ -85,7 +86,7 @@ AMapLoader.load({
}).catch(e => {
console.log(e);
})
const convertFrom = (LngLatArray, success) =>{
const convertFrom = (LngLatArray, success) => {
var LngLatArray2 = [];
var size = 40;
var pageNum = parseInt((LngLatArray.length + size - 1) / size);
@ -94,6 +95,7 @@ const convertFrom = (LngLatArray, success) =>{
var LngLatArraySlice = LngLatArray.slice(i * size, (i + 1) * size);
convert(LngLatArraySlice, i);
}
function convert(LngLatArray, n) {
AMap.convertFrom(LngLatArray, 'gps', function (status, result) {
if (status == 'complete') {
@ -110,26 +112,32 @@ const convertFrom = (LngLatArray, success) =>{
const handleQuery = () => {
polyline ? map.remove([polyline]) : ''
getTrack(proxy.addDateRange(queryParams.value, dateRange.value)).then(e => {
text&&text.remove()
text && text.remove()
let pathRow = e.data.map(val => [val.longitude, val.latitude])
// convertFrom(pathRow,(result)=>{
// let lnglats = result.map(e => [e.lng, e.lat]);
let lnglats = e.data.map(val => [val.longitude, val.latitude])
console.log(lnglats)
polyline = new AMap.Polyline({
strokeColor: '#00BBFF', // 线-
path: lnglats,
strokeWeight: 6 // 线
})
map.add(polyline);
distance = Math.round(AMap.GeometryUtil.distanceOfLine(lnglats));
text = new AMap.Text({
position: lnglats.at(-1),
text: '行驶路径' + distance + '米',
offset: new AMap.Pixel(-20, -20)
})
map.add(text);
map.setFitView()
console.log(lnglats)
lnglats = lnglats.map(val => {
let path = coordtransform.wgs84togcj02(val[0], val[1])
return [path[0], path[1]]
})
console.log(lnglats)
polyline = new AMap.Polyline({
strokeColor: '#00BBFF', // 线-
path: lnglats,
strokeWeight: 6 // 线
})
map.add(polyline);
distance = Math.round(AMap.GeometryUtil.distanceOfLine(lnglats));
text = new AMap.Text({
position: lnglats.at(-1),
text: '行驶路径' + distance + '米',
offset: new AMap.Pixel(-20, -20)
})
map.add(text);
map.setFitView()
// })
let grasp = new AMap.GraspRoad();
// AMap.convertFrom(pathRow, 'gps', function (status, result) {

@ -25,11 +25,11 @@
<span>{{ tireInfo.surplusMileage }}km&nbsp;&nbsp;</span>
<!-- <span class="yellow">最长连续工作时间&nbsp;&nbsp;</span>-->
<!-- <span>{{ tireInfo.longestWorkTime }}&nbsp;&nbsp;</span>-->
<span class="yellow">历史最高胎温&nbsp;&nbsp;</span>
<span class="yellow">{{ t('web.TheHighestFetalTemperatureEverRecorded') }}&nbsp;&nbsp;</span>
<span>{{ tireInfo.highTemHis }}&nbsp;&nbsp;</span>
</div>
<div>
<span class="yellow">报警次数&nbsp;&nbsp;</span>
<span class="yellow">{{ t('web.NumberOfAlarms') }}&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>
@ -39,8 +39,8 @@
</div>
</div>
<div class="topRight">
<span class="title">已行驶</span>
<span class="percentage">约占整个生命周期的{{ percentage }}%</span>
<span class="title">{{ t('web.run') }}</span>
<span class="percentage">{{ t('web.ThatsXOfTheEntireLifeCycle',{key:percentage}) }}</span>
<span class="run">{{ run }}km</span>
<div :style="`left:${parseFloat(percentage)}%`" class="runWay"></div>
<div class="bottomWay"></div>
@ -99,16 +99,16 @@ const getList = () => {
list.value.forEach(e => {
e.datetime = new Date(e.datetime).getTime()
if (e.description === '1') {
e.description = '安装轮胎'
e.description = t('web.TireMounting')
}
if (e.description === '2') {
e.description = '更换轮胎'
e.description = t('web.ChangeTire')
}
if (e.description === '3') {
e.description = '卸载轮胎'
e.description = t('web.UnloadingTire')
}
if (e.description === '4') {
e.description = '修改花纹深度'
e.description = t('web.ModifiedPatternDepth')
}
})
list.value = list.value.sort((a, b) => {
@ -130,7 +130,7 @@ const getList = () => {
repetitiveBackground.value = Math.round(arr.at(-1).step / 10) + 1
arr.push({
// datetime: 1678199843735,
description: '终点',
description: t('web.EndPoint'),
step: (Math.round(arr.at(-1).step / 10) + 1) * 10 - 1
})
}
@ -154,9 +154,9 @@ const tyrePosition = (e) => {
if (!e) return
let arr = e?.split('-')
let position = [parseFloat(arr?.[0]), parseFloat(arr?.[1]), parseFloat(arr?.[2])]
let Enum1 = ['左', '右']
let Enum2 = ['外', '内']
return `${position[0]}${Enum1[position[1] - 1]}${Enum2[position[2] - 1]}`
let Enum1 = [t('web.left'), t('web.right')]
let Enum2 = [t('web.outer'), t('web.inner')]
return `${position[0]}${t('web.row')}${Enum1[position[1] - 1]}${Enum2[position[2] - 1]}${t('web.tire')}`
}
//

@ -2,60 +2,61 @@
<div class="app-container">
<!-- 搜索栏-->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"
:label-width=" locale ? '100px':'140px'">
<el-form-item label="工厂" prop="tyreFactory">
:label-width=" locale ? '100px':'170px'">
<el-form-item :label="t('web.factory')" prop="tyreFactory">
<el-input
v-model="queryParams.tyreFactory"
placeholder="请输入工厂"
:placeholder="t('common.pleaseEnter')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="品牌" prop="brand">
<el-form-item :label="t('web.brand')" prop="brand">
<el-input
v-model="queryParams.brand"
placeholder="请输入品牌"
:placeholder="t('common.pleaseEnter')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="外胎号" prop="outerTireNumber">
<el-form-item :label="t('web.tireNumber')" prop="outerTireNumber">
<el-input
v-model="queryParams.outerTireNumber"
placeholder="请输入外胎号"
:placeholder="t('common.pleaseEnter')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="花纹" prop="pattern">
<el-form-item :label="t('web.pattern')" prop="pattern">
<el-input
v-model="queryParams.pattern"
placeholder="请输入花纹"
:placeholder="t('common.pleaseEnter')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="规格型号" prop="size">
<el-form-item :label="t('web.tireSpecificationModel')" prop="size">
<el-input
v-model="queryParams.size"
placeholder="请输入型号规格"
:placeholder="t('common.pleaseEnter')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" style="width: 308px;">
<el-form-item :label="t('common.createTime')" >
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:start-placeholder="t('common.startDate')"
:end-placeholder="t('common.endDate')"
style="width: 100%"
></el-date-picker>
</el-form-item>
<el-form-item label=" ">
@ -82,32 +83,32 @@
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="轮胎厂名称" align="center" prop="tyreFactory" width="150"/>
<el-table-column label="外胎号" align="center" prop="outerTireNumber" width="150"/>
<el-table-column label="物料编码" align="center" prop="materialCode" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="质控状态" align="center" prop="qualityStatus" width="150"/>
<el-table-column label="单位" align="center" prop="unit" width="150"/>
<el-table-column label="品牌" align="center" prop="brand" width="150"/>
<el-table-column label="规格" align="center" prop="size" width="150"/>
<el-table-column label="花纹" align="center" prop="pattern" width="150"/>
<el-table-column label="层级" align="center" prop="hierarchy" width="150"/>
<el-table-column label="速度级别" align="center" prop="speedLevel" width="150"/>
<el-table-column label="负荷指数" align="center" prop="loadIndex" width="150"/>
<el-table-column label="轮辋尺寸" align="center" prop="rimSize" width="150"/>
<el-table-column label="标准重量" align="center" prop="weight" width="150"/>
<el-table-column label="断面宽" align="center" prop="sectionWidth" width="150"/>
<el-table-column label="外直径" align="center" prop="outerDiameter" width="150"/>
<el-table-column label="扁平率" align="center" prop="flattening" width="150"/>
<el-table-column label="加强型" align="center" prop="enhanced" width="150"/>
<el-table-column label="有无内胎" align="center" prop="innerTube" width="150"/>
<el-table-column label="装箱量" align="center" prop="ctn" width="150"/>
<el-table-column label="轮胎类型" align="center" prop="type" width="150"/>
<el-table-column label="认证信息" align="center" prop="certInfo" width="150"/>
<el-table-column label="报关规格" align="center" prop="customsSpe" width="150"/>
<el-table-column label="胎胚编码" align="center" prop="feCode" width="150"/>
<el-table-column label="胎胚描述" align="center" prop="feDesc" width="150"/>
<el-table-column label="生产工厂" align="center" prop="produceFactory" width="150"/>
<el-table-column label="t('web.factory')" align="center" prop="tyreFactory" width="150"/>
<el-table-column label="t('web.tireNumber')" align="center" prop="outerTireNumber" width="150"/>
<el-table-column label="t('web.MaterialCode')" align="center" prop="materialCode" width="150"/>
<el-table-column label="t('web.MaterialName')" align="center" prop="materialName" width="150"/>
<el-table-column label="t('web.QualityControlStatus')" align="center" prop="qualityStatus" width="150"/>
<el-table-column label="t('web.unit')" align="center" prop="unit" width="150"/>
<el-table-column label="t('web.brand')" align="center" prop="brand" width="150"/>
<el-table-column label="t('web.specification')" align="center" prop="size" width="150"/>
<el-table-column label="t('web.pattern')" align="center" prop="pattern" width="150"/>
<el-table-column label="t('web.hierarchy')" align="center" prop="hierarchy" width="150"/>
<el-table-column label="t('web.SpeedClass')" align="center" prop="speedLevel" width="150"/>
<el-table-column label="t('web.LoadIndex')" align="center" prop="loadIndex" width="150"/>
<el-table-column label="t('web.RimSize')" align="center" prop="rimSize" width="150"/>
<el-table-column label="t('web.StandardWeight')" align="center" prop="weight" width="150"/>
<el-table-column label="t('web.SectionWidth')" align="center" prop="sectionWidth" width="150"/>
<el-table-column label="t('web.OuterDiameter')" align="center" prop="outerDiameter" width="150"/>
<el-table-column label="t('web.FlatteningRate')" align="center" prop="flattening" width="150"/>
<el-table-column label="t('web.EnhancedType')" align="center" prop="enhanced" width="150"/>
<el-table-column label="t('web.InnerTubeOrNot')" align="center" prop="innerTube" width="150"/>
<el-table-column label="t('web.PackingQuantity')" align="center" prop="ctn" width="150"/>
<el-table-column label="t('web.TyreType')" align="center" prop="type" width="150"/>
<el-table-column label="t('web.AuthenticationInformation')" align="center" prop="certInfo" width="150"/>
<el-table-column label="t('web.CustomsDeclarationSpecification')" align="center" prop="customsSpe" width="150"/>
<el-table-column label="t('web.EmbryoCoding')" align="center" prop="feCode" width="150"/>
<el-table-column label="t('web.EmbryoDescription')" align="center" prop="feDesc" width="150"/>
<el-table-column label="t('web.ProductionPlant')" align="center" prop="produceFactory" width="150"/>
</el-table>
<!-- 分页-->

Loading…
Cancel
Save