|
|
|
@ -3,50 +3,23 @@
|
|
|
|
|
<!-- 搜索栏-->
|
|
|
|
|
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'"
|
|
|
|
|
:model="queryParams">
|
|
|
|
|
<el-form-item label="车牌号" prop="internationalization1">
|
|
|
|
|
<el-form-item label="外胎号" prop="outerTireNumber">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.internationalization1"
|
|
|
|
|
:placeholder=" t('common.pleaseEnter') + '车牌号'"
|
|
|
|
|
v-model="queryParams.outerTireNumber"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + '外胎号'"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="轮胎号" prop="internationalization2">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.internationalization2"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + '轮胎号'"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="接收机" prop="internationalization3">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.internationalization3"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + '接收机'"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="传感器" prop="internationalization4">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.internationalization4"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + '传感器'"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="GPS时间" prop="internationalization5">
|
|
|
|
|
<el-form-item label="GPS时间" prop="time">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="dateRange"
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
type="daterange"
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
range-separator="-"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
type="daterange"
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label=" ">
|
|
|
|
@ -71,44 +44,20 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<!-- 表格主体-->
|
|
|
|
|
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
|
|
|
|
<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" label="序号" prop="internationalization1"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="轮胎编号" prop="internationalization2"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="轮胎位置" prop="internationalization3"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="胎压传感器ID" prop="internationalization4"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="GPS时间" prop="internationalization5"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="接收机ID" prop="internationalization6"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="传感器电池电压" prop="internationalization7"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="压力值" prop="internationalization8"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="温度值" prop="internationalization9"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="是否低电压" prop="internationalization10"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="是否60分钟未收到数据" prop="internationalization11"
|
|
|
|
|
width="180"/>
|
|
|
|
|
<el-table-column align="center" label="传感器是否运行" prop="internationalization12"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="是否气压高" prop="internationalization13"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="是否气压低" prop="internationalization14"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="是否温度高" prop="internationalization15"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="气压状态" prop="internationalization16"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="纬度" prop="internationalization17"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column align="center" label="经度" prop="internationalization18"
|
|
|
|
|
width="150"/>
|
|
|
|
|
width="55"/>
|
|
|
|
|
<el-table-column align="center" label="外胎号" prop="outerTireNumber"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column align="center" label="传感器ID" prop="sensorid"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column align="center" label="平均压力" prop="avgpressvalue"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column align="center" label="平均温度" prop="avgtemperaturevalue"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column align="center" label="平均速度" prop="avgspeed"
|
|
|
|
|
/>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<!-- 分页-->
|
|
|
|
@ -119,12 +68,15 @@
|
|
|
|
|
:total="total"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogTableVisible" @opened="dialogOpened">
|
|
|
|
|
<temp ref="tempRef" width='900px'/>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script name="Test" setup>
|
|
|
|
|
import {addTest, delTest, getTest, listTest, updateTest} from "@/api/GPS/tyre";
|
|
|
|
|
import {listTest,getChartData} from "@/api/GPS/tyre";
|
|
|
|
|
import Temp from '@/views/dashboard/Temp'
|
|
|
|
|
|
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
@ -143,23 +95,52 @@ const showSearch = ref(true);
|
|
|
|
|
// 总条数
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
const dateRange = ref([]);
|
|
|
|
|
// 模态框是否显示
|
|
|
|
|
const dialogTableVisible = ref(false)
|
|
|
|
|
const tempRef = ref();
|
|
|
|
|
const outerTireNumberNow = ref('')
|
|
|
|
|
|
|
|
|
|
// 搜索参数
|
|
|
|
|
const queryParams = ref({
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
internationalization1: undefined,
|
|
|
|
|
internationalization2: undefined,
|
|
|
|
|
outerTireNumber: undefined,
|
|
|
|
|
internationalization3: undefined,
|
|
|
|
|
internationalization4: undefined,
|
|
|
|
|
internationalization5: undefined,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const rowClick = (e) => {
|
|
|
|
|
outerTireNumberNow.value = e.outerTireNumber
|
|
|
|
|
dialogTableVisible.value = true
|
|
|
|
|
}
|
|
|
|
|
const dialogOpened = ()=>{
|
|
|
|
|
console.log(tempRef)
|
|
|
|
|
getChartData({outerTireNumber:outerTireNumberNow.value}).then(val=>{
|
|
|
|
|
console.log(val)
|
|
|
|
|
tempRef.value.setData(val.data);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
|
function getList() {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
listTest(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
|
|
|
|
let str = queryParams.value.outerTireNumber || ''
|
|
|
|
|
str = str.replace(',',' ')
|
|
|
|
|
str = str.replace(',',' ')
|
|
|
|
|
str = str.replace('、',' ')
|
|
|
|
|
let dataRow = str.split(' ')
|
|
|
|
|
let data = dataRow?.filter(e=>!!e) || []
|
|
|
|
|
let params= {
|
|
|
|
|
outerTireNumbers:data?.toString(),
|
|
|
|
|
// params:{
|
|
|
|
|
// beginTime:dateRange.value?.[0],
|
|
|
|
|
// endTime:dateRange.value?.[1],
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
listTest(proxy.addDateRange(params, dateRange.value)).then(response => {
|
|
|
|
|
postList.value = response.rows;
|
|
|
|
|
total.value = response.total;
|
|
|
|
|
}).finally(() => {
|
|
|
|
@ -167,12 +148,6 @@ function getList() {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 取消按钮 */
|
|
|
|
|
function cancel() {
|
|
|
|
|
open.value = false;
|
|
|
|
|
reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
function handleQuery() {
|
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
|