|
|
@ -1,8 +1,8 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<!-- 搜索栏-->
|
|
|
|
<!-- 搜索栏-->
|
|
|
|
<el-form v-show="showSearch" ref="queryRef" :rules="rules" :inline="true" :label-width=" locale ? '90px':'140px'"
|
|
|
|
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'" :model="queryParams"
|
|
|
|
:model="queryParams">
|
|
|
|
:rules="rules">
|
|
|
|
<el-form-item :label="t('web.tireNumber')" prop="outerTireNumber">
|
|
|
|
<el-form-item :label="t('web.tireNumber')" prop="outerTireNumber">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.outerTireNumber"
|
|
|
|
v-model="queryParams.outerTireNumber"
|
|
|
@ -16,8 +16,8 @@
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
v-model="dateRange"
|
|
|
|
v-model="dateRange"
|
|
|
|
:end-placeholder="t('common.endDate')"
|
|
|
|
:end-placeholder="t('common.endDate')"
|
|
|
|
range-separator="-"
|
|
|
|
|
|
|
|
:start-placeholder="t('common.startDate')"
|
|
|
|
:start-placeholder="t('common.startDate')"
|
|
|
|
|
|
|
|
range-separator="-"
|
|
|
|
type="datetimerange"
|
|
|
|
type="datetimerange"
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -46,17 +46,17 @@
|
|
|
|
<!-- 表格主体-->
|
|
|
|
<!-- 表格主体-->
|
|
|
|
<el-table v-loading="loading" :data="postList" @row-click="rowClick">
|
|
|
|
<el-table v-loading="loading" :data="postList" @row-click="rowClick">
|
|
|
|
<el-table-column align="center" fixed type="selection" width="55"/>
|
|
|
|
<el-table-column align="center" fixed type="selection" width="55"/>
|
|
|
|
<el-table-column align="center" :label="t('web.SerialNumber')" prop="internationalization1"
|
|
|
|
<el-table-column :label="t('web.SerialNumber')" align="center" prop="internationalization1"
|
|
|
|
type='index' width="120"/>
|
|
|
|
type='index' width="120"/>
|
|
|
|
<el-table-column align="center" :label="t('web.tireNumber')" prop="outerTireNumber"
|
|
|
|
<el-table-column :label="t('web.tireNumber')" align="center" prop="outerTireNumber"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column align="center" :label="t('web.SensorID')" prop="sensorid"
|
|
|
|
<el-table-column :label="t('web.SensorID')" align="center" prop="sensorid"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column align="center" :label="t('web.MeanPressure')" prop="avgpressvalue"
|
|
|
|
<el-table-column :label="t('web.MeanPressure')" align="center" prop="avgpressvalue"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column align="center" :label="t('web.MeanTemperature')" prop="avgtemperaturevalue"
|
|
|
|
<el-table-column :label="t('web.MeanTemperature')" align="center" prop="avgtemperaturevalue"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column align="center" :label="t('web.AverageVelocity')" prop="avgspeed"
|
|
|
|
<el-table-column :label="t('web.AverageVelocity')" align="center" prop="avgspeed"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
@ -68,7 +68,7 @@
|
|
|
|
:total="total"
|
|
|
|
:total="total"
|
|
|
|
@pagination="getList"
|
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-dialog width="1000" v-model="dialogTableVisible" @opened="dialogOpened">
|
|
|
|
<el-dialog v-model="dialogTableVisible" width="1000" @opened="dialogOpened">
|
|
|
|
<temp ref="tempRef" width='900px'/>
|
|
|
|
<temp ref="tempRef" width='900px'/>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -80,6 +80,7 @@ import Temp from '@/views/dashboard/Temp'
|
|
|
|
|
|
|
|
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
|
|
|
|
import router from "@/router";
|
|
|
|
|
|
|
|
|
|
|
|
const {t} = useI18n();
|
|
|
|
const {t} = useI18n();
|
|
|
|
|
|
|
|
|
|
|
@ -101,14 +102,16 @@ const tempRef = ref();
|
|
|
|
const outerTireNumberNow = ref('')
|
|
|
|
const outerTireNumberNow = ref('')
|
|
|
|
|
|
|
|
|
|
|
|
const rules = {
|
|
|
|
const rules = {
|
|
|
|
outerTireNumber: { required: true, message: '请输入外胎号', trigger: 'blur' },
|
|
|
|
outerTireNumber: {required: true, message: '请输入外胎号', trigger: 'blur'},
|
|
|
|
time: {validator :(rule,value,callback)=>{
|
|
|
|
time: {
|
|
|
|
if(dateRange.value.length !== 2){
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
callback(new Error("请选择时间"))
|
|
|
|
if (dateRange.value.length !== 2) {
|
|
|
|
}else{
|
|
|
|
callback(new Error("请选择时间"))
|
|
|
|
callback()
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
callback()
|
|
|
|
}, message: '请选择时间', trigger: 'blur' },
|
|
|
|
}
|
|
|
|
|
|
|
|
}, message: '请选择时间', trigger: 'blur'
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 搜索参数
|
|
|
|
// 搜索参数
|
|
|
@ -163,6 +166,16 @@ function getList() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proxy.$nextTick(() => {
|
|
|
|
|
|
|
|
let id = router.options.history.location.split('?')?.[1]?.split('=')[1]
|
|
|
|
|
|
|
|
if(id) {
|
|
|
|
|
|
|
|
queryParams.value.outerTireNumber = id
|
|
|
|
|
|
|
|
let nowDate = new Date().getTime()
|
|
|
|
|
|
|
|
dateRange.value = [proxy.parseTime(nowDate - 1000 * 60 * 60), proxy.parseTime(nowDate)]
|
|
|
|
|
|
|
|
getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
function handleQuery() {
|
|
|
|
function handleQuery() {
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|