From ca5f2ebe60cb7a0ee37145f55943d25b36acfd7c Mon Sep 17 00:00:00 2001
From: caill <815519168@qq.com>
Date: Fri, 16 May 2025 15:19:03 +0800
Subject: [PATCH] bug
---
pages/manage/bcpjb.vue | 9 +++-----
pages/manage/yzmlby.vue | 48 ++++++++++++++++++++---------------------
2 files changed, 26 insertions(+), 31 deletions(-)
diff --git a/pages/manage/bcpjb.vue b/pages/manage/bcpjb.vue
index a6055f8..53952fa 100644
--- a/pages/manage/bcpjb.vue
+++ b/pages/manage/bcpjb.vue
@@ -8,7 +8,7 @@
区域
-
+ 缓存货架区域
@@ -40,8 +40,6 @@
data() {
return {
title: '',
- options1: [{value: 1, text: '缓存货架区域', point: []}],
- index1: '',
options2: this.generateArray('CRYHCHJ', '出入窑缓存货架'),
index2: '',
disabled: false
@@ -55,14 +53,13 @@
const array = []
for (let i = 1; i <= 136; i++) {
array.push({
- value: `${prefix}${String(i).padStart(2, '0')}`,
- text: `${suffix}${String(i).padStart(2, '0')}`
+ value: `${prefix}${String(i).padStart(3, '0')}`,
+ text: `${suffix}${String(i).padStart(3, '0')}`
})
}
return array
},
clearUp () {
- this.index1 = ''
this.index2 = ''
this.disabled = false
},
diff --git a/pages/manage/yzmlby.vue b/pages/manage/yzmlby.vue
index 3c8c9dd..9e7a131 100644
--- a/pages/manage/yzmlby.vue
+++ b/pages/manage/yzmlby.vue
@@ -4,18 +4,18 @@
-
+
区域
-
-
+
+ 压制区域
-
+
点位
-
+
@@ -67,9 +67,7 @@
data() {
return {
title: '',
- options1: [{value: 1, text: '压制区域', point: []}],
- index1: '',
- options2: [],
+ options2: this.generateArray(),
index2: '',
val1: '',
val2: '',
@@ -80,23 +78,24 @@
onLoad (options) {
this.title = options.title
},
- created () {
- let point1 = []
- for (let i = 0; i < 8; i++) {
- point1.push({value: `HNJ0${i+1}DJW`, text: `混碾机对接位0${i+1}`})
- }
- let point2 = []
- for (let i = 0; i < 10; i++) {
- if (i >= 9) {
- point2.push({value: `YJ${i+1}XLW01`, text: `压制机${i+1}下料位01`}, {value: `YJ${i+1}XLW02`, text: `压制机${i+1}下料位02`})
- } else {
- point2.push({value: `YJ0${i+1}XLW01`, text: `压制机0${i+1}下料位01`}, {value: `YJ0${i+1}XLW02`, text: `压制机0${i+1}下料位02`})
- }
- }
- this.options1[0].point = point1
- this.options1[1].point = point2
- },
methods: {
+ generateArray(prefix, suffix) {
+ const array = []
+ const baseText = '压制机'
+ const baseValue = 'YJ'
+ const maxMachines = 10
+ const maxPositions = 2
+
+ for (let machine = 1; machine <= maxMachines; machine++) {
+ for (let position = 1; position <= maxPositions; position++) {
+ array.push({
+ value: `${baseValue}${String(machine).padStart(2, '0')}XLW${String(position).padStart(2, '0')}`,
+ text: `${baseText}${String(machine).padStart(2, '0')}下料位${String(position).padStart(2, '0')}`
+ });
+ }
+ }
+ return array
+ },
change (e) {
this.options1.map((el, i) => {
if (e === i) {
@@ -105,7 +104,6 @@
})
},
clearUp () {
- this.index1 = ''
this.index2 = ''
this.val1 = ''
this.val2 = ''