修改单车监控界面

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', tyreFacCode: 'Tire Factory Code',
companyCode: 'Enterprise number', companyCode: 'Enterprise number',
internetThingsNo: 'IoT Card Number', internetThingsNo: 'IoT Card Number',
simCode: 'sim Code', simCode: 'phone',
deviceType: 'Equipment Type', deviceType: 'Equipment Type',
state: 'State', state: 'State',
activeTime: 'Activation Time', activeTime: 'Activation Time',

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

@ -73,35 +73,50 @@
<el-table :data="props.row.baseCarList"> <el-table :data="props.row.baseCarList">
<el-table-column v-if="false" align="center" label="id" prop="id"/> <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="车牌号" 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> </el-table>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed type="selection" width="55"/> <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.title')" align="center" prop="title" width="150"/>
<el-table-column :label="t('baseCar.carQueue.state')" align="center" prop="state"/> <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">
<template #default="scope"> <template #default="scope">
<el-button <el-tag :type="scope.row.state === 1 ? 'danger':'success'" class="ml-2">{{
v-hasPermi="['carqueue:carqueue:edit']" scope.row.state === 1 ? '停用' : '启用'
icon="Edit" }}
type="text" </el-tag>
@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> </template>
</el-table-column> </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> </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.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('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.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" <el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160"> width="160">
<template #default="scope"> <template #default="scope">

@ -59,7 +59,15 @@
<el-table-column align="center" fixed type="selection" width="55"/> <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.title')" align="center" prop="title"/>
<el-table-column :label="t('baseCar.carType.state')" align="center" prop="state" <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" <el-table-column :label="t('baseCar.carType.axleTotal')" align="center" prop="axleTotal"
width="150"/> width="150"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime"/> <el-table-column :label="t('common.createTime')" align="center" prop="createTime"/>
@ -74,13 +82,13 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>{{ t('option.edit') }} >{{ t('option.edit') }}
</el-button> </el-button>
<el-button <!-- <el-button-->
v-hasPermi="['cartype:cartype:remove']" <!-- v-hasPermi="['cartype:cartype:remove']"-->
icon="Delete" <!-- icon="Delete"-->
type="text" <!-- type="text"-->
@click="handleDelete(scope.row)" <!-- @click="handleDelete(scope.row)"-->
>{{ t('option.remove') }} <!-- >{{ t('option.remove') }}-->
</el-button> <!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

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

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

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

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

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

Loading…
Cancel
Save