<template>
|
<div class="app-container">
|
<div style="height: 100%;width: 100%">
|
<el-card class="box-card" >
|
<el-form :model="queryParams" ref="queryForm" :inline="true" >
|
<el-form-item label="轴名称:" prop="axisName" >
|
<el-input
|
style="width: 160px"
|
v-model="queryParams.axisName"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="颈名称:" prop="neckName" >
|
<el-input
|
style="width: 160px"
|
v-model="queryParams.neckName"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="瓦名称:" prop="tileName" >
|
<el-input
|
style="width: 160px"
|
v-model="queryParams.tileName"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
</el-form>
|
</el-card>
|
<el-col :span="20">
|
<el-card class="box-card" >
|
<el-form :model="queryParams" ref="queryForm" :inline="true" >
|
<el-form-item label="箱体码:" prop="scanObject1" >
|
<el-input
|
style=""
|
v-model="queryParams.scanObject1"
|
placeholder="请输入箱体码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="曲轴码:" prop="scanObject2" >
|
<el-input
|
style=""
|
v-model="queryParams.scanObject2"
|
placeholder="请输入曲轴码"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
</el-form>
|
</el-card>
|
</el-col>
|
<el-col :span="4">
|
<el-card class="box-card" >
|
<el-form :model="queryParams" ref="queryForm" :inline="true" >
|
<el-form-item style="margin-left: 1%">
|
<el-button type="primary" icon="el-icon-refresh" @click="handleQuery">查询</el-button>
|
</el-form-item>
|
</el-form>
|
</el-card>
|
</el-col>
|
|
<el-col :span="24" >
|
<el-card class="bottom-card">
|
<div slot="header" class="clearfix">
|
<i class="el-icon-tickets"></i>
|
<span style="font-weight: bold">当前产品信息</span>
|
</div>
|
<el-descriptions :column="1" :label-style="{'font-size': '20px'}" border :content-style="{'min-width': '300px'}">
|
<el-descriptions-item label="机型">
|
<span>{{queryParams.productSeries}}</span>
|
</el-descriptions-item>
|
<el-descriptions-item label="箱体码">
|
<span>{{queryParams.scanObject1}}</span>
|
</el-descriptions-item>
|
<el-descriptions-item label="曲轴码">
|
<span>{{queryParams.scanObject2}}</span>
|
</el-descriptions-item>
|
<el-descriptions-item label="轴名称">
|
<span>{{queryParams.axisName}}</span>
|
</el-descriptions-item>
|
<el-descriptions-item label="颈名称">
|
<span>{{queryParams.neckName}}</span>
|
</el-descriptions-item>
|
<el-descriptions-item label="瓦名称">
|
<span>{{queryParams.tileName}}</span>
|
</el-descriptions-item>
|
<el-descriptions-item label="配瓦颜色">
|
<span :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
|
</el-descriptions-item>
|
</el-descriptions>
|
<el-divider></el-divider>
|
</el-card>
|
</el-col>
|
</div>
|
</div>
|
</template>
|
<script>
|
import VueQr from 'vue-qr'
|
import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
|
export default {
|
name: "index",
|
dicts: ['colour_hex'],
|
components: {
|
VueQr,
|
},
|
data(){
|
return{
|
loading: true,
|
tileMatchKbList: [],
|
qrCode: '',
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
productSeries: null,
|
scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
|
scanObject2: 'P0SQ0-041000-1002;T2312020675;DAABBA;S500003',
|
axisName: '中间主轴孔',
|
neckName: '中间主轴颈',
|
tileName: '中心主轴瓦',
|
axisParameterNoPosition: null,
|
neckParameterPosition: null,
|
axisValue: null,
|
neckValue: null,
|
tileColor: null,
|
createUser: null,
|
updateUser: null,
|
state: null,
|
},
|
}
|
},
|
methods:{
|
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.axisValueextracted();
|
this.neckValueextracted();
|
this.productSeriesextracted();
|
this.getList();
|
this.$message(response.row.tileColor)
|
},
|
axisValueextracted() {
|
// 取箱体码第三段为配瓦值
|
const parts1 = this.queryParams.scanObject1.split(";");
|
if (parts1.length >= 3) {
|
const axisValueextracted = parts1[2].substring(3,4);
|
return this.queryParams.axisValue= axisValueextracted;
|
}
|
},
|
neckValueextracted() {
|
//取曲轴码第三段为配瓦值
|
const parts2 = this.queryParams.scanObject2.split(";");
|
if (parts2.length >= 3) {
|
const neckValueextracted = parts2[2].substring(3,4);
|
return this.queryParams.neckValue= neckValueextracted;
|
}
|
},
|
productSeriesextracted() {
|
const parts3 =this.queryParams.scanObject2.split(";");
|
if(parts3.length >= 3) {
|
const productSeriesextracted = parts3[0].substring(1, 5);
|
return this.queryParams.productSeries = productSeriesextracted;
|
}
|
},
|
getList() {
|
let queryParams = {
|
productSeries : this.queryParams.productSeries,
|
axisName : this.queryParams.axisName,
|
neckName : this.queryParams.neckName,
|
tileName : this.queryParams.tileName,
|
axisValue: this.queryParams.axisValue,
|
neckValue: this.queryParams.neckValue,
|
}
|
console.log(queryParams)
|
listTileMatchRules(queryParams).then(response => {
|
this.queryParams.tileColor = response.rows[0].tileColor;
|
});
|
},
|
},
|
}
|
</script>
|
|
<style scoped>
|
::v-deep .el-form-item__label{
|
font-size: large;
|
}
|
::v-deep .el-card__body{
|
padding: 15px 20px 0px 20px;
|
}
|
::v-deep .el-input .el-input--medium .el-input--suffix{
|
width: 200px;
|
}
|
|
</style>
|