修改单车监控界面

master
夜笙歌 2 years ago
parent 52b80b988e
commit 7d2266c5c9

@ -27,3 +27,4 @@ export function getTyreList(query) {
})
}

@ -194,7 +194,7 @@ export default {
tyreFacCode: 'Tire Factory Code',
companyCode: 'Enterprise number',
internetThingsNo: 'IoT Card Number',
simCode: 'sim Code',
simCode: 'phone',
deviceType: 'Equipment Type',
state: 'State',
activeTime: 'Activation Time',

@ -194,7 +194,7 @@ export default {
tyreFacCode: '轮胎厂编码',
companyCode: '企业编码',
internetThingsNo: '物联卡卡号',
simCode: 'sim卡识别码',
simCode: '手机号',
deviceType: '设备类型',
state: '状态',
activeTime: '激活时间',

@ -73,35 +73,50 @@
<el-table :data="props.row.baseCarList">
<el-table-column v-if="false" align="center" label="id" prop="id"/>
<el-table-column align="center" label="车牌号" prop="carLicense"/>
<el-table-column align="center" label="State" prop="isDelete"/>
<el-table-column align="center" label="状态" prop="state">
<template #default="scope">
<el-tag :type="scope.row.state === 1 ? 'danger':'success'" class="ml-2">{{
scope.row.state === 1 ? '停用' : '启用'
}}
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column :label="t('baseCar.carQueue.title')" align="center" prop="title" width="150"/>
<el-table-column :label="t('baseCar.carQueue.state')" align="center" prop="state"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createName"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<el-table-column :label="t('baseCar.carQueue.state')" align="center" prop="state">
<template #default="scope">
<el-button
v-hasPermi="['carqueue:carqueue:edit']"
icon="Edit"
type="text"
@click="handleUpdate(scope.row)"
>{{ t('option.edit') }}
</el-button>
<el-button
v-hasPermi="['carqueue:carqueue:remove']"
icon="Delete"
type="text"
@click="handleDelete(scope.row)"
>{{ t('option.remove') }}
</el-button>
<el-tag :type="scope.row.state === 1 ? 'danger':'success'" class="ml-2">{{
scope.row.state === 1 ? '停用' : '启用'
}}
</el-tag>
</template>
</el-table-column>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createName"/>
<!-- <el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"-->
<!-- width="160">-->
<!-- <template #default="scope">-->
<!-- <el-button-->
<!-- v-hasPermi="['carqueue:carqueue:edit']"-->
<!-- icon="Edit"-->
<!-- type="text"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >{{ t('option.edit') }}-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- v-hasPermi="['carqueue:carqueue:remove']"-->
<!-- icon="Delete"-->
<!-- type="text"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >{{ t('option.remove') }}-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!-- 分页-->

@ -74,7 +74,7 @@
<el-table-column :label="t('baseCar.car.deviceId')" align="center" prop="deviceId" width="150"/>
<el-table-column :label="t('baseCar.car.deviceBindTime')" align="center" prop="deviceBindTime" width="150"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="160"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createBy" width="150"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createName" width="150"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<template #default="scope">

@ -59,7 +59,15 @@
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column :label="t('baseCar.carType.title')" align="center" prop="title"/>
<el-table-column :label="t('baseCar.carType.state')" align="center" prop="state"
width="150"/>
width="150">
<template #default="scope">
<el-tag :type="scope.row.state === 1 ? 'danger':'success'" class="ml-2">{{
scope.row.state === 1 ? '停用' : '启用'
}}
</el-tag>
</template>
</el-table-column>
<el-table-column :label="t('baseCar.carType.axleTotal')" align="center" prop="axleTotal"
width="150"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime"/>
@ -74,13 +82,13 @@
@click="handleUpdate(scope.row)"
>{{ t('option.edit') }}
</el-button>
<el-button
v-hasPermi="['cartype:cartype:remove']"
icon="Delete"
type="text"
@click="handleDelete(scope.row)"
>{{ t('option.remove') }}
</el-button>
<!-- <el-button-->
<!-- v-hasPermi="['cartype:cartype:remove']"-->
<!-- icon="Delete"-->
<!-- type="text"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >{{ t('option.remove') }}-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>

@ -118,10 +118,12 @@
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column :label="t('baseDevice.baseDevice.internetThingsNo')" align="center" prop="internetThingsNo"
width="150"/>
<el-table-column align="center" label="SIM卡号" prop="simCode"
width="150"/>
<el-table-column :label="t('baseDevice.baseDevice.deviceType')" align="center" prop="deviceType"
>
<template #default="scope">
{{ scope.row.state === 0? 'GPS接收机' : '胎压传感器' }}
{{ scope.row.state === 0 ? 'GPS接收机' : '胎压传感器' }}
</template>
</el-table-column>
<el-table-column :label="t('baseDevice.baseDevice.state')" align="center" prop="state"
@ -138,7 +140,7 @@
<el-table-column :label="t('baseDevice.baseDevice.lastRunTime')" align="center" prop="lastRunTime"
width="150"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="160"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createBy"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createName"/>
</el-table>
<!-- 分页-->

@ -298,7 +298,6 @@ const getTyreInfo = (e) => {
if (!id) return
open.value = true
getTyreList(id).then(e => {
console.log(e.data)
tyreInfo.value = e.data
})
}

@ -317,6 +317,7 @@ const form = ref({});
/** 查询岗位列表 */
function getList() {
loading.value = true;
console.log(dateRange.value)
listBasetyre(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
postList.value = response.rows;
total.value = response.total;

@ -155,7 +155,7 @@ const form2 = ref({
})
const rules = {
outerTireNumber: [
{required: true, message: '请输入轮胎编号',trigger: 'change'},
{required: true, message: '请输入轮胎编号', trigger: 'change'},
]
}
const outerTireNumberOption = ref([
@ -202,6 +202,7 @@ const tyreClick = (e, location) => {
nowClick.value = e
let data = tireList.value.filter(res => res.tyrePositionVal === e)?.[0] || {}
form2.value = {...data, location}
console.log(data)
}
const getList = async () => {
@ -268,20 +269,31 @@ const outerTireNumberSearchClick = async () => {
const {data} = await getTyreInfo({outerTireNumber: form2.value.outerTireNumber})
let list = nowClick.value?.split('-').map(e => parseFloat(e))
let num = 0
for (let i = 0; i < list?.[0] - 1; i++) {
num += (tireArrangement.value[i] * 4)
}
if (list[1] === 1 && list[2] === 1) {
num += 4
}
if (list[1] === 1 && list[2] === 2) {
num += 3
}
if (list[1] === 2 && list[2] === 2) {
if (list[0] === 1) {
if (list[1] === 1 && list[2] === 1) {
num += 2
}
if (list[1] === 2 && list[2] === 1) {
num += 1
}
} else {
num += 2
}
if (list[1] === 2 && list[2] === 1) {
num += 1
for (let i = 1; i < list?.[0] - 1; i++) {
num += (tireArrangement.value[i - 1] * 4)
}
if (list[1] === 1 && list[2] === 1) {
num += 4
}
if (list[1] === 1 && list[2] === 2) {
num += 3
}
if (list[1] === 2 && list[2] === 2) {
num += 2
}
if (list[1] === 2 && list[2] === 1) {
num += 1
}
}
form2.value.brand = data.brand
form2.value.size = data.size
@ -298,6 +310,7 @@ const installClick = (e) => {
proxy.$refs["form22"].validate((valid) => {
if (valid) {
console.log(form2.value)
TyreInstall({
...form2.value,
carLicense: licenseNumberOption.value.filter(e => e.value === form.value.licenseNumber)?.[0].label,

@ -31,8 +31,8 @@ export default defineConfig(({mode, command}) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://10.11.41.249:8080',
// target: 'http://localhost:8080',
// target: 'http://10.11.41.249:8080',
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

Loading…
Cancel
Save