master
夜笙歌 1 year ago
parent 8c230e9aef
commit 331c9b004a

@ -272,7 +272,8 @@ export default {
TheLicensePlateNumberCannotBeEmpty:'The license plate number cannot be empty',
PleaseEnterTheCorrectFormat:'Please enter the correct format',
TheCarTypeCannotBeEmpty:'The car type cannot be empty',
TheNameCannotBeEmpty:'The name cannot be empty'
TheNameCannotBeEmpty:'The name cannot be empty',
WhetherToAllowAccessToTireTemperatureTirePressureAndTireGPSInformation:"Whether to allow access to tire temperature, tire pressure, and tire GPS information?"
},
tireManagement: {
info: {

@ -272,7 +272,8 @@ export default {
TheLicensePlateNumberCannotBeEmpty: '车牌号不能为空',
PleaseEnterTheCorrectFormat: '请輸入正确的格式',
TheCarTypeCannotBeEmpty: '所属车型不能为空',
TheNameCannotBeEmpty: '名称不能为空'
TheNameCannotBeEmpty: '名称不能为空',
WhetherToAllowAccessToTireTemperatureTirePressureAndTireGPSInformation:"是否允许获取胎温、胎压和轮胎GPS信息"
},
tireManagement: {
info: {

@ -24,11 +24,11 @@
<el-form-item :label="t('web.GPSTime')" prop="internationalization3">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
:start-placeholder="t('common.startDate')"
:end-placeholder="t('common.endDate')"
:start-placeholder="t('common.startDate')"
range-separator="-"
type="daterange"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label=" ">
@ -38,86 +38,57 @@
</el-form>
<!-- 顶部操作按钮-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:export']"
icon="Download"
plain
type="warning"
@click="handleExport"
>{{ t('option.export') }}
</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- v-hasPermi="['test:test:export']"-->
<!-- icon="Download"-->
<!-- plain-->
<!-- type="warning"-->
<!-- @click="handleExport"-->
<!-- >{{ t('option.export') }}-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column :label="t('web.SerialNumber')" align="center" type="index" width="120" />
<!-- <el-table-column label="GPS时间" align="center" prop="internationalization2"-->
<!-- width="150"/>-->
<el-table-column :label="t('web.TransceiverID')" align="center" prop="machineId"
width="150"/>
<el-table-column :label="t('web.licensePlateNumber')" align="center" prop="carLicense"
width="150"/>
<el-table-column :label="t('baseCar.car.latitude')" align="center" prop="latitude"
/>
<el-table-column :label="t('baseCar.car.longitude')" align="center" prop="longitude"
/>
<!-- <el-table-column label="GPS里程" align="center" prop="gpsMileage"-->
<!-- />-->
<el-table-column :label="t('web.altitude')" align="center" prop="altitude"
/>
<el-table-column :label="t('web.speed')" align="center" prop="speed"
/>
<!-- <el-table-column label="方向" align="center" prop="course"-->
<!-- width="150"/>-->
<!-- <el-table-column label="是否外接电源" align="center" prop="isOutPower"-->
<!-- width="150"/>-->
<!-- <el-table-column label="设备上传电池电压" align="center" prop="carPower"-->
<!-- width="150"/>-->
<!-- <el-table-column label="胎压设备是否正常工作" align="center" prop="isSensorRun"-->
<!-- width="170"/>-->
<!-- <el-table-column label="紧急报警" align="center" prop="emergencyAlarm"-->
<!-- width="150"/>-->
<!-- <el-table-column label="超速预警" align="center" prop="speedAlarm"-->
<!-- width="150"/>-->
<!-- <el-table-column label="疲劳驾驶" align="center" prop="fatigueDrivingAlarm"-->
<!-- width="150"/>-->
<!-- <el-table-column label="危险预警" align="center" prop="riskEarlyAlarm"-->
<!-- width="150"/>-->
<!-- <el-table-column label="gnss模块" align="center" prop="gnssModule"-->
<!-- width="150"/>-->
<!-- <el-table-column label="天线缺失" align="center" prop="gnssLossAntenna"-->
<!-- width="150"/>-->
<!-- <el-table-column label="天线短路" align="center" prop="gnssAntennaShortcircuit"-->
<!-- width="150"/>-->
<!-- <el-table-column label="终端主电源欠压" align="center" prop="mainPowerLake"-->
<!-- width="150"/>-->
<!-- <el-table-column label="终端主电源掉电" align="center" prop="mainpowerloss"-->
<!-- width="150"/>-->
</el-table>
<!-- <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">-->
<!-- <el-table-column align="center" fixed type="selection" width="55"/>-->
<!-- <el-table-column :label="t('web.TransceiverID')" align="center" prop="machineId"-->
<!-- width="150"/>-->
<!-- <el-table-column :label="t('web.licensePlateNumber')" align="center" prop="carLicense"-->
<!-- width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.latitude')" align="center" prop="latitude"-->
<!-- />-->
<!-- <el-table-column :label="t('baseCar.car.longitude')" align="center" prop="longitude"-->
<!-- />-->
<!-- <el-table-column :label="t('web.altitude')" align="center" prop="altitude"-->
<!-- />-->
<!-- <el-table-column :label="t('web.speed')" align="center" prop="speed"-->
<!-- />-->
<!-- </el-table>-->
<!-- 分页-->
<pagination
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
<!-- <pagination-->
<!-- v-show="total > 0"-->
<!-- v-model:limit="queryParams.pageSize"-->
<!-- v-model:page="queryParams.pageNum"-->
<!-- :total="total"-->
<!-- @pagination="getList"-->
<!-- />-->
<div id="myChart" class="myChart"></div>
</div>
</template>
<script name="Car" setup>
import { listTest} from "@/api/GPS/car";
import {listTest} from "@/api/GPS/car";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
import * as echarts from 'echarts';
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
@ -135,12 +106,13 @@ const dateRange = ref([]);
//
const queryParams = ref({
pageNum: 1,
pageSize: 10,
// pageNum: 1,
// pageSize: 10,
carLicense: undefined,
machineId: undefined,
internationalization3: undefined,
})
console.log(echarts)
/** 查询岗位列表 */
function getList() {
@ -148,6 +120,91 @@ function getList() {
listTest(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
postList.value = response.rows;
total.value = response.total;
let chart = echarts.init(document.getElementById('myChart'))
chart.setOption({
legend: {
icon: "circle",
top: "0%",
right: "5%",
itemWidth: 6,
itemGap: 20,
textStyle: {
color: "#556677",
},
},
tooltip: {
trigger: "axis",
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: "category",
data: response.rows.map(e => e.createTime),
axisLine: {
lineStyle: {
color: "#DCE2E8",
},
},
axisTick: {
show: false,
},
},
],
yAxis: [
{
type: 'value',
name: '里程',
axisLabel: {
formatter: '{value} KM'
}
},
{
type: 'value',
name: '花纹深度',
axisLabel: {
formatter: '{value} mm'
}
}
],
series: [
{
name: "海拔",
type: "line",
data: response.rows.map(e => e.altitude || 0),
symbolSize: 1,
symbol: "circle",
smooth: true,
yAxisIndex: 0,
showSymbol: false,
tooltip: {
valueFormatter: function (value) {
return value + ' km';
}
},
},
{
name: "速度",
type: "line",
data: response.rows.map(e => e.speed || 0),
symbolSize: 1,
yAxisIndex: 1,
symbol: "circle",
smooth: true,
showSymbol: false,
tooltip: {
valueFormatter: function (value) {
return value + ' km/h';
}
},
},
],
})
}).finally(() => {
loading.value = false;
});
@ -155,7 +212,7 @@ function getList() {
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
// queryParams.value.pageNum = 1;
getList();
}
@ -173,5 +230,13 @@ function handleExport() {
}, `post_${new Date().getTime()}.xlsx`);
}
getList();
// getList();
</script>
<style>
.myChart {
width: 100%;
height: 300px;
}
</style>

@ -9,7 +9,7 @@
import AMapLoader from '@amap/amap-jsapi-loader';
import {getCarGpsList, listBasetyre, queryCardata} from '@/api/realTimeMonitoring/vehicleMonitoring'
import {parseTime} from "@/utils/ruoyi";
import {onBeforeUnmount} from "@vue/runtime-core";
import {onBeforeUnmount} from "vue";
const {proxy} = getCurrentInstance();
let map = null
@ -52,6 +52,7 @@ const setMarker = async (data, zoom, isChildren) => {
markerArr[i].latitude = v[1]
})
markerArr.forEach((e, index) => {
if (!e.longitude && !e.latitude) return
//
markers.value[index] = new AMap.Marker({
content: '<div class="markerIcon" />',
@ -109,7 +110,7 @@ AMapLoader.load({
}).catch(e => {
})
listBasetyre({trailerNum:0}).then(e => {
listBasetyre({trailerNum: 0}).then(e => {
let res = JSON.stringify(e.rows)
let newObj = JSON.parse(res.replace(/"carLicense":/g, '"title":'))
treeData.value = newObj
@ -118,6 +119,7 @@ listBasetyre({trailerNum:0}).then(e => {
onBeforeUnmount(() => {
map.destroy()
map = null
markers.value = []
})
</script>
<style>

@ -1,5 +1,5 @@
<template>
<div class="app-container">
<div class="app-container" v-if="show">
<el-form :model="form" inline :label-width=" locale ? '80px':'160px'">
<el-form-item :label="t('web.team')">
<el-select v-model="form.carQueue" :placeholder="t('common.PleaseSelect')" @change="carQueueChange">
@ -125,8 +125,10 @@
<script name="Install" setup>
import {listCarQueue, setCarTyres, TyreInstall, getTyreInfo, TyreUnInstall,EditPatternTextureDepth} from "@/api/tireManagement/install";
import {Search} from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
import {onMounted} from "vue";
const {t} = useI18n();
@ -140,6 +142,7 @@ const carQueueList = ref([])
const carQueueOption = ref([])
const licenseNumberOption = ref([])
const nowClick = ref('')
const show = ref(false)
// - 12 - 12
const installedTyre = ref([])
@ -377,6 +380,26 @@ const uninstallClick = (val) => {
}
getList()
onMounted(()=>{
ElMessageBox.confirm(
t('other.WhetherToAllowAccessToTireTemperatureTirePressureAndTireGPSInformation'),
'Warning',
{
confirmButtonText: t('option.ok'),
cancelButtonText: t('option.cancel'),
type: 'warning',
}
)
.then(() => {
show.value = true
})
.catch(() => {
// ElMessage({
// type: 'info',
// message: 'Delete canceled',
// })
})
})
</script>
<style lang="scss">
.bg {

Loading…
Cancel
Save