修改轮胎信息界面

master
夜笙歌 2 years ago
parent 54b3477796
commit 6762008e78

@ -1,272 +1,279 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="轮胎厂编码" prop="tyreFacCode"> <el-form-item label="轮胎厂编码" prop="tyreFacCode">
<el-input <el-input
v-model="queryParams.tyreFacCode" v-model="queryParams.tyreFacCode"
placeholder="请输入轮胎厂编码" placeholder="请输入轮胎厂编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="企业编码" prop="companyCode"> <el-form-item label="企业编码" prop="companyCode">
<el-input <el-input
v-model="queryParams.companyCode" v-model="queryParams.companyCode"
placeholder="请输入企业编码" placeholder="请输入企业编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="车牌号" prop="carLicense"> <el-form-item label="车牌号" prop="carLicense">
<el-input <el-input
v-model="queryParams.carLicense" v-model="queryParams.carLicense"
placeholder="请输入车牌号" placeholder="请输入车牌号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="轮胎编号" prop="tureCode"> <el-form-item label="轮胎编号" prop="tureCode">
<el-input <el-input
v-model="queryParams.tureCode" v-model="queryParams.tureCode"
placeholder="请输入轮胎编号" placeholder="请输入轮胎编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="RFID" prop="tyreRfid"> <el-form-item label="RFID" prop="tyreRfid">
<el-input <el-input
v-model="queryParams.tyreRfid" v-model="queryParams.tyreRfid"
placeholder="请输入RFID" placeholder="请输入RFID"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="轮位" prop="tyrePosition"> <el-form-item label="轮位" prop="tyrePosition">
<el-input <el-input
v-model="queryParams.tyrePosition" v-model="queryParams.tyrePosition"
placeholder="请输入轮位" placeholder="请输入轮位"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorId"> <el-form-item label="当前轮胎传感器ID" prop="sensorId">
<el-input <el-input
v-model="queryParams.sensorId" v-model="queryParams.sensorId"
placeholder="请输入当前轮胎传感器ID" placeholder="请输入当前轮胎传感器ID"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="当前花纹深度" prop="currentTextureDepth"> <el-form-item label="当前花纹深度" prop="currentTextureDepth">
<el-input <el-input
v-model="queryParams.currentTextureDepth" v-model="queryParams.currentTextureDepth"
placeholder="请输入当前花纹深度" placeholder="请输入当前花纹深度"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="state">
<el-input <el-input
v-model="queryParams.state" v-model="queryParams.state"
placeholder="请输入状态" placeholder="请输入状态"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否删除" prop="isDelete"> <el-form-item label="是否删除" prop="isDelete">
<el-input <el-input
v-model="queryParams.isDelete" v-model="queryParams.isDelete"
placeholder="请输入是否删除" placeholder="请输入是否删除"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建者姓名" prop="createName"> <el-form-item label="创建者姓名" prop="createName">
<el-input <el-input
v-model="queryParams.createName" v-model="queryParams.createName"
placeholder="请输入创建者姓名" placeholder="请输入创建者姓名"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="修改时间" prop="modifyTime"> <el-form-item label="修改时间" prop="modifyTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.modifyTime" style="width: 200px"
type="date" v-model="queryParams.modifyTime"
value-format="yyyy-MM-dd" type="date"
placeholder="请选择修改时间"> value-format="yyyy-MM-dd"
placeholder="请选择修改时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="修改者账号" prop="modifyBy"> <el-form-item label="修改者账号" prop="modifyBy">
<el-input <el-input
v-model="queryParams.modifyBy" v-model="queryParams.modifyBy"
placeholder="请输入修改者账号" placeholder="请输入修改者账号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="编辑者姓名" prop="modifyName"> <el-form-item label="编辑者姓名" prop="modifyName">
<el-input <el-input
v-model="queryParams.modifyName" v-model="queryParams.modifyName"
placeholder="请输入编辑者姓名" placeholder="请输入编辑者姓名"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="Search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="Refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
icon="Plus" icon="Plus"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']" v-hasPermi="['basetyre:basetyre:add']"
>新增</el-button> >新增
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
icon="Edit" icon="Edit"
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']" v-hasPermi="['basetyre:basetyre:edit']"
>修改</el-button> >修改
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="Delete"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']" v-hasPermi="['basetyre:basetyre:remove']"
>删除</el-button> >删除
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
icon="el-icon-download" icon="Download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['basetyre:basetyre:export']" v-hasPermi="['basetyre:basetyre:export']"
>导出</el-button> >导出
</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="basetyreList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="basetyreList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="轮胎厂编码" align="center" prop="tyreFacCode" /> <el-table-column label="轮胎厂编码" align="center" prop="tyreFacCode"/>
<el-table-column label="企业编码" align="center" prop="companyCode" /> <el-table-column label="企业编码" align="center" prop="companyCode"/>
<el-table-column label="车辆ID" align="center" prop="carId" /> <el-table-column label="车辆ID" align="center" prop="carId"/>
<el-table-column label="车牌号" align="center" prop="carLicense" /> <el-table-column label="车牌号" align="center" prop="carLicense"/>
<el-table-column label="轮胎编号" align="center" prop="tureCode" /> <el-table-column label="轮胎编号" align="center" prop="tureCode"/>
<el-table-column label="轮胎型号" align="center" prop="tureModel" /> <el-table-column label="轮胎型号" align="center" prop="tureModel"/>
<el-table-column label="轮胎型号表ID" align="center" prop="tureModelId" /> <el-table-column label="轮胎型号表ID" align="center" prop="tureModelId"/>
<el-table-column label="品牌ID" align="center" prop="tureBrandId" /> <el-table-column label="品牌ID" align="center" prop="tureBrandId"/>
<el-table-column label="RFID" align="center" prop="tyreRfid" /> <el-table-column label="RFID" align="center" prop="tyreRfid"/>
<el-table-column label="轮位" align="center" prop="tyrePosition" /> <el-table-column label="轮位" align="center" prop="tyrePosition"/>
<el-table-column label="当前轮胎传感器ID" align="center" prop="sensorId" /> <el-table-column label="当前轮胎传感器ID" align="center" prop="sensorId"/>
<el-table-column label="当前花纹深度" align="center" prop="currentTextureDepth" /> <el-table-column label="当前花纹深度" align="center" prop="currentTextureDepth"/>
<el-table-column label="状态" align="center" prop="state" /> <el-table-column label="状态" align="center" prop="state"/>
<el-table-column label="是否删除" align="center" prop="isDelete" /> <el-table-column label="是否删除" align="center" prop="isDelete"/>
<el-table-column label="创建者ID" align="center" prop="createId" /> <el-table-column label="创建者ID" align="center" prop="createId"/>
<el-table-column label="创建者姓名" align="center" prop="createName" /> <el-table-column label="创建者姓名" align="center" prop="createName"/>
<el-table-column label="修改时间" align="center" prop="modifyTime" width="180"> <el-table-column label="修改时间" align="center" prop="modifyTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.modifyTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.modifyTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="修改者ID" align="center" prop="modifyId" /> <el-table-column label="修改者ID" align="center" prop="modifyId"/>
<el-table-column label="修改者账号" align="center" prop="modifyBy" /> <el-table-column label="修改者账号" align="center" prop="modifyBy"/>
<el-table-column label="编辑者姓名" align="center" prop="modifyName" /> <el-table-column label="编辑者姓名" align="center" prop="modifyName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']" v-hasPermi="['basetyre:basetyre:edit']"
>修改</el-button> >修改
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']" v-hasPermi="['basetyre:basetyre:remove']"
>删除</el-button> >删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改轮胎基础信息对话框 --> <!-- 添加或修改轮胎基础信息对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="轮胎厂编码" prop="tyreFacCode"> <el-form-item label="轮胎厂编码" prop="tyreFacCode">
<el-input v-model="form.tyreFacCode" placeholder="请输入轮胎厂编码" /> <el-input v-model="form.tyreFacCode" placeholder="请输入轮胎厂编码"/>
</el-form-item> </el-form-item>
<el-form-item label="企业编码" prop="companyCode"> <el-form-item label="企业编码" prop="companyCode">
<el-input v-model="form.companyCode" placeholder="请输入企业编码" /> <el-input v-model="form.companyCode" placeholder="请输入企业编码"/>
</el-form-item> </el-form-item>
<el-form-item label="车牌号" prop="carLicense"> <el-form-item label="车牌号" prop="carLicense">
<el-input v-model="form.carLicense" placeholder="请输入车牌号" /> <el-input v-model="form.carLicense" placeholder="请输入车牌号"/>
</el-form-item> </el-form-item>
<el-form-item label="轮胎编号" prop="tureCode"> <el-form-item label="轮胎编号" prop="tureCode">
<el-input v-model="form.tureCode" placeholder="请输入轮胎编号" /> <el-input v-model="form.tureCode" placeholder="请输入轮胎编号"/>
</el-form-item> </el-form-item>
<el-form-item label="RFID" prop="tyreRfid"> <el-form-item label="RFID" prop="tyreRfid">
<el-input v-model="form.tyreRfid" placeholder="请输入RFID" /> <el-input v-model="form.tyreRfid" placeholder="请输入RFID"/>
</el-form-item> </el-form-item>
<el-form-item label="轮位" prop="tyrePosition"> <el-form-item label="轮位" prop="tyrePosition">
<el-input v-model="form.tyrePosition" placeholder="请输入轮位" /> <el-input v-model="form.tyrePosition" placeholder="请输入轮位"/>
</el-form-item> </el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorId"> <el-form-item label="当前轮胎传感器ID" prop="sensorId">
<el-input v-model="form.sensorId" placeholder="请输入当前轮胎传感器ID" /> <el-input v-model="form.sensorId" placeholder="请输入当前轮胎传感器ID"/>
</el-form-item> </el-form-item>
<el-form-item label="当前花纹深度" prop="currentTextureDepth"> <el-form-item label="当前花纹深度" prop="currentTextureDepth">
<el-input v-model="form.currentTextureDepth" placeholder="请输入当前花纹深度" /> <el-input v-model="form.currentTextureDepth" placeholder="请输入当前花纹深度"/>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="state">
<el-input v-model="form.state" placeholder="请输入状态" /> <el-input v-model="form.state" placeholder="请输入状态"/>
</el-form-item> </el-form-item>
<el-form-item label="是否删除" prop="isDelete"> <el-form-item label="是否删除" prop="isDelete">
<el-input v-model="form.isDelete" placeholder="请输入是否删除" /> <el-input v-model="form.isDelete" placeholder="请输入是否删除"/>
</el-form-item> </el-form-item>
<el-form-item label="创建者姓名" prop="createName"> <el-form-item label="创建者姓名" prop="createName">
<el-input v-model="form.createName" placeholder="请输入创建者姓名" /> <el-input v-model="form.createName" placeholder="请输入创建者姓名"/>
</el-form-item> </el-form-item>
<el-form-item label="修改时间" prop="modifyTime"> <el-form-item label="修改时间" prop="modifyTime">
<el-date-picker clearable <el-date-picker clearable
v-model="form.modifyTime" v-model="form.modifyTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="请选择修改时间"> placeholder="请选择修改时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="修改者账号" prop="modifyBy"> <el-form-item label="修改者账号" prop="modifyBy">
<el-input v-model="form.modifyBy" placeholder="请输入修改者账号" /> <el-input v-model="form.modifyBy" placeholder="请输入修改者账号"/>
</el-form-item> </el-form-item>
<el-form-item label="编辑者姓名" prop="modifyName"> <el-form-item label="编辑者姓名" prop="modifyName">
<el-input v-model="form.modifyName" placeholder="请输入编辑者姓名" /> <el-input v-model="form.modifyName" placeholder="请输入编辑者姓名"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -278,7 +285,7 @@
</template> </template>
<script> <script>
import { listBasetyre, getBasetyre, delBasetyre, addBasetyre, updateBasetyre } from "@/api/basetyre/basetyre"; import {addBasetyre, delBasetyre, getBasetyre, listBasetyre, updateBasetyre} from "@/api/basetyre/basetyre";
export default { export default {
name: "Basetyre", name: "Basetyre",
@ -330,8 +337,7 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {}
}
}; };
}, },
created() { created() {
@ -394,7 +400,7 @@ export default {
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -437,12 +443,13 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除轮胎基础信息编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除轮胎基础信息编号为"' + ids + '"的数据项?').then(function () {
return delBasetyre(ids); return delBasetyre(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

@ -1,80 +1,118 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏--> <!-- 搜索栏-->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="轮胎品牌" prop="brand"> <el-form-item label="轮胎厂编码" prop="tyreFacCode">
<el-select v-model="queryParams.brand" placeholder="请选择轮胎品牌" clearable style="width: 200px"> <el-input
<el-option v-model="queryParams.tyreFacCode"
v-for="dict in searchCriteria.brand" placeholder="请输入轮胎厂编码"
:key="dict.value" clearable
:label="dict.label" @keyup.enter.native="handleQuery"
:value="dict.value" />
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="轮胎型号" prop="type"> <el-form-item label="企业编码" prop="companyCode">
<el-select v-model="queryParams.type" placeholder="请选择轮胎型号" clearable style="width: 200px"> <el-input
<el-option v-model="queryParams.companyCode"
v-for="dict in searchCriteria.type" placeholder="请输入企业编码"
:key="dict.value" clearable
:label="dict.label" @keyup.enter.native="handleQuery"
:value="dict.value" />
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="车牌号" prop="licensePlateNumber"> <el-form-item label="车牌号" prop="carLicense">
<el-input <el-input
v-model="queryParams.licensePlateNumber" v-model="queryParams.carLicense"
placeholder="请输入车牌号" placeholder="请输入车牌号"
clearable clearable
style="width: 200px" @keyup.enter.native="handleQuery"
@keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="轮胎编号" prop="serialNumber"> <el-form-item label="轮胎编号" prop="tureCode">
<el-input <el-input
v-model="queryParams.serialNumber" v-model="queryParams.tureCode"
placeholder="请输入轮胎编号" placeholder="请输入轮胎编号"
clearable clearable
style="width: 200px" @keyup.enter.native="handleQuery"
@keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="RFID" prop="RFID"> <el-form-item label="RFID" prop="tyreRfid">
<el-input <el-input
v-model="queryParams.RFID" v-model="queryParams.tyreRfid"
placeholder="请输入RFID" placeholder="请输入RFID"
clearable clearable
style="width: 200px" @keyup.enter.native="handleQuery"
@keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="轮位" prop="WheelPosition"> <el-form-item label="轮位" prop="tyrePosition">
<el-input <el-input
v-model="queryParams.WheelPosition" v-model="queryParams.tyrePosition"
placeholder="请输入轮位" placeholder="请输入轮位"
clearable clearable
style="width: 200px" @keyup.enter.native="handleQuery"
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorId">
<el-input
v-model="queryParams.sensorId"
placeholder="请输入当前轮胎传感器ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="当前花纹深度" prop="currentTextureDepth">
<el-input
v-model="queryParams.currentTextureDepth"
placeholder="请输入当前花纹深度"
clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="轮胎传感器ID" prop="sensorID"> <el-form-item label="状态" prop="state">
<el-input <el-input
v-model="queryParams.sensorID" v-model="queryParams.state"
placeholder="请输入轮胎传感器ID" placeholder="请输入状态"
clearable clearable
style="width: 200px" @keyup.enter.native="handleQuery"
@keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="postName"> <el-form-item label="是否删除" prop="isDelete">
<el-date-picker <el-input
v-model="queryParams.time" v-model="queryParams.isDelete"
type="daterange" placeholder="请输入是否删除"
range-separator="至" clearable
start-placeholder="开始时间" @keyup.enter.native="handleQuery"
end-placeholder="结束时间" />
:size="size" </el-form-item>
<el-form-item label="创建者姓名" prop="createName">
<el-input
v-model="queryParams.createName"
placeholder="请输入创建者姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="修改时间" prop="modifyTime">
<el-date-picker clearable
style="width: 200px"
v-model="queryParams.modifyTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择修改时间">
</el-date-picker>
</el-form-item>
<el-form-item label="修改者账号" prop="modifyBy">
<el-input
v-model="queryParams.modifyBy"
placeholder="请输入修改者账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="编辑者姓名" prop="modifyName">
<el-input
v-model="queryParams.modifyName"
placeholder="请输入编辑者姓名"
clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -91,7 +129,7 @@
plain plain
icon="Plus" icon="Plus"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:post:add']" v-hasPermi="['basetyre:basetyre:add']"
>新增 >新增
</el-button> </el-button>
</el-col> </el-col>
@ -102,7 +140,7 @@
icon="Edit" icon="Edit"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:post:edit']" v-hasPermi="['basetyre:basetyre:edit']"
>修改 >修改
</el-button> </el-button>
</el-col> </el-col>
@ -113,7 +151,7 @@
icon="Delete" icon="Delete"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:post:remove']" v-hasPermi="['basetyre:basetyre:remove']"
>删除 >删除
</el-button> </el-button>
</el-col> </el-col>
@ -123,7 +161,7 @@
plain plain
icon="Download" icon="Download"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:post:export']" v-hasPermi="['basetyre:basetyre:export']"
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
@ -133,27 +171,47 @@
<!-- 表格主体--> <!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="岗位编号" align="center" prop="postId"/> <el-table-column label="轮胎厂编码" align="center" prop="tyreFacCode"/>
<el-table-column label="岗位编码" align="center" prop="postCode"/> <el-table-column label="企业编码" align="center" prop="companyCode"/>
<el-table-column label="岗位名称" align="center" prop="postName"/> <el-table-column label="车辆ID" align="center" prop="carId"/>
<el-table-column label="岗位排序" align="center" prop="postSort"/> <el-table-column label="车牌号" align="center" prop="carLicense"/>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="轮胎编号" align="center" prop="tureCode"/>
<el-table-column label="轮胎型号" align="center" prop="tureModel"/>
<el-table-column label="轮胎型号表ID" align="center" prop="tureModelId"/>
<el-table-column label="品牌ID" align="center" prop="tureBrandId"/>
<el-table-column label="RFID" align="center" prop="tyreRfid"/>
<el-table-column label="轮位" align="center" prop="tyrePosition"/>
<el-table-column label="当前轮胎传感器ID" align="center" prop="sensorId"/>
<el-table-column label="当前花纹深度" align="center" prop="currentTextureDepth"/>
<el-table-column label="状态" align="center" prop="state"/>
<el-table-column label="是否删除" align="center" prop="isDelete"/>
<el-table-column label="创建者ID" align="center" prop="createId"/>
<el-table-column label="创建者姓名" align="center" prop="createName"/>
<el-table-column label="修改时间" align="center" prop="modifyTime" width="180">
<template #default="scope"> <template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status"/> <span>{{ parseTime(scope.row.modifyTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="修改者ID" align="center" prop="modifyId"/>
<template #default="scope"> <el-table-column label="修改者账号" align="center" prop="modifyBy"/>
<span>{{ parseTime(scope.row.createTime) }}</span> <el-table-column label="编辑者姓名" align="center" prop="modifyName"/>
</template> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
</el-table-column> <template slot-scope="scope">
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width"> <el-button
<template #default="scope"> size="mini"
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:post:edit']"> type="text"
修改 icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
>修改
</el-button> </el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" <el-button
v-hasPermi="['system:post:remove']">删除 size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -171,37 +229,54 @@
<!-- 添加或修改岗位对话框 --> <!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="postRef" :model="form" :rules="rules" label-width="80px"> <el-form ref="postRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="轮胎品牌" prop="brand"> <el-form-item label="轮胎厂编码" prop="tyreFacCode">
<el-select v-model="form.brand" placeholder="请选择轮胎品牌" clearable style="width: 200px"> <el-input v-model="form.tyreFacCode" placeholder="请输入轮胎厂编码"/>
<el-option
v-for="dict in searchCriteria.brand"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="轮胎型号" prop="type"> <el-form-item label="企业编码" prop="companyCode">
<el-select v-model="form.type" placeholder="请选择轮胎型号" clearable style="width: 200px"> <el-input v-model="form.companyCode" placeholder="请输入企业编码"/>
<el-option
v-for="dict in searchCriteria.type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="轮胎编号" prop="serialNumber"> <el-form-item label="车牌号" prop="carLicense">
<el-input v-model="form.serialNumber" placeholder="请输入岗位名称"/> <el-input v-model="form.carLicense" placeholder="请输入车牌号"/>
</el-form-item> </el-form-item>
<el-form-item label="RFID" prop="RFID"> <el-form-item label="轮胎编号" prop="tureCode">
<el-input v-model="form.RFID" placeholder="请输入岗位名称"/> <el-input v-model="form.tureCode" placeholder="请输入轮胎编号"/>
</el-form-item> </el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorID"> <el-form-item label="RFID" prop="tyreRfid">
<el-input v-model="form.sensorID" placeholder="请输入岗位名称"/> <el-input v-model="form.tyreRfid" placeholder="请输入RFID"/>
</el-form-item> </el-form-item>
<el-form-item label="当前花纹深度" prop="depth"> <el-form-item label="轮位" prop="tyrePosition">
<el-input-number v-model="form.depth"/> <el-input v-model="form.tyrePosition" placeholder="请输入轮位"/>
</el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorId">
<el-input v-model="form.sensorId" placeholder="请输入当前轮胎传感器ID"/>
</el-form-item>
<el-form-item label="当前花纹深度" prop="currentTextureDepth">
<el-input v-model="form.currentTextureDepth" placeholder="请输入当前花纹深度"/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-input v-model="form.state" placeholder="请输入状态"/>
</el-form-item>
<el-form-item label="是否删除" prop="isDelete">
<el-input v-model="form.isDelete" placeholder="请输入是否删除"/>
</el-form-item>
<el-form-item label="创建者姓名" prop="createName">
<el-input v-model="form.createName" placeholder="请输入创建者姓名"/>
</el-form-item>
<el-form-item label="修改时间" prop="modifyTime">
<el-date-picker
clearable
v-model="form.modifyTime"
type="date"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
placeholder="请选择修改时间">
</el-date-picker>
</el-form-item>
<el-form-item label="修改者账号" prop="modifyBy">
<el-input v-model="form.modifyBy" placeholder="请输入修改者账号"/>
</el-form-item>
<el-form-item label="编辑者姓名" prop="modifyName">
<el-input v-model="form.modifyName" placeholder="请输入编辑者姓名"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
@ -214,35 +289,9 @@
</div> </div>
</template> </template>
<script setup name="Post"> <script setup name="basetyre">
import {addPost, delPost, getPost, listPost, updatePost} from "@/api/system/post"; import {addPost, delPost, getPost, listPost, updatePost} from "@/api/basetyre/basetyre";
const searchCriteria = ref({
brand: [
{
label: '玲珑',
value: '玲珑'
},
{
label: '利奥',
value: '利奥'
}
],
type: [
{
label: '11R22.5',
value: '11R22.5'
},
{
label: '12R22.5',
value: '12R22.5'
},
{
label: 'R567',
value: 'R567'
},
]
})
const {proxy} = getCurrentInstance(); const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable"); const {sys_normal_disable} = proxy.useDict("sys_normal_disable");
@ -255,7 +304,7 @@ const {sys_normal_disable} = proxy.useDict("sys_normal_disable");
* ids 选择行id * ids 选择行id
* single 修改按钮是否可用标识 * single 修改按钮是否可用标识
* multiple 删除按钮是否可用标识 * multiple 删除按钮是否可用标识
* total 表格当前页码 * total 总条数
* title 模态框标题 * title 模态框标题
* */ * */
@ -272,14 +321,26 @@ const title = ref("");
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
brand: undefined, tyreFacCode: null,
type: undefined, companyCode: null,
licensePlateNumber: undefined, carId: null,
serialNumber: undefined, carLicense: null,
RFID: undefined, tureCode: null,
WheelPosition: undefined, tureModel: null,
sensorID: undefined, tureModelId: null,
time: [], tureBrandId: null,
tyreRfid: null,
tyrePosition: null,
sensorId: null,
currentTextureDepth: null,
state: null,
isDelete: null,
createId: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null
}) })
const rules = { const rules = {
@ -310,12 +371,29 @@ function cancel() {
/** 表单重置 */ /** 表单重置 */
function reset() { function reset() {
form.value = { form.value = {
brand: undefined, id: null,
type: undefined, tyreFacCode: null,
serialNumber: undefined, companyCode: null,
RFID: undefined, carId: null,
sensorID: undefined, carLicense: null,
depth: undefined tureCode: null,
tureModel: null,
tureModelId: null,
tureBrandId: null,
tyreRfid: null,
tyrePosition: null,
sensorId: null,
currentTextureDepth: null,
state: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null
}; };
proxy.resetForm("postRef"); proxy.resetForm("postRef");
} }
@ -329,14 +407,13 @@ function handleQuery() {
/** 重置按钮操作 */ /** 重置按钮操作 */
const resetQuery = () => { const resetQuery = () => {
proxy.resetForm("queryRef"); proxy.resetForm("queryRef");
queryParams.value.time = []
handleQuery(); handleQuery();
} }
/** 多选框选中数据 */ /** 多选框选中数据 */
function handleSelectionChange(selection) { function handleSelectionChange(selection) {
ids.value = selection.map(item => item.postId); ids.value = selection.map(item => item.postId);
single.value = selection.length != 1; single.value = selection.length !== 1;
multiple.value = !selection.length; multiple.value = !selection.length;
} }
@ -344,7 +421,7 @@ function handleSelectionChange(selection) {
function handleAdd() { function handleAdd() {
reset(); reset();
open.value = true; open.value = true;
title.value = "添加岗位"; title.value = "添加轮胎基础信息";
} }
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -354,7 +431,7 @@ function handleUpdate(row) {
getPost(postId).then(response => { getPost(postId).then(response => {
form.value = response.data; form.value = response.data;
open.value = true; open.value = true;
title.value = "修改岗位"; title.value = "修改轮胎基础信息";
}); });
} }

Loading…
Cancel
Save