From 254a3993588431f2f4c0e76f062d22b6f7db17ca Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期三, 31 一月 2024 16:11:30 +0800 Subject: [PATCH] 新增配瓦规则看板 --- jcdm-ui/src/views/main/cfkb/tileMatchKb/index.vue | 198 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 198 insertions(+), 0 deletions(-) diff --git a/jcdm-ui/src/views/main/cfkb/tileMatchKb/index.vue b/jcdm-ui/src/views/main/cfkb/tileMatchKb/index.vue new file mode 100644 index 0000000..4f7bed1 --- /dev/null +++ b/jcdm-ui/src/views/main/cfkb/tileMatchKb/index.vue @@ -0,0 +1,198 @@ +<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> -- Gitblit v1.9.3