修改车辆类型新增模态框

master
夜笙歌 2 years ago
parent 9f7654d29d
commit 200ea24e1d

@ -42,6 +42,7 @@ export function delBaseCar(id) {
method: 'delete'
})
}
/** 获取车队、车型 */
export function getCarQueueList() {
return request({
@ -49,6 +50,7 @@ export function getCarQueueList() {
method: 'get'
})
}
// 获取接收器
export function getBindList(data) {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -38,55 +38,55 @@ export default {
saveConfiguration: '保存配置',
resetConfiguration: '重置配置',
},
profile:{
personalInfo:'个人信息',
userName:'用户名称',
phone:'手机号码',
email:'用户邮箱',
department:'所属部门',
role:'所属角色',
creationDate:'创建日期',
basicInformation:'基本资料',
changePassword:'修改密码'
profile: {
personalInfo: '个人信息',
userName: '用户名称',
phone: '手机号码',
email: '用户邮箱',
department: '所属部门',
role: '所属角色',
creationDate: '创建日期',
basicInformation: '基本资料',
changePassword: '修改密码'
},
userInfo:{
username:'用户昵称',
phone:'手机号码',
email:'邮箱',
sex:'性别',
male:'男',
female:'女'
userInfo: {
username: '用户昵称',
phone: '手机号码',
email: '邮箱',
sex: '性别',
male: '男',
female: '女'
},
userAvatar:{
uploadAvatar:'点击上传头像',
choose:'选择',
submit:'提 交',
ModifyAvatar:'修改头像'
userAvatar: {
uploadAvatar: '点击上传头像',
choose: '选择',
submit: '提 交',
ModifyAvatar: '修改头像'
},
resetPwd:{
oldPassword:'旧密码',
newPassword:'新密码',
confirmPassword:'确认密码',
resetPwd: {
oldPassword: '旧密码',
newPassword: '新密码',
confirmPassword: '确认密码',
},
sizeSelect:{
large:'较大',
default:'默认',
small:'稍小',
wait:'正在设置布局大小,请稍候...',
sizeSelect: {
large: '较大',
default: '默认',
small: '稍小',
wait: '正在设置布局大小,请稍候...',
},
request:{
repeatedSubmit:'数据正在处理,请勿重复提交',
LoginStatusExpired:'登录状态已过期,您可以继续留在该页面,或者重新登录',
systemHint:'系统提示',
reRegister:'重新登录',
cancel:'取消',
expired:'无效的会话,或者会话已过期,请重新登录。',
connectionException:'后端接口连接异常',
timeout:'系统接口请求超时',
interface:'系统接口',
exception:'异常',
download:'正在下载数据,请稍候',
downloadErr:'下载文件出现错误,请联系管理员!'
request: {
repeatedSubmit: '数据正在处理,请勿重复提交',
LoginStatusExpired: '登录状态已过期,您可以继续留在该页面,或者重新登录',
systemHint: '系统提示',
reRegister: '重新登录',
cancel: '取消',
expired: '无效的会话,或者会话已过期,请重新登录。',
connectionException: '后端接口连接异常',
timeout: '系统接口请求超时',
interface: '系统接口',
exception: '异常',
download: '正在下载数据,请稍候',
downloadErr: '下载文件出现错误,请联系管理员!'
},
option: {
refresh: '刷新',
@ -100,15 +100,15 @@ export default {
cancel: '取 消',
ok: '确 定',
hint: '提示',
save:'保存',
close:'关闭',
save: '保存',
close: '关闭',
confirmDeletion: '是否确认删除%{key}为%{value}的数据项?',
modificationSuccessful: '修改成功',
addedSuccessfully: '新增成功',
successfullyDeleted: '删除成功'
},
common: {
loadTitle:'正在加载系统资源,请耐心等待',
loadTitle: '正在加载系统资源,请耐心等待',
success: '成功',
show: '显示',
hide: '隐藏',
@ -143,8 +143,8 @@ export default {
},
baseCar: {
car: {
team:'所属车队',
model:'所属车型',
team: '所属车队',
model: '所属车型',
companyCode: '企业编号',
carQueueId: '车队ID',
carTypeId: '车型ID',
@ -203,28 +203,28 @@ export default {
editTitle: '修改设备信息',
}
},
test:{
test:{
internationalization1:'zh1',
internationalization2:'zh2',
internationalization3:'zh3',
internationalization4:'zh4',
internationalization5:'zh5',
internationalization6:'zh6',
internationalization7:'zh7',
internationalization8:'zh8',
internationalization9:'zh9',
internationalization10:'zh10',
internationalization11:'zh11',
internationalization12:'zh12',
internationalization13:'zh13',
internationalization14:'zh14',
internationalization15:'zh15',
internationalization16:'zh16',
internationalization17:'zh17',
internationalization18:'zh18',
internationalization19:'zh19',
internationalization20:'zh20',
test: {
test: {
internationalization1: 'zh1',
internationalization2: 'zh2',
internationalization3: 'zh3',
internationalization4: 'zh4',
internationalization5: 'zh5',
internationalization6: 'zh6',
internationalization7: 'zh7',
internationalization8: 'zh8',
internationalization9: 'zh9',
internationalization10: 'zh10',
internationalization11: 'zh11',
internationalization12: 'zh12',
internationalization13: 'zh13',
internationalization14: 'zh14',
internationalization15: 'zh15',
internationalization16: 'zh16',
internationalization17: 'zh17',
internationalization18: 'zh18',
internationalization19: 'zh19',
internationalization20: 'zh20',
addTitle: '添加设备信息',
editTitle: '修改设备信息',
}

@ -48,6 +48,7 @@
</template>
<script setup>
import ScrollPane from './ScrollPane'
import {getNormalPath} from '@/utils/ruoyi'
import useTagsViewStore from '@/store/modules/tagsView'
import useSettingsStore from '@/store/modules/settings'

@ -311,7 +311,7 @@ const bindOk = () => {
let params = {
deviceId: bindValue.value,
id: waitBind.value,
deviceBindTime:parseTime(new Date(), '{y}-{m}-{d}')
deviceBindTime: parseTime(new Date(), '{y}-{m}-{d}')
}
updateBaseCar(params).then(() => {
bindValue.value = '';

@ -1,150 +1,19 @@
<template>
<div class="app-container">
<!-- 搜索栏-->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"
:label-width=" locale ? '90px':'140px'">
<el-form-item :label="t('baseCar.carQueue.title')" prop="title">
<el-input
v-model="queryParams.title"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.title')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item :label="t('baseCar.carQueue.tyreFacCode')" prop="tyreFacCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.tyreFacCode"-->
<!-- :placeholder=" t('common.pleaseEnter') + t('baseCar.carQueue.tyreFacCode')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carQueue.companyCode')" prop="companyCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.companyCode"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.companyCode')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carQueue.state')" prop="state">-->
<!-- <el-input-->
<!-- v-model="queryParams.state"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.state')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carQueue.groupTotal')" prop="groupTotal">-->
<!-- <el-input-->
<!-- v-model="queryParams.groupTotal"-->
<!-- :placeholder="t('common.pleaseEnter') +t('baseCar.carQueue.groupTotal')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carQueue.carTotal')" prop="carTotal">-->
<!-- <el-input-->
<!-- v-model="queryParams.carTotal"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.carTotal')"-->
<!-- 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.isDelete"-->
<!-- :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="t('common.editName')" prop="modifyName">-->
<!-- <el-input-->
<!-- v-model="queryParams.modifyName"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.editName')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '90px':'140px'"
:model="queryParams">
<el-form-item :label="t('baseCar.carQueue.title')" prop="title">
<el-input
v-model="queryParams.title"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.title')"
clearable
style="width: 200px"
@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="Search" type="primary" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
@ -153,43 +22,43 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
v-hasPermi="['carqueue:carqueue:add']"
icon="Plus"
plain
type="primary"
@click="handleAdd"
v-hasPermi="['carqueue:carqueue:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
v-hasPermi="['carqueue:carqueue:edit']"
:disabled="single"
icon="Edit"
plain
type="success"
@click="handleUpdate"
v-hasPermi="['carqueue:carqueue:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
v-hasPermi="['carqueue:carqueue:remove']"
:disabled="multiple"
icon="Delete"
plain
type="danger"
@click="handleDelete"
v-hasPermi="['carqueue:carqueue:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
v-hasPermi="['carqueue:carqueue:export']"
icon="Download"
plain
type="warning"
@click="handleExport"
v-hasPermi="['carqueue:carqueue:export']"
>{{ t('option.export') }}
</el-button>
</el-col>
@ -198,39 +67,39 @@
<!-- 表格主体-->
<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.carQueue.tyreFacCode')" align="center" prop="tyreFacCode" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.carQueue.companyCode')" align="center" prop="companyCode" width="150"/>-->
<el-table-column type="expand">
<template #default="props">
<div>
<el-table :data="props.row.children">
<el-table-column label=" " prop=" " width="150"/>
<el-table-column label="Name" prop="title"/>
<el-table-column label="State" prop="state"/>
<el-table-column label="City" prop="createTime"/>
<el-table-column label="Address" prop="createBy"/>
</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" width="150"/>
<!-- <el-table-column :label="t('baseCar.carQueue.groupTotal')" align="center" prop="groupTotal"-->
<!-- width="150"/>-->
<!-- <el-table-column :label="t('baseCar.carQueue.carTotal')" align="center" prop="carTotal"-->
<!-- 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="160"/>
<!-- <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('common.editName')" align="center" prop="modifyName" 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="createBy"/>
<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"
v-hasPermi="['carqueue:carqueue:edit']"
icon="Edit"
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['carqueue:carqueue:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
v-hasPermi="['carqueue:carqueue:remove']"
icon="Delete"
type="text"
@click="handleDelete(scope.row)"
v-hasPermi="['carqueue:carqueue:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
@ -240,16 +109,16 @@
<!-- 分页-->
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@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 ? '90px':'140px'">
<el-form-item prop="id" v-if="false">
<el-dialog v-model="open" :title="title" append-to-body width="500px">
<el-form ref="postRef" :label-width=" locale ? '90px':'140px'" :model="form" :rules="rules">
<el-form-item v-if="false" prop="id">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.tyreFacCode')" prop="tyreFacCode">
@ -289,12 +158,12 @@
</el-form-item>
<el-form-item :label="t('common.createTime')" prop="createTime">
<el-date-picker
clearable
v-model="form.createTime"
type="date"
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
/>
</el-form-item>
<el-form-item :label="t('common.creatorId')" prop="createId">
@ -314,12 +183,12 @@
</el-form-item>
<el-form-item :label="t('common.editTime')" prop="modifyTime">
<el-date-picker
clearable
v-model="form.modifyTime"
type="date"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
/>
</el-form-item>
<el-form-item :label="t('common.editID')" prop="modifyId">
@ -348,7 +217,7 @@
</div>
</template>
<script setup name="CarQueue">
<script name="CarQueue" setup>
import {addCarQueue, delCarQueue, getCarQueue, listCarQueue, updateCarQueue} from "@/api/basecar/carqueue";
import {useI18n} from 'vue-i18n';

@ -1,168 +1,19 @@
<template>
<div class="app-container">
<!-- 搜索栏-->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"
:label-width=" locale ? '100px':'140px'">
<el-form-item :label="t('baseCar.carType.title')" prop="title">
<el-input
v-model="queryParams.title"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.title')"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item :label="t('baseCar.carType.tyreFacCode')" prop="tyreFacCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.tyreFacCode"-->
<!-- :placeholder=" t('common.pleaseEnter') + t('baseCar.carType.companyCode')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carType.companyCode')" prop="companyCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.companyCode"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carType.companyCode')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carType.code')" prop="code">-->
<!-- <el-input-->
<!-- v-model="queryParams.code"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carType.code')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- -->
<!-- <el-form-item :label="t('baseCar.carType.state')" prop="state">-->
<!-- <el-input-->
<!-- v-model="queryParams.state"-->
<!-- :placeholder="t('common.pleaseEnter') +t('baseCar.carType.state')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carType.axleTotal')" prop="axleTotal">-->
<!-- <el-input-->
<!-- v-model="queryParams.axleTotal"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carType.axleTotal')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carType.tyreTotal')" prop="tyreTotal">-->
<!-- <el-input-->
<!-- v-model="queryParams.tyreTotal"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carType.tyreTotal')"-->
<!-- 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.isDelete"-->
<!-- :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="t('common.editName')" prop="modifyName">-->
<!-- <el-input-->
<!-- v-model="queryParams.modifyName"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.editName')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.carType.trailerNum')" prop="trailerNum">-->
<!-- <el-input-->
<!-- v-model="queryParams.trailerNum"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.carType.trailerNum')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '100px':'140px'"
:model="queryParams">
<el-form-item :label="t('baseCar.carType.title')" prop="title">
<el-input
v-model="queryParams.title"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.title')"
clearable
style="width: 200px"
@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="Search" type="primary" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
@ -171,43 +22,43 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
v-hasPermi="['cartype:cartype:add']"
icon="Plus"
plain
type="primary"
@click="handleAdd"
v-hasPermi="['cartype:cartype:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
v-hasPermi="['cartype:cartype:edit']"
:disabled="single"
icon="Edit"
plain
type="success"
@click="handleUpdate"
v-hasPermi="['cartype:cartype:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
v-hasPermi="['cartype:cartype:remove']"
:disabled="multiple"
icon="Delete"
plain
type="danger"
@click="handleDelete"
v-hasPermi="['cartype:cartype:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
v-hasPermi="['cartype:cartype:export']"
icon="Download"
plain
type="warning"
@click="handleExport"
v-hasPermi="['cartype:cartype:export']"
>{{ t('option.export') }}
</el-button>
</el-col>
@ -216,41 +67,28 @@
<!-- 表格主体-->
<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.carType.tyreFacCode')" align="center" prop="tyreFacCode" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.carType.companyCode')" align="center" prop="companyCode" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.carType.code')" align="center" prop="code" width="150"/>-->
<el-table-column :label="t('baseCar.carType.title')" align="center" prop="title" width="150"/>
<el-table-column :label="t('baseCar.carType.state')" align="center" prop="state"
width="150"/>
<el-table-column :label="t('baseCar.carType.axleTotal')" align="center" prop="axleTotal"
width="150"/>
<!-- <el-table-column :label="t('baseCar.carType.tyreTotal')" align="center" prop="tyreTotal" 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="160"/>
<!-- <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('common.editName')" align="center" prop="modifyName" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.carType.trailerNum')" align="center" prop="trailerNum" 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"
v-hasPermi="['cartype:cartype:edit']"
icon="Edit"
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['cartype:cartype:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
v-hasPermi="['cartype:cartype:remove']"
icon="Delete"
type="text"
@click="handleDelete(scope.row)"
v-hasPermi="['cartype:cartype:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
@ -260,114 +98,76 @@
<!-- 分页-->
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@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 prop="id" v-if="false">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.tyreFacCode')" prop="tyreFacCode">
<el-input
v-model="form.tyreFacCode"
:placeholder=" t('common.pleaseEnter') + t('baseCar.carType.tyreFacCode')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.companyCode')" prop="companyCode">
<el-input
v-model="form.companyCode"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.companyCode')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.code')" prop="code">
<el-input
v-model="form.code"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.code')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.title')" prop="title">
<el-input
v-model="form.title"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.title')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.state')" prop="state">
<el-input
v-model="form.state"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.state')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.axleTotal')" prop="axleTotal">
<el-input
v-model="form.axleTotal"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.axleTotal')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carType.tyreTotal')" prop="tyreTotal">
<el-input
v-model="form.tyreTotal"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.tyreTotal')"/>
</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-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-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-item :label="t('common.editName')" prop="modifyName">
<el-input
v-model="form.modifyName"
:placeholder="t('common.pleaseEnter') + t('common.editName')"/>
<el-dialog v-model="open" :title="title" append-to-body width="80vw">
<el-form ref="postRef" :inline="true" :label-width=" locale ? '100px':'140px'" :model="form"
:rules="rules">
<el-form-item label="轮胎排数" prop="param1">
<el-select v-model="form.param1" placeholder="Select" size="large" @change="TireRowChange">
<el-option
v-for="item in TireRow"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('baseCar.carType.trailerNum')" prop="trailerNum">
<el-input
v-model="form.trailerNum"
:placeholder="t('common.pleaseEnter') + t('baseCar.carType.trailerNum')"/>
<el-form-item label="是否启用" prop="param2">
<el-switch v-model="form.param2"/>
</el-form-item>
</el-form>
<div style="width: 100%;text-align: center;height: 50px;line-height: 50px">轮胎布局图</div>
<div style="width: 100%;height: 80px;background-color: #eee">
<el-select v-for="(item,index) in TireRowInfo"
v-model="TireRowInfo[index]"
:style='"width:calc((80vw - 40px)/"+TireRowInfo.length+" );padding:20px"'
placeholder="Select" size="large">
<el-option
v-for="item in TireRowOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div style="margin-top: 4px">
<div style="width: 100%;height: 80px;background-color: #eee">
<div
v-for="(item,index) in TireRowInfo"
:style='"width:calc((80vw - 40px)/"+TireRowInfo.length+" );padding:20px;display:inline-block;text-align:center"'>
<img alt="" src="@/assets/images/tyre.png">
</div>
</div>
<div style="width: 100%;height: auto;background-color: #eee">
<div
v-for="(item,index) in TireRowInfo"
:style='"width:calc((80vw - 40px)/"+TireRowInfo.length+" );padding:20px;display:inline-block;text-align:center"'>
<img v-if="TireRowInfo[index] === 2" alt="" src="@/assets/images/tyre.png">
</div>
</div>
</div>
<div style="margin-top: 16px">
<div style="width: 100%;height: 80px;background-color: #eee;">
<div
v-for="(item,index) in TireRowInfo"
:style='"width:calc((80vw - 40px)/"+TireRowInfo.length+" );padding:4px 20px;display:inline-block;text-align:center"'>
<img alt="" src="@/assets/images/tyre.png">
</div>
</div>
<div style="width: 100%;height: auto;background-color: #eee">
<div
v-for="(item,index) in TireRowInfo"
:style='"width:calc((80vw - 40px)/"+TireRowInfo.length+" );padding: 4px 20px;display:inline-block;text-align:center"'>
<img v-if="TireRowInfo[index] === 2" alt="" src="@/assets/images/tyre.png">
</div>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ t('option.ok') }}</el-button>
@ -378,7 +178,7 @@
</div>
</template>
<script setup name="basetyre">
<script name="basetyre" setup>
import {addCartype, delCartype, getCartype, listCartype, updateCartype} from "@/api/basecar/cartype";
import {useI18n} from 'vue-i18n';
@ -409,6 +209,55 @@ const multiple = ref(true);
const total = ref(0);
//
const title = ref("");
//
const TireRow = [
{
value: 1,
label: '一排'
},
{
value: 2,
label: '二排'
},
{
value: 3,
label: '三排'
},
{
value: 4,
label: '四排'
},
{
value: 5,
label: '五排'
},
{
value: 6,
label: '六排'
},
]
//
const TireRowInfo = ref([
1, 1
])
const TireRowOptions = [
{
label: '单胎',
value: 1
},
{
label: '双胎',
value: 2
}
]
const TireRowChange = () => {
let arr = []
arr.length = form.value.param1
arr.fill(1)
TireRowInfo.value = arr
}
//
const queryParams = ref({
@ -435,7 +284,7 @@ const queryParams = ref({
//
const rules = {
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
param1: [{required: true, message: "请选择轮胎排数", trigger: "blur"}],
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
@ -444,23 +293,8 @@ const rules = {
//
const form = ref({
id: null,
tyreFacCode: null,
companyCode: null,
code: null,
title: null,
state: null,
axleTotal: null,
tyreTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
trailerNum: null,
param1: 2,
param2: false,
});
/** 查询岗位列表 */
@ -484,23 +318,8 @@ function cancel() {
function reset() {
form.value = {
id: null,
tyreFacCode: null,
companyCode: null,
code: null,
title: null,
state: null,
axleTotal: null,
tyreTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
trailerNum: null,
param1: 2,
param2: false,
};
proxy.resetForm("postRef");
}
@ -544,23 +363,29 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.id != undefined) {
updateCartype(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
getList();
});
} else {
addCartype(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false;
getList();
});
}
}
});
let TireRowInfoStr = TireRowInfo.value.map((e, index) => {
return `${index + 1}-${e}|`
}).join('')
console.log(TireRowInfoStr)
let params = {...form.value, TireRowInfoStr}
console.log(params)
// proxy.$refs["postRef"].validate(valid => {
// if (valid) {
// if (form.value.id != undefined) {
// updateCartype(form.value).then(response => {
// proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
// open.value = false;
// getList();
// });
// } else {
// addCartype(form.value).then(response => {
// proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
// open.value = false;
// getList();
// });
// }
// }
// });
}
/** 删除按钮操作 */

Loading…
Cancel
Save