增加车辆基础信息界面

master
夜笙歌 2 years ago
parent 75b607bbde
commit 48535cc1f5

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询轮胎基础信息列表
export function listBaseCar(query) {
return request({
url: '/basetyre/basetyre/list',
method: 'get',
params: query
})
}
// 查询轮胎基础信息详细
export function getBaseCar(id) {
return request({
url: '/basetyre/basetyre/' + id,
method: 'get'
})
}
// 新增轮胎基础信息
export function addBaseCar(data) {
return request({
url: '/basetyre/basetyre',
method: 'post',
data: data
})
}
// 修改轮胎基础信息
export function updateBaseCar(data) {
return request({
url: '/basetyre/basetyre',
method: 'put',
data: data
})
}
// 删除轮胎基础信息
export function delBaseCar(id) {
return request({
url: '/basetyre/basetyre/' + id,
method: 'delete'
})
}

@ -19,7 +19,7 @@ export default {
sidebarLogo: 'Sidebar Logo'
},
option: {
refresh:'refresh',
refresh: 'refresh',
option: 'option',
edit: 'Edit',
remove: 'Remove',
@ -29,6 +29,7 @@ export default {
reset: 'reset'
},
common: {
success: 'success',
show: 'show',
hide: 'hide',
pleaseEnter: 'please enter ',
@ -37,10 +38,13 @@ export default {
isRemove: 'Is it deleted',
creatorId: 'Creator ID',
creatorName: 'Creator name',
createTime: 'Create Time',
createBy: 'Creator',
editTime: 'Edit time',
editID: 'Editor\'s ID',
editAccount: 'Editor\'s account',
editName: 'Editor\'s name'
editName: 'Editor\'s name',
editBy: 'Editor',
},
tireManagement: {
tireFactoryCode: 'Tire Factory Code',
@ -50,9 +54,33 @@ export default {
wheelPosition: 'Wheel Position',
tireSensorID: 'Tire Sensor ID',
treadDepth: 'Tread Depth',
carId:'Car ID',
tireModel:'Tire Model',
tireModelId:'Tire ModelId',
brandId:'Brand ID'
carId: 'Car ID',
tireModel: 'Tire Model',
tireModelId: 'Tire Model ID',
brandId: 'Brand ID',
addTitle: 'Add tire basic information',
editTitle: 'Modify tire basic information',
},
baseCar: {
car: {
companyCode: 'Enterprise number',
carQueueId: 'Fleet ID',
caiTypeId: 'Model ID',
carLicense: 'Plate Number',
carLicenseIn: 'Internal Plate Number',
carLicenseParent: 'Head Car Plate Number',
carIdParent: 'Head Car ID',
userId: 'Driver ID',
userName: 'Driver Name',
deviceId: 'Sensor ID',
deviceBindTime: 'Sensor Binding Time',
firstChangeDate: 'First Replacement Date',
trailerNum: 'Trailer Num',
isHandDevice: 'Whether Or Not Manually maintain the sensor',
isHasDevice: 'Whether Or Not independent sensor',
longitude: 'Longitude',
latitude: 'Latitude',
tiresTotal: 'Tire Quantity',
}
}
}

@ -19,7 +19,7 @@ export default {
sidebarLogo: '侧边栏 Logo'
},
option: {
refresh:'刷新',
refresh: '刷新',
option: '操作',
edit: '修改',
remove: '删除',
@ -29,18 +29,22 @@ export default {
reset: '重置'
},
common: {
show:'显示',
hide:'隐藏',
success: '成功',
show: '显示',
hide: '隐藏',
pleaseEnter: '请输入',
PleaseSelect: '请选择',
state: '状态',
isRemove: '是否删除',
creatorId: '创建者Id',
creatorName: '创建者姓名',
createTime: '创建时间',
createBy: '创建人',
editTime: '修改时间',
editID: '修改者ID',
editAccount: '修改者账号',
editName: '编辑者姓名'
editName: '编辑者姓名',
editBy: '修改人',
},
tireManagement: {
tireFactoryCode: '轮胎厂编码',
@ -50,9 +54,33 @@ export default {
wheelPosition: '轮位',
tireSensorID: '轮胎传感器ID',
treadDepth: '花纹深度',
carId:'车辆ID',
tireModel:'轮胎型号',
tireModelId:'轮胎型号表ID',
brandId:'品牌ID'
carId: '车辆ID',
tireModel: '轮胎型号',
tireModelId: '轮胎型号表ID',
brandId: '品牌ID',
addTitle: '添加轮胎基础信息',
editTitle: '修改轮胎基础信息',
},
baseCar: {
car: {
companyCode: '企业编号',
carQueueId: '车队ID',
carTypeId: '车型ID',
carLicense: '车牌号',
carLicenseIn: '内部牌号',
carLicenseParent: '车头牌号',
carIdParent: '车头ID',
userId: '司机ID',
userName: '司机姓名',
deviceId: '接收器ID',
deviceBindTime: '接收器绑定时间',
firstChangeDate: '初换日期',
trailerNum: '布局挂数',
isHandDevice: '是否手工维护接收器',
isHasDevice: '是否独立接收器',
longitude: '经度',
latitude: '纬度',
tiresTotal: '轮胎数',
}
}
}

@ -0,0 +1,755 @@
<template>
<div class="app-container">
<!-- 搜索栏-->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"
:label-width=" locale ? '110px':'140px'">
<el-form-item :label="t('baseCar.car.companyCode')" prop="companyCode">
<el-input
v-model="queryParams.companyCode"
:placeholder=" t('common.pleaseEnter') + t('baseCar.car.companyCode')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carQueueId')" prop="carQueueId">
<el-input
v-model="queryParams.carQueueId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carTypeId')" prop="carTypeId">
<el-input
v-model="queryParams.carTypeId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carTypeId')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carLicense')" prop="carLicense">
<el-input
v-model="queryParams.carLicense"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carLicenseIn')" prop="carLicenseIn">
<el-input
v-model="queryParams.carLicenseIn"
:placeholder="t('baseCar.car.companyCode') +t('baseCar.car.carLicenseIn')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carLicenseParent')" prop="carLicenseParent">
<el-input
v-model="queryParams.carLicenseParent"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicenseParent')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carIdParent')" prop="carIdParent">
<el-input
v-model="queryParams.carIdParent"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carIdParent')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.userId')" prop="userId">
<el-input
v-model="queryParams.userId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.userId')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.userName')" prop="userName">
<el-input
v-model="queryParams.userName"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.userName')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.deviceId')" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.deviceId')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.deviceBindTime')" prop="deviceBindTime">
<el-date-picker
clearable
style="width: 200px"
v-model="queryParams.deviceBindTime"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('baseCar.car.deviceBindTime')"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.firstChangeDate')" prop="firstChangeDate">
<el-date-picker
clearable
style="width: 200px"
v-model="queryParams.firstChangeDate"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('baseCar.car.firstChangeDate')"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.trailerNum')" prop="trailerNum">
<el-input
v-model="queryParams.trailerNum"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.trailerNum')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.isHandDevice')" prop="isHandDevice">
<el-input
v-model="queryParams.isHandDevice"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.isHandDevice')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.isHasDevice')" prop="isHasDevice">
<el-input
v-model="queryParams.isHasDevice"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.isHasDevice')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.longitude')" prop="longitude">
<el-input
v-model="queryParams.longitude"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.longitude')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.latitude')" prop="latitude">
<el-input
v-model="queryParams.latitude"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.latitude')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('baseCar.car.tiresTotal')" prop="tiresTotal">
<el-input
v-model="queryParams.tiresTotal"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.tiresTotal')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('common.isRemove')" prop="isDelete">
<el-input
v-model="queryParams.tiresTotal"
:placeholder="t('common.pleaseEnter') + t('common.isRemove')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('common.createTime')" prop="createTime">
<el-date-picker
clearable
style="width: 200px"
v-model="queryParams.createTime"
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.creatorId')" prop="createId">
<el-input
v-model="queryParams.createId"
:placeholder="t('common.pleaseEnter') + t('common.creatorId')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('common.createBy')" prop="createBy">
<el-input
v-model="queryParams.createBy"
:placeholder="t('common.pleaseEnter') + t('common.createBy')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('common.creatorName')" prop="createName">
<el-input
v-model="queryParams.createName"
:placeholder="t('common.pleaseEnter') + t('common.creatorName')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('common.editTime')" prop="modifyTime">
<el-date-picker
clearable
style="width: 200px"
v-model="queryParams.modifyTime"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.editID')" prop="modifyId">
<el-input
v-model="queryParams.modifyId"
:placeholder="t('common.pleaseEnter') + t('common.editID')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('common.editBy')" prop="modifyBy">
<el-input
v-model="queryParams.modifyBy"
:placeholder="t('common.pleaseEnter') + t('common.editBy')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" icon="Search" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
<!-- 顶部操作按钮-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['basetyre:basetyre:export']"
>{{ 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 type="selection" width="55" align="center" fixed/>
<el-table-column :label="t('baseCar.car.companyCode')" align="center" prop="companyCode" width="150"/>
<el-table-column :label="t('baseCar.car.carQueueId')" align="center" prop="carQueueId" width="150"/>
<el-table-column :label="t('baseCar.car.carTypeId')" align="center" prop="carTypeId" width="150"/>
<el-table-column :label="t('baseCar.car.carLicense')" align="center" prop="carLicense" width="150"/>
<el-table-column :label="t('baseCar.car.carLicenseIn')" align="center" prop="carLicenseIn" width="150"/>
<el-table-column :label="t('baseCar.car.carLicenseParent')" align="center" prop="carLicenseParent" width="150"/>
<el-table-column :label="t('baseCar.car.carIdParent')" align="center" prop="carIdParent" width="150"/>
<el-table-column :label="t('baseCar.car.userId')" align="center" prop="userId" width="150"/>
<el-table-column :label="t('baseCar.car.userName')" align="center" prop="userName" 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.firstChangeDate')" align="center" prop="firstChangeDate" width="150"/>
<el-table-column :label="t('baseCar.car.trailerNum')" align="center" prop="trailerNum" width="150"/>
<el-table-column :label="t('baseCar.car.isHandDevice')" align="center" prop="isHandDevice" width="150"/>
<el-table-column :label="t('baseCar.car.isHasDevice')" align="center" prop="isHasDevice" width="150"/>
<el-table-column :label="t('baseCar.car.longitude')" align="center" prop="longitude" width="150"/>
<el-table-column :label="t('baseCar.car.latitude')" align="center" prop="latitude" width="150"/>
<el-table-column :label="t('baseCar.car.tiresTotal')" align="center" prop="tiresTotal" width="150"/>
<el-table-column :label="t('common.isRemove')" align="center" prop="isDelete" width="150"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="150"/>
<el-table-column :label="t('common.creatorId')" align="center" prop="createId" width="150"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createBy" width="150"/>
<el-table-column :label="t('common.creatorName')" align="center" prop="createName" width="150"/>
<el-table-column :label="t('common.editTime')" align="center" prop="modifyTime" width="150"/>
<el-table-column :label="t('common.editID')" align="center" prop="modifyId" width="150"/>
<el-table-column :label="t('common.editBy')" align="center" prop="modifyBy" width="150"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<template #default="scope">
<el-button
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页-->
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="postRef" :model="form" :rules="rules" :label-width=" locale ? '100px':'140px'">
<el-form-item :label="t('baseCar.car.companyCode')" prop="companyCode">
<el-input
v-model="form.companyCode"
:placeholder=" t('common.pleaseEnter') + t('baseCar.car.companyCode')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carQueueId')" prop="carQueueId">
<el-input
v-model="form.carQueueId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carTypeId')" prop="carTypeId">
<el-input
v-model="form.carTypeId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carTypeId')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carLicense')" prop="carLicense">
<el-input
v-model="form.carLicense"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carLicenseIn')" prop="carLicenseIn">
<el-input
v-model="form.carLicenseIn"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicenseIn')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carLicenseParent')" prop="carLicenseParent">
<el-input
v-model="form.carLicenseParent"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicenseParent')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.carIdParent')" prop="carIdParent">
<el-input
v-model="form.carIdParent"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carIdParent')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.userId')" prop="userId">
<el-input
v-model="form.userId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.userId')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.userName')" prop="userName">
<el-input
v-model="form.userName"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.userName')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.deviceId')" prop="deviceId">
<el-input
v-model="form.deviceId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.deviceId')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.deviceBindTime')" prop="deviceBindTime">
<el-date-picker
clearable
v-model="form.deviceBindTime"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('baseCar.car.deviceBindTime')">
</el-date-picker>
</el-form-item>
<el-form-item :label="t('baseCar.car.firstChangeDate')" prop="firstChangeDate">
<el-date-picker
clearable
v-model="form.firstChangeDate"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('baseCar.car.firstChangeDate')">
</el-date-picker>
</el-form-item>
<el-form-item :label="t('baseCar.car.trailerNum')" prop="trailerNum">
<el-input
v-model="form.trailerNum"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.trailerNum')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.isHandDevice')" prop="isHandDevice">
<el-input
v-model="form.isHandDevice"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.isHandDevice')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.isHasDevice')" prop="isHasDevice">
<el-input
v-model="form.isHasDevice"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.isHasDevice')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.longitude')" prop="longitude">
<el-input
v-model="form.longitude"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.longitude')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.latitude')" prop="latitude">
<el-input
v-model="form.latitude"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.latitude')"/>
</el-form-item>
<el-form-item :label="t('baseCar.car.tiresTotal')" prop="tiresTotal">
<el-input
v-model="form.tiresTotal"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.tiresTotal')"/>
</el-form-item>
<el-form-item :label="t('common.isRemove')" prop="isDelete">
<el-input
v-model="form.isDelete"
:placeholder="t('common.pleaseEnter') + t('common.isRemove')"/>
</el-form-item>
<el-form-item :label="t('common.createTime')" prop="createTime">
<el-date-picker
clearable
v-model="form.createTime"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('common.createTime')">
</el-date-picker>
</el-form-item>
<el-form-item :label="t('common.creatorId')" prop="createId">
<el-input
v-model="form.createId"
:placeholder="t('common.pleaseEnter') + t('common.creatorId')"/>
</el-form-item>
<el-form-item :label="t('common.createBy')" prop="createBy">
<el-input
v-model="form.createBy"
:placeholder="t('common.pleaseEnter') + t('common.createBy')"/>
</el-form-item>
<el-form-item :label="t('common.creatorName')" prop="createName">
<el-input
v-model="form.createName"
:placeholder="t('common.pleaseEnter') + t('common.creatorName')"/>
</el-form-item>
<el-form-item :label="t('common.editTime')" prop="modifyTime">
<el-date-picker
clearable
v-model="form.modifyTime"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('common.editTime')">
</el-date-picker>
</el-form-item>
<el-form-item :label="t('common.editID')" prop="modifyId">
<el-input
v-model="form.modifyId"
:placeholder="t('common.pleaseEnter') + t('common.editID')"/>
</el-form-item>
<el-form-item :label="t('common.editBy')" prop="modifyBy">
<el-input
v-model="form.modifyBy"
:placeholder="t('common.pleaseEnter') + t('common.editBy')"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="basetyre">
import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar} from "@/api/basecar/car";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zh-cn') === 'zh-cn'
const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable");
//
const postList = ref([]);
//
const open = ref(false);
//
const loading = ref(true);
//
const showSearch = ref(true);
// id
const ids = ref([]);
//
const single = ref(true);
//
const multiple = ref(true);
//
const total = ref(0);
//
const title = ref("");
//
const queryParams = ref({
pageNum: 1,
pageSize: 10,
companyCode: undefined,
carQueueId: undefined,
carTypeId: undefined,
carLicense: undefined,
carLicenseIn: undefined,
carLicenseParent: undefined,
carIdParent: undefined,
userId: undefined,
userName: undefined,
deviceId: undefined,
deviceBindTime: undefined,
firstChangeDate: undefined,
trailerNum: undefined,
isHandDevice: undefined,
isHasDevice: undefined,
longitude: undefined,
latitude: undefined,
tiresTotal: undefined,
isDelete: undefined,
createTime: undefined,
createId: undefined,
createBy: undefined,
createName: undefined,
modifyTime: undefined,
modifyId: undefined,
modifyBy: undefined,
})
//
const rules = {
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
}
//
const form = ref({
id: null,
companyCode: null,
carQueueId: null,
carTypeId: null,
carLicense: null,
carLicenseIn: null,
carLicenseParent: null,
carIdParent: null,
userId: null,
userName: null,
deviceId: null,
deviceBindTime: null,
firstChangeDate: null,
trailerNum: null,
isHandDevice: null,
isHasDevice: null,
longitude: null,
latitude: null,
tiresTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null
});
/** 查询岗位列表 */
function getList() {
loading.value = true;
listBaseCar(queryParams.value).then(response => {
postList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
id: null,
companyCode: null,
carQueueId: null,
carTypeId: null,
carLicense: null,
carLicenseIn: null,
carLicenseParent: null,
carIdParent: null,
userId: null,
userName: null,
deviceId: null,
deviceBindTime: null,
firstChangeDate: null,
trailerNum: null,
isHandDevice: null,
isHasDevice: null,
longitude: null,
latitude: null,
tiresTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null
};
proxy.resetForm("postRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
proxy.resetForm("queryRef");
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.postId);
single.value = selection.length !== 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = t('tireManagement.addTitle');
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const postId = row.postId || ids.value;
getBaseCar(postId).then(response => {
form.value = response.data;
open.value = true;
title.value = t('tireManagement.editTitle');
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.postId != undefined) {
updateBaseCar(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addBaseCar(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const postIds = row.postId || ids.value;
proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function () {
return delBaseCar(postIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {
});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/post/export", {
...queryParams.value
}, `post_${new Date().getTime()}.xlsx`);
}
getList();
</script>

@ -108,6 +108,7 @@
style="width: 200px"
v-model="queryParams.modifyTime"
type="date"
format="YYYY/MM/DD"
value-format="yyyy-MM-dd"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
/>
@ -445,7 +446,7 @@ function handleSelectionChange(selection) {
function handleAdd() {
reset();
open.value = true;
title.value = "添加轮胎基础信息";
title.value = t('tireManagement.addTitle');
}
/** 修改按钮操作 */
@ -455,7 +456,7 @@ function handleUpdate(row) {
getBasetyre(postId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改轮胎基础信息";
title.value = t('tireManagement.editTitle');
});
}
@ -500,4 +501,5 @@ function handleExport() {
}
getList();
</script>

Loading…
Cancel
Save