diff --git a/ruoyi-ui/src/lang/en.js b/ruoyi-ui/src/lang/en.js index fbf83b0..7fdaeaa 100644 --- a/ruoyi-ui/src/lang/en.js +++ b/ruoyi-ui/src/lang/en.js @@ -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', diff --git a/ruoyi-ui/src/lang/zhCn.js b/ruoyi-ui/src/lang/zhCn.js index a594917..a13475b 100644 --- a/ruoyi-ui/src/lang/zhCn.js +++ b/ruoyi-ui/src/lang/zhCn.js @@ -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: '轮胎信息导入', diff --git a/ruoyi-ui/src/views/realTimeMonitoring/historicalRoute/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/historicalRoute/index.vue index ca6c9e5..d3560cf 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/historicalRoute/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/historicalRoute/index.vue @@ -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) { diff --git a/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue b/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue index cb87dc1..7deb2f4 100644 --- a/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue +++ b/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue @@ -25,11 +25,11 @@ {{ tireInfo.surplusMileage }}km   - 历史最高胎温   + {{ t('web.TheHighestFetalTemperatureEverRecorded') }}   {{ tireInfo.highTemHis }}  
- 报警次数   + {{ t('web.NumberOfAlarms') }}   {{ tireInfo.warringTimes }}  
{{ item.type }}   @@ -39,8 +39,8 @@
- 已行驶 - 约占整个生命周期的{{ percentage }}% + {{ t('web.run') }} + {{ t('web.ThatsXOfTheEntireLifeCycle',{key:percentage}) }} {{ run }}km
@@ -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')}` } // 轮胎进度 diff --git a/ruoyi-ui/src/views/tireManagement/salesData/index.vue b/ruoyi-ui/src/views/tireManagement/salesData/index.vue index 53e15e7..1638f0a 100644 --- a/ruoyi-ui/src/views/tireManagement/salesData/index.vue +++ b/ruoyi-ui/src/views/tireManagement/salesData/index.vue @@ -2,60 +2,61 @@
- + :label-width=" locale ? '100px':'170px'"> + - + - + - + - + - + @@ -82,32 +83,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +